se the table KEKO and KEPH, CKIS is Costing Itemization.
Pass Order in BSEG-AUFNR to get Accounting Document
Number(BSEG-BELNR),Fiscal Year(BSEG-GJAHR),D/C
Indicator(BSEG-SHKZG),Amount in LC(BSEG-DMBTR),GL
Account(BSEG-HKONT).Then Pass Accounting document Number
in BKPF-BELNR,Fiscal Year in BKPF-GJAHR to get Posting
Date(BKPF-BUDAT).The posting date should lie within the
Selection screen Date Range. Please add the Amount in
LC(BSEG-DMBTR) if D/C Indicator(BSEG-SHKZG)=S & subtract
the Amount in LC(BSEG-DMBTR) if D/C Indicator(BSEG-
SHKZG)=H GL Wise(RM,PM).Please compare the GL with the
table entry for displaying data. Take the RM & PM GL
account as per the table entry & calculate the value.
Derive Posting Period & Year from To date in selection
screen using Function Module DATE_TO_PERIOD_CONVERT &
GET_CURRENT_YEAR
Pass Material(KEKO-MATNR),Plant(KEKO-WERKS), Posting
Period(KEKO-POPER) & Fiscal Year (KEKO-BDATJ) to get
Product Costing Number(KEKO-KALNR),Costing Lot Size(KEKO-
LOSGR),Costing date Key(KEKO-KADKY).
Pass Product Costing Number in CKIS- KALNR & Costing date
Key in CKIS-KADKY to get GL Account(CKIS-KSTAR) & Total
Value(CKIS-WERTN).Take the Overhead GL account as per the
table entry & sum the value.Divide the value with costing
Lot size.
Pass Material document number concatenated with year in
BKPF- AWKEY to get Accounting document number (BKPF-
BELNR), Fiscal Year(BKPF-GJAHR).
Pass Accounting document number (BSEG-BELNR), Fiscal
Year(BSEG-GJAHR) to get D/C Indicator(BSEG-SHKZG),Amount
in LC(BSEG-DMBTR),GL Account(BSEG-HKONT). Please add the
Amount in LC(BSEG-DMBTR) if D/C Indicator(BSEG-SHKZG)=S &
subtract the Amount in LC(BSEG-DMBTR) if D/C
Indicator(BSEG-SHKZG)=H GL Wise(RM,PM).Please compare the
GL with the table entry for displaying data. Take the RM
& PM GL account as per the table entry & calculate the
value.
,Material Document(MSEG- MBLNR),Year(MSEG- MJAHR).