‎2011 Jan 18 11:40 PM
Does anyone know how to work around ITOB 411 error message? 'Serial number xxxxxx for material xxx could not be read.'
We are creating 60 serial numbers as we add them to existing contract document line items using modules SERNR_ADD_TO_AU and SERIAL_LISTE_POST_AU. This is successful. The Program waits for up to 8 seconds, then uses ITOB_SERIALNO_READ_SINGLE to retrieve the ITOB structure for each serial number that was added, in order to modify the last goods movement date. When the read is successful, ITOB_SERIALNO_MODIFY_SINGLE is used to successfully modify the LGMD. The first 15 serials are read and updated successfully. The error comes usually on about the 16th attempt of calling ITOB_SERIALNO_READ_SINGLE and stops the processing. Using various modules such as GET_SERNOS_OF_DOCUMENT verifies the serial number in the error message is in fact created. Any information is appreciated.
When we have quantities of 15 or below, there are no issues.
Below is an excerpt of the code used.
loop at lt_serial into ls_serial.
lv_sernr = ls_serial-sernr.
lv_quantity = ls_serial-qty.
CALL FUNCTION 'SERNR_ADD_TO_AU'
EXPORTING
sernr = lv_sernr
UII =
profile = 'ZOM1'
material = ls_out_items-material
M_CHARGE =
quantity = lv_quantity
J_VORGANG = 'PMS2'
KMATNR =
CUOBJ =
document = ls_out_header-doc_number
item = ls_out_items-itm_number
debitor = ls_out_header-sold_to
vbtyp = ls_out_header-sd_doc_cat
sd_auart = ls_out_header-doc_type
sd_postyp = ls_out_items-item_categ
I_AUTOMATIC = ' '
I_NO_ENQUEUE = ' '
I_MORE_ALLOWED = ' '
i_bapi = 'X'
IMPORTING
ANZSN =
ZEILEN_ID =
SERIAL_COMMIT =
EXCEPTIONS
konfigurations_error = 1
serialnumber_errors = 2
serialnumber_warnings = 3
no_profile_operation = 4
OTHERS = 5
.
IF sy-subrc <> 0.
exit.
endif.
endloop.
CALL FUNCTION 'SERIAL_LISTE_POST_AU'.
COMMIT WORK.
*goods movement date
WAIT UP TO 8 SECONDS.
LOOP AT lt_serial INTO ls_serial
IF ls_serial-inbdt IS INITIAL.
CONTINUE.
ENDIF.
lv_sernr = ls_serial-sernr.
CALL FUNCTION 'ITOB_SERIALNO_READ_SINGLE'
EXPORTING
I_HANDLE =
I_AUTH_TCODE =
I_EQUI_ONLY =
I_LOCK =
i_matnr = ls_order_item_in-material
i_sernr = lv_sernr
I_UII =
IMPORTING
e_object_rec = ls_object_rec_old
EXCEPTIONS
not_successful = 1
OTHERS = 2
.
IF sy-subrc <> 0.
exit.
endif.
MOVE-CORRESPONDING ls_object_rec_old TO ls_object_rec.
ls_object_rec-datlwb = ls_serial-inbdt.
CALL FUNCTION 'ITOB_SERIALNO_MODIFY_SINGLE'
EXPORTING
I_HANDLE =
I_CONVERT_FULL_EQUI =
I_EQUI_ONLY =
I_AUTH_TCODE =
i_filter_data = ' '
I_WRITE_BUFFER = 'X'
I_POST_BUFFER = 'X'
i_transfer_mode = 'X'
i_commit_work = 'X'
i_object_rec = ls_object_rec
I_OBJECT_REC_OLD =
IMPORTING
e_object_rec = ls_object_rec_exp
EXCEPTIONS
not_successful = 1
OTHERS = 2
endloop.
‎2011 Jan 19 9:29 AM
Hi,
Try to clear the buffers , there is an SAP note on this . I've searched but could not find.
Regards,
Srini.
‎2011 Jan 19 9:29 AM
Hi,
Try to clear the buffers , there is an SAP note on this . I've searched but could not find.
Regards,
Srini.
‎2011 Jan 19 9:43 AM
Hi,
Looking at your code, you are using two different variables while calling the below two FM's.
Most probably the values of the materials here are different.
CALL FUNCTION 'SERNR_ADD_TO_AU'
material = ls_out_items-material
CALL FUNCTION 'ITOB_SERIALNO_READ_SINGLE'
i_matnr = ls_order_item_in-materialDuring debugging, check if the values are the same. Including the preceeding zeros.
Regards,
Jovito.
‎2014 Aug 20 2:37 AM
Hi Robin,
I facing the error as well,
May I know how you solved the error 411 ?
Thanks in advance.