2008 Dec 24 9:07 AM
Hi,
I need to paas internal table values into table control.
I am giving the below code, here
I_STOCK2 - Internal table having 2 records
I_STOCK - Internal Table which is mapped to screen.(STOCKNO, WEIGHT, 2 columns table)
STOCKNO1- Table control name.
LOOP AT i_stock2 INTO I_STOCK WITH CONTROL STOCKNO1 CURSOR
stockno1-current_line.
ENDLOOP.
But I am getting the below syntax error.
"LOOP" cannot be assigned to any field.
Please let me guide what's is the main issue here and how to come up with the solution approach.
Thanks for your responce.
Mahesh RG
2008 Dec 24 9:14 AM
Hi
Try this out.
in PBO
are you having same columns STOCKNO, WEIGHT in both I_STOCK2 and I_STOCK
else you need explicitly move them in the MOVE module as mentioned below
LOOP AT i_stock2 with CONTROL STOCKNO1.
module move.
endloop.
in program
module move.
move-corresponding i_stock2 to I_STOCK
endmodule.
Best Regards
Ramchander Rao.K
Edited by: Ramchander Krishnamraju on Dec 24, 2008 10:15 AM
Hi,
I need to paas internal table values into table control.
I am giving the below code, here
I_STOCK2 - Internal table having 2 records
I_STOCK - Internal Table which is mapped to screen.(STOCKNO, WEIGHT, 2 columns table)
STOCKNO1- Table control name.
LOOP AT i_stock2 INTO I_STOCK WITH CONTROL STOCKNO1 CURSOR
stockno1-current_line.
ENDLOOP.
But I am getting the below syntax error.
"LOOP" cannot be assigned to any field.
Please let me guide what's is the main issue here and how to come up with the solution approach.
Thanks for your responce.
Mahesh RG
2008 Dec 24 9:14 AM
Hi
Try this out.
in PBO
are you having same columns STOCKNO, WEIGHT in both I_STOCK2 and I_STOCK
else you need explicitly move them in the MOVE module as mentioned below
LOOP AT i_stock2 with CONTROL STOCKNO1.
module move.
endloop.
in program
module move.
move-corresponding i_stock2 to I_STOCK
endmodule.
Best Regards
Ramchander Rao.K
Edited by: Ramchander Krishnamraju on Dec 24, 2008 10:15 AM
2008 Dec 24 9:26 AM
Hi ,
Both the tables are having the same fields as these two tables refering to same data base table.
But I am unable to pass the values since I am getting the erro as I mentioned above
"LOOP" cannot be assigned to any field. I am unable to find why this error is occuring.
Do you have any idea?...
Thanks for responding so quickly.
Regards,
Mahesh
2008 Dec 24 9:35 AM
Hi
Just check the spelling of your Table Control name in screen painter.
or do you have only one table control or more than one.
if you have more than one
then you need to write the loop statements both in PAI and PBO aswell for all the table controls that you mentioned on the screen.
and try to activate the whole program at once.I mean just double click on the main program and activate the entire program at once rather activating the flow logic alone. hope this is clear to you.
Regards
Ramchander Rao.k
Edited by: Ramchander Krishnamraju on Dec 24, 2008 10:36 AM
2008 Dec 24 9:16 AM
Hi,
In the flow logic of the screen, write the following code.
PROCESS BEFORE OUTPUT.
MODULE get_t_ctrl_lines.
LOOP AT itab WITH CONTROL t_ctrl CURSOR t_ctrl-current_line.
....
ENDLOOP.
In program, write the following code.
MODULE get_t_ctrl_lines OUTPUT.
SELECT * from db into table itab.
DESCRIBE TABLE itab LINES ln.
To make the vertical scroll bar to come on runtime
t_ctrl-lines = ln + 100.
ENDMODULE. " get_T_CTRL_lines OUTPUT
2008 Dec 24 9:36 AM
Hi,
Declare the table in program and activate the program.Then in screen, get from the program.Then use as below.
LOOP AT i_stock2 WITH CONTROL STOCKNO1 CURSOR..
..
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |