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

call transaction

Former Member
0 Likes
564

i am using the call transaction method. Before executing the call transaction statement sy-subrc is 0 . After exectuing the call transaction statement sy-subrc is showing 1,001. Canyou plz tell me how can i overcome out of this error.

Thanks and Regards,

sri

5 REPLIES 5
Read only

Former Member
0 Likes
542

Hi Navya..

If the sy-subrc is not equal to zero it indicates that something went wrong in the statement. But we cant find out the exact error by looking at that value.

The sy-subrc is not zero.. so, check for these possible errors.

1) May be the data what we r trying to insert into the database is already exists.

2) Flat file may not be in the proper format.

check out these things.

Regards

veerendra

Read only

Former Member
0 Likes
542

hi sree,

Welcome to SDN.

1001- Error in batch input processing.

This occurs when there is some error in the BDC execution like wrong data, wrong field or format anything it can be.

Regards...

Arun.

Reward points if useful.

Read only

varma_narayana
Active Contributor
0 Likes
542

Hi

SY-SUBRC NE 0 . MEANS THE TRANSACTION IS NOT UPDATED IN DB.

Check this sample code.. it helps ..

Using BDCMSGCOLL Structure we have to declare an itab.

DATA : IT_MSG LIKE TABLE OF BDCMSGCOLL .

Then We can catch the messages using:

CALL TRANSACTION 'MK01'

USING IT_BDCDATA

MODE 'N'

MESSAGES INTO IT_MSG.

IF sy-subrc ne 0.

LOOP AT IT_MSG INTO WA_MSG

WHERE MSGTYP = 'E' OR MSGTYP = 'A'..

CALL FUNCTION 'FORMAT_MESSAGE'

<<PARAMETERS>>.

ENDLOOP.

ENDIF.

<b>REWARD IF HELPFUL</b>

Read only

Former Member
0 Likes
542

Hi,

sy-subrc = 1001 : Error in batch input processing.

This error occurs when there is some error in the call transction like wrong data, wrong field or format anything it can be.

for if really want to know detail above error you can use the following code which it captures all error and finally display the errors with detailed.

You can adjust the following code a/c to ur requirement.

As you know BDCMSGCOLL Structure captures the status of the call tranaction where it sucess or failurre.

DATA : TBL_ERROR LIKE TABLE OF BDCMSGCOLL,

TBL_COL occurs 0,

errmsg(100),

END OF TBL_ERR.

DATA :W_ERRMSG(100).

CALL TRANSACTION 'FB01'

USING IT_BDCDATA

MODE 'N'

MESSAGES INTO TBL_ERROR.

IF sy-subrc ne 0.

LOOP AT TBL_ERROR INTO WA_ERROR

WHERE MSGTYP = 'E' OR MSGTYP = 'A'..

**BUILT ERROR_MESSAGES.

CALL FUNCTION 'FORMAT_MESSAGE'

EXPORTING

ID = SY-MSGID

LANG = '-D'

IMPORTING

MSG = W_ERRMSG

EXCEPTIONS

NOT_FOUND = 1

OTHERS = 2.

TBL_COL-ERRMSG = W_ERRMSG.

APPEND TBL_COL.

CLEAR TBL_COL.

ENDLOOP.

*DISPLAY THE ERROR MESSG.

LOOP AT TBL_COL.

WRITE : / TBL_COL-ERRMSG.

CLEAR TBL_COL.

ENDLOOP.

Reward with points if helpful.

Regards,

Vijay

Read only

rodrigo_paisante3
Active Contributor
0 Likes
542

Hi,

I had this problem some days ago. Yes, is a batch input error. Try to find the message like the experts said.

In my program i get a warning message that gerenerate the error 1001. When i run the program with mode "n", sometimes, the error occured. When i run with mode "a" the error not occured, and the item was included ok in FB03.

The warning message was like that: "Item already included with id <ID>". So, i talk with the QA to give me other data to do my test.

Regards.