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

Add in SCRIPTS

Former Member
0 Likes
464

hi all

i hav a script in which i hav a fiels called &BSEG_HKONT& and this value goes through different ELEMENTS (/E) and in each ELEMENT it has different IF conditions.What i need is i need the TOTAL of &BSEG_HKONT& at the end of the script and also i should take the value only if the IF condition is passed.Like i want only the total of the values that are picked....

with regards

vijay

3 REPLIES 3
Read only

Former Member
0 Likes
435

Hi

I think you are wrong

Do you need the total(sum) of all BSEG-HKONT field?

This field is the GL account number! you can't sum up these fields?

May be you need to sum up the totals of all amount fields (DMBTR or WRBTR)

for all these HKONT's .

So in the loop pass of the internal table you have to sum up all these amount fields.

Reward points if useful

Regards

Anji

Read only

0 Likes
435

hi

ya ur correct the field is WRBTR can u help me out,,,,please

Read only

0 Likes
435

Hi

Are you using the custom script/and program for your purpose

or using the Std script and program

if you are using Std script/program, I am sure that the totals of this field will be calculated and used , try to take that field from the program.

If it is our own program, in the program itself we have capture the Sum of all the amount fields based on consition and have to use that field in the script.

becasue in script we can't write the code

just check the other fields also in the script, may be one of the field is used for this sum.

or define a field for sum

/: DEFINE &SUM& TYPE NETWR and write in the loop

/ &SUM& = &SUM& + &BSEG-WRBTR&

and use this SUM field

Reward points if useful

Regards

Anji