‎2006 Mar 09 7:59 AM
Hi everyone
In case of third-party businnes we use the workflow sales order -> purchase order -> invoice.
In this case we have to add the serial numbers in the sales document under Extras->Technical Objects.
Is there any function or bapi that I can use???
PS:
I've try the combination:
SERNR_ADD_TO_AU and
IWOL_WV_ADD_OBJECTS but is not working since the second function expects to have an equipment with the material nr and the serial nr that I try to add ( and this equipment is not existing yet ).
Thanks.
Anca
‎2006 Mar 09 2:19 PM
Hi,
Have you tried function modules SERIALPROFILE_CHECK, SERNR_ADD_TO_DOCUMENT or SERNR_MAINTAIN_IN_DOCUMENT?
Also check the function modules in table T377X for Serial Procedures related to SD (e.g. SDAP is for "Post serial numbers for SD order" and may have function module SERIAL_LISTE_POST_AU as its form value).
By the way, in VA02 the function for Extras -> Technical Objects branches to include program MV45AF0F_FCODE_POTO, form FCODE_POTO. Investigating or debugging this logic may provide you some clues if none of the functions suggested above are of use.
Best Regards,
James Gaddis
‎2006 Mar 09 2:19 PM
Hi,
Have you tried function modules SERIALPROFILE_CHECK, SERNR_ADD_TO_DOCUMENT or SERNR_MAINTAIN_IN_DOCUMENT?
Also check the function modules in table T377X for Serial Procedures related to SD (e.g. SDAP is for "Post serial numbers for SD order" and may have function module SERIAL_LISTE_POST_AU as its form value).
By the way, in VA02 the function for Extras -> Technical Objects branches to include program MV45AF0F_FCODE_POTO, form FCODE_POTO. Investigating or debugging this logic may provide you some clues if none of the functions suggested above are of use.
Best Regards,
James Gaddis
‎2006 Mar 09 3:09 PM
Hi James
I've tried SERNR_MAINTAIN_IN_DOCUMENT. The function is executed successfully. The ANZSN is ok = 4 ( 3 serials nr I've add manually, 1 with the function ) and SERIAL_COMMIT is X.
But I am not able to see anything in VA03. No new serial nr appears in the technical objects. And if I am trying once again with the same serial nr I am receiving the message: "Serial number SERIALNRTEST1 already assigned"
I think I am missing something. I will check the VA02 to see how it is there beeing done.
Thank's.
Anca
‎2006 Mar 09 3:13 PM
Hi Anca,
You may try this FM <b>IWOL_WV_ADD_OBJECTS</b>.
Hope this will help.
Regards,
Ferry Lianto
‎2006 Mar 09 4:04 PM
Hi Ferry
I've already tried. Is not working.
But thanks anyway.
Anca
‎2006 Mar 09 4:19 PM
Hi Anca,
Did you assign correct parameters for FM IWOL_WV_ADD_OBJECTS? Especially TO_TYPE = 'SD'.
Please add at the end FM<b>IWOL_WV_POST_OBJECT_LIST</b>.
Hope this will help.
Regards,
Ferry Lianto
Message was edited by: Ferry Lianto
‎2006 Mar 10 7:38 AM
Hi Ferry
The parameters I've assign correct. But I allways get the error INVALID_SERIALNR = 4 because the function is searching for an equipment(sernr + matnr) that is not existing at that time.
Regards,
Anca
‎2007 Jan 02 5:31 PM
Hi Anca,
did you solved the problem with the function modules
to add serial numbers to material?
At the moment I've the same problem and I need
a solution, as soon as possible.
Thanks in advance
Pascal
‎2007 Oct 16 4:42 PM
Hello Pascal,
Did you solved this serial number assignment?
for the movment i also have the same requirement and looking for your help.
I am beginner in ABAP so thanks to help me.
Thanks,
Devasing.
‎2007 Oct 16 4:44 PM
Hello Anca,
Did you solved this serial number assignment?
for the movment i also have the same requirement and looking for your help.
I am beginner in ABAP so thanks to help me.
Please give me the steps you followed to solve this problem.
Thanks,
Devasing.
‎2006 Mar 15 11:01 AM
I must indicate serial number to existing order.
I have tried SERNR_ADD_TO_AU, It does not work because the data in OBJK has field TASER with SER01 or SER03, and we must have SER02 for orders.
Any idea?
Regards,
Yann SZWEC
‎2007 Jan 02 5:29 PM
Hi Yann SZWEC,
did you solved the problem with the function modules
to add serial numbers to material?
At the moment I've the same problem and I need
a solution, as soon as possible.
Thanks in advance.
Pascal Schrack
‎2020 May 07 12:45 PM
Hi,
Use the following code to update SERIAL number in sales order item. It works.
CALL FUNCTION 'SERNR_ADD_TO_AU'
EXPORTING
sernr = ls_viqmel-serialnr
profile = xvbap-serail
material = xvbap-matnr
quantity = '1'
document = vbak-vbeln
item = xvbap-posnr
debitor = vbak-kunnr
vbtyp = vbak-vbtyp
sd_auart = vbak-auart
sd_postyp = xvbap-pstyv
* IMPORTING
* ANZSN =
* ZEILEN_ID =
* SERIAL_COMMIT =
EXCEPTIONS
konfigurations_error = 1
serialnumber_errors = 2
serialnumber_warnings = 3
no_profile_operation = 4
OTHERS = 5.
CALL FUNCTION 'SERIAL_LISTE_POST_AU'.
COMMIT WORK AND WAIT.