on 12-13-2009 7:39 AM
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
Hello
concatenate mseg-matnr mseg-charg into refkey separated by ' '. " it is 8 spaces between ' '
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
8 | |
7 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.