Application Development 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: 

Dialog Programming

Former Member
0 Kudos

Hi Guys,

I am new to SAP, and working on a Dialog Programming. I have a requirement like I need to write a dialog program in which i have to call three transactions. Based on the transation necessary action should be taken.

Please help me on this issue.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

see below code.

In PAI module,

&----


*& Module USER_COMMAND_9005 INPUT

&----


  • text

----


MODULE user_command_9005 INPUT.

ok_code = sy-ucomm.

CASE ok_code.

WHEN 'CRE1'.

PERFORM validate_bank_master USING wa_lc_bg_hdr-vbanks

wa_lc_bg_hdr-vbankl.

SET PARAMETER ID 'BKL' FIELD wa_lc_bg_hdr-vbanks.

SET PARAMETER ID 'BNK' FIELD wa_lc_bg_hdr-vbankl.

GET PARAMETER ID 'BKL' FIELD wa_lc_bg_hdr-vbanks.

GET PARAMETER ID 'BNK' FIELD wa_lc_bg_hdr-vbankl.

CALL TRANSACTION 'FI01' AND SKIP FIRST SCREEN.

ENDCASE.

4 REPLIES 4

Former Member
0 Kudos

hi,

try like this....

if sy-tcode eq 'tcode'.

write your code for this transation..

endif.

like this repeat for other transactions.

Regards,

Sathish Reddy.

Former Member
0 Kudos

Hi,

see below code.

In PAI module,

&----


*& Module USER_COMMAND_9005 INPUT

&----


  • text

----


MODULE user_command_9005 INPUT.

ok_code = sy-ucomm.

CASE ok_code.

WHEN 'CRE1'.

PERFORM validate_bank_master USING wa_lc_bg_hdr-vbanks

wa_lc_bg_hdr-vbankl.

SET PARAMETER ID 'BKL' FIELD wa_lc_bg_hdr-vbanks.

SET PARAMETER ID 'BNK' FIELD wa_lc_bg_hdr-vbankl.

GET PARAMETER ID 'BKL' FIELD wa_lc_bg_hdr-vbanks.

GET PARAMETER ID 'BNK' FIELD wa_lc_bg_hdr-vbankl.

CALL TRANSACTION 'FI01' AND SKIP FIRST SCREEN.

ENDCASE.

Former Member
0 Kudos

hi..

For dialog programing:

1] goto SCREEN PAINTER (tcode-se51)

2] Design the screens that you want to for the 3 transactions.

say screen 100,200,and 300.

3] Noewcreate your transactions using se93 say tcode1 , tcode2 , tcode3.

4] In your driver program now in start of selection based on ur conditions and screens call the transaction u have created.

for eg:

start-of-selection.

case.

when 'tcode1'

call screen 100.

when 'tcode2'.

call screen 200

when 'tcode3'.

call screen 300

endcase.

and then you can write the logic for evry screen as per the requirement.

Hope this helps...

Thanks,

Rashmi.

Former Member
0 Kudos

Hi Raghu,

Welcome to SDN.

Go to Se30 cretae a test Report like below:

In that write as:

Call screen 100. "(Screen number can be otherthan 1000,a four digit number)

Double click on 100 and Enter

Pres Layout Button.and Put the button,texts,controls as you need.

in the PRO write the code as the screen you want before the screen is displayed.

And the PAI call the three transactions.

A sample code is like:

PROCESS BEFORE OUTPUT.

MODULE STATUS_0100.

loop at screen.

if gruop1 = 'GRP1'.

screen-input = 1.

modify screen.

endif.

endloop.

*

PROCESS AFTER INPUT.

MODULE USER_COMMAND_0100.

call transaction TRANS1.

call transaction TRANS2.

call transaction TRANS3.

MODULE next_actions.

Double click on next_actions and write the code what need to ne done.

Hope this helps you.

Regards,

Rama.