‎2015 Jan 21 6:39 AM
Hello everyone,
I want to check a data element is a bool type or not,
for example:
data element: "ZSHOPPING_BOOK_SALED" and it's domain is "BOOLE"( the data type of "BOOLE" is char 1). And now I want to check whether the "ZSHOPPING_BOOK_SALED" is a bool type or not.
Due to there have no 'bool' data type in ABAP program, so I want to know is there any standard class methods or function modules that has realized this function.
Thank you very much.
‎2015 Jan 21 6:51 AM
Hi,
Take data type CHAR with length 1.
and fix value ranges with 'X' and ' '.
BR,
Srini.
‎2015 Jan 21 6:49 AM
‎2015 Jan 21 6:57 AM
Hi Matthew,
It's not a RTTI, the data element type is static. thank you very much.
Best Regards,
Peng.
‎2015 Jan 21 8:35 AM
Then the answer to your question question is trivial.
Use values abap_true, abap_false and type abap_bool. You may need to use type pool ABAP, but later kernel versions include this automatically. If you're using web dynpro, then the correct type is wdy_boolean
‎2015 Jan 21 6:51 AM
Hi,
Take data type CHAR with length 1.
and fix value ranges with 'X' and ' '.
BR,
Srini.
‎2015 Jan 21 6:59 AM
Hi Srin,
It's a great idea, and very helpful, thank you.
BR,
Peng.
‎2015 Jan 21 6:56 AM
‎2015 Jan 21 6:59 AM
Hi Peng,
You can do the join query on DD01L (Domain Table ) and DD04L(Data Element Table ) table based on the DATA Element ans check the Domain, Lenght and data type.
Based on that, if it's CHAR1 data type or CHAR data type with 1 Lenght. Then it could be the Boolean.
Regards.
Praveer
‎2015 Jan 21 7:06 AM
Hi Praveer,
It's a good idea, and very technical. But I think it's a little complicated, however thank you very much.
Regards,
Peng.
‎2015 Jan 21 7:23 AM
‎2015 Jan 21 7:36 AM
Hi Raymond,
Thank you for your great help, it's very useful. And now I have several solutions from all of your enthusiasm help.
Regards,
Peng.