on 2024 Nov 05 2:03 PM
I am using LSMW with object 0070 and program RV14BTCI, with XK15.
I concatenate vendor, material, purchasing org, plant and inforecord type.
when using a numerical vendor, I add the leading zeroes but when the vendor is alphanumeric I need to add spaces.
the issue is that when I add the spaces after the vendor, the system does not recognize it and inserts data from the next field instead, affecting also the next fields
how can I concatenate spaces or an alphanumeric vendor into VAKEY?
Request clarification before answering.
I found a simpler solution
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I ran into the same issue when populating tax condition records where country (ALAND) is actually defined as a CHAR3 field but typically only has 2 characters. So I used the "respecting blanks" statement in the concatenate code string and this works fine. Code:
* Target Field: BKOND2-VAKEY_LONG Variable key 255 Character
CONCATENATE
price_conditions-aland
price_conditions-taxk1
price_conditions-taxm1
INTO bkond2-vakey_long respecting blanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
CONCATENATE RESPECTING BLANKS
You could pass the key values to structure KOMG, then use a FM such as SD_CONDITION_VAKEY_FILL to fill VAKEY.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hallo Sandra
thank you for the reply.
generally speaking I am aware of the fact that trailing spaces are ignored in ABAP and I can see that also in table LFA1 in the unconverted value of the vendor.
But it seems that in VAKEY they are: in fact I tried to add the spaces before the vendor and the system saw it, the fields were correct in their right spaces: the issue was that the system did not recognize the vendor because it considered the spaces
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 30 | |
| 16 | |
| 14 | |
| 6 | |
| 5 | |
| 5 | |
| 5 | |
| 4 | |
| 4 | |
| 3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.