Skip to Content
avatar image
Former Member

Accessing calculated string value attribute at runtime from Custom Control

I created a table that is populated with data of a SAP system but two of the columns are populated with strings from a Custom controller's context value attribute mapped to the view controllers context.

They pull data from an Adaptive RFC depending on the data

one renders an image from a set stored in the appropriate \<Project Name>\src\mimes\Components\ folder and the other string is parsed and the last four characters of the string are dropped and renders the result.

The source in the image property and the text property in the textview have the appropriate mapping location to receive the values.

The problem is when the table is rendered through an action button those two columns are blank.

On troubleshooting the problem i hard-coded the values in the property fields and they display. I then hard coded them in the get method()in the custom controller to check if the problem was my code.It did not display.Thus concluding that the mapping configuration is wrong.This could also be a wrong conclusion.

I have tried different configurations to no avail those two columns remain elusive.Any input would highly be appreciated.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Apr 26, 2005 at 12:48 AM

    Hi henry

    First tell me if my understanding of what you have done is correct.

    You have bound the return structure of the RFC to a Table UI element. Apart from the fields in the structure you have 2 additional columns which are mapped to a value attribute right.

    When you click on a button you are executing the model and as a result the data from SAP fills the table ui element.

    How are you then populating the 2 value attributes.

    I would suggest you try the following approach.

    Assume your RFC structure is "SAP_STRUCT" with 3 columns. Bind the 3 columns to the table.

    Then under the context of the model node "SAP_STRUCT" add a value node say "VAL_NODE" of cardinality 1:1 and add a value attribute say "VAL_ATTR" to it.

    Create a "Supplyfunction" for "VAL_NODE"

    Now add 2 columns to the Table ui element and bind this value attribute "VAL_ATTR" to it.

    At runtime you can set the values of the 2 columns as the table is filled with data from RFC structure.

    You can refer to this blog for further help

    /people/sap.user72/blog/2005/03/15/supply-functions-in-webdynpro

    I have just suggested a approach. I dont know the exact method you are using to populate your value attributes.

    Let me know if you require more information.

    regards

    Ravi

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 26, 2005 at 09:47 AM

    Can you give some more details? How does your context mapping looks like, which runtime version are you using etc.

    Armin

    Add comment
    10|10000 characters needed characters exceeded