cancel
Showing results for 
Search instead for 
Did you mean: 

Enable a field in standard WDA

0 Kudos

I have a standard Webdynpro screen, where some of the input fields are displayed in diabled mode. my requirement is to enable those fields fo input. How to achieve it in standard webdynpto application. Could you please provide the steps.

Accepted Solutions (0)

Answers (1)

Answers (1)

ramakrishnappa
Active Contributor
0 Kudos

Hi Saritha,

Check out if any SPRO settings available to configure the particular component's fields.

If not,you can do it as below

Option 1: Application configuration

Refer to my document:

Follow the steps and uncheck the read_only field option to make field is open for input

Option 2: View Enhancement

Refer document;

Follow the steps, use POST EXIT of your view and get ui element and set read_only property

Regards,

Rama

0 Kudos


Hi Rama,

Thanks for your quick response.

I am new to WD. Could you please let me know how to change the 'READONLY' property of an Input filed in standard WDA. I have created an enhancement spot, but still that view is not allowing me to do the changes. Can't we directly change properties. If not, How to make it as etidatble. Pls clarify.

ramakrishnappa
Active Contributor
0 Kudos

Hi Saritha,

you cannot just directly set the property of READ ONLY in view, need to use post exit.

If you have already enhanced the view, you can find the post exit option against method WDDOMODIFYVIEW( ) .

  • Go to methods tab of your view and click on POST EXIT of WDDOMODIFYVIEW method
  • write the below code

         

          " assuming ui element is an input field

              

               data lo_input_field type ref to cl_wd_input_field.

                lo_input_field ?=   view->get_element('MY_INPUT_FIELD_NAME").

                   if lo_input_field is bound.

                         lo_input_field->set_read_only( abap_false ).

                    endif.

Note: your replace the ui element name as required

Hope thid helps you.

Regards,

Rama

0 Kudos

Hi Rama,

Now the field is being displayed in editable. But i need a small clarification. Since this field is already available in standard application, I made it as editable. but while testing i am getting error message as 'Mapping cannot be executed completly'. What could be done for this. Please guide..

ramakrishnappa
Active Contributor
0 Kudos

Hi Saritha,

It seems that the error is because the field is not mapped properly.

When are you getting this error?  Check out in debugging .

Regards,

Rama

0 Kudos

Hi Rama,

Field was already there in standard application. i just made it as editable using Post exit of WDMODIFYVIEW. Do i need to mapp anything apart from this. Binding as already there.

While publishing teh document, i am getting this error mesage. From publish button, do I need to debug. Can you please guide...

ramakrishnappa
Active Contributor
0 Kudos

Are you modifying any other things in post exit? other than setting read only property.

Can you share error screen shot? also find out if its a custom message somewhere.

Regards,

Rama

0 Kudos

I have written logic in overwritten exit. Thats it. Please find the screen shots below.

Properties of the filed.

Piece of code added in exit.

error message

ramakrishnappa
Active Contributor
0 Kudos

Hi Saritha,


The error message looks like custom message from the code.

Please set an external break point in WDDOBEFOREACTION( ) and debug to find out the cause for the issue.

I think there is custom validation logic which is checking for mapping.

Hope this helps you.

Regards,

Rama