Attach ADOBE form to Workitem
Hello Everybody,
Can someone tell me whats the procedure to be used to attach an ADOBE form to the work item.
Can someone tell me the steps in detail. All the help is appreciated.
Thanks,
Sneha SIngh.
Hi ,
please check
Trigger workflow from ABAP webdynpro and attach an Adobe interactive form
Thanks,
sahiba
Similar Messages
-
Open PDF Adobe form from workitem in UWL
Hi,
We have a requirement in which a workitem is gettng generated from workflows, And it comes in UWL, So when we execute that workitem it should open a adobe form for notificaton so that approver can reject or approve that notificaton in PDF, But it is openng a SAP transaction rather then adobe form.
we are on ECC 5.0 and portal verion is 7. we are using standard workflow WS5000041 which generates the workitem. It works perfectly fine in ECC 6.0, As there are different standard workflows in ECC 6.0 but the working is same.
Thanks.HI
I think you might have missed out to configure the respective task ID and its respective visualization parameters in the SWFVISU transaction.
Iam not sure what is exactly the flow in the ECC5.0 but if you look at the workflow template , it again incudes a subworkflow, in which you actually have the approve form standard task the task number is TS50000075 and in the swfvisu txn the task is already configured with visualization paramters as Webdynpro aplication and Name sape sa SAP, I think you have to add one more parameter in the DYNPARAM
Regards
Pavan -
Attach ADOBE form to transaction code.
Dear All,
I have a solution to be implemented wherein I need to attach an offline Interactive Abobe form to a transaction code.
The scenario is the end user has access to this custom transaction code which when he executes should open the form for him. He would then fill in the contents and submit it which would trigger an custom workflow process.
We do not wish to use WebDynpro application and hence would appreciate if any useful information is provided.
Appreciate your help.
Thanks & Regards,
Kavita D.I am not sure if that is what you want, but what I would do:
1) create a transaction code
2) create a printing program (trivial), set printing settings to immediate preview
3) create an interface and adobe form layout
4) link the transaction and the program together, now when a person runs the transaction, the printing proram gets triggered and as an output it provides a blank (or pre-filled) adobe form
5) now you have the UI ready but miss the way how to trigger the WF from the form
6) to get 5) you need to create a web service and connect the webservice with your adobe form, there are plenty resources on how to do this
7) you should be able to trigger the workflow through a simple adobe form protected as a custom transaction
Hope that suits your needs,
cheers Otto -
Open Adobe form through workitem in UWL
Hi,
We have a requirement in which a workitem is gettng generated from workflows, And it comes in UWL, So when we execute that workitem it should open a adobe form for notificaton so that approver can reject or approve that notificaton, But it is openng a SAP transaction rather then adobe form.
we are on ECC 5.0 and portal verion is 7. we are standard workflow WS5000041 which generates the workitem.
Thanks.Hi Saurabh
Please check following things:
1) xml configuration file has entry for your workitem.
2) if not please configure workitem.
3) Re-register your system.
4) Also check for Adobe run time environment.
Hope this will help you.
Warm Regards
Abhijeet -
Sending email by attaching adobe form through BSP
Hi All,
I'm working on the e-recruitement project.
I have requirement that on the publication page there is table view where all the publication and there posting channels are displayed.
Now i have to create a button " Send Email". by selecting the the required posting channel when i click on the button send email.
It should pick the data overview form and this form should be attached to email and should be send to the respective posting channel.
Can you please guide me to solve this issue.
Your commnets will highly appreciated.
Regards,
Nikita.Look at this [document|https://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/e0bba346-cb84-2910-2aa9-ba1f8a1c8617&overridelayout=true] to create & send adobe form via email.
You can use the same code for BSP too.
Raja -
Configuration receiving mails with attached adobe forms from BPM
System: CE7.20 SP2
Hi,
I am using Adobe Forms in SAP NW BPM. Therefore I have to configure the Mail, Notification Messages, and Forms Services described [here|http://help.sap.com/saphelp_nwce72/helpdata/en/e4/32ff7865fa483dba3686160f5c6dd0/content.htm].
To get this running at "Java System Properties - Applications - tcbpembase~ear"
I have to configure the mailbox which receives this adobe forms but actually I can not apply a mailbox from the exchange admin! That's always a very big bureaucratic effort, if you know what I mean
Do anybody of you have some experience how this could be solved in a big concern scenario with running exchange?
RegardsMartin,
I want to give points to your helpful answer, but I can´t do it here because you are the owner of the thread and just you can give points, so I have created a thread where you can answer me and there I can give points to anyone. -
Adobe form as a attachment in workflow
Hi,
i have attached adobe form in my workflow as a attachment in decision step .the requirement is he will open the adobeform and he will edit some values and that form i have to save that values and update the database.. my problem is he will open the attachment and make changes to that how can i able to get the edited form into workflow this is a 3 level approval process at every stage approvers will edit the adobe form so any one please suggest me..Hi,
Your adobe forms opening in the T.code IQS2 right.
Create a method, call this T.code & pass the notification number using the call transaction Method.
Assign this method in the workflow via task and send it to the approver.
Regards,
Surjith -
Error while opening the ADOBE FORM via mail
Hi to all,
I have created a program to attached ADOBE FORM to mail.
When I execute the program, it sends ADOBE FORM to my mail ID successfully.
But when I open my mail and try to open attached ADOBE FORM, it gives error
ADOBE READER COULD NOT OPEN u2018PDF FORM (1). PDFu2019 because it is either not a supported file type or because the file has been damaged ( for example, it was sent as an email attached and wasnu2019t correctly decoded).
Please can any tell me, what the problem is and what the solution is for that?
I shall be thankful to you for this.
Regards
Pavneet Rana
Edited by: pavneet rana on Aug 1, 2011 2:22 PMThanks for reply,
below is the code.
data:
l_fm_name TYPE rs38l_fnam,
l_formname TYPE fpname VALUE 'ZTESTF1' ,
fp_docparams TYPE sfpdocparams,
FP_FORMOUTPUT TYPE FPFORMOUTPUT,
fp_outputparams TYPE sfpoutputparams.
data: I_ATT_CONTENT_HEX type SOLIX_TAB.
START-OF-SELECTION.
data: st TYPE ZTABFM11.
data: it type table of sflight.
data: wa like LINE OF it.
data: wa_st like LINE OF ST.
fp_docparams-langu = 'E'.
fp_docparams-country = 'US'.
fp_docparams-fillable = 'X'.
fp_outputparams-nodialog = 'X'.
fp_outputparams-preview = 'X'.
fp_outputparams-device = 'LP01'.
fp_outputparams-getpdf = 'X' .
fp_outputparams-dest = 'LP01'.
fp_outputparams-reqimm = 'X'.
fp_outputparams-reqdel = 'X' .
fp_outputparams-xfpoutdev = 'LP01'.
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
EXPORTING
i_name = l_formname
IMPORTING
e_funcname = l_fm_name.
E_INTERFACE_TYPE =
CALL FUNCTION 'FP_JOB_OPEN'
CHANGING
ie_outputparams = fp_outputparams
EXCEPTIONS
cancel = 1
usage_error = 2
system_error = 3
internal_error = 4
OTHERS = 5.
select * from sflight into TABLE it.
loop at it into wa.
wa_st-CARRID = wa-CARRID.
wa_st-CONNID = wa-CONNID.
wa_st-FLDATE = wa-FLDATE .
wa_st-PLANETYPE = wa-PLANETYPE.
append wa_st to st.
endloop.
CALL FUNCTION l_fm_name
EXPORTING
/1bcdwb/docparams = fp_docparams
st = st
IMPORTING
/1BCDWB/FORMOUTPUT = FP_FORMOUTPUT
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4
CALL FUNCTION 'FP_JOB_CLOSE'
IMPORTING
E_RESULT = result
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
BUFFER = FP_FORMOUTPUT-PDF
APPEND_TO_TABLE = ' '
IMPORTING
OUTPUT_LENGTH =
TABLES
BINARY_TAB = I_ATT_CONTENT_HEX .
CLASS cl_bcs DEFINITION LOAD.
DATA:
lo_send_request TYPE REF TO cl_bcs VALUE IS INITIAL.
lo_send_request = cl_bcs=>create_persistent( ).
Message body and subject
DATA:
lt_message_body TYPE bcsy_text VALUE IS INITIAL,
lo_document TYPE REF TO cl_document_bcs VALUE IS INITIAL.
APPEND 'Dear,' TO lt_message_body.
append ' ' to lt_message_body.
APPEND 'Fill the details.'
TO lt_message_body.
append ' ' to lt_message_body.
APPEND 'Thank You,' TO lt_message_body.
lo_document = cl_document_bcs=>create_document(
i_type = 'RAW'
i_text = lt_message_body
i_subject = 'flight details' ).
DATA: lx_document_bcs TYPE REF TO cx_document_bcs VALUE IS INITIAL.
TRY.
lo_document->add_attachment(
EXPORTING
i_attachment_type = 'PDF'
i_attachment_subject = 'flight details'
I_ATTACHMENT_SIZE =
I_ATTACHMENT_LANGUAGE = SPACE
I_ATT_CONTENT_TEXT =
I_ATTACHMENT_HEADER =
I_ATT_CONTENT_HEX = I_ATT_CONTENT_HEX ).
CATCH cx_document_bcs INTO lx_document_bcs.
ENDTRY.
Add attachment
Pass the document to send request
lo_send_request->set_document( lo_document ).
Create sender
DATA:
lo_sender TYPE REF TO if_sender_bcs VALUE IS INITIAL,
l_send type ADR6-SMTP_ADDR value 'mail id '.
lo_sender = cl_cam_address_bcs=>create_internet_address( l_send ).
lo_sender = cl_sapuser_bcs=>create( sy-uname ).
Set sender
lo_send_request->set_sender(
EXPORTING
i_sender = lo_sender ).
Create recipient
DATA:
lo_recipient TYPE REF TO if_recipient_bcs VALUE IS INITIAL.
lo_recipient = cl_sapuser_bcs=>create( sy-uname ).
lo_recipient = cl_cam_address_bcs=>create_internet_address( l_send ).
Set recipient
lo_send_request->add_recipient(
EXPORTING
i_recipient = lo_recipient
i_express = 'X' ).
lo_send_request->add_recipient(
EXPORTING
i_recipient = lo_recipient
i_express = 'X' ).
Send email
DATA: lv_sent_to_all(1) TYPE c VALUE IS INITIAL.
lo_send_request->send(
EXPORTING
i_with_error_screen = 'X'
RECEIVING
result = lv_sent_to_all ).
COMMIT WORK.
message 'Form sucessfuly send to person' type 'I'.
plesase can any one, provide the soultion.
i shall be thankful toy you for this.
regards
pavneet rana -
Use Adobe forms for Dunning letters
Dear All,
We have a requirement to use dunning letters using Adobe Forms. I would like to know,
1. Is there a way we can attach adobe forms for dunning letters.
2. what could be the estimate do develop these letters using adobe forms.
3. Could I get some guidelines on the approach.
Thanks.Hi Jonathan,
You're right, PDF is easier to use in comparison to SapScript.
If the SapScript is in use at this time, you should have no worries with PDF, where you can even import the official format.
Regards,
Francois -
Adobe form error in BSP controller
Dear Friends
How are you?
I am attaching one adobe interactive from in my bsp application. I have created the form and interface both are activated. while attaching adobe form to bsp application I am having error in controller class's method do_request. the erro says that "Function call aborted: Function l_name could not be found". can you please tell me where I am making mistakes. I will greatly appreciate your reply. Any help will be appreciated.
Thanking you
Regards
Naeem
Pleas see the following code.
runtime->server->response->delete_header_field( name = 'Cache-Control' ).
runtime->server->response->delete_header_field( name = 'Expires' ).
runtime->server->response->delete_header_field( name = 'Pragma' ).
data: l_name type rs38l_fnam.
data: f_name type fpwbformname.
f_name = 'ZTRAVEL_REQ '.
try.
call function 'FP_FUNCTION_MODULE_NAME'
exporting
i_name = f_name
importing
e_funcname = l_name <--- I m failed to receive l_name here,, so it gives
exceptions
others = 0.
catch cx_fp_api_repository. "#EC NO_HANDLER
catch cx_fp_api_usage. "#EC NO_HANDLER
catch cx_fp_api_internal. "#EC NO_HANDLER
endtry.
when i debug more and run method directly I received the error like
Access via 'NULL' object reference not possible.
and error location is
runtime->server->response->delete_header_field( name = 'Cache-Control' ).
I have run function module by passing form name i come to know that it gives me the l_name on return,
Thanks.
Regards
Naeem
Edited by: Naim Khan S Babi on Sep 29, 2009 6:55 PMRe: ADOBE Error in PCR
see this.. u might get some idea..
GS -
Values not capture during adobe form display on pa30.
Hi Experts,
I have attached Adobe Form into Transaction PA30 in which form values are not capturing during form display,
But its displaying at the time of form generation on ZHINUREQ_CORRS_LETTER program.
Kindly give suggestion.
Regards,
AbdulHi Saujanya,
This could by caused by the network, the used browser or additional browser plugins. Try to do the following:
1. Test with an alternative browser (if you are on a SP which supports different browsers than IE, see PAM, http://service.sap.com/pam): If it works with Firefox, then you know the problem is caused by IE and not by the OS, network, ...
2. Deactivate/uninstall all additional browser plugins/add-ons (like google toolbar, Yahoo toolbar, ...)
3. Create a client trace as explained in SAP note 999998. Maybe there's a hint in the trace. Watch for something like "ERROR".
4. Install a HTTP sniffer (like "fiddler") on both machines and compare the network traffic. Maybe there's a request with a 4xx HTTP status code?
5. How is the machine connected to your network? Is it behind an additional webproxy?
Hope one of this helps,
Ralf -
Adobe form as attachment to user decision step
Hi,
i need to add adobe form as attachement to user decision step in workflow.
1. i created activity step which call business object method with parameters workitem id
i am using FM SAP_WAPI_ATTACHMENT_ADD’ which will return attribute id
i am passing that attribute with document id to 'ZSOFM'
ZSOFM <-----------------------------------ZSOFM (Method to task)
Bindings 'Attach_objects' <------------- ZSOFM(Task to Workflow).
2. i created user decision step
Bindings 'Attach_objects' --------------------> 'Attach_Objects'( Workflow to user decision task).
but when we execute first activity step in background i am not getting any PDF output .but when we execute same method from class i can see pdf data is coming is it due to user name WF-Batch.
when i execute activity step in back ground which will have sy-uname as WF-Batch i am not getting any PDF output data.
please help how to solve .
Thanks,
PhaniIn transaction SWO1 create a z-object lets say zmyobjpdf (you might want to use it as a sub object of your standard object without delegation since they will probably have the same key).
create a method in that object calling the adobe form.
set it as the default method in the object header.
now create an instance of the zmyobjpdf in the workflow for example as an attribute of the original object) and transfer it to the decision task.
It will be displayed as an attached object pressing it will call the default method - your adobe form.
If your question was about how to create a function module to display the form see SAP Library - PDF-Based Forms -
Problem by Sending an Email with attached Adobe Interactive Form (Code)
Thanks. I have written Programm, but it does not work as i want it to do. I will send an Email with attached Adobe Interactive Firm to [email protected]. I tried it with "*lo_recipient = cl_sapuser_bcs=>create( sy-uname )" at the marked(bold, fat) position. It worked but the Email was send to my SAP-Account, but i want to send to [email protected], so I tried this (see at code in bold, fat):
lo_rec TYPE adr6-smtp_addr VALUE '[email protected]'. " Empfänger Receiver
lo_recipient = cl_cam_address_bcs=>create_internet_address( lo_rec ).
But it doens`t send the email.
Can anybody help me please???
Kevin
Here my Code:
Report FP_EXAMPLE_01
Printing of documents using PDF based forms
REPORT z_example_02.
Data declaration
DATA: carr_id TYPE sbook-carrid,
customer TYPE scustom,
bookings TYPE ty_bookings,
connections TYPE ty_connections,
fm_name TYPE rs38l_fnam,
fp_docparams TYPE sfpdocparams,
fp_outputparams TYPE sfpoutputparams,
error_string TYPE string,
l_booking TYPE sbook,
t_sums TYPE TABLE OF sbook,
l_sums LIKE LINE OF t_sums,
fp_formoutput TYPE fpformoutput.
PARAMETER: p_custid TYPE scustom-id DEFAULT 38.
SELECT-OPTIONS: s_carrid FOR carr_id DEFAULT 'AA' TO 'ZZ'.
PARAMETER: p_form TYPE tdsfname DEFAULT 'FP_EXAMPLE_01'.
PARAMETER: language TYPE sfpdocparams-langu DEFAULT 'E'.
PARAMETER: country TYPE sfpdocparams-country DEFAULT 'US'.
Get data from the following tables: scustom(Flight customer)
sbook (Single flight reservation)
spfli (Flight plan)
SELECT SINGLE * FROM scustom INTO customer WHERE id = p_custid.
CHECK sy-subrc = 0.
SELECT * FROM sbook INTO TABLE bookings
WHERE customid = p_custid
AND carrid IN s_carrid
ORDER BY PRIMARY KEY.
SELECT * FROM spfli INTO TABLE connections
FOR ALL ENTRIES IN bookings
WHERE carrid = bookings-carrid
AND connid = bookings-connid
ORDER BY PRIMARY KEY.
Print data:
First get name of the generated function module
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
EXPORTING
i_name = p_form
IMPORTING
e_funcname = fm_name.
IF sy-subrc <> 0.
MESSAGE e001(fp_example).
ENDIF.
Set output parameters and open spool job
fp_outputparams-nodialog = 'X'. " suppress printer dialog popup
fp_outputparams-getpdf = 'X'. " launch print preview
CALL FUNCTION 'FP_JOB_OPEN'
CHANGING
ie_outputparams = fp_outputparams
EXCEPTIONS
cancel = 1
usage_error = 2
system_error = 3
internal_error = 4
OTHERS = 5.
Set form language and country (->form locale)
fp_docparams-langu = language.
fp_docparams-country = country.
*fp_docparams-fillable = 'X'.
*fp_docparams-langu = 'E'. "wird jetzt automatisch gesetzt, bzw. kann dynamisch verändert werden
*fp_docparams-country = 'GB'. "wird jetzt automatisch gesetzt, bzw. kann dynamisch verändert werden
currency key dependant summing
LOOP AT bookings INTO l_booking.
l_sums-forcuram = l_booking-forcuram.
l_sums-forcurkey = l_booking-forcurkey.
COLLECT l_sums INTO t_sums.
ENDLOOP.
Now call the generated function module
CALL FUNCTION fm_name
EXPORTING
/1bcdwb/docparams = fp_docparams
customer = customer
bookings = bookings
connections = connections
t_sums = t_sums
IMPORTING
/1bcdwb/formoutput = fp_formoutput
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
CALL FUNCTION 'FP_GET_LAST_ADS_ERRSTR'
IMPORTING
e_adserrstr = error_string.
IF NOT error_string IS INITIAL.
we received a detailed error description
WRITE:/ error_string.
EXIT.
ELSE.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
Close spool job
CALL FUNCTION 'FP_JOB_CLOSE'
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 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.
*********************Send the form*******************
*********************to the Customer*****************
*********************via Email***********************
*IF i_down = abap_true.
DATA: filename TYPE string,
path TYPE string,
fullpath TYPE string,
default_extension TYPE string VALUE 'PDF'.
Data:
lt_att_content_hex TYPE solix_tab.
*DATA: data_tab TYPE TABLE OF x255.
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = fp_formoutput-pdf
TABLES
binary_tab = lt_att_content_hex.
CLASS cl_bcs DEFINITION LOAD.
DATA:
lo_send_request TYPE REF TO cl_bcs VALUE IS INITIAL.
lo_send_request = cl_bcs=>create_persistent( ).
DATA:
lt_message_body TYPE bcsy_text VALUE IS INITIAL.
DATA: lo_document TYPE REF TO cl_document_bcs VALUE IS INITIAL.
APPEND 'Dear Vendor,' TO lt_message_body.
APPEND ' ' TO lt_message_body.
APPEND 'Please fill the attached form and send it back to us.'
TO lt_message_body.
APPEND ' ' TO lt_message_body.
APPEND 'Thank You,' TO lt_message_body.
lo_document = cl_document_bcs=>create_document(
i_type = 'RAW'
i_text = lt_message_body
i_subject = 'Vendor Payment Form' ).
DATA: lx_document_bcs TYPE REF TO cx_document_bcs VALUE IS INITIAL.
TRY.
lo_document->add_attachment(
EXPORTING
i_attachment_type = 'PDF'
i_attachment_subject = 'Vendor Payment Form'
i_att_content_hex = lt_att_content_hex ).
CATCH cx_document_bcs INTO lx_document_bcs.
ENDTRY.
lo_send_request->set_document( lo_document ).
DATA:
lo_sender TYPE REF TO if_sender_bcs VALUE IS INITIAL,
lo_send TYPE adr6-smtp_addr VALUE '[email protected]'. "Absender SENDER
lo_sender = cl_cam_address_bcs=>create_internet_address( lo_send ).
Set sender
lo_send_request->set_sender(
EXPORTING
i_sender = lo_sender ).
Create recipient
DATA:
lo_recipient type ref to if_recipient_bcs value is initial.
Data:
lo_rec TYPE adr6-smtp_addr VALUE '[email protected]'. " Empfänger Receiver
lo_recipient = cl_cam_address_bcs=>create_internet_address( lo_rec ).
*lo_recipient = cl_sapuser_bcs=>create( sy-uname ).
Set recipient
lo_send_request->add_recipient(
EXPORTING
i_recipient = lo_recipient
i_express = 'X' ).
*lo_send_request->add_recipient(
*EXPORTING
*i_recipient = lo_recipient
*i_express = 'X' ).
Send email
DATA: lv_sent_to_all(1) TYPE c VALUE IS INITIAL.
lo_send_request->send(
EXPORTING
i_with_error_screen = 'X'
RECEIVING
result = lv_sent_to_all ).
COMMIT WORK.
MESSAGE 'The payment form has been emailed to the Vendor' TYPE 'I'.Hi Kevin,
Please try this code to send your mail, i wrote it and works well in many system.
Take care if in your profile you got an e-mail adress define .
Take care also of trnasaction SCOT customizing, are you able to send mail to e-mail adress ?
Let me know if it's works.
Best regards.
<i>**----
CLASS-DEFINITIONS
DATA: send_request TYPE REF TO cl_bcs.
DATA: document TYPE REF TO cl_document_bcs.
DATA: sender TYPE REF TO cl_sapuser_bcs.
DATA: recipient TYPE REF TO if_recipient_bcs.
INTERNAL TABLES
DATA: l_mailtext TYPE soli_tab.
DATA: iaddsmtp TYPE TABLE OF bapiadsmtp.
DATA: ireturn TYPE TABLE OF bapiret2.
VARIABLES
DATA: mail_line LIKE LINE OF l_mailtext.
DATA: bapiadsmtp TYPE bapiadsmtp.
DATA: subject TYPE so_obj_des.
DATA : att_subject TYPE so_obj_des.
DATA : w_except TYPE REF TO cx_root .
CONSTANTS : c_defmail TYPE ad_smtpadr VALUE
'[email protected]' .
FIELD-SYMBOLS : <smtp> TYPE bapiadsmtp.
*Convert the pdf given by function module into Binary .
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = output-pdf "PDF file from function module
TABLES
binary_tab = hexa.
*Set subject of the mail
subject = 'Exemple de PDF interactif'.
Set text of the mail
mail_line = 'Merci de remplir le formulaire et nous le retourner'.
APPEND mail_line TO l_mailtext .
Set the name of the attached document
att_subject = 'Template du PDF'.
TRY.
Create persistent send request
send_request = cl_bcs=>create_persistent( ).
Get sender object
sender = cl_sapuser_bcs=>create( sy-uname ).
Add sender
CALL METHOD send_request->set_sender
EXPORTING
i_sender = sender.
Read the E-Mail address for the user
CALL FUNCTION 'BAPI_USER_GET_DETAIL'
EXPORTING
username = sy-uname
TABLES
return = ireturn
addsmtp = iaddsmtp.
LOOP AT iaddsmtp ASSIGNING <smtp> WHERE std_no = 'X'.
CLEAR bapiadsmtp.
MOVE <smtp> TO bapiadsmtp.
ENDLOOP.
CASE bapiadsmtp-e_mail.
WHEN space.
No adress main for user, so send it to the default mail adress
recipient =
cl_cam_address_bcs=>create_internet_address( c_defmail ).
WHEN OTHERS.
recipient =
cl_cam_address_bcs=>create_internet_address( bapiadsmtp-e_mail ).
ENDCASE.
Add recipient with its respective attributes to send request
CALL METHOD send_request->add_recipient
EXPORTING
i_recipient = recipient
i_express = 'X'
i_copy = space
i_blind_copy = space
i_no_forward = space.
Set that you don't need a Return Status E-mail
CALL METHOD send_request->set_status_attributes
EXPORTING
i_requested_status = 'E'
i_status_mail = 'E'.
set send immediately flag
send_request->set_send_immediately( 'X' ).
*Build Document
document = cl_document_bcs=>create_document(
i_type = 'RAW'
i_text = l_mailtext
i_subject = subject ).
add attachment to document
CALL METHOD document->add_attachment
EXPORTING
i_attachment_type = 'PDF'
i_attachment_subject = att_subject
i_att_content_hex = hexa.
Add document to send request
CALL METHOD send_request->set_document( document ).
Send document
CALL METHOD send_request->send( ).
COMMIT WORK.
CATCH cx_send_req_bcs INTO w_except.
CATCH cx_address_bcs INTO w_except.
CATCH cx_document_bcs INTO w_except.
ENDTRY.</i> -
How to send adobe form output in mail as a attachment
i am get the adobe form output
how to attach in a mail ....
Regards
Anbu Bmy program is like this.............
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
EXPORTING
i_name = 'YHRIN_WELCOME'
IMPORTING
e_funcname = lv_funcname
gs_output-nodialog = 'X'.
gs_output-preview = 'X'.
gs_output-getpdl = 'X'.
gs_output-getpdf = 'X'.
gs_output-dest = 'LP01'.
CALL FUNCTION 'FP_JOB_OPEN'
CHANGING
ie_outputparams = gs_output
EXCEPTIONS
CANCEL = 1
USAGE_ERROR = 2
SYSTEM_ERROR = 3
INTERNAL_ERROR = 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.
ENDIF.
DATA : gs_outputpara TYPE sfpdocparams.
DATA : ls_return TYPE fpformoutput .
gs_outputpara-langu = 'E'.
gs_outputpara-country = 'IN'.
CALL FUNCTION lv_funcname
EXPORTING
/1bcdwb/docparams = gs_outputpara
wa_data = wa_mail
IMPORTING
/1bcdwb/formoutput = ls_return
EXCEPTIONS
OTHERS = 1.
DATA lv_output TYPE sdokcntbins WITH HEADER LINE.
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = ls_return-pdf "PDF file from function module
TABLES
binary_tab = lv_output .
*DATA : result TYPE sfpjoboutput WITH HEADER LINE .
CALL FUNCTION 'FP_JOB_CLOSE'
IMPORTING
e_result = result
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
DATA : iv_len_in LIKE sood-objlen,
it_tline TYPE TABLE OF tline WITH HEADER LINE.
PERFORM pdf_file.
DATA: lt_imessage TYPE STANDARD TABLE OF solisti1 WITH HEADER LINE,
lt_iattach TYPE STANDARD TABLE OF solisti1 WITH HEADER LINE,
lt_ipacking_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
lt_ireceivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
lt_iattachment LIKE solisti1 OCCURS 0 WITH HEADER LINE.
DATA : lt_record LIKE solisti1 OCCURS 0 WITH HEADER LINE.
DATA : it_otf TYPE itcoo OCCURS 0 WITH HEADER LINE.
DATA: lv_email TYPE somlreci1-receiver
VALUE 'anbu.'.
PERFORM build_xls_data .
APPEND lt_iattach.
Populate message body text
CLEAR lt_imessage. REFRESH lt_imessage.
lt_imessage = 'Please find attached PDF file'.
APPEND lt_imessage.
Send file by email as .xls speadsheet
PERFORM send_email_with_xls TABLES lt_imessage
lt_iattach
USING lv_email
'PDF Attachment of an Employee'
'PDF'
'TestFileName'
'Employee Detail'.
Form BUILD_XLS_DATA
FORM build_xls_data .
DATA :lv_buffer TYPE string.
Convert PDF from 132 to 255.
LOOP AT it_tline.
Replacing space by ~
TRANSLATE it_tline USING ' ~'.
CONCATENATE lv_buffer it_tline INTO lv_buffer.
ENDLOOP.
replacing ~ by space
TRANSLATE lv_buffer USING '~'.
DO.
lt_record = lv_buffer.
Appending 255 characters as a record
APPEND lt_record.
SHIFT lv_buffer LEFT BY 255 PLACES.
IF lv_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
lt_iattach[] = lt_record[].
ENDFORM.
Form SEND_EMAIL_WITH_XLS
FORM send_email_with_xls TABLES pit_message
pit_attach
USING p_email
p_mtitle
p_format
p_filename
p_attdescription.
DATA: es_xdocdata LIKE sodocchgi1,
lv_xcnt TYPE i.
Fill the document data.
es_xdocdata-doc_size = 1.
Populate the subject/generic message attributes
es_xdocdata-obj_langu = sy-langu .
es_xdocdata-obj_name = 'SAPRPT' .
es_xdocdata-obj_descr = p_mtitle .
Fill the document data and get size of attachment
CLEAR es_xdocdata.
READ TABLE lt_iattach INDEX lv_xcnt.
es_xdocdata-doc_size =
( lv_xcnt - 1 ) * 255 + STRLEN( lt_iattach ).
es_xdocdata-obj_langu = sy-langu.
es_xdocdata-obj_name = 'SAPRPT'.
es_xdocdata-obj_descr = p_mtitle.
CLEAR lt_iattachment. REFRESH lt_iattachment.
lt_iattachment[] = pit_attach[].
Describe the body of the message
CLEAR lt_ipacking_list. REFRESH lt_ipacking_list.
lt_ipacking_list-transf_bin = space.
lt_ipacking_list-head_start = 1.
lt_ipacking_list-head_num = 0.
lt_ipacking_list-body_start = 1.
DESCRIBE TABLE lt_imessage LINES lt_ipacking_list-body_num.
lt_ipacking_list-doc_type = 'RAW'.
APPEND lt_ipacking_list.
Create attachment notification
lt_ipacking_list-transf_bin = 'X'.
lt_ipacking_list-head_start = 1.
lt_ipacking_list-head_num = 1.
lt_ipacking_list-body_start = 1.
DESCRIBE TABLE lt_iattachment LINES lt_ipacking_list-body_num.
lt_ipacking_list-doc_type = p_format.
lt_ipacking_list-obj_descr = p_attdescription.
lt_ipacking_list-obj_name = p_filename.
lt_ipacking_list-doc_size = lt_ipacking_list-body_num * 255.
APPEND lt_ipacking_list.
Add the recipients email address
CLEAR lt_ireceivers. REFRESH lt_ireceivers.
lt_ireceivers-receiver = p_email.
lt_ireceivers-rec_type = 'U'.
lt_ireceivers-com_type = 'INT'.
lt_ireceivers-notif_del = 'X'.
lt_ireceivers-notif_ndel = 'X'.
APPEND lt_ireceivers.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = es_xdocdata
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = lt_ipacking_list
contents_bin = lt_iattachment
CONTENTS_HEX = lv_output
contents_txt = lt_imessage
receivers = lt_ireceivers
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.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = '' AND RETURN.
ENDFORM. -
PDF Attachment problem in Adobe form and send mail is not working
Dear Experts,
Recently i'm facing a problem regarding Adobe form PDF attachment and sending an e-mail along with the PDF attachment to customer mail id.But when i execute the RFC Function module, in customer side no mail is comming. And when i check the transaction SBWP then i found that the PDF attachment hold only 1KB of data which is not right.For that i'm sending my code which i was declared in my program.Can anybody please help me to overcome this problem?
Warm Regards,
sameek.
CLASS cl_bcs DEFINITION LOAD.
DATA:
lo_send_request TYPE REF TO cl_bcs VALUE IS INITIAL.
lo_send_request = cl_bcs=>create_persistent( ).
data: t_att_content_hex type SOLIX_TAB.
DATA: lx_document_bcs TYPE REF TO cx_document_bcs VALUE IS INITIAL.
DATA: lo_sender TYPE REF TO if_sender_bcs VALUE IS INITIAL,
l_send type ADR6-SMTP_ADDR value 'Already provided an e-mail address here'.
DATA: lo_recipient TYPE REF TO if_recipient_bcs VALUE IS INITIAL.
DATA: lv_sent_to_all(1) TYPE c VALUE IS INITIAL.
Message body and subject*
DATA:
lt_message_body TYPE bcsy_text VALUE IS INITIAL,
lo_document TYPE REF TO cl_document_bcs VALUE IS INITIAL.
APPEND 'Dear,' TO lt_message_body.
append ' ' to lt_message_body.
APPEND 'Please fill the attached form and send it back to us.'
TO lt_message_body.
append ' ' to lt_message_body.
APPEND 'Thank You,' TO lt_message_body.
lo_document = cl_document_bcs=>create_document(
i_type = 'RAW'
i_text = lt_message_body
i_subject = 'Customer Information Form').
TRY.
lo_document->add_attachment(
EXPORTING
i_attachment_type = 'PDF'
i_attachment_subject = 'Customer Information Form'
I_ATTACHMENT_SIZE =*
I_ATTACHMENT_LANGUAGE = SPACE*
I_ATT_CONTENT_TEXT =*
I_ATTACHMENT_HEADER =*
i_att_content_hex = t_att_content_hex ).
CATCH cx_document_bcs INTO lx_document_bcs.
ENDTRY.
Add attachment*
Pass the document to send request*
lo_send_request->set_document( lo_document ).
Create sender*
lo_sender = cl_cam_address_bcs=>create_internet_address( l_send ).
lo_sender = cl_sapuser_bcs=>create( sy-uname ).*
Set sender*
lo_send_request->set_sender(
EXPORTING
i_sender = lo_sender ).
Create recipient*
lo_recipient = cl_sapuser_bcs=>create( sy-uname ).
lo_recipient = cl_cam_address_bcs=>create_internet_address( l_send ).*
Set recipient*
lo_send_request->add_recipient(
EXPORTING
i_recipient = lo_recipient
i_express = 'X' ).
lo_send_request->add_recipient(*
EXPORTING*
i_recipient = lo_recipient*
i_express = 'X' ).*
Send email*
lo_send_request->send(
EXPORTING
i_with_error_screen = 'X'
RECEIVING
result = lv_sent_to_all ).
COMMIT WORK.
message 'The Customer Information form has been emailed to the Employee' type 'I'.I am also facing issue with email send .
apex 4.1.1 oracle 11g
create or replace procedure email ( p_email in varchar2)
is
l_workspace_id number;
l_subject varchar2(2000);
l_body clob;
l_body_html clob;
l_email varchar2(40);
begin
l_workspace_id := apex_util.find_security_group_id (p_workspace => 'xyz');
apex_util.set_security_group_id (p_security_group_id => l_workspace_id);
l_email:= p_email;
l_body := ' ';
l_subject := 'You have new tasks';
--if l_email=:P3_CONFIRM_EMAIL_ADDRESS is not null then
-- email( l_email =>:P3_CONFIRM_EMAIL );
-- end if;
l_body_html := '<p />The following tasks have been added.';
apex_mail.send (
p_to => l_email ,
p_from => '[email protected]',
p_body => l_body,
p_body_html => l_body_html,
p_subj => l_subject );
APEX_MAIL.PUSH_QUEUE;
end; I also check the log and queue but both are empty,
select * from
apex_mail_queue
select * from
apex_mail_log Kindly suggest what to do ?
I also created a process in apex , which call this procedure and pass the email address entered by user.
Maybe you are looking for
-
In iCal, the user interface is now completely useless. The static info window is now gone completely in favor of a dynamic info window which only comes up when typing command-i or double clicking on an event. The problem is that bringing up an info w
-
The PDF in question was created using InDesign CS5 7.0 and the properties of the file identify the following additions PDF Library 9.9 PDV V1.5 Acrobat 6.x and Fast Web View is Enabled The background colour looks to have been added as a layer during
-
Adobe LiveCycle Designer 9.8
Hello, I would like to install the latest version of Adobe LiveCycle Designer. According to SAP Note 1658830 ( 'Adobe LiveCycle Designer 9.8 - Installation' ) this is the version 9.8. I have searched the file "67837800102000002446 Adobe LiveCycle Des
-
Synced new phone with old phone settings. Can I undo?
I recently upgraded from an iPhone 3gs to a 4. I used the 4 for three months before I synced it to my iTunes. (I just used iCloud for contacts...etc). When I plugged in my new phone it synced to the settings from my 3gs. How do I get all of my photos
-
Web Service communication through HTTPS
Hi Experts, I have created a web service for my offline interactive form. The connection works fine if I give Communication security as "None" in transaction SOAMANAGER. But it doesn't work if I give HTTPS as Communication security. Will adobe forms