Posted: Thu Oct 11, 2007 11:12 pm Post subject: Delivery details report
Code:
*Report program for delivery details*
*Tables used: lips,
* likp,
* kna1.
REPORT zsr_delivery_dtls NO STANDARD PAGE HEADING
MESSAGE-ID zivltcsr
LINE-SIZE 200 LINE-COUNT 35(3).
*Data declaration*
TABLES:likp,
lips.
TYPES: BEGIN OF st_del,
name1 TYPE kna1-name1, "Customer name1
docno TYPE lips-vgbel, "Document number
itmno TYPE lips-vgpos, "Item number
matxt TYPE lips-mtart, "Material text
name2 TYPE kna1-name2, "Customer name2
salor TYPE likp-vkorg, "Sales organization
qnty TYPE lips-ntgew, "Quantity
unit TYPE lips-gewei, "Unit
plant TYPE lips-werks, "Plant
inct1 TYPE likp-inco1, "Incoterms1
inct2 TYPE likp-inco2, "incoterms2
END OF st_del.
DATA:wa_del TYPE st_del,
wa_log TYPE zsr_del_login,
it_del TYPE TABLE OF st_del,
sysubrc TYPE sy-subrc.
*Selection screen for interactive input*
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS:so_date FOR likp-lfdat, "Delivery date
so_shppt FOR likp-vstel, "Shipping point
so_matnr FOR lips-matnr. "Material number
SELECTION-SCREEN END OF BLOCK b1.
IF sysubrc NE 0. "Error message display if no match found
MESSAGE i000.
ELSE. "Display logic if match occured with input
*Sorting internal table by name*
SORT it_del BY name1.
*Displayig data from internal table*
LOOP AT it_del INTO wa_del.
WRITE:/ wa_del-docno UNDER text-002, "Document number
wa_del-itmno UNDER text-003, "Item number
wa_del-matxt UNDER text-004, "Material text
wa_del-name1 UNDER text-005, "Customer name1
wa_del-name2 UNDER text-006, "Customer name2
wa_del-salor UNDER text-007, "Sales organization
wa_del-qnty UNDER text-008 LEFT-JUSTIFIED UNIT wa_del-unit , "Quantity
wa_del-unit UNDER text-009, "Unit
wa_del-plant UNDER text-010, "Plant
wa_del-inct1 UNDER text-011, "Incoterms1
wa_del-inct2 UNDER text-012. "incoterms2
AT END OF name1. "Calculating total quantity for each customer
SUM.
SKIP.
WRITE: 'Total quantity = ',wa_del-qnty LEFT-JUSTIFIED UNIT wa_del-unit.
WRITE: wa_del-unit.
SKIP.
ENDAT.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.