cancel
Showing results for 
Search instead for 
Did you mean: 

DMEE remove trailing spaces and include space between two elements in node

Former Member
0 Kudos

Hi all,

I am creating a foreign UK payment and the trailing spaces of each line need to be removed.

I have removed the trailing spaces by selecting field type 1 (Fields are separated by delimiter

) from the format attributes of the header.

However I also need to have a space present between the elements country and city.

This node should look like as follows.

country (field FPAYH-ZLAND) space city (field FPAYH-ZORT1) and also all the trailing spaces should be removed.

E.g.

DE Berlin <CR/LF>

and not

DEBerlin <CR/LF>

DE Berlin <CR/LF>

Thanks in advance,

Roger

Accepted Solutions (0)

Answers (5)

Answers (5)

0 Kudos

Hi all,

let me answer the first question. I know that it is quite an old question, but it seems that it can be stil actual for somebody.

I think that if you use only one element CITYCOUNTRY with two atoms CITY and COUNTRY instead of two separate elements CITY and COUNTRY, it must work. Mapping Procedure for the CITYCOUNTRY element must be "Own Mapping (atoms)" and Atom Handling 02 (Concatenate values in element with spaces).

It works in both DMEE and DMEEX tools same way.

Best regards,

Antonin Kosulic

s_praj
Discoverer
0 Kudos

Hi,

I had the same issue and I solved it in 3 steps -

1) In the 'DMEE Tree Properties', under Format Data, set the 'Field Value Positioning' to '1 Field are separated by delimeter'

2) Set the 'Delimeter' 'In Segments' to '|'.

3) Implement BADI 'DMEE_OUTPUT_POSTPROCESSING' and then while looping the Output_File_Lines, split each row at '|' and then concatenation using separated by space and then modify the content of Output_File_Lines with this changed content.

Another solution is, to truncate the space at the end, without doing setting at step 1, in the BADI implementation, change the length of the row to only the length of the content. I will remove trailing spaces and will keep the space in between the fields as well!

Thanks,

Prajakta

Former Member
0 Kudos

Hi there,

You may want to try this option:

First step create New composite and state the description

Second step create element such as country, space with constant value, city.

I hope this will help you.

Cheers

Nathan

Former Member
0 Kudos

Hi Nathan,

Thanks for thinking along with me.

The problem is that each method I have tried to create a space in between does not work, because the header settings to use filed type 1 removes the space again.

I use this field type 1 to remove the trailing spaces.

Roger

Former Member
0 Kudos

Hi Roger,

One last and sure option is to write an exit module with ABAP help. The ABAPer can combine the values from the two fields and insert a space.

But then if such cases where you want spaces are many, then it is defenitely not advisable.

Thanks and Regards,

Anit

Former Member
0 Kudos

Hi Anit,

I was hoping to have a solution without using a user exit, but it seems that I will have to ask the ABAP-ers to create a user exit for me.

Thanks for all the help,.

Roger

Former Member
0 Kudos

Hello Roger,

I was just wondering if you have managed to solve this problem. I have exactly the same issue, I would like to concatenate two fields: ZNME1 and ZNME2 and separate them by space but like in your case, format data field type 1 in header of tree is in use and it removes spaces between atoms.

Would be greatful if you could share your solution.

Best regards,

Monika

Former Member
0 Kudos

Hi Monika,

I have same issue with separating ZNME1 and ZNME2 by space.

Please share how you solved it.

thanks

GZ

Former Member
0 Kudos

Hi Roger,

Try the below -

For the element giving city, manitain the length as 7 (takin berlin as an example) and in the target offset maintain 2. This will result in the city having 6 characters and the value will get populated from the 2nd place and leave the 1st as blank.

Please check and Revert.

Thanks and Regards,

Anit

Former Member
0 Kudos

Hi Srini,

I have tried both suggestions, but they dont give the wanted result.

Hi Anit,

The length of the city name can vary, therefore I cannot use your suggestion.

Roger

Former Member
0 Kudos

Hi,

The length i gave was only an example. There has to be a higher limit which is accepted by the bank. Say 50, maintian 50 and in the target offset maintain 2. You can also leave the length blank and still give 2 in the target offset.

Give it a try.

Thanks and Regards,

Anit

Former Member
0 Kudos

Hi Anit,

It still does not work.

The overall settings for the header to have the fields separated by a delimiter removes the spaces between the two fields.

Maybe someone knows a solutions to have the trailing spaces for an individual segment removed.

Roger

Former Member
0 Kudos

Hi Roger,

It is working for me. The only difference being I have used this logic to get a space in between two atoms and not two elements. Moreover for the 2nd atom, i have given CR (right justified).

All the best.

Thanks and Regards,

Anit

Former Member
0 Kudos

Hi Anit,

I tried with atoms and CR but then I get the following result.

DE(spaces )Berlin <CR/LF>

Roger

Edited by: roger souren on Sep 10, 2009 1:40 PM

Edited by: roger souren on Sep 10, 2009 1:41 PM

Former Member
0 Kudos

Hi Roger,

You mean you are getting multiple spaces? can only suggest, that you try left justified keeping the target offset as 2.

Hope it works out.

Thanks and Regards,

Anit

Former Member
0 Kudos

Hi Anit,

When I use left justified then I do not get a space.

DEBerlin <CR/LF>

Do you also have your header set for Format data field type 1?

Roger

Edited by: roger souren on Sep 10, 2009 1:52 PM

Former Member
0 Kudos

Hi Roger,

I am not understanding the "Format data field type 1". Field type is Character for me. I think you will have to do some testing using the different Conv.functions available like - CR RP, C0 RP etc.

Thanks and Regards,

Anit

Former Member
0 Kudos

Hi Anit,

I need to remove all trailing spaces for each element, and this can be done with setting Format data field type 1 in the header for the format attributes.

However this also results in removing the spaces in between the elements / atoms.

Therefore the conversion function does not work.

What I am looking for is a solution to inlcude a space while using the format data field type 1.

Or a solution to remove the trailing spaces for each individual segment or element.

Roger

Former Member
0 Kudos

I think, to add one trailing space between country code & city, you can assign the length of the element Country Code (field FPAYH-ZLAND) to be 3, instead of 2. And give the Conversion Function to be "CL" - Character String Left Justified.

This will add space at the end of Country Code.

Regards

Srini

Former Member
0 Kudos

Hi Srini,

I have tried your suggestion, but unfortunately the output still does not include a space between the two fields.

Roger

Edited by: roger souren on Sep 10, 2009 11:59 AM

Former Member
0 Kudos

Why not try the other way round, with Conv Function as CR for the field "City", right-justified.

Did it work?

Regards

Srini

Former Member
0 Kudos

Or you can create a new element in between the two fields without any source structure, but with a constant mapping of a character space " ".

Regards

Srini