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

MappedAttributeInfo(APPView.Node): must not modify the datatyp

Hi,

I used DropDownByKey element (DDLPROJE) and mapped it a contex element(PROJE).

I tryed to fill PROJE with code below.No problem on compile, but when i run, it gets error below on line bold in code.

How can i solve this problem?

Thanks.

error

com.sap.tc.webdynpro.progmodel.context.ContextException: MappedAttributeInfo(FAALIYETappYeniView.PROJE): must not modify the datatype of a mapped attribute

code

IWDAttributeInfo attInf =

wdContext.getNodeInfo().getAttribute(

wdContext.currentContextElement().PROJE);

ISimpleTypeModifiable stm = attInf.getModifiableSimpleType();

IModifiableSimpleValueSet svs = stm.getSVServices().getModifiableSimpleValueSet();

try {

InitialContext ctx = new InitialContext();

DataSource ds = (DataSource) ctx.lookup("jdbc/SAPEPTDB");

Connection con = ds.getConnection();

Statement stmt = con.createStatement();

ResultSet rs = stmt.executeQuery("select PROJE from ZHF_PROJE");

svs.put("", "");

while (rs.next()) {

svs.put(rs.getString("PROJE"), rs.getString("PROJE"));

}

con.close();

} catch (Exception e) {

wdContext.currentContextElement().setMESAJ(e.toString());

}

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 03, 2009 at 09:00 AM

    You have to modify the datatype of the mapping origin i.e. the attribute in the component or custom controller to which you have mapped.

    Armin

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      With "modify the data type" I did not mean to change the type but to change the value set (as your code already does). But you have to change the value set at the origin of the mapping, e.g. in the component controller.

      Armin

  • author's profile photo Former Member
    Former Member
    Posted on Sep 03, 2009 at 07:05 PM

    I asked as different problem

    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.