‎2009 Sep 24 4:44 AM
Hi,
I have created a table control in my screen with two columns FIELDNAME and VALUE.
and i have defaulted the first colunm with some values (five lines). and have added f4 help for the second coulmn(VALUE) depends on the value in first column(FIELDNAME).
now the problem is when ever i click the scroll bar (down) among the five entries one entry getting vanished . becoming 4 entries. and if i click again becoming 3 etc... and again if i click scoll bar (UP) its coundnt see the vanished entries.
Can anyone please help to find wht did i missed to add.
Thanks in Advance.
Guru
‎2009 Sep 29 11:58 AM
Hi,
It is because while scrolling Table Control PAI will trigger and execute the code as usual.So if the OK code is set for delete or something it will perform that.So check your code wheter u written any code for deleting entry and that getting triggered while scrolling
cheers
shibu
‎2009 Sep 24 5:30 AM
Hi,
What code have you written in the PAI ? As you click on the scroll bar, your PAI is called everytime. Now depending on the code that you have written that is being triggered, Please check the code in debugging mode, see where your control is going whenever you press the scroll up or down.
Regards,
Sachin
‎2009 Sep 29 11:58 AM
Hi,
It is because while scrolling Table Control PAI will trigger and execute the code as usual.So if the OK code is set for delete or something it will perform that.So check your code wheter u written any code for deleting entry and that getting triggered while scrolling
cheers
shibu
‎2009 Sep 30 12:40 PM
Hi,
All you need to do is to modify the internal table whenever you perform some user action.
it_zekpo is my internal table w/o header line,
wa_zekpo is work area.
Name of input/output fields on screen are:-
wa_zekpo-field1,
wa_zekpo-field2, and so on...
Use code:-
At screen logic:-
PROCESS BEFORE OUTPUT.
* MODULE status_8003.
LOOP WITH CONTROL po_tab. "po_tab is table control on screen 8003
MODULE read_data.
ENDLOOP.
PROCESS AFTER INPUT.
* MODULE user_command_8003.
LOOP WITH CONTROL po_tab.
MODULE modify_data. "<----you need this code
ENDLOOP.
In PBO:-
*&---------------------------------------------------------------------*
*& Module READ_DATA OUTPUT
*&---------------------------------------------------------------------*
MODULE read_data OUTPUT.
"read entries from internal table to table control
READ TABLE it_zekpo INTO wa_zekpo INDEX po_tab-current_line. "<-po_tab is table control name
DATA line_count TYPE i.
DESCRIBE it_zekpo
LINES line_count.
po_tab-lines = line_count + 10. "<-to increase the number of lines in table control dynamically
ENDMODULE. " READ_DATA OUTPUT
In PAI:-
*&---------------------------------------------------------------------*
*& Module MODIFY_DATA INPUT
*&---------------------------------------------------------------------*
MODULE MODIFY_DATA INPUT.
"this will modify the contents of existing line from table control to internal table
MODIFY IT_ZEKPO FROM WA_ZEKPO INDEX po_tab-currentline.
ENDMODULE. " MODIFY_DATA INPUT
Hope this helps you.
Regards,
Tarun
‎2009 Oct 05 1:16 PM
Hello,
This usually happens in table control.Just take care of few things.
1. When ever you will scroll PAI will be triggered.So you have to develop a logic in such a way thatinternal table data does not get deleted.
2. Whenever you want to scroll just do /H and debug it.You will able to anaylse your code more effectively.
3. Do everything in PAI related to scrolling.
Regards,
Nabheet Madan
‎2009 Oct 09 5:49 AM
Hi,
Every time you scroll down or up the table control, the PAI is triggered. There is no exclusive sy-ucomm value for the scrolling action.
What you could possibly do is, restrict the portions of code that you have written with its respective sy-ucomm values.
if sy-ucomm is 'F_DELETE'. "This way, your code gets triggered only for the events that you want.
"Your operation
endif.