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  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_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.

ST03 – Workload Monitor

ST03 – Workload Monitor

ALV Report – SAP standard example

In transaction SE38, search for programs “BCALV*”. You’ll get a variety ofALV report examples.

Program RSSTATUS – Identify Application Component of Object

Program to verify application component of object. It can be used to inform details  of object when opening OSS Message for example.

PO13 – Create HR Position

Transaction PO13 creates HR position.

List Header – List Processing

To edit list header:

  • Running ABAP program, go to System–> List –>List Header
  • While editing program, go to Goto–>Text Elements–>List Headers

SU20 – Create Authorization Object

Use transaction SU20 to create an authorization object. If you don’t have an object class yet, create it first through transaction SU21.

Table TACT contain all activity codes for field ACTVT. TACTZ contains activities permitted for specific objects.

Watchpoint

Watchpoint are conditional breakpoints. You can define a relational operator and comparison field value in order to the breakpoint happen.

There is a limit of up to 10 Watchpoints set at the same time.

STRLEN( )

Statement “length = STRLEN( variable ).” provides lenght of character variable.


This blog is intended to SAP Consultants and users interested in quick tips when working with SAP ERP Systems. Information provided by this blog comes from years of experience as an ABAP Consultant, most of it for HR module. This documentation is provided "as is" without warranty of any kind, expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose, and further without warranty that use of this documentation will not infringe the patents, copyrights or other intellectual property of third parties. In no event shall www.abapwizard.com, its authors or users be liable for incidental or consequential damages of any kind, including, but not limited to damage or injury to property and lost profits, regardless of whether www.abapwizard.com knew or had reason to know of the possibility of such an occurrence. No permission to use the name of www.abapwizard.com or any adaptation thereof is granted to any user of the content on this website, except for use in the notice of copyright provided above. Please refer to http://help.sap.com or http://www.sap.com for the most up to date documentation related to SAP Systems. This blog www.abapwizard.com is in no way affiliated with SAP AG.