cancel
Showing results for 
Search instead for 
Did you mean: 

Type conversion adaptive RFC?

Former Member
0 Kudos

Hello,

I want to call an ABAP RFC that has some char(1) Arguments to be filled with 0, 1 or 2. The automatically generated structures generate on the Java side BOOLEAN types out of this??

Is that a bug that a char(1) is converted to boolean??

Frank

Accepted Solutions (1)

Accepted Solutions (1)

laxmikant_pandit2
Participant
0 Kudos

Hi,

I require information in Web Dynpro.

I have a field Xbilk which is char1 ABAP field.

Here there are 2 type of accounts which are identified by xbilk char1 field.

if that is filled then it is a Balance sheet account

else it is a Profit and loss account.

But in testing it is going to Balance sheet even if it is profit and loss account and end result is always Profit and loss account which is incorrect.

I have used char1 in value attribute and model attribute.

Please communicate me steps.

Thanks

Laxmikant

Answers (1)

Answers (1)

Former Member
0 Kudos

It actually depends on how you define your values on the structure you are calling from the RFC.

I have found that if you define your domain as XFELD, you will get a boolean value on your webDynpro. I believe this occurs because XFELD has a mapping converting defining "Yes/No" values.

If your data domain is just a CHAR1 not defining possible values or more than yes/no, it should work, and you should receive a String value on your webDynpro.

I am actually having the almost opposite problem. I do want boolean values to setup some checkboxes. They come up properly but I receive an exception while updating the values. It seems that the NetWeaver core does not handle conversion between true and 'X'. Help wanted

Hope it helps

Former Member
0 Kudos

Hello Miguel and Frank,

I am having the type conversion problem with the "Wait" field of the BAPI_TRANSACTION_COMMIT. It is CHAR1 but after importing in WD it is boolean.

Any ideas how can I convert it back to CHAR1

Many thanks,

Dharmi

Former Member
0 Kudos

Hello SDN,

Can anybody please help?

Best regards,

Dharmi

ute_buehler
Explorer
0 Kudos

Hello,

If there is a domain of type CHAR with length 1 and the two fixed values

<empty>

X

then (and only then) a field referencing this domain (i.e. referencing a data element with reference to this

domain) is imported as boolean during RFC import.

Kind regards, Ute Buehler

Former Member
0 Kudos

I'v met the same problem.

it seems the web dynpro can't convert java side true to Abap side 'X', it reported an exception. Since the abap is an standard bapi, how can we call this bapi and set the Xfeld type field from web dynpro.

Thanks and best regards,

Yang