‎2008 Dec 16 7:46 PM
Hi Experts,
using the below native SQL statment get the Document Number.
But its going to Short dump
EXEC SQL.
SELECT BELNR
INTO :lv_belnr-low
FROM RFBLG WITH ( INDEX ( "RFBLG~0" ) )
WHERE MANDT = :p_mandt
AND BUKRS = :lv_bukrs
AND BELNR > :lv_belnr-high
AND GJAHR = :p_gjahr
ORDER BY MANDT, BUKRS, BELNR, GJAHR
ENDEXEC.
DUMP Is: INDEX of ( "RFBLG~0") is not available.
Please suggest me what I need to do to resolve this.
First time I am working in Native Sql statements.
Thnx,
Sam
‎2008 Dec 16 10:43 PM
Hi,
Try using class CL_SQL_STATEMENT, it is use to trigger the native sql statement. for reference you can also see the demo program ADBC_DEMO provided by SAP.
although I haven't used this class, but I have seen it in a program.
Hope this will help.
With best regards,
Navneet Chaubey
‎2008 Dec 16 8:09 PM
Can you explain what you are trying to do. There must be dozens of easier ways.
Rob
‎2008 Dec 16 10:43 PM
Hi,
Try using class CL_SQL_STATEMENT, it is use to trigger the native sql statement. for reference you can also see the demo program ADBC_DEMO provided by SAP.
although I haven't used this class, but I have seen it in a program.
Hope this will help.
With best regards,
Navneet Chaubey
‎2008 Dec 17 5:41 AM
Sam,
your requirement is not very clear., still u can do the following.
Try re-activate the indexes.
Since it is Table Cluster, you may not find the indexes at the Data Dictionary (SE11).
you can write another Native Sql statement for re-build the indexes of the table like:
EXEC SQL.
ALTER INDEX RFBLG~0 REBUILD
ENDEXEC.
do the above for all the available indexes of the table
Pl. check the above and tell me the result
thanks\
Mahesh