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: 

​Misunderstanding of sap call dialog syntax in my code base

0 Kudos
735

Hello, i don't understand of what is going on with syntax of "CALL DIALOG" in my code base.

Code look like:
DATA status1(1) TYPE C.
DATA status2(1) TYPE C.
status1 = 'U'.
status2 = 'U'.
CALL DIALOG 'FM_ANZEIGE' EXPORTING foo FROM t1-foo status1 status2.

my question is: what is the purpose for status1 status2.

I have not found it in documentation for CALL DIALOG keyword https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapcall_dialog.htmsyntax of exporting is like this EXPORTING p1 FROM a1 p2 FROM a2 ... no aditional for status1 etc.

1 ACCEPTED SOLUTION

harishankar714
Participant
667

The CALL DIALOG statement is used to call a function module called FM_ANZEIGE and pass it three parameters: foo, status1, and status2.

The EXPORTING keyword is used to specify that these parameters are being passed to the function module.

The CALL DIALOG statement has the following syntax

CALL DIALOG <function_module> [EXPORTING <parameters>] [IMPORTING <parameters>] [CHANGING <parameters>] [EXCEPTIONS <exceptions>].

In this case, the EXPORTING clause is used to pass the values of the variables t1-foo, status1, and status2 to the function module FM_ANZEIGE. The function module can then use these values as input to perform some operation and return the result to the calling program.

For example, the FM_ANZEIGE function module might use the value of t1-foo to look up and display some data in a dialog box, and it might use the values of status1 and status2 to return status information to the calling program. The calling program can then use these values to determine the outcome of the function module call and take further action if necessary.

6 REPLIES 6

abo
Active Contributor
0 Kudos
667

Quick note: you may edit questions, instead of deleting and reposting them (cuts down on notifications)

harishankar714
Participant
668

The CALL DIALOG statement is used to call a function module called FM_ANZEIGE and pass it three parameters: foo, status1, and status2.

The EXPORTING keyword is used to specify that these parameters are being passed to the function module.

The CALL DIALOG statement has the following syntax

CALL DIALOG <function_module> [EXPORTING <parameters>] [IMPORTING <parameters>] [CHANGING <parameters>] [EXCEPTIONS <exceptions>].

In this case, the EXPORTING clause is used to pass the values of the variables t1-foo, status1, and status2 to the function module FM_ANZEIGE. The function module can then use these values as input to perform some operation and return the result to the calling program.

For example, the FM_ANZEIGE function module might use the value of t1-foo to look up and display some data in a dialog box, and it might use the values of status1 and status2 to return status information to the calling program. The calling program can then use these values to determine the outcome of the function module call and take further action if necessary.

0 Kudos
667

Thank you very much for the very detailed answer, it is very valuable for me.

0 Kudos
667
I copy pasted text of my question and tagged code inside of the code block. But when i posted it, all the text shifted and become looking terrible. I tried to edit but can't handle it, then i deleted and recreated the question.

You can see that i've edit question several times. I swear that the code was looking fine inside code block but now it also broken and looks terrible

touzik_itc
Active Participant
0 Kudos
667

CALL DIALOG is an obsolete statement to call a dialog module, an obsolete repository object, predecessor of function modules.

touzik_itc
Active Participant
0 Kudos
667

Dialog modules are handled in the transaction SE35.