cancel
Showing results for 
Search instead for 
Did you mean: 

imported model element type incorrect/changed

Former Member
0 Kudos

Hi all,

I am importing a bapi using the adaptive rfc model wizard.

I am facing a issue where in the built in type of an element is changing to boolean.(from char)

There is this export parameter X which is of type Z.

( I have checked Z from our abapper and it is clearly a CHAR of lenght 1)..

But after import the X is of type Z but when I check the properties of Z it shows buil in type as boolean..

And with a default of false...

Not sure why..Can anybody let me know what could be the problem...

Many Thanks,

Ashok

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi

if u get the same problem after reimport model aslo then simply create new model may be it will resolve u r problem.

Thanks

Bharathi.Ch

p_2_5_6_9_6_0
Active Participant
0 Kudos

Hi,

This occurs sometimes when mapping the Java and ABAP stacks. Since the decision on what datatype the export paramter is - is taken by the wizard for RFC Model - the exact cause is unknown.

There are some things we tried to rectify this:

1.) We ensured that the model was being correctly generated - by deleting the existing model and reimporting it once or twice.

2.) Ensure that the on the ABAP side we need to have the source code activated and the correct datatype of "char(1).

3.) If all the above are accounted for then instead of trying to solve the issue - just write a method that works around the problem.

This would mean that you will need 2 methods - one for converting the boolean into char and vice versa. Along with the methods create a separate variable of type char and length 1 so that you can map your view ui element to this vairable instead of the erroneous context attribute.

p256960.

Former Member
0 Kudos

Hi, Thanks for the reply..

Model reimport did not work and also abap source code is active.

The work around is not possible as the boolean element is always having a default of false.(If it had shown true for Y and false for N ..I would have been more than happy..)

So its as gud as saying am uanble read that export element at all ( which ideally would have Y or N in it as value) and write my code.

Is their any other way to overcome this issue.what do you mean by mapping the Java and ABAP stacks causes this problem...

Anyone let me know is it possible to overwrite the built in type of amodel element..I think its not advisable and also it is allways disabled for edit?

Any reply is very much appreciated.

Many Thanks

Ashok

p_2_5_6_9_6_0
Active Participant
0 Kudos

>

> Hi, Thanks for the reply..

>

> Model reimport did not work and also abap source code is active.

>

> The work around is not possible as the boolean element is always having a default of false.(If it had shown true for Y and false for N ..I would have been more than happy..)

>

> So its as gud as saying am uanble read that export element at all ( which ideally would have Y or N in it as value) and write my code.

>

> Is their any other way to overcome this issue.what do you mean by mapping the Java and ABAP stacks causes this problem...

>

> Anyone let me know is it possible to overwrite the built in type of amodel element..I think its not advisable and also it is allways disabled for edit?

>

>

> Any reply is very much appreciated.

>

> Many Thanks

> Ashok

Hi,

By mapping of Java and ABAP stack's what I meant was that a data type in ABAP may not map to exactly the same data type in Java. For example, a numc in ABAP could have been mapped to char or long or int in java (just an example - it doesnt really do that). The mapping is based on size, floating point accuracy and other criteria.

Now, in case the model always has the value "false" when executing - then there is a serious issue with the parameters. Because it would mean that the model cannot be populated with the values taken from the view or the controller.

If the error is on the model side (ie the ABAP RFC side) then try changing the data type of the export parameter to another domain or change the length to more than 1 - it will change the model context so that you can use it.

It will have more than 1 character - but it is an easier solution than trying to resolve why the model is being generated in a certain manner.

Hope that helps.

Revert with any issues.

p256960.

Former Member
0 Kudos

Hi,

Changing the Function Module in itself is little tricky as it is being used by other interfaces.

Is their any other way to get the value without modifying the bapi .

Is such behaviour a bug from SAP and fixed any later releases of nwds..

Ashok