2014 Dec 09 5:05 PM
hI,
I have the selection below by DBLink:
TRY.
EXEC SQL.
CONNECT TO :vg_dbs
ENDEXEC.
EXEC SQL.
SET CONNECTION :vg_dbs
ENDEXEC.
EXEC SQL.
OPEN c1 FOR
SELECT CON_DSSNOME, CON_NUSCICNUMERO, SOR_DTDRESCISAO
FROM VW_DESLIGADOS
ENDEXEC.
DO.
EXEC SQL.
FETCH NEXT c1 INTO :wa_apdata-con_dssnome, :wa_apdata-con_nuscicnumero, :wa_apdata-sor_dtdrescisao
ENDEXEC.
IF sy-subrc = 0.
APPEND wa_apdata TO ti_apdata.
ELSE.
EXIT.
ENDIF.
ENDDO.
EXEC SQL.
CLOSE c1
ENDEXEC.
CATCH cx_sy_native_sql_error INTO vg_exc_ref.
vg_text = vg_exc_ref->get_text( ).
MESSAGE e012(zbc001) WITH vg_text.
ENDTRY.
when I run the program, the following error appears:
SQL: ORA-01843: not a valid month
But, even if I do not select the date field "sor_dtdrescisao", the error persists.
Could you help me please?
Wagner
2014 Dec 10 5:58 AM
Hi,
The date being fetched probably contains an illegal month value (like '13')
Check the table contents, or the structure of the fields you are reading into.
cheers
Paul
2014 Dec 10 5:58 AM
Hi,
The date being fetched probably contains an illegal month value (like '13')
Check the table contents, or the structure of the fields you are reading into.
cheers
Paul
2014 Dec 11 4:46 PM
Hi,
The problem was in view in Oracle.
There was one condition to date be converted into a format that the SAP can read.
Once corrected in Oracle, SAP read smoothly.
SOR_DTDRESCISAO >= TO_DATE('01/01/2011','DD/MM/YYYY')