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

Sales Order Partner Functions

Hi,

We would like to change a sales order immediately after it is created using standard bapi, BAPI_SALESORDER_CREATEFROMDAT2. The change we would like to make is to add certain partner functions in the sales order at the line item level and not at the header and item level both (as the std bapi does).

1) How do we acheive this?

2) Is there any function module which can help change the sales order by adding the partner functions at the line item level of the sales order only.

3) Is there anyway that the partner functions can be added at the line item level by doing some config change?

4) Is there any way to create a sales order with the partner functions at the line item level only instead of the header and line item level both?

Thanks in advance.

Mick

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 04:48 AM

    hi,

    The following information may be useful for you

    2.2.1 Tables for Change Sales Order:

    2.2.1.1 ORDER_HEADER_IN:

    This table is used to input the header information of the Sales Document to the BAPI for changing the header level information of a Sales Order.

    The fields used in solution are as follows:

    i. PURCH_NO_C: Customer purchase order number

    ii. SALES_ORG: Sales Organization

    iii. DISTR_CHAN: Distribution Channel

    iv. DIVISION: Division

    v. SALES_OFF: Sales office

    vi. REQ_DATE_H: Requested delivery date

    vii. PURCH_DATE: Customer purchase order date

    2.2.1.2. ORDER_HEADER_INX:

    This table is an index table used to indicate which fields are being changed. All the fields are single character fields of value ‘X’ except the UPDATEFLAG.

    The fields used in solution are as follows:

    i. UPDATEFLAG: This field is used to indicate whether the header data is passed to Add, Change or delete Sales Orders. Possible UPDATEFLAGS are:

    a. U = Change(Sales Order Change)

    b. D = Delete( Sales Order Delete)

    c. I = Insert / Add (Sales Order Create)

    ii. SALES_ORG

    iii. DISTR_CHAN

    iv. DIVISION

    v. SALES_OFF

    vi. REQ_DATE_H

    vii. PURCH_DATE

    2.2.1.3. ORDER_ITEM_IN:

    This table is used to input the item level information of the Sales Document to the BAPI. The fields used in solution are as follows:

    i. ITM_NUMBER: Sales Document Item

    ii. CUST_MAT35: Material belonging to the customer (It won’t be updated in Change-Change and Change-Delete operations)

    iii. PLANT: Plant

    iv. BATCH: Batch Number

    v. TARGET_QTY: Target quantity in sales units

    2.2.1.4. ORDER_ITEM_INX:

    This table is an index table used to indicate which fields are being changed. All the fields are single character fields of value ‘X’ except the UPDATEFLAG.

    The fields used in solution are as follows:

    i. UPDATEFLAG: This field is used to indicate whether the item data is passed to Add, Change or delete Sales Order items. Possible UPDATEFLAGS are:

    a. U = Change(Sales Order Change)

    b. I = Insert / Add (Sales Order Add Item)

    ii. CUST_MAT35

    iii. PLANT

    iv. BATCH

    v. TARGET_QTY

    2.2.1.5. PARTNERCHANGES:

    This table is used to input the partner information of the Sales Document to the BAPI. The fields used in solution are as follows:

    i. PARTN_ROLE: Partner function

    ii. P_NUMB_OLD: Old Partner Number

    iii. P_NUMB_NEW: New Partner Number

    2.2.1.6. SCHEDULE_LINES

    This table is used to input the Schedule Lines information of the Sales Document to the BAPI.

    The fields used in solution are as follows:

    i. ITM_NUMBER: Line Item Number

    ii. SCHED_LINE: Schedule Line(Not required for Add Item or Delete Item)

    iii. REQ_QTY: Order quantity in sales units

    2.2.1.7. SCHEDULE_LINESX:

    This table is an index table used to indicate which fields are being changed. All the fields are single character fields of value ‘X’ except the ITM_NUMBER.

    The fields used in solution are as follows:

    i. UPDATEFLAG: This field is used to indicate whether the item data is passed to Add, Change or delete Sales Orders in the Schedules. Possible UPDATEFLAGS are:

    i. U = Change(Sales Order Change Item)

    ii. I = Add(Sales Order Add Item)

    ii. ITM_NUMBER: Line item number

    iii. SCHED_LINE: Schedule Line(Not required for operations Change-Add Item, Change-Delete Item)

    iv. REQ_QTY: Order Quantity in Sales Units

    2.2.1.8. ORDER_TEXT:

    This table is used to input the text information of various fields of the Sales Document to the BAPI. The fields used in solution are as follows:

    i. ITM_NUMBER: Line Item Number

    ii. TEXT_ID: Text ID

    iii. LANGU: Language Key

    iv. TEXT_LINE: Text line

    2.2.1.9. RETURN

    This table is used to get return messages from the SAP system

    The fields used in solution are as follows:

    i. TYPE: Message type: S Success, E Error, W Warning, I Info, A Abort

    ii. ID: Messages, Message Class

    iii. NUMBER: Messages, Message Number

    iv. MESSAGE: Message Text

    v. LOG_NO: Application log: log number

    vi. LOG_MSG_NO: Application log: Internal message serial number

    vii. MESSAGE_V1: Messages, message variables

    viii. MESSAGE_V2: Messages, message variables

    ix. MESSAGE_V3: Messages, message variables

    x. MESSAGE_V4: Messages, message variables

    xi. PARAMETER: Parameter Name

    xii. ROW: Lines in parameter

    xiii. FIELD: Field in parameter

    xiv. SYSTEM: Logical system from which message originates

    <b>Reward points if useful</b>

    regards,

    pavan

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Thanks Pavan.

      Is there any user exit availbale in function module SD_SALESDOCUMENT_CHANGE or BAPI_SALESORDER_CHANGE?

      Also any idea whether the partners can be added only at the item level of the sales order via a configuration change instead of a code change.

      Thanks in advance.

      Mick

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.