Question:
Hi ,
We are using SAP ECC 5.0 and we need to coonect to an oracle database ver 9i rel2.
We need to get the data stored in a blob(pdf/jpeg) into an itab and later
use it for futher processing.
I am familiar with using native SQL and I wrote a stored procedure in the non sap oracle database to send the blob info into an internal table in sap.
But the information is in hex format and the long raw of SAP does not handle this very well.
Plz see my code below.
data: itab_insp_drawing like zpicture_cluster(which is of type lraw - 7902 )
occurs 100 with header line.
EXEC SQL.
EXECUTE PROCEDURE
proc_get_insp_drawings (
IN :itab-aq_id,
IN :itab-section_id,
IN :t_in_position,
out :itab_insp_drawing-picture,
OUT :t_blob_length,
out :t_out_position,
OUT :t_status )
ENDEXEC.
append itab_insp_drawing.
while t_out_position < t_blob_length.
EXEC SQL.
EXECUTE PROCEDURE
proc_get_insp_drawings (
IN :itab-aq_id,
IN :itab-section_id,
IN :t_in_position,
out :itab_insp_drawing-picture,
OUT :t_blob_length,
out :t_out_position,
OUT :t_status )
ENDEXEC.
append itab_insp_drawing.
endwhile.
******************
Any ideas of how to handle blobs from non sap oracle table. I need this blob into an itab in sap.
Help appreciated.
Thanks
Mala
Answer:
My first shot: This is not going to work. The only way of access BLOB fields is via OCI-calls (low level Oracle API). Alternative option would be using the Perl Ora:DB library which has OCI-support. You might invoke from ABAP such a Perl program, which extracts the data into a file and load the file into SAP using ABAP. Not a nice solution, but the only one that pops-up.
Answer:
Thanks.
I'll try the OCI option.
Mala