Skip to Content
author's profile photo Former Member
Former Member

must not modify the datatype of a mapped attribute

Hi!

I have an inputfield in my WD with extended value help (countryKey and CountryName, coming from R/3). The selected country should be passed to a bapi import parameter mapped in a model, but the problem is that an exception occurs stating that I cannot change the data type of the context attribute because it is mapped to a model.

How is this usually done?

Thanks,

faB

-


ContextException: AttributeInfo(SearchView.Iv_Land1): must not modify the datatype of a mapped attribute

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jan 19, 2005 at 11:00 AM

    Hi,

    1. Create sub-node under your model node with cardinality 1..1 (non-singleton used in sample below)

    2. In this sub-node create calculated attribute with the same primitive type as desired attribute has (say, string).

    3. In setter / getter write code that will modify original attribute:

    /* getter */
    return element.node().parentElement().getAttributeValue("OriginalModelAttr");
    /* setter */
    element.node().parentElement().setAttributeValue("OriginalModelAttr", value);

    4. Rebind your input field to newly created attribute, and apply any value set modifications to it.

    VS

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.