2008 Dec 31 6:07 AM
In the Screen, i have put a Table control and fields are from workarea wa_item
PBO
-
LOOP AT it_item INTO wa_item WITH CONTROL tc CURSOR tc-current_line.
ENDLOOP.
PAI
-
LOOP at it_item.
module modify_it.
ENDLOOP.
MODULE it_modify INPUT.
MODIFY it_item FROM wa_item INDEX tc-current_line.
The above modify statement is failing with a sy-subrc of 4.
wa_item holds the value what we have entered in the table control first line and tc-current_line value is 1.
But it is not modifying the internal table and thus value is not getting displayed in the sceen(Table control) after pai & Pbo.
Pls Help.....
Regards
Sajid
2008 Dec 31 6:13 AM
In the Screen, i have put a Table control and fields are from workarea wa_item
PBO
-
LOOP AT it_item INTO wa_item WITH CONTROL tc CURSOR tc-current_line.
ENDLOOP.
PAI
-
LOOP at it_item.
module modify_it.
ENDLOOP.
MODULE it_modify INPUT.
MODIFY it_item FROM wa_item INDEX tc-current_line.
The above modify statement is failing with a sy-subrc of 4.
wa_item holds the value what we have entered in the table control first line and tc-current_line value is 1.
But it is not modifying the internal table and thus value is not getting displayed in the sceen(Table control) after pai & Pbo.
Pls Help.....
Regards
Sajid
2008 Dec 31 6:13 AM
2008 Dec 31 6:18 AM
Hi Shaik,
Use this code, its working:-
At screen logic
PROCESS BEFORE OUTPUT.
* MODULE status_8002.
LOOP WITH CONTROL po_tab. "table control name
MODULE pass_data.
ENDLOOP.
PROCESS AFTER INPUT.
* MODULE user_command_8002.
LOOP WITH CONTROL po_tab. "table control name
MODULE modify_data.
ENDLOOP.
In PBO
MODULE pass_data OUTPUT.
READ TABLE it_item into wa_item INDEX po_tab-current_line.
ENDMODULE. " PASS_DATA OUTPUT
In PAI
MODULE modify_data INPUT.
MODIFY it_item INDEX po_tab-current_line FROM wa_item.
ENDMODULE. " MODIFY_DATA INPUT
Hope this solves your problem.
Thanks & Regards,
Tarun Gambhir
2008 Dec 31 6:27 AM
Hi,
Are you using any SELECT query or filling data into internal table it_itembefore LOOP..ENDLOOP in PBO.
If yes, then the modifications done on internal table it_item in PAI are overwritten in PBO and TC comes blank.
PBO
-
LOOP AT it_item INTO wa_item WITH CONTROL tc CURSOR tc-current_line.
ENDLOOP.
Otherwise ur code seems to be all right.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |