Skip to Content
author's profile photo Former Member
Former Member

serial number in sales order creation

HI all,

please help to me........

My requirement a add the serial number BAPI sales order.

problem is their no serial number in bapi structure.

How to add serial number crate a salesorder bapi.

serial number is RIPW0-SERNR.

Thanks & Regards,

SReddy.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Sep 18, 2008 at 08:33 PM

    Serial number is not stored in Sales data tables like VBAP, VBAK ets. so where do you want to store serial numbers?

    You have to extend the sales tables ti include the serial number field and then pass the value through BAPI.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 18, 2008 at 09:55 PM

    we normally use

    SERNR_ADD_TO_AU

    to add serial number to Sales Orders.

    Check if this works in your scenario.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 19, 2008 at 03:37 AM

    Hi ,

    Please do check this BAPI_SALESORDER_CREATEFROMDAT2 where you find this field SERNR as BOM explosion number in ORDER_ITEMS_IN structure of BAPI.

    Thanks

    Sudharshan

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 19, 2008 at 04:33 AM

    hi,

    refer to this link

    http://help.sap.com/saphelp_nw04/helpdata/EN/3e/0e1089c24611d1ad09080009b0fb56/content.htm

    refer to this code...

    Also if you set the * CONVERT_PARVW_AUART = 'X' parameter to 'X' you can use sold to party as SP and ship to party as SH.

    REPORT ZEX_BAPISALESORDCRT .

    --


    Data Declaration--

    Data: st_BAPISDHEAD like BAPISDHEAD, " Sales Order Header Data

    ta_BAPIITEMIN like BAPIITEMIN occurs 0 with header line, " Ln item

    ta_BAPIPARTNR like BAPIPARTNR occurs 0 with header line, " Partner

    d_BAPIRETURN1 like BAPIRETURN1, " Bapi return msg

    d_vbeln like bapivbeln-VBELN. " Sales Order Number

    • Move the data to create sales order in the repective parameters------*

    move: 'TA' to st_BAPISDHEAD-DOC_TYPE, " Sales document type

    '15493' to st_BAPISDHEAD-PURCH_NO_C,

    '00010' to ta_BAPIITEMIN-ITM_NUMBER,

    'Y-351' to ta_BAPIITEMIN-MATERIAL,

    '1100' to ta_BAPIITEMIN-PLANT,

    '1' to ta_BAPIITEMIN-REQ_QTY,

    'AG' to ta_BAPIPARTNR-PARTN_ROLE, " Sold to Party

    '0000007777' to ta_BAPIPARTNR-PARTN_NUMB.

    • Append the internal tables-------------------------------------------*

    append ta_BAPIPARTNR.

    clear ta_BAPIPARTNR.

    append ta_BAPIITEMIN.

    clear ta_BAPIITEMIN.

    • Move ship to party---------------------------------------------------*

    move: 'RG' to ta_BAPIPARTNR-PARTN_ROLE, " Ship to party

    '0000007777' to ta_BAPIPARTNR-PARTN_NUMB.

    • Append the internal tables-------------------------------------------*

    append ta_BAPIPARTNR.

    clear ta_BAPIPARTNR.

    • Call the Bapi to create the sales order

    CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT1'

    EXPORTING

    ORDER_HEADER_IN = st_BAPISDHEAD

    • WITHOUT_COMMIT = ' '

    • CONVERT_PARVW_AUART = ' '

    IMPORTING

    SALESDOCUMENT = d_vbeln

    • SOLD_TO_PARTY =

    • SHIP_TO_PARTY =

    • BILLING_PARTY =

    RETURN = d_BAPIRETURN1

    TABLES

    ORDER_ITEMS_IN = ta_BAPIITEMIN

    ORDER_PARTNERS = ta_BAPIPARTNR

    • ORDER_ITEMS_OUT =

    • ORDER_CFGS_REF =

    • ORDER_CFGS_INST =

    • ORDER_CFGS_PART_OF =

    • ORDER_CFGS_VALUE =

    • ORDER_CCARD =

    • ORDER_CFGS_BLOB =

    • ORDER_SCHEDULE_EX =

    .

    if d_vbeln <> space.

    write: 'Sales order No. ', d_vbeln.

    endif.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.