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: 

submit report and SAVE

Former Member
0 Kudos

Hi,

I have a custom transaction which updates z table on execution and pressing SAVE button in output.

I want to do this in background using submit.

I went to program name and tried

SUBMIT zprogram using s_matnr = '10000'.

it worked but how can i handle save in background?

How do we do that?

rgds

Vara

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

You can check for system variables sy-batch or sy-binpt. When these are set to 'X' it means that the program is running in background and you can then call the save routine at the end of the program.

Other option is that you can export some variable to ABAP memory and import it in the called program to see if the program was submitted and based on that call the save routine.

regards,

Advait

10 REPLIES 10

Former Member
0 Kudos

Hi,

You can check for system variables sy-batch or sy-binpt. When these are set to 'X' it means that the program is running in background and you can then call the save routine at the end of the program.

Other option is that you can export some variable to ABAP memory and import it in the called program to see if the program was submitted and based on that call the save routine.

regards,

Advait

0 Kudos

Advait,

I just need to go in the t-code and save.How can i call the save routine.?

Rgds

vara

0 Kudos

In that case, I would suggest you record the transaction to do that. And do a call transaction using BDC.

regards,

Advait

0 Kudos

Advait,

Can i do this in ABAP webdynpro method? This doesn't allow parameters internally right?

if not what is the optimal way to run my t-code in background?

Rgds

Vara

0 Kudos

Can i do this in ABAP webdynpro method?

Is you transaction a Web dynpro application ? I'm not sure if you can record a Web Dynpro app.

But if it is a normal report program or module pool, you can record the transaction using t-code transaction SHDB. Once the recording is done, you can create a function module or a program from the saved recording and use that in your program.

regards,

Advait

0 Kudos

No!

but in my WD application I want to run this program background.

rgds

vara

0 Kudos

Well, in that case some action/event on the WD app should trigger the report right ?

So record the transaction, create a function module from the recording and call the function module in the action/event method of the WD.

regards,

Advait

0 Kudos

This should resolve my problem.I am awarding you full points though.

Rgds

vara

Former Member
0 Kudos

If you want to use only the transaction to do the save in background, you can try creating a simple BDC and call transaction with that in background. This is easiest way to achieve what you want.

dhanudjro
Participant
0 Kudos

What does SAVE routine in the above correct answer? How to work on that. I'm looking to submit COGI report and save.