Webdynpro ABAP. read context TABLE

Hi,
i am trying to read a context in an webdynpro for ABAP where the context is an table. if I try to read a single attribute there is no problem:
get single attribute
  elem_ex_mat_data->get_attribute(
    EXPORTING
      name =  `MATNR`
    IMPORTING
      value = item_matnr ).
Now I see my value in the variable item_matnr.
But how can I get the whole context table EX_MAT_DATA into a internal table. I tried the the wizard with reading the context of this table EX_MAT_DATA and I get the following coding:
  DATA:
    node_changing                       TYPE REF TO if_wd_context_node,
    node_ex_mat_data                    TYPE REF TO if_wd_context_node,
    elem_ex_mat_data                    TYPE REF TO if_wd_context_element,
    stru_ex_mat_data                    TYPE if_tree=>element_ex_mat_data .
navigate from <CONTEXT> to <CHANGING> via lead selection
  node_changing = wd_context->get_child_node( name = if_tree=>wdctx_changing ).
navigate from <CHANGING> to <EX_MAT_DATA> via lead selection
  node_ex_mat_data = node_changing->get_child_node( name = if_tree=>wdctx_ex_mat_data ).
@TODO handle not set lead selection
  IF ( node_ex_mat_data IS INITIAL ).
  ENDIF.
get element via lead selection
  elem_ex_mat_data = node_ex_mat_data->get_element(  ).
@TODO handle not set lead selection
  IF ( elem_ex_mat_data IS INITIAL ).
  ENDIF.
alternative access  via index
Elem_Ex_Mat_Data = Node_Ex_Mat_Data->get_Element( Index = 1 ).
@TODO handle non existant child
if ( Elem_Ex_Mat_Data is initial ).
endif.
get all declared attributes
  elem_ex_mat_data->get_static_attributes(
    IMPORTING
      static_attributes = stru_ex_mat_data ).
While debugging I find in node_ex_mat_data (CLASS=CL_WDR_CONTEXT_NODE_VAL) a attribute collection with 55 values (thats the number of values the context table should have) but I have no idea how to get the values for my internal table.
Please help.
regards
stefan

Hi Stefan,
You could call method get_static_attributes_table(). It returns the content of a node as an internal table. Only static attributes are considered of course.
Best regards,
Thomas

Similar Messages

  • Webdynpro ABAP application canot be run

    Hi,
        i done a sample simple webdynpro application in web dynpro ABAP. when i run the application the follwing error is occured in browser. pls help me .................
    Error when processing your request
    What has happened?
    The URL http://sapserver:8001/sap/bc/webdynpro/sap/zz_sampleapp was not called due to an error.
    Note
    The following error text was processed in the system DM0 : Die URL enthält keine vollständige Domainangabe (sapserver statt sapserver.).
    The error occurred on the application server sapserver_DM0_01 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: CHECK of program CX_FQDN=======================CP
    Method: LATE_CONSTRUCTOR of program CL_WDR_UCF====================CP
    Method: HANDLE_REQUEST of program CL_WDR_UCF====================CP
    Method: IF_HTTP_EXTENSION~HANDLE_REQUEST of program CL_WDR_MAIN_TASK==============CP
    Method: EXECUTE_REQUEST of program CL_HTTP_SERVER================CP
    Function: HTTP_DISPATCH_REQUEST of program SAPLHTTP_RUNTIME
    Module: %_HTTP_START of program SAPMHTTP
    What can I do?
    If the termination type was RABAX_STATE, then you can find more information on the cause of the termination in the system DM0 in transaction ST22.
    If the termination type was ABORT_MESSAGE_STATE, then you can find more information on the cause of the termination on the application server sapserver_DM0_01 in transaction SM21.
    If the termination type was ERROR_MESSAGE_STATE, then you can search for more information in the trace file for the work process 0 in transaction ST11 on the application server sapserver_DM0_01 . In some situations, you may also need to analyze the trace files of other work processes.
    If you do not yet have a user ID, contact your system administrator.
    Error code: ICF-IE-http -c: 800 -u: SAPUSER -l: E -s: DM0 -i: sapserver_DM0_01 -w: 0 -d: 20080823 -t: 154355 -v: RABAX_STATE -e: UNCAUGHT_EXCEPTION
    HTTP 500 - Internal Server Error
    Your SAP Internet Communication Framework Team

    Look at this thread
    [error in WebDynPro ABAP;

  • How to bind webdynpro abap context attributes with interactive form table

    hi,
    I was created table in interactive form and add the all context attributues to each column of the table.
    And add the table into the subform.
    i want to bind the table using bapi values form Webdynpro abap.
    please give the detailed explanation.
    by
    Parthasarathi

    Hey Lingam,
    Check out this link...
    [Inserting a Table or Loop|http://help.sap.com/erp2005_ehp_04/helpdata/EN/4c/9cc19e5c874091a99790e540b06f3a/frameset.htm]
    It's for EhP4, so I'm not sure if it would apply.
    Hope this helps...
    Cheers,
    Kevin

  • Make entries in a table in webdynpro abap

    Hi all,
    We have a requirement to make multiple entries in a Table in webdynpro ABAP.
    We have created a table and inserted inputfield as cellEditor
    but at runtime it is being displayed in readonly mode we cannot enter anything in that inputfield.
    inputfield is binded with a context and table is not in readonly mode.
    Please help in this regards
    thanks & regards.....
    Gaurav Makin

    Hi Gaurav,
    Make sure the context node bound to the table has cardinality 0..N.
    When the app starts you probably need to read the table contents from the database or some other source and populate the contect node.
    The table will allow the user to edit values only for the rows that have a corresponding element in the context node.
    If the initial content is empty, i.e. no elements in the context node then the user will not be able to edit.
    You will need to either initialize the context node with a bunch of elements if the number of entries is fixed and known beforehand,  or provide a way for the user to create a new row.
    You can do this by adding a toolbar to the table with a create button with a CREATE action and the following method:
    method onactioncreate.
      data:
        lo_element type ref to if_wd_context_element,
        lo_node    type ref to if_wd_context_node.
      lo_node = wd_context->get_child_node( name = 'your node name here' ).
      lo_element = lo_node->create_element( ).
      lo_node->bind_element( new_item = lo_element set_initial_elements = abap_false ).
    endmethod.
    Regards... Lucio Menzel

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

  • How to insert the image or logo into the table as a field in webdynpro abap

    Hi Friends,
    Please tell me how to insert the image or logo into the table as a field in webdynpro abap.........

    Hi Alagappan ,
          In your view layout you take table UI element and then you bind it with some context nodes.
    The attributes of your nodes comes as a field.
    Now in these fields you can set various properties and image is one of them.
    Go to ->
    1. View Layout -> Right Click on ROOTUIELEMENTCONTAINER -> INSERT ELEMENT -> TABLE
    2. Right click on table -> Create Binding.
       Here you have to bind it with the appropriate context node.
    You will get two properties here
    a- Standard Cell Editor :- ( make it image )
    b- Standard properties :- ( If required set image properties ).
    3. If you want put image from out side then import it as a mime object and set the source of your table field ( used as a image )
    also have a look :-
    [Image Properties|http://help.sap.com/saphelp_nw04/helpdata/en/f3/1a61a9dc7f2e4199458e964e76b4ba/content.htm]
    Hope this will solve your problem.
    Reply if any case of any issue.
    Thanks & Regards,
    Monishankar C

  • Read Context  Node/Attribute option in webdynpro code wizard not available

    Hi Expets,
    I am new to webdynpro Abap, i have developed a small application to set default values for two fields. i want to use code wizard to implement the code. When i click on code wizard icon  in application tool bar, i have found lot of option like Method call in current controller, method call in used controller, Instantiate used component ... etc. But i didn't find the option Read Context Node/Attribute. Do i need to do any settings to get that. Kindly suggest. Your help will be greatly appreciated.
    Venkat

    Hi,
    Check the NW release,
    I checked with NW 7.02 - 2 tabs were available.
    with NW 7 - only 1 tab was available which you mentioned.
    Additional tab (Context ) might have been added after NW release 7.0.
    Regards
    Manas Dua

  • How can I change column name in ALV table in WebDynpro ABAP?

    Hi Everyone,
    I have created an ALV table in WebDynpro ABAP. I have created a context node and added the required attributes there - for the ALV display.
    Now I want to change one columnn name of the ALV table.... Currently it is showing the description of the data element, which I don't want to show. I cannot create a new DE only for this purpose.
    Please let me know how can I change the name of the column.
    Regards

    Hi,
    This may help you to define your own column text in the ALV Table of webdynpro.
    see the below code.
    Here 'STATUS_ICON' is the column of the the output display of the ALV Table of webdynpro.
    "change the label of the report.
    DATA: lr_weeknum TYPE REF TO cl_salv_wd_column.
    CALL METHOD l_value->if_salv_wd_column_settings~get_column
    EXPORTING
    id = 'STATUS_ICON'
    RECEIVING
    value = lr_weeknum.
    SET THE LABEL OF THE COLUMN
    DATA: hr_weeknum TYPE REF TO cl_salv_wd_column_header.
    CALL METHOD lr_weeknum->get_header
    RECEIVING
    value = hr_weeknum.
    CALL METHOD lr_weeknum->set_resizable
    EXPORTING
    value = abap_false.
    hr_weeknum->set_prop_ddic_binding_field(
    property = if_salv_wd_c_ddic_binding=>bind_prop_text
    value = if_salv_wd_c_ddic_binding=>ddic_bind_none ).
    set the text of the column
    CALL METHOD hr_weeknum->set_text
    EXPORTING
    value = 'C Form'.
    regarads,
    balu

  • Does AVL table supports popin in WebDynpro ABAP

    Hi,
    Just a short question, does AVL table supports popin in WebDynpro ABAP?
    I know that popin in supported in normal table in WD ABAP. Is this feature also available for ALV table?
    Thanks
    Yingzhi

    Hi Yingzhi Liu,
    Did you get any answers to this question?
    I'm also trying the same where we need to show additional details for an ALV table row. Is it possible to have a table popin in ALV? We are on 2004s release and implementing Web Dynpro for ABAP.

  • Standard program to display which tables are used by Webdynpro ABAP program

    Hi Gurus,
    I am working on a couple of enhancements in SAP Promotion Management for Retail (SAP PMR) which works on the principle of Floor Plan Management.
    I was wondering if anyone would know of a standard program to display the tables used by Webdynpro ABAP?
    (or)
    Where can I get info of SAP Tables associated to SAP PMR?

    Hi,
    I am not aware of any standard reports that displays the tables.
    If I have to view the tables, I would go to se80, give the package and view all the tables in the package.
    Regards,
    Daz.

  • How to refresh interal table in Webdynpro ABAP

    Hi all,
    I want to delete/free/refresh interal table in webdynpro abap.
    One of the form gave solution to pass blank internal table?
    I cleared node and itab in webdynpro, but internally SAP doesn't delete the context node and itab values.
    Please help me in how to refresh itab in webdynpro abap.
    Regards,
    Prasad

    Hi Srinivas,
    it doesn't work.
    I wrote like this in action list method.
    method lta_task.
    if not lcontext_node_task is intial.
    context_node_task->invalidate().
    endif.
    select.......
    populate data into internal table lt_task_output_table .
    if not lt_task_output_table  is inital.
        context_node_task = wd_context->get_child_node( name = 'TASK_PER').
        context_node_task->bind_table( wd_this->lt_task_output_table ).
    endif.
    endmethod.
    Starting of the mehod i have written to inavlidate, before upating the itab
    but donesn;t work. Where should I write the code
    Reagards,
    Prasad

  • How to read the excel file using webdynpro abap?

    Hi,
    how to read and modify excel file using webdynpro abap?
    Regards,
    Pavani

    For reading excel file follow the steps :
    1. Use a File upload UI element and bind it with xstring.
    2. Now your excel will be uploaded and stored in Xstring.
    3. Convert Xstring to String data using FM 'HR_KR_XSTRING_TO_STRING'.
    4. Now split the string at new line so as to make an internal table .
      Ex . SPLIT l_string  AT cl_abap_char_utilities=>newline INTO TABLE it_table.
      here it_table is type table of string.
    5.now loop at the internal table and separate the content of this table separated by tab.
      Ex. SPLIT wa_table AT cl_abap_char_utilities=>horizontal_tab INTO TABLE it_new.
    it_new type string_table.
    6. For more info , refer this thread :
    Re: How to upload excel file in Webdynpro application using ABAP

  • Webdynpro abap- navigation to context node

    Hello all,
    I am a new user for Webdynpro - abap. I was trying to set a default value to a input field. I am using WDDOINIT method for navigation to context node FLIGHTINFO. But i am not getting the exact idea behind the navigation at code level. Also not clear about get element at lead selection for context node FLIGHTINFO.
    Please provide inputs in this case.
    Thanks,
    Yogesh

    Hi
    There can be many nodes in the context, and many elements in each node. In order to set the default value to one of the attributes, we need to proceed as follows:
    1) Get the reference of node, whose attribute needs to be defaulted. Following is the code for the same:
    DATA lo_nd_cn_node TYPE REF TO if_wd_context_node.
    navigate from <CONTEXT> to <CN_NODE> via lead selection
    lo_nd_cn_node = wd_context->get_child_node( name = wd_this->wdctx_cn_node ).
    wd_context has the reference of context node (root node). It gives the reference of desired node (its child node) using method get_child_node. We pass the name of desired node as parameter of this method.
    2) In similar way we proceed to get the reference of desired element using following code:
    DATA lo_el_cn_node TYPE REF TO if_wd_context_element.
    get element via lead selection
    lo_el_cn_node = lo_nd_cn_node->get_element( ).
    3) This element may have many attributes. We set the default value to attribute of selected node using following code:
    set single attribute
    lo_el_cn_node->set_attribute(
    EXPORTING
    name = `CA_TEST` " name of attribute where input field is bound
    value = lv_ca_test ). "Value that you want to set as default
    Follow the links for more help:
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/46/14cf058d484250e10000000a1553f6/content.htm
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/46/1b994f0c475a67e10000000a1553f7/content.htm.
    Regards,
    Saket.

  • WebDynpro Abap table not rendered correctly inside portal iView

    Hi,
    I have a webDynpro Abap application with a table that contains radio buttons as table cell editors.
    When I run the application directly it looks fine, but when I run it inside a portal iView the radio button allignment changes to the top of the table cell.
    Please help.
    Kind Regards,
    Dirk Naude

    I found that this could be fixed by changing the portal theme using the theme editor, specifically changing the table cell padding property.

  • WebDynpro ABAP : Table with DropDownByKey does not have neat focus

    Hi Experts,
    I have a table, with one column of type dropdownbyKey, i need this so that i can display the DESCRIPTION rather than key. Issue is when i select a ROW in this table i see a special YELLOW BG COLOR on all columns except the column that has drop down by key   it is first thing enduser points out as issue ???
    Any help would attract points

    >
    ramkumarvalluru wrote:
    > Hi Eureka,
    >
    > I am new to webdynpro abap area.Please provide me step by step procedure for working on Dropdown by key,Check boxes  Radio buttons aand all UI elements.
    >
    > Please provide me.
    First of all, please don't attach new questions to existing threads. Second asking for step by step procedures on all UI elements is really outside the scope of a forum posting and asking for too much.  If you are that new to Web Dynpro ABAP, then start by reading the online documentation, the WDA WIKI section, and the WDA eLearnings.

Maybe you are looking for

  • How to Change a Default Value from Drop Down Box displayed in Web Dynpro?

    Hi, How to Change a Default Value from 'High' to 'Low'  in a Drop Down Box for RANGE field displayed in Standard Web Dynpro Component.  I saw a Default Value set for a RANGE field  in View Context When I select that field and click on Display. I am s

  • Sent the wrong laptop

    Hi,     I just returned from my Best Buy store from what I thought was going to be an easy transaction.   It was anything BUT easy. Quite disheartening, actually. On 3/13/15, I received the refurbished laptop that I ordered online,.  I  promptly call

  • File upload & download through web Dynpro

    Hai All,      Now i am working in webDynpro 2.0.9. For file upload and download through webdynpro "resource" is used.But in my webdynpro version 2.0.9. "resource" is not possible.so tell me how to upload & download by using this version & what is the

  • How do i scroll through calendars appointments using ios 7.1.1

    I just upgraded my iphone 4s to ios 7.1.1 and lost the ability to scroll through appointments in my calendars, with the upgrade you have to view day by day and cannot scroll through the week, the month or the year to see what you have coming up for a

  • I'm using the Adobe Illustrator 2014 version and having a problem about fonts.

    Hello. I have a text file of Hindi, Arabic, Panjibi, Farsi and Uldo, and need to put a languages to the Illistration, but even if I have a font on ,my computer, when I copied a word from the MS word and Paste to the Illustrator, it pasted to weird la