‎2008 Jun 16 6:57 AM
In a table contro with single column of 200 cahrs length:
Data of 20 chars will be input by scanning a barcode using a RF scanner.
Each barcode shall be separated by a comma and fill in 10 per row.
Let us say first barcode scan showed x1, second barcode scan x2, third barcode scan showed x3 etc.
Now the first row of the table control should show x1,x2,x3....
Once x10 is arrived , then it sould go to second row x11,x12,x13...
How to achive this?
‎2008 Jun 16 7:04 AM
Hi,
Try using a counter and also a loop statement.
when counter = 10 append work area(should have a concatenated value i.e x1,x2,x3....) to itab and make the counter back to 1.
**Reward if useful**
Regards,
Ruby.
‎2008 Jun 16 7:14 AM
Hi,
You can use a counter and a flag.Use ctr = ctr + 1 in a loop.If the value of ctr is less than 10 you keep on concatenating values x1,x2,x3..etc. separated by ",".If the ctr is 10.Reset the flag and counter.after 10th append it to internal table.Pass this internal table to table control.
‎2008 Jun 16 7:38 AM
Before using the counter as mentioned above, where do I store the values that are input?
The values x1;x2;x3 wtc are coming into the table control from a barcode scanner.
‎2008 Jun 16 7:43 AM
Hi,
Before passing the data to table control write:
data : var(100) type c,
var1(100) type c.
Loop at itab.
ctr = ctr +1.
var = itab-field.
conactenate var1 var ',' into var1.
If ctr > 10 .
append var1 to tabcontrol.
endif.
endloop.
‎2008 Jun 16 7:52 AM
Vishal,
This should happen in the PAI right?
Then itab should also be a table control??
Can you pl jot down the process flow - PBO and PAI briefly?
What I am trying to understadn is, as soon as the data is read from the barcode, it will be displayed on the screen.
Then your code will come into picture at PAI adn modfies the table control- is it not?
So probably some thing needs to be controlled in the ITS that connects sap adn the rf scanner?