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

submit report and SAVE

Former Member
0 Likes
2,624

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
Read only

Former Member
0 Likes
2,424

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

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

10 REPLIES 10
Read only

Former Member
0 Likes
2,425

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

Read only

0 Likes
2,421

Advait,

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

Rgds

vara

Read only

0 Likes
2,421

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

regards,

Advait

Read only

0 Likes
2,421

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

Read only

0 Likes
2,421

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

Read only

0 Likes
2,421

No!

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

rgds

vara

Read only

0 Likes
2,421

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

Read only

0 Likes
2,421

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

Rgds

vara

Read only

Former Member
0 Likes
2,421

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.

Read only

dhanudjro
Participant
0 Likes
2,421

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