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 issue

Former Member
0 Likes
931

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

Former Member
0 Likes
908

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

Read only

0 Likes
908

Hi,

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

thanks

bobby

Read only

0 Likes
908

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.

Read only

0 Likes
908

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

Read only

kiran_k8
Active Contributor
0 Likes
908

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.

Read only

Former Member
0 Likes
908

HI,

Check sy-sybrc after SUBMIT...

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

Regards,

Meet

Read only

Former Member
0 Likes
908

got the solution