Professional Documents
Culture Documents
Changes History
0.1 N/A 24.05.2006 Copied from 3.1i specification for Project Sapphire
Authorisations
Functional Specification
Technical Specification
This document may contain text that has been struck through (e.g. this has been struck through).
This text no longer applies to the current document version but has been retained for information
purposes only.
Functional Specification
This functional specification describes the requirements for a download of delivery data to Excel,
which will provide details of what products and quantities and (if required) batches are being
shipped on each delivery.
The following selection criteria should be added to the selection screen (below Delivery Date):
Business wants to run this report for single deliveries and for a range.
In addition billing information can also be selected for inclusion on the downloaded report.
The following fields should be added to the report when selecting Billing details only or Batch
and billing details:
The following field should be added to the report when selecting Batch details only or Batch &
Billing details (last column):
As a requirement BRI needs the selection screen to be changed. In the section Document data
the description of the selection option Deliveries from needs to be changed to Delivery date .
1. Net Weight and Gross Weight. Please can this be extended to include a column that multiplies
the quantity by the net weight by line, and another column that multiplies the quantity by the
gross weight by line.
2. The material description on the report should use the following sequence:
b) if no CMIR exists, use the sales text (long description) from the material master
c) if no sales text exists, use the 40 character (short description) from the material master
The download will be run manually by the business users both in country users and centre
users will have access to run the download.
A user viewing the list can see whether a delivery has already been downloaded. The user can
also see who has downloaded the delivery with the person who carried out the most recent
download first being shown first.
2. Referencing procedures
None
3. Dependencies
None.
Selection Criteria
The following selection criteria will be required, all of which should have a search help available.
All selection criteria are optional unless otherwise specified and should be validated. If a to
value is not entered then from value will be the sole selection criteria.
Delivery date
Delivery number
The requested delivery date to, if entered, must be greater than the requested delivery date
from.
Only deliveries which have been post goods issued must be displayed on the report. The report
should either be ordered on Post Goods Issue date (most recent first) or by order number in
ascending order).
A screen print of the standard SAP delivery list report selection criteria is included for reference.
The new program selection screen should be similar to this.
If the entered selection criteria result in no deliveries being selected then a pop-up should be
displayed containing message number VR420. A screen print from the standard SAP Backorder
report is included for reference.
Output Data
Quantity
Order number
Item line
Delivery Number
Net Weight
Gross Weight
Commodity Code
Country of Origin
Basic Material
Any specific formatting for partner requirements will be done manually by the BRI country teams.
Key Figure
Description
Formula/Calculation
Partner item code (CMIR) Normally this would be retrieved from LIPS- KDMAT however this is
not filled in for stock transport orders so we will need to go to the master data table for customer
material information records (knmt) and look up the customers material (kdmat) with the the
sold-to customer LIKP-KUNAG for Sales orders and the sold-to customer held against the
receiving plant on the purchase order on the plant/branches table T001W for a STO .
Product description (can be CMIR description or material master description) First program will
search for the CMIR text, If it is available then It will be retrieved to print in the down loaded
report. If CMIR text is not available then Sales text is retrieved. If both the above texts are not
available then Material Description from MAKT table is retrieved and down loaded into report.
The sold-to customer LIKP-KUNAG for Sales orders and the sold-to customer held against the
receiving plant on the purchase order on the plant/branches table T001W for a STO.
Batch Manufacture Date Retrieve Maximum Storage Period MARC-MAXLZ and Unit of time for
max. storage period MARC-LZIEH.
If LZIEH is not in DAYS then convert MAXLZ to DAYS. If time unit is not in days, weeks, months
or years then enter Shelf Life Error.
If date is after the picking date then enter shelf life error else use the calculated date.
Billing No VBRK-VBELN
Billing Date VBRK-FKDAT
Invoice Price for a single. Read table A005 to get the KNUMH field using the material, customer,
sales org, distribution channel, pricing date and condition type = ZGSA .
Currency KONP-KONWA
Bar Code Number This Number is retrieved from Material Master (MARA-EAN11) on the basis of
LIPS-MATNR.
Net Weight This Value is retrieved from Material Master MARA-NTGEW) on the basis of LIPS-
MATNR.
Gross Weight This Value is retrieved from Material Master(MARA-BRGEW) on the basis of LIPS-
MATNR.
Material Freight Group This Value (MFRGR) retrieved from MARC table on the basis of the LIPS-
MATNR & LIPS-WERKS.
Commodity Code This Value (STAWN) retrieved from MARC table on the basis of the LIPS-
MATNR & LIPS-WERKS.
Country of Origin This Value (HERKL) retrieved from MARC table on the basis of the LIPS-
MATNR & LIPS-WERKS.
Total Gross Weight This value is determined by multiplying the Gross Weight with Quantity for
each line.
Total Net Weight This Value is determined by multiplying the Net Weight with the Quantity for
each line.
All deliveries for one ship to customer will be displayed on a delivery list organised (default) by
post goods issue date with most recent first. (as Vl05 deliveries list).
A user viewing the list can see whether a delivery has already been downloaded
The user can also see who has downloaded the delivery with the most recent user first.
Order number Delivery number Actual goods issue date Downloaded by Date downloaded UK
download time
When a user double clicks on a line this should take the user into transaction VL03 (display
delivery).
A button should be added at the top called download to Excel. If the user selects this the delivery
is downloaded to Excel.
Downloaded by -The name of the user should be displayed, however if this is blank then the user
id should be displayed.
Date downloaded - if a delivery has been downloaded more than once- the most recent
download should be displayed first i.e. the sort sequence within a delivery number should be on
the most recently downloaded date to the oldest downloaded date.
The whole report should be sorted on the actual goods issue date or the order number
depending on the selection made on the selection screen.
Order Number Delivery Number Delivery item number Boots material code Customer material
code Description Quantity Expected delivery date
Order Number Delivery Number Delivery item number Boots material code Customer material
code Description Quantity Expected delivery date Batch Expiry Date Manufacture Date
Purch Order No Customer Order Number Delivery Number Invoice No Invoice Date Delivery Item
Number Boots Material Code Customer Material Code Description Quantity Invoice Price Each
Invoice Line Value Invoice Currency Expected Delivery Date
Ref 5 4071 1559 80001935 90001335 01.11.2005 10 10-11-401 Sparkle Eye Shadow 102 10
1020 THB 01.01.2006
Ref 5 4071 1559 80001935 90001335 01.11.2005 20 10-11-402 Sparkle Eye Liner 108 0 0
01.01.2006
Purch Order No Customer Order Number Delivery Number Invoice No Invoice Date Delivery Item
Number Boots Material Code Customer Material Code Description Quantity Invoice Price Each
Invoice Line Value Invoice Currency Expected Delivery Date Batch Batch Expiry Date
Manufacture Date
Ref 5 4071 1559 80001935 90001335 01.11.2005 10 10-11-401 Sparkle Eye Shadow 102 10
1020 THB 01.01.2006 SGTEST 01.01.2010 Not Available
Ref 5 4071 1559 80001935 90001335 01.11.2005 20 10-11-402 Sparkle Eye Liner 108 0 0
01.01.2006 SGTEST 01.01.2010 Shelf Life Error
Barcode Number Net Weight Gross Weight Material Freight Group Commodity Code Country of
Origin Total Net Weight Total Gross Weight Batch material
The report will also be added to the report tree under Customer Services -> All SPC reports.
5. Data Volumes
None.
7. Technical details:
Added new selection field in the Selection screen - Delivery Number as selection option
Changed in the section Document data the description of the selection option Deliveries from
to Delivery date.
Technical Specification
1. Processing Flow
Select Deliveries
Upon execution the program sets PF-STATUS DLVLIST. It then will select all deliveries from the
delivery header table LIKP into internal table T_LIKP according to the selection criteria for
customer number (P_KUNNR), shipping point (P_VSTEL), delivery date (S_LFDAT) and which
have an actual post goods issue date (WADAT_IST is not equal to 0).
If deliveries have been found, the order number is retrieved by selecting VGBEL from LIPS for
each delivery in the table. This assumes that there are only ever items from one order on a
delivery.
The program then displays the list of deliveries. First internal table T_LIKP is sorted in the order
selected on the selection screen (P_GIDAT ).
The shipping point text VTEXT is read from the shipping point text table TVSTT.
The program then writes the customer, shipping point and date details.
The program then loops at table T_LIKP and writes out the delivery header details in the required
format. For each delivery download table Z194A is read to retrieve the download history. The
history is ordered by date and time in descending order and the user name retrieved from table
USR03. The download history is written to the report.
Fields VBELN, LFDAT and VKORG from internal table T_LIKP are hidden behind each line
written out for the current delivery.
Along with above fields Customer Number (T_LIKP-KUNNR) is also hidden each line written out
for the current delivery.
At line selection
When the user double clicks on a line transaction VL03 is executed skipping the first screen
passing in T_LIKP-VBELN in parameter id VL .
When the user selects the Download to Excel button (user command DLEX) a pop up message
is displayed prompting the user to confirm that the selected delivery should be downloaded to
Excel.
If the user has selected an option to include billing information a check is performed to see if the
delivery is waiting to be billed using table VKDFS. If the delivery has not been billed a pop up is
displayed to ask the user if the selected delivery should be downloaded to Excel.
If the user confirms the download the program reads delivery item table LIPS into internal table
T_LIPS for the selected delivery T_LIKP-VBELN.
The program then loops at internal table T_LIPS to process each line. First it checks for batch
splits. If batch details are not required
) and there is a reference number to a header item in T_LIPS-UECHA the line is deleted from
T_LIPS as it is a batch split line.
or P_BOTH selected
) and the quantity in T_LIPS-KCMENG is not zero the line is deleted from T_LIPS as it is a
header line.
If the line is retained, the program selects the customer material number KDMAT from customer
material info table KNMT.
The Sold-to customer LIKP-KUNAG retrieved for Sales orders and the Sold-to customer is
retrieved held against the receiving plant on the purchase order on the plant/branches table
T001W for a STO to determine the CMIR Text for the Material using the Function Module
READ_TEXT.
The program then checks whether there is a customer material text using function module
READ_TEXT. If text exists, the lines are concatenated and written to T_LIPS-ARKTX. If there is
no text, the description on the delivery is retained. Only the first 5 lines of text can be
downloaded to Excel.
In case of there is no Customer Material Text (CMIR) found by Using the FM READ_TEXT , then
again same function module used to retrieve the Sales Text. Here to determine the Sales Text
Material Number (T_LIPS-MATNR), Sales Organization (T_LIKP-VKORG) and Distribution
Channel (T_LIPS-VTWEG) to the function module. If Sales text is found then this sales text is
moved to T_LIPS-ARKTX.
If there is no Sales Text read from the above function module then Material Description (MAKTX)
is retrieved from the MAKT table later, which is passed to the T_LIPS-ARKTX.
If batch details are required the program selects the batch expiry date VFDAT from Batch table
MCH1 for the batch shown against the delivery line.
Select the maximum storage period MAXLZ and the unit of measurement LZEIH from MARC for
the MATNR and delivering plant.
If in weeks MAXLZ * 7.
If any other unit of measurement is read then set the Manufacture date to Shelf Life Error .
If MAXLZ is 0 then set the Manufacture date to Not Available else calculate the Manufacture
Date by subtracting the MAXLZ from the Date of Expiry VFDAT.
Check to see if the Manufacture date is prior to the Picking Date KODAT for the delivery. If yes,
output to the calculated date to Manufacture Date else set the Manufacture Date to Shelf Life
Error.
Select the customer purchase order number from VBAK using the order number T_LIPS-VGBEL.
If a record is present assign BSTNK to T_LIPS-BSTNK.
If the delivery has been billed extract all entries in VBRP to T_VBRP for the delivery item. Loop
through each of these entries and extract the SD document category VBRK-VBTYP. If the SD
document category is not a 5 or an M then delete the row from T_VBRP.
Sort the entries by the billing number in descending order. Read the first row in T_VBRP.
Select the billing header row from VBRK using the billing number in T_VBRP.
Move the sold-to Customer Number KUNAG, the billing date FKDAT and the billing number
VBELN from the header record to the corresponding fields in T_LIPS.
Select the Barcode Number (EAN11), Net Weight (NTGEW), and Gross Weight (BRGEW) into
working variables W_EAN11, W_NTGEW, W_BRGEW respectively from Material Master Table
MARA on the basis of the T_LIPS-MATNR.
From the above selected data Barcode Number is concatenated with Equal to (=) sign and with
Double Quotes sign ( ) to T_LIPS-EAN11o report along with leading zeroes. Remaining
Values would be moved internal table T_LIPS.
The additional columns for Total Gross Weight and Total Net Weight are determined by
multiplying the above retrieved Gross Weight and Net Weight by Quantity for each line.
Then these values are displayed in the down loaded excel report.
When Billing details choosed in the selection then corresponding Document Number & Item
Number details are selected from VBRP table. Then Price will be determined by Net Price
(NETWR) by Quantity (FKIMG). If Quantity is equal to Zero then Net price (NETWR) will be
moved to the Price.
After selecting the all above mentioned data Batch Number (T_LIPS-CHARG) is concatenated
with a Equal to (=) and Quotes ( ) to down load into the report along with leading Zeroes.
The program then sets the column names for the columns to be downloaded in internal table
T_FIELDNAMES.
When user selects both (Billing & Batch Details) or Billing Details then relevant column headers
appended to the internal table T_FIELDNAMES.
The file name is set to directory c:\temp and the delivery number T_LIKP-VBELN.
The delivery download table Z194A is updated with the details of the current download.
T_LIPS
T_LIPS_NO_BATCH_NO_BILL
T_LIPS_WITH_BILL
T_LIPS_WITH_BATCH
and the column table T_FIELDNAMES are then used to call the function
MS_EXCEL_OLE_STANDARD_DAT to export the data to Excel.
If billing data is being downloaded a form is called at the end to confirm the delivery has
completed.
2. Object Names
Name
Type
Description
ZOR43701
ABAP Program
Read
LIPS
Read
KNMT
Read
MCH1
Read
Batches
MARC
Read
USR03
Read
KNA1
Read
General Data in customer master
TVSTT
Read
VBRK
Read
VBRP
Read
A005
Read
Customer/Material
VKDFS
Read
VBAK
Read
Z194A
Bespoke Table
Read/Insert
ZO99
Transaction
None.
Output data
Source
Line value
T_LIPS-NETWR
T_LIPS-KBETR * T_LIPS-LFIMG
5. Field Groups
None.
5.1 Header:
Field Name
Description
5.2 Item:
Field Name
Description
6. Additional Features
The users can drill down to display the selected delivery by double clicking on the line. This will
execute transaction VL03 with the selected delivery number.
The users can select to download a delivery to Excel by selecting the Download to Excel button.
BACK, EXIT, PRINT etc. as for a standard SAP screen additional functions as below.
Func
Name
DLEX
Download to Excel
7.1.2 Pushbuttons
F-key
Func
Name
F5
DLEX
Download to Excel
F-key
Func
Name
F5
DLEX
Download to Excel
8. Appendices
8.1 Appendix A - Report Layout