‎2007 Sep 06 6:36 AM
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
‎2007 Sep 06 9:05 AM
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
‎2007 Sep 06 9:08 AM
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.
‎2007 Sep 06 10:28 AM
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>
‎2007 Sep 06 11:52 AM
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
‎2007 Sep 06 12:33 PM
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.