Skip to Content
1
Former Member
Feb 17, 2017 at 01:53 AM

MB_DOCUMENT_BADI to get Serial Number in MIGO GI

533 Views Last edit Feb 17, 2017 at 02:20 AM 6 rev

Hi Experts,

I have a requirement to validate the serial numbers in MIGO GI transactions.

I have tried MB_DOCUMENT_BADI method MB_DOCUMENT_BEFORE_UPDATE but I cant get the serial numbers. I have tried the solution from this link https://archive.sap.com/discussions/thread/1895744 but its not working for me.

I have passed the value of MBLNR and MJAHR when the FM 'GET_SERNOS_OF_DOCUMENT' executed my return value is blank(lt_rserob).

Code below:

CALL FUNCTION 'GET_SERNOS_OF_DOCUMENT'
EXPORTING
key_data = ls_rserob
TABLES
sernos = lt_rserob
EXCEPTIONS
key_parameter_error = 1
no_supported_access = 2
no_data_found = 3
OTHERS = 4.

I'm getting no value found.

Can we get serial numbers from GET_SERNOS_OF_DOCUMENT even though the data are still from memory and the tables are not yet updated ?