cancel
Showing results for 
Search instead for 
Did you mean: 

Function Module which can send spool as fax

Former Member
0 Kudos

Hi All,

I have a requirment to send the output of a program which is list as FAX. What can be the function module to do this Job.

We have undergone upgrade of our server from 4.6C to ECC 6.0. In old system below was the code which is not working now.

  • To ensure that any prefix digits for the fax No. are added

CALL FUNCTION 'SK_DEST_TO_NUMBER'

EXPORTING

COUNTRY = L_COUNTRY

DESTINATION = 'TF01'

NUMBER = L_NUMBER

SERVICE = 'TELEFAX'

IMPORTING

DNUMBER = L_FAXNO

EXCEPTIONS

COUNTRY_NOT_CONFIGURED = 1

SERVER_NOT_FOUND = 2

SERVICE_NOT_SUPPORTED = 3

WRONG_SERVICE_FOR_DEST = 4

OTHERS = 5.

IF SY-SUBRC NE 0.

MESSAGE I268 WITH L_OA_LIFNR.

ENDIF.

  • Call magic C-routine to fax spool request

MOVE:

SY-SPONO TO L_IDENT,

'TF01' TO TSP01-RQDEST,

1 TO TSP01-RQCOPIES,

3 TO TSP01-RQPRIO,

SPACE TO TSP01-RQTITLE,

SY-UNAME TO TSP01-RQRECEIVER,

SPACE TO TSP01-RQDIVISION,

L_FAXNO TO TSP01-RQTELENUME,

0 TO L_START,

0 TO L_END.

CALL 'RSPOAEPJ' ID 'ID' FIELD L_IDENT

ID 'DEST' FIELD TSP01-RQDEST

ID 'COPY' FIELD TSP01-RQCOPIES

ID 'PRIO' FIELD TSP01-RQPRIO

ID 'TITLE' FIELD TSP01-RQTITLE

ID 'RECEIVER' FIELD TSP01-RQRECEIVER

ID 'DIVISION' FIELD TSP01-RQDIVISION

ID 'TELENUM' FIELD TSP01-RQTELENUME

ID 'STARTPAGE' FIELD L_START

ID 'ENDPAGE' FIELD L_END

ID 'RC' FIELD L_RC

ID 'ERRMSG' FIELD L_ERRMSG.

  • Error handling etc..

IF SY-SUBRC <> 0.

FORMAT COLOR COL_NEGATIVE.

WRITE: / 'Error message'(052), L_ERRMSG,

'return code'(053), L_RC,

'returned when attempting to send fax- pgm terminated'(054).

FORMAT COLOR OFF.

STOP.

ELSE.

W_FAX_SENT = 1.

ENDIF.

Now this function is not able to send FAX.

Can you please suggest any solution.

Regards,

Vidya.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Used classes given in OSS note.

Regards,

Vidya.

Former Member
0 Kudos

you can use FM SO_DOCUMENT_SEND_API1 to send a fax.

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

also go through below thread..

Regards.