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

How to pass Function code to Submit or Call transaction command

Former Member
0 Kudos
2,690

Hi

I have to call a report in an other report, But the problem is when i call the report through submit command i need to skip the initial screen and display an other screen. the other screen is not next screen. It display after clicking a button on main screen.

Is there any way to pass Function code to submit command. submit command code is as under

SUBMIT ZADR0056

WITH P_AUFNR = '7000052' AND RETURN...

Regards

Ammad

4 REPLIES 4
Read only

Former Member
0 Kudos
997

Hi,

No, you will not be able to achieve this thru submit program. You need to record the transaction thru SHDB (basically write a small BDC to achieve this).

And then do a CALL TRANSACTION.

Hope this helps!

Reetesh

Read only

deepak_dhamat
Active Contributor
0 Kudos
997

Hi ,


It display after clicking a button on main screen  " Whether you want to execute Two Reports one after another  ?

if you want to execute two reports one after another and get data of both report then it is possible ,

but if you want to execute one report using submit and another after pressing button then not possible until event is generated .

regards

Deepak.

Read only

Former Member
0 Kudos
997

Hi,

It's not possible to skip first screen while using SUBMIT command.

First, You have you create a new transaction code for ZADR0056 program.

- Record your new Tcode using SHDB then use BDC technique(very easy) or

- Add ABAP command CALL SCREEN xxxx for specific conditions(in callee program).

- SET PARAMETER ID: 'ANR' FIELD 'your_order_no' (in caller program).

- CALL TRANSACTION 'your_new_tcode' AND SKIP FIRST SCREEN (in caller program).

Hope this help.

Tiwa N.

Read only

Former Member
0 Kudos
997

Hi,

It is not possible to pass function code with submit. alternatively you can work with CALL TRANSACTION with BDCDATA.

Or as a work arround way you can modify your code i.e check for function code or an dummy parameter which can be passed by SUBMIT statement.

Check below code..

Report ztest1.

submit ZTEST2 WITH P2 = 'X' AND RETURN.

Report ztest2
SELECTION-SCREEN:
    PUSHBUTTON 2(10)  but1 USER-COMMAND cli1.

PARAMETERS P2 TYPE C NO-DISPLAY. " no need to display

AT SELECTION-SCREEN.

IF SY-UCOMM = 'CLI1' OR P2 IS NOT INITIAL.
message 'Button clicked' type 'S'.
ENDIF.

Regards,

Ravi.