on 05-30-2007 3:26 PM
Hi all,
I am new to smartforms and i'm trying to FAX a smartform. I am generating the smartform through an ABAP program and passing the following parameters:
CLEAR: SF_CONTROL_P, SF_OUTPUT_P.
SF_CONTROL_P-NO_DIALOG = 'X'.
SF_CONTROL_P-DEVICE = 'TELEFAX'.
SF_CONTROL_P-PREVIEW = 'X'.
SF_CONTROL_P-GETOTF = 'X'.
*---SET OUTPUT PARAMETERS FOR FAX
SF_OUTPUT_P-TDTELELAND = WA_LFA1-LAND1.
SF_OUTPUT_P-TDTELENUM = WA_ZZFAXREL-TELFX.
SF_OUTPUT_P-TDSCHEDULE = 'IMM'.
SF_OUTPUT_P-TDSENDDATE = SY-DATUM.
SF_OUTPUT_P-TDSENDTIME = SY-TIMLO.
*---NOW CALL THE GENERATED FUNCTION MODULE
CALL FUNCTION FM_NAME
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = SF_CONTROL_P
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS = SF_OUTPUT_P
USER_SETTINGS = WA_USER_SETTING
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO = STRUCTOUTPUT
JOB_OUTPUT_OPTIONS =
TABLES
GV_ITAB = GV_ITAB
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
When I run this, nothing is seen in SAP connect (SCOT)...
Then I read somewhere that I can send the OTF format of my smartform to the func module SO_NEW_DOCUMENT_ATT_SEND_API1 and fax it. But data sent to this func mod is a 255 length text table. How would my form layout be maintained when I fax from this module...Isn't there a direct method of sending fax from the generated smartform function module?
As an alternative to Sending smartform by fax with fm 'CONVERT_OTF_AND_FAX provided in I found the fould the code provided below worked for me.
This is based on the documentation in
/help.sap.com/saphelp_470/helpdata/en/9b/e3b0dcc2a711d3b558006094192fe3/frameset.htm (Sending Forms by E-Mail or Telefax)
where it states "To send forms by e-mail or telefax, SAP Smart Forms uses the Business Communication Interface (BCI). " along with the content from example ABAP RSSOKIF2. A copy of the code from RSSOKIF2 to create the Sender, Receiver and Application BOR objectid was used to create the content of the FORM get_bor_data (the remainder of the code preparing the data for SAPSCRIPT is left out).
I don't know what significance it has but the setting to PDF format was used to match the setting in SCOT for FAX
FORM fax_smartform.
DATA: ls_output_opt TYPE ssfcompop,
ls_sender_id TYPE swotobjid,
ls_recipient_id TYPE swotobjid,
ls_appl_object_id LIKE swotobjid,
ls_document_output_info TYPE ssfcrespd,
ls_job_output_info TYPE ssfcrescl,
ls_job_output_options TYPE ssfcresop.
PERFORM get_bor_data CHANGING ls_sender_id
ls_recipient_id
ls_appl_object_id.
ls_output_opt-tdteleland = itcpo-tdteleland.
ls_output_opt-tdtelenum = itcpo-tdtelenum.
ls_output_opt-tdtelenume = itcpo-tdtelenum.
ls_output_opt-tdfaxuser = itcpo-tdfaxuser.
ls_output_opt-faxformat = 'PDF'.
ls_output_opt-tdschedule = 'IMM'.
ls_output_opt-tdnewid = 'X'. "new spool request
CLEAR gs_cntrl_par.
gs_cntrl_par-no_open = ' '.
gs_cntrl_par-no_close = ' '.
gs_cntrl_par-device = 'TELEFAX'.
gs_cntrl_par-no_dialog = 'X'.
gs_cntrl_par-langu = 'E'.
gs_cntrl_par-preview = ' '.
CALL FUNCTION G_SF_FUNCTNM
EXPORTING
control_parameters = gs_cntrl_par
mail_appl_obj = ls_appl_object_id
mail_recipient = ls_recipient_id
mail_sender = ls_sender_id
output_options = ls_output_opt
dkadr = dkadr
rf05a = rf05a
v_pay_terms_desc = v_pay_terms_desc
knb1 = knb1
g_open_bal = g_open_bal
IMPORTING
document_output_info = ls_document_output_info
job_output_info = ls_job_output_info
job_output_options = ls_job_output_options
TABLES
rf140_tab = rf140_tab
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
COMMIT WORK.
ENDIF.
ENDFORM. " fax_smartform
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
go through this code
user = sy-uname.
param-tdteleland = '<Country Code>'.
param-tdtelenum = <Fax number with hyphens>.
param-tdcover = ' '.
CALL FUNCTION 'CONVERT_OTF_AND_FAX'
EXPORTING
faxoptions = param
user = user
IMPORTING
fax_ok = ok
office_objid = off_obj
msgid = msgid
msgno = msgno
msgv1 = msgv1
msgv2 = msgv2
msgv3 = msgv3
msgv4 = msgv4
TABLES
otf = otf_data.
Thanks,
madhukar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No SCOM is not there..
I noticed that then when I run the smartform with device 'telefax', it shows the form in my outbox. But it does not send it to SAP connect. Whereas when I send a SAPscript form, if does get shown up in SAPconnect and gets faxed. Anybody knows how I could check if these is something that needs to be setup and is not?
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.