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

serial number in table control

Former Member
0 Kudos
731

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

5 REPLIES 5
Read only

Former Member
0 Kudos
558

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

Read only

0 Kudos
558

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

Read only

Former Member
0 Kudos
558

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

Read only

Former Member
0 Kudos
558

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.

Read only

Former Member
0 Kudos
558

thnx all to help me