Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

for all entries join

Former Member
0 Likes
438

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.

2 REPLIES 2
Read only

Former Member
0 Likes
421

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

Read only

Former Member
0 Likes
421

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