I got my select statement like this right now:
SELECT pernr reinr pdatv pdatb accdt pdvrs abrec FROM ptrv_perio
INTO CORRESPONDING FIELDS OF TABLE lt_ptrv_perio
WHERE ( abrec EQ '2'
AND pdatv GE pa_begda
AND pdatb LE pa_endda )
OR ( abrec EQ '3'
AND accdt GE pa_begda
AND accdt LE pa_endda ).
The thing is the attribute accdt
from my second condition is in another table. Is there a way I can get it and directly use it in the select statement?
The problem I got is, that I can't get the value before the select, because I get the right travel ID just in that select.
I hope I was able to explain my issue. Thanks for any hints! :)
The following code solved my issue:
I'm selecting from table p while on criteria in the OR-Statement comes from table h. Hope this will help somebody besides me :)