on 04-01-2011 7:06 AM
Hi Experts
We have developed Z report for asset having material code,vendor,CJ88 document.In old Z report we are not getting material & vendor which is relevant for CJ88 document.
So we have develop new Z report in which we are getting material but that value is not matching with AS03.What could be reason.
The Logic is as follows:
First get the field OBJNR from table COVP where field REFBN eq to Settlement Docs in to ITAB..
Then fetch the amount and other field from Table COVP where OBJNR eq ITAB-OBJNR and BLART NE u2018SAu2019 and KSTAR NE u20180000300010u2019.
Please check the actual function code to fetch the settlement doc details below:
FORM GET_SETTLEMENT_DOC .
btab[] = itab[].
sort btab by bwasl.
delete btab where bwasl ne '115'.
if not btab[] is initial.
select objnr
into corresponding fields of table dtab
from covp
for all entries in btab
where refbn eq btab-belnr.
sort dtab by objnr.
endif.
if not dtab[] is initial.
select belnr
wtgbtr
wkgbtr
gjahr
kstar
gkont
werks
matnr
ebeln
ebelp
bldat
budat
refbn
blart
awtyp
into corresponding fields of table ctab
from covp
for all entries in dtab
where objnr eq dtab-objnr
and blart ne 'SA'
and kstar ne '0000300010'.
endif.
if not ctab[] is initial.
sort itab by bwasl.
delete itab where bwasl eq '115'.
loop at ctab.
itab-ANLN1 = ' '.
itab-belnr = ctab-belnr.
itab-buzei = ctab-buzei.
itab-bzdat = ctab-bldat.
itab-bldat = ctab-bldat.
itab-budat = ctab-budat.
itab-gjahr = ctab-gjahr.
itab-bwasl = '115'.
itab-name1 = ''.
itab-AWTYP = ''. "Transaction Type
itab-matnr = ctab-matnr.
clear wmaktx.
select single maktx into wmaktx
from makt
where matnr eq ctab-matnr.
itab-maktx = wmaktx.
itab-name1 = ' '.
itab-dmbtr = 0.
itab-wrbtr = 0.
itab-anbtr = ctab-wkgbtr.
itab-anbtr = ctab-wtgbtr.
itab-butxt = ctab-butxt.
itab-ebeln = ctab-ebeln.
itab-ebelp = ctab-ebelp.
itab-kstar = ctab-kstar.
itab-blart = ctab-blart.
append itab.
endloop.
endif.
ENDFORM. " GET_SETTLEMENT_DOC
Is there any reports for settlement document having material & vendor code with description.
Regards
Nitin A
closing
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
6 | |
5 | |
5 | |
5 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.