cancel
Showing results for 
Search instead for 
Did you mean: 

Is there an ABAP domain that can be directly converted to a Java boolean?

Former Member
0 Kudos

We have a BAPI that is being used with Web Dynpro, and we would like to return some values back from the BAPI that we can use to disable certain screen elements. I was thinking that the easiest way ro do that would be to map the value from the bapi export variable directly to the property of the screen element that I would like to disable.

Is there a domain type in ABAP, that when passed into the Web Dynpro application, would be correctly interpreted as a boolean 'true' or 'false'? Could I pass an ABAP element of domain type STRING containing the value 'true' or 'false' back from the BAPI?

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member189631
Active Contributor
0 Kudos

Hi Anthony,

If u want to Pass String (Like True ,false) to an Abap function u can follow the method i suggested.Beacuse ur may need to pass the string elements which is not Boolean..

Or Otherwiseif U want to pass the Boolean element [true or false] (Builtin) ,u can use Char(1) type in ur ABap side and U have to write the code like If

IF Field1 eq 'X' .

"U have selected True in ur webdynpro side.

else .

"U have selected False.

ENDIF.

Use the Best One According to ur Requirement.

Thankyou,

Ramganesh.

Former Member
0 Kudos

try type FLAG, that is a char with one character only (X or empty), but when connected to web dynpro is interpreted as a boolean.

Hope it helps.

Nuno Santos

Former Member
0 Kudos

Hi,

Just to agree with Nuno - use type FLAG - we use this in our RFC modules for our Web Dynpro and it works as a boolean.

Gareth.

Former Member
0 Kudos

I think ABAP type should be CHAR(5)

Regards, ANilkumar

former_member189631
Active Contributor
0 Kudos

Hi Anthony,

If u want to get return values from Bapi u can Bind the Return Node of Outputnode with a Table Or any other UI Element.u can fetch the value of each field from the Output and u can use it as per ur requirement.

I dont think such a domain Type is available ..Other Wise u can write a small Remote Enabled function module to interpret Boolean Values when inputs are string. and u can use this function module in ur Project.That will solve ur Problem..

Thankyou,

Ramganesh.

Former Member
0 Kudos

Hi Ramganesh,

It isn't the content of the screen element that I want to bind to the BAPI element, it is one of the attributes of the element - the one that allows the elelemt to be enabled/disabled as an input field.

Can I do that the way you suggest?

BR,

Tony.

Former Member
0 Kudos

Hi,

You can use the domain "XFELD". It is a yes/no field.

Regards,

Satyajit.