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

BDC message in Background

Former Member
0 Likes
1,672

hello all,

I am using a BDC call transaction in report by which it generates the document number using tcode F-44 and display the message data in an alv report, but problem is that when i run the BDC in Foreground then BDCMSGCALL structure contains the document number and all other this but when i m running it in background then it don't contains the created document number.

so can anyone please tell me that how can i trap the created document number in background?

regards saurabh.

hello all,

I am using a BDC call transaction in report by which it generates the document number using tcode F-44 and display the message data in an alv report, but problem is that when i run the BDC in Foreground then BDCMSGCALL structure contains the document number and all other this but when i m running it in background then it don't contains the created document number.

so can anyone please tell me that how can i trap the created document number in background?

regards saurabh.

11 REPLIES 11
Read only

Former Member
0 Likes
1,375

Hi Saurabh,

Did you check whether its working fine in background . Looks like in background its going into errors & hence not populating the number in BDCMSGCOLL.

Thanks,

Best regards,

Prashant

Read only

Former Member
0 Likes
1,375

Hi,

Try checking SYST checking after Call transaction (if call succesful).. (SY-MSGNO, SY-MSGV1... )

Hope this helps,

Nag

Read only

0 Likes
1,375

hello naga, suri, archana,

thanx for reply...actually after running my bdc in background i checked that SYST and BDCMSGCOLL dont contain the value of created document number, even sy-subrc also not equal to 0. its sy0subrc = 1001.

please help.

regards.

Read only

0 Likes
1,375

Hi Saurabh,

If sy-subrc is not 1, then your call transaction is not siccessful and data upload is not successful. So, document number is not getting generated. So, again here after checking sy-subrc, check BDCMSGCOLL in debuuging mode. It will show you the error messages. You need to run your BDC in foreground and check where itis failing.

Please check this and let me know if you want more input from my side.

Thansk,m

Archana

Read only

Former Member
0 Likes
1,375

Hi Surabh,

What Naga Mohan Said is correct

Please try to check SYST Structure

after successful complettion of ur call transaction of a particular transaction code

Thanks

Surendra P

Read only

Former Member
0 Likes
1,375

Hi Saurabh,

After Call transaction, check sy-subrc value. If it is 0 then it should able to populate success messages in message table. If some error is occuring in BDC in background then sy-subrc value wil not be 0 and it will populate error message in table.

So, please check with this.

Thansk,

Archana

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,375

It happens when you mark the no batch iput option as X in CTU Params or when you mark the same option while specifyig the transaction in SHDB.

Read only

Former Member
0 Likes
1,375

not resolved

Read only

0 Likes
1,375

Hi Saurabh,

Following code might be useful for you..


CALL TRANSACTION 'F-44' USING g_t_bdcdata MODE bdc_mode UPDATE 'S'
                          MESSAGES INTO t_sysmess.
  IF sy-subrc = 0.
*  get number of posted document
    LOOP AT t_sysmess INTO l_t_sysm WHERE msgid  = 'F5'
                                      AND msgnr  = '312'
                                      AND msgtyp = 'S'.
      c_belnr = l_t_sysm-msgv1.
      EXIT.
    ENDLOOP.

You can also refer - MSDCA_CREATE_BATCHDATAF01 for more details...

Nag

Read only

0 Likes
1,375

There is any warning message while executing an bdc, but in forground it wil ignore, in background it won't, try to check what are the warning messages are coming.

Regards,

Mallikarjuna.

Read only

0 Likes
1,375

Dear Sourab,

You got any resolution for this issue, i am also facing the same problem.

Regards,

Satheesh Kumar N