Application Development 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: 

send pdf via fax

dev_parbutteea
Active Contributor
0 Kudos

Hello,

i need to send an attached pdf document via fax.

can anyone explain me how to proceed?

thanks

regards

Nitin

1 ACCEPTED SOLUTION

former_member223537
Active Contributor
0 Kudos

Hi,

YOu need to get the PDF data into an internal table ITAB_DATA & then

<b>For FAX</b>

Use FM 'INIT_TEXT' for SAP-Script Initialization.

or

OPEN_FORM , WRITE_FORM, CLOSE_FORM.

Use FM 'PRINT_TEXT' for FAX.

Pass parameters as follows :-

Exporting

DEVICE = 'TELEFAX' " For printing call the same FM again & Pass printer name

DIALOG = 'X' " To get the option of Print Preview along with the fax number on dialog box

HEADER = POPT

Importing

RESULT = PRES " of type ITCPP

Tables

LINE = ITAB_DATA.

POPT is structure of type ITCPO.

Populate following values in POPT :

POPT-TDNEWID = 'X'

POPT-TDIMMED = 'X'

POPT-TDLIFETIME = 8 "To keep 8 days in spool

POPT-TDTELENUM = <Fax Number> " Without country code

POPT-TELELAND = <Country> " Country code

Best regards,

Prashant

3 REPLIES 3

former_member223537
Active Contributor
0 Kudos

Hi,

YOu need to get the PDF data into an internal table ITAB_DATA & then

<b>For FAX</b>

Use FM 'INIT_TEXT' for SAP-Script Initialization.

or

OPEN_FORM , WRITE_FORM, CLOSE_FORM.

Use FM 'PRINT_TEXT' for FAX.

Pass parameters as follows :-

Exporting

DEVICE = 'TELEFAX' " For printing call the same FM again & Pass printer name

DIALOG = 'X' " To get the option of Print Preview along with the fax number on dialog box

HEADER = POPT

Importing

RESULT = PRES " of type ITCPP

Tables

LINE = ITAB_DATA.

POPT is structure of type ITCPO.

Populate following values in POPT :

POPT-TDNEWID = 'X'

POPT-TDIMMED = 'X'

POPT-TDLIFETIME = 8 "To keep 8 days in spool

POPT-TDTELENUM = <Fax Number> " Without country code

POPT-TELELAND = <Country> " Country code

Best regards,

Prashant

0 Kudos

Hello Prashant,

thanks for the reply, your code looks to be fine.

but when implemented, i'm haing a runtime error saying ' Although the currently specified field "POPT" is the correct type, its length is incorrect'.

could you please clarify on this

thanks

Regards

Nitin

Former Member
0 Kudos

Hi,

Refer to the following link:

http://sap-img.com/abap/sending-fax-from-abap.htm

Hope this helps.

Reward if helpful.

Regards,

Sipra