‎2008 Apr 22 11:48 AM
hi I am Using lsmw with BApi,how can i capture the error file when the Bpiret2 table is populated,please let me know.
thanks alot
‎2008 Apr 22 1:40 PM
Hi,
Every BAPI function module is having an error tab in which error messages are stored. You can captured it from there.
REWARD IF USEFUL
‎2008 Apr 22 1:45 PM
how can i capture the error file when the Bpiret2 table is populated
use MESSAGE_PREPARE or FORMAT_MESSAGE function model to capture error messages as import parameters of fm are bapiret2
sample code:
FORM print_error_msg
using p_lt_messtab structure lt_messtab.
msgnr = p_lt_messtab-msgnr.
msgv1 = p_lt_messtab-msgv1.
msgv2 = p_lt_messtab-msgv2.
msgv3 = p_lt_messtab-msgv3.
msgv4 = p_lt_messtab-msgv4.
CALL FUNCTION 'MESSAGE_PREPARE'
EXPORTING
LANGUAGE = 'E'
MSG_ID = p_lt_messtab-msgid
MSG_NO = p_lt_messtab-msgnr
MSG_VAR1 = msgv1
MSG_VAR2 = msgv2
MSG_VAR3 = msgv3
MSG_VAR4 = msgv4
IMPORTING
MSG_TEXT = gt_text
EXCEPTIONS
FUNCTION_NOT_COMPLETED = 1
MESSAGE_NOT_FOUND = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
write:/ gt_text.
ENDFORM. " print_error_msg
‎2008 Jun 20 7:55 AM
HI,
I am trying to load the date field in SAP using bapi in lsmw.
The default date is 01.01.1900.
the data is read correctly,even converted correctly(upto step-13).The data displyed after conversion is absolutely correct ie-01011900.But in idocs processing,loading is getting failed as i am getting an error like 'Month 19 is not pausible' in idoc overview.
If anybody know..how to recover please help.