cancel
Showing results for 
Search instead for 
Did you mean: 

CHAR 1 CONVERSION

bjorn-henrik_zink
Active Participant
0 Kudos

Hi,

I have a "state" field type CHAR 1 in a R/3 table that I want to display via Web Dynpro. The problem is that the CHAR 1 data type is automatically converted into BOOLEAN when I create the model. How can I avoid that the field is converted into a boolean - I want a string?

Thanks in advance.

Elvez

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello dear,

The data element you used in R/3 is domain fixed values "X" and " ". Thats why it is taking it in to boolean.

Avoid to give domain fixed value. Then at Java side it came as string.

regards,

Sumit Malhotra

Answers (4)

Answers (4)

Former Member
0 Kudos

Hello,

i think there is also an other way, you are able to create the model classes with the SAP Enterprise Connector after the creation you can edit these classes and convert inside these classes the backend CHAR1 return value which is interpreted as boolean back to String!

The only difference is now you have to call the backendsystem manually via JCO.

kind regards

Fabian

venkatakalyan_karanam
Active Contributor
0 Kudos

Hi

There is no option for this. But you can change the data element in R/3 for this field. or otherwise

Take a string variable and assign it as per the back end results through coding in webdynpro.

Regards

Kalyan

Former Member
0 Kudos

Hi Elvez,

I'm facing the same problem. How did you solved this?

Thanks in advance.

Alan

Former Member
0 Kudos

Elvez,

Sadly, this is done automatically by Adaptive RFC import wizard. No way to alter this behavior.

But: if I understand, "state" assumes some enumeration of valid states. Just a guess, if you add enumeration you will get String type. Thoughts?

Valery Silaev

EPAM Systems

http://www.netweaverteam.com/