Posted: Sat Nov 17, 2007 9:58 pm Post subject: Display a picture and text stored in SAP using OLE2
Code:
REPORT YOLE .
* This program stores or gets pictures and texts in/from SAP.
* If key has an initial value, it will store the picture and text in
* an SAP cluster.
* If key has no initial value it calls MsWord via OLE2 and displays
* the picture and the text.
TABLES : INDX.
INCLUDE OLE2INCL.
DATA: WRD TYPE OLE2_OBJECT,
REC TYPE OLE2_OBJECT,
PIC TYPE OLE2_OBJECT.
DATA: BEGIN OF ITAB1 OCCURS 20,
LINE(1022) TYPE X,
END OF ITAB1.
DATA: BEGIN OF IREC OCCURS 1,
LINE(1022) TYPE X,
END OF IREC.
DATA: BEGIN OF ITAB2 OCCURS 20,
LINE(100),
END OF ITAB2.
*data: key like indx-srtfd value 'JJJ'.
DATA: KEY LIKE INDX-SRTFD.
DATA: MODE, SIZE TYPE I, TIM LIKE SY-UZEIT.
IF KEY <> ' '. "Import the picture and text to SAP
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
FILENAME = 'c:\input\bubbles.bmp'
FILETYPE = 'BIN'
TABLES
DATA_TAB = ITAB1.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.