2008 May 28 7:47 PM
hi gurus,
i have problem in my codes that one field is fiscper but in bseg and nkpf it is fiscal year but i used already in my code the another fisper is used in programm
as fiscper type bseg-gjahr,
but it shows that no one field like fisper in table
then tell me how can i declare it in my programm that i fetch data according to this field.
my code is
SELECT bukrs belnr gjahr fiscper buzei augdt shkzg
dmbtr kostl hkont matnr werks
INTO TABLE i_bseg
FROM bseg
FOR ALL ENTRIES IN i_bkpf
WHERE bukrs EQ i_bkpf-bukrs
AND belnr EQ i_bkpf-belnr
AND gjahr EQ i_bkpf-gjahr.
ENDIF.
plz help me its urgent.
thanks jayant.
hi gurus,
i have problem in my codes that one field is fiscper but in bseg and nkpf it is fiscal year but i used already in my code the another fisper is used in programm
as fiscper type bseg-gjahr,
but it shows that no one field like fisper in table
then tell me how can i declare it in my programm that i fetch data according to this field.
my code is
SELECT bukrs belnr gjahr fiscper buzei augdt shkzg
dmbtr kostl hkont matnr werks
INTO TABLE i_bseg
FROM bseg
FOR ALL ENTRIES IN i_bkpf
WHERE bukrs EQ i_bkpf-bukrs
AND belnr EQ i_bkpf-belnr
AND gjahr EQ i_bkpf-gjahr.
ENDIF.
plz help me its urgent.
thanks jayant.
2008 May 28 7:54 PM
I don't think I understood your question completely. But if you want to retrieve Fiscal Year into field FISCPER then check the below code.
SELECT bukrs
belnr
gjahr as fiscper
buzei
augdt
shkzg
dmbtr
kostl
hkont
matnr
werks
INTO TABLE i_bseg
FROM bseg
FOR ALL ENTRIES IN i_bkpf
WHERE bukrs EQ i_bkpf-bukrs
AND belnr EQ i_bkpf-belnr
AND gjahr EQ i_bkpf-gjahr.Hope this is helpful.
Thanks,
Pavan
2008 May 29 4:56 AM
Hi,
U can code likewise---
SELECT bukrs belnr gjahr buzei augdt shkzg dmbtr kostl
hkont matnr werks
INTO TABLE i_bseg FROM bseg
FOR ALL ENTRIES IN i_bkpf
WHERE bukrs EQ i_bkpf-bukrs
AND belnr EQ i_bkpf-belnr
AND gjahr EQ i_bkpf-gjahr.
As already in BSEG ans BKPF table GJAHR(Fiscal year) is defined as a key field. And also define this GJAHR field in both the internal tables I_BKPF & I_BSEG.
Reward if helpful,
Thanks