Binding context attributes to be used in PDF  Report

Hi
I have the following requirement:
Context:
HeaderNode
       EmployeeIDAtt
       DataNode
              EmployeeIDAtt
              ChildName
Than basically I want to display a table of the results in a PDF document.
The PDF generates fine, but I need the data displayed in a particular format:
I need the employeeID displayed above the table header. Then the Child names displayed in the table, then if the employeeID changes, a new table must be displayed with the new employeeID above the table header. Basically like this:
00012
<u>ChildName</u>
Anton
Vincent
00013
<u>ChildName</u>
Ryan
Caryn
Jared
My question is this: How to I bind the HeaderNode-EmployeeID = DataNode-EmployeeID in the context? Or is there another way of linking these so that the correct names display below the correct EmployeeID?
thanks in advance
Anton Kruse

In the same way that you have displayed formula, decalre it and then use as you want. eg
//@SV_Calc
whileprintingrecords;
shared numbervar yourvar;
yourvar*
Ian

Similar Messages

  • Error on binding context attribute dinamically

    This loop get each element of the node and select one element:
    for( int i=0; i< wdContext.nodeS_Requisicaocompra_1().size(); i++ ){
                   wdContext.nodeS_Requisicaocompra_1().setLeadSelection( i );
                   elem = wdContext.currentS_Requisicaocompra_1Element();
    If I display the element value it happen with sucessfully:
                   textView = (IWDTextView) view.createElement(IWDTextView.class);
                   textView.setText( elem.getTxz01() );
                   itens.addChild(textView);     
    But I need to bind the values and I doesn´t work, witch is the correct way to bind ?
                    textView = (IWDTextView) view.createElement(IWDTextView.class);
                    textView.bindText(  wdContext.nodeS_Requisicaocompra_1().getNodeInfo().getAttribute( "Txz01" ) );
                    itens.addChild(textView);          

    Hi,
    Can u try as below?
    textView = (IWDTextView) view.createElement(IWDTextView.class);
    textView.bindText("nodeS_Requisicaocompra_1.Txz01" );
    itens.addChild(textView);
    For more help:
    http://help.sap.com/saphelp_NW70EHP1/helpdata/en/96/89a74052033713e10000000a155106/content.htm
    Regards,
    Charan

  • Using dynamic context attributes with flashisland

    I recently started looking at flashislands.
    Going through the SDN tutorials on this topic, I noticed that the declarations of GACDATASOURCE and GACPROPERTY properties inside web dynpro and their counterpart variables inside flex are a bit static (all naming and binding is done at design time).
    So I'm asking if there's a way inside flex to dynamically capture the values of the attributes of a web dynpro context node that is bound to an ArrayCollection variable inside flex without knowing the names and the amount of the attributes of the context node?
    Here's my situation:
    I have a context node (REPORT_DATA) inside web dynpro that at design time has no attributes.
    The attributes and their names are created dynamically at runtime.
    It is even so, that over time the amount of attributes may vary.
    Inside the web dynpro, the contents of this context node (REPORT_DATA) are shown in a (dynamically built) table.
    Besides using the table, I'm trying to show the same contents as a piechart and as a columnchart in a flashisland.
    The ROOTUIELEMENTCONTAINER of the FlashIsland view in web dynpro only contains a GACDATASOURCE element at design time.
    The 'dataSource' property of this GACDATASOURCE is bound to the context node REPORT_DATA.
    The 'name' property of this GACDATASOURCE is bound to an ArrayCollection variable inside flex (named dataSource).
    So much for the static part created at design time.
    At runtime inside web dynpro the correct GACPROPERTY's are created, based on the - over time changing - amount and the names of the context node.
    Suppose my REPORT_DATA context node at runtime starts with 3 attributes: ATTR1, ATTR2 and ATTR3
    Also suppose the node contains 2 elements: [ {"1_1", "1_2", "1_3"} , {"2_1", "2_2", "2_3"} ]
    The dataSource variable inside flex also contains 2 entries with 3 elements each.
    The code to show the value of (for example) the first element of all entries inside the ArrayCollection variable would be:
    +for each( var o:Object in dataSource) {
    var s:String = o.ATTR1;
    Alert.show( "the 1st value = " + s ); // 1_1 for the first entry, 1_2 for the second
    }+
    I can then use the myAC variable inside flex as dataprovider for various other objects.
    This works fine.
    But inside flex I can only capture the value of an attribute when I know its name at design time (like ATTR1 in the sample code above).
    And that's not what I want.
    Inside flex I want to capture the value of the context attributes dynamically in a (correctly typed) flex variable without knowing the names and the amount of the context attributes.
    Is this possible?
    Thanks in advance for - any - response.
    Bart.

    Hi again,
    I tried the same thing by creating a dummy context node without any attributes, and adding all attributes at runtime using the add_attribute method. In that case too, it doesnt work. All the attributes are available in the dynamic attributes of the node element, but are not getting displayed.
    Any help would be greatly appreciated. Thank you.
    regards,
    nithya

  • Context attributes where used list

    hello,
    is there a way to find out the no longer used context attributes?
    I need something like a where used list mechanism for context attributes.
    My aim is to delete all context attributes which are not bound to any ui elements or not accessed in the abap coding.
    In a larger wda it is a problem to identify the not used context attributes.
    Thank you.
    Kind regards.

    This is a new feature in NetWeaver 7.0 Enahncement Package 2 - but not available before then. It works at the node level however - not the attribute level.  It tells what views and components (cross component context binding) the node is bound to as well as any methods that reference the content node in coding (as long as you use the generated constants for access - such as wd_context->get_child_node( name = wd_this->wdctx_* ) ).

  • WDJ: binding image field to context attribute

    Dear all,
    I filed a form with an image field to allow the user to insert a picture on the form from his PC.
    The form is shared by several Web Dynpro Java View.
    What is the right type of the context attribute  for binding the image field of the form?
    Thanks for your time.
    Regards,
    Mirco

    Hi Chintan,
    I also think it was a binary. but I do not, partly because the image field object is bindable with any data context  (I tried so far with integer, string, binary)
    To share the image between two Web Dynpro vew I used "usePDF" mode but I would like to bind the image with a context attribute so I can use "updateData" mode instead of "usePDF" mode
    Regards,
    Mirco

  • Using Static Variable against Context Attribute for Holding IWDView

    Dear Friends,
    I have a method which is in another DC which has a parameter of the type IWDView. In my view, I will have an action which will call the method in another component by passing the value for the view parameter. Here, I can achieve this in 2 types. One is - I declare a static variable and assign the wdDoModifyView's view as parameter value and I can pass this variable as parameter whenever calling that method or the second way - create an attribute and assign the same wdDoModifyView's view parameter as its value. Whenever I call this method, I can pass this attribute as parameter. What is the difference between these two types of holding the value since I am storing the same value i.e., wdDoModifyView's view parameter. But when I trigger the action from different user sessions, the first type of code (using static variable) prints the same value in both the sessions for view.hashCode() and View.toString(), but the same is printing the different values when I pass the attribute which holds the view parameter.
    Clarification on this is highly appreciated
    The problem I face is when I use static variable to get the view instance and export the data using the UI element's id, the data belonging to different user sessions is mixed up where as when I use Context Attribute, the same problem doesn't arise. I want to know the reason why it is so. Is there any other place or way where I can get the current view instance of each session instead of wdDoModifyView?

    Hi Sujai ,
    As you have specified the problem that we face when we use  static attributes, when end users are using the application .
    Static means i  have n number of objects but the static variable value will remain same every where.
    when it is context attribute for every object i.e nth object you have a nth context attribute i mean nth copy of the context attribute.
    so every user has a unique Iview parameter , when context is used and
    when static is used  , assume you have userA , his iview is set this intially  and u have another user B , when he is using  , since the variable is static and when you access this variable you will get the value of userA.
    Regards
    Govardan Raj

  • How to bind the attribute in the context to a dynamic created element?

    Hi, experts,
    There are some attributes in the node context(ee_node) that contained the attribute named "ANSSA" in the view(test_view) in the WDA for abap. In the method modifyview of the view(there is a transfered parameter that represent the name of "ANSSA")
    I want to create a dynamic element(inputfield) in the test_view. The element need bind the context attribute (ANSSA).Through the transfered parameter(para), I only know the name of the attribute binded. 
    How can I bind the attribute of the context in the following code?
    METHOD modifyview .
    *importing para type string.
    *importing m_view type ref to  if_wd_view.
    data wd_inputfield type ref to cl_wd_input_field.
    create one element automatically in the view.
      wd_inputfield = CL_WD_INPUT_FIELD=>NEW_INPUT_FIELD(
                                        view = m_view
                                        id = para
                                        BIND_VALUE = ???
    ENDMETHOD.
    I don't know how to replace the "???" in the method modifyview? Do you give me some hint for it?
    You can reply back to me via e-mail if you think we should discuss this internally at [email protected] or [email protected]
    Thanks.
    Best regards,
    tao

    Hi, Suresh,
    Thanks a lot for your help.
    The last mail have some errors. Now, I modify my code error. The following is my new code in the wddomodifyview method in the ADDR_AUTO_DISP_VIEW view.
    Now, I modify my code. The following is my new code in the wddomodifyview method in the ADDR_AUTO_DISP_VIEW view.
    METHOD wddomodifyview .
    importing view   type ref to if_wd_view.
      DATA      transparent_container           TYPE REF TO cl_wd_transparent_container.
      DATA      inputfield                      type ref to cl_wd_input_field.
      transparent_container ?= view->get_element( `TRANSPARENT_CONTAINER` ).
      transparent_container->set_visible(
        EXPORTING
          value = if_wdl_core=>visibility_visible ).
    wd_this->SET_DYNAMIC_INPUT(
       EXPORTING
         inputfield_ID =  'ANSSA'
       IMPORTING
         INPUTFIELD    =  inputfield
    **************The web page will occur error when running the WDA as soon as I write the code.***********
      transparent_container->add_child( THE_CHILD = inputfield ).
    ENDMETHOD.
    The following is the code of the SET_DYNAMIC_INPUT method.
    method SET_DYNAMIC_INPUT .
    *importing
    *INPUTFIELD_ID    type STRING
    *exporting
    *INPUTFIELD    type ref to CL_WD_INPUT_FIELD
    Data binded_context       type string.
    concatenate 'ADDR_AUTO_DISP_VIEW.EE_ADDRESS.' INPUTFIELD_ID into binded_context .
    inputfield = CL_WD_INPUT_FIELD=>NEW_INPUT_FIELD(
    id = inputfield_id
    read_only = abap_true
    BIND_VALUE = binded_context
    endmethod.
    When I run the WDA, The web page occuring the error information:
    Note
    The following error text was processed in the system DEV : Access via 'NULL' object reference not possible.
    The error occurred on the application server devserver_DEV_00 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: IF_WDR_VIEW_ELEMENT_ADAPTER~SET_CONTENT of program /1WDA/L8STANDARD==============CP
    Method: IF_WDR_VIEW_ELEMENT_ADAPTER~SET_CONTENT of program /1WDA/L7STANDARD==============CP
    Method: IF_WDR_VIEW_ELEMENT_ADAPTER~SET_CONTENT of program /1WDA/L8STANDARD==============CP
    Method: IF_WDR_VIEW_ELEMENT_ADAPTER~SET_CONTENT of program /1WDA/L8STANDARD==============CP
    Method: IF_WDR_VIEW_ELEMENT_ADAPTER~SET_CONTENT of program /1WDA/L7STANDARD==============CP
    Method: IF_WDR_VIEW_ELEMENT_ADAPTER~SET_CONTENT of program /1WDA/L8STANDARD==============CP
    Method: IF_WDR_VIEW_ELEMENT_ADAPTER~SET_CONTENT of program /1WDA/L8STANDARD==============CP
    Method: IF_WDR_VIEW_ELEMENT_ADAPTER~SET_CONTENT of program /1WDA/L7STANDARD==============CP
    Method: IF_WDR_VIEW_ELEMENT_ADAPTER~SET_CONTENT of program /1WDA/L7STANDARD==============CP
    Method: IF_WDR_VIEW_ELEMENT_ADAPTER~SET_CONTENT of program /1WDA/L8STANDARD==============CP
    But when I delete the code of the wddomodifyview, and create a inputfield in the layout of the view, and bind the "ANSSA" to the "value" property in the layout, the WDA is running correctly.
    Do you give me some hints?
    Thanks a million.
    Best regards,
    tao

  • Using view context attribute values in view methods

    Hello,
    I have a view context mapped to a window context.  The window context has a supply function that gets some data.  I would like to use some of this data in one of my view methods but can't seem to find the syntax to use the values in the mapped view context attributes.  I know for displaying on the view you map the screen field to the context attribute but I just need to use this value in a method.  Any help will be greatly appreciated.
    Thank you,
    JR

    Hi Joseph,
    If you already had mapped the view context with the window context, all you have to do in the view method is to read the view context. For this, you can use the next code:
      DATA: lo_node      TYPE REF TO if_wd_context_node,
            lo_element   TYPE REF TO if_wd_context_element,
            lv_attribute TYPE wd_this->element_node-attribute.
      lo_node = wd_context->get_child_node( name = wd_this->wdctx_node ).
      lo_element = lo_node->get_element( ).
      lo_element->get_attribute(
        EXPORTING
          name =  `ATTRIBUTE`
        IMPORTING
          value = lv_attribute ).
    This is supossing you have a node named 'NODE' with an attribute named 'ATTRIBUTE'.
    Also, you can use the Web Dynpro Statement Structure. It's a wizard that helps you to generate some code. The icon is like a magic wand.
    Regards,
    Isaac Meléndez

  • Values not passing from form to context attributes (value attributes)

    Hi Experts,
    I have bound the properties of theadobe interactive form (WD-Java) to the context attributes but the values are not passing to the value attributes at runtime.
    For your information I have not bound the pdfsource binary attribute of the view to the custom controller pdfsource binary attribute.
    Please advise.
    Thanks,
    Shobhit

    Context
       GetData - ModelNode mapped to controller context (DataSource)
             Attribute1 - Value Attribute (Form Field)
    Is it allright to have the Data Source as a ModelNode (mapped to the controller context node) and then have Value Attributes under the ModelNode which are then bound to the adobe form input fields.
    I know its frustrating to advise on such questions without looking at the code actually. But I would definitely need your support.
    If possible could you mail me a project of yours where you have the form being PREFILLED with some values coming from a RFC FM and then the same form gets posted to SAP though another RFC FM.
    Thanks,
    [email protected]
    OK. When I create a Fresh Adobe Interactive Form application, it works fine.
    The problem Im facing is in the case, when Im using an existing PDF file created in the ABAP stack (TCode SFP). I am importing this PDF file into the WebDynpro Java Application and then binding the fields. So in this case the context binding does not work.
    You guyz are right, I need to check if there is any other script which exists. But still what are views after this update?
    Message was edited by:
            Shobhit Swarup Mathur

  • How-to map multiple explicit search help values to context attributes?

    Hi,
    I have a custom explicit Search Help with multiple attributes set as export and uses search help exit for data retrieval. I have set this Search Help for one of the context attribute that is binded to one of the input fields on view.
    Now, is it possible to dynamically map other export attributes from this Search Help to other Context attributes?
    I know this works for Input helps that are directly derived from check tables but not sure how to do it for explicit Search Helps.
    Can anyone please confirm and let me if this is possible? If yes, then can you please share an example or describe how to do it?
    Thanks and Regards,

    Hi Srinivas,
    Check this ..Search help can be dynamically assigned to a field.
    data lo_nd_info type if_wd_context_node_info.
    lo_nd_info = lo_nd->get_node_info( ).
    CALL METHOD lo_nd_info->set_attribute_value_help
    EXPORTING
    name = 'ATTR1'                  " Your attribute Name
    value_help_mode = '121'    " Valid value help mode
    value_help = 'Z187442'.      " Search help name
    The various possible values that you can pass to value_help_mode are as shown below.
    deactivated 101
    automatic 111
    ddic 121
    ovs 131
    Also refer this..
    Re: How to put dynamic search help in web dynpro ABAP.
    Cheers,
    Kris.

  • Using a pdf-template for generating an interactive form

    Hi guys,
    I have got the following problem. I have got an pdf-Document, that can be printed out and filled out manually.
    Instead of I just want to use this pdf-Document as an template for an online form, by adding some fields.
    How can I use this pdf-Document as an template?
    Thank you for your answers. Patrick.

    Hi Patrick,
    Let me see if I understand your query properly first. Your requirement is that you have a PDF file which is pretty much fixed.
    Now you want to use the Template present in the PDF file to be shown to the user, but this should be pre-filled with data that you receive from a Web Service & RFC.
    Now firstly I will mention the easy way, which would require you extract the PDF Template statically, I am not sure if the API has now been released to do that programatically.
    Now, lets say you store it is some location the template file, you would also need to tweak the DataBinding properties in the Template to match to that of the Context Node you will use in the application.
    Now in the ModifyView method you should get a reference to the Interactive form element, use the setTemplateSource method to refer to your template.
    Now based on the response from your RFC/WebService create the appropriate attributes into the node, and your form should work fine.
    Regards,
    Pavan

  • Binding model attributes disables UI elements

    Hi ,
      I have created a model. and did bind its attributes to the UI elements. RFC is working fine.
    But in the runtime all UI elements are disabled bydefault when i bind these to the model attributes but to the same UI element if i bind it to the local attribute its working fine...
    I have tried reimpor and recreating model , and also changing the cardinality but not working...
    Would not it be possible to bind UI elements to model attributes ?  By using model attributes how the UI elements can be enabled ?
    Please help me out...
    Regards
    Sireesha.

    hi,
    this occurs becoz u would have bound the i/p element to a model attibute whose value is null.
    to solve dis,
    1)create a context attribute in ur view
    2)bind  the i/p elements to that context attr
    3)while executing the rfc , get the value of this context attr and set it to the model attr.
    for example if u have a model attr 'name_mo ' which u have to bind to the i/p field element
    create a context attr -
    name_vn
    bind name_vn to the i/p field element
    while executind ur rfc,
    Test_Input ip = new Test_Input();
    ip.setName_mo(wdContext.currentContextElement().getName_vn());
    Test_Input is the name of the model node that is bound from model to the view via comp.ctller
    Regards
    Jayapriya

  • Simple Types and Context Attributes

    Hello All,
      Can someone be kind enough to explain the difference between using a context attribute and a Simple Type ? For example... what's the difference (and I am sure there is ) between a context attribute "Name" that is declared to be of String type and a simple type "Name" that is of built-in type String  ?
    from
    Kwok Wei

    Some links on SimpleTypes and its usage.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/value help in web dynpro applications.pdf
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/internationalization of web dynpro applications.pdf
    Regards, Anilkumar

  • Binding Context

    Hi All,
    I am working on River RDE extension project, where I have extended new views and controllers and able to navigate between them as well by implement navigation routes in Component.js. But still, I am having difficulties to set the binding context when I make call to navigate to new view (XML view) from a controller (JS controller). I am trying to call this.oRouter.navTo() method and inside that I am setting subroutes which I declared in my Component.js. Please provide guidance to follow an effective way to do context binding and share data across different view?
    Thanks & Regards,
    Chet

    A better solution generally is not to try and find the VO and then get the attribute. It's really better to use EL to get the value without having to step up into the App module - check out the following:
    http://www.groundside.com/blog/content/DuncanMills/J2EE+Development/?permalink=386D9E214C8E314E7C3B57A1B51DA684.txt

  • How to set multiple values in one context-attribute

    Hi all,
    Anybody knows a possibility to set multiple Values to a context-attribute?
    I know it how to get it with the following code:
    String break[]= request.getParameterValues("break");
    Now I want to do something like:
    request.setParameterValues(break[no]);
    where no is a counter in a loop.
    With the Method setAttribute(), I overwrite the previous inserted value.
    Thanx
    Robert

    I have not explizit declared break as an array.
    It is the Context- Attribute I want to send. I thaught that I can use it as an array in the same way I can do it when I send Data from an HTML- Form (with multiple values) to an servlet.
    I don't know how to declare the Attribute explizit as an array.
    that it is you wanted to know?
    I think my main problem is to get an array from the servlet to the jsp. Is there an other possibility (other than via Context-Attributes) to do that?
    thanx
    robert

Maybe you are looking for