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

Concatenate between two fields

Former Member
0 Likes
720

Hi,

I need logic for stras(Char 60)(Address 1) and LOCAT(Char40)(Address 2).

Concatenate Address line 1 and 2. Put a space between the two fields. Send first 24 characters. Left justify, fill with spaces.

Can any body help me this.

Regards,

Sujan

6 REPLIES 6
Read only

Former Member
0 Likes
692

hi,

check this sample code.

PARAMETERS:
stras(60) TYPE c, " fields for replicating the size
locat(40) TYPE c. " fields for replicating the size
DATA:
target TYPE string.
CONCATENATE stras locat INTO target SEPARATED BY space.

WRITE: target(24).

Regards

Sharath

Read only

Former Member
0 Likes
692

CONCATENATE Address 1 Address 2 INTO finaladdress SEPARATED by SPACE.

var = finaladdress0+(24).

then use SHIFT finaladdress BY 24 PLACES LEFT to append blank to right side of the string.

Read only

Former Member
0 Likes
692

Hi,

what is meant with send 24 characters ?

Read only

0 Likes
692

>

> Hi,

>

> what is meant with send 24 characters ?

It sounds as if they just want you to give them them first 24 characters of the concatenated string. But you should really be checking with whoever is asking you to do this.

Read only

Former Member
0 Likes
692

hi

DATA:

stras(60) TYPE c,

locat(40) TYPE c,

address TYPE string,

final TYPE string

CONCATENATE stras locat INTO address SEPARATED BY space.

CONDENSE address.

final = address0+(24).

try this.

Best Regards Marco

Read only

Former Member
0 Likes
692

Thanks a lot.

Regards,

sujan