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

Former Member
0 Likes
833

hi all,

Am pretty new to sap and i have just created a table control, however when am doing some modification to the table control and press enter the values/modified values are being dublicated on the table control..... Any help will be most welcomed.

Thank you.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
808

Hi,

Try this


PROCESS BEFORE OUTPUT.
 
  LOOP AT gt_itab1 WITH CONTROL tabcontrol.
    MODULE display_data.
  ENDLOOP.
 
PROCESS AFTER INPUT.
 
  MODULE clear_internal_table.
  LOOP AT gt_itab1.
    MODULE read_data.
  ENDLOOP.
 
MODULEclear_internal_table INPUT.
   clear gt_itab1[].
   clear gt_itab1.
ENDMODULE.
 
MODULE read_data INPUT.
if sy-ucomm eq 'ENTER'.  
   "Populate your internal table
endif.
ENDMODULE.
 
MODULE display_data OUTPUT.
   if sy-ucomm eq 'ENTER'.
     "Populate the table control with data in the internal table
  endif.
ENDMODULE.

9 REPLIES 9
Read only

GauthamV
Active Contributor
0 Likes
808

If you are new to SAP , SEARCH in SCN you will get lot of information.

Check these sample programs related to table control.

DEMO_DYNPRO_TABCONT_LOOP

DEMO_DYNPRO_TABCONT_LOOP_AT

Read only

Former Member
0 Likes
808

hii,

if you are moving values from itab to table control.you can code like this in you chain endchain

SORT ITAB BY Col1 .

DELETE ADJACENT DUPLICATES FROM TABLE ITAB1

COMPARING col1 .

rgrds.

Shweta

Read only

Former Member
0 Likes
808

hii,

if you are moving values from itab to table control.you can code like this in you chain endchain

SORT ITAB BY Col1 .

DELETE ADJACENT DUPLICATES FROM TABLE ITAB1

COMPARING col1 .

rgrds.

Shweta

Read only

Former Member
0 Likes
808

HI ,

Search in the SDN with key word table control.You can find lot of answers.

Thanks

Read only

Former Member
0 Likes
808

Hello Gheerishm,

You must have created module to transfer the data records from tableview to internal table.

check if by any change that module or such mechanism is getting called twice.

Better you debug to find out what's going in PBO and PAI after you press enter button.

By the way when you press enter button the sy-ucomm value is INITIAL.

Hope this helps!

Thanks,

Augustin.

Read only

RahulKeshav
Active Contributor
0 Likes
808

Hi G,

Try to refresh the internal table (e.g. in MODULE status_0100 OUTPUT )

thnx

R

Read only

RahulKeshav
Active Contributor
0 Likes
808

Hi G,

Try to refresh the internal table (e.g. in MODULE status_0100 OUTPUT )

thnx

R

Read only

Former Member
0 Likes
809

Hi,

Try this


PROCESS BEFORE OUTPUT.
 
  LOOP AT gt_itab1 WITH CONTROL tabcontrol.
    MODULE display_data.
  ENDLOOP.
 
PROCESS AFTER INPUT.
 
  MODULE clear_internal_table.
  LOOP AT gt_itab1.
    MODULE read_data.
  ENDLOOP.
 
MODULEclear_internal_table INPUT.
   clear gt_itab1[].
   clear gt_itab1.
ENDMODULE.
 
MODULE read_data INPUT.
if sy-ucomm eq 'ENTER'.  
   "Populate your internal table
endif.
ENDMODULE.
 
MODULE display_data OUTPUT.
   if sy-ucomm eq 'ENTER'.
     "Populate the table control with data in the internal table
  endif.
ENDMODULE.

Read only

Former Member
0 Likes
808

Hi all,

I am very thankful to all of you for having reply to the thread.