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 issue

Former Member
0 Kudos

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

7 REPLIES 7

Former Member
0 Kudos

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

0 Kudos

Hi,

I am calling SAP standard program , and can't give export or import

thanks

bobby

0 Kudos

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.

0 Kudos

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

kiran_k8
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

HI,

Check sy-sybrc after SUBMIT...

i think it will be 0 for success and other than 0 if fails...

Regards,

Meet

Former Member
0 Kudos

got the solution