on 06-28-2011 3:03 PM
Hi Experts,
I have a requirement where I have to pass boolean values to RFC .The RFC has boolean value format as X. But in webdynpro java I am only able to pass either true or false.
When I pass either true or false , it doesnt get converted to X in RFC as I found out from debugging.
Please advise/suggest.
Regards,
Mamai.
Hi Mamai,
If Boolean is not getting converted into X in RFC then you can do it like this.
If(true) //put the boolean variable here
{
// pass X to the RFC
}
Else
{
// pass blank i.e. donu2019t set any value to the RFC
}
Regards
Yugandhar Reddy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Arun for the input.
But as I checked with the ABAP guy , he showed me the data is being pulled from BAPIAD1VLX
where all the fields are as type CHAR.
But I can see alll the attributes of the model node to be type boolean where I can pass only true or false !! and not X !!
I really cant make out why is this happening !!
Please help / advise.
Regards,
Mamai.
Hi,
Attribute with data type as CHAR1 will be having DOMAIN with Yes/No.If BAPI is not standard one, You need to request ABAP Person to remove Yes/No in domain. After getting thiis done, re-import your model, now your attribute will be created of type string which you can set '`X` or blank for true or false respectively.
I hope it helps.
Regards,
Rohit
WDJ does the required conversions. ABAP data types are different and Java data types are different.
So the conversion happens. Java boolean when it gets converted to ABAP, boolean in ABAP is CHAR data type of length 1 with value X or blank. X represent true and no value is false.
Even this is true in WDA.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
passing boolean true is passing X to the RFC.
If you put a http break point, areu not seeing X value in the back end function module?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello
Could require a specific char, would normally rely on someone telling you acceptable values. I find in many cases it is Y:N | 0:1
generalT.setValue("CONCENSUS", (ManageHelper.isTrue(createProjectRequest.getGeneralType().isConcensus()) ? "Y" : "N" ));
generalT.setValue("HARMONIZED_LEVEL", (ManageHelper.isTrue(createProjectRequest.getGeneralType().isHarmonized())? "1" : "0" ));
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try to pass X to rfc
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.