on 01-12-2006 4:06 PM
Hello,
I have a input field for R/3 reservation number which is numeric. When the view is first displayed the input field is blank. If If leave this view and return I am clearing the field using the following
<b>wdContext.currentBapi_Reservation_Getdetail_InputElement().setReservation(null);</b>
The field is cleared as expected but is now filled with Zeros. How can I clear this field but avoid having it filled with zeros. Need to have the field empty as it the first time it is displayed.
Regards,
Keith L.
Hi Baskaran,
I tried setting to "" instead of null and get the same results. What is strange is that If I try to set to "ABC" or any other character string it dumps with the following error.
If I try and set to numberic value "123" it is ok but once again it includes leading zeros.
Error stacktrace:
com.sap.aii.proxy.framework.core.DataAccessException: Type conversion error, field RESERVATION, complex type class XYZ.com.gm8.Bapi_Reservation_Getdetail_Input
<b>wdContext.currentBapi_Reservation_Getdetail_InputElement().setReservation("ABC");
wdContext.currentBapi_Reservation_Getdetail_InputElement().setReservation("123");</b>
Any ideas on where the enforcement of numneric is at? From what I see in the data dictionary entries created by Adaptive RFC it is defined as a string
Rgds,
Keith
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
On the R/3 side reservation is
NUMC Character string with only digits
On the WD side reservation is defined as string
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Keith,
You can do the following then.
See normally when it is coming from RFC system it is initialized to zeroes.So your string is displaying zeroes.
You can check the Reservation attribute value and if it is zeroes then you can set it to spaces.
wdContext.currentBapi_Reservation_Getdetail_InputElement().setReservation("");
Message was edited by: Baskaran Senthivel
Hi,
what is the dataType of Reservation ??.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.