‎2007 May 12 10:03 AM
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
‎2007 May 12 10:22 AM
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
‎2007 May 12 10:31 AM
hi
ya ur correct the field is WRBTR can u help me out,,,,please
‎2007 May 12 11:30 AM
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