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: 

Calulation on GLT0

Former Member
0 Kudos

I have fiscal year in parameter

and fiscal period in select option with no extension

i want the sum the amount according to the fiscal year(Input parameter) and the fiscal period in select options

say for example fiscal year (2009)

fiscal period (5-9)

looking forward for your answers

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Mohan,

What is GLTO?,,, I remember once I updated some OSS notes, I seen that name and added some lines there,,

I hope its a global data declaration... Please clear me what's your requirement.

Any way As far as I understand, this is an example what you are looking for.

Goto table GLPCP & look for fields,,,, RYEAR & RPMAX (Fiscal year & Period) HSL01-HSL12,- Value Amount.

Now lets say your input is 2009 & period is 5-9, Then you ned to sum the values from HSL05-HSL09...

Hope this example solves your problem.. if not revert back me.

Thanks & regards,

Dileep .C

2 REPLIES 2

Former Member
0 Kudos

Hi Mohan,

What is GLTO?,,, I remember once I updated some OSS notes, I seen that name and added some lines there,,

I hope its a global data declaration... Please clear me what's your requirement.

Any way As far as I understand, this is an example what you are looking for.

Goto table GLPCP & look for fields,,,, RYEAR & RPMAX (Fiscal year & Period) HSL01-HSL12,- Value Amount.

Now lets say your input is 2009 & period is 5-9, Then you ned to sum the values from HSL05-HSL09...

Hope this example solves your problem.. if not revert back me.

Thanks & regards,

Dileep .C

Former Member
0 Kudos

The code below should be what you want.

PARAMETERS: prpmax LIKE GLT0-RPMAX.

DATA: GLT0VARY LIKE GLT0-TSL01.

SUMME = SUMME + GLT0-TSLVT.

DO prpmax TIMES VARYING GLT0VARY FROM GLT0-TSL01 NEXT GLT0-TSL02.

SUMME = SUMME + GLT0VARY.

ENDDO.