How should I fill the BAPI parameters?

     SAP Note No. 366265                          14.08.2002          Seite 1
     ________________________________________________________________________

     Number              366265
     Version             11 vom 18.12.2001
     Status              Released for Customer
     Set by              SAP AG am 18.12.2001

     Language            EN
     Short text          How should I fill the BAPI parameters?

     Responsible         SAP AG
     Component           SD-SLS-GF-IF
                         Sales Documents BAPI's
     ________________________________________________________________________

     Long text

     Symptom
     There are always questions and unclarities about how to fill the
     parameters of the BAPIs.
     This note is supposed to collect and document these questions and their
     answers.
     Additional key words
     *
     Cause and preconditions
     *
     Solution

     1.  A new item is supposed to be added with CHANGE BAPI:

         a) BAPISDITM, here you enter the item data

            -  ITM_NUMBER

            -  PO_ITM_NO required entry during configuration

            -  MATERIAL

         b) BAPISCHDL, here you enter the schedule lines

            -  ITM_NUMBER

            -  SCHED_LINE

            -  REQ_DATE

            -  REQ_QTY

         c) BAPIPARNR, here you enter alternative item partners

            -  PARTN_ROLE

            -  PARTN_NUMB

            -  ITM_NUMBER

         possibly data for the configuration, below you find the fields you
         must fill at least:
                                                                      Seite 2
 

         d) BAPICUCFG, configuration: Reference data

            -  POSEX        External Item Number

            -  CONFIG_ID    External configuration ID (temporary)

            -  ROOT_ID      Instance number in the configuration

            -  BAPICUINS:   Configuration: Instances

            -  CONFIG_ID    External configuration ID (temporary)

            -  INST_ID      Instance number in the configuration

            -  OBJ_TYPE     Object type

            -  CLASS_TYPE   Class type

            -  OBJ_KEY      Object key

            -  QUANTITY     Instance quantity

            -  BAPICUVAL    Configuration: Characteristic values

            -  CONFIG_ID    External configuration ID (temporary)

            -  INST_ID      Instance number in the configuration

            -  CHARC        Characteristic name

            -  VALUE        Value of a characteristic

     2.  Configuration data during the creation/change, the characteristic
         value assignment must be entered completely here.
 
 

     3.  Item changes

         a) Deletion of an item

            BAPISDITM, the item number has to be specified here.

            BAPISDITMX, the item number and the update flag 'D' have to be
            specified here.

            Since this is a document change, the update flag on header level
            'U' (BAPISDH1X-UPDATEFLAG) has to be specified.

     4.  Document addresses

         There are two options to enter document addresses in the BAPI

         a) Partner table (BAPIPARNR, BAPIPARNR), here, the most important
            address fields are defined.During the address entry, you should
            always enter the language key and the country code as well.
                                                                      Seite 3
 

         b) Address table (BAPIADDR1), as an alternative you can also enter
            the address via this address table.

            Then the connection to the partner table
            (BAPIPARNR-ADDR_LINK/BAPIPARTNR-ADDR_LINK) has to be defined via
            the address link (BAPIADDR1-ADDR_NO):

         If you want to change the address in the sales document, you always
         have to enter the address completely.
 

     Source code corrections
     ________________________________________________________________________
 

     Note is release independent
     ________________________________________________________________________

     Reference to related Notes

     Nummer    Kurztext
     ____________________________________________________________
      93091    Information on BAPIs in sales and distribution
     481102    BAPI_SALESORDER_CREATEFROMDAT2 & configuration

     ________________________________________________________________________
 
Beam Back -> ABAP Questions and Answers