01-29-2009 3:21 PM
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
01-29-2009 3:26 PM
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
01-29-2009 3:26 PM
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
01-29-2009 3:37 PM
Advait,
I just need to go in the t-code and save.How can i call the save routine.?
Rgds
vara
01-29-2009 3:42 PM
In that case, I would suggest you record the transaction to do that. And do a call transaction using BDC.
regards,
Advait
01-29-2009 3:51 PM
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
01-29-2009 6:29 PM
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
01-29-2009 7:23 PM
No!
but in my WD application I want to run this program background.
rgds
vara
01-29-2009 7:43 PM
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
01-29-2009 9:16 PM
This should resolve my problem.I am awarding you full points though.
Rgds
vara
01-29-2009 3:59 PM
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.
12-30-2022 3:38 AM
What does SAVE routine in the above correct answer? How to work on that. I'm looking to submit COGI report and save.