cancel
Showing results for 
Search instead for 
Did you mean: 

bdc call transaction return code 1001

Former Member
0 Kudos

Hi all,

I am facing a bdc call transaction issue.

In the report, i am using call transaction F-28 transaction for posting. Once the posting is done using call transaction, I will be getting accounting document number from messtab-msgv1 and i am using a read table messtab for mstyp = 'S' for getting msgv1. But i am not getting the accounting document number. After call transaction statement, i am getting sy-subrc as 1001. The recording is working fine is fore-ground mode 'A' but not in 'N'.

I am scheduling the report as background job and getting sy-subrc 1001 as the return code in the spool.

But actually the posting is done perfectly but still sy-subrc is 1001 and read table statement also fails.

Whats the reason behind this?

Any ideas would be really appreciated.

Thanks in advance,

Deno

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Deno..

Put a break point at call transaction statement and change the Mode from 'N' to 'A' and check where the transaction is getting failed. hope this helps ...

Regards,

Santosh

PS: Reward Points if helpful

Former Member
0 Kudos

You say the read table statement fails. Which table? Messtab? A db table?

Rob

Former Member
0 Kudos

Hi Rob,

The messtab read statement fails.

Call transaction F-28 using table

BDCTAB mode 'A'.

IF sy-subrc eq 0.

read table messtab with mstyp = 'S' and msgnr = '312'.

acc_doc_number = messtab-msgv1.

endif.

Since sy-subrc eq 1001. the read table statement is not executed. And i tried adding sy-subrc eq 0 or 1001.

then also the read table statement fails since the mstyp is not S it seems, Where can i find the accoutng document number is the messtab?

Thanks,

Deno

Former Member
0 Kudos

The transaction in a call transaction session quite often sets the return code to a non zero value, but it doesn't necessarily mean there's a problem. The important information is in messtab. Change your code to:


Call transaction F-28 using table BDCTAB mode 'A'.

Loop at messtab.
  if  messtab-mstyp = 'S' and messtab-msgnr = '312'.
    acc_doc_number = messtab-msgv1.
  else.
    write: /001 messtab-mstyp, messtab-msgnr.
  endif.
endloop.

You should be able to determine the problem from the messages written.

Rob

Former Member
0 Kudos

There are also some notes regarding F-28 and batch input. Look at notes 210418, 388133, 430639 and 320891. There are some others as well, but these look relevant.

Rob

suresh_datti
Active Contributor
0 Kudos

Hi Deno,

You can try setting the NOBINPT = 'X' in the OPTIONS extesnion of the CALL TRANSACTION.

Regards,

Suresh Datti