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: 

BDC in background and Foreground

Former Member
0 Kudos

Hi all,

I created a program for BDC.

When the program is run in Foreground it is running fine,

and SY-SUBRC is zero.

But when it is run in background, sy-subrc is 1.1.0 .

Can you please suggest a solution.

Regards,

Kaavya

1 ACCEPTED SOLUTION

Former Member
0 Kudos

HI,

Checking sy-subrc may not be always reliable as it can return values like .001 even if the transaction is successful

Best way to check this is to check for the success message in the message table.

All transactions give a success message if the transaction is successful. SAP guarantees that these message numbers wont change in any release of SAP.

First get the message number, id etc of the success message of the transaction you are trying to call, then check this message number and id in the message table that the call transaction returns. If you find the entry in the message table, the call transaction is successful.

REWARD POINTS IF USEFUL

3 REPLIES 3

Former Member
0 Kudos

HI,

Checking sy-subrc may not be always reliable as it can return values like .001 even if the transaction is successful

Best way to check this is to check for the success message in the message table.

All transactions give a success message if the transaction is successful. SAP guarantees that these message numbers wont change in any release of SAP.

First get the message number, id etc of the success message of the transaction you are trying to call, then check this message number and id in the message table that the call transaction returns. If you find the entry in the message table, the call transaction is successful.

REWARD POINTS IF USEFUL

Former Member
0 Kudos

What transaction?

Rob

0 Kudos

Hi, ROB

I have the same problem, but I am using the T-code CRMD_ORDER. In Foreground runs correctly, but in Background don't run.

Regards

Juan