Application Development 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: 

dynp_values_read not working when i scroll in table control

raavi_gopichand
Explorer
0 Kudos

Hi,

Please help me on this.

My requirement is , to read first column value in table control and based on that value , F4 help should assign to another column in same table.

I made all these using 'DYNP_VALUES_READ' .

Table control is built without wizard in pop_up screen for a standard screen enhancement. So we appending rows manually in PBO.

When i scroll down and select F4 , it is throwing dump 'INVALID DYNPROFIELD'.

1 ACCEPTED SOLUTION

raavi_gopichand
Explorer
0 Kudos

Hi all,

Thanks for replies.

Issue is resolved.

Just need to pass current line to Stepl(I.e., line number in current visible lines).

  GET CURSOR LINE LIN.

   W_VALUES-FIELDNAME = 'W_WCM-ZE_F_N'.

   W_VALUES-STEPL = LIN.

   APPEND W_VALUES TO T_VALUES.

   CLEAR W_VALUES.

   CLEAR FLI.

8 REPLIES 8

abdul_hafeez4
Participant
0 Kudos

Dear,

On scroll down or page down, table index get changed. You are trying to append in a loop and index for beyond the table lines being shown. Try with page down and use reset your cursor index like 1.

0 Kudos

Hi hafeez,

Thanks for the reply.

My screen don't have any pagedown button, i am appending a row in PBO  as below

.

APPEND INITIAL LINE TO T_WCM.

DESCRIBE TABLE T_WCM LINES TAB_CTRL_901-LINES.

0 Kudos


Dear,

For items less then being displayed, your code is working fine, is it? If it is working fine then the only problem is with table control index. Although table control don't have page down button. But your code trying to insert record at index next to those which are being shown. You can use scroll down, page down not necessory. In that case index will be the last line in table control being shown.

0 Kudos

Hi Hafeez,

can u please tell me how to reset  cursor index as u sugested . Iam not getting that point

Former Member
0 Kudos

Hi Gopi,

What parameters did you passed in DYNP_VALUES_READ?  If you hard coded any values in below parameters try to use system variables instead of hard coding...

               dyname    = 'SAPLMEGUI'"'SAPLSZA1'

               dynumb     = '0014'     "'0301'

Use system variables like below.

     CALL FUNCTION 'DYNP_VALUES_READ'

          EXPORTING

               dyname     = sy-cprog

               dynumb     = sy-dynnr

          TABLES

               dynpfields = h_dynpfields

          EXCEPTIONS

               OTHERS     = 1.

Thanks,

Ashok.

0 Kudos

Hi Ashok,

Thanks for reply.

I used system variables : sy-repid , sy-dynnr .

fredericbasilius
Participant
0 Kudos

raavi_gopichand
Explorer
0 Kudos

Hi all,

Thanks for replies.

Issue is resolved.

Just need to pass current line to Stepl(I.e., line number in current visible lines).

  GET CURSOR LINE LIN.

   W_VALUES-FIELDNAME = 'W_WCM-ZE_F_N'.

   W_VALUES-STEPL = LIN.

   APPEND W_VALUES TO T_VALUES.

   CLEAR W_VALUES.

   CLEAR FLI.