How To Upload Ps
How To Upload Ps
How To Upload Ps
How-To Guide
i
Table of Contents
1. Purpose and Structure of this Document ......................................................................... 1
2. The Structure of the Input File ........................................................................................... 1
3. How to Set Up the Input File ............................................................................................... 4
4. Unsupported Fields ............................................................................................................. 5
5. Common Error Messages and Their Causes .................................................................... 5
6. Mapping of Fields to /SCWM/PACKSPEC ......................................................................... 5
ii
1. Purpose and Structure of this Document
The purpose of this document is to explain how to use the transaction /SCWM/IPU to upload
packaging specifications. This transaction reads a text file with data and creates the
packaging specifications accordingly. It turns out that the format is very technical and can be
difficult to handle. With this document, we try to remedy this problem by given a detailed
description of the input format and by providing a template to ease the manual entry of
data.
In the section The Structure of the Input File we explain how to format the input file, i.e. how
to structure the data for the new packaging specifications.
The following section How to Set Up the Input File shows how the attached template can help
to create the input file.
The last section Mapping of Fields to /SCWM/PACKSPEC establishes the connection between
the technical names used in the input file and the corresponding fields in the packaging
specification as shown in transaction /SCWM/PACKSPEC.
The input file needs to be a text file, which may contain multiple packaging specifications.
Each packaging specification is described by several differently structured lines, whose
structure is indicated by their first letter:
" " - records with "blank" in the first position are ignored
"*" - contains a comment that will be printed on the output
"H" - header data - structure /SCWM/S_PS_DL_HEADER
"C" - content data - structure /SCWM/S_PS_DL_CONTENT
"L" - level data - structure /SCWM/S_PS_DL_LEVEL
"E" - level element data - structure /SCWM/S_PS_DL_LEVEL_ELEMENT
"R" - condition record - structure /SCWM/S_PS_DL_CONDITION
An entry for a packaging specification needs to start with a header line followed by all the
other lines for this packaging specification.
The lines starting with H, C, L, E, and R contain the field values of the corresponding
structure written consecutively without any spaces. Transaction SE11 can be used to display
the fields of a structure. The field names in the structure are the technical names; in order to
know which field corresponds to which field of a packaging specification as displayed in
/SCWM/PACKSPEC, please consult the section Mapping of Fields to /SCWM/PACKSPEC.
All structures begin with the following key fields (included structure /SCWM/S_PS_DL_KEY):
DL_RECTYPE is the letter indicating what the line specifies (H,C,L,E,R,*,” “).
DL_PS_SEQ must contain a different, consecutive number for each packaging
specification in the file. All lines belonging to the first packaging specification in the
file should have DL_PS_SEQ equal to 1, all lines for the second should have PS_SEQ
equal to 2, etc.
DL_LEVEL_SEQ is only relevant for lines starting with L (levels) and E (elements), in all
other cases it is recommended to set it to 1. So the line for the first level should have
1, for the second level 2, for the third level 3. The lines for the elements of the first
level should all have 1, the lines for the elements of the second level 2 should all have
2, etc.
DL_REC_SEQ is only relevant for lines starting with C (content) or E (elements), in all
other cases it is recommended to set it to 1. Content lines are consecutively
numbered. For a given level, the elements have to be enumerated using this field.
Example: If level 5 has three different elements, then the first element should have
DL_REC_SEQ equal to 1, the second equal to 2 and the third equal to 3.
DL_FILLER serves only as a visual separator and can be left empty.
So the entry for a certain packaging specification might look like this (with only the keys
filled for now):
H 5 1 1
C 5 1 1
C 5 1 2
L 5 1 1
L 5 2 1
L 5 3 1
E 5 1 1
E 5 2 1
E 5 2 2
E 5 2 3
E 5 3 1
E 5 3 2
R 5 1 1
R 5 1 1
It is important to add the correct number of spaces if an entry is shorter than the
maximal length. In the above example, DL_PS_SEQ is a CHAR of length 8, however the
value “5” only occupies one character, so we need to add seven spaces on its left.
All entries have PS_SEQ = 5, so they all belong to the fifth packaging specification in the file.
There are two contents enumerated by DL_REC_SEQ and three levels enumerated by
DL_LEVEL_SEQ. There are six elements: the first has DL_LEVEL_SEQ = 1, so it belongs to level
1. The next three belong to level 2 and the last two to level 3. For each level, the elements
are ordered by DL_REC_SEQ. The condition records are not ordered.
So how does one fill the remaining fields? Let us illustrate this for the content line. We first
look up the structure /SCWM/S_PS_DL_CONTENT in SE11 and see that it has the following
fields:
MATID CHAR 22
MATNR CHAR 40
UNIT /SCWM/DE_UNIT UNIT 3
QUAN CHAR 31
MEINS MEINS UNIT 3
REFMIX /SCWM/DE_REFMIX CHAR 1
BATCHMIX /SCWM/DE_BATCHMIX CHAR 1
SUB_PS_ID /SCWM/DE_PSID CHAR 20
In order to make sense of the technical names, we first look at the section “Mapping of fields
to /SCWM/PACKSPEC” to identify the fields; this section also tell us that SUB_PS_ID should
not be filled and we only need to provide one of the two fields MATID/MATNR. Then we
complete the first content line with the correct data:
C 5 1 1 AAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBB…
As a basic rule, only fields that have non-initial values should be filled in the input file.
In particular, initial numerical fields like QUAN should be left empty; it is not
necessary to fill them with “0”.
This procedure needs to be repeated analogously for the other line types until the entry is
complete. If you enter the data manually, it is recommended to use the template as
described in the next section. Depending on the data format of the legacy packaging
specifications, it may be more convenient to automatize the creation of the input file.
3. How to Set Up the Input File
As another attachment to this note, you will find an example input file. If the input file is to
be set up manually, it is recommended to use the example entries as a template, because
they contain comments to structure the file and indicate the position of each field. Here is a
snippet from the file:
**************************************************************
* PROD-S01 (Small parts)
* This is an example packaging specification
* for a small product…
**************************************************************
PS_SEQ L REC_SEQ| PS_ID (…)
H 1 1 1 PROD-S01
PS_SEQ L REC_SEQ| MATID (…)
C 1 1 1 PROD-S01
PS_SEQ L REC_SEQ| D TRGQTY MINQTY RNDQTY| HUT (…)
L 1 1 1 1 900 2C1
L 1 2 1 2 900 4E1
PS_SEQ L REC_SEQ| MATID (…)
E 1 1 1 CARTON_S
E 1 2 1 EUROPALLET
PS_SEQ L REC_SEQ| KOTABNR KSC VALID_F VALID_T P (…)
R 1 1 1 SAPPAL010PAL201206012999123101
R 1 1 1 SAPWHTA10WHT201206012999123101
The entry contains a title comment to indicate that the following entries belong to the same
packaging specification and to give a brief description. Above each different line type a
comment line has been added to indicate the position of the fields. The field name is always
directly above the position of its value; the spaces for the value end exactly where the field
name ends. Short field names have sometimes been abbreviated due to lack of space and
one-character-fields have been commented with the pipe symbol “|”. For example, the
“level” lines have the following comments and structure:
The field DISPLAY_SEQ corresponds to the space AA, TRGQTY to the space BBBBBBBBBB,
etc. Using this commented structure should ease the manual entry of packaging
specifications and help you avoid off-by-one errors and the like.
4. Unsupported Fields
Certain fields are included in the line structures, but they cannot be set via the transaction
/SCWM/IPU. Since they have no effect anyway, it is recommended to always leave them
blank in the input files. These fields are:
/SCWM/S_PS_DL_HEADER
-CREATED_BY
-CREATED_AT
-CHANGED_BY
-CHANGED_AT
-ORIG_SYSTEM
/SCWM/S_PS_DL_CONTENT
- SUB_PS_ID
The purpose of this section is to provide a “dictionary” that lets you look up quickly which
fields in the packaging specification correspond to which technical names in the input file.
For example, if you want to set the field “Rounding Method” in the header, you can look at
the screen shots in the header section below to see that the corresponding technical name is
ROUNDING_GOAL.
To display a packaging specification, start transaction /SCWM/PACKSPEC. On the first screen,
select the packaging specification and double-click on the selected row to display the detail
view. The view consists of a tree structure on the left-hand side illustrating the hierarchical
structure of the packaging specifications. By clicking on the components in the tree structure
you can display the corresponding data in the right-hand screen.
In the following, we will illustrate how the data in the input file for /SCWM/IPU correspond
to the fields displayed in /SCWM/PACKSPEC.
/SCWM/S_PS_DL_HEADER
To display the header data, click on the number of the packaging specification in the tree
structure. The fields for which can be passed in the header line are spread over three
different tabs. The first one is the “Org. Data” tab.
It is important to note that even though the fields CREATED_BY, CREATED_AT,
CHANGED_BY, CHANGED_AT, and ORIG_SYSTEM are included in the structure, they cannot
be set via /SCWM/IPU. Since they have no effect, it is recommended that they should always
be left empty.
More header data is located on the tab „Rounding“.
The fields MATID and SUB_PS_ID are not displayed. For better transparency, either MATID
or MATNR should be used – not both. Setting SUB_PS_ID has no effect, so the field should
always be left empty.
/SCWM/S_PS_DL_LEVEL
The level structure is the most complex. Click on the level entry in the tree structure to
display the data. The fields are spread over several tabs, most of them on the tab “Weight,
Vol. & Dim.”.
Other fields are located on the tab “Warehouse”…
… as well as the tab “Rounding”...
… and finally the tab “Text”.
The field FILL_UP is only displayed in the tree structure entry of the level:
/SCWM/S_PS_DL_LEVEL_ELEMENT
The elements are situated below the levels in the tree structure and can also be found on
the tab “Assigned Elements” in the level display.
The field MATID is not displayed. For better transparency, either MATID or MATNR should be
used – not both.
/SCWM/S_PS_DL_CONDITION
The condition records are displayed in the header, under the tab “Determination”. The detail
view for a condition record looks as follows.
The structure contains dynamic fields FIELDNAME01 to FIELDNAME02 with their
corresponding VALUE01 to VALUE15. These fields depend on the configuration of the
condition. In our example file, the fields PAK_LOCNO and PAK_MATNR are used.