‎2007 Aug 14 5:59 PM
Hi,
My internal table is like this
NAME FUND_NO MATNR SPART MVGR1 16_ACCTS 19_ACCTS 16AB_ACCTS 19AB_ACCTS 16ABC_ACCTS 19ABC_ACCTS
MERRILL LY 0
1 C939330106 A 1 234 51690
201 C939330205 B 1 11008 641
301 C939330304 C 1 4555 25920
401 C939330403 F 1 1873
2101 C939330874 R1 1 0
2201 C939330866 R2 1 0
2301 C939330858 R3 1 0
2401 C939330841 R4 1 0
2501 C939330833 R5 1 0
2 C023375108 A 2 100 16164
202 C023375207 B 2 3022 159
302 C023375306 C 2 2788 12004
402 C023375405 F 2 1208
2102 C023375876 R1 2 0
2202 C023375868 R2 2 0
2302 C023375850 R3 2 0
2402 C023375843 R4 2 0
2502 C023375835 R5 2 0
3 C027681105 A 3 44 7932
203 C027681204 B 3 1157 54
303 C027681303 C 3 1061 3427
403 C027681402 F 3 238
2103 C027681873 R1 3 0
2203 C027681865 R2 3 0
2303 C027681857 R3 3 0
2403 C027681840 R4 3 0
2503 C027681832 R5 3 0
I am finding a problem in placing value in 16abc_accts.
The scenario is like this
if fund+2(2) = 01 and spart is a or b or c or m2 and mvgr1 = 01 then i have to sum up the value beloging to abc and put it in 16abc_accts.
similarly
if fund+2(2) = 02 and spart is a or b or c or m2 and mvgr1 = 02 then i have to sum up the value beloging to abc and put it in 16abc_accts.
...
How can I do this.
Please help me.
Thanks,
Yamini.A
‎2007 Aug 14 6:08 PM
Hi Yamini,
What is the benefit of putting the value in same internal table?
Can you please elaborate about your requirement?
Regards,
Atish
‎2007 Aug 14 6:08 PM
You can split your Fund into three fields (first two as one field, second two as one field and the rest into another field).
Say fund 1 fund 2 and fund3
So now you can use control break statement at end of fund2.
and you can sum the values inside at end .. endat
The above will work if there is a change for NAME FUND1 and FUND2.
Else
Move FUND2 as the first field and do the at end...endat.
Warm Regards,
Baburaj
‎2007 Aug 14 6:34 PM
Atish,
My req is i have populate the same sort of value in other 3 or 4 fields and later i have to use the same for uploading data to a transaction.
I can send you out the excel sheet where i am populating this value.
Thanks
Yamini
‎2007 Aug 14 7:15 PM
HI,
loop at itab.
if itab-fund+2(2) = 01 and
itab-spart in ( 'a','b','c','m2' ) and itab-mvgr1 = 01.
itab-16abc_accts = itab-a + itab-b + itab-c.
modify itab index sy-tabix.
elseif itab-fund+2(2) = 02 and
itab-spart in ( 'a','b','c','m2' ) and itab-mvgr1 = 02.
itab-16abc_accts = itab-a + itab-b +
modify itab index sy-tabix.
endif.
endloop.
Thanks
Mahesh