SAP ERP ABAP: Keyboard Shortcut Tips

CTRL+D                 Duplicate line
CTRL+Y                 Select text
CTRL+K                 Change case of selected text
CTRL+U                 Uppercase letters
CTRL+<                 Comment
CTRL+>                 Uncomment
CTRL+SPACE       Activate autocomplete

Mass Upload in infotype 0128 (Notifications)

For mass upload in infotype 0128 (Notifications)

  • Subtype 1, use transactio PA70
  • Subtype 2, use SAP standard program RPU12800 as a model

Report RPL12800 lists personnel numbers containing data in infotype 0128.

SELECTION-SCREEN – Dynamic selection screen change

This is an example of dynamic changes at selection screen. When you click on the second radio button, another field will be displayed. The tip here is when changing state of objects in the screen, internal table SCREEN has to be edited in SELECTION-SCREEN OUTPUT, otherwise it wont’t work.

REPORT ZSELECTION_SCREEN.

* Text-symbols
*001 &nbsp;Lorem ipsum ei mei affert eruditi necessitatibus, id nec tota ullum
*002 &nbsp;Nibh maluisset scripserit et

**********************************************************************
* Selection Screen
**********************************************************************
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: p_radio TYPE sprps RADIOBUTTON GROUP a1 USER-COMMAND radio.
SELECTION-SCREEN: COMMENT 4(67) text-001.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: p_radio2 TYPE sprps RADIOBUTTON GROUP a1.
SELECTION-SCREEN: COMMENT 4(28) text-002.
SELECTION-SCREEN END OF LINE.
PARAMETERS: p_test TYPE char1.
**********************************************************************
* AT SELECTION-SCREEN OUTPUT
**********************************************************************
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name = 'P_TEST' or
screen-name = '%_P_TEST_%_APP_%-TEXT'.
IF p_radio2 = 'X'.
screen-active = '1'.
ELSE.
screen-active = '0'.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
START-OF-SELECTION.
WRITE: 'End'.

SELECTION-SCREEN – Complex Selection screen example

When you have to enter a text greater than 50 characters to describe a field in the selection screen, or need to have more control over the position of the items in the selection screen, use technique below. This can also be used when you need to insert for example two radio buttons in the same line.

REPORT ZSELECTION_SCREEN.
 *Text-symbols
 *001  Lorem ipsum ei mei affert eruditi necessitatibus, id nec tota ullum
 *002  Nibh maluisset scripserit et
 
 Selection Screen 
 
 SELECTION-SCREEN BEGIN OF LINE.
 PARAMETERS: p_radio1 type SPRPS RADIOBUTTON GROUP a1.
 SELECTION-SCREEN: COMMENT 4(67) text-001.
 SELECTION-SCREEN END OF LINE.
 SELECTION-SCREEN BEGIN OF LINE.
 PARAMETERS: p_radio2 type SPRPS RADIOBUTTON GROUP a1.
 SELECTION-SCREEN: COMMENT 4(28) text-002.
 SELECTION-SCREEN END OF LINE.