SAP ABAP SET PARAMETER

Syntax:

SET PARAMETER ID pid FIELD <f> .

This statement saves the contents of field under the ID in the SAP memory. The code can be up to 20 characters long. If there was already a value stored under , this statement overwrites it. If the ID does not exist, double-click in the ABAP Editor to create a new parameter object.

Example:

If the user selects a flight displayed in the basic list, the SPA/GPA parameters CAR and CON are set to the ID of the airline and the connection number when the event ATLINE-SELECTION takes place. The names of both parameters are defined in the table TPARA for this purpose. On the initial screen of the transaction DEMO_TRANSACTION, two input fields are linked with these SPA/GPA parameters and are displayed with the selected values asstart values.

DATA: carrier     TYPE spfli-carrid,
connection  TYPE spfli-connid.

START-OF-SELECTION.
SELECT carrid connid
FROM spfli
INTO (carrier, connection).
WRITE: / carrier HOTSPOT, connection HOTSPOT.
HIDE:  carrier, connection.
ENDSELECT.

AT LINE-SELECTION.
SET PARAMETER ID: ‘CAR’ FIELD carrier,
‘CON’ FIELD connection.
CALL TRANSACTION ‘DEMO_TRANSACTION’.

0 Comments

Leave A Reply