How can I bind a dynamic attribute of a context node to ALV?

Hi all,
I'm trying to show data with Webdynpor ALV, but i met a question which blocked me. The situation is that there is a static context node and it's mapped to WD ALV, while programming I create a dynamic attribute to the context node. The dynamic column can be shown on the UI, but there is no any data in it. How can i deal with it?
Thanks a lot!
Edited by: Julia Zhu on Dec 3, 2009 7:48 AM

Hi Julia,
Welcome to SDN.
Post it in the ABAP webdynpro forum to get quick replies. Web Dynpro ABAP
Also search in sdn as there are chances that somebody has already posted the queries related to same issue.
Regards,
Swarna Munukoti.

Similar Messages

  • Adding dynamic attributes to static context node

    Hi All,
    I have defined a context node LINES with several attributes. This is done staticly during developmenttime.
    During run-time node LINES is extended with several attributes dynamicly. See below:
    10     HEADER_GUID               ->
    11     DETAIL_GUID               ->
    12     EXTERNAL_ID               ->
    13     OBJECT_TYPE               ->
    14     IN_OUT_PLAN               ->
    15     TRAFFIC_LIGHT_1               ->
    16     TRAFFIC_LIGHT_2               ->
    17     TRAFFIC_LIGHT_3               ->
    18     TRAFFIC_LIGHT_4               ->
    19     _LOCATION          \TYPE=STRING     ->
    20     _ZZTOPGROUPING     \TYPE=STRING     ->
    21     _STATUS          \TYPE=STRING     ->
    22     _100000200          \TYPE=STRING     ->
    19..22 are added dynamicly.
    I have an internal table that matches de new context. This <fs_tb_tree_new> I want to bind like:
    *&- bind table
      lr_node->bind_table( new_items =  <fs_tb_tree_new>
                           set_initial_elements = abap_true ).
    In <fs_tb_tree_new> the dynamicly added attrbutes contains values e.g. (the static attributes also have values via <fs_tb_tree_new>):
                         _LOCATION   _ZZTOPGROUPING  _STATUS              _100000200                   
    5     Africa     0002     Reporting Entity     0.000
    6     Russia, CIS     0003     Identify                          0.000
    An ALV presents the values of the attribute. But.... only the values of the static part are presented, not the dynamic attributes added during runtime.
    Please advise what I forget or do wrong .
    Thanks in advance.
    John

    I solved the issue:
    If you use a combination of static attributes added with dynanic attributes (during runtime) for dynamic ALV, I advise to create a new node and bind the values to this new created node:
    Cheers, John
    wd_this->extend_context( EXPORTING im_struc_descr =  lr_cl_abap_structdescr
                               IMPORTING ex_node = lr_node_alv ).
    Method:
    *&- Create new dynamic context LINES_DYN
    Node for alv-table
      lr_node_info = wd_context->get_node_info( ).
      CALL METHOD lr_node_info->add_new_child_node
        EXPORTING
          name                  = 'LINES_NEW'
          static_element_rtti   = im_struc_descr
          is_static             = abap_true
          is_multiple           = abap_true
          is_multiple_selection = abap_false
        RECEIVING
          child_node_info       = lr_subnode_info.
    lr_node = lr_subnode_info->get_parent( ).
      lr_node = wd_context->get_child_node( 'LINES_NEW' ).
      ex_node = lr_node.
    *&- bind table for alv
      lr_node_alv->bind_table( new_items =  <fs_tb_tree_new>
                               set_initial_elements = abap_true ).

  • How can I fill combobox dynamically?

    I have a combobox which I have to fill dynamically. The data source I have has multiple columns.
    How can I bind this with combobox?
    How can I set which column has to bind with combobox label and which with data?

    <mx:ComboBox dataProvider="{myDataProvider}" labelField="myDatabaseField" />

  • How can I do a dynamic include of a page fragment?

    I have a technical support website with a lot of simple html pages. What I want to do is hyperlink from the index page to another page, which would display these html pages as a page fragment, dynamically based on a session bean set by the hyperlink.
    I basically want to do this, if it was possible:
    <jsp:directive.include file="#{SessionBean1.pageToDisplay}"/>
    Now the FAQ's has a topic "How can I do a dynamic include of a page fragment?", which would seem to answer my question.
    But this is all it says, and it makes no sense to me. Could someone please translate? :)
    "Using a page fragment file (but using instead of the usual Creator approach) will accomplish a dynamic include."

    Here is 1 solution:
    First add this to the jsp:root tag:
    xmlns:c="http://java.sun.com/jsp/jstl/core"
    Then surround the page fragment directive with something like this:
                            <div style="position: absolute; left: 24px; top: 408px">
                                <c:if test="${SessionBean1.count > 0}">
                                    <jsp:directive.include file="testPF.jspf"/>
                                </c:if>
                            </div>

  • How can I apply text position attributes (e.g. lower third) to more than one title at a time?

    How can I apply text position attributes (e.g. lower third) to more than one title at a time?

    jhb3243
    What version of Premiere Elements are you using and on what computer operating system is it running?
    In the case of this theoretical lower third to be applied to more than one title at a time
    a. Is there text in the lower third besides a graphic of some kind?
    b. Are all the titles to which this lower third is to be applied all together on the Timeline or scattered?
    If no text in lower third and titles all together, then, with text titles on Video 1 and lower third on Video 2, drag out the lower third to cover the length of the text titles on Video 1.
    I do not find "lower third" title files to be in the same category as certain effects where the Copy and "Paste Attributes" or "Paste Effects and Adjustments" lend themselves so well.
    Let us see what others have to say about all this. I will continue to experiment with what you seek and how you would prefer to get there. I am not optimistic but I will try.
    Thanks.
    ATR

  • How can I add a custom attribute to a catalog area? (CRM Isa Sales)

    Gents,
    How can I add a custom attribute to a catalog area? (CRM Isa Sales)
    Actually I would like to use the Catalog Area Type (maintained in trx COMM_PCAT_ADM on Catalog Area Header level). This field doesn't seem to be available in J2EE webshop. (The field documentation says it is for documentation purposes only so I don't expect it to be transferred).
    As this field is not readily available, I would like to add is as an attribute to the Catalog Area. BADI's PCAT_IMS_FEED_ATT and PCAT_IMS_FEED_VAL seem to indicate that it should be possible to add additional fields not only on product level, but also on Area level:
    Example implementation code:
    method IF_EX_PCAT_IMS_FEED_ATT~READ_NEW_FIELDS.
    * Example, how to add new attributes to a indexcategory
    * Possible levels are 'C'ategory and 'P'roduct.
    * Field 'VALUE' carries the attributetype ('S'tring, 'I'ntegar or
    * 'F'loat)
    * Structure 'IS_OBJECTS' carries actuall identifiers
      data: ls_fields        type comt_pcat_ims_feed_ux.
      case iv_level.
        when 'C'.                        "Category Level
    *     no new field
        when 'P'.                        "Product Level
          ls_fields-field = 'CUSTOMER_EXIT_FIELD'.
          ls_Fields-value = 'S'.
          append ls_fields to ct_fields.
    *     exproduct fields
          ls_fields-field = 'REMAN_ABL'.
          APPEND ls_fields TO ct_fields.
          ls_fields-field = 'EXCH_BUS'.
          APPEND ls_fields TO ct_fields.
      endcase.
    endmethod.
    However, when I create an implementation and add some code in the when 'C' part, the attributes do not seem to get transferred. (I've checked in the debug mode of the developer studio).
    - My example code:
    METHOD if_ex_pcat_ims_feed_att~read_new_fields.
    * Possible levels are 'C'ategory and 'P'roduct.
    * Field 'VALUE' contains the attributetype
    * ('S'tring, 'I'ntegar or * 'F'loat)
      DATA:
      ls_fields LIKE LINE OF ct_fields.
      CASE iv_level.
        WHEN 'C'.                        "Category Level
          ls_fields-value = 'S'.
          ls_fields-field = 'ZTEST'.
           APPEND ls_fields TO ct_fields.
        WHEN 'P'.                        "Product Level
      ENDCASE.
    ENDMETHOD.
    and:
    METHOD if_ex_pcat_ims_feed_val~read_new_fields.
      CASE iv_level.
        WHEN 'C'.
         ls_fields-field = 'ZTEST'.
         ls_Fields-value = 'Value 1'.
         append ls_fields to ct_fields.
        WHEN 'P'.
      ENDCASE.
    ENDMETHOD.
    In the ABAP debugger, I can see that my code is touched during initial and delta replications, however, after replication, the fields do not show up in the Java debugger.
    Any ideas?
    regards,
    Wilco Menge

    Hi,
    How can I customize the /bin/wcmcommand or how can I make use of [2] to create a custom WCMCommand?
    I think the "formUrl" is to post those input value to the jcr repository?
    var createDialog = {
            "jcr:primaryType": "cq:Dialog",
            "id": CQ.Util.createId("cq-createdialog"),
            "title":CQ.I18n.getMessage("Create Page"),
            "formUrl": CQ.shared.HTTP.externalize("/bin/wcmcommand"),
            "params": {
                "cmd":"createPage",
                "_charset_":"utf-8"
    I have added a field called "starred"
    Moreover, when I using the firebug to trace the post command, I can see that the starred value is posted also.
    :status
    browser
    _charset_
    utf-8
    cmd
    createPage
    label
    b
    parentPath
    /content/keyword_elaboration
    starred
    c
    template
    /libs/collab/commons/templates/form
    title
    a
    Source
    cmd=createPage&_charset_=utf-8&%3Astatus=browser&parentPath=%2Fcontent%2Fkeyword_elaboration&title=a&label=b&starred=c&template=%2Flibs%2Fcollab%2Fcommons%2Ftemplates%2Fform
    However, when I go to the crxde to view the node's attribute, the properity starred is not created
    Are there anything I did wrong or missing?
    Thanks.
    Message was edited by: aslkit

  • How can i add a dynamic header value in to the pdf

    I am using a AssemblerService (Invoke DDX) to modify a Pdf file. How can i enter a dynamic value into the header using ddx ?
    DDX used
    <DDX xmlns="http://ns.adobe.com/DDX/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://ns.adobe.com/DDX/1.0/ coldfusion_ddx.xsd">
        <PDF result="Out1">       
            <PDF source="Doc2">
                <Header>
                    <Right>
                        <StyledText>
                            <p>"here i need to add a dynamic data from the process"</p>
                        </StyledText>
                    </Right>
                </Header>
            </PDF>
        </PDF>
    </DDX>
    Thank You.

    Insertion Point is a placeholder Object which is used to dynamically replace while assembling. Search through the assmber guide to get any hints.
    Nith

  • If I know a name of class , how can I get it's attribute and methods

    If I know a name of class , how can I get it's attribute and methods as well as it's detail information by ABAP code ?
    Best regards ,

    HI, Chandra ,
    Thank you very much , I can get the result
    Best regards,
    DATA lo_class TYPE REF TO cl_oo_class.
    DATA lt_attribs TYPE seo_attributes.
    FIELD-SYMBOLS: <attrib> TYPE vseoattrib.
    TRY.
        CREATE OBJECT lo_class
          EXPORTING
            clsname = 'CLASS_NAME'.
      CATCH cx_class_not_existent .
    ENDTRY.
    lt_attribs = lo_class->get_attributes( ).
    BREAK-POINT.

  • How can I create classes dynamically?

    Guys
    My requirment is I want to create classes and their instancess too dynamically. First is it possible in Java?
    If so, then my next question is how can I refer such dynamically created classes in my code to avoid compilation error.
    Thanks in advance
    Regards
    Sunil

    For other ways to generate classes on runtime you could also have a look at BCEL:
    http://jakarta.apache.org/bcel
    And dynamic proxies:
    http://java.sun.com/j2se/1.4.2/docs/guide/reflection/proxy.html
    If so, then my next question is how can I refer such
    dynamically created classes in my code to avoid compilation
    error.Generally the classes that you load should either implement some interface or extend some abstract class you know of at compile time so that the compiler knows what methods are available for use. If that's not possible you can only use reflection.

  • JDev TP3 / UML Class Diagram / How can I specify a derivative attribute?

    Hello,
    I'm trying to put derivatives (or calculated) attributes such as "age" or "price" in a class of UML diagram. In all of UML books that I've seen, a derivative attribute is represented with a "/" and the attribute's name. For example, "/age" or "/price". But in the class diagram of JDeveloper I can't put "/" in the name of attribute. So, how can I specify a derivative attribute?
    Thanks in advance,
    JVN

    Unfortunately, it is not possible to denote derived attributes in TP3. Bug 6915067 has been logged to address this in a future version.
    Thanks, Guus (JDev PM)

  • How Can I Split Multi-Valued Attributes in Syndicator Map?

    Is the option to split multi-values only available for fields and not on attributes that are also multi-valued?

    How Can I Split Multi-Valued Attributes in Syndicator Map?
    Currently this feature are not in MDM you can split this value by using any middleware software for e.g. PI
    Is the option to split multi-values only available for fields and not on attributes that are also multi-valued?
    Correct, Multi-values option only available for field not for attributes
    Thanks,
    Jignesh Patel

  • Bind Dynamic Table To a Context Node

    Hello,
    I created an internal dynamic Table. I want to show this table in an ALV-Table. So I want to bind it to a context node.
    I create the context node attributes by this:
    lr_node_info ?= lo_nd_template_exp->get_node_info( ).
    *Type of table type and context type have to be the same
    LOOP AT lt_plchar INTO ls_plchar.
      clear lv_text.
      lv_text = ls_plchar-plchar.
      TRANSLATE lv_text TO UPPER CASE.
      ls_fieldcatalog-fieldname = lv_text.
      ls_fieldcatalog-inttype  = 'C'.
      ls_fieldcatalog-intlen   = '10'.
      APPEND ls_fieldcatalog TO lt_fieldcatalog.
      ls_attribute-name = lv_text.
      ls_attribute-type_name = 'CHAR10'.
      lr_node_info->add_attribute( EXPORTING attribute_info = ls_attribute ).
    ENDLOOP.
    So I create a fieldcatalog and the attributes at once.
    Then I generate the table with  this:
    CALL METHOD cl_alv_table_create=>create_dynamic_table
           EXPORTING
             it_fieldcatalog = lt_fieldcatalog
           IMPORTING
             ep_table = <fs_data>
           EXCEPTIONS
             generate_subpool_dir_full = 1
             OTHERS = 2  .
      IF sy-subrc <> 0.
      ENDIF.
    * So  now points to our dynamic internal table.
      ASSIGN <fs_data>->* TO <fs_1>.
    * Next step is to create a work area for our dynamic internal table.
      CREATE DATA new_line LIKE LINE OF <fs_1>.
    * A field-symbol to access that work area
      ASSIGN new_line->*  TO <new_line>.
      Data: copy_table type ref to data.
      field-symbols: <copy_table> type standard table.
      create data copy_table like table of <new_line>.
      assign copy_table->* to <copy_table>.
    ok, nice. when i now bind the table to  <copy_table> to lo_nd_template_exp it all works fine. But i also want to but the data into the table.
    This also works. When I debug, I can see the table filled with the values. But then there's always this error:
    Invalid operand type for the MOVE-CORRESPONDING statement.
    Ok, I have read, that the types may be  not fit. But I don't know why and how i can solve it.
    Do you have any ideas?

    Hi,
    I've the same problem: I must create all attribute of my node at run-time and then create alv.
    I use the method:
    DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
    DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
      lo_cmp_usage =   wd_this->wd_cpuse_alv( ).
      IF lo_cmp_usage->has_active_component( ) IS INITIAL.
        lo_cmp_usage->create_component( ).
      ENDIF.
    Pass context node to ALV
      lo_interfacecontroller =   wd_this->wd_cpifc_alv( ).
      lo_interfacecontroller->set_data( node_lenght ).  " node_lenght is my dynamic node
    But I receive this message error:
    Invalid operand type for the MOVE-CORRESPONDING statement.
    Method: IF_WD_CONTEXT_NODE~GET_STATIC_ATTRIBUTES_TABLE of program CL_WDR_CONTEXT_NODE_VAL=======CP
    Method: GET_REF_TO_TABLE of program CL_SALV_WD_DATA_TABLE=========CP
    Method: EXECUTE of program CL_SALV_BS_SERVICE_MNGR_TABLE=CP
    Method: EXECUTE of program CL_SALV_WD_SERVICE_MANAGER====CP
    Method: APPLY_SERVICES of program CL_SALV_BS_RESULT_DATA_TABLE==CP
    Method: REFRESH of program CL_SALV_BS_RESULT_DATA_TABLE==CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~MAP_FROM_SOURCE_DATA of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~MAP_FROM_SOURCE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~UPDATE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_VIEW~MODIFY of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    What can I do??? My node doesn't static attribute....
    Thank,
    Federica.

  • Removing the dynamic attributes from view context

    Hi,
    I have added an attribute dynamically using the following line of code in wdDoModifyView():
    wdThis.wdGetContext().getContext().getRootNodeInfo ().addAttribute(<attributename>, <datatype>);
    Now I want to remove the dynamically created attribute from the context.
    Pls suggest me in this regard.
    Regards,
    Ramesh.

    Hi Ramesh,
    You can use the following code to remove the attribute dynamically:
    Iterator itr = wdContext.node<NodeName>().getNodeInfo().iterateAttributes();
    <i>// If the node where you are making these attributes is a context node then just do:</i>
    // <b>wdContext.getNodeInfo().iterateAttributes()</b>, <i>for iterator</i>
    while(itr.hasNext()){
         IWDAttributeInfo attrInfo = (IWDAttributeInfo)itr.next();
         attrInfo.remove();
    This will solve your problem.
    Regards
    Pravesh
    PS: Please consider rewarding points if helpful and solved.

  • How can we assign different colours to different records(line items) in alv

    how can we assign different colours to different records(line items) in alv reporting?

    Hi Friend,
    Please see this SDN Wiki  for setting the color in ALV :[http://wiki.sdn.sap.com/wiki/display/ABAP/ABAP-DevelopingInteractiveALVReportusing+OOABAP]
    There are so many SDN Wiki's on this  just try with search  Alv Color display in SDN,
    Regards,

  • How to read the attribute in another context node from setter method

    Hi,
    As part of the  requirement
    i need to read the STRUCT.E_MAIL ( attribute ) present  in  INDEPENDANTEMAIL context node  from  the SET_S_SRUCT method of the context node  HEADER.
    I tried th following but it didnt work out....
    Get the Custom Controller Path
    *lr_cuco ?= controller->get_custom_controller( controller_id = 'BP_HEAD/IndComm').
    *IF lr_cuco IS BOUND.
    Get the Entity
    *lr_entity ?= lr_cuco->typed_context->independantemail->collection_wrapper->get_current( ).
    *ENDIF.
    *CHECK lr_entity IS BOUND.
    Get the Trade Event Type.
    *lv_email  = lr_entity->get_property_as_string( 'E_MAIL' ).
    also i tried ...
    data:
    *lv_value type string,
    *lr_property type ref to if_bol_bo_property_access.
    *lr_property = collection_wrapper->get_current( ).
    *lv_value = lr_property->GET_PROPERTY_AS_STRING( importing iv_attr_name = 'E_MAIL'
                                                returining  ev_result    = lv_email ).
    but it didnt workout ......
    Any suggestions   ...................
    Regards,
    Sijo...

    Hi,
    Both Context node are available in view then refer this link.
    Reading Attributes from different context nodes in the same view
    Relationship name for context node INDEPENDENTMAIL is 'BuilIndependantEmailRel'
    Regards
    Gaurav

Maybe you are looking for

  • How do I create a dynamic 2xN array?

    Hey All, I've got a question that seems pretty easy in concept but for some reason I just can't quite figure it out. All I want to do is run through a matrix using for loops and if a value in that matrix is equal to the value I set (my cutoff value),

  • Can't open a New (additional) tab today! What'up with that?

    In this latest version, the '+' at the end on the line no longer opens a new tab. Nothing happens except the display that says it will open a new tab. I'm on version 30 Beta and that says that I am up to date. I thought that I saw a 'flash' that vers

  • Encoding Quality concerns

    Hi all.. Am running iDVD `09 and have noticed allot of posts regarding which encoding quality "better" than another. Apple's help, goes by what this forum claims, Best Quality: up to 60 minutes, High Quality: 60 to 120 minutes (1 to 2 hours), or Prof

  • In MSC2n - Get date in the classification tab from  basic data 1 tab

    Hi All, My requirement is as follows. WHen I execute the tcode MSC2N, Relevent data for the fields Batch, Material and Plant and hit the enter Key. This displays Tabs like BASIC DATA1, BASIC DATA 2 , CLASSIFICATION  etc. when I change the production

  • MSI k9nd speedster running slow

    Hi All, I recently acquired the K9nd speedster 1.... AMD opteron 2 x 8354 2.2ghz quad cores, 2x Arctic 64pro fans 8mb Bios ver 2.20 4GIG ECC Palit Nvidia 9800 GTX+ 512mb.....This is installed on the lower PCI e slot.....as the sata cables get in the