Skip to Content
author's profile photo Former Member
Former Member

Sending smartform through fax

Hi,

I have used some code to send the smartform through fax.I am able to send it through fax,but i am not getting the document in pdf format.It is coming in raw format.

CALL FUNCTION 'SO_OBJECT_SEND'

EXPORTING

OBJECT_HD_CHANGE = ls_object_hd

OBJECT_TYPE = 'PDF'

OUTBOX_FLAG = 'X'

OWNER = sy-uname

ORIGINATOR = ls_originator

ORIGINATOR_TYPE = 'B'

TABLES

OBJCONT = lt_objbin

RECEIVERS = x_receiver

EXCEPTIONS

ACTIVE_USER_NOT_EXIST = 1

COMMUNICATION_FAILURE = 2

COMPONENT_NOT_AVAILABLE = 3

FOLDER_NOT_EXIST = 4

FOLDER_NO_AUTHORIZATION = 5

FORWARDER_NOT_EXIST = 6

NOTE_NOT_EXIST = 7

OBJECT_NOT_EXIST = 8

OBJECT_NOT_SENT = 9

It is showing sy-subrc value as 9 at this function module.If anyone has worked on similar kind of requirement please let me know.

Its urgent.

Regards,

Hema

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Mar 31, 2008 at 03:44 AM
    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      I have used this code in my program.

      form send_fax tables p_lt_otf

      using p_lt_itcpp structure itcpp.

      *DATA: lt_otf TYPE TABLE OF itcoo WITH HEADER LINE.

      DATA: lt_tline TYPE TABLE OF tline WITH HEADER LINE,

      lt_record TYPE TABLE OF solisti1 WITH HEADER LINE,

      lt_itcpp TYPE TABLE OF itcpp WITH HEADER LINE.

      *DATA : lt_itcpp TYPE itcpp.

      DATA: BEGIN OF X_RECEIVER OCCURS 0.

      INCLUDE STRUCTURE SOOS1.

      DATA: END OF X_RECEIVER.

      DATA : lt_RECEIVER LIKE X_RECEIVER-recnam.

      DATA : ls_receiver TYPE soos1.

      DATA: BEGIN OF X_OBJCONT OCCURS 10.

      INCLUDE STRUCTURE SOLI.

      DATA: END OF X_OBJCONT.

      DATA: lt_objcont LIKE X_OBJCONT.

      DATA: ls_objcont TYPE SOLI.

      DATA: BEGIN OF X_OBJHEAD OCCURS 0.

      INCLUDE STRUCTURE SOLI.

      DATA: END OF X_OBJHEAD.

      DATA: lt_objhead LIKE X_OBJHEAD.

      DATA: ls_objhead TYPE SOLI.

      data: begin of off_obj.

      include structure soodk.

      data: end of off_obj.

      DATA: X_OBJECT_TYPE LIKE SOOD-OBJTP.

      DATA: BEGIN OF X_OBJECT_HD_CHANGE.

      INCLUDE STRUCTURE SOOD1.

      DATA: END OF X_OBJECT_HD_CHANGE.

      DATA: lt_object_hd_change LIKE X_OBJECT_HD_CHANGE.

      DATA: ls_object_hd_change TYPE SOOD1.

      DATA: lt_off_obj LIKE off_obj.

      DATA: ls_object_hd TYPE sood1,

      ls_object_type TYPE SOOD-OBJTP,

      ls_originator TYPE SOOS1-RECEXTNAM,

      ls_orinator_type TYPE SOOS1-RECESC,

      ls_object_id_new TYPE SOODK,

      ls_sent_to_all TYPE SONV-FLAG.

      DATA: lt_objbin TYPE TABLE OF solisti1 WITH HEADER LINE.

      DATA: ls_objbin TYPE solisti1.

      DATA: l_lines TYPE i,

      ls_buffer TYPE string.

      DATA: msgid type symsgid,

      msgno type symsgno,

      msgv1 type symsgv,

      msgv2 type symsgv,

      msgv3 type symsgv,

      msgv4 type symsgv.

      • ok like boolean.

      p_lt_itcpp-tddevice = 'TELEFAX' .

      p_lt_itcpp-tdtelenum = lv_telfx .

      *APPEND lt_itcpp.

      CALL FUNCTION 'CONVERT_OTF_AND_FAX'

      EXPORTING

      faxoptions = p_lt_itcpp

      user = sy-uname

      IMPORTING

      • FAX_OK = ok

      OFFICE_OBJID = lt_off_obj

      MSGID = msgid

      MSGNO = msgno

      MSGV1 = msgv1

      MSGV2 = msgv2

      MSGV3 = msgv3

      MSGV4 = msgv4

      tables

      otf = p_lt_otf[].

      CLEAR X_RECEIVER.

      REFRESH X_RECEIVER.

      MOVE lt_RECEIVER TO x_RECEIVER-RECNAM. " Name

      MOVE 'B' TO x_RECEIVER-RECESC. " Receiver type

      MOVE 'X' TO x_RECEIVER-SNDCP. " Send as a copy

      MOVE 'X' TO x_RECEIVER-SNDEX. " EXPRESS DOCUMENT

      APPEND x_RECEIVER.

      CALL FUNCTION 'SO_OBJECT_SEND'

      EXPORTING

      OBJECT_HD_CHANGE = ls_object_hd_change

      OBJECT_TYPE = 'RAW'

      OUTBOX_FLAG = 'X'

      OWNER = sy-uname

      ORIGINATOR = ls_originator

      ORIGINATOR_TYPE = 'B'

      • IMPORTING

      • OBJECT_ID_NEW = ls_object_id_new

      • SENT_TO_ALL = ls_sent_to_all

      TABLES

      • OBJCONT = lt_objbin

      • OBJHEAD = lt_objbin

      RECEIVERS = x_receiver

      EXCEPTIONS

      ACTIVE_USER_NOT_EXIST = 1

      COMMUNICATION_FAILURE = 2

      COMPONENT_NOT_AVAILABLE = 3

      FOLDER_NOT_EXIST = 4

      FOLDER_NO_AUTHORIZATION = 5

      FORWARDER_NOT_EXIST = 6

      NOTE_NOT_EXIST = 7

      OBJECT_NOT_EXIST = 8

      OBJECT_NOT_SENT = 9

      OBJECT_NO_AUTHORIZATION = 10

      OBJECT_TYPE_NOT_EXIST = 11

      OPERATION_NO_AUTHORIZATION = 12

      OWNER_NOT_EXIST = 13

      PARAMETER_ERROR = 14

      SUBSTITUTE_NOT_ACTIVE = 15

      SUBSTITUTE_NOT_DEFINED = 16

      SYSTEM_FAILURE = 17

      TOO_MUCH_RECEIVERS = 18

      USER_NOT_EXIST = 19

      ORIGINATOR_NOT_EXIST = 20

      X_ERROR = 21

      OTHERS = 22

      .

      IF sy-subrc <> 0.

      • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

      • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

      ENDIF.

      *

      endform.

      At FM 'SO_OBJECT_SEND' it is showing sy-subrc value as 9(OBJECT_NOT_SENT).when I execte the program,

      In SOST transaction it is showing entry.But when I click on display,the document is not coming PDF format.It is coming in RAW format.Could you please tell me what would be the reason for this?

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.