Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 20

Specifications

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

4. Needed Data for Unit Test.............................................................11

C1 Internal use IT Global / Security

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 IT Global / Security

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 IT Global / Security

C1 Internal use
5

2. Functional Design

2.1. Functional description of the requirement

 Customer delivery number: 40* è In DESADV


 MGB delivery number: 51*  è In labels / documents

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

DNSF ZD02 4011185551 2170544327

DACH ZLVA 4011048158 2169002844

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 IT Global / Security

C1 Internal use
6

2.1.1. Idoc ZDESAD

Function module EXIT_SAPLV56K_002


INCLUDE ZXTRKU02 => Y_ZXTRKU02_L => Z_ZXTRKU02_L (Local development). 

Check by table ZEDI_EXIT3 that this change only will apply to the following Sales Organizations, field
VKORG: SO01, SO02, SO03

HUB Output Type SALES ORG.

DACH ZLVA SO01, SO02, SO03

The goal is to modify the current value of field VBELN, segment E1EDL20, message type ZDESAD:

C1 Internal use IT Global / Security

C1 Internal use
7

C1 Internal use IT Global / Security

C1 Internal use
8

This is the sequence to find the value to be informed:

1. Get sales order number


Go to table VBFA and get VBFA-VBELV where VBFA- VBELN = Delivery number (LIKP-VBELN)
and VBFA-VBTYP_V =C

2. Get PO number
Go to table VBFA and get VBFA-VBELN where VBFA-VBELV = Sales order and VBFA-VBTYP_N
=V

3. Get reference from inbound delivery


Go table EKES and get EKES- XBLNR WHERE EKES-EBELN = PO NUMBER

4. 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 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 IT Global / Security

C1 Internal use
9

2.1.2. Idoc DESADV

Function module IDOC_OUTPUT_DESADV01

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

HUB Output Type SALES ORG.

DNSF ZD02 D300, N300, S300, F300

BNL ZD01 B300, H300

C1 Internal use IT Global / Security

C1 Internal use
10

The sequence is also the same as the previous point:

1. Get sales order number


Go to table VBFA and get VBFA-VBELV where VBFA- VBELN = Delivery number (LIKP-VBELN)
and VBFA-VBTYP_V =C

2. Get PO number
Go to table VBFA and get VBFA-VBELN where VBFA-VBELV = Sales order and VBFA-VBTYP_N
=V

3. Get reference from inbound delivery


Go table EKES and get EKES- XBLNR WHERE EKES-EBELN = PO NUMBER

4. 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

2.1.3. Idoc INVOIC

Function module EXIT_SAPLVEDF_002


INCLUDE  ZXEDFU02 => ZY_ZXEDFU02_L_NE (Local development). 

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

HUB Output Type SALES ORG.

DACH ZLVA SO01, SO02, SO03

DNSF ZD02 D300, N300, S300, F300

BNL ZD01 B300, H300

The goal is to modify the current value of field BELNR, segment E1EDK02, message type ZINVOIC:

C1 Internal use IT Global / Security

C1 Internal use
11

And also, the value of field BELNR of segment E1EDK02 and QUALF = 063 - 20/01/2022

The sequence is also the same as the previous point:

1. Get sales order number


Go to table VBFA and get VBFA-VBELV where VBFA- VBELN = Delivery number (LIKP-VBELN)
and VBFA-VBTYP_V =C

C1 Internal use IT Global / Security

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

3. Get reference from inbound delivery


Go table EKES and get EKES- XBLNR WHERE EKES-EBELN = PO NUMBER

4. 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

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 IT Global / Security

C1 Internal use
13

2.2. Transaction / program

Test data set

2.2.1. Production system (If it is necessary to reproduce the error)

P70

2.2.2. Quality system (If it is necessary to reproduce the error)

Q70:

2.2.3. Development system (Unit test)

D70

2.3. Operative (Description of the process, steps to follow for unit


testing and / or to reproduce the error)

3. Technical Design

Package ZALL_SD

Transport Order D70K963106 D70 050 SYST

D70K963108 D70 050 CUST

D70K963199 D70 050 SYST

D70K963207 D70 050 SYST

D70K963223 D70 050 SYST

D70K963308 D70 050 CUST

D70K963318 D70 050 SYST

Technical name of the program Function Z_NE_SD_MODIF_VBELN

Class :

C1 Internal use IT Global / Security

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

Short description Change one field in the idoc.

Type Function / Class

Application

Module SD

Transaction

20/01/2022

Package ZALL_SD

Transport Order D70K963951 D70 050 SYST

D70K963953 D70 050 CUST

Technical name of the program ZCL_EX_ZY_ZXEDFU02_L_NE_04

Short description Add new filter for field Qualf.

Type Function / Class

Application

Module SD

Transaction

C1 Internal use IT Global / Security

C1 Internal use
15

3.1. Objects of the dictionary

3.2. Program Input


3.2.1. Input files

3.2.2. Selection screen

3.3. Program Output


3.3.1. Output files

3.3.2. ALVs

3.3.3. Data retrieval

3.3.4. Output smartforms/sapscripts…

3.4. Dynpros

3.5. Status/Titles…

3.6. Technical description of the solution

C1 Internal use IT Global / Security

C1 Internal use
16

CREATE NEW -> Function Z_NE_SD_MODIF_VBELN

IMPORTING:

PI_ST_VBELN -> vbeln is key field to get the data from table.

PI_GC_SEGNAME-> the segment name you want to modify.

PI_NAME_FIELD_> the field name you want to modify

CHANGING:

PIO_IDOC_DATA- > The data of idoc, that you want to modify.

* Get data in table working:

Get sales order number ->VBFA with VBELN

Get PO number ->VBFA with VBELV

Get reference from inbound delivery -> EKES

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.

CREATE NEW CLASS->

*   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 IT Global / Security

C1 Internal use
17

3.8. Modifications log

4. Needed Data for Unit Test


In the following Excel there are some examples in Q70 when you can easily follow this sequence since
sheet VL71 to sheet 4.LIKP. Ask ITBA if you have any question:

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 IT Global / Security

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 IT Global / Security

C1 Internal use
19

ZCL_EX_Z_ZXTRKU02_L_NE_08: - ZDESAD

VL71

C1 Internal use IT Global / Security

C1 Internal use
20

C1 Internal use IT Global / Security

C1 Internal use

You might also like