SAP Function /SAPCEM/BAPI_SHIPDOCCEM_CREATE - Create Shipping Document

Parameter Reference Type Length Default Optional Text
HEADERDATA /SAPCEM/BAPI_SDCEM_CREATE_H u 205 Transfer Structure Header Data Shipping Document (Create)
TESTRUN BAPIFLAG-BAPIFLAG C 1 X Simulation = 'X'
USERFIELDS /SAPCEM/BAPI_SDCEM_CUSTOM u 172 X BAPI Transfer Structure Cust.-Spec. Fields/CEM Ship. Doc.

Parameter Reference Type Length Text
NUMBER /SAPCEM/BAPI_SDCEM-NUMBER C 10 Document number

Parameter Reference Length Optional Text
EXTENSIONIN BAPIPAREX 990 X Custoemr Enhancement for J_3GBELK/J_3GBELP
ITEMDATA /SAPCEM/BAPI_SDCEM_CREATE_I 407 Transfer Structure Item Data Shipping Document (Create)
RETURN BAPIRET2 548 Return Parameters

Functionality
BAPI /SAPCEM/BAPI_SHIPDOCCEM_CREATE can be used to create a CEMshipping document.

Example
The following data, at least, must be entered for the BAPI:

  • HEADERDATA-DOC_TYPE (document type)

  • HEADERDATA-SENDER (sender)

  • HEADERDATA-RECIPIENT (recipient)

  • HEADERDATA-DOC_DATE (document date)

  • ITEMDATA-EQUIPMENT or ITEMDATA-MATERIAL
  • Notes
    If there is an error (parameter RETURN contains entries of TYPE E orA), and the shipping document can therefore not be created, the callerof the BAPI is responsible for releasing all locks and also responsiblefor the commit work.
    If the sender/recipient of category network or project definition, theuser must enter a network activity or a WBS element for the projectdefinition in the HEADERDATA since the BAPI guidelines do not allow adialog.
    If an equipment, which represents a package, is transferred into tableITEMDATA, this package is not exploded. The user is responsible forexploding and transfering the package items as part of the ITEMDATA.You can possibly use RFC function module/SAPCEM/HIER_PAKET_AUFLOESEN.

    Description
    Shipping document number.

    Description
    Details for a shipping document header record

    Value range
    DOC_TYPE Document type
    SENDER Sender
    RECIPIENT Recipient
    INTER_RCPT Intermediate Recipient
    EXTDOCNO External Document Number
    DOC_DATE Document Date
    WBS_ELEMENT_SENDER WBS-Element Sender
    WBS_ELEMENT_RECIPIENT WBS-Element of Recipient

    WBS_ELEMENT_INTER_RCPT WBS-Element of IntermediateRecipient
    ACTIVITY_SENDER Activity Number Sender
    ACTIVITY_RECIPIENT Activity Number Recipient
    COMMENT1 Comment1
    COMMENT2 Comment2

    Description
    If you set this indciator updating does not take place.

    Description
    Customer-specific fields in shipping document header record

    Value range
    USERFIELD0 User field for 20 characters

    USERFIELD1 User field for 20 characters

    USERFIELD2 User field for 10 characters

    USERFIELD3 User field for 10 characters

    USERFIELD_QUAN1 User field for quantity
    USERFIELD_UNIT1 User field: Unit quantity field

    USERFIELD_UNIT1_ISO ISO-Code unit of measure
    USERFIELD_QUAN2 User field for quantity
    USERFIELD_UNIT2 User field: Unit quantity field

    USERFIELD_UNIT2_ISO ISO-Code Unit of measure
    USERFIELD_CURR1 Currency amount
    USERFIELD_CURR1_UNIT User field: Unit value field

    USERFIELD_CURR1_UNIT_ISO ISO Code Currency
    USERFIELD_CURR2 Currency amount
    USERFIELD_CURR2_UNIT User field: Unit value field

    USERFIELD_CURR2_UNIT_ISO ISO Code Currency
    USERFIELD_DAT1 User field for date
    USERFIELD_DAT1_ISO_ZONE Time zone
    USERFIELD_DAT1_ISO_STAMP UTC-Time stamp
    USERFIELD_DAT2 User field for date
    USERFIELD_DAT2_ISO_ZONE Time zone
    USERFIELD_DAT2_ISO_STAMP UTC-Time stamp
    USERFIELD_FLAG1 Evaluation indicator
    USERFIELD_FLAG2 Evaluation indicator

    Description
    This table contains customer enhancements of tables J_3GBELK (shippingdocument header) and J_3GBELP (shipping document item).

    Value range
    /SAPCEM/BAPI_TE_J_3GBELK
    /SAPCEM/BAPI_TE_J_3GBELP

    Default
    The documentation on the structure for this parameterBAPIPAREX contains additional notes on using thisparameter. For more information see also 'Customer enhancement conceptfor BAPIs'.

    Description
    Detailed item data in a shipping document

    Value range
    EQUIPMENT Equipment number
    MATERIAL Material number
    QUANTITY Quantity
    UNIT Unit of measure
    ISOCODE_UNIT ISO-Code Unit of measure
    ACTY_TYPE Activity type
    BATCH_SENDER Batch number
    BATCH_RECIPIENT Batch number
    COMMENT1 Comment
    COMMENT2 Comment
    USERFIELD0 User field for 20 characters

    USERFIELD1 User field for 20 characters

    USERFIELD2 User field for 10 characters

    USERFIELD3 User field for 10 characters

    USERFIELD_QUAN1 User field for quantity
    USERFIELD_UNIT1 User field: Unit quantity field

    USERFIELD_UNIT1_ISO ISO-Code Unit of measure
    USERFIELD_QUAN2 User field for quantity
    USERFIELD_UNIT2 User field: Unit of measure

    USERFIELD_UNIT2_ISO ISO-Code Unit of measure
    USERFIELD_CURR1 Currency amount
    USERFIELD_CURR1_UNIT User field: Unit value field
    USERFIELD_CURR1_UNIT_ISO ISO Code Currency
    USERFIELD_CURR2 Currency amount
    USERFIELD_CURR2_UNIT User field: Unit value field
    USERFIELD_CURR2_UNIT_ISO ISO Code Currency
    USERFIELD_DAT1 User field for date
    USERFIELD_DAT1_ISO_ZONE Time zone
    USERFIELD_DAT1_ISO_STAMP UTC-Time stamp
    USERFIELD_DAT2 User field for date
    USERFIELD_DAT2_ISO_ZONE Time zone
    USERFIELD_DAT2_ISO_STAMP UTC-Time stamp
    USERFIELD_FLAG1 Evaluation indicator
    USERFIELD_FLAG2 Evaluation indicator

    Description
    Table of messages
    Messages are collected in this table.
    TYPE Message category S Success, E Error, W Warning, IInformation
    ID Message-ID
    NUMBER Message number
    MESSAGE Message text
    LOG_NO Application Log: Log Number
    LOG_MSG_NO Application Log: Sequence number of message
    MESSAGE_V1 Message variable
    MESSAGE_V2 Message variable
    MESSAGE_V3 Message variable
    MESSAGE_V4 Message variable
    PARAMETER Parameter name
    ROW Row in parameter
    FIELD Field in parameter
    SYSTEM System (logical system) from which message originates