on 07-03-2014 8:12 AM
Hi Experts,
I an getting some problem while setting values into JCO function after executing a this line... destination.execute(function) .
Even if I am passing a ("")Blank String value to set into a date field in table parameter, JCo function contains a value like this "0000-00-00".
I dont when and how it's setting this value.
when I am passing a value in the format (yyyyMMdd ) it coverts to the format (yyyy-MM-dd)
It's fine when value is there, But I need a blank value from that field when I am passing a blank String ("").
Please help me.
Thanks
Gouri Shankar
Hi Gouri,
What you want is not possible. In a DATE field, you cannot put an empty string. It's a DATE field and will always contain either a valid date or the value indicating an initial value: 00000000 or when accessing the value again with getString() in ISO format 0000-00-00. When setting an ampty string, via setValue(), this will always be interpreted as default value of the current type.
If you like to have a "" in a certain field, you need to have a CHAR type field.
Best regards,
Markus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Markus
Thanks for your time and answer.
My problem is that ..
Depending upon certain parameters , one field can be Mandatory/ Optional in ECC.
case-1: if it is optional ,then no issue.
case 2: if it is mandatory and I am sending value , no issue.
case 3: If it is a mandatory value for ECC and I am sending a blank ,it is taking a default value.
case-1 and case -2 are fine,
BUt for case-3 :
I want ECC to through Exception if such value will be inserted.(0000-00-00) as it is a mandatory value for ECC.
Is it possible? If not is there any alternative for that?
Thanks
Gouri Shankar
Hi Gouri,
within a table, there is no notion of optional, this is only existing for a parameter itself. Hence, If I understood correctly what you like to achieve, I need to disappoint you and tell you that this is not possible. Only with a hacky flag table, which is telling which fields have been set, but as this is not really directly coupled, it's only working if values are set in a disciplined manner.
Best regards,
Markus
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.