on 10-06-2023 10:02 AM
Hi Team,
I have a string(VAKEY) which can have 4 or 5 or 6 words and i want to capture the 4th word from that string.
in the above VAKEY the words are seperated by spaces , it can be seperated by 2 spaces or 3 spaces or 4 spaces.
I want to split the VAKEY into lv_v1 , lv_v2 , lv_v3 etc..
In the above pic I want 4th word 065-0004 from that total VAKEY string.
Note: Sometimes 4th word value may not come also , as you can observe in the first line
can you guide me to do so.
Thanks,
Priya Ramani.
You can split intto table and delete Space rows and read the row with index 4
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
VAKEY is nothing but the primary key of condition table(KVEWE + KOTBNR). In this case the table names are A882 and A881. You have to declare a field symbol with the type of the table name dynamicaly and pass VAKEY to that field symbol and use the field you need. The space is not static.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
KONH-VAKEY content should not be split by spaces!
Here is little bit of discussion how it could be read:
https://answers.sap.com/questions/335935/how-do-i-reverse-parse-field-vakey-in-table-konh-f.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In new ABAP versions you can use segment function. Documentation can be found here: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abensegment_functions.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
74 | |
9 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.