Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

DBIF_RSQL_INVALID_RSQL error in SELECT query

hi,

my select statement fails and gives above mentined exception.. any idea why ? pl note this exception i get only when i add the field asdabw in my list. earlier my query did not have this asdabw and it was working perfectly fine. not able to find the root cause.

i have another similar query with a~sdabw and it works perfectly fine !!

query that does not work is this..

SELECT atknum ewerks cvstel atdlnr ashtyp asttrg c~traid

clgbzo entgew fkunnz dname1 dort01 dregio d~pstlz

dlzone avsbed aroute adptbg auptbg aexti1 f~dptbg

fdpten ftsnum adatbg auatbg adpabf aupabf

a~sdabw

INTO TABLE lt_ship_view

FROM ( ( ( ( ( vttk AS a INNER JOIN vttp AS b ON btknum = atknum )

INNER JOIN likp AS c ON cvbeln = bvbeln )

INNER JOIN lips AS e ON evbeln = bvbeln )

INNER JOIN vtts AS f ON ftknum = atknum )

INNER JOIN kna1 AS d ON dkunnr = fkunnz )

WHERE e~werks IN tr_werks AND

a~vsbed IN tr_vsbed AND

a~route IN tr_route AND

a~tknum IN tr_tknum AND

a~shtyp IN tr_shtyp AND

a~sttrg IN tr_sttrg AND

a~tdlnr IN tr_tdlnr AND

a~datbg IN tr_date AND

a~uatbg IN tr_time

%_HINTS DB2 'USE OPTIMIZE FOR 1 ROWS'.

query that works fine is..

SELECT atknum bvbeln cposnr cmatnr carktx clgnum clgort clgtyp c~lgpla

ccharg clfimg cvrkme cbrgew cgewei avsart cwerks dvstel a~shtyp

avsbed atdlnr aroute cvgbel adptbg auptbg

f~kunnz AS kunnr "Get ship to from stage JRB4

ename1 ename2 eort01 eregio epstlz elzone cvbelv cposnv c~vgbel

cvgpos ccuobj aexti1 dlfart cbedar_lf fdpten fdptbg asttrg f~tsnum

csobkz cspart btprfo dlgbzo cmatkl fadrnz ektokd asdabw

INTO TABLE lt_pick_view

FROM ( ( ( ( ( ( vttk AS a INNER JOIN vttp AS b

ON btknum = atknum )

INNER JOIN lips AS c ON cvbeln = bvbeln )

INNER JOIN likp AS d ON dvbeln = bvbeln )

INNER JOIN vtsp AS p ON ptknum = btknum AND ptpnum = btpnum )

INNER JOIN vtts AS f ON ftknum = ptknum AND ftsnum = ptsnum )

INNER JOIN kna1 AS e ON ekunnr = fkunnz )

WHERE c~werks IN tr_werks

AND d~vstel IN tr_vstel

AND c~brgew IN tr_weight

AND a~vsbed IN tr_vsbed

AND a~route IN tr_route

AND a~tknum IN tr_tknum

AND b~vbeln IN tr_dvbeln

AND a~shtyp IN tr_shtyp

AND a~sttrg IN tr_sttrg

AND a~tdlnr IN tr_tdlnr

AND a~dptbg IN tr_date

AND a~uptbg IN tr_time

AND e~regio IN tr_regio

AND a~exti1 IN tr_exti1

AND e~lzone IN tr_tzone

%_HINTS DB2 'USE VALUES FOR OPTIMIZATION'.

Tags:
replied

The fields mostly not in the order. so use CORRESPONDING FIELDS OF

SELECT a~tknum e~werks c~vstel a~tdlnr a~shtyp a~sttrg c~traid
c~lgbzo e~ntgew f~kunnz d~name1 d~ort01 d~regio d~pstlz
d~lzone a~vsbed a~route a~dptbg a~uptbg a~exti1 f~dptbg
f~dpten f~tsnum a~datbg a~uatbg a~dpabf a~upabf
a~sdabw
INTO CORRESPONDING FIELDS OF TABLE lt_ship_view

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question