08-20-2007 9:01 AM
Hello,
i need to send an attached pdf document via fax.
can anyone explain me how to proceed?
thanks
regards
Nitin
08-20-2007 9:12 AM
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
08-20-2007 9:12 AM
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
08-21-2007 8:04 AM
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
08-20-2007 9:23 AM
Hi,
Refer to the following link:
http://sap-img.com/abap/sending-fax-from-abap.htm
Hope this helps.
Reward if helpful.
Regards,
Sipra