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

Using DYNP_VALUES_UPDATE with a Maintenance View

Former Member
0 Likes
820

Hi,

I am using a maintenance view to insert values into a table. When user creates a new entry, based on the value provided for a field,I need to fill a read-only field. In PAI, when user enters a value for one field, I am using FM 'DYNP_GET_STEPL' to get the current line and then DYNP_VALUES_UPDATE to fill the contents to the read-only field. But this does not seem to work. Any idea?

Regards

Rachana

4 REPLIES 4
Read only

Former Member
0 Likes
630

Hi!

You can't enter values into a read-only field, using DYNP_VALUES_UPDATE fm.

However you have 2 choices:

- you have to enter the value into the structure behind the dynpro field

- you have to remove the read-only attribute from the field (using LOOP AT SCREEN statement), then set the value and set the read-only status back.

Regards

Tamá

Read only

Former Member
0 Likes
630

Hi Tamas,

I tried both the options suggested by you.

I am updating the underlying structure, still its not visible when the screen loads again. But if you see the same field gets filled with DYNP_VALUES_UPDATE if an F4 help is used for teh first(editable) field and then my read-only field is also filled in the PROCESS ON VALUE REQUEST module.

So my guess is that, since it is a table control, it loops through the rest of the table control which is empty and my underlying structure gets cleared. So the problem could be where I am actually filling the field.

Is it possible to somehow fill the <EXTRACT> table so that teh value is not lost?

Regards

Rachana

Read only

0 Likes
630

Hi Rachana,

After updating the structure, update the internal table values for the current row. I think you are not updating internal table.

Regards,

Siva.

Read only

Former Member
0 Likes
630

Hi Rachana ,

You dont need to use the FM , you will have to implement the event NEW_ENTRY in the table maintenance ,please check the help on events in table maintenace .

In the subroutine you create , you will have the values enetred by the user in the work area of the table which has the same name as the table .

Do revert back in case of further queries.

Regards

Arun