Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Creating PDF From OTF Issue

Former Member
0 Likes
717

We jammed a lot of info onto one page (the last page of the SAPSCRIPT). The page is truncated. When I debug READ_OTF_FROM_MEMORY the table it returns is incomplete. Almost like it is saying it hit a max storage.

When I go into the READ_OTF_FROM_MEMORY ID MEMKEY is defined as follows:

DATA: MEMKEY(32). "max len of memory id is 32

I am thinking we reached a limit. Anyway to increase memory in thie Function Module. Or, another way to get all of the data.

Thank-you.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
622

Hi Tom,

we cant make any changes to the standard function module,

try this function module

CALL FUNCTION 'CONVERT_OTF'

EXPORTING

format = 'PDF'

  • MAX_LINEWIDTH = 132

  • ARCHIVE_INDEX = ' '

  • COPYNUMBER = 0

  • ASCII_BIDI_VIS2LOG = ' '

  • PDF_DELETE_OTFTAB = ' '

IMPORTING

BIN_FILESIZE = w_size

  • BIN_FILE =

TABLES

otf = t_otf

lines = t_pdf

EXCEPTIONS

ERR_MAX_LINEWIDTH = 1

ERR_FORMAT = 2

ERR_CONV_NOT_POSSIBLE = 3

ERR_BAD_OTF = 4

OTHERS = 5

.

IF sy-subrc <> 0.

  • RAISE error. " oops

ENDIF.

Regards

Adil

We jammed a lot of info onto one page (the last page of the SAPSCRIPT). The page is truncated. When I debug READ_OTF_FROM_MEMORY the table it returns is incomplete. Almost like it is saying it hit a max storage.

When I go into the READ_OTF_FROM_MEMORY ID MEMKEY is defined as follows:

DATA: MEMKEY(32). "max len of memory id is 32

I am thinking we reached a limit. Anyway to increase memory in thie Function Module. Or, another way to get all of the data.

Thank-you.

2 REPLIES 2
Read only

Former Member
0 Likes
623

Hi Tom,

we cant make any changes to the standard function module,

try this function module

CALL FUNCTION 'CONVERT_OTF'

EXPORTING

format = 'PDF'

  • MAX_LINEWIDTH = 132

  • ARCHIVE_INDEX = ' '

  • COPYNUMBER = 0

  • ASCII_BIDI_VIS2LOG = ' '

  • PDF_DELETE_OTFTAB = ' '

IMPORTING

BIN_FILESIZE = w_size

  • BIN_FILE =

TABLES

otf = t_otf

lines = t_pdf

EXCEPTIONS

ERR_MAX_LINEWIDTH = 1

ERR_FORMAT = 2

ERR_CONV_NOT_POSSIBLE = 3

ERR_BAD_OTF = 4

OTHERS = 5

.

IF sy-subrc <> 0.

  • RAISE error. " oops

ENDIF.

Regards

Adil

Read only

0 Likes
622

Hello Adil,

Strange thing is we do call this FM you request after READ_OTF_FROM_MEMORY?