2

Modern SAP warehousing (EWM) makes me use old ABAP

 1 year ago
source link: https://blogs.sap.com/2023/04/27/modern-sap-warehousing-ewm-makes-me-use-old-abap/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
April 27, 2023 Less than a 1 minute read

Modern SAP warehousing (EWM) makes me use old ABAP

I am an ABAP developer.
And you might know that I claim to do “modern” ABAP.

But programming in a modern SAP warehousing solution – SAP EWM – makes me use old ABAP.
Like function modules.
And maybe even dynpros.

An example is the /SCWM/MON: the nodes have to be FMs, the methods as well.

Here is an example monitor method:

FUNCTION Z_MON_METHOD_PAINT_HU
  IMPORTING
    IV_LGNUM TYPE /SCWM/LGNUM
    IT_DATA TYPE /SCWM/TT_LIME_ALL_MON.

*Allow just 1 line
  IF lines( it_data ) <> 1.
    "Please select exactly 1 line for this method!
    MESSAGE s003 DISPLAY LIKE 'W'.
    RETURN.
  ELSE.
    DATA(ls_hu_data) = it_data[ 1 ].
  ENDIF.

*Ask for Input ("what colour to paint the HU?")
gs_hu_paint_dynpro-huident = ls_hu_data-huident
  CALL SCREEN c_screen_paint_HU STARTING AT 10 10 .
*make sure no cancel etc. 
  IF g_fcode NE c_fcode_save.
    RETURN.
  ENDIF.

* do the actual work in ABAP OO:
go_my_mon_node->paint_hu_in_colour( i_huident = gs_hu_paint_dynpro-huident 
				    i_colour = gs_hu_paint_dynpro-colour_to_paint ). 

ENDFUNCTION.

You know what: I think it’s not that bad, actually.

What do you think?
Do you use old ABAP?
Do you have to?

Best
Joachim


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK