‎2008 May 27 6:12 AM
Hi,
I've a table control. On screen it shows upto 9 rows. My internal table and screen structure are of different types. Following is the code in PBO and PAI
PBO
loop at it_item into wa_item with control tble_ctrl
cursor tble_ctrl-current_line.
<Here i pass internal table data to screen fields>
<wa_item-colmn1 = screen_structure-colmn1>
endloop.
PAI
loop at it_item.
<Here i pass screen fields to internal table data & hence modify my table>
<screen_structure-colmn1 = wa_item-colmn1>
MODIFY it_item FROM wa_item INDEX tble_ctrl-current_line.
endloop.
Now in the output when i've say 16 records in my table control which are greater than 9 records then i find on selecting one row of the table control, and pressing enter the selected line gets replicated for 10 record.
On pressing enter again the selected line gets replicated for 11 record, similarly on pressing enter again the selected line gets replicated for 12 record and continues till i press enter.
At last all 16 records of my internal table gets dupliacted by the selected line.
How can i stop this
PLZ HELP!
‎2008 May 27 6:20 AM
‎2008 May 27 6:56 AM
sample code.
PROCESS AFTER INPUT.
LOOP AT IT_PARTS.
CHAIN.
FIELD IT_PARTS-PARTNO.
FIELD IT_PARTS-PART_DESC.
FIELD IT_PARTS-ITEMNO.
FIELD IT_PARTS-QUANTITY.
FIELD IT_PARTS-UNIT.
FIELD IT_PARTS-PLANT." MODULE plant_help.
FIELD IT_PARTS-SLOC.
FIELD IT_PARTS-BATCH.
FIELD IT_PARTS-USAGE.
FIELD IT_PARTS-ISSUEQTY.
FIELD IT_PARTS-ISSUED_QTY.
FIELD IT_PARTS-REVERSE_QTY.
ENDCHAIN.
MODULE INIT_TC.
ENDLOOP.
*& for filling the table control
MODULE fill_tc.
&----
*& Module INIT_TC INPUT
&----
text
----
MODULE INIT_TC INPUT.
IF W_SORD_NUM IS NOT INITIAL.
MODIFY IT_PARTS INDEX TC_PARTS-CURRENT_LINE.
IF sy-subrc NE 0.
APPEND IT_PARTS.
ENDIF.
ELSE.
REFRESH IT_PARTS.
ENDIF.
ENDMODULE.
MODULE fill_tc INPUT.
PERFORM fill_tc.
&----
*& Form fill_tc
&----
text
----
--> p1 text
<-- p2 text
----
FORM fill_tc .
<Code to fill tc>
This may help you.
‎2008 May 27 7:55 AM
hiee annie.....
try clearing ur work area after u r modifying ur table.