How to send an attachment with adobe form
Hi
in my application i have two process intiator and approval process both are adobe interactive forms,according to my scenarion i need to send an attachment(pdf or word document....)in intiatior to approval process,can pleasse tell me how to send the attachment.
Thanks
Raju
Edited by: raju on Oct 7, 2008 6:39 AM
hi!
chk these links .
Re: Sending Adobe Interactive Forms via Email
Re: Saving and sending Adobe Form pdf from WebDynpro
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/176882c3-0401-0010-9fbc-d9fa1f713a73
thanks
vishal
Similar Messages
-
How to send an attachment with password protection
Hii all,
I am working on sending an attachment from an ABAP program. The attachement is either .xls or .pdf format. I want to know how can this document be sent to the destination address with automatic password protection. The password should automatically be sent to the receiver in the mail.
Any suggestions? Please help.
Thanks in advance.
ByeSELECTION-SCREEN BEGIN OF BLOCK BLOCK.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(8) PWD.
SELECTION-SCREEN POSITION 35.
PARAMETERS: PASSWORD(8) MODIF ID AAA.
SELECTION-SCREEN END OF LINE.
PARAMETERS: PROGRAM LIKE TRDIR-NAME.
SELECTION-SCREEN END OF BLOCK BLOCK.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'AAA'.
SCREEN-INVISIBLE = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
INITIALIZATION.
PWD = 'PASSWORD'.
START-OF-SELECTION.
TABLES: TRDIR.
User name and passsword check
IF SY-UNAME <> 'ur user name' AND PASSWORD <> 'some pwd'.
WRITE: / 'Wrong password'.
EXIT.
ENDIF.
SAP owned?
IF NOT PROGRAM CP 'Z' AND NOT PROGRAM CP 'Y'.
WRITE: / 'Do not hide original SAP programs!'.
EXIT.
ENDIF.
Exists?
SELECT SINGLE * FROM TRDIR WHERE NAME = PROGRAM.
IF SY-SUBRC <> 0.
WRITE: / 'Program does not exists!'.
EXIT.
ENDIF.
Does it have a current generated version?
DATA: F1 TYPE D, F3 TYPE D.
DATA: F2 TYPE T, F4 TYPE T.
EXEC SQL.
SELECT UDAT, UTIME, SDAT, STIME INTO :F1, :F2, :F3, :F4 FROM D010LINF
WHERE PROG = :PROGRAM
ENDEXEC.
IF F1 < F3 OR ( F1 = F3 AND F2 < F4 ).
WRITE: / 'The program has no recent generated version!'.
EXIT.
ENDIF.
Compose a new program name
DATA: NEW_NAME(8), I TYPE I, J TYPE I.
NEW_NAME = PROGRAM.
DO 8 TIMES.
I = SY-INDEX - 1.
NEW_NAME+I(1) = '_'.
Search for acceptable program name variations
J = 0.
SELECT * FROM TRDIR WHERE NAME LIKE NEW_NAME.
J = J + 1.
ENDSELECT.
IF J = 1.
EXIT.
ENDIF.
NEW_NAME = PROGRAM.
ENDDO.
Cannot generate appropriate program name
IF J > 1.
WRITE: / 'Cannot generate appropriate program name'.
EXIT.
ENDIF.
Check if it is already in d010s (already hidden)
DATA: F5(8).
EXEC SQL.
SELECT PROG INTO :F5 FROM D010S WHERE PROG = :NEW_NAME
ENDEXEC.
IF F5 IS INITIAL.
There is no such hidden program, hide it
EXEC SQL.
UPDATE D010S SET PROG = :NEW_NAME WHERE PROG = :PROGRAM
ENDEXEC.
ELSE.
There is already a hidden program there, unhide it
EXEC SQL.
UPDATE D010S SET PROG = :PROGRAM WHERE PROG = :NEW_NAME
ENDEXEC.
ENDIF. -
Anyone knows how to send a attach with more than 255 characters in 4.6c ?
Hi everyone,
i´m tring to send a email with attach , my problem is that i have a itab with 2500 characters per line,
and the FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' have the structure SOLISTI1 thats supports only 255 char. i tried to converto to PDF and XLS ,but when i open the attach only appers the first 255 char in each line only. any ideia for that issue?
Thanks,
Shimada
Edited by: Fernando Shimada on May 5, 2009 8:28 PMhere is part of my code that i tried:
first: i write the lines of my itab and after did that
CALL FUNCTION 'SAVE_LIST'
EXPORTING
list_index = '0'
TABLES
listobject = list_object.
CALL FUNCTION 'LIST_TO_ASCI'
TABLES
listasci = list_asci
listobject = list_object
EXCEPTIONS
empty_list = 1
list_index_invalid = 2
OTHERS = 3.
APPEND LINES OF t_saida TO t_objbin.
DESCRIBE TABLE t_objbin LINES v_lines_ane.
second: do a alv report and tried to convert to pdf ,but the pdf have the same problem
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-cprog
it_fieldcat = t_fieldcat[]
is_layout = w_layout
is_print = wa_pr
TABLES
t_outtab = t_alv
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
w_sp = sy-msgv1.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = w_sp
no_dialog = ' '
dst_device = 'LOCL'
IMPORTING
pdf_bytecount =
TABLES
pdf = t_pdf
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
CHECK sy-subrc = 0.
Transfer the 132-long strings to 255-long strings
LOOP AT t_pdf.
TRANSLATE t_pdf USING '~'.
CONCATENATE gd_buffer t_pdf INTO gd_buffer.
ENDLOOP.
TRANSLATE gd_buffer USING '~'.
DO.
t_objbin = gd_buffer.
APPEND t_objbin.
SHIFT gd_buffer LEFT BY 255 PLACES.
IF gd_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
Create Message Body Title and Description
t_objtxt-line = 'teste'.
APPEND t_objtxt.
DESCRIBE TABLE t_objtxt LINES v_lines_txt.
READ TABLE t_objtxt INDEX v_lines_txt.
wa_doc_chng-obj_name = 'smartform'.
wa_doc_chng-expiry_dat = sy-datum + 2.
wa_doc_chng-obj_descr = 'smartform'.
wa_doc_chng-sensitivty = 'F'.
wa_doc_chng-doc_size = v_lines_txt * 255.
Main Text
CLEAR t_objpack-transf_bin.
t_objpack-head_start = 1.
t_objpack-head_num = 0.
t_objpack-body_start = 1.
t_objpack-body_num = v_lines_txt.
t_objpack-doc_type = 'RAW'.
APPEND t_objpack.
Anexos
t_objpack-transf_bin = 'X'.
t_objpack-head_start = 1.
t_objpack-head_num = 0.
t_objpack-body_start = 1.
DESCRIBE TABLE t_objbin LINES v_lines_bin.
READ TABLE t_objbin INDEX v_lines_bin.
t_objpack-doc_size = v_lines_bin * 255 .
t_objpack-body_num = v_lines_bin.
t_objpack-doc_type = 'PDF'.
t_objpack-obj_name = 'smart'.
t_objpack-obj_descr = 'test'.
APPEND t_objpack.
CLEAR t_reclist.
t_reclist-receiver = Email.
t_reclist-rec_type = 'U'.
APPEND t_reclist.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = wa_doc_chng
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = t_objpack
object_header = t_objhead
contents_bin = t_objbin
contents_txt = t_objtxt
receivers = t_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.
IF sy-subrc <> 0.
WRITE:/ 'Error When Sending the File', sy-subrc.
ELSE.
WRITE:/ 'Mail sent'.
ENDIF. -
Sending an attachment with an e-mail
Does anyone know how to send an attachment with an e-mail
using a
form page that is on our web site? I am using the TYPE
attribute of
the form tag as "File" to get the file I want to attach to
the e-
mail. Below is the code I have. The first page is where the
user can
click the browse button to search for a file to attach. The
second
page is where the e-mail should be sent to. Thanks for your
help.
AndyIan,
Do we have to set a folder up on our cold fusion server or do
we just
make a folder under our web site so when a user clicks on the
browse
menu, the file they attach has to be saved to our server
first and then
I can attach the saved file to an e-mail? How do we create
this folder?
Does it have to be an FTP site or just a folder on our web
site? How do
we make the permissions work correctly since a folder under
our web site
is not writable to except by the web editors that work here?
Please let
me know what I can do to get this to work. Thanks.
Andy
You can use any folder on the CF server or any system to
which it has
access. By default the CF service runs as a localsystem user,
so would
generally only have access to the local server file system.
This is
determined in the Services panel on window systems, I'm not
sure how it
works for other OS's.
If you are talking about the "Browse" button that is
displayed in the
web page for the <input type="file" ..> that does not
browse the server,
it browses the local user's system. You do not and can not
influence
this in any way. When a user selects a file from their system
and
submits the form, the file is uploaded to the webserver
through the HTTP
response header or URL query string, depending on whether the
form is a
post or get form.
You then use the <cffile action="upload" ...> tag on
the form's action
page to get the file from the web server and write it to a
location you
define the "file" parameter of the flag. This file system
access is
done under the permissions of the ColdFusion server, again
'LocalSystem'
by default.
You can then use this newly saved file in you <cfmailparam
...> tag to
attach it to an email. After this if you like you can use a
<cffile
action="delete" ...> to remove the file. -
Sap database tables with adobe forms
Hai all,
I am new to adobe forms...Can anyone explain me how to link sap database with adobe forms....
Any documents regarding tht will be helpful.....
Thanks in advance....Hi,
Check these:
https://www.sdn.sap.com/irj/sdn/adobe
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2a8a0a37-0301-0010-f794-aecd1bb426e0
http://help.sap.com/saphelp_nw2004s/helpdata/en/37/47a2be350c4ac8afe36b691203971f/frameset.htm
Regards,
Subramanian -
How to send an email with an attachment to the customers email address.
Hi friends,
How to send an email with an attachment to the customers email address.
the attachment will be in doc format.
Having an Header
the data which i am sending must be in a TABLE format
with 5 columns.
and each column must have a column heading
Please guide me.
Thanks in Advance,
Ganesh.*& Report ZEMAIL_ATTACH *
*& Example of sending external email via SAPCONNECT *
REPORT ZEMAIL_ATTACH .
TABLES: ekko.
PARAMETERS: p_email TYPE somlreci1-receiver .
*Here get the values of mail from the table adn6 for the customer address.
TYPES: BEGIN OF t_ekpo,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
END OF t_ekpo.
DATA: it_ekpo TYPE STANDARD TABLE OF t_ekpo INITIAL SIZE 0,
wa_ekpo TYPE t_ekpo.
TYPES: BEGIN OF t_charekpo,
ebeln(10) TYPE c,
ebelp(5) TYPE c,
aedat(8) TYPE c,
matnr(18) TYPE c,
END OF t_charekpo.
DATA: wa_charekpo TYPE t_charekpo.
DATA: it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
WITH HEADER LINE.
DATA: it_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
WITH HEADER LINE.
DATA: t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,
w_cnt TYPE i,
w_sent_all(1) TYPE c,
w_doc_data LIKE sodocchgi1,
gd_error TYPE sy-subrc,
gd_reciever TYPE sy-subrc.
*START_OF_SELECTION
START-OF-SELECTION.
Retrieve sample data from table ekpo
PERFORM data_retrieval.
Populate table with detaisl to be entered into .xls file
PERFORM build_xls_data_table.
*END-OF-SELECTION
END-OF-SELECTION.
Populate message body text
perform populate_email_message_body.
Send file by email as .xls speadsheet
PERFORM send_file_as_email_attachment
tables it_message
it_attach
using p_email
'Example .xls documnet attachment'
'DOC'
'filename'
changing gd_error
gd_reciever.
Instructs mail send program for SAPCONNECT to send email(rsconn01)
PERFORM initiate_mail_execute_program.
*& Form DATA_RETRIEVAL
Retrieve data form EKPO table and populate itab it_ekko
FORM data_retrieval.
SELECT ebeln ebelp aedat matnr
UP TO 10 ROWS
FROM ekpo
INTO TABLE it_ekpo.
ENDFORM. " DATA_RETRIEVAL
*& Form BUILD_XLS_DATA_TABLE
Build data table for .xls document
FORM build_xls_data_table.
CONSTANTS: con_cret TYPE x VALUE '0D', "OK for non Unicode
con_tab TYPE x VALUE '09'. "OK for non Unicode
*If you have Unicode check active in program attributes thnen you will
*need to declare constants as follows
*class cl_abap_char_utilities definition load.
*constants:
con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
con_cret type c value cl_abap_char_utilities=>CR_LF.
CONCATENATE 'EBELN' 'EBELP' 'AEDAT' 'MATNR'
INTO it_attach SEPARATED BY con_tab.
CONCATENATE con_cret it_attach INTO it_attach.
APPEND it_attach.
LOOP AT it_ekpo INTO wa_charekpo.
CONCATENATE wa_charekpo-ebeln wa_charekpo-ebelp
wa_charekpo-aedat wa_charekpo-matnr
INTO it_attach SEPARATED BY con_tab.
CONCATENATE con_cret it_attach INTO it_attach.
APPEND it_attach.
ENDLOOP.
ENDFORM. " BUILD_XLS_DATA_TABLE
*& Form SEND_FILE_AS_EMAIL_ATTACHMENT
Send email
FORM send_file_as_email_attachment tables pit_message
pit_attach
using p_email
p_mtitle
p_format
p_filename
p_attdescription
p_sender_address
p_sender_addres_type
changing p_error
p_reciever.
DATA: ld_error TYPE sy-subrc,
ld_reciever TYPE sy-subrc,
ld_mtitle LIKE sodocchgi1-obj_descr,
ld_email LIKE somlreci1-receiver,
ld_format TYPE so_obj_tp ,
ld_attdescription TYPE so_obj_nam ,
ld_attfilename TYPE so_obj_des ,
ld_sender_address LIKE soextreci1-receiver,
ld_sender_address_type LIKE soextreci1-adr_typ,
ld_receiver LIKE sy-subrc.
ld_email = p_email.
ld_mtitle = p_mtitle.
ld_format = p_format.
ld_attdescription = p_attdescription.
ld_attfilename = p_filename.
ld_sender_address = p_sender_address.
ld_sender_address_type = p_sender_addres_type.
Fill the document data.
w_doc_data-doc_size = 1.
Populate the subject/generic message attributes
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle .
w_doc_data-sensitivty = 'F'.
Fill the document data and get size of attachment
CLEAR w_doc_data.
READ TABLE it_attach INDEX w_cnt.
w_doc_data-doc_size =
( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle.
w_doc_data-sensitivty = 'F'.
CLEAR t_attachment.
REFRESH t_attachment.
t_attachment[] = pit_attach[].
Describe the body of the message
CLEAR t_packing_list.
REFRESH t_packing_list.
t_packing_list-transf_bin = space.
t_packing_list-head_start = 1.
t_packing_list-head_num = 0.
t_packing_list-body_start = 1.
DESCRIBE TABLE it_message LINES t_packing_list-body_num.
t_packing_list-doc_type = 'RAW'.
APPEND t_packing_list.
Create attachment notification
t_packing_list-transf_bin = 'X'.
t_packing_list-head_start = 1.
t_packing_list-head_num = 1.
t_packing_list-body_start = 1.
DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
t_packing_list-doc_type = ld_format.
t_packing_list-obj_descr = ld_attdescription.
t_packing_list-obj_name = ld_attfilename.
t_packing_list-doc_size = t_packing_list-body_num * 255.
APPEND t_packing_list.
Add the recipients email address
CLEAR t_receivers.
REFRESH t_receivers.
t_receivers-receiver = ld_email.
t_receivers-rec_type = 'U'.
t_receivers-com_type = 'INT'.
t_receivers-notif_del = 'X'.
t_receivers-notif_ndel = 'X'.
APPEND t_receivers.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = w_doc_data
put_in_outbox = 'X'
sender_address = ld_sender_address
sender_address_type = ld_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.
Populate zerror return code
ld_error = sy-subrc.
Populate zreceiver return code
LOOP AT t_receivers.
ld_receiver = t_receivers-retrn_code.
ENDLOOP.
ENDFORM.
*& Form INITIATE_MAIL_EXECUTE_PROGRAM
Instructs mail send program for SAPCONNECT to send email.
FORM initiate_mail_execute_program.
WAIT UP TO 2 SECONDS.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = 'X'
AND RETURN.
ENDFORM. " INITIATE_MAIL_EXECUTE_PROGRAM
*& Form POPULATE_EMAIL_MESSAGE_BODY
Populate message body text
form populate_email_message_body.
REFRESH it_message.
it_message = 'Please find attached a list test ekpo records'.
APPEND it_message.
endform. " POPULATE_EMAIL_MESSAGE_BODY
regards,
venkat. -
How to send multiple attachment s with a mail??
Hi,
How to send multiple attachments with a mail??
Situation::
In my case i have 5 internal tables populated dynamically in the report.
I want to send them in .TXT format as attachment with 1 mail.
Can anybody tell me in 'SO_NEW_DOCUMENT_ATT_SEND_API1',
how we add multiple attachmants to table objin???
thanks,
deepakHi Deepak,
Please find the sample code for sending mail with multiple attachment.
Report ZPAN_02M *
REPORT zpan_02m .
*-MAIN DECLARATION----
DATA: docdata LIKE sodocchgi1,
objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE,
objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE,
objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objhex LIKE solix OCCURS 10 WITH HEADER LINE,
reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
*-OTHER DECLARATIONS----
DATA : listobject LIKE abaplist OCCURS 1 WITH HEADER LINE.
DATA : tab_lines(3) TYPE n.
DATA : att_type LIKE soodk-objtp.
*OBJBIN = ' | '. APPEND OBJBIN.
*---For simple attachment -
DATA : BEGIN OF wi_data OCCURS 0,
c1(10),
c2(10),
END OF wi_data.
wi_data-c1 = 'Line 1'. wi_data-c2 = 'Line 1'. APPEND wi_data.
wi_data-c1 = 'Line 2'. wi_data-c2 = 'Line 2'. APPEND wi_data.
wi_data-c1 = 'Line 3'. wi_data-c2 = 'Line 3'. APPEND wi_data.
wi_data-c1 = 'Line 4'. wi_data-c2 = 'Line 3'. APPEND wi_data.
wi_data-c1 = 'Line 5'. wi_data-c2 = 'Line 3'. APPEND wi_data.
wi_data-c1 = 'Line 6'. wi_data-c2 = 'Line 3'. APPEND wi_data.
wi_data-c1 = 'Line 7'. wi_data-c2 = 'Line 3'. APPEND wi_data.
wi_data-c1 = 'Line 8'. wi_data-c2 = 'Line 3'. APPEND wi_data.
wi_data-c1 = 'Line 9'. wi_data-c2 = 'Line 3'. APPEND wi_data.
wi_data-c1 = 'Line 10'. wi_data-c2 = 'Line 3'. APPEND wi_data.
wi_data-c1 = 'Line 11'. wi_data-c2 = 'Line 3'. APPEND wi_data.
wi_data-c1 = 'Line 12'. wi_data-c2 = 'Line 3'. APPEND wi_data.
wi_data-c1 = 'Line 13'. wi_data-c2 = 'Line 3'. APPEND wi_data.
wi_data-c1 = 'Line 14'. wi_data-c2 = 'Line 3'. APPEND wi_data.
wi_data-c1 = 'Line 15'. wi_data-c2 = 'Line 3'. APPEND wi_data.
wi_data-c1 = 'Line 16'. wi_data-c2 = 'Line 3'. APPEND wi_data.
wi_data-c1 = 'Line 17'. wi_data-c2 = 'Line 3'. APPEND wi_data.
wi_data-c1 = 'Line 18'. wi_data-c2 = 'Line 3'. APPEND wi_data.
wi_data-c1 = 'Line 19'. wi_data-c2 = 'Line 3'. APPEND wi_data.
wi_data-c1 = 'Line 20'. wi_data-c2 = 'Line 3'. APPEND wi_data.
wi_data-c1 = 'Line 21'. wi_data-c2 = 'Line 3'. APPEND wi_data.
wi_data-c1 = 'Line 22'. wi_data-c2 = 'Line 3'. APPEND wi_data.
wi_data-c1 = 'Line 23'. wi_data-c2 = 'Line 3'. APPEND wi_data.
wi_data-c1 = 'Line 24'. wi_data-c2 = 'Line 3'. APPEND wi_data.
wi_data-c1 = 'Line 25'. wi_data-c2 = 'Line 3'. APPEND wi_data.
wi_data-c1 = 'Line 26'. wi_data-c2 = 'Line 3'. APPEND wi_data.
class cl_abap_char_utilities definition load.
constants:
con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
con_cret type c value cl_abap_char_utilities=>CR_LF,
con_nwln type c value cl_abap_char_utilities=>NEWLINE.
LOOP AT wi_data.
CONCATENATE wi_data-c1 con_tab
wi_data-c2
INTO objbin.
condense objbin.
CONCATENATE con_cret objbin INTO objbin.
APPEND objbin.
ENDLOOP.
*---CREATE MESSAGE : DOCDATA -
Name
docdata-obj_name = 'TEST_ALI'.
Subject
docdata-obj_descr = 'Test including ALI/HTML Attachment'.
*---CREATE MESSAGE : BODY -
objtxt = 'Test Document.'.
APPEND objtxt.
objtxt = 'You will find an ALI/HTML attachment in this message.'.
APPEND objtxt.
objtxt = 'Have a nice day.'.
APPEND objtxt.
*-CREATE PACKING LIST-----TEXT--
objpack-head_start = 1.
DESCRIBE TABLE objtxt LINES tab_lines.
READ TABLE objtxt INDEX tab_lines.
docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
CLEAR objpack-transf_bin.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'RAW'.
APPEND objpack.
*-CREATE PACKING LIST-----ATTACHMENT--
att_type = 'XLS'.
DESCRIBE TABLE objbin LINES tab_lines.
READ TABLE objbin INDEX tab_lines.
objpack-doc_size = ( ( tab_lines / 2 ) - 1 ) * 255 + STRLEN( objbin ).
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines / 2.
objpack-doc_type = att_type.
objpack-obj_name = 'ATTACHMENT 1'.
objpack-obj_descr = 'Attached Document 1'.
APPEND objpack.
att_type = 'XLS'.
objpack-doc_size = ( ( tab_lines / 2 ) - 1 ) * 255 + STRLEN( objbin ).
objpack-transf_bin = 'X'.
objpack-head_start = 14.
objpack-head_num = 14.
objpack-body_start = 14.
objpack-body_num = tab_lines / 2.
objpack-doc_type = att_type.
objpack-obj_name = 'ATTACHMENT 2'.
objpack-obj_descr = 'Attached Document 2'.
APPEND objpack.
*-CREATE RECEIVER LIST----
reclist-receiver = '[email protected]'. reclist-rec_type = 'U'.
APPEND reclist.
reclist-receiver = sy-uname. reclist-rec_type = 'B'.
APPEND reclist.
*-SEND MESSAGE----
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = docdata
put_in_outbox = 'X'
commit_work = 'X'
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
TABLES
packing_list = objpack
object_header = objhead
contents_bin = objbin
contents_txt = objtxt
CONTENTS_HEX = objhex
OBJECT_PARA =
OBJECT_PARB =
receivers = 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.
WAIT UP TO 2 SECONDS.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = 'X'
AND RETURN.
Hope this is enough for you...
Enjoy SAP.
Pankaj Singh. -
How do I read an attachment with Adobe Acrobat in my e-mail ?
how do I read an attachment with Adobe Acrobat in my e-mail ?
Hi file hunter,
If you have PDF document attached with your email and you are using windows.
First try right click on any PDF document and choose option Openwith --> Choose default Program.. browse for Reader/ Acrobat. That should help.
Or click the attachment and once you try open it that should ask you to choose application open with if you haven't opened PDF document before.
Regards,
Ajlan Huda. -
How to print page numbers in adobe form
Hi,
Can anybody tell me how to print page numbers in adobe form.
Thanks in advance
ChaitanyaHi,
Yes the field page n of m is used normally for printing page numbers. But it won't display the current page of total pages by itself. You have to set the run time property to n (current page ) and m (Total number of pages). Carefully select the # (current page ) and ## (Total number of pages). Hope this works for you.
My requirement is to have the user control on current page. For Example:
Example for a Invoice with 5 PO items (stands on 2 pages) :
1st page is the letter : no page number
2nd page is the 1st page of the 1st copy of the invoice : we should read u201C1 / 2u201D
3rd page is the 2nd page of the 1st copy of the invoice : we should read u201C2 / 2u201D
4th page is the 1st page of the 2nd copy of the invoice : we should read u201C1 / 2u201D
5th page is the 2nd page of the 2nd copy of the invoice : we should read u201C2 / 2u201D
Presently i cam getting the current page number for page 4th as 3 / 2 and for 5th page 4 / 2. I could able to control the total number of pages from print program. But when i am printing the second copy (4th and 5th pages), I couldn't able to control the current page number. I need to initialize the Current page count (4th page ) as 1.
I have used the follwing java scripting:
this.rawValue = wv_pages - xfa.layout.page(this)
where wv_pages is total no of pages calculated from print program.
Please help me in this regard with some formcal or java scripting conditions.
Thank You,
Regards,
Naresh. -
How to improve the performance of adobe forms
Hi,
Please give me some suggestions as to how to improve the performance of adobe form?
Right now when I' am doing user events it is working fine for first 6 or 7 user events. From the next
one it is hanging.
I read about Wizard form design approach, how to use the same here.
Thanks,
AravindHi Otto,
The form is created using HCM forms and processes. I' am performing user events in the form.
User events will doa round trip, in which form data will be sent to backend SAP system. Processing will
happen on the ABAP side and result will appear on the form. First 6 or 7 user events works correctly,
the result is appearing on the form. Around 8 or 9th one, the wait symbol appears and the form is not
re-rendered. The form is of size 6 pages. The issue is not coming with form of size 1 page.
I was reading ways to improve performance during re-rendering given below.
http://www.adobe.com/devnet/livecycle/articles/DynamicInteractiveFormPerformance.pdf
It talks about wizard form design approach. But in SFP transaction, I am not seeing any kind of wizard.
Let me know if you need further details.
Thanks,
Aravind -
Problem with adobe forms multiple pages
Hi
can someone help me how to get multiple pages in adobe forms in case the item lines exceeds the page capacity?
ThanksIt should not be much of a problem. Here is a detailed solution to your problem:
In your context , create a node MasterNode of cardinality 1...1 and singleton set to true. Bind this to the dataSource property of the InteractiveFormElement.
Inside this MasterNode create a node Data of cardinality 0...n and singleton set to false. Keep all of your payslip attributes inside this node.
In your interactive form element , in the Body Page create a subform of Type Flow Content and Flow Direction Table .Check the chechbox for Allow Page Breaks within Context . Inside this subform create another subform of Type Flow Content and Flow Direction Western Text . Uncheck the checkbox for Allow Page Breaks within Context . Put all of your pay slip UI elements inside this subform and bind them with the attributes under the node Data. Also tick the property of the inner subform under the section Object->Subform that says Repeat Subform for each Data Item
In your view controller coding area , create an element of the node Data for each employee record and populate it with values for the particular employee .
Add all of the elements that you created into an ArrayList and bind this ArrayList to the node Data. Now your form is ready for n number of employees.
Put this sort of coding in your view controller coding:
IDataElement objData = null;
ArrayList arlData = null;
int intNumberOfEmployees=0;
try
arlData = new ArrayList();
intNumberOfEmployees = //Get size of your model node that returns employee info
if(intNumberOfEmployees>0)
for(int i=0;i<intNumberOfEmployees;i++)
objData = wdContext.createDataElement();
objData.setName("//Value fetched from backend here");//Eg:wdContext.nodeEmployeeInfo.getEmployeeInfoElementAt(i).getname()
//Similarly set all of the values
arlData.add(objData);
wdContext.nodeData.bind(arlData);
Hope this helps you... -
How to send an attachment thru mail in SAP?
Hi all,
I have an file which has been sent by the customer. The file type may vary each & every week (sometimes XLS, sometimes CSV & sometimes notepad). This file has to be sent to another person thru mail as an attachment.
Is it possible to send thru the fun mod 'SO_SEND_NEW_*'.
If so how to send as attachment. If not thru this fun mod, how to send?
Thanks,
Vijay.I am enclosing the sample code to trigger an email, The logic for this is in comments, check this I am shure yuor problem will be solved.
*& Report ZGBL_SLA_PER
REPORT zgbl_sla_per NO STANDARD PAGE HEADING LINE-COUNT 26(3) MESSAGE-ID
zmsg2.
DECLARATION OF DB TABLES
TABLES: zncrfid, zrule_id.
DECLARATION OF INTERNAL TABLES
DATA: BEGIN OF ncrf OCCURS 0,
zncrf_id(15) TYPE c,
zncrf_l4_name(60) TYPE c,
z9gl_sla_flag(1) TYPE c,
zowners(30) TYPE c,
zowners_value(30) TYPE c,
zdate_changed(8) TYPE n,
ztime_changed(6) TYPE n,
END OF ncrf.
*DATA: NCRF LIKE ZNCRFID OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF it_ruleid OCCURS 0,
zrule_id(10) TYPE c,
zowners(30) TYPE c,
zowners_value(30) TYPE c,
END OF it_ruleid.
*data: wa like ncrf occurs 0 with header line.
DATA: BEGIN OF itab OCCURS 0,
zncrf_id(15) TYPE c,
zncrf_l4_name(60) TYPE c,
z9gl_sla_flag(1) TYPE c,
zowners(30) TYPE c,
zowners_value(30) TYPE c,
zdate_changed(8) TYPE n,
ztime_changed(6) TYPE n,
END OF itab.
data: file(10) type c,
dates type date.
EMAIL DECLARATION
*CONSTANTS: c_subject LIKE sodocchgi1-obj_descr VALUE 'Subject',
*c_tab TYPE c VALUE cl_abap_char_utilities=>horizontal_tab.
*DATA: g_time TYPE char8,
*g_email(40) TYPE c,
*g_sent_all(1) TYPE c,
*g_doc_data LIKE sodocchgi1,
*g_error TYPE sy-subrc.
*DATA: i_message LIKE solisti1 OCCURS 0 WITH HEADER LINE,
*i_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
*i_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE.
*DATA: BEGIN OF mailid OCCURS 0,
zemail_id TYPE zrule_id-zemail_id,
END OF mailid.
*data: mailid like zrule_id occurs 0 with header line.
UPLOADING FLAT FILE TO INTERNAL TABLE NCRF
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = 'C:\VAMSY\file.txt'
filetype = 'ASC'
has_field_separator = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
IMPORTING
FILELENGTH =
HEADER =
TABLES
data_tab = ncrf[]
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
IF sy-subrc EQ 0.
Checking internal table ncrf is empty then
*delete records from TABLE ZNCRF_ID ******************************
IF ncrf[] IS INITIAL.
MESSAGE i003(ZMSG2).
ELSE.
DELETE FROM zncrfid.
ENDIF.
*****Values are read from rule table and checking owner and owner_value
*from zrule_id table and inserted into ZNCRFID **************
SELECT * FROM zrule_id INTO CORRESPONDING FIELDS OF TABLE it_ruleid
WHERE zrule_id IN ('OWNER1', 'OWNER2').
append IT_RULEID.
LOOP AT ncrf WHERE z9gl_sla_flag EQ 'Y'.
READ TABLE it_ruleid WITH KEY zowners = ncrf-zowners
zowners_value = ncrf-zowners_value.
IF ncrf-zowners = it_ruleid-zowners AND ncrf-zowners_value =
it_ruleid-zowners_value AND ncrf-z9gl_sla_flag ='Y'.
itab-zncrf_id = ncrf-zncrf_id.
itab-zncrf_l4_name = ncrf-zncrf_l4_name.
itab-z9gl_sla_flag = ncrf-z9gl_sla_flag.
itab-zdate_changed = sy-datum.
itab-ztime_changed = sy-uzeit.
itab-zowners = it_ruleid-zowners.
itab-zowners_value = it_ruleid-zowners_value.
APPEND itab.
ENDIF.
ENDLOOP.
modify database table zncrfid FROM ITAB
LOOP AT itab.
WRITE:/ itab-zncrf_id, itab-zncrf_l4_name, itab-z9gl_sla_flag,
itab-zowners, itab-zowners_value, itab-zdate_changed,
itab-ztime_changed.
zncrfid-zncrf_id = itab-zncrf_id.
zncrfid-zncrf_l4_name = itab-zncrf_l4_name.
zncrfid-z9gl_sla_flag = itab-z9gl_sla_flag.
zncrfid-zowners = itab-zowners.
zncrfid-zowners_value = itab-zowners_value.
zncrfid-zdate_changed = itab-zdate_changed.
zncrfid-ztime_changed = itab-ztime_changed.
INSERT INTO zncrfid VALUES zncrfid.
ENDLOOP.
ENDIF.
ENDIF.
*CALL FUNCTION 'DATE_TO_DAY'
EXPORTING
DATE = sy-datum
IMPORTING
WEEKDAY = file.
**CHECKING FOR THE FIRST MONDAY OF THE MONTH.
dates = sy-datum.
shift dates by 6 places left.
if file CO 'monday' and dates < 7 and dates >= 1.
else.
message e004(zmsg2).
endif.
EMAIL SEND TO OWNERS LIST
**Fill the mail body in i_message.
get email id's from database into internal table et_mailid
Fill the document data.
*g_doc_data-doc_size = 1.
Populate the subject/generic message attributes
*g_doc_data-obj_langu = sy-langu.
*g_doc_data-obj_name = 'SAPRPT'.
*g_doc_data-obj_descr = c_subject .
*g_doc_data-sensitivty = 'F'.
Describe the body of the message
Information about structure of data tables
*CLEAR i_packing_list.
*REFRESH i_packing_list.
*i_packing_list-transf_bin = space.
*i_packing_list-head_start = 1.
*i_packing_list-head_num = 0.
*i_packing_list-body_start = 1.
*DESCRIBE TABLE i_message LINES i_packing_list-body_num.
*i_packing_list-doc_type = 'RAW'.
*APPEND i_packing_list.
Add the recipients email address
*LOOP AT mailid.
*CLEAR i_receivers.
*i_receivers-receiver = mailid-zemail_id.
*i_receivers-rec_type = 'U'.
*i_receivers-com_type = 'INT'.
*i_receivers-notif_del = 'X'.
*i_receivers-notif_ndel = 'X'.
*APPEND i_receivers.
*ENDLOOP.
Call the FM to post the message to SAPMAIL
*CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
*EXPORTING
*document_data = g_doc_data
*put_in_outbox = 'X'
*commit_work = 'X'
*IMPORTING
*sent_to_all = g_sent_all
*TABLES
*packing_list = i_packing_list
*contents_txt = i_message
*receivers = i_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.
Store function module return code
*g_error = sy-subrc.
Get i_receivers return code
*LOOP AT i_receivers.
*ENDLOOP.
**Instructs mail send program for SAPCONNECT to send email(rsconn01)
*WAIT UP TO 2 SECONDS.
*IF g_error EQ 0.
*SUBMIT zgbl_sla_per WITH mode = 'INT'
*WITH output = 'X'
*AND RETURN.
REWARD IF FOUND USEFULL,
Cheers, -
How to send soap attachment without SAAJ
I have to send XML or text file as an attachment in the web service, just like email attachment. Currently I am intercepting the SOAP message (sent from web service client) and then adding an attachment using SAAJ. Can we send an attachment without intercepting and SAAJ in netbeans just like how we send other data (with basic datatypes ) as parameters to the web service operation ?
TIA.Soap is a protocol that runs over TCP (sockets.) You can build the entire soap message by hand if you want to.
That said adding something is dependent on the fact that the other side will consume it. -
How to create new page in adobe form.
how to create new page in adobe form.
Hi
First Go To Layout.
On Hicherchy Platte , rightclick on Subform and select option new body page.
This way you can create body page for the particular subform.
if you want to create master page , right click on page 1 and select New master page.
Hope this will helpful to you.
Rewards if useful.
With Regards
Nikunj Shah -
How to send an attachment of a file from a procedure
Hi
How to send an email with an attachment of a file from a procedurehttp://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_mail.htm#sthref14875
http://asktom.oracle.com/pls/asktom/f?p=100:11:1400170679814652::::P11_QUESTION_ID:1739411218448
http://www.akadia.com/services/java_mail_plsql.html
Maybe you are looking for
-
I updated my daughter iPod touch. Now the music states that it is on iCloud and can be accessed using WiFi or cellular. I need to move the music back on the iPod so that she can listen to it without WiFi. I tried to Restore backup but still doe
-
Disabling of items in a Quick create Section
Hello, Is it possible to remove the items in the left side panels of the homwpage. Regards Subbu
-
How can I improve the sound quality of my new iPod?
Hey there, I just received my new iPod with my new MacBook Pro computer. I have read every bit of documentation i received plus I have scoured resources here on the forum, but I am baffled. I just synced my iPod for the first time to my Macbook, iTun
-
Print Jobs not coming out!!!
Hi, Where I work we have to print items from the APC website for deliveries, every time a new version of java comes out you have to update as the company updates and prints wont come out. The last update 7.51 was realeased and the same day they upgra
-
Mouseclick issue on nested panel
Hi all, I'm redesigning my portfolio website with Spry sliding panel tech. and I've encountered a behaviour issue that I was wondering if anybody else has seen before. So I've got one set of sliding panels that controls the sections of the website yo