SAP ABAP Syntax for Paramters

Basic form

PARAMETERS p

Effect

This statement only makes sense in report programs, i.e. in programs defined as type '1' in the attributes. You execute report programs with the SUBMIT statement. When this takes place, the parameters and selection options (SELECT-OPTIONS ) specified in the report program shape the interface which determines what the user sees on the selection screen.

These
parameters and selection options are then presented to the user who can enter values (see the addition NO-DISPLAY or SUBMIT without the addition VIA SELECTION-SCREEN ).

Creates internal fields like the DATA statement. By making the appropriate entry in the attributes, you can assign a report to a logical database ldb . In this case, both the logical database ldb and the report can define parameters (and selection options). You define the database-specific parameters (i.e. those belonging to the logical database) in an ABAP/4 INCLUDE program DBldbSEL (in the logical database maintenance transaction).

Since the system then integrates this
INCLUDE program in the logical database access program SAPDBldb and (partially) in the report, the database-specific parameters (and selection options) are available to both. The ("report-specific") parameters defined in the report are known only in the report (not in the SAPDBldb ). Some additions of PARAMETERS are allowed only in the DBldbSEL .

Example

PARAMETERS: SUM(1).

The name of a parameter can be up to 8 characters long. By selecting Goto -> Text elements and then choosing Selection texts followed by Display , you can enter a description for each parameter; this is then displayed on the selection screen. You define the report-specific parameter texts with the text elements of the report and the database-specific parameter texts with the text elements of the database program SAPDBldb .

Addition 1

... DEFAULT f

Effect

Assigns the default value f to the parameter.

You must specify the default value f in internal format, e.g.

PARAMETERS DATE LIKE SY-DATUM DEFAULT '19931224' ,

not ... DEFAULT '24.12.1993' .

Addition 2

... TYPE typ

Effect

Assigns the type typ to the internal field.

Example

PARAMETERS: NUMBER(4) TYPE P DEFAULT '999'.

Addition 3

... DECIMALS dec

Effect

Assigns dec decimal places to the internal field. dec must be numeric.

You can only use the addition DECIMALS dec with the addition TYPE P , i.e. it is only allowed with parameters of type P .

Example

PARAMETERS: NUMBER (4) TYPE P DECIMALS 2
DEFAULT '123.45'.

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