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

concatenation

Former Member
0 Likes
1,092

Hi ALL

CAN ANY ONE PLEASE TELL

HOW TO CONCATENATE MATERILA AND PLANT

THE PROBLEM IS

I HAVE TO GIVE SPACE ALSO

EG:

MATERIAL :100

PLANT:200

OUTPUT SHOULD BE

100 200

IT SHOULD GIVE SPACE.

8 REPLIES 8
Read only

Former Member
0 Likes
1,018

Concatenate itab-matnr itab-werks into itab-result separated by space .

Read only

Former Member
0 Likes
1,018

hi


CONCATENATE MATNR WERKS INTO L_VARIABLE SEPARATED BY SPACE.

reference link:

<a href="

http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db998835c111d1829f0000e829fbfe/content.htm

">http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db998835c111d1829f0000e829fbfe/content.htm</a>

thx

pavan

<b><i>**pls reward for helpful answers</i></b>

Read only

Former Member
0 Likes
1,018

Hi,

Check the following code:

v_aufnr = 'Order: '.

concatenate v_aufnr zirpactivity-aufnr into v_aufnr

SEPARATED by space.

Hope this helps.

Reward if helpful.

Regards,

Sipra

Read only

Former Member
0 Likes
1,018

hi,

concatenate itab_mara itab_marc seperated by space.

Reward with points if helpful.

Read only

Former Member
0 Likes
1,018

Hi

CONCATENATE MATERIAL PLANT INTO <Variable> SEPARATED BY ' '.

Regards,

Ranjit Thakur.

<b>Please Mark The Helpful Answer.</b>

Read only

0 Likes
1,018

Hi

concatenate f1 f2 ..........fn into g separated by space.

You can always refer to abapdocu which is the transaction for abap documentation.

Or just press F1 on concatenate in your code. The documentation will pop up.

Vijaya Chamundi

Read only

Former Member
0 Likes
1,018

Hi,

Here is the Code.

DATA:

MATERILA(15) TYPE C,

PLANT(15) TYPE C,

FINAL(31) TYPE C.

CONCATENATE MATERILA ' ' PLANT INTO FINAL.

Regards,

Rama chary.Pammi

Read only

Former Member
0 Likes
1,018

Hi,

The CONCATENATE statement combines two or more separate strings into one.

CONCATENATE c1 ... cn INTO c [SEPARATED BY s].

This statement concatenates the character fields c1 to cn and assigns the result to c. The system ignores spaces at the end of the individual source strings.

The addition SEPARATED BY s allows you to specify a character field s which is placed in its defined length between the individual fields.

If the result fits into c, sy-subrc is set to 0. However, if the result has to be truncated, sy-subrc is set to 4.

Ex:

DATA: c1(10) TYPE c VALUE 'Sum',

c2(3) TYPE c VALUE 'mer',

c3(5) TYPE c VALUE 'holi ',

c4(10) TYPE c VALUE 'day',

c1 (30) TYPE c,

sep(3) TYPE c VALUE ' - '.

CONCATENATE c1 c2 c3 c4 INTO c5.

WRITE c5.

CONCATENATE c1 c2 c3 c4 INTO c5 SEPARATED BY sep.

WRITE / c5.

The output looks like this:

Summerholiday

Sum - mer - holi - day

In c1 to c5, the trailing blanks are ignored. The separator sep retains them.

Regards,

Bhaskar