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

Data Refresh when Scroll Table Control

former_member203806
Participant
0 Likes
4,201

Hi All,

I have created Table control in my module pool program.  Initial data load to the Table control in working fine. when i m change the QTY field in  Table control and scroll it , That changed data will refreshed.

i have checked in debug mode, when scroll the table control , it is directly go to the PAI.

Please help me to solve the problem

Thanks

pramod

1 ACCEPTED SOLUTION
Read only

0 Likes
3,483

Hello Pramod,

Although I've understood your problem partially are the entry quantities getting cleared then you need to write a logic in pai that is a module .

For example.

PAI.

loop

endloop.

module modify

MODIFY itab FROM WA INDEX TCL-currentline (table control).

if sy-subrc <> 0.

append wa to itab.

endif.

OR else if I am wrong kindly refer this programs which might help you these are standard programs.

demo_dynpro_tabcont_loop.

RSDEMO_TABLE_CONTROL.

Hope this is helpful.

Thanks and Regards,

Sandeep.

14 REPLIES 14
Read only

0 Likes
3,484

Hello Pramod,

Although I've understood your problem partially are the entry quantities getting cleared then you need to write a logic in pai that is a module .

For example.

PAI.

loop

endloop.

module modify

MODIFY itab FROM WA INDEX TCL-currentline (table control).

if sy-subrc <> 0.

append wa to itab.

endif.

OR else if I am wrong kindly refer this programs which might help you these are standard programs.

demo_dynpro_tabcont_loop.

RSDEMO_TABLE_CONTROL.

Hope this is helpful.

Thanks and Regards,

Sandeep.

Read only

0 Likes
3,483

Hi Sandeep,

This is my PAI Coding,

process after input.

   module exit_9100.


   loop at gt_out.


     module modify_table_ctrl.

     module user_command_9100.


   endloop.



Thanks

pramod

Read only

0 Likes
3,483

Dear Sandeep,

I checked  program  ' demo_dynpro_tabcont_loop '  - when i m scrolling data not refreshed, but scroll more, time out will occur.

please advice .

program 'RSDEMO_TABLE_CONTROL' -  not full fill my requirement,  data will refreshed.



thanks


Read only

SwadhinGhatuary
Active Contributor
0 Likes
3,483

HI PRAMOD,

I hope after change in Qty field some event trigger, which cause some malfunction.

I am agree with u that scroll in table control it goes to PAI event.

check in QTY field that any ok is their or not and confirm u generate table control with wizard or create manually .

Share your code for analysis.

Read only

0 Likes
3,483

Hi Swadhin,

This is my PAI Coding,

process after input.

   module exit_9100.


   loop at gt_out.


     module modify_table_ctrl.

     module user_command_9100.


   endloop.



Thanks

pramod

Read only

0 Likes
3,483

process after input.

   module exit_9100.


   loop at gt_out.


     module modify_table_ctrl.

     module user_command_9100. => remove from loop.


   endloop.

use here

     module user_command_9100.


and check

Read only

0 Likes
3,483

Hi Swadhin,

i have checked , but not working.

thanks

Read only

0 Likes
3,483

HI,

Please share total flow logic of screen i.e PBO and PAI with perform code.

I suggest mean while you try to create with help of Wizard .

Read only

0 Likes
3,483

Hi Swadin,

process before output.

   loop at gt_out into gs_out with control tab_ctrl.

     module table_ctrl.

   endloop.


***************************************************

**-------------- PBO ( screen 9100 ) ------------**

***************************************************

* Loading data to Table controll

module table_ctrl output.

   zst_item-sdat = gs_out-sdat.

   zst_item-werks = gs_out-werks.

   zst_item-stloc = gs_out-stloc.

   zst_item-matnr = gs_out-matnr.

   zst_item-sout = gs_out-sout.

   zst_item-sret = gs_out-sret.

   zst_item-phclst = gs_out-phclst.

endmodule.


process after input.

   module exit_9100.

   loop at gt_out.

     module modify_table_ctrl.

     module user_command_9100.

   endloop.


****************************************************

**------------- PAI ( screen 9100 ) --------------**

****************************************************


module exit_9100 input.


   case ok_code1.

     when 'EXIT'.

       leave program.

     when others.

   endcase.

endmodule.


----------------------------------------------------------------------------------------------

module modify_table_ctrl input.

   read table gt_out into gs_out index tab_ctrl-current_line.

   if sy-subrc = 0.

     modify gt_out index tab_ctrl-current_line from gs_out.

   endif.

endmodule.

----------------------------------------------------------------------------------------------

module user_command_9100 input.

   case ok_code1.

     when 'SAVE'.

       gs_save-phclst = zst_item-phclst.

       modify zst_item.

       message: 'Data Saved' type 'S'.

     when others.

   endcase.

endmodule.



-----------------------------------------------------------------------------------------



i need to enter values to 6th column.



thanks




Read only

0 Likes
3,483

Read only

0 Likes
3,483

CODE

process BEFORE OUPUT.

loop at gt_out into gs_out with control tab_ctrl.

endloop.

process after input.

loop at gt_out into gs_out with control tab_ctrl.

module user_command_9100.

ENDLOOP.

module user_command_9100 input.

  case ok_code1.

   when 'SAVE'.
   zst_item-sdat = gs_out-sdat.

   zst_item-werks = gs_out-werks.

   zst_item-stloc = gs_out-stloc.

   zst_item-matnr = gs_out-matnr.

   zst_item-sout = gs_out-sout.

   zst_item-sret = gs_out-sret.

   zst_item-phclst = gs_out-phclst.


   gs_save-phclst = zst_item-phclst.

   modify zst_item.

   message: 'Data Saved' type 'S'.
   endcase.

endmodule.

Read only

0 Likes
3,483

hi Pramod,

I think in pbo u need to use describe statement becoz it needs to know the no of lines in your table control.

The best way to avoid this problem is to try table control with wizard as suggested by swadhin as it will handle all the controls. I suggest you to try table control with wizard once so that it helps you.

Thanks and Regards,

Sandeep.

Read only

0 Likes
3,483

Hi Sandeep,

I have already used Table control wizard, but that also has same problem,

I checked  program  ' demo_dynpro_tabcont_loop '  - when i m scrolling data not refreshed, but scroll more, time out will occur.

please advice .

thanks

Read only

former_member203806
Participant
0 Likes
3,483

Hi All,

Thanks for given support to fix above issue, i have check the  demo_dynpro_tabcont_loop sample program and  according to that i have done the changes in my coding.

Thanks

pramod