2008 Sep 10 9:29 AM
Hi,
I am using SUBMIT statement to call a program , I want to know if the program was executed suscessfully or not when it return to calling program, can any one tell me how to find the same.
thanks
bobby
Bobby,
ZABC is calling ZDEF.
In the program ZDEF say ITFINAL is the internal table that is having all the final data then use
EXPORT ITFINAL TO MEMORY ID 'KK_ITFINAL'.
Now in the program ZABC declare an internal table ITFINAL which is having the same structure as in ZDEF.After submitting the program ZDEF in ZABC check for sy-subrc and then use
IMPORT ITFINAL FROM MEMORY ID 'KK_ITFINAL'.
K.Kiran.
2008 Sep 10 9:43 AM
Hi
In the submitted program create a variable, if the program is executed successfully, pass a 'SUCESS' message to that variable
Export the variable to Memory in the Submitted program and import from Memory in the calling program
Regards
MD
2008 Sep 10 9:45 AM
Hi,
I am calling SAP standard program , and can't give export or import
thanks
bobby
2008 Sep 10 9:57 AM
Bobby,
If the SAP standard program is List output then instead of export-import use the following function modules after checking for sy-subrc immdiately after SUBMIT.
LIST_TO_MEMORY
LIST_FROM_MEMORY
LIST_TO_ASCI
LIST_FREE_MEMORY
K.Kiran.
2008 Sep 10 10:17 AM
Hi Bobby...
submit RS--- with S_PROFM in S_PROFM
with P_PRINT = ' '
and return.
if sy-subrc <> 0.
g_flag = 'N'.
endif.
if g_flag = 'N'.
Message 'Error'
endif.
Regards,
sg
2008 Sep 10 9:52 AM
Bobby,
ZABC is calling ZDEF.
In the program ZDEF say ITFINAL is the internal table that is having all the final data then use
EXPORT ITFINAL TO MEMORY ID 'KK_ITFINAL'.
Now in the program ZABC declare an internal table ITFINAL which is having the same structure as in ZDEF.After submitting the program ZDEF in ZABC check for sy-subrc and then use
IMPORT ITFINAL FROM MEMORY ID 'KK_ITFINAL'.
K.Kiran.
2008 Sep 10 9:52 AM
HI,
Check sy-sybrc after SUBMIT...
i think it will be 0 for success and other than 0 if fails...
Regards,
Meet
2009 Feb 05 6:12 AM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |