‎2008 Feb 08 10:42 PM
Hi,
in one of the OSS notes it is suggested to use this code:
SELECT * FROM BKPF
WHERE AWTYP = COBK-AWTYP
AND AWKEY = (COBK-REFBN + COBK-AWORG)
AND BUKRS = COBK-REFBK.
It doesn't work with error: Field "(COBK-REFBN + COBK-AWORG)" is unknown.
When I tried to use this: AWKEY CS COBK-REFBN
AND AWKEY CS COBK-AWORG it did not work either.
AWKEY(10) = COBK-REFBN did not work as well.
Do you know any other tricks to solvve this problem?
Thank you,
Vitaly
‎2008 Feb 08 10:50 PM
No trickery:
DATA: awkey TYPE bkpf-awkey.
CONCATENATE cobk-refbn cobk-aworg INTO awkey.
SELECT * FROM bkpf
WHERE awtyp = cobk-awtyp
AND awkey = awkey
AND bukrs = cobk-refbk.
I'm not sure of the order of the concatenation. If it doesn't work one way, reverse the concatenation.
Rob