You are on page 1of 4

Note 531207 - Use of BAPI_SHIPMENT_CREATE concerning shipping

statuses
Note Language: English Version: 3 Validity: Valid from 28.06.2002

Summary

Symptom
This note complements the documentation for the interface of function
module BAPI_SHIPMENT_CREATE concerning dates and transportation planning
status.
Function module BAPI_SHIPMENT_CREATE is able to generateshipment documents
including preassigned planned and actual dates for the individual shipping
statuses planning, registration, loading start, loading end, shipment
completion, shipment start and shipment end.
On the one hand, BAPI_SHIPMENT_CREATE can be used as a
remote-enabledmodule. On the other hand, you have the option of using the
function within the EDI with function module IDOC_INPUT_SHIPMENT_CREATEFROM
or IDoc basic type SHIPMENT_CREATEFROMDATA01
(IDOC_INPUT_SHIPMENT_CREATEFROM only converts SHIPMENT_CREATEFROMDATA01 and
then calls BAPI_SHIPMENT_CREATE for further processing).

More Terms
Alternative for idoc_input_shpmnt

Cause and Prerequisites


When you use bapi_shipment_create, there are different ways of setting the
different dates of the shipment header. The following statements can be
understood by means of the attached report ztest_bapi_shipment_create2.

o Only the fields

- bapishipmentheader-status_plan

- bapishipmentheader-status_checkin

- bapishipmentheader-status_load_start

- bapishipmentheader-status_load_end

- bapishipmentheader-status_compl

- bapishipmentheader-status_shpmnt_start

- bapishipmentheader-status_shpmnt_end

of structure bapishipmentheader are set with the call of


bapi_shipment_create (value = 'X'):

In this case the corresponding statuses of the new shipment are


also set, the respective DATA and TIMES

- VTTK-DTDIS --> Date of end of planning

- VTTK-UZDIS --> Scheduling end time

- VTTK-DAREG --> Actual date of check-in

- VTTK-UAREG --> Current time of check-in

22.01.2009 Page 1 of 4
Note 531207 - Use of BAPI_SHIPMENT_CREATE concerning shipping
statuses

- VTTK-DALBG --> Current date for start of loading

- VTTK-UALBG --> Actual loading start time

- VTTK-DALEN --> Actual date for end of loading

- VTTK-UALEN --> Actual loading end time

- VTTK-DTABF --> Current date of shipment completion

- VTTK-UZABF --> Time of transportation processing

- VTTK-DATBG --> Current date for start of shipment

- VTTK-UATBG --> Actual transport start time

- VTTK-DATEN --> Actual date for end of shipment

- VTTK-UATEN --> Actual shipment end time

correspond to the SYSTEM DATE or the SYSTEM TIME, at which the


function module was imported. The respective PLANNED data and
PLANNED times remain empty.

o Filling the seven above-mentioned BAPISHIPMENTHEADER fieldsis not


necessary if you assign the HEADERDEADLINE interface to the
function module. If Headerdeadline is filled correctly, the
statuses of the shipment WITH date and time are taken from this
structure. (Setting the fields from Bapishipmentheader is not
necessary in this case, but also not incorrect). The PLANNED data
can also be set with structure HEADERDEADLINE.

However, structure HEADERDEADLINE must be filled in accordance with


the following rule:

-TIME_TYPE = logical time --> to be filled with fixed values:

- -TIME_TYPE = HDRSTPLDT --> Date/time of end of planning

- -TIME_TYPE = HDRSTCIPDT --> PLANNED date/time of check-in

- -TIME_TYPE = HDRSTCIADT --> ACTUAL date/time of check-in

- -TIME_TYPE = HDRSTLSPDT --> PLANNED date/time of loading start

- -TIME_TYPE = HDRSTLSADT --> ACTUAL date/time of loading start

- -TIME_TYPE = HDRSTLEPDT --> PLANNED date/time of loading end

- -TIME_TYPE = HDRSTLEADT --> ACTUAL date/time of loading end

- -TIME_TYPE = HDRSTCPDT --> PLANNED date/time of shipment


completion

- -TIME_TYPE = HDRSTCADT --> ACTUAL date/time of shipment


completion

22.01.2009 Page 2 of 4
Note 531207 - Use of BAPI_SHIPMENT_CREATE concerning shipping
statuses

- -TIME_TYPE = HDRSTSSPDT --> PLANNED date/time of shipment start

- -TIME_TYPE = HDRSTSSADT --> ACTUAL date/time of shipment start

- -TIME_TYPE = HDRSTSEPDT --> PLANNED date/time of shipment end

- -TIME_TYPE = HDRSTSEADT --> ACTUAL date/time of shipment end

These equivalents can also be found in function group V56I_BAPI


--> Include LV56I_BAPITOP

-TIME_STAMP_UTC = UTC time stamp in short form (YYYYMMDDhhmmss)

-TIME_ZONE = time zone

Remark: If you set some fields, which do not have any equivalent in
Headerdeadline, in Bapishipmentheader, system date and system time
are set again for these (current) shipping statuses. The planned
data stays empty for these (additional) statuses.

Solution
You can find the specified report as part of the "correction instructions".

Header Data
Release Status: Released for Customer
Released on: 28.06.2002 13:42:01
Priority: Recommendations/additional info
Category: Consulting

Main Component LE-TRA-IN Interfaces

Valid Releases
Software Component Release From To Release and Following
Release
SAP_APPL 46C 46C 46C
SAP_APPL 470 470 470

Related Notes
Number Short Text
546602 BAPI_SHIPMENT_CREATE: Return ID/Message empty

Correction Instructions

22.01.2009 Page 3 of 4
Note 531207 - Use of BAPI_SHIPMENT_CREATE concerning shipping
statuses
Correction Valid Valid Software Typ Reference Last
Instructio from to Component e Correction Changed
ns *)
423134 46C 470 SAP_APPL C 26.06.2002 15:00:13
*) C Correction, B Pre-Implementation, A Post-Implementation, M Undetermined

22.01.2009 Page 4 of 4

You might also like