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

multiple invoice in single pdf

Former Member
0 Likes
513

Hi,

I need to get more than one invoice in single pdf. I am using below code:

DATA: lines LIKE STANDARD TABLE OF tline.

DATA: l_line LIKE itcoo,

v_bin_filesize type i,

l_pdf_xstring type xstring.

STATICS: pdf_dat1 LIKE itcoo OCCURS 0 WITH HEADER LINE.

LOOP AT job_output_info-otfdata INTO l_line.

pdf_dat1 = l_line.

APPEND pdf_dat1.

CLEAR: l_line, pdf_dat.

ENDLOOP.

IF nast-dimme = 'X'.

CALL FUNCTION 'CONVERT_OTF'

EXPORTING

format = 'PDF'

max_linewidth = 132

IMPORTING

BIN_FILESIZE = v_bin_filesize

BIN_FILE = l_pdf_xstring

TABLES

otf = pdf_dat1

lines = lines

EXCEPTIONS

err_max_linewidth = 1

err_format = 2

err_conv_not_possible = 3

err_bad_otf = 4

OTHERS = 5

.

I am getting return code = 4.

Please tell me where i am wrong or why sy-subrc ne 0.

Regards,

Abhimanyu

Hi,

I need to get more than one invoice in single pdf. I am using below code:

DATA: lines LIKE STANDARD TABLE OF tline.

DATA: l_line LIKE itcoo,

v_bin_filesize type i,

l_pdf_xstring type xstring.

STATICS: pdf_dat1 LIKE itcoo OCCURS 0 WITH HEADER LINE.

LOOP AT job_output_info-otfdata INTO l_line.

pdf_dat1 = l_line.

APPEND pdf_dat1.

CLEAR: l_line, pdf_dat.

ENDLOOP.

IF nast-dimme = 'X'.

CALL FUNCTION 'CONVERT_OTF'

EXPORTING

format = 'PDF'

max_linewidth = 132

IMPORTING

BIN_FILESIZE = v_bin_filesize

BIN_FILE = l_pdf_xstring

TABLES

otf = pdf_dat1

lines = lines

EXCEPTIONS

err_max_linewidth = 1

err_format = 2

err_conv_not_possible = 3

err_bad_otf = 4

OTHERS = 5

.

I am getting return code = 4.

Please tell me where i am wrong or why sy-subrc ne 0.

Regards,

Abhimanyu

2 REPLIES 2
Read only

Former Member
0 Likes
470

Issue not relevant.

Read only

Former Member
0 Likes
470

Closing this thread