on 03-03-2005 12:00 AM
Hi -
I have an element in my datatype that is length 1 and I would like to specify 2 enumeration values, X and blank.
Essentially I want the following in my datatype XSD:
<xsd:restriction base="xsd:string">
<xsd:maxLength value="1" />
<xsd:enumeration value="X" />
<xsd:enumeration value=" " />
</xsd:restriction>
According to the SAP help the enumeration field should be set to the list of values separated by blanks.
So I've tried:
- X followed by 2 blanks - doesn't work
- X   - complains that it exceeds the max length of 1
I've also tried exporting the XSD, changing it, and then importing it, but XI removes the <xsd:enumeration value=" " /> line on import.
Any ideas?
hi, if the maxlength is 1 you never will send 2 characters
you can modify your DT field to maxlength=2. if you send a numeric value one character will be send,if you need an"X " youwont have a problem
now if you cannot modify you DT (i dont think so) the blank should be added in the target system
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rodrigo, I think you did not get the problem correctly. In my example I have an attribute which is string and have enumeration constraint allowing only values ON and OFF. I now want to also add ""(Blank) as a value for this attribute. How to define this in XI? I tried to add the value "" manually to the Data type like below.
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="3"/>
<xsd:enumeration value="ON"/>
<xsd:enumeration value="OFF"/>
<xsd:enumeration value=" "/>
</xsd:restriction>
</xsd:simpleType>
But when I import the datatype into XI it will again become like below.
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="3"/>
<xsd:enumeration value="ON"/>
<xsd:enumeration value="OFF"/>
</xsd:restriction>
</xsd:simpleType>
Hope it is clear to you now.
Regards,
Prasad
that happend because pi trunc those fields that are null or have a blank insede to avoid pass the whole structure (unused fields). its the same when an idoc reach, only the fields whichs has values pass, the other not. what you can do is define a wild character in your field (e.x "").later in your mapping validate if the source field equals "" then map a black to the target field.
Hi, I have same requirement. Were you able to get a solution for this?
Experts: do you have any other inputs for this requirement?
Regards,
Prasad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I fear there is indeed no possibility.
Which purpose do you want this datatype to use for? (ABAP proxy, java proxy).
Greetings
Stephan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
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.