‎2009 Jul 30 5:09 AM
Hi All,
I am using FM BAPI_PR_CREATE to create purchase requesition, Now my problem is that i have various items for single material now i wan to capture the error if any item has ?
Please let me know how to do so?
Thanks & Regards,
Ruchi Tiwari
‎2009 Jul 30 5:19 AM
Hi,
Use parameter RETURN in BAPI which Contains all system messages issued during processing.
Now if you report is running in background then uplad a Error log file in application server.
Thanks & regards,
ShreeMohan
‎2009 Jul 30 5:27 AM
Hi,
To get the error messages after the BAPI_PR_CREATE is called,
loop at the return table which will contain the system messages and call the following FM
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = LS_MESSAGES-MSGID
LANG = '-D'
NO = LS_MESSAGES-MSGNR
V1 = LS_MESSAGES-MSGV1
V2 = LS_MESSAGES-MSGV2
V3 = LS_MESSAGES-MSGV3
V4 = LS_MESSAGES-MSGV4
IMPORTING
MSG = LV_MESSAGE
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
‎2009 Jul 30 5:39 AM