cancel
Showing results for 
Search instead for 
Did you mean: 

PI character -

Former Member
0 Kudos

Hi,

I would like to create an xml that has elements which include the character '-'.

My target xml is  like:

<?xml version="1.0" encoding="UTF-8"?>

-<Document-Invoice>-<Invoice-Header><InvoiceNumber>9000062753</InvoiceNumber><InvoiceDate>2013-12-14</InvoiceDate><SalesDate>2013-12-14</SalesDate>.........

As you can see I need to create date type with names Document-Invoice and element Invoice-Header. When I try to create them as Data type or as element I get the error

  


          Name contains invalid characters: -
Only a(A)-z(Z), 0-9, and
          "_" are permitted

      

How can I handle  this situation ?

Any tips and advice appreciated

Kind Regards

Antonis

Message was edited by: Konstantinidis Antonis

Accepted Solutions (1)

Accepted Solutions (1)

former_member184720
Active Contributor
0 Kudos

Hi Antonis - You have marked the discussion as answered. Was it intensional?

Incase you are still looking for an answer then -

As the error message states you cannot use the "-" in DT. If you really need then please refer to Udo's reply in the below discussion.

http://scn.sap.com/thread/449631

Former Member
0 Kudos

I marked it by mistake I have not found how to undo it.

Former Member
0 Kudos

Hello,

>>I would like to create an xml that has elements which include the character '-'.

Try below steps:

1) Create DT, MT

2) Once done export MT as XSD on ur machine

3) Open XSD and change field names

4) Import updated XSD as a External definition and u are done

Thanks

Amit Srivastava

Former Member
0 Kudos

i exported the Message type (it was a zip file) , I extracted the zip file , the extracted folder had 2 files that are related...I imported these file from the menu , there is an extrernal definition option for mass import ( Mass Import for External Definitions - Providing, Discovering and Consuming Services - SAP Library ) and it works!!! THANK ALL for your support .

Answers (2)

Answers (2)

former_member215870
Participant
0 Kudos

Hallo Antoni,

I had some similar issues when I was developing a web service. This was due to the validation of the XML document. If this is a proxy object, try to see what is the data element behind and try to change it (do it as CHAR10 or string) and try to see if this is working.

BR

Giorgos

Former Member
0 Kudos

HI Antonis

"-" is not a permitted value as the pop up message shows only allowed values are:

a(A)-z(Z), 0-9, and
          "_" are permitted

     

So you can use "_" instead. Is there any specific business need to have "-" as seperator.

IMO, Naming of object should not cause any issue , its the data which matters.

Regards

Srinivas

Former Member
0 Kudos

Hi

thanks for the reply,

yes I need to use the '-' it is part of my target xml that I have to provide...