Service cannot be reached while sending a smart form in html format
Hello,
I'm trying to send a smart form as email in html format and I'm getting the following error message at the beginning of the message:
Service cannot be reached
What has happened?
URL http://localhost/SAP/BC/BSP/SAP/SMART_FORMS/DEFAULT.CSS call was terminated because the corresponding service is not available.
Note
The termination occurred in system XD1 with error code 403 and for the reason Forbidden.
The selected virtual host was 0 .
What can I do?
Please select a valid URL.
If you do not yet have a user ID, contact your system administrator.
Error code:ICF-NF-http-c:100-u:MYUSER-l:D-i:my_test_system:0-s:403-r:Forbidden
HTTP 403 - Forbidden
Your SAP Internet Communication Framework Team
.SYSTEM div#B.par{ font-family : "Courier New" ; font-size : 12pt ; font-weight : normal ; line-height : 4.23mm ; text-decoration : none ; text-align : justify ; clear : both ;}.SYSTEM div#L.par{ font-family : "Courier New" ; font-size : 12pt ; font-weight : normal ; line-height : 4.23mm ; text-decoration : none ; text-align : left ; clear : both ;}.SYSTEM a.SYSTEM span#H.char{ font-weight : bold ;}.SYSTEM span#I.char{ font-style : italic ;}.SYSTEM span#U.char{ text-decoration : underline ;}#PAGE1-001.page@media screen {#MAIN.win{ overflow : auto ;}}@media print {#MAIN.win{ overflow : hidden ;}}#PAGE1-001.page #MAIN.win.AGGR-BILL div#B.par{ font-family : "Arial" ; font-size : 12pt ; font-weight : normal ; line-height : 4.23mm ; text-decoration : none ; text-align : justify ; clear : both ;}.AGGR-BILL div#F.par{ font-family : "Arial" ; font-size : 8pt ; font-weight : normal ; line-height : 3.39mm ; text-decoration : none ; text-align : left ; clear : both ;}.AGGR-BILL div#L.par{ font-family : "Arial" ; font-size : 12pt ; font-weight : normal ; line-height : 4.23mm ; text-decoration : none ; text-align : left ; clear : both ;}.AGGR-BILL div#R.par{ font-family : "Arial" ; font-size : 12pt ; font-weight : normal ; line-height : 4.23mm ; text-decoration : none ; text-align : right ; clear : both ;}.AGGR-BILL a.AGGR-BILL span#H.char{ font-family : "Arial" ; font-size : 12pt ; font-weight : bold ;}.AGGR-BILL span#I.char{ font-family : "Arial" ; font-size : 12pt ; font-style : italic ;}.AGGR-BILL span#K.char{ font-family : "Arial" ; font-size : 8pt ;}.AGGR-BILL span#M.char{ font-family : "Arial" ; font-size : 10pt ;}.AGGR-BILL span#U.char{ font-family : "Arial" ; font-size : 12pt ; text-decoration : underline ;} div#PROJEKTE.tab@media screen { div#PROJEKTE.tab table.tr{ border-collapse : collapse ;}}@media print { div#PROJEKTE.tab table.tr{ border-collapse : collapse ;}}@media screen { div#PROJEKTE.tab table.tr{ margin-top : -1px ;}}@media print { div#PROJEKTE.tab table.tr{ margin-top : 0px ;}} div#PROJEKTE.tab table.tr div#PROJEKTE.tab .topline{ border-top : 1pt solid black ;} div#PROJEKTE.tab .bottomline{ border-bottom : 1pt solid black ;} div#PROJEKTE.tab .leftline{ border-left : 1pt solid black ;} div#PROJEKTE.tab .rightline{ border-right : 1pt solid black ;}#PROJEKTE.tab #sf--LTYPE1.tr td#C1
and here comes the email's body: bla,bla,bla... bla.
Do you have any idea how can I solve the problem with the css file? Any suggestion is welcome!
Regards,
Jaime
I just solved the problem by activating the service /SAP/BC/BSP/SAP/smart_forms/ through the transaction SICF. So I close the thread!
Jaime
Similar Messages
-
Hi experts
I have created a smart form which includes a logo (graphics). when this form is sent, through the system, the logo is not shown.
Instead, the space of the logo is there but empty.
I need you advice!
best regards;
Husainoh;;Hi,
if you send the smartform as an html document pictures are AFAIK not embedded. They are just linked. If you use a picture from the sap mime repository you have to make it accessable. This requires that the receiver of the mail has a web access to the sap server and the ICF services for the mime repository have to be open and need a service user so the picture can be read.
Rgds.
Roman -
Logo Problem While sending the smart form as an attachment via Email
Hi ,
I am using the FM SO_NEW_DOCUMENT_ATT_SEND_API1 to send the smartforma as an attachement into the mailbox . it is sent correctly but the COLOR LOGO are not coming correctlly .
I checked the OTF to PDF file is getting converted correctly .i.e. if i am downloading the foem then it is displaying correctly , but in case of sending it to mailbox as an attached PDF file ,the logo are not comming correctly ,
If anybody faced such type of problem can u please clarify .
I am thinking the problem is in FM SO_NEW_DOCUMENT_ATT_SEND_API1 . this FM is not sending the Attached PDF file correctly .
All the TExt/variables are displaying correctly in the PDF file except the LOGO.while opening the PDF file one Warnng message is getting displayed : "An error occured while opening the Image" .
PLease help ..
Thanks,
sachiHi,
Edit your logo as 256 color bit map image and save it and upload into SE78,
And also better to use this FM :SO_DOCUMENT_SEND_API1 it is good for new versions.
thanks,
venkat.
Edited by: Satya venkat Rao.R on Dec 13, 2011 6:02 AM -
Setup EWA in Solman - Service Cannot be Reached
Hi,
I was trying to setup EWA in solman for my satellite system. In Dswp-> Solution->Operation Setup->Setup EarlyWatch Alert, I got the following error:
Service cannot be reached
What has happened?
URL http://serverxxx:port/sap/bc/webdynpro/sap/dswp_earlywatch_admin call was terminated because the corresponding service is not available.
Note
The termination occurred in system SMN with error code 403 and for the reason Forbidden.
The selected virtual host was 0 .
What can I do?
Please select a valid URL.
If you do not yet have a user ID, contact your system administrator.
ErrorCode:ICF-NF-http-c:000-u:SAPSYS-l:E-i:ACMSAPD02_MNR_03-v:0-s:403-r:Forbidden
May I know how to rectify this? Thank you.
regards,
zlHi,
Please check if the service is activated.
Transaction SICF.
Hierarchy Type: Service and execute it.
default_host-> sap-> bc-> webdynpro-> sap-> dswp_earlywatch_admin check if this is activated, If it snsot activated, activate it and test the service by using right mouse option. While testing the service it will ask for a userid and password, enter your user id and password. and login it should allow you to login and check the service successfully.
If you are not able to login due to authorization issues, please use transaction SU53, there you will find any missing authorizations. After you add those authorization objects you should be successfully open the service.
If possible perform the IMG activity SAP Solution Manager-> Basic Settings-> HTTP Services-> Activate Solution Manager service.
Hope this helps.
Thanks & Best Regards,
Raghavendra. -
SSO to BI - Service Cannot Be Reached Error
Hi All-
I'm working on integrating BI and EP (both Netweaver 7). We've exported/imported the certificates for both systems and defined the BI system in the System Landscape of EP. All connection tests return OK.
I created an iView using the iView template for "BEx Web Application iView (SAP NetWeaver 7.0 Format)", assigned the alias of the BI system created, and added the BEx query string.
When I preview this iView, I get the error:
"Service cannot be reached",
What has happened?
URL
http://<domain>.com/irj/servlet/prt/portal/prtmode/preview/prtroot/com.sap.ip.bi.web.portal.integration.launcher call was terminated because the corresponding service is not available.
However, if I switch the iView property for Version to "BW 2.x/3.x", then I can connect to the report, but it opens to the variable screen.
Any ideas on how to correct the service cannot be reached error?
ThanksDear Tim,
A couple of things you might want to look at.
1. In the system that you have created for BI, ensure that you have
a. ITS Path : /sap/bc/gui/sap/its/webgui
b. Web AS Path : /sap/bw/BEx
Also for the hostnames, ITS and WebAS a FQDN is given followed by the portnumber.
2. In the system where your BI resides, go to transaction SICF and ensure this patch under
default_host : /sap/bc/gui/sap/its/webgui is active and
default_host : /sap/bw/BEx is active as well.
To ensure it is active, just do a right click and activate it, if it already active, you can deactive it and active it again and test.
Cheers!
Sandeep Tudumu -
Integrated Planning Service cannot be reached
Hi Experts,
I am having an issue in opening the planning modeller. Once i click on start modeller on transaction RSPLAN, i get the following error.
Service cannot be reached
What has happened?
URL http://imtsapm01.massap.corp.pri:8000/sap/public/myssocntl call was terminated because the corresponding service is not available.
Note
The termination occurred in system PP1 with error code 403 and for the reason Forbidden.
The selected virtual host was 0 .
What can I do?
Please select a valid URL.
If you do not yet have a user ID, contact your system administrator.
ErrorCode:ICF-NF-http-c:000-u:SAPSYS-l:E-i:imtsapm01_PP1_00-v:0-s:403-r:Forbidden
HTTP 403 - Forbidden
Your SAP Internet Communication Framework Team
BI reporting works fine without any issue. Not sure why this doesnt work. is there some special service which needs to be activated for integrated planning? I am running BI-7 and BI and portals are hosted on the same machine. I have done all the connection tests and there is no error on the system.
Would appreciate you're help.
thanks and regards
dilankeHi,
Please check the following things:
1. Check whether the necessary services are active. You can check this using SICF transaction. If its inactive, please activate.
2. Check if the BI server is properly connected to the Intergrated Planning portal.
3. Check if you have added the URL in internet explorer connections settings. Open internert explorer -> Internet options-> Connections-> LAN settings -> Advanced -> Exceptions. Check if you url is added here.
4. Check the drivers settings. Go to run -> drivers-> etc (folder name) ->host (file name). Open this host file as notepad and check if the BI server id and url is added here.
If all the above steps are correct, the IP portal should work correctly.
Thanks.
Regards. -
SOLMAN_WORKCENTER Service cannot be reached ... Help
Helo Gurus,
I have problem runing T-Code solman_workcenter, after starting this transacion appear screen with info :
Service cannot be reached
What has happened?
URL http://<server>:8077/sap/bc/webdynpro/sap/ags_workcenter call was terminated because the corresponding service is not available.
Note
The termination occurred in system SSM with error code 403 and for the reason Forbidden.
The selected virtual host was 0 .
What can I do?
Please select a valid URL.
If you do not yet have a user ID, contact your system administrator.
ErrorCode:ICF-NF-http-c:000-u:SAPSYS-l:E-i:sap-dev_SSM_77-v:0-s:403-r:Forbidden
HTTP 403 - Forbidden
Your SAP Internet Communication Framework Team
I have on my server installed :
SAP Solution Manager 7.0
SAP_BASIS 700 0016 SAPKB70016 SAP Basis Component
SAP_ABA 700 0016 SAPKA70016 Cross-Application Component
PI_BASIS 2006_1_700 0006 SAPKIPYM06 Basis Plug-In (PI_BASIS) 2006_1_700
ST-PI 2005_1_700 0006 SAPKITLQI6 SAP Solution Tools Plug-In
SAP_BW 700 0018 SAPKW70018 SAP NetWeaver BI 7.0
SAP_AP 700 0014 SAPKNA7014 SAP Application Platform
BBPCRM 500 0012 SAPKU50012 BBPCRM
CPRXRPM 400 0013 SAPK-40013INCPRXRPM SAP xRPM/cProjects/cFolders 4.00 (ABAP)
ST 400 0017 SAPKITL427 SAP Solution Manager Tool
ST-A/PI 01J_CRM500 0000 - Application Servicetools for CRM 500 / 5
ST-ICO 150_700 0011 SAPK-1507BINSTPL SAP Solution Manager Implementation Cont
ST-SER 700_2008_1 0005 SAPKITLOO5 SAP Solution Manager Service Tools
ags_workcenter SAP Solution Manager Work Centers is Activated (no extra configuration just Activated)
My login has role sap_all and sap_new.
Where is error, what iam missing ?
Please help,
RegardsHi
Check these services are active
/sap/bc/webdynpro/sap/ags_work_incident_man
/sap/bc/webdynpro/sap/ags_workcenter
/sap/bc/ags_workcenter/ags_work_appln
/sap/bc/ags_workcenter/ags_work_webgui
/sap/bc/webdynpro/sap/ags_work_trans_print
/sap/bc/webdynpro/sap/ags_work_incident_create_app
/sap/bc/webdynpro/sap/ags_work_change_man
/sap/bc/webdynpro/sap/ags_work_setup
/sap/bc/webdynpro/sap/ags_work_job_sch_man
/sap/bc/webdynpro/sap/ags_work_implementation
/sap/bc/webdynpro/sap/ags_work_bp_iterf_mon
/sap/bc/webdynpro/sap/ags_work_services
/sap/bc/webdynpro/sap/ags_rbe
/sap/bc/solman/nwbc/solmanwork
/sap/bc/webdynpro/sap/ags_work_gui_selection
/sap/bc/dal/demoA
/sap/bc/webdynpro/sap/wdc_wba_rfc_monitoring
/sap/bc/bsp/sap/wba_start_smdia
/sap/bc/webdynpro/sap/ags_work_gui_default_set
There is one work center role per work center, and the user needs the role SAP_SMWORK_BASIC, which contains the authorization objects required for the work center
SAP note 834534
Also check these roles
SAP_SUPPDESK_CREATE
SAP_SMWORK_INCIDENT_MAN
SAP_SMWORK_BASIC
Regards
Uday -
Getting error while activating the smart form
hi guys,
i am getting the following run time error while activating the smart-form.
'SQL error in the database when accessing a table'.
can anyone tell why this error is comingRefer to the below link, it may help you to close the thread.
[SQL error in the database when accessing a table|SQL error in the database when accessing a table.;
Regards,
saiRam -
For this program i could send the smart form thru mail but in the inbox ..
*& Report ZSFOO
REPORT ZSFOO.
*& Report ZSFINV
TABLES : KNA1, " General Data In Customer Master
KNB1, " Customer Master(Company Code)
BSID, " Accounting: Secondary Index for Customers
ZSMARTFORM, " Custom table for Storing Bank Details
zsf_exp_inv, " Structure that stores required fields from all tables used
KNVK. " Customer Master Contact Partner
data : Begin of it_struct occurs 0.
include structure zsf_exp_inv01.
data : End of it_struct.
types : begin of ty_bsid,
kunnr like bsid-kunnr,
WAERS like bsid-WAERS,
XBLNR LIKE BSID-XBLNR,
BUDAT LIKE BSID-BUDAT,
WRBTR LIKE BSID-WRBTR,
BUKRS LIKE BSID-BUKRS,
end of ty_bsid.
types : begin of ty_kna1,
kunnr like kna1-kunnr,
NAME1 LIKE KNA1-NAME1,
STRAS LIKE KNA1-STRAS,
MCOD3 LIKE KNA1-MCOD3,
LAND1 LIKE KNA1-LAND1,
SORTL LIKE KNA1-SORTL,
end of ty_kna1.
types : begin of ty_knb1,
kunnr like knb1-kunnr,
ZTERM LIKE KNB1-ZTERM,
end of ty_knb1.
types : begin of ty_knVK,
kunnr like kNVK-kunnr,
NAME1 LIKE KNVK-NAME1,
end of ty_knVK.
types : begin of ty_ZSMARTFORM,
SNO LIKE ZSMARTFORM-SNO,
CURRENCY LIKE zsmartform-currency,
BANKNAME LIKE zsmartform-bankname,
ADDRESS1 LIKE ZSMARTFORM-ADDRESS1,
ADDRESS2 LIKE ZSMARTFORM-ADDRESS2,
ADDRESS3 LIKE ZSMARTFORM-ADDRESS3,
ADDRESS4 LIKE ZSMARTFORM-ADDRESS4,
ADDRESS5 LIKE ZSMARTFORM-ADDRESS5,
ADDRESS6 LIKE ZSMARTFORM-ADDRESS6,
VALIDFROM LIKE ZSMARTFORM-VALIDFROM,
VALIDTO LIKE ZSMARTFORM-VALIDTO,
end of ty_ZSMARTFORM.
data : it_bsid type table of ty_bsid,
it_kna1 type table of ty_kna1,
it_knb1 type table of ty_knb1,
it_zsmartform type table of ty_zsmartform,
it_knVK type table of ty_kNVK.
data : wa_bsid like line of it_bsid,
wa_kna1 like line of it_kna1,
wa_knb1 like line of it_knb1,
wa_zsmartform like line of it_zsmartform,
wa_knVK like line of it_knVK.
*****************Selection Screen**********************************
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-000.
SELECT-OPTIONS : S_KUNNR FOR KNA1-KUNNR,
S_belnr FOR BSID-belnr,
S_BUKRS FOR BSID-BUKRS,
S_CURR FOR ZSMARTFORM-CURRENCY.
SELECTION-SCREEN END OF BLOCK B1.
DATA : BEGIN OF IT_PARAM OCCURS 0.
INCLUDE STRUCTURE ZPARAMETERS.
DATA : END OF IT_PARAM.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-001.
SKIP 1.
Parameters : OPTION1 AS CHECKBOX,
P_POINF(300) type c,
OPTION2 AS CHECKBOX,
P_DESC(300) TYPE C,
OPTION3 AS CHECKBOX,
P_MONTH(200) TYPE C,
OPTION4 AS CHECKBOX,
P_RATE(100) TYPE C.
SELECTION-SCREEN END OF BLOCK B2.
**********************PARAMETERS***********************************
data : l type i,
Y(300) type c,
j type i,
k type i value 1,
s type i,
m(300) type c,
p type i,
z type i.
data : l1 type i,
Y1(300) type c,
j1 type i,
k1 type i value 1,
s1 type i,
m1(300) type c,
p1 type i,
z1 type i.
data : l2 type i,
Y2(300) type c,
j2 type i,
k2 type i value 1,
s2 type i,
m2(300) type c,
p2 type i,
z2 type i.
data : l3 type i,
Y3(300) type c,
j3 type i,
k3 type i value 1,
s3 type i,
m3(300) type c,
p3 type i,
z3 type i.
IF OPTION1 = 'X'.
concatenate P_POINF ',' into P_POINF.
l = strlen( P_POINF ).
do l times.
Y = P_POINF+j(k).
case Y.
when ','.
m = P_POINF+s(z).
s = j + 1.
z = -1.
p = p + 1.
if p = 1.
IT_PARAM-LINE1 = m.
endif.
if p = 2.
IT_PARAM-LINE2 = m.
endif.
if p = 3.
IT_PARAM-LINE3 = m.
endif.
when '.'.
if p = 4.
IT_PARAM-LINE4 = m.
endif.
endcase.
j = j + 1.
z = z + 1.
enddo.
ENDIF.
IF OPTION2 = 'X'.
concatenate P_DESC ',' into P_DESC.
l1 = strlen( P_DESC ).
do l1 times.
Y1 = P_DESC+j1(k1).
case Y1.
when ','.
m1 = P_DESC+s1(z1).
s1 = j1 + 1.
z1 = -1.
p1 = p1 + 1.
if p1 = 1.
IT_PARAM-LINE5 = m1.
endif.
if p1 = 2.
IT_PARAM-LINE6 = m1.
endif.
if p1 = 3.
IT_PARAM-LINE7 = m1.
endif.
when '.'.
if p1 = 4.
IT_PARAM-LINE8 = m1.
endif.
endcase.
j1 = j1 + 1.
z1 = z1 + 1.
enddo.
ENDIF.
IF OPTION3 = 'X'.
concatenate P_MONTH ',' into P_MONTH.
l2 = strlen( P_MONTH ).
do l2 times.
Y2 = P_MONTH+j2(k2).
case Y2.
when ','.
m2 = P_MONTH+s2(z2).
s2 = j2 + 1.
z2 = -1.
p2 = p2 + 1.
if p2 = 1.
IT_PARAM-LINE9 = m2.
endif.
if p2 = 2.
IT_PARAM-LINE10 = m2.
endif.
if p2 = 3.
IT_PARAM-LINE11 = m2.
endif.
when '.'.
if p2 = 4.
IT_PARAM-LINe12 = m2.
endif.
endcase.
j2 = j2 + 1.
z2 = z2 + 1.
enddo.
ENDIF.
IF OPTION4 = 'X'.
concatenate P_RATE ',' into P_RATE.
l3 = strlen( P_RATE ).
do l3 times.
Y3 = P_RATE+j3(k3).
case Y3.
when ','.
m3 = P_RATE+s3(z3).
s3 = j3 + 1.
z3 = -1.
p3 = p3 + 1.
if p3 = 1.
IT_PARAM-LINE13 = m3.
endif.
if p3 = 2.
IT_PARAM-LINE14 = m3.
endif.
if p3 = 3.
IT_PARAM-LINE15 = m3.
endif.
if p3 = 4.
IT_PARAM-LINe16 = m3.
endif.
endcase.
j3 = j3 + 1.
z3 = z3 + 1.
enddo.
ENDIF.
APPEND IT_PARAM.
select * from kna1 into corresponding fields of table it_kna1 where kunnr in s_kunnr.
select * from knb1 into corresponding fields of table it_knb1 for all entries in it_kna1 where kunnr = it_kna1-kunnr.
select * from bsid into corresponding fields of table it_bsid for all entries in it_kna1 where kunnr = it_kna1-kunnr and belnr in s_belnr and bukrs in s_bukrs..
SELECT * FROM KNVK INTO CORRESPONDING FIELDS OF TABLE IT_KNVK FOR ALL ENTRIES IN IT_KNA1 WHERE KUNNR = IT_KNA1-KUNNR.
select * from zsmartform into corresponding fields of table it_zsmartform .
DATA : AMT LIKE SPELL.
loop at it_bsid into wa_bsid.
read table it_kna1 into wa_kna1 with key kunnr = wa_bsid-kunnr.
read table it_knb1 into wa_knb1 with key kunnr = wa_bsid-kunnr.
read table it_zsmartform into wa_zsmartform with key CURRENCY = wa_bsid-WAERS.
READ TABLE IT_KNVK INTO WA_KNVK WITH KEY KUNNR = WA_BSID-KUNNR.
it_struct-name1 = wa_kna1-name1.
it_struct-stras = wa_kna1-stras.
it_struct-mcod3 = wa_kna1-mcod3.
it_struct-land1 = wa_kna1-land1.
it_struct-sortl = wa_kna1-sortl.
it_struct-zterm = wa_knb1-zterm.
it_struct-xblnr = wa_bsid-xblnr.
it_struct-currency = wa_zsmartform-currency.
it_struct-currency = wa_bsid-waers.
it_struct-budat = wa_bsid-budat.
it_struct-BANKNAME = wa_zsmartform-BANKNAME.
it_struct-ADDRESS1 = wa_zsmartform-ADDRESS1.
it_struct-ADDRESS2 = wa_zsmartform-ADDRESS2.
it_struct-ADDRESS3 = wa_zsmartform-ADDRESS3.
it_struct-ADDRESS4 = wa_zsmartform-ADDRESS4.
it_struct-ADDRESS5 = wa_zsmartform-ADDRESS5.
it_struct-ADDRESS6 = wa_zsmartform-ADDRESS6.
it_struct-CURR = WA_BSID-WRBTR.
IT_STRUCT-NAME = WA_KNVK-NAME1.
IT_STRUCT-AMOUNT = IT_SPELL-AMT.
append it_struct.
endloop.
data : x type i,
x1 type i,
a type string.
loop at it_struct.
x = strlen( it_struct-curr ).
x1 = x - 3.
a = it_struct-curr+0(x1).
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = a
CURRENCY = ' '
FILLER = ' '
LANGUAGE = SY-LANGU
IMPORTING
IN_WORDS = AMT.
EXCEPTIONS
NOT_FOUND = 1
TOO_LARGE = 2
OTHERS = 3
*IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
endloop.
DATA: ws_ucomm LIKE sy-ucomm.
DATA: form_name TYPE rs38l_fnam.
DATA: wa_ctrlop TYPE ssfctrlop,
wa_outopt TYPE ssfcompop.
data : i_receivers TYPE TABLE OF somlreci1 WITH HEADER LINE,
i_record LIKE solisti1 OCCURS 0 WITH HEADER LINE.
DATA: t_otfdata TYPE ssfcrescl,
t_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE,
i_objpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
i_objtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE,
i_objbin LIKE solisti1 OCCURS 0 WITH HEADER LINE,
i_reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE.
data : wa_objhead TYPE soli_tab,
wa_doc_chng typE sodocchgi1,
w_data TYPE sodocchgi1,
wa_buffer TYPE string,
v_len_in LIKE sood-objlen,
v_len_out LIKE sood-objlen,
v_len_outn TYPE i,
v_lines_txt TYPE i,
v_lines_bin TYPE i.
DATA: t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE.
DATA: w_filesize TYPE string.
DATA: w_bin_filesize TYPE i.
wa_ctrlop-getotf = 'X'.
CALL FUNCTION '/1BCDWB/SF00000001'
EXPORTING
control_parameters = wa_ctrlop
output_options = wa_outopt
user_settings = 'X'
IN_WORDS = amt
importing
job_output_info = t_otfdata
TABLES
I_ZSF_EXP_INV = it_struct
I_ZPARAMETERS = it_param.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
t_otf[] = t_otfdata-otfdata[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = w_bin_filesize
TABLES
otf = t_otf
lines = t_pdf_tab
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
OTHERS = 4
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
bin_filesize = w_bin_filesize
CODEPAGE = ' '
filename = 'c: est59.PDF'
filetype = 'BIN'
IMPORTING
filelength = w_filesize
TABLES
data_tab = t_pdf_tab
EXCEPTIONS
file_open_error = 1
file_write_error = 2
invalid_filesize = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
OTHERS = 10
IF sy-subrc <> 0.
*You should include message-id in the report heading
WRITE : sy-subrc.
ELSE.
WRITE : 'File Test.pdf downloaded succesfully'.
ENDIF.
loop at t_pdf_tab.
translate t_pdf_tab using '~'.
concatenate wa_buffer t_pdf_tab into wa_buffer.
endloop.
translate wa_buffer using '~'.
do.
i_record = wa_buffer.
append i_record.
shift wa_buffer left by 255 places.
if wa_buffer is initial.
exit.
endif.
enddo.
Attachment
refresh:
i_reclist,
i_objtxt,
i_objbin,
i_objpack.
clear wa_objhead.
i_objbin[] = i_record[].
Create Message Body
Title and Description
i_objtxt = 'test with pdf-Attachment!'.
append i_objtxt.
describe table i_objtxt lines v_lines_txt.
read table i_objtxt index v_lines_txt.
wa_doc_chng-obj_name = 'smartform'.
wa_doc_chng-expiry_dat = sy-datum + 10.
wa_doc_chng-obj_descr = 'smartform'.
wa_doc_chng-sensitivty = 'O'.
wa_doc_chng-doc_size = v_lines_txt * 255.
Main Text
wa_doc_chng-doc_size = ( v_lines_txt - 1 ) * 255 + strlen( i_objtxt )
clear i_objpack-transf_bin.
i_objpack-head_start = 1.
i_objpack-head_num = 0.
i_objpack-body_start = 1.
i_objpack-body_num = v_lines_txt.
i_objpack-doc_type = 'RAW'.
append i_objpack.
i_objpack-transf_bin = 'X'.
i_objpack-head_start = 1.
i_objpack-head_num = 1.
i_objpack-body_start = 1.
i_objpack-body_num = v_lines_bin.
i_objpack-doc_type = 'PDF'.
i_objpack-obj_name = 'Smartform'.
CONCATENATE 'Hazard report-' p_load '.pdf' INTO i_objpack-obj_descr.
describe table i_objbin lines v_lines_bin.
read table i_objbin index v_lines_bin.
i_objpack-doc_size = v_lines_bin * 255 .
i_objpack-obj_descr = 'test'.
i_objpack-doc_size = v_lines_bin * 255.
APPEND i_objpack.
Attachment
(pdf-Attachment)
i_objpack-transf_bin = 'X'.
i_objpack-head_start = 1.
i_objpack-head_num = 0.
i_objpack-body_start = 1.
Länge des Attachment ermitteln
describe table i_objbin lines v_lines_bin.
read table i_objbin index v_lines_bin.
i_objpack-doc_size = v_lines_bin * 255 .
i_objpack-body_num = v_lines_bin.
i_objpack-doc_type = 'PDF'.
i_objpack-obj_name = 'smart'.
i_objpack-obj_descr = 'test'.
append i_objpack.
clear i_reclist.
i_reclist-receiver = '[email protected]'.
i_reclist-express = 'X'.
i_reclist-rec_type = 'U'.
append i_reclist.
call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = wa_doc_chng
COMMIT_WORK = 'X'
put_in_outbox = 'X'
TABLES
packing_list = i_objpack
object_header = wa_objhead
CONTENTS_BIN = i_objbin
contents_txt = i_objtxt
receivers = i_reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
others = 8.
for this program i could send the smart form thru mail but in the inbox i could not
download it it says needed to be decoded properly.file not starting with pdf....
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = 'Mail sent'(003)
txt1 = 'The report is sent via e-mail.'(004)
txt2 = ' '.
LEAVE PROGRAM.
ENDIF.hi krishna,
u r right. there is no error in sending the mail and the file but the problem is that file created and converted to pdf is not done properly.jst verify whether the file is created properly or not .thats the only problem that can occurs else ur program is absolutely right. -
How to convert Smart Form into PDF format and return the result in BAPI?
I want to convert a Smart Form into PDF format and return the result in BAPI.
can anyone tell me how it can be done with related example
regards
pranayhi,
smart form to pdf--
All you have to do is call your SF to get OTF and then concert it to PDF. Works like charm:
DATA: p_output_options TYPE ssfcompop,
p_control_parameters TYPE ssfctrlop.
p_control_parameters-no_dialog = 'X'.
p_control_parameters-getotf = 'X'.
CALL FUNCTION v_func_name "call your smartform
EXPORTING
output_options = p_output_options
control_parameters = p_control_parameters
IMPORTING
job_output_info = s_job_output_info.
call function 'CONVERT_OTF_2_PDF'
tables
otf = s_job_output_info-otfdata
lines = t_pdf
and if u need more u can check below links also
Check the below links..
Re: Smartforms to PDF
Re: smartform (otf) as pdf and sending as email-attachment
VISIT THIS LINK
Re: Smartforms to PDF
PLZ REWARD POINTS IF IT HELPS YOU
rgds
anver -
Smart Form Error Page format 2 with orientation 1 unknown
I have created smart form with Page Format DINA4 (297x210). While executing the smart form i am getting error as "Page format 2 with orientation 1 unknown".
Same Attributes on each page only Next Page is in increment order.
-
How to show Smart form in PDF format
Hi Experts,
I have a requirement in which I have to show a smart form in
PDF Format coming from the RFC .
Please give your helpful suggestion.
Thanks and Regards
Upendra AgrawalHi ,
Just look this pdf
see this link
http://www.****************/Tutorials/Smartforms/SFinEPasPDF/Page1.htm
Thanks
Edited by: Anup Bharti on Nov 7, 2008 7:00 AM -
Error while sending sales order form by fax
hi,
Sending Sales order by fax is not working. While adding output type for Sales order choosing device as 'FAX' is throwing an error saying that 'Error while sending fax with SO_OBJECT_SEND, return code 9'. Anything needs to be configured or we have to code anything in SAPScript program. Please advise.Hi Harry,
You don't need to write any particular code for sending FAX in SAPscript. But you may need to check some configurations regarding it.
We configure SCOT to send Fax and mails to outside SAP. Check SAP Note 455140 for the configuration of SCOT tcode.
Please refer this link [Sending FAX |Sending FAX from SAP;
It might be helpful.
Thanks,
Daya. -
Smart Forms - Attaching HTML file as an attachment in Mail
Hai,
I have following requirements. I have to send the Payment Advice document output as a HTML format to the vendors.
I am able to get the smartforms output as html file. The output of smartforms i am capturing
call function '/1BCDWB/SF00000170'
exporting
control_parameters = w_control_parameters
output_options = w_output_options
user_settings = 'X'
w_t001 = w_t001
w_reguh = w_reguh
w_regud = w_regud
w_e1idrs1 = w_e1idrs1
importing
job_output_info = w_job_output_info
tables
t_item = t_item
exceptions
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
others = 5.
w_xmloutput = w_job_output_info-xmloutput.
*-SAP Smart Forms: Result of XSF Transformation
w_htmldata = w_xmloutput-trfresult-content[].
Currently the w_htmldata informations are stored in the form of RAW 1024 characters.
Using the below mentioned FM the attachment information i am passing through
contents_txt = it_message
parameters. The contents_txt support only 255 characters. But the smartforms returns RAW 1024 characters. When the HTML attachment is not showning the content properly and the data displays is misaligned. Kindly give me the suggestion how to overcome this issue !
call function 'SO_DOCUMENT_SEND_API1'
exporting
document_data = w_doc_data
put_in_outbox = 'X'
sender_address = ''
sender_address_type = ''
commit_work = 'X'
importing
sent_to_all = w_sent_all
tables
packing_list = t_packing_list
contents_bin = t_attachment
contents_txt = it_message
receivers = t_receivers
exceptions
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
others = 8.Have you upgraded to Yosemite? Then you could send the attachment using Mail Drop.
You can use Mail Drop to send files that exceed the maximum size allowed by the provider of your email account. Mail Drop uploads the large attachments to iCloud, where they’re encrypted and stored for up to 30 days.
If you have an iCloud account and you’re signed in to iCloud when you click Send, Mail automatically sends the attachments using Mail Drop. Mail Drop attachments don’t count against your iCloud storage.
If you don’t have an iCloud account, or if you’re not signed in, Mail asks you whether to use Mail Drop (select “Don’t ask again for this account” to always use Mail Drop).
If a recipient uses Mail in OS X Yosemite, the attachments are automatically downloaded and included in your message just like any other attachment. For other recipients, your message includes links for downloading the attachments and their expiration date.
You can turn Mail Drop on or off for an account. Choose Mail > Preferences, click Accounts, select your account, click Advanced, then select or deselect “Send large attachments with Mail Drop.” -
Undeline text in Smart forms character/paragraph format
hi!!!
i have a problem in printing a Undelined text in Smart forms bec. when i print it, only the words is underlined and the spaces between the words dont have underline.
can anybody help me?
thanks in advance!!!
jamesHi Mohamed,
SmartForms and WebDynpro are two different technologies
- You can not do PrintPreview in WebDynpro.
What You could do is to store Your text using SAVE_TEXT and use text module in SmartForms,
but You can't use printer, but i.e. store PDF on the server or send PDF using mail.
Regards,
Przemysław
Maybe you are looking for
-
Officejet Pro 8600 Plus does not receive faxes
I have run the HP troubleshooting fax diagnostic on the device and the report indicates all items pass. Yet the machine will not receive a fax. Suggestions?
-
Making border of cell invisible in JTable
Hi i want to make border of cell invisible in JTable any help appreciated thanks in advance
-
Hi, I need in transit report for include delivery note as well as batch number for which MB5T report is being customized. Logic would be Goods in transit = Goods issue (for a delivery note) - Goods delivered (GR qty in EKBE) I am referring LIPS, EKBE
-
APEx '03 and Non-Apple Wireless Client Connection Problems
Good morning. I have a 2003 vintage AirPort Extreme, running 5.5.1 firmware (due to the issues with the newer firmware discussed on this forum). --> Wired iMax My setup is DSL-->APEx--| --> Apple Wireless Clients --> Linksys w54 acting as a bridge In
-
Selecting multiple nodes of a tree through ctrl+shift
Can i select multiple nodes of a tree through ctrl+shift. How?? Thanx