Professional Documents
Culture Documents
Matching Delivery NB On Labe
Matching Delivery NB On Labe
25.11.2021
ENHC0055710
TF Matching delivery
nb on label DESADV
INVOICE
C1 Internal use
2
Contents
1. Business Requirement....................................................................4
2. Functional Design............................................................................5
2.1. Functional description of the requirement.............................................................................5
2.1.1. Idoc ZDESADV................................................................................................................ 6
2.1.2. Idoc DESADV.................................................................................................................. 8
2.2. Transaction / program......................................................................................................... 10
2.2.1. Production system (If it is necessary to reproduce the error)........................................10
2.2.2. Quality system (If it is necessary to reproduce the error)..............................................10
2.2.3. Development system (Unit test)....................................................................................10
2.3. Operative (Description of the process, steps to follow for unit testing and / or to reproduce
the error)............................................................................................................................. 10
3. Technical Design...........................................................................10
3.1. Objects of the dictionary..................................................................................................... 11
3.2. Program Input..................................................................................................................... 11
3.2.1. Input files....................................................................................................................... 11
3.2.2. Selection screen............................................................................................................ 11
3.3. Program Output.................................................................................................................. 11
3.3.1. Output files.................................................................................................................... 11
3.3.2. ALVs.............................................................................................................................. 11
3.3.3. Data retrieval................................................................................................................. 11
3.3.4. Output smartforms/sapscripts…....................................................................................11
3.4. Dynpros.............................................................................................................................. 11
3.5. Status/Titles….................................................................................................................... 11
3.6. Technical description of the solution...................................................................................11
3.7. Messages........................................................................................................................... 11
3.8. Modifications log................................................................................................................. 11
C1 Internal use
3
Title of GAP:
TF Matching delivery nb on label
DESADV INVOICE
Division concerned: all
HUB/ Country : DACH
SAP Instance P70
Number of Service Now : ENHC0055710
Version : 1.0
Made by : Date : José Palomero
Validated by : Date :
Reviewed by : Date : Modification :
Date : Modification :
Date : Modification :
C1 Internal use
4
1. Business Requirement
- Our clients are using the information from the box label to do their inbound and
distribution processes
- The information about the delivery number (from P70 as this is the number in the
DESADV + delivery note) is key to identify which goods are inside the box and which
order number the box is belonging to
- Especially for crossdocking clients its key to have this information on the box as the CD
warehouse is only forwarding the goods and not opening the boxes
- By now there is only the following number mentioned on the box label – e.g.
5100003418 - and this number is not known by our clients.
C1 Internal use
5
2. Functional Design
In order to work smart, and sync resources I would like to have your agreement to deploy the same
solution in all 3 HUBS.
Delivery
HUB Output type IDOC HUB Validation
number
4011278720
BNL ZD01
YORT Delivery (40*) è Sales order è Purchase order è Inbound delivery (in the inbound delivery we
have P48 Delivery number 006*) è SAP Table LIKP with go 006* to get the 51*
This logic should be implemented when DESADV is being generated so that we replace this value:
C1 Internal use
6
Check by table ZEDI_EXIT3 that this change only will apply to the following Sales Organizations, field
VKORG: SO01, SO02, SO03
The goal is to modify the current value of field VBELN, segment E1EDL20, message type ZDESAD:
C1 Internal use
7
C1 Internal use
8
2. Get PO number
Go to table VBFA and get VBFA-VBELN where VBFA-VBELV = Sales order and VBFA-VBTYP_N
=V
Only when a value is found in LIKP-VBELN on point 4 and the sales organization is one of those
indicated in the list the field E1EDL20-VBELN will be modified with this last LIKP-VBELN.
C1 Internal use
9
Use the appropriate USER-EXIT to update the value of E1EDK07-VBELN in the same way as field
E1EDL20-VBELN in the previous point. I found this one:
In this case the sales organizations to be checked are different, they are also necessary to be checked
by table ZEDI_EXIT3 or ZNEALLHARDCODE (not sure if in this process it is recommended to use
ZEDI_EXIT3 or not): D300, N300, S300, F300,B300, H300
C1 Internal use
10
2. Get PO number
Go to table VBFA and get VBFA-VBELN where VBFA-VBELV = Sales order and VBFA-VBTYP_N
=V
Check by table ZEDI_EXIT3 that this change only will apply to the following Sales Organizations, field
VKORG: SO01, SO02, SO03, D300, N300, S300, F300, B300, H300
The goal is to modify the current value of field BELNR, segment E1EDK02, message type ZINVOIC:
C1 Internal use
11
And also, the value of field BELNR of segment E1EDK02 and QUALF = 063 - 20/01/2022
C1 Internal use
12
2. Get PO number
Go to table VBFA and get VBFA-VBELN where VBFA-VBELV = Sales order and VBFA-VBTYP_N
=V
The output type related to this Idoc is ZR00, there are some examples for Q70 in the last
sheet of the Excel attached.
C1 Internal use
13
P70
Q70:
D70
3. Technical Design
Package ZALL_SD
Class :
C1 Internal use
14
ZCL_EX_ZY_ZXEDFU02_L_NE_04
ZCL_EX_Z_YZ_UE_E1EDK07_NE_01
ZCL_EX_Z_ZXTRKU02_L_NE_08
Application
Module SD
Transaction
20/01/2022
Package ZALL_SD
Application
Module SD
Transaction
C1 Internal use
15
3.3.2. ALVs
3.4. Dynpros
3.5. Status/Titles…
C1 Internal use
16
IMPORTING:
PI_ST_VBELN -> vbeln is key field to get the data from table.
CHANGING:
Get Delivery number-> LIKPS
* Treat the Idoc content.
Loop the table Idoc (PIO_IDOC_DATA) only for the segname (SEGNAME) for each record
Get sales order number -> Go to table VBFA and get VBFA-VBELV where VBFA- VBELN =
Delivery number (LIKP-VBELN) and VBFA-VBTYP_V =C
Get PO number -> Go to table VBFA and get VBFA-VBELN where VBFA-VBELV = Sales order
and VBFA-VBTYP_N =V
Get reference from inbound delivery -> Go table EKES and get EKES- XBLNR WHERE
EKES-EBELN = PO NUMBER
Get Delivery number -> Go to to table LIKP where LIKP-LFART= YLOI AND LIKP-VKORG =
SO04 and LIKP-LIFEX = reference from inbound delivery and get VBELN
Only when a value is found in LIKP-VBELN on point 4 -> with this last LIKP-VBELN. -> change
PIO_IDOC_DATA.
* Change the field VBELN.-> CALL FUNCTION 'Z_NE_SD_MODIF_VBELN'
ZCL_EX_ZY_ZXEDFU02_L_NE_04
ZCL_EX_Z_YZ_UE_E1EDK07_NE_01
ZCL_EX_Z_ZXTRKU02_L_NE_08
3.7. Messages
C1 Internal use
17
To create the Idoc it is only necessary to launch the output message informed by transaction VL71:
The Delivery number and the Output type are in the first sheet in the Excel file VL71.
C1 Internal use
18
ABAP-TEAM 14/12/2021
ZCL_EX_ZY_ZXEDFU02_L_NE_04 :
VF31
ZCL_EX_Z_YZ_UE_E1EDK07_NE_01:
VL71 - DESADV
C1 Internal use
19
ZCL_EX_Z_ZXTRKU02_L_NE_08: - ZDESAD
VL71
C1 Internal use
20
C1 Internal use