Application Development 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: 

ALV Report to check upto current fiscal year

Former Member
0 Kudos
111

Hi All,

I am running a reoprt. its output is in this way.

Division Fiscal year Net Price.

Chemical 2006 3456456

2007 5456436

2008 45345

2009 4545

2010 45456

Over Due

Due

0 to 30 days

and so on

Now My problem here is I have this secctionof cede it should increase my fiscal year, But I checked it in the run time its not stopping at the S-fkdat-high, ( I mean in the current fiscal year.). Here also I am posting the section of code.

Can any body identitfy where my code is wrong, and why its not stopping at the currennt fiscall year.

S_FKDAT = S_FKDAT-LOW+0(04).

APPEND S_FKDAT.

DO.

IF NOT S_FKDAT IS INITIAL.

S_FKDAT = S_FKDAT + 1.

APPEND S_FKDAT.

CHECK

S_FKDAT = S_FKDAT-HIGH+0(04).

STOP.

APPEND S_FKDAT.

ENDIF.

ENDDO.

Thanks in Advance

Edited by: Ravi Narayan Padhi on Oct 14, 2010 3:09 PM

2 REPLIES 2

Former Member
0 Kudos
47

HI,

iam not getting wat ur try to do here in this logic can u elaborate the logic

As per my understanding ur requirement logic should be -->

if not S_FKDAT[] IS INITIAL.

read table S_FKDAT index 1.

while S_FKDAT-low ne sy-datum+0(4).

S_FKDAT-option = 'I'

S_FKDAT-sign = 'EQ'

S_FKDAT-low = S_FKDAT-low + 1

APPEND S_FKDAT.

endwhile.

endif.

Regards,

Madhukar Shetty

0 Kudos
47

Hi,

I have done in this way now its working.

WHILE ( S_GJAHR-LOW LE S_GJAHR-HIGH ).

WA_ITAB-GJAHR = S_GJAHR-LOW.

S_GJAHR-LOW = S_GJAHR-LOW + 1.

APPEND WA_ITAB to it_ITAB.

CLEAR WA_ITAB.

ENDWHILE.