cancel
Showing results for 
Search instead for 
Did you mean: 

error "offset too large" when emailing smartform

Former Member
0 Kudos

i have created smartform in which i have 3 options of printing print pdf and email.

i am geeting print as well as pdf format but when i am trying email its showing error that offset is too large.

please check my coding and helpme.

i am getting error in line gs_objbin+gv_len = gs_pdf_tab(gv_pos).

Moderator message - Please respect the 5,000 character maximum when posting. Post only the relevant portions of code

Edited by: Rob Burbank on Jun 11, 2011 12:13 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

It seems that in gs_objbin+gv_len = gs_pdf_tab(gv_pos) => gs_pdf_tab is empty.

Prevent the dump by first checking if gs_pdf_tab is not initial.

otherwise the offset value is larger then the string length.

check the Below link. whether your missing something check the link.

http://wiki.sdn.sap.com/wiki/display/Snippets/SmartformasaPDFtoMailid

change your code like this ..


call function 'CONVERT_OTF' 
exporting 
  format = 'PDF' 
  max_linewidth = 134 "pass 132 here and check
  importing 
    bin_filesize = gv_bin_filesize 
    tables 
      otf = gt_otf 
      lines = gt_pdf_tab 
      exceptions 
    err_max_linewidth = 1
 err_format = 2 
err_conv_not_possible = 3
 others = 4. 

Regards,

Dhina..

Edited by: Dhina DMD on Jun 11, 2011 2:01 PM

Edited by: Dhina DMD on Jun 11, 2011 2:17 PM