Skip to Content

Dynamic editable input field from a Push Button

Hi All,

I have searched SDN before posting on the similar scenario, but could not understand.

I have 2 views, concern is only abt the first view.

on my first view , i have 5 rows with 3 input fields in each row, and a push button at the end.

In the layout , i have binded these input fields from the context table fields().

Now, After filling the input fields , when i click verify i have to make these fields non editable.

In the context also it is mapped to the table .

From the search , i understood that i have to make the context attribute of type WDY_BOOLEAN.

but,The context attribute is of a table field , i am reading these context values in View 2 , if i make the attribute to

WDY_BOOLEAN , can i read them in view 2.

Another question is

I am calling a ADOBE FORM in view 2 , for few fields im using OVS help, when i click for OVS, the pop up initially blinks for some time

more than 2 blinks? can i know the reason why.

regards,

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • Best Answer
    avatar image
    Former Member
    Feb 04, 2014 at 05:19 AM

    Hi Naren,

    Solution of first Scenario:-

    Context:- As Ravi has mentioned that Context of View1 is inside the component controller because after making it in component controller you can access it from any view after mapping. It just like global context.

    Making Non-Editable :- For that You have to make one attribute in separate node (Not necessary but looks good) and make it wdy_boolean. In Events property , You define an action  like onClick. Then Bind the readOnly Property with the attribute which you have created with wdy_boolean type. Inside the onClick action set the value of attribute 'X' (for True).

    I hope it will work well.

    Regards,

    Amit

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 04, 2014 at 04:56 AM

    Hi Naren,

    For the First issue don't change the table field attribute to wdy_boolean instead create a new attribute in the same context node and make that attribute of type wdy_boolean.

    Reading values from view2 :

    To read values of view1 in view2 the context node of view1 must be created in the component controller.After that you can drag and drop to view1 and view2. In this way you can acess the view1 values in the view2.

    Regards,

    Ravikiran.K

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Naren S

      HI Naren,

      Create one more attribute in ADOBE_DATA node say Read_only of type wdy_boolean and update the node in the view1 and view2. Bind the readonly attribute to the readonly property of the input fields in the view.

      setting read_only attribute to abap_true makes input field non editable and setting to abap_false makes input field editable.

      Regards,

      Ravikrian.K

  • avatar image
    Former Member
    Feb 03, 2014 at 12:31 PM

    Hi Naren,

    Popup blinking means Debugger is enabled in your Adobe Form.

    Solution:-

    1. Open your Adobe Reader and press ctrl + k.

    2. Select Javascript in categroy.

    3. Uncheck the show console and error messages.

    Thanks,

    Amit

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Amit,

      Thanks for your reply , i have done that and now i see one blink. and it is ok .

      can you throw some light on the first issue plz.

      regards,

  • Feb 04, 2014 at 05:18 AM

    Create a node or change the previous node in following way.

    1. Create node in component controller(Because node will be accessible in all views) or change the existing node by adding new attribute of type wdy_boolean.

    2. Drag the node to all view so  we can access in both view..

    3. Bind the read only property of input field by newly created attribute.

    4. on push button action change the value of attribute.

    ** If you want to access node in all view in a component, create the node in Component Controller and copy those in all view.. by this you can access all node without any data loss..

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 04, 2014 at 05:34 AM

    Hi Naren,

    For the First Issue at hand you have declare a separate Attribute for each input field of type "WDUI_VISIBILITY" in the context Attribute of your View, Also i would suggest if the no of input field are constant don't declare it as a Table , instead declare it as individual field.

    Also after this you have to bind the visibility of the input field to visibility attribute of each field you have just declared in context attribute.

    Once you click the verify option Button, you can define a EVENT "OnAction" , There you can set the code where you can hide or display the input field on any business action.

    data : lo_el_context    type ref to if_wd_context_element,

              ls_context       type        wd_this->element_context,

              lv_basic_view    type        wd_this->element_context-basic_view,

              lv_planning_view type        wd_this->element_context-planning_view.

       if zuser_data is not initial.

         case zuser_data-zmm_mdm_view.

           when 'DE'.

    *         get element via lead selection

             lo_el_context = wd_context->get_element( ).

    *         get single attribute

             lo_el_context->get_attribute( exporting name =  `BASIC_VIEW` importing value = lv_basic_view ).

    *           @TODO fill attribute

             lv_basic_view = cl_wd_uielement=>e_visible-visible.

    *           set single attribute

             lo_el_context->set_attribute( exporting name =  `BASIC_VIEW` value = lv_basic_view ).

    *       get single attribute

             lo_el_context->get_attribute( exporting name =  `PLANNING_VIEW`  importing  value = lv_planning_view ).

    *         @TODO fill attribute

             lv_planning_view = cl_wd_uielement=>e_visible-none.

    *         set single attribute

             lo_el_context->set_attribute( exporting name =  `PLANNING_VIEW` value = lv_planning_view ).

    I hope this is helpful.

    Best Regards

    Priyesh Shah

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 06, 2014 at 06:04 AM

    Thank you all for your replies,

    i could resolve the issue with your help.

    regards,

    Add comment
    10|10000 characters needed characters exceeded