08-28-2006 4:58 PM
Hi Guys,
While working on SAPScript, the driver program RM08NAST control comes out of MRM_ERS_ENTRY function module ,I am using (SAPLSTXC)itcpp-tdspoolid to fetch spoolid(which I use for conversion to pdf)
But now I want otfdata because instead of using spoolid , I want to use OTFdata directly so that I can directly convert in pdf.
Do I get it from same structure (SAPLSTXC)itcpp or somewhere else ?
Inputs will be appreciated...
08-28-2006 5:12 PM
HI,
Check the below code......
Get the OTF from CLOSE_FORM (otf_data)
Convert OTF to PDF
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
IMPORTING
bin_filesize = pdf_size
TABLES
otf = otf_data
lines = it_pdf.
Make each line 255 characters
CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
TABLES
content_in = it_pdf
content_out = it_pdfout.
Create the PDF File
CLEAR it_pdfdata.
REFRESH it_pdfdata.
LOOP AT it_pdfout.
MOVE it_pdfout-tline TO it_pdfdata-line.
APPEND it_pdfdata.
CLEAR it_pdfdata.
ENDLOOP.
Use GUI_DOWNLOAD to to downlaod it_pdfdata file.
Regards
Sudheer
08-28-2006 5:20 PM
I know how to convert data in pdf. My question is completely different. I am asking how can I get otf data in stucture (SAPLSTXC)itcpp.....
08-28-2006 5:55 PM
Hello Rajesh,
Try this to get otf data...
Before MRM_ENTRY_ERS call add:
NAST-SORT1 = 'SWP'.
After the MRM fm call add the following fm to get otf data:
data: lt_otf_data type itcoo occurs 0.
call function 'READ_OTF_FROM_MEMORY'
EXPORTING
MEMORY_KEY = NAST-OBJKY
tables
otf = lt_otf_data.
EXCEPTIONS
MEMORY_EMPTY = 1
OTHERS = 2
Regards
Sridahr