Вы находитесь на странице: 1из 3

ne wt o sap.

inf o

http://www.newto sap.info /2012/07/selectio n-screen-elements-1.html

Selection Screen Elements - 1


Selection screen is where user enters the input and thus this has high impact and visibility to user. We will cover all selection screen elements used.

Paramet ers:
Parameter will hold a single input value at a time. We just need to specif y the type of user input value. By def ault if no type is specif ied, it will take it as single character. Syntax: PARAMET ERS: p_matnr T YPE mara-matnr.

T he name of the parameter may contain a maximum of eight characters. By def ault the parameter display name in selection screen is Parame te rs in SAP ABAP same as parameter name. To change this Goto >> Text Elements >> Selection text and write appropriate text f or that parameter.

We can make this f ield mandatory f or user input by mentioning obligatory. PARAMET ERS: p_matnr T YPE mara-matnr OBLIGAT ORY. We can assign explicit search help to the f iled by using MAT CHCODE OBJECT f ollowed by search help name. PARAMET ERS p_matnr T YPE mara-matnr OBLIGAT ORY MAT CHCODE OBJECT Z AU_HELP.

Now when you press F4 on this f ield , search help Z AU_HELP will be used to get the possible values. In case of dynamic modification of screen we can use , MODIF ID f ollowed by modif ication group name (Up to 3 characters). PARAMET ERS p_matnr T YPE mara-matnr MODIF ID Z AU.

Se le c tio n Te xts

To understand how dynamic screen modif ication works ref er http://www.newtosap.inf o/2012/04/dynamicscreen-modif ication.html We can hide the parameter f ield by using NO-DISPLAY.

PARAMET ERS: p_matnr T YPE mara-matnr NO-DISPLAY.

T he f ield will not be visible unless it is made visible (may be during dynamic screen modif ication process) Visible length : As the name reveals it will cut short or lengthen the f ield length when displayed in selection screen. Please note that the actual length of the parameter variable remains unaf f ected and only the Visible length is altered. PARAMET ERS : p_matnr T YPE mara-matnr VISIBLE LENGT H 2.

You can assign def ault values to the parameter f ield by using def ault. T he value will be assigned and user can change the value or can leave it unaltered. PARAMET ERS : param_1 T YPE string DEFAULT 'T his is a def ault value'.

LOWER CASE addition will make the user input case sensitive . SAP internally will convert all characters into Uppercase no matter in which case the input was made. To prevent this one can use LOWER CASE which will retain the character case of the input made by the user. PARAMET ERS : param_1 T YPE string DEFAULT SAP is good LOWER CASE.

Without lowercase addition param_1 will store this as SAP IS GOOD. Memory id: We can get the value f or the f ield f rom memory id. We will cover memory id concept in separate article PARAMET ERS: param_2 T YPE mara-matnr MEMORY ID MAT. User command : Majorly used in dynamic screen modif ication where we assign a checkbox or radio button. Can also be used in listbox. User-command is used PARAMET ERS: param_2 T YPE mara-matnr USER-COMMAND test.

Radio but t on:


We can create radio buttons using parameters in SAP ABAP by using RADIOBUT T ON GROUP. At least 2 radio buttons should be present in one radio button group. PARAMET ERS : radio2 RADIOBUT T ON GROUP g1 DEFAULT X. PARAMET ERS : radio3 RADIOBUT T ON GROUP g1 .

Here radio2 is selected by def ault user can change it to radio3 and when he does that radio3 will have value X.

Checkbox:
We can create check box using parameters by using AS CHECKBOX. PARAMET ERS: check as CHECKBOX.

We can make this checkbox checked by def ault by assigning X as def ault value

Вам также может понравиться