‎2012 Mar 26 9:27 AM
Hi All,
I have created a table control in modulepool. it has 3 columns like matnr, maktx and long text(shown as button) columns. The user will click on longtext button and enter the text for each material.
The problem is that when I have multiple entries and I scroll down and try to fill the long text for materials which are down the order, GET CURSOR line is not giving me the correct line index.
Say for example by default, 5 lines are shown and user enters long text for line item 3. Till now everything fine, when I scroll down and try to enter texts for the line item 8, the get cursor line is not giving me correct index number, it gives me index number as 3. What I am trying to say is it is considering only those lines which are visible as of now.In this case 6 to 10, so for line item 8 it gave result as 3 which is incorrect.
If you have better ideas of doing, let me know.
Best Regards
Himayat
‎2012 Mar 26 9:37 AM
You can do as follow. Lets say your table control is TC_TABLE.
Use the get cursor to fetch lines in LV_LINE
Curasr_index = tc_table-top_line + lv_line -1.
Nabheet
‎2012 Mar 26 9:37 AM
You can do as follow. Lets say your table control is TC_TABLE.
Use the get cursor to fetch lines in LV_LINE
Curasr_index = tc_table-top_line + lv_line -1.
Nabheet
‎2012 Mar 26 9:37 AM
Hi Himayat,
GET CURSOR give you the current index on screen.
You have to add <CONTROLNAME>-TOP_LINE - 1 to the index returned by GET CURSOR to get the index into your internal table.
Cheers
Adi
‎2012 Mar 26 9:50 AM
Not sure if this helps you. Try calling function DYNP_GET_STEPL to get the index. ( this is generally used in POV & POH )