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: 

Claculating Opening balance...Urgent...plz..

Former Member
0 Kudos

Hi all,

hi friends, how to calculate the Opening balance from till the given date ( low_date) that is one date before we given date ,(based on month and year) from GLT0 table.

here in this table there are 16 fields to calculate the total (i.e field from TSLVT,TSL01,TSL02,....TSL16).

in my selection-screen ill give GL a/c no , Comp code and Posting date then Radio button . if i select radio but, based on the above 3 fields i have to calculate the Opening bal from GLT0 table..

so how to procede this, plz could anyone help me with logic..

Thanks in advance..

Regards,

sudharsan.

1 REPLY 1

Former Member
0 Kudos

Hello Sudharsan,

First take two internal table

data : i_GLT0 like GLT0 occurs 0 with header line.

data : begin of i_output occurs 0,

here take whatever fields you need output,

total like GLT0-TSLVT,

end of i_output.

start-of-selection.

select * from GLT0 into table i_GLT0

where = 'Keep all selection-screen fields'.

loop at i_glto.

i_output-total = i_glto-TSLVT + i_glto-TSL01 + i_gltoTSL02 + add all curr fields.

move required fields to i_output.

append i_output.

endloop.

You can use i_output for display or further processing.

Thanks

Seshu