Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ABAP to XML

Former Member
0 Likes
974

Hello,

I want to get this format XML from a ABAP structure:

<ContactInformation>

<Contact>1234567801<Contact>

<ContactTypeIdentifier>VKN_TCKN<ContactTypeIdentifier>

<ContactInformation>

I tried CALL TRANSFORMATION, but I only got this format:

<CONTACT_INFORMATION>

<CONTACT>1234567801<CONTACT>

<CONTACT_TYPE_IDENTIFIRER>VKN_TCKN<CONTACT_TYPE_IDENTIFIRER>

<CONTACT_INFORMATION>

My question is: how can I get XML from a ABAP structure which the structure's component name will convert case sensitively.

For exemple: CONTRACT_INFORMATION  to ContractInformation

thank you very much

Regards,

Rong

5 REPLIES 5
Read only

Former Member
0 Likes
933

Hi Rong

Unless I'm missing something the Fields in SAP are defined in uppercase. So these will not return in lowercase.

Regards

Arden

Read only

0 Likes
933

Hi Arden,

Yes, the component name will not return lowercase, but is there any way when converting to XML's Label,the component name's value will change in some rule (the first letter in uppercase, and the first letter after underscore in uppercase)?

thanks:)

regards,

Rong

Read only

0 Likes
933

Hi Rong

Not 100% sure if this is possible without further custom code.

What are wishing to achieve by doing this?

Regards

Arden

Read only

0 Likes
933

Hi Arden,

We are going to communicate with 3rd party system by sending a XML file to them. However the XML's format is fixed by them( the XML's label is case sensitive like I mentioned above).

so I need to convert the ABAP structure to the fixed XML and send.

So far, I find a brute way to achieve: generate a transformation by the structure, and change the label to lowercase one by one...But it really looked stupid...... So I'm seeking for another effectively way.

regards,

Rong

Read only

0 Likes
933

Hi Rong

As you're being dictated to in terms of structure, I don't think you have a choice but to code the solution yourself.

By creating you're own routine specific to the 3rd party at least you'll have a single point of reference to control this.

Regards

Arden