Skip to Content
avatar image
Former Member

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

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?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Dec 14, 2006 at 11:30 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 14, 2006 at 11:32 AM

    I think ABAP type should be CHAR(5)

    Regards, ANilkumar

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 14, 2006 at 11:35 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.

  • Dec 14, 2006 at 11:48 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded