2011 Oct 28 9:29 AM
Hello,
we would like to check serial numbers just before saving our document.
How could we read the serial numbers from memory ?
The GET_SERNOS_OF_DOCUMENT does not return data from memory !
Do you know a function to catch those datas ?
Best regards
2011 Oct 28 9:43 AM
2011 Oct 28 9:45 AM
Hi,
refer Program RIOBJK00 to solve ur problem
thanks & regards.
2011 Oct 28 9:59 AM
Have a look at exits
EXIT_SAPLIPW1_008 & EXIT_SAPLIPW1_002
Place IQ* in smod and search for it.
2011 Oct 28 10:53 AM
Thanks for your answers, but they don't resolve my question.
RIOBJK00 => usefull only to read existing serial numbers
Message ID 8118086#8118086 => not usefull in MD_DOCUMENT_BADI.
User EXIT for serial numbers : sometimes we must check more than 200 serial numbers and for these reason
we would like to check all of them in one step => just before the saving action.
I try to find a function to read the input serial numbers from memory.
2011 Oct 28 11:00 AM
Did you check the customer exit EXIT_SAPLIPW1_008 ?
This exit will be called for every serial number entered. You will not obtain the whole serial no's in this function.
Please let us know how you have called GET_SERNOS_OF_DOCUMENT ?
Kesav
2011 Oct 28 12:11 PM
Hello Kesav,
If we use the customer exit EXIT_SAPLIPW1_008, we have a select in SER05 and OJBK for each serial numbers.
=> 200 serial = 200 select.
The use of the BADI would be a better solution => only one SELECT .... into t_tab and then one READ for each SN.
The use of GET_SERNOS_OF_DOCUMENT :
data : ls_rser TYPE rserob,
lt_sernos TYPE TABLE OF rserob.
move: x_mkpf-mblnr to ls_rser-mblnr,
x_mkpf-mjahr to ls_rser-mjahr,
'SER03' to ls_rser-taser.
CALL FUNCTION 'GET_SERNOS_OF_DOCUMENT'
EXPORTING
KEY_DATA = ls_rser
TABLES
sernos = lt_sernos
EXCEPTIONS
KEY_PARAMETER_ERROR = 1
NO_SUPPORTED_ACCESS = 2
NO_DATA_FOUND = 3.
Result = NO_DATA_FOUND (True, because we have no SN in SER03 for the specified document => not saved).
This function seems not to be the good way to catch our SN from memory !
Joce