Hiding an UI element dynamically in webdynpro ABAP

Hi Gurus,
  I want to hide a Interactive form UI element dynamically at run time. Please let us know how to proceed with this and provide the code for this, which will be helpful.
Thanks
Rahul

hi ,
bind the VISIBLE property of the UI element with  a context attribute created in the CONTEXT tab. This context attribute should be of type WDUI_VISIBILITY
u can refer this code
wd_context->set_attribute( name = '<attribute name>' value = if_wdl_core=>visibility_visible )." to make it visible.
wd_context->set_attribute( name = '<attribute name>' value = if_wdl_core=>visibility_none ). "to make it invisible
regards,
Amit

Similar Messages

  • How to create a roadmap ui element dynamically in webdynpro abap?

    Dear  team
    iam new for webdynpro my question is how to create the road map programme dynamically using webdynpro
    could you tell me what are the steps i have to take, what are the elements i have to bind?
    and what code & where i have to write the code?
    regards
    sathya

    Hi Sathya,
                  Write the follwing code in WDDOMODIFYVIEW method to create a Dynamic ROADMAP and also create an attribute of
                   type string to control the selection of steps in road map.
    method WDDOMODIFYVIEW .
      data : lr_ele type ref to if_wd_view_element.
      data : lr_rm type ref to cl_wd_road_map.
      data : lr_step type ref to cl_wd_road_map_step.
      data: lr_container type ref to cl_wd_transparent_container.
      data : lr_flowdata type ref to cl_wd_flow_data.
      CALL METHOD view->get_root_element
        receiving
          root_view_element = lr_ele.
      lr_container ?= lr_ele.
    CALL METHOD cl_wd_road_map=>new_road_map
      EXPORTING
        id                       = 'ROADMAP'
      receiving
        control                  = lr_rm.
    CALL METHOD lr_rm->bind_selected_step
      EXPORTING
        path   = 'VALUE'.
    CALL METHOD cl_wd_flow_data=>new_flow_data
      EXPORTING
        element     = lr_rm
      receiving
        control     = lr_flowdata.
    CALL METHOD lr_container->add_child
      EXPORTING
        index     = 1
        the_child = lr_rm.
    CALL METHOD cl_wd_road_map_step=>new_road_map_step
      EXPORTING
        id                  = 'ONE'
        name                = '1'
      receiving
        control             = lr_step.
    CALL METHOD lr_rm->add_step
      EXPORTING
        index    = 1
        the_step = lr_step.
    CALL METHOD cl_wd_road_map_step=>new_road_map_step
      EXPORTING
        id                  = 'TWO'
        name                = '2'
      receiving
        control             = lr_step.
    CALL METHOD lr_rm->add_step
      EXPORTING
        index    = 2
        the_step = lr_step.
    CALL METHOD cl_wd_road_map_step=>new_road_map_step
      EXPORTING
        id                  = 'THREE'
        name                = '3'
      receiving
        control             = lr_step.
    CALL METHOD lr_rm->add_step
      EXPORTING
        index    = 3
        the_step = lr_step.
    endmethod.
    Then you can use the context attribute to navigate between the steps and do respective actions.

  • How to add Image dynamically in Webdynpro ABAP

    Hi Experts,
    How to add Image dynamically in Webdynpro ABAP.
    My requirement is i maintain all the images in a table.
    image source has to pick the table URl dynamically and display.
    is that possible in webdynpro?
    and also please give the suggesion,
    without using MIME objects is that anyway to get images?
    Thanks in advance.
    Regrads,
    Jeyanthi

    Hi,
      are those icons wou want to display then. he following code will be useful.
    data : lo_IMG type ref to CL_WD_IMAGE.
    LO_IMG = cl_wd_IMAGE=>new_IMAGE( id = img_id SOURCE = 'ICON_BW_APD_TARGET' tooltip = sts_tltp ).
    lo_cont->add_child( the_child = lo_img ).
    here lo_cont is the container where you want to add the image dynamically and source is the attribiute through which you can change the ICON image. this thing you can getit from data base table and change accordingly.
    Regards,
    Anil kumar G

  • How to bind a bapi dynamically in webdynpro abap program

    Hi Gurus,
    I want to bind a bapi dynamically in my webdynpro abap program. I have four bapis in my program. During run time depending on requirement appropriate bapi should be binded to context node. Please send me links to documents or code urgently. Points will be rewarded.
    Thanks,
    k.c.

    hi
    good
    go through this link,hope this ll help you to solve your problem
    http://www.vnsg.nl/temp/138624816/A1-WDA_Themadag.pdf
    http://wendtstud1.hpi.uni-potsdam.de/sysmod-seminar/SS2005/elaborations/14-WebDynpro-Dataflow.pdf
    thanks
    mrutyun^

  • How to make field visible and invisible dynamically in webdynpro ABAP

    Hi Experts,
    I am working on simple webdynpro application, in which I have two radio buttons and three fields.
    When I select second radio button second field should be invisible out of three and when I select first radio button the second field should be visible. ie I wanted this happen dynamically. I tried with using some methods but no output....
    Please help out.
    Thanks
    Basanagouda

    Hi Prabhu,
    I have two radio buttons ex: R1 and R2 and three Fields Ex: Vendor, User Name and Password.
    When I select R1 Vendor field should be Visible and when I select R2 Vendor field should be invisible.
    I created one attribute of type WDUI_VISIBILITY and binded in Visbility property of Vendor field.
    On action of R1 I am setting attribute value as Visible using Set_attribute method and On Action of R2 I am setting BLANK in Set_attribute method. But somehow I am unable get the solution......
    Thanks
    Basu

  • Dynamic Programing : WebDynPro ABAP

    Hi expert ,
                      I need to create UI element (Text_view) dynamically ,
                      can anyone send the code for that one .
    Thanks & Regards
    Sankar.M

    Hi,
    Refer to this link -
    Dynamic Programing
    Regards,
    Lekha.

  • How to change the select options selection text dynamically in webdynpro abap ?

    I am using standard interface WDR_SELECT_OPTIONS.... i want to change the Selection text dynamically in my select options.I.E. if the select option is for VBELN field than i want to change its description SALES ORDER Number through Code to some other text.
    If anyone can please help me in this.

    Hi,
    You can achieve your requirement as below
    Get the range table of your selection field as below
              data lt_range_table type ref to data.
              wd_this->m_handler->GET_RANGE_TABLE_OF_SEL_FIELD(
                        exporting
                        i_id = 'VBELN'
                        receiving
                        rt_range_table = lt_range_table ).
    Update the selection field with new description - 'Your New Text'
              wd_this->m_handler->UPD_SELECTION_FIELD(
                        exporting
                             I_ID = 'VBELN'
                             I_DESCRIPTION = 'Your New text'
                             I_IS_AUTO_DESCRIPTION = abap_false
                             IT_RESULT = lt_range_table ).
    You can also pass the other parameters as per your requirement
    Hope this helps you.
    Regards,
    Rama

  • OnSelect event for a Drop down UI Element in Webdynpro ABAP Select Options

    Hi Experts
    We have built our UI based on the webdynpro ABAP Select Options. We have a requirement that, when we change the value of a drop down box in the UI, I need to hide some fields. Can anybody help me out in handling of OnSelect event of a drop down box built using webdynpro ABAP Select Options. We are on SAP Netweaver 7.0 EHP1.
    Rrgards,
    Srikanth.
    Edited by: Srikanth Kancherla on Apr 29, 2010 10:43 PM

    Hi Srikanth,
    as you seem to be already aware, the component is dynamically built.
    so you would have to enhance the code that builds the element and insert a reference to a new action (enhancement) that could handle the onSelect event.
    What is it about this that you particularly want help with?
    Cheers,
    Chris

  • Filling dynamic drop down in adobe interactive form( webdynpro ABAP)

    HI all,
    Im new in Webdynpro ABAP, my requirement is to fill drop down list in adobe interactive form. i created adobe form and its working fine.
    I Created context like ROOT(cardinality 1:1)->DATANODE cardinality 0:n. This context is for drop down and in wddoinit i did  like this.
      IN WDDOINIT ,
    DATA lo_nd_root TYPE REF TO if_wd_context_node.
      DATA lo_nd_datanode TYPE REF TO if_wd_context_node.
      DATA lo_el_datanode TYPE REF TO if_wd_context_element.
      DATA ls_datanode TYPE wd_this->elements_datanode.
    navigate from <CONTEXT> to <ROOT> via lead selection
      lo_nd_root = wd_context->get_child_node( name = wd_this->wdctx_root ).
    navigate from <ROOT> to <DATANODE> via lead selection
      lo_nd_datanode = lo_nd_root->get_child_node( name = wd_this->wdctx_datanode ).
    get element via lead selection
      lo_el_datanode = lo_nd_datanode->get_element(  ).
    ls_datanode[] = lt_dna_value[].
    CALL METHOD lo_nd_datanode->bind_table
      EXPORTING
        new_items            =  ls_datanode
        set_initial_elements = ABAP_TRUE.
       index                =
    while executing  i'm getting this error ": WebDynpro Exception: ADS: com.adobe.ProcessingException: No output was generated while rendering: Stream for: PDFOut.(200,101). " . can u please tell me how to bind value for drop down.
    I created sample table in same form and i binded same value to table, that time its executing fine.
    can u please tell me solution for this Scenario.
    Thanks
    Hemachandran.
    Edited by: hemachandran R on Sep 12, 2008 2:27 PM

    hi,
    My requirement, is to use dynamic drop down in dynamic table. I am using webdynpro abap.
    i populated the value in drop down.
    Its working fine but the problem is how to fill the default value in drop down. because i want to bind the default value which im getting specify value from the table.because each row
    im getting different values, like first row
    CAR
    , that CAR want to fill as a default value in drop down  and second row  as
    BIKE
    that BIKE  want to fill as default value in drop down  ( example drop down contain   car , bike , cycle).
    In adobe form i binded like this
      $record.DATANODE.DATA[*].DNA_RATING
    i dont know whether this one is correct or wrong  .
    im getting default value as empty.
    please give me some solution how to do this.its very urgent
    thanks
    hemachandran.

  • Position a UI element or container on a specific position in webdynpro ABAP

    Hi All,
    How can we positioned different UI elements on a specific location?. I mean whenever we drag and drop them on a view they seem to take their place automatically. Is there a way to give them a shape ( vertical/horizontal ) & position explicitly . I’ll appreciate a quick reply from you people.
    Regards,
    Laeeq.

    Hi Laeeq,
    There is no way to absolute position something in Webdynpro ABAP (at least not that I've found), but there are some ways you can get things relatively in the way you want them.  Try looking at the samples (SALV_WD_DEMO_TABLE*) and you'll see how they use a combination of transparent containers, groups, and the matrix layout to get things into position.
    It does not allow for very fine grained control, but you should be able to achieve the look you are going for.

  • Creating a dynamic valuehelp in webdynpro abap

    Hello,
    I am doing some development in Webdynpro Abap.
    At this point I am unable to use the standard valuehelp provided in the system for selecting some values in an SAP HR system. Would there be any code samples for coding a custom value help in Webdynpro for ABAP. One of the things I have to be able to do is to dynamically generate the values of the valuehelp based on the value of some other fields on the screen that I am coding.
    Any code samples or links will be appreciated.
    Thanks for your help.
    Best Regards
    Sumit Agarwal.

    hi,
    Check out OVS Input help.
    /people/shruti.rathour/blog/2008/05/05/ovs-help-in-web-dynpro-abap
    http://help.sap.com/saphelp_nw04s/helpdata/en/47/9ef8c99b5e3c5ce10000000a421937/frameset.htm
    I hope this will help you.
    Thanx.

  • Retreival of Dynamic Table Datas from Adobe to WebDynpro- ABAP

    Dear Friends,
    I have Developed an application in Webdynpro-ABAP, where i have integrated Adobe form in the webdynpro.
    In the adobe form, dynamic table is there where we can add and delete the rows at runtime.
    I am trying to retreive the table datas at runtime from the adobe.
    I can able to retreive only the first record from the table, even if the table contain more than one rows.
    As per the below code i have retreived the count, where it is showing the count as 1.
    using the method get_static_attributes_table i am trying to fetch all the records, but i can able to retreive only the first record.
    lo_nd_zsm_fm_transport_tra = wd_context->get_child_node( name = wd_this->wdctx_zsm_fm_transport_tra ).
      lo_nd_tr_details_i = lo_nd_zsm_fm_transport_tra->get_child_node( name = wd_this->wdctx_tr_details_i ).
    count = lo_nd_tr_details_i->GET_ELEMENT_COUNT( ).
    elems_bank_table = lo_nd_tr_details_i->get_elements( ).
    lo_nd_tr_details_i->get_static_attributes_table(
      importing
        table = ls_tr_details_i ).
    Even Cardinality i have maintained as 1.N for the node.
    Kindly provide me the solution.
    Thanks and Regards,
    Sathish,,

    Hi, I have solution for read data from dynamic table and add these added row to WD4A context (and then save them to DB) (in ONACTIONPROCESS_SUBMIT event):
    DATA: l_fp TYPE REF TO if_fp.
    l_fp = cl_fp=>get_reference( ).
    DATA: l_pdfobj TYPE REF TO if_fp_pdf_object.
    l_pdfobj = l_fp->create_pdf_object( ).
    l_pdfobj->set_document( pdfdata = lv_pdfsource ).
    l_pdfobj->set_extractdata( ).
    l_pdfobj->execute( ).
    DATA: pdf_form_data TYPE xstring.
    l_pdfobj->get_data( IMPORTING formdata = pdf_form_data ).
    DATA: converter TYPE REF TO cl_abap_conv_in_ce, formxml TYPE string.
    Converter = cl_abap_conv_in_ce=>create( input = pdf_form_data ).
    Converter->read( IMPORTING data = formxml ).
    TYPE-POOLS: ixml.
    DATA: l_ixml TYPE REF TO if_ixml.
    l_ixml = cl_ixml=>create( ).
    DATA: streamfactory TYPE REF TO if_ixml_stream_factory,
    istream TYPE REF TO if_ixml_istream.
    streamfactory = l_ixml->create_stream_factory( ).
    istream = streamfactory->create_istream_string( formxml ).
    DATA: document TYPE REF TO if_ixml_document.
    Document = l_ixml->create_document( ).
    DATA: parser TYPE REF TO if_ixml_parser.
    parser = l_ixml->create_parser( stream_factory = streamfactory
                                               istream = istream
                                               document = document ).
    Parser->parse( ).
    the code above allows you to read xml data from pdf file, then you need only to read xml and adding rows to your context:
    data : item type string.  DATA: nodechild TYPE REF TO if_ixml_node,
            Childschild TYPE REF TO if_ixml_node.
        data: num_of_children type i,
              x type i,
              y type i,
              num_of_attribute.
    node = document->find_from_name('ZAM_PROTSTROJF').
    num_of_children = node->num_children( ).
    nodechild = node->get_first_child( ).
    data: wa_strojdetail type ZAM_PROTSTROJF,
          wa_strojdetail_tab TYPE TABLE OF ZAM_PROTSTROJF.
    wa_strojdetail-docnum = ls_zam_protstroj-docnum.
    wa_strojdetail-bukrs = 'VVS'.
    wa_strojdetail-mandt = sy-mandt.
    y = 1.
    do Num_of_children times.
           num_of_attribute = nodechild->num_children( ).  " Childschild->num_children( )." Getting the number of attributes
           Childschild = nodechild->get_first_child( ).
           wa_strojdetail-itemnum  = y.
           x = 1.
           do num_of_attribute times.
              item = Childschild->GET_value( ).
              CASE x.
                WHEN 4.
                  wa_strojdetail-anln1 = item.
                WHEN 5.
                  wa_strojdetail-anln2 = item.
                WHEN 6.
                  wa_strojdetail-bubtr = item.
                WHEN 7.
                  wa_strojdetail-belnr = item.
              ENDCASE.
              Childschild = Childschild->get_next( ).
              x = x + 1.
          enddo.
          y = y + 1.
          APPEND wa_strojdetail to wa_strojdetail_tab.
          nodechild = nodechild->get_next( ).
    enddo.
    This is complete solution for adding rows in interactive forms and working with them in WD4A!
    Regards Jiri
    Edited by: Jiri Neuzil on Jun 10, 2009 8:13 AM
    Sorry for formatting, but I don't know, how to format text correctly on this site in plain text I have all text correctly formatted, but in preview....

  • Need expertice opinion on WebDynpro ABAP vs FPM for heavy custom apps

    Hi Experts,
    I have a lot of custom UI development,.for external users in SAP. Most of these applications can be simply developed using WebDynpro ABAP framework. If I do the same development using FPM framework I may need to do lot of reaseach espcially controling the UI behaviours like hiding, changing table cell  colors based on the data, manipulating the UI behavior in the runtime, lot more like this.
    The question I have is , which one is the right tool for my development FPM vs WebDynpro ABAP, what is the value in building the same apps in FPM rather then WebDynpro ABAP? If I develop these apps in WebDynpro ABAP does my client loose any new capabilities in he future releases? are any other drawbacks?
    The challenge i see the FPM Feeder classses doesnt have lot of interfaces other then few like ( IF_FPM_GUIBB_FORM, IF_FPM_GUIBB_FORM_REPEATER,IF_FPM_GUIBB_LIST,IF_FPM_GUIBB_SEARCH,IF_FPM_GUIBB_TREE,IF_FPM_GUIBB_LAUNCHPAD )
    to extend more custom UI functionalities, and the other thing I may need to invest lot of time in reseacrhing and analysing the framework events etc....Please can you shed some light on it and put me in right direction.
    Appreciate your time and help.
    Thanks
    Krishna

    Hello Krishna,
    the whole story revolves around reusability and abstraction, extensibility atleast in this context.
    FPM offers more abstraction than Webdynpro. i am sure we all appreciate the standard webdynpro components for ALV, Value help, as this is something we could reuse and if we build our components that it manipulates itself with the help of configuration, customization and personalization.
    So all the Standard SAP Dev could be enhanced (not modified) by simple, configuration, FPM is built around this concept.
    So if you want to do custom development, which could be extended for your different customers with minimal efforts, you could go for FPM.
    So here are some takeaways
    1) FPM offers more abstraction than Webdynpro
    2) FPM offers more reusability
    3) Say manipulating the UI behaviour and say some customers wants view1 first and other doesnt want view 1 and wants only view 2. so in FPM you could simply do it with different configuration. and with Webdynpro, you need to manage this dynamically based on certain application parameter or you may end up copying certain comp,,or you use different usage,,,,and you could calibrate this.
    Regarding limitation with FPM interfaces, could you explictly share what custom development you intend to do and in worst cases, you could always use freestyle UIBB,, which is webdynpro abap
    in that scenario, atleast wiring, application config(app parameter, combination of webdynpro, with thier respective config),,could be reused.
    Regards
    Anurag Chopra

  • Default Values for Select-options In Webdynpro-ABAP

    Hi Freinds,
    Kindly,Help me in setting the Default values for the Select-options in Webdynpro ABAP.
    Here the Node and the Attributes are Created Dynamically, and then Displayed Select-options Component View.
    Regards,
    Xavier.P

    Xavier Reddy Penta sent me this question via email and I answered it directly yesterday. Here is the solution that I provided to him, so that it is stored with the original question:
    I believe your problem is that you are not setting the value into the range correctly.  You are setting it directly into the field symbol of the range like such:
    <FS> = L_STRING2.
    But ranges are deep objects. They have four fields: Sign, Option, High, and Low. This is from the online help:
    1.     sign of type c and length 1. The content of sign determines for every row whether the result of the condition formulated in the column is included or excluded in the entire resulting set for all rows. Evaluable values are "I" for include and "E" for exclude.
    2.     option of type c and length 2. option contains the selection option for the condition of the row in form of logical operators. Analyzable operators are "EQ", "NE", "GE", "GT", "LE", "LT", "CP" and "NP" if column high is initial, and "BT", "NB" if column high is not initial. With the options "CP" and "NP", the data type of the columns low and high must be of the data type c, and special rules apply for entries on the selection screen.
    3.     low of the data type defined after FOR. This column is designated for the comparison value or the lower interval limitation.
    4.     high of the data type defined after FOR. This column is designated for the upper interval limitation.
    So when you are moving the value into the field symbol you are setting it into the sign column.
    Here is an example of how you can access the components of the range:
    * create a range table that consists of this new data element
        lt_range_table =
          wd_this->lv_sel_handler->create_range_table(
               i_typename = l_typename ).
        IF l_fieldname = 'CARRID'.
          FIELD-SYMBOLS: <tab>         TYPE INDEX TABLE,
                             <struct>      TYPE ANY,
                             <wa>          TYPE ANY,
                             <option>      TYPE char2,
                             <sign>        TYPE char1,
                             <high>        TYPE ANY,
                             <low>         TYPE ANY,
                             <wa_values>   TYPE ANY.
          ASSIGN lt_range_table->* TO <tab>.
          APPEND INITIAL LINE TO <tab> ASSIGNING <wa>.
          ASSIGN COMPONENT 'OPTION' OF STRUCTURE <wa> TO <option>.
          ASSIGN COMPONENT 'HIGH' OF STRUCTURE <wa> TO <high>.
          ASSIGN COMPONENT 'LOW' OF STRUCTURE <wa> TO <low>.
          ASSIGN COMPONENT 'SIGN' OF STRUCTURE <wa> TO <sign>.
          <sign> = 'I'.
          <option> =  'EQ'.
          <low> = 'AA'.
        ENDIF.

  • Questionnaire application in WebDynpro ABAP

    Hi,
    I would like to design the Questionnaire application in WebDynpro ABAP, which should be in the form of question and answers(4-5) as checkboxes/radio buttons.
    For this scenario, how to design the Layout and Node structure?
    Thanks and Regards,
    Jhansi

    Hi Jhansi,
    I have created one such reusable component for SAP PPM.
    I have used the structure /RPM/TS_QNNR_API.
    It has the Question number, desc, and questionnaire group, UI option and has one entry per question per answer options.
    For example if Q1 GRp1 has 4 options , it has four entries at runtime with Q1 Grp1 and opt1..opt4.
    I have read this table in a node and the dynamically created one node per question.
    On the basis of UI option value in the table I created corresponding UI element ( drop down, checkbox grp etc) and bound the node for it.
    I will soon be coming with an article on this.
    I hope this helps.
    Regards,
    Sumit

Maybe you are looking for

  • G/L Posting using BAPI

    Hi All, I need to make a FI-GL posting through my code. These are the following fields which I need to pass for the posting. 1. Company Code 2. Currency 3. Document Date 4. Posting Date 5. Posting Key 6. G/L Accounts 7. Amount I have navigated throug

  • Error -603 (could not install extension) notification keeps popping up when I sign into CC even though I've installed the extension trough Extension Manager

    Hi like my question says above, purchased an extension and installed it manually because it would not install automatically (error -603) but now I keep getting the same message/notification every time that I log into CC when starting the computer or

  • Data blocks are corrupted : Error ORA-01578

    Hi All, We having a serious problem with the oracle running in our development server. Data blocks are corrupted with the error ORA-01578 and we have identified the segment as an Table TBTCO. Hence can any body suggest us the way to resolve this. Cur

  • Safari keep crashing! Please help!

    Hi, my Safari keeps crashing and wont reopen. I tried opening using safe mode, worked fine. Here's the report. Please help me!! Process:         Safari [340] Path:            /Applications/Safari.app/Contents/MacOS/Safari Identifier:      com.apple.S

  • Bugs in OSX 10.6.5

    Is there a list of bugs in OSX 10.6.5? I think I saw one, and it had one that would impact me. So, I would have to wait until 10.6.6.