2016 Apr 08 8:43 PM
I was trying to use line_exists today and ran into an unexpected issue you can see below. When I use line_exists for an if statement expression, it handles the usage correctly. If I try to save the value directly to a boolean variable however, it will fail with the odd "line_exists( expected, not line_exists(" error. Just curious if anybody knew if there was a note out there to address this problem or if this is not allowed usage for line_exists.
2016 Apr 08 9:32 PM
Hello,
According to SAP Help, the table expression line_exists is only used to check the existence of the specified row. No temporary result is created.
I think you can't assign the result to a variable, the result doesn't exist.
Thanks.
Abde.
2016 Apr 08 9:55 PM
I saw the same thing, but I thought it was in reference to the actual table read statement in terms of not storing a reference to the found line, not the result of the check. My assumption is that the result of the check is reported somewhere in order for the IF statement to be able to access it. I might be reading it wrong though!
2016 Apr 09 5:49 AM
just in case, you should use rv_is_dc = boolc( line_exists( ... ) ).
2023 Feb 26 4:17 PM
Hi sandra.rossi
Your syntax is fine and it should be accepted as best answer. I don't know if moderators can do that. Moderators! Do it if you can. 🙂
2023 Feb 26 8:01 PM
nemanja.simovic.avnet I guess they won't do it, it's up to the OP to select the best answer. You can post an answer so that people can find yours and possible comment. Thanks. PS: no need to mention my name.