2009 Apr 16 4:22 AM
Hi ALL ,
i am making table control with wizard , in table control i have fileds (sno type i , matnr type matnr , menge type menge) in this when i got rpeated matnr then i shoild be collect menge and it is collecting bt int this i dont wabt to collect serial number , i want constant value of serial number and when matnr change then serial number should be increament by 1 .
example
1 mat1 12
when i get again mat1 qty 10 it should be
1 mat1 22
bt is not happing it is collect also sno by 1 and i m getting
2 mat 22
plz provide me solution
regards
Bhavesh
2009 Apr 16 4:39 AM
Dear Bhavesh ,
c when u pass your internal table data to a table control that time u do this modification in the internal table itself will solve your problem.
Loop at itab .
at matnr .
" inbetween you assign serial number .
endat
endloop .
rgds ankit
2009 Apr 16 4:45 AM
Hi Ankit ,
I do it bt it is also club its value becoz i want to collect menge so it is club both menge and sno
2009 Apr 16 4:44 AM
just try: in addition to the above reply, pls correct data type too,
sno type i---> change to sno type C
thanq
Edited by: SAP ABAPer on Apr 16, 2009 5:45 AM
2009 Apr 16 6:52 AM
hi,
befor passing to table control u have to prepare u r internal table .
do like this .
loop at itab1.
on change of itab1-matnr .
itab2-serno = itab1-serno.
itab2-matnr = itab1-matnr.
itab2-menge = itab1-menge.
append itab2.
clear itab2.
else.
itab2-menge = itab2-menge + itab1-menge.
endon.
endloop.
place properl the append statement .
then pass this itab2 to table control.
2009 May 13 4:55 AM