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

Adding leading and trailing spaces while converting string from ABAP to XML

Madhurivs23
Participant
0 Likes
1,320

Hello All,

I am passing data in internal table from abap to XML using IF_IXML interface.

For one string field I want to have leading and trailing spaces as it is to come in the XML converted form. But its not coming. Will anybody suggest a solution for this?

I checked the call transformation. but its not useful for this purpose.

Thanks and regards,

MAdhuri S

7 REPLIES 7
Read only

Former Member
0 Likes
968

Can you try adding spaces to the string and add it ? For adding 5 spaces:

DATA: L_S(5),

           S TYPE I.

S = 5

CONCATENATE '' STRING '' INTO ROW_STRING

            SEPARATED BY L_S(S).

Read only

0 Likes
968

Hello Shambu,

I am able to generated that string with leading and trailing spaces in ABAP. Its not the issue. but if I move that to the XML. Its removing those spaces.

Read only

Former Member
0 Likes
968

post the output screen

Read only

Madhurivs23
Participant
0 Likes
968

any answer?????

Read only

0 Likes
968

just read following thread :

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

also help following WIKI document :

http://wiki.sdn.sap.com/wiki/display/XI/ABAP+Mapping+Steps

Read only

0 Likes
968

Hello Krupa,

i checked the above threads. But it doesnt mentioned anywhere to have leading and trailing spaces.

My string is "   3C3Z    6731AA     ". and I want to have it same in XML format with leading and trailing spaces.

Read only

Madhurivs23
Participant
0 Likes
968

Hi All,

I am generating XML file using iXML interface. while passing one string, I want to keep leading and trailing spaces as it is while passing it to XML file.

How should I do that?

Thanks and regards,

Madhuri Sonawane