You are on page 1of 2

ECC 6.

0
Exercises: SAPScript SAP Development ABAP Training

1. Create a SAP Script print program and Layout Set to print an invoice. A sample invoice and the
data mapping for the fields are given below. Develop a print program with a selection-screen
having the field Invoice number (VBRK-VBELN). Once the user enters the invoice number on
the selection screen and executes, the SAP Script should be printed for the invoice.

Sample invoice:

Date: 01/08/2003
Invoice Print

Invoice number: 1234567


Printed by: Sidhartha Shankar

Itm no. Material Num Billed Qty UoM Unit Price Amount
10 987654 5 PC 10.00 50.00
20 876543 2 PC 50.00 100.00
30 765432 20 PC 5.00 100.00

IBM confidential Page 1 of 3


This is a sample invoice for the IBM training session and is not valid for external use

Data Mapping:

Dec-2008
Page 1
ECC 6.0
Exercises: SAPScript SAP Development ABAP Training

Print item Extraction logic


IBM logo Upload the bitmap IBM logo as a GRAPHICS object and
display it on the top left corner
Date Print the label and current date on the top right hand corner
‘Invoice print’ Hard coded text
Invoice number Field VBRK-VBELN (Value should be extracted in print
program)
Printed by The user name (SY-UNAME) should be printed against the
label
Item no. The invoice item level details should be extracted in print
program and printed in the given format. The Item no. is the
field VBRP-POSNR
Material Num The Material number of the Billing item can be got from the
field VBRP-MATNR
Billed qty Billing Item level field VBRP-FKIMG
UoM Unit of Measure of Billed Qty – field VBRP-VRKME
Unit price Calculate this field as Unit price = Amount/Billed Qty
Amount Billing Item level field VBRP-NETWR
IBM Confidential Hard coded text at the footer
Page Print the page number as Page X of Y
X – SAP Script symbol &PAGE&
Y – Symbol &SAPSCRIPT-FORMPAGES&
Footer text ‘This is….’ Hard coded text to be printed immediately below ‘IBM
Confidential’

Dec-2008
Page 2

You might also like