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

dynp_values_read not working when i scroll in table control

raavi_gopichand
Explorer
0 Likes
2,275

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
Read only

raavi_gopichand
Explorer
0 Likes
1,817

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.

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'.

8 REPLIES 8
Read only

abdul_hafeez4
Participant
0 Likes
1,817

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.

Read only

0 Likes
1,817

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.

Read only

0 Likes
1,817


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.

Read only

0 Likes
1,817

Hi Hafeez,

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

Read only

Former Member
0 Likes
1,817

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.

Read only

0 Likes
1,817

Hi Ashok,

Thanks for reply.

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

Read only

fredericbasilius
Participant
0 Likes
1,817
Read only

raavi_gopichand
Explorer
0 Likes
1,818

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.