cancel
Showing results for 
Search instead for 
Did you mean: 

Connection MESG and INOB with additional field

Former Member
0 Kudos

Hi friends,

i'm beginner in ABAP and for this reason i create reports in ABAP query.

So i create query between tables MSEG and INOB (then INOB with AUSP).

In INOB-OBJEK - value is matnr and charg,

but value in this field is: for example

matnr charg

EK759064BK (8 free spaces) 0000000066

EK759064BK (8 free spaces) 0000000067

EK759064BK (8 free spaces) 0000000068

EK759064BK (8 free spaces) 0000000069

EK759064BK (8 free spaces) 0000000070

My idea is to create additional field with MSEG-MATNR and MSEG-CHARG and relate with INOB-OBJEK

(concatenate mseg-matnr mseg-charg into refkey.)

result is:

EK759064BK0000000066

EK759064BK0000000067

EK759064BK0000000068

EK759064BK0000000069

EK759064BK0000000070

Now my question is how to change code and create additional field like INOB-OBJEK, how to change my code so i have 8 free spaces between MATNR and CHARG?

Edited by: Marin Lyubomirov on Dec 13, 2009 9:39 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello


concatenate mseg-matnr mseg-charg into refkey separated by '        '. " it is 8 spaces between ' '

Answers (1)

Answers (1)

JL23
Active Contributor
0 Kudos

the ABAP keyword CONCATENATE has a parameter RESPECTING BLANKS

So if you use this this parameter, then you would get the missing 8 spaces, because the material number field is 18 long and your material only 10 long.

Alternative, just use an own field that is 8 long and do the concatenation like this :

concatenate mseg-matnr myfield mseg-charg into refkey