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

Table control line selection

Former Member
0 Likes
480

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!

3 REPLIES 3
Read only

Former Member
0 Likes
453

This message was moderated.

Read only

Former Member
0 Likes
453

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.

Read only

Former Member
0 Likes
453

hiee annie.....

try clearing ur work area after u r modifying ur table.