Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Set and Get parameters

Former Member
0 Likes
435

Hi ABAPers,

I have created 2 abap programs, ZTEST_TEMP and ZTEST_TEMP2. ZTEST_TEMP2 will gather data and set parameter, and ZTEST_TEMP will be called to get the parameter for other processing.

When I am in ZTEST_TEMP2 and executed, ZTEST_TEMP screen 0100 was called, but the line GET PARAMETER was not triggered.

Does anyone know why? Please help.


REPORT  ZTEST_TEMP.
DATA: carrier TYPE sy-repid,
      connection TYPE sy-repid.

start-of-selection.
*GET PARAMETER ID para FIELD prog.
  GET PARAMETER ID: 'CAR' FIELD carrier,  "breakpoint at here, but it is not called.
                    'CON' FIELD connection.

IF sy-subrc <> 0.
  MESSAGE 'Parameter not found' TYPE 'I'.
ELSE.
  write: / carrier, connection.
ENDIF.
end-of-selection.

REPORT  ZTEST_TEMP2.

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 'ZTEST_TEMP'.

Hi ABAPers,

I have created 2 abap programs, ZTEST_TEMP and ZTEST_TEMP2. ZTEST_TEMP2 will gather data and set parameter, and ZTEST_TEMP will be called to get the parameter for other processing.

When I am in ZTEST_TEMP2 and executed, ZTEST_TEMP screen 0100 was called, but the line GET PARAMETER was not triggered.

Does anyone know why? Please help.


REPORT  ZTEST_TEMP.
DATA: carrier TYPE sy-repid,
      connection TYPE sy-repid.

start-of-selection.
*GET PARAMETER ID para FIELD prog.
  GET PARAMETER ID: 'CAR' FIELD carrier,  "breakpoint at here, but it is not called.
                    'CON' FIELD connection.

IF sy-subrc <> 0.
  MESSAGE 'Parameter not found' TYPE 'I'.
ELSE.
  write: / carrier, connection.
ENDIF.
end-of-selection.

REPORT  ZTEST_TEMP2.

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 'ZTEST_TEMP'.

1 REPLY 1
Read only

Former Member
0 Likes
407

You can try to replace 'CALL TRANSACTION' with 'SUBMIT'.