11-12-2007 6:58 PM
Hi all,
I have to assign serialnumbers (equipments) to production orders. Manually I can do this via CO02, but I have to do this in ABAP.
I tried function module SERNR_ADD_TO_PP but I was not able to assign serialnumbers with it. Actually nothing happened; no error messages or any other hints.
Does anybody have an idea, how to use this function module or how to add serialnumber to production orders?
Thanks in advance
Holger
11-12-2007 7:31 PM
Hi,
Please check FM SERIAL_POST_UPDATE_PP perhaps it may help.
Regards,
Ferry Lianto
11-12-2007 7:31 PM
Hi,
Please check FM SERIAL_POST_UPDATE_PP perhaps it may help.
Regards,
Ferry Lianto
11-12-2007 7:39 PM
As Ferry said use FM 'SERIAL_POST_UPDATE_PP'
define structure RSERXX and update
CALL FUNCTION 'SERIAL_POST_UPDATE_PP' IN UPDATE TASK
TABLES
XSER05 = US_XSERXX.
Best regards,
Pradeep.
11-15-2007 12:18 PM
Where do I put the serialnumbers? Structure RSERXX only links to object lists. As far as I understand this, I somehow have to get my equipment (with the serialnumber) into the object list (table OBJK?), which is linked to my process order via table SER05.
The function module only seems to create or edit a link from an object list to a process order.
But how can I edit or create this object list? I assume, that an answer to this question leads me to my solution...
Thanks for your help
Holger
11-30-2007 7:54 AM
So, now I found the solution.
I call FM 'SERNR_ADD_TO_PP' and afterwards I call FM 'SERIAL_LISTE_POST_PP'. That's it...
Regards
Holger
06-26-2008 5:34 PM
Hi,
I need to implement the same, please provide the details...
Regards,
Ravi
10-23-2008 8:37 PM
Does anyone have example code of how these function modules work together and need to be called? The export import paramters dont appear to be the same, and the documentation is missing.
SERNR_ADD_TO_PP
SERIAL_LISTE_POST_PP
Any help would be greatly appreciated.
Thanks
Mike
03-20-2009 5:02 PM
DATA: GS_AFVGD_SS LIKE AFVGD.
DATA: GS_AFVGD LIKE AFVGD,
GS_CAUFVD_PO LIKE CAUFVD,
GS_AFPOD_PO LIKE AFPOD,
GS_CAUFVD_CO LIKE CAUFVD.
DATA: L_NUM_SERNO LIKE SY-TABIX.
CONSTANTS: L_PPORD LIKE CAUFVD-AUTYP VALUE '10'.
DATA: GT_SERNOS LIKE E1RMSNO OCCURS 0 WITH HEADER LINE.
GS_AFPOD_PO-SERNP = 'ZLS'.
GS_CAUFVD_CO-MATNR = '00000000000AB24C24'.
L_NUM_SERNO = '1'.
GS_AFPOD_PO-POSNR = '0001'.
gs_caufvd_co-auart = 'ZP01'.
GS_AFPOD_PO-DWERK = 'NTC'.
GS_CAUFVD_CO-AUFNR = '000001006421'.
gt_sernos-sernr = '25000211'.
append gt_sernos.
CALL FUNCTION 'SERNR_ADD_TO_PP'
EXPORTING
PROFILE = GS_AFPOD_PO-SERNP
MATERIAL = GS_CAUFVD_CO-MATNR
QUANTITY = L_NUM_SERNO
PPAUFNR = GS_CAUFVD_CO-AUFNR
PPPOSNR = GS_AFPOD_PO-POSNR
PPAUTYP = L_PPORD
PPAUFART = GS_CAUFVD_CO-AUART
PMRSORD = SPACE
PPWERK = GS_AFPOD_PO-DWERK
M_CHARGE =
KMATNR =
CUOBJ =
J_VORGANG = 'PMP1'
IMPORTING
ANZSN = L_NUM_SERNO
ZEILEN_ID =
SERIAL_COMMIT =
TABLES
SERNOS = GT_SERNOS
EXCEPTIONS
KONFIGURATIONS_ERROR = 1
SERIALNUMBER_ERRORS = 2
SERIALNUMBER_WARNINGS = 3
NO_PROFILE_OPERATION = 4
OTHERS = 5.
CALL FUNCTION 'SERIAL_LISTE_POST_PP'
EXPORTING
MEMORY_ID_STATUS = ' '.
TABLES
TAB_CUOBJ = P_TAB_CUOBJ.
if sy-subrc = 0.
commit work and wait.
endif.
02-17-2020 7:35 PM