SAP ABAP Syntax for Parameters part two

SAP ABAP Syntax for parameters is the previous post and this is in continuation with that.

Addition 4

... LIKE g

Effect

Creates the field p with the same attributes as the field g which is already defined. g can be either a database field or an existing internal field.

You cannot use the addition ... LIKE g with the addition ... TYPE typ . No explicit length may be specified for the parameter (for example, a statement such as PARAMETERS p(len) LIKE g is not allowed).

Example

PARAMETERS PROGRAM LIKE SY-REPID.

If g is an ABAP/4 Dictionary field of the type CHAR , length 1 and default values 'X' and ' ' (according to the relevant domain), the parameter is always displayed as a checkbox on the selection screen (see also AS CHECKBOX ).

Field attributes on the selection screen:

The input/output field which appears on the selection screen for the parameter has the attributes of the field g specified after LIKE . These include type, length or - with ABAP/4 Dictionary fields - conversion exit .

If g is an ABAP/4 Dictionary field, the selection screen is automatically regenerated after most field attribute changes. An excception to this rule are the attributes "Check table" and "Fixed values". If these change, you must generate the program in the ABAP/4 Development Workbench. This also generates the selection screen.

The maximum permitted length of a parameter on the selection screen is 45 (scrollable up to length 132). If you have defined it longer than this (either explicitly with p(200) or implicitly with LIKE ), the parameter is truncated on the selection screen after the 132nd character. However, you can use SUBMIT to pass longer parameters to a report (particularly if these are not displayed on the selection screen at all because of the addition NO-DISPLAY ).

Addition 5

... MEMORY ID pid

Effect

On the selection screen, assigns the memory ID pid to the parameter, i.e. when you execute the report, the selection screen displays the last value which the user entered in a field with the memory ID pid .

The memory ID must be a constant, i.e. a value specified without quotation marks, and can be up to 3 characters long.

Addition 6

... MATCHCODE OBJECT mobj

Effect

On the selection screen, assigns the matchcode object mobj to the parameter.

The name of the matchcode object must be a constant, i.e. a value specified without quotation marks, and can be up to 4 characters long.

Addition 7

... MODIF ID key

Effect

The screen fields contain the specified modification group ( SCREEN-GROUP1 ) which you can use for screen modifications (e.g. set to "not ready for input") under AT SELECTION-SCREEN .

The name of the modification group must be a constant, i.e. a value specified without quotation marks, and can be up to 3 characters long.

Example

PARAMETERS CHARLY MODIF ID ABC.
...
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'ABC'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
...

Effect

The parameter is not ready for input on the selection screen.

ABAP TOPIC WISE COMPLETE COURSE

BDC
OOPS ABAP
ALE
IDOC'S
BADI
BAPI
Syntax Check
Interview Questions
ALV Reports with sample code
ABAP complete course
ABAP Dictionary
SAP Scripts
Script Controls
Smart Forms
Work Flow
Work Flow MM
Work Flow SD
Communication Interface

No comments:

Post a Comment