on 09-17-2013 3:47 PM
I have written the following routine within a transformation:
DATA:
LV_SUM_DarlPfandbereich TYPE I.
SELECT SUM( t0~/BIC/Z_LOANMNT ) INTO LV_SUM_DarlPfandbereich
FROM /BIC/PZ_PAWNNUM AS t0
INNER JOIN /BIC/PZ_ACCDOCE AS t2
ON (
t0~/BIC/Z_FILIALE EQ t2~/BIC/Z_FILIALE
AND t0~/BIC/Z_PAWNNUM BETWEEN t2~/BIC/Z_PWNNFRO AND t2~/BIC/Z_PAWNNTO
)
INNER JOIN /BIC/ADSO_GR0200 AS t1
ON ( t1~/BIC/Z_PAWNNUM EQ t0~/BIC/Z_PAWNNUM ).
RESULT = LV_SUM_DarlPfandbereich.
If I check the code for syntax errors I get:
E:Wrong Expression "BETWEEN T2~/BIC/Z_PWNNFRO" in logical condition.
What am I doing false. I cannot figure it out.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
DATA:
LV_SUM_DarlPfandbereich TYPE I.
SELECT SUM( t0~/BIC/Z_LOANMNT ) INTO LV_SUM_DarlPfandbereich
FROM /BIC/PZ_PAWNNUM AS t0
INNER JOIN /BIC/PZ_ACCDOCE AS t2
ON ( t0~/BIC/Z_FILIALE EQ t2~/BIC/Z_FILIALE )
INNER JOIN /BIC/ADSO_GR0200 AS t1
ON ( t1~/BIC/Z_PAWNNUM EQ t0~/BIC/Z_PAWNNUM )
WHERE t0~/BIC/Z_PAWNNUM BETWEEN t2~/BIC/Z_PWNNFRO AND t2~/BIC/Z_PAWNNTO.
RESULT = LV_SUM_DarlPfandbereich.
The above leads to same error. Thank you for your advice Anshu regarding BETWEEN in ON of JOIN. I was not aware of it.
Hi,
I just asked to use BT instead of between.I am also not an expert in abap. Moreover i do not have system also to test the code.
So i suggest to post your query in this forum.
http://scn.sap.com/community/abap
You will get quick responses there.
Regards,
AL
Hi frank,
Seems like you may missed one more condition here. pls recheck your logic
t0~/BIC/Z_PAWNNUM BETWEEN t2~/BIC/Z_PWNNFRO AND t2~/BIC/Z_PAWNNTO <here needed onem ore field think so>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
10 | |
8 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.