Get Example source ABAP code based on a different SAP table
ID CALL-DIALOG • CALL DIALOG ABAP Statement
CALL DIALOG> Short Reference >
ABAP_SYNTAX_OBS ABAP_KEY CALL DIALOG dialog $[ ${AND SKIP FIRST SCREEN$}> $| ${USING bdc_tab $[MODE mode$]$} $]> $[EXPORTING p1 FROM a1 p2 FROM a2 ...$]> $[IMPORTING p1 TO a1 p2 TO a2 ...$].>
ABAP Addition 1 ... AND SKIP FIRST SCREEN> 2 ... USING bdc_tab $[MODE mode$]> 3 ... EXPORTING p1 FROM a1 p2 FROM a2 ...> 4 ... IMPORTING p1 TO a1 p2 TO a2 ...>
What does it do? The statement CALL DIALOG> calls the dialog module> whose name is contained in a flat character-like data object dialog>. The data object dialog> must contain the name in uppercase letters. The following can be specified for dialog>:
Literal or constant If the data object dialog> is specified as a text field literal> or as a constant>, it is evaluated as a statically specified object by tools such as the extended program check> or the where-used list.
Variable BEGIN_SECTION ID CALL-DIALOG-DYNAMIC If the data object dialog> is specified as a variable>, it is specified only dynamically, and the content is not evaluated statically. END_SECTION ID CALL-DIALOG-DYNAMIC When the statement is executed, dialog> is not evaluated until runtime (in both cases). If the dialog module specified in dialog> is not found, an uncatchable exception is raised. When calling the dialog module, the assigned ABAP program is loaded into a new ABAP_ISESS >. The session of the calling program is preserved. In contrast to CALL TRANSACTION>>, the called program runs in the same SAP LUW> as the calling program. After the ABAP program is loaded, the event LOAD-OF-PROGRAM>> is triggered and the dynpro defined as the initial dynpro of the dialog module is called. The dialog module is terminated when the corresponding dynpro sequence> terminates upon reaching the next dynpro with dynpro number 0 or the program is exited using the statement LEAVE PROGRAM>>.
Latest notes:
Dialog modules are the only language resource that can be used to open a new ABAP_ISESS without changing the SAP LUW. The following should be noted:
The statements COMMIT WORK>> and ROLLBACK WORK>> lead to database commits or database rollbacks in the called program.
The statement COMMIT WORK> starts the background> or transactional remote function calls> registered in the dialog module using CALL FUNCTION ... IN BACKGROUND UNIT> and CALL FUNCTION ... IN BACKGROUND TASK> (obsolete). If tRFC> or qRFC> are registered in a dialog module and are not started with COMMIT WORK >, they are not executed by the COMMIT WORK> of the caller.
Procedures> registered with CALL FUNCTION IN UPDATE TASK>> and PERFORM ON ${COMMIT$|ROLLBACK$}>> are only executed with the corresponding statements COMMIT WORK> and ROLLBACK WORK> in the calling program.
Changes to persistent objects> of the object services> cannot be committed while CALL DIALOG> is being executed. Changes made in the object services compatibility mode can be committed later using COMMIT WORK>. On the other hand, calling the method END> of a top-level transaction of the object-oriented transaction mode started in the called program has no effect either during or after CALL DIALOG>. In object-oriented transaction mode, a transaction must be started before CALL DIALOG> and then completed.
In the called program, SAP locks> are inherited by the calling program.
Calling dialog modules is replaced by calling methods of global classes or by function modules where function modules that can call the classic dynpros of their function pool. It is usually not necessary to open an ABAP_ISESS without changing the SAP LUW. BEGIN_SECTION SAP_INTERNAL_HINT During CALL DIALOG>, the internal system field sy-oncom> has the value N>. Instead of sy-oncom> the system class CL_SYSTEM_TRANSACTION_STATE> should be used in programs. END_SECTION SAP_INTERNAL_HINT ABAP_HINT_END • AND SKIP FIRST SCREEN CALL DIALOG (obsolete)
ABAP Addition
What does it do? Under the same conditions as for the statement CALL TRANSACTION>>, this addition suppresses the display of the screen layout> of the initial dynpro. If the called dialog module has input parameters for the mandatory input fields of the initial dynpro, they can also be filled using parameter passing instead of SPA/GPA parameters>. • USING CALL DIALOG (obsolete) • MODE CALL DIALOG (obsolete)
ABAP Addition
What does it do? This addition controls the called program by specifying a batch input table> bdc_tab> of the line type BDCDATA> like in the statement CALL TRANSACTION>>. Only MODE> can be used here as an addition to control the processing. If a message> is sent in the called program, this message is available in the system fields sy-msgid> , sy-msgty>, sy-msgno>, sy-msgv1>, ..., sy-msgv4 > after the call. • EXPORTING CALL DIALOG (obsolete) • IMPORTING CALL DIALOG (obsolete) • FROM CALL DIALOG (obsolete) • TO CALL DIALOG (obsolete)
ABAP Addition
ABAP Addition
What does it do? These additions can be used to assign the appropriate actual parameters a1>, a2>, ... to the formal parameters p1>, p2>, ... of the dialog module. The formal parameters of a dialog module are always optional. They can have all data types except for reference types. When loading the called program, the values of the actual parameters are assigned to the global data objects of the called program that are defined as formal parameters. If this data is linked with identically named dynpro fields>, they are not overwritten by any SPA/GPA parameters. If IMPORTING> is specified, the system field sy-subrc> is inherited implicitly by the called dialog module and unknown formal parameters are ignored by the system.
Latest notes: Outside of classes, the additions FROM a1>, FROM a2>, ... and TO a1>, TO a2>, ... in the parameter lists can be omitted if the formal parameters and actual parameters have the same names. ABAP_HINT_END
Runtime Exceptions
Non-catchable Exceptions
Reason for error:
A parameter name is too long.
Runtime error:
CALL_DIALOG_NAME_TOO_LONG>
Reason for error:
The called dialog module is unknown.
Runtime error:
CALL_DIALOG_NOT_FOUND>
Reason for error:
The called dialog module contains errors (error in entry in table TDCT>).
Runtime error:
CALL_DIALOG_WRONG_TDCT_MODE>
Reason for error:
No further paging area available for passing parameters.
Runtime error:
CALL_DIALOG_NO_CONTAINER>
Reason for error:
The statement CALL DIALOG ... SCREEN ... PROGRAM ... > is not supported.