Sunteți pe pagina 1din 6

*&---------------------------------------------------------------------* *& Report Z327_ITAB_PROGRAM6 *& *&---------------------------------------------------------------------* *& *& *&---------------------------------------------------------------------*

REPORT Z327_ITAB_PROGRAM6. tables rseg."Document Item: Incoming Invoice"

**************declaring the range of values************

select-options:s_belnr for rseg-belnr.

*************declaring structures******************

types:begin of ty_rseg, belnr type rseg-belnr, bwkey type rseg-bwkey, bwtar type rseg-bwtar, wrbtr type rseg-wrbtr, shkzg type rseg-shkzg, mwskz type rseg-mwskz, txjcd type rseg-txjcd, menge type rseg-menge,

bstme type rseg-bstme, bpmng type rseg-bpmng, bprme type rseg-bprme, lbkum type rseg-lbkum, knttp type rseg-knttp, bklas type rseg-bklas, erekz type rseg-erekz, spgrp type rseg-spgrp, spgrm type rseg-spgrm, spgrt type rseg-spgrt, spgrg type rseg-spgrg, spgrv type rseg-spgrv, spgrq type rseg-spgrq, spgrs type rseg-spgrs, spgrc type rseg-spgrc, end of ty_rseg.

"declaring itab.

data:it_rseg type standard table of ty_rseg, wa_rseg type ty_rseg.

"fetching logic.

select belnr bwkey

bwtar wrbtr shkzg mwskz txjcd menge bstme bpmng bprme lbkum knttp bklas erekz spgrp spgrm spgrt spgrg spgrv spgrq spgrs spgrc from rseg into table it_rseg where belnr in s_belnr.

"**********read values in itab**********" write: /10 'accounting document number',

20 'valuation area', 30 'valuation type', 40 'amount in document currency', 45 'debit/credit indicator', 50 'sales tax code', 60 'tax jurisdiction', 70 'quantity', 80 'purchase order unit of measure', 90 'quantity in purchase order price unit', 100 'order price unit', 110 'total valuated stock', 120 'account assignment category', 130 'valuation class', 140 'final invoice indicator', 150 'blocking reason:price', 160 'blocking reason:quantity', 170 'blocking reason:date', 180 'blocking reason:order price quantity', 190 'blocking reason:project budget', 200 'manual blocking reason', 210 'blocking reason:item amount', 220 'block reason:quality'.

"***********reading itab************" loop at it_rseg into wa_rseg.

"*************writing logic**********" write: /10 wa_rseg-belnr, 20 wa_rseg-bwkey, 30 wa_rseg-bwtar, 40 wa_rseg-wrbtr, 45 wa_rseg-shkzg, 50 wa_rseg-mwskz, 60 wa_rseg-txjcd, 70 wa_rseg-menge, 80 wa_rseg-bstme, 90 wa_rseg-bpmng, 100 wa_rseg-bprme, 110 wa_rseg-lbkum, 120 wa_rseg-knttp, 130 wa_rseg-bklas, 140 wa_rseg-erekz, 150 wa_rseg-spgrp, 160 wa_rseg-spgrm, 170 wa_rseg-spgrt, 180 wa_rseg-spgrg, 190 wa_rseg-spgrv, 200 wa_rseg-spgrq, 210 wa_rseg-spgrs, 220 wa_rseg-spgrc.

endloop.

S-ar putea să vă placă și