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

i output txt file diffrence between lenth should be same as dattbase length

Former Member
0 Likes
1,185

Hi Eshwar

I have a problem related to output data I ntxt file on server

I am using

CONCATENATE

wa_sagadr_outtab-seqno

wa_sagadr_outtab-bpext

wa_sagadr_outtab-name_org1

wa_sagadr_outtab-name_org2

wa_sagadr_outtab-street

wa_sagadr_outtab-post_code1

wa_sagadr_outtab-city1

wa_sagadr_outtab-country INTO wa_sagadr_text SEPARATED BY ''.

the output is separated by space irrespective of database length of the field , I want to display all the lenth of the database field eventhough the remaining space is blank

ouput as below

required format

000001 700006 C4 Plant AMD Export Sdn.Bhd.so on.

my format as coming single space in between only

000001 700006 C4 Plant AMD Export Sdn.Bhd

pls suggest

Thanks & Regards

Nishant

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,152

Use Condense statement for the string before concatinating it. That will surpress the spaces in the field. Then you can concatinate seperated by space. This will introduce a space between two fields.

- Guru

Hi Eshwar

I have a problem related to output data I ntxt file on server

I am using

CONCATENATE

wa_sagadr_outtab-seqno

wa_sagadr_outtab-bpext

wa_sagadr_outtab-name_org1

wa_sagadr_outtab-name_org2

wa_sagadr_outtab-street

wa_sagadr_outtab-post_code1

wa_sagadr_outtab-city1

wa_sagadr_outtab-country INTO wa_sagadr_text SEPARATED BY ''.

the output is separated by space irrespective of database length of the field , I want to display all the lenth of the database field eventhough the remaining space is blank

ouput as below

required format

000001 700006 C4 Plant AMD Export Sdn.Bhd.so on.

my format as coming single space in between only

000001 700006 C4 Plant AMD Export Sdn.Bhd

pls suggest

Thanks & Regards

Nishant

7 REPLIES 7
Read only

Former Member
0 Likes
1,153

Use Condense statement for the string before concatinating it. That will surpress the spaces in the field. Then you can concatinate seperated by space. This will introduce a space between two fields.

- Guru

Read only

0 Likes
1,152

hi guru

can u please eloborate where to use condense in above egi ahve give

nishant

Read only

0 Likes
1,152

hi guru

my aim is not to condense space but to bring the spaces as equivalent to teh origional database lenght

regards

Nishant

Read only

0 Likes
1,152

This should automatically happen. Have you declared the variables to the correct length of the field? The number of spaces the field will occupy in the string is same as the length it is declared. So if you are seeing more spaced in the string then that means you would have declared the field length of the field more. Check that.

- Guru

Reward Points for helpful answers.

Read only

0 Likes
1,152

hi guru,

can your suggest on like where to use the condense statement i am using fro eg

CONCATENATE

wa_sagadr_outtab-seqno

wa_sagadr_outtab-bpext

wa_sagadr_outtab-country INTO wa_sagadr_text SEPARATED BY ''.

though i have solved the problem by using move statement instead of concatenate and using offset i need to knwo how this condense can solve problem

pls suggest

regards

nishant

Read only

0 Likes
1,152

Here you go.

condense : wa_sagadr_outtab-seqno,

wa_sagadr_outtab-bpext,

wa_sagadr_outtab-country.

CONCATENATE

wa_sagadr_outtab-seqno

wa_sagadr_outtab-bpext

wa_sagadr_outtab-country INTO wa_sagadr_text SEPARATED BY ' '.

This should work.

- Guru

Reward points for helpful answers

Read only

0 Likes
1,152

hi guru

can u give ur mail id .

i used move with offset wich is better option in your opinion using condense of move with offset.

regards

nishant