Hello Experts,
I am creating a program that need to retrieve all types of message (success, warning, error) which occur when checking or Posting a good receipt based on PO and PO Item like they were to be displayed when the user check or post GR in MIGO. I am currently using the FM - BAPI_GOODSMVT_CREATE but I am able to catch any warning or success message with the exception of error messages.
Here is my code that I am using:
s_header-pstng_date = sy-datum.
s_code-gm_code = '01'.
move: '101' TO s_goodmvt_item-move_type,
'B' TO s_goodmvt_item-mvt_int.
loop at itab assigning <fs_line>.
move: <fs_line>-qty to s_goodmvt_item-entry-qnt,
<fs_line>-ebeln to s_goodmvt_item-po_number,
<fs_line>-ebelp to s_goodmvt_item-po_item.
append s_goodmvt_item to itab_goodmvt_item .
call function 'bapi_goodmvt_create'
exporting
goodsmvt_header = s_header
goodsmvt_code = s_code
testrun = v_flag_test
tables
goodsmvt_item = itab_goodmvt_item
return = itab_message.
" Processing of error found in itab_message.
endloop.
Can someone tell me how should I get these message as the above code snippet is only retrieving error message?
Thanks for your prompt responses.
Shabir