Hi all,
I am working with native SQL from ABAP report to fetch the data from external Oracle . I have successfully established connection from SAP to External oracle . Problem is coming when i am trying to use where clause within select statement in native SQL and giving short dump saying "Literal does not match format string " . The below is the statement i am using
exec sql.
SELECT INVOICE_NUM FROM TB_INVOICES into :dbn WHERE INVOICE_DATE between :S_BUDAT-LOW and :S_BUDAT-HIGH
endexec
Also i declared
INVOICE_NUM type CHAR200,
INVOICE_DATE type date. as in external oracle also it is defined the same way they used varchar2(200 BYTE) for INVOICE_NUM IN External oracle
Also i used the same select by opening Cursor but same issue and dump
exec sql.
OPEN c FOR
SELECT INVOICE_NUM FROM TB_INVOICES WHERE INVOICE_DATE between :S_BUDAT-LOW and :S_BUDAT-HIGH
endexec
DO.
EXEC SQL.
FETCH NEXT c INTO :DBN
ENDEXEC.
IF sy-subrc <> 0.
EXIT.
ELSE.
...
ENDIF.
ENDDO.
EXEC SQL.
CLOSE c
ENDEXEC.
<< Moderator message - Everyone's problem is important. But the answers in the forum are provided by volunteers. Please do not ask for help quickly. >>
Edited by: Rob Burbank on Oct 24, 2011 12:20 PM