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

When would the program return back in this statement

Former Member
0 Likes
772

SUBMIT rsbdcsub

WITH mappe = m_name

WITH von = sy-datum

WITH bis = sy-datum

WITH z_verab = 'X'

WITH logall = 'X'

AND RETURN.

Am having little confusion on how this will work. From the ABAP help, I understand that Once program access is completed, program execution for the calling program continues after the SUBMIT statement. in this case, RSBDCSUB submits the session that was created. so will the system wait until the session gets executed completly?

Thanks,

Kiran

7 REPLIES 7
Read only

Former Member
0 Likes
734

Hi,

The session from the caller and the rsbdcsub is the same.

In really, the systems "don´t wait", because it´s executing the rsbdcsub, returning to the caller after it ends.

Best regards,

Leandro Mengue

Read only

Former Member
0 Likes
734

No.

Rob

Read only

0 Likes
734

I would like to acheive this: I want to know how to trigger an new report after the completion of processing the BDC session.

Any thoughts plz.

Regards,

Kiran

Read only

0 Likes
734

Hi Kiran,

This link will help you

link:[http://www.sapfans.com/sapfans/forum/devel/messages/30331.html]

Try like , calling the fm in a do statement and if it reaches 'F' exit the loop and proceed, if its E or A or anything else, exit from the program...hope you got the idea....or you can use a independent program to check the status..make sure the loops doesnt goes to infinity ..this is just a hint

The logic is to check the status of the submitted session.

Read only

0 Likes
734

Thank you Keshav.

But what if the function module returns non zero...that means my bdc session is not completed.so I cannot run my 2nd program. This means I am wasting one run.

So all that I want is not to wait or check....I just wish to trigger job B when job A is completed.

Thanks,

Kiran

Read only

Former Member
0 Likes
734

No , it does not wait.

The RETURN statement has nothing to do with this. It just determined about the creation of called program in new session .

Regards,

Uma

Read only

Former Member
0 Likes
734

Moderator message - This is now a different question and one that has been asked many times before. Please search the forum - thread locked

Unlocked so OP can close.

Edited by: Rob Burbank on Jun 4, 2010 3:51 PM