2024 Oct 02 4:10 AM
Hi there,
I don't have much ABAP knowledge but I need to create a infoset which joins VIBDOBJASS-OBJNRTRG and IFLOS-TPLNR.
The problem is, OBJNRTRG has this short 2 letter string at the front of the entry which indicates the type of object (its like 2 concatenated fields)
To join on IFLOS-TPLNR, I would need to remove this 2 letter string.
Here's an example
VIBDOBJASS-OBJNRTRG
IF?0000000000000xxxxx
IFLOS-TPLNR
?0000000000000xxxxx
How can I make such a query? Do I create an additional field with that in the record processing code? could you provide some guidance how this would actually be structured technically?
2024 Oct 02 7:45 AM - edited 2024 Oct 02 7:48 AM
Hi!
You should be able to solve this with substring within the join-clause.
Example:
SELECT * FROM usr01
LEFT JOIN usr02 ON ( SUBSTRING( usr01~bname, 3, 10 ) = usr02~BNAME )
INTO TABLE @DATA(lt_users) .
Cheers,
ben
2024 Oct 02 11:07 AM
Take IFLOT-OBJNR with IFLOT-TPLNR = IFLOS-TPLNR and IFLOT-OBJNR = VIBDOBJASS-OBJNRTRG
hth
2024 Oct 03 4:54 AM
Thank you, though this was an alternate solution to the problem it meets the requirement.
LG