Create pdf attachment to the mail
Hi folks,
My requirement is to attach pdf document to the mail step in workflow programatically and document is on presentation server.
i have tried with SOFM object type, but it is asking for document number , but i could not provide it because it is not in SAP system.
how to acheive this.
Thanks,
janakiram.
try this copy and paste is and make changes as required
Enjoy.............
To create pdf from internal table.
Two steps
1. get spool no.
2. create pdf.
1. get spool no.
SELECT *
FROM zwftrack
INTO TABLE it_zwftrack
WHERE wf_id = p_wf_id
AND action = 'FYA'.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING destination = 'LP01' " 'LT50'
copies = 1
list_name = g_rq2name
list_text = 'COMM-PDF NEW-PAGE PRINT ON'
immediately = ' '
release = ' '
new_list_id = 'X'
expiration = g_days
line_size = g_ln_size " 255 ZTG12
line_count = g_ln_count " 65 ZTG12
layout = g_layout " 'X_PAPER'ZTG12
SAP_COVER_PAGE = 'X'
RECEIVER = 'SAP*'
DEPARTMENT = 'System'
SAP_OBJECT = 'RS'
AR_OBJECT = 'TEST'
ARCHIVE_ID = 'XX'
ARCHIVE_INFO = 'III'
ARCHIVE_TEXT = 'Description'
no_dialog = 'X'
IMPORTING out_parameters = g_params
out_archive_parameters = g_arparams
valid = g_valid.
"end of get
NEW-PAGE PRINT ON
NEW-SECTION
NO-TITLE
PARAMETERS g_params
ARCHIVE PARAMETERS g_arparams
NO DIALOG.
***add at top of comments list
WRITE:/ 'Contract Analysis Worksheet', 150 'Current Data ( ', l_date, ' ', l_time, ' )'.
WRITE:/150 'Run # :', wa_zzbedsheet-bdshnum.
WRITE:/ 'Project ID :',g_object_no.
WRITE:/ 'Project :',g_psr_desc.
WRITE:/ 'Profit Center :',g_prctr.
WRITE:/ 'Project Manager :',g_final_abb_contact.
WRITE:/ 'RA key :',g_abgsl.
WRITE:/ 'Customer :',l_cust.
WRITE:/ 'Project Start :',l_proj_start.
SKIP 3.
SORT it_zwftrack BY approver_level.
LOOP AT it_zwftrack INTO wa_zwftrack.
AT FIRST.
WRITE:/ 'Approvers Comments:'.
SKIP 1.
WRITE:/1 'Role', 35 'Approved By', 50 'Signature', 75 'Comments'.
ULINE.
ENDAT.
IF wa_zwftrack IS INITIAL.
SKIP.
ELSE.
PERFORM f_get_name USING wa_zwftrack-approved_by
CHANGING g_final_abb_contact.
WRITE :/ wa_zwftrack-role UNDER 'Role',
g_final_abb_contact UNDER 'Approved By',
wa_zwftrack-signature UNDER 'Signature',
wa_zwftrack-comments UNDER 'Comments'.
ENDIF.
CLEAR: g_final_abb_contact.
insert page break
IF sy-tabix = w_lines .
NEW-PAGE .
w_lines = 2 * w_lines.
ENDIF.
ENDLOOP.
NEW-PAGE PRINT OFF .
CLEAR w_tsp01.
SELECT SINGLE *
FROM tsp01
INTO w_tsp01
WHERE rqowner = sy-uname
AND rq2name = g_rq2name. "'COMM-PDF' .
g_spool_comm = w_tsp01-rqident.
2. create pdf
CLEAR g_lines .
REFRESH it_tab1 .
****get comments page from spool
CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'
EXPORTING
rqident = g_spool_comm "spool1
TABLES
buffer = it_tab1
EXCEPTIONS
no_such_job = 1
job_contains_no_data = 2
selection_empty = 3
no_permission = 4
can_not_access = 5
read_error = 6
OTHERS = 8.
IF sy-subrc = 0.
ENDIF.
to record line no for page break .
DESCRIBE TABLE it_tab1 LINES g_lines.
MOVE g_lines TO wa_eof-line .
APPEND wa_eof TO it_eof .
CLEAR g_lines .
APPEND LINES OF it_tab1 TO it_tab.
REFRESH it_tab1 .
SELECT SINGLE spld INTO w_spld FROM usr01 WHERE bname = sy-uname.
SHIFT g_wf_id LEFT DELETING LEADING '0'.
CONCATENATE g_wf_id '-ONEPDF' INTO g_list_name.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING destination = w_spld " 'LT50'
copies = 1
list_name = g_list_name
list_text = 'PM-PDF NEW-PAGE PRINT ON'
immediately = ' '
release = ' '
new_list_id = 'X'
expiration = g_days
line_size = g_ln_size " 255 ZTG12
line_count = g_ln_count " 65 ZTG12
layout = g_layout " 'X_PAPER'ZTG12
SAP_COVER_PAGE = 'X'
RECEIVER = 'SAP*'
DEPARTMENT = 'System'
SAP_OBJECT = 'RS'
AR_OBJECT = 'TEST'
ARCHIVE_ID = 'XX'
ARCHIVE_INFO = 'III'
ARCHIVE_TEXT = 'Description'
no_dialog = 'X'
IMPORTING out_parameters = g_params
out_archive_parameters = g_arparams
valid = g_valid.
NEW-PAGE PRINT ON
NEW-SECTION
NO-TITLE
PARAMETERS g_params
ARCHIVE PARAMETERS g_arparams
NO DIALOG.
w_idx = 1 . " for reading EOF line no .
w_tabix = 0 .
READ TABLE it_eof INTO wa_eof INDEX w_idx .
MOVE wa_eof-line TO g_lines .
w_lines = w_tabix + g_lines .
DATA: w_linestr LIKE sy-tabix . "#EC NEEDED
LOOP AT it_tab INTO wa_tab.
IF wa_tab-line CP 'Current Budget' .
w_linestr = sy-tabix .
ENDIF .
IF wa_tab IS INITIAL OR wa_tab-line CA '?' . " ZTG15
SKIP . " ZTG15
ELSE . " ZTXX
WRITE / wa_tab .
ENDIF . " ZTG15
insert page break
IF sy-tabix = w_lines .
NEW-PAGE .
w_idx = w_idx + 1 .
w_tabix = sy-tabix + w_tabix .
READ TABLE it_eof INTO wa_eof INDEX w_idx .
MOVE wa_eof-line TO g_lines .
w_lines = w_tabix + g_lines .
CLEAR: w_tabix.
ENDIF .
ENDLOOP .
NEW-PAGE PRINT OFF .
CLEAR w_tsp01.
SELECT * INTO TABLE t_tsp01 FROM tsp01
WHERE rqowner = sy-uname
AND rq2name = g_list_name .
IF sy-subrc = 0 .
SORT t_tsp01 BY rqcretime DESCENDING . "RBE24 rqident DESCENDING .
ENDIF .
READ TABLE t_tsp01 INTO W_TSP01 INDEX 1 .
CLEAR w_tsp01.
SELECT SINGLE *
FROM tsp01
INTO w_tsp01
WHERE rqowner = sy-uname
AND rq2name = g_list_name. "'COMM-PDF' .
WHILE g_numbytes = 0 .
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = w_tsp01-rqident "spoolno
no_dialog = ' '
DST_DEVICE =
PDF_DESTINATION =
IMPORTING
pdf_bytecount = g_numbytes
pdf_spoolid = g_pdfspoolid
LIST_PAGECOUNT =
btc_jobname = g_jobname
btc_jobcount = g_jobcount
TABLES
pdf = it_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.
ENDWHILE.
**DATA : DATA_TAB TYPE TABLE.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = g_numbytes
filename = g_lv_file
filetype = 'BIN'
IMPORTING
filelength = g_numbytes
TABLES
data_tab = it_pdf
FIELDNAMES =
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
report ZTEST12345678.
tables:
tsp01.
*STRUCTURES
parameters:
p_repid like sy-repid, " Report to execute
p_linsz like sy-linsz default 255, " Line size
p_paart like sy-paart default 'X_65_132'. " Paper Format
data:
mstr_print_parms like pri_params,
mc_valid(1) type c,
mi_bytecount type i,
mi_length type i,
mi_rqident like tsp01-rqident.
*INTERNAL TABLES
data:
mtab_pdf like tline occurs 0 with header line,
mc_filename TYPE string.
*----Data for Mail
DATA: OBJPACK LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.
DATA: OBJHEAD LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.
DATA: OBJBIN LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: OBJTXT LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: RECLIST LIKE SOMLRECI1 OCCURS 5 WITH HEADER LINE.
DATA: DOC_CHNG LIKE SODOCCHGI1.
DATA: TAB_LINES LIKE SY-TABIX.
DATA: V_MAILID(241) TYPE C .
DATA: BEGIN OF DATA_TAB OCCURS 20,
LINE(255),
END OF DATA_TAB.
start-of-selection.
concatenate 'c:\abap\'
p_repid
'.pdf'
into mc_filename.
*Setup the Print Parmaters
call function 'GET_PRINT_PARAMETERS'
exporting
authority = space
copies = '1'
cover_page = space
data_set = space
department = space
destination = space
expiration = '1'
immediately = space
*in_archive_parameters = space
*in_parameters = space
layout = space
mode = space
new_list_id = 'X'
no_dialog = 'X'
user = sy-uname
importing
out_parameters = mstr_print_parms
valid = mc_valid
exceptions
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
others = 4.
*Make sure that a printer destination has been set up
*If this is not done the PDF function module ABENDS
if mstr_print_parms-pdest = space.
mstr_print_parms-pdest = 'LP01'.
endif.
*Explicitly set line width, and output format so that
*the PDF conversion comes out OK
mstr_print_parms-linsz = p_linsz.
mstr_print_parms-paart = p_paart.
submit (p_repid) to sap-spool without spool dynpro
spool parameters mstr_print_parms
via selection-screen
and return.
CALL FUNCTION 'ENQUE_SLEEP'
EXPORTING
seconds = 2.
*Find out what the spool number is that was just created
P_REPID = SY-REPID.
perform get_spool_number using p_repid sy-uname
changing mi_rqident.
*Convert Spool to PDF
call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
exporting
src_spoolid = mi_rqident
no_dialog = space
dst_device = mstr_print_parms-pdest
importing
pdf_bytecount = mi_bytecount
tables
pdf = mtab_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.
perform create_mail_data.
PERFORM SEND_MAIL.
*FORM get_spool_number
*Get the most recent spool created by user/report *
*--> F_REPID *
*--> F_UNAME *
*--> F_RQIDENT *
form get_spool_number using f_repid
f_uname changing f_rqident.
data: lc_rq2name like tsp01-rq2name.
concatenate f_repid+0(8)
f_uname+0(3)
into lc_rq2name separated by '_'.
concatenate f_repid+0(9)
f_uname+0(3)
into lc_rq2name.
select * from tsp01 where rq2name = lc_rq2name
order by rqcretime descending.
f_rqident = tsp01-rqident.
exit.
endselect.
if sy-subrc ne 0.
clear f_rqident.
endif.
endform." get_spool_number
**& Form create_mail_data
form create_mail_data.
*Creation of the document to be sent
DOC_CHNG-OBJ_NAME = 'TEST MAIL ATTACHMENTS'.
DOC_CHNG-OBJ_DESCR = 'Test for PDF'.
OBJTXT = 'Contents of mail'.
APPEND OBJTXT.
OBJTXT = 'PDF'.
APPEND OBJTXT.
OBJTXT = 'PDF'.
APPEND OBJTXT.
DESCRIBE TABLE OBJTXT LINES TAB_LINES.
READ TABLE OBJTXT INDEX TAB_LINES.
DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
*Creation of the entry for the compressed document
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.
*-DOWNLOADING AND AGAIN UPLOADINGIN BIN FORMAT TO TRANSFER TO OBJBIN
*MC_FILENAME = 'c:\test.doc' .
*--pdf--
*MC_FILENAME = 'c:\test.pdf'.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = MI_BYTECOUNT
filename = MC_FILENAME
FILETYPE = 'BIN'
APPEND = ' '
WRITE_FIELD_SEPARATOR = ' '
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
WRITE_LF_AFTER_LAST_LINE = ABAP_TRUE
SHOW_TRANSFER_STATUS = ABAP_TRUE
IMPORTING
FILELENGTH =
tables
data_tab = MTAB_PDF[]
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 'GUI_DOWNLOAD'
*EXPORTING
*BIN_FILESIZE = MI_BYTECOUNT
*FILENAME = MC_FILENAME
*FILETYPE = 'BIN'
*TABLES
*DATA_TAB = MTAB_PDF
*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.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = MC_FILENAME
FILETYPE = 'BIN'
HAS_FIELD_SEPARATOR = ' '
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
VIRUS_SCAN_PROFILE =
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
HEADER =
tables
data_tab = OBJBIN
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 'GUI_UPLOAD'
*EXPORTING
*FILENAME = MC_FILENAME
*FILETYPE = 'BIN'
*TABLES
*DATA_TAB = OBJBIN.
*--uncommnet this for pdf--
DESCRIBE TABLE OBJBIN LINES TAB_LINES.
OBJHEAD = 'TEST.pdf'. APPEND OBJHEAD.
*Creation of the entry for the compressed attachment
OBJPACK-TRANSF_BIN = 'X'.
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 1.
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = TAB_LINES.
OBJPACK-DOC_TYPE = 'PDF'.
OBJPACK-OBJ_NAME = 'Testing PDF Attachment'.
OBJPACK-OBJ_DESCR = 'Customes Ageing report PDF Output Attachment'.
OBJPACK-DOC_SIZE = TAB_LINES * 255.
APPEND OBJPACK.
CLEAR V_MAILID.
V_MAILID = <mail id>.
RECLIST-RECEIVER = V_MAILID.
RECLIST-REC_TYPE = 'U'. "B for SAP Inbox
APPEND RECLIST.
endform. " create_mail_data
**& Form SEND_MAIL
form SEND_MAIL.
Sending the document
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = DOC_CHNG
PUT_IN_OUTBOX = 'X'
commit_work = 'X'
TABLES
PACKING_LIST = OBJPACK
OBJECT_HEADER = OBJHEAD
CONTENTS_BIN = OBJBIN
CONTENTS_TXT = OBJTXT
RECEIVERS = RECLIST
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
OPERATION_NO_AUTHORIZATION = 4
OTHERS = 99.
*EXCEPTION HANDLING
CASE SY-SUBRC.
WHEN 0.
WRITE: / 'Mail sent with attachment'.
WHEN 1.
WRITE: / 'No authorization for sending to the specified number',
'of recipients'.
WHEN 2.
WRITE: / 'Document could not be sent to any recipient'.
WHEN 4.
WRITE: / 'No send authorization'.
WHEN OTHERS.
WRITE: / 'Error occurred while sending'.
ENDCASE.
endform. " SEND_MAIL
Similar Messages
-
Facing problem with logo in the PDF attachment when sending mail...
hi friends,
i'm facing problem with logo in the PDF attachment to the mail.
my requirement:
1. enter spool number and mail id in the selection screen.
process:
1. now the program will fetch the spool data and converts it to PDF.
2. but when i'm trying to send mail with this PDF as attachment.
when i open the PDF file from the mail, logo is not coming properly (looks disturbed).
can anyone help me how to resolve this issue...
thanks in advance, murashali.hi dinakar, thanks for your mail...
logo looks good in spool/script/smartform.
even it look good when i download this spool to pdf and to the presentation server as pdf file.
i'm using CONVERT_OTFSPOOLJOB_2_PDF.
when i used CONVERT_ABAPSPOOLJOB_2_PDF, is gives a msg - 'spool number not found'.
here i'm using folloing code to pass pdf to the function module: SO_NEW_DOCUMENT_ATT_SEND_API1.
code:
Transfer the 132-long strings to 255-long strings
lt_mtab_pdf[] = pdf[].
LOOP AT lt_mtab_pdf INTO lwa_mtab_pdf.
TRANSLATE lwa_mtab_pdf USING ' ~'.
CONCATENATE lv_gd_buffer lwa_mtab_pdf INTO lv_gd_buffer.
CLEAR lwa_mtab_pdf.
ENDLOOP.
TRANSLATE lv_gd_buffer USING '~ '.
DO.
lwa_mess_att = lv_gd_buffer.
APPEND lwa_mess_att TO lt_mess_att.
CLEAR lwa_mess_att.
SHIFT lv_gd_buffer LEFT BY 255 PLACES.
IF lv_gd_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
NOTE: problem i believe is with ''. i'm getting this tilt symbol () in my pdf internal table. here in the above code the line TRANSLATE lv_gd_buffer USING '~ ' is changing the existing tilt to space. so my logo is getting disturbed.
even i tried with REPLACE this tilt with other char, but it doent work.
can you give any idea... -
Reading an PDF Attachment From Sender Mail Adapter
Hi All,
i am able to get a mail from my Mail Server, But my aim is need to Read an PDF attachment from the mail, in SXMB Moni i am getting the Payload with attachment, I have a created a module to convert that PDF to XML(Module is working fine in file to file sceneraio) .
In adapter should i need to use Payload Swap Bean Module also , because in sap help said that i need Select Keep Attachments. I want to know how that how to Push the PDF attachment to My Custom Module which is used to convert the PDF To XML.
If Payload Swap Bean Module needs to be Used , please tell me the Key Names and Key Values to be used.(swap.keyName,swap.keyValues)
Thanks and Regards,
Kamal
Note: Points will be awardedKamal...
See if this helps
[Module Name]
AF_Modules/PayloadSwapBean
[Module Parameters]
The following parameters are used for this module
swap.keyName the name of a supported attribute.
swap.keyValue the value of a partial string that is required
to appear.
The supported attributes (swap.keyName) include the payload attributes
such as payload-name, payload-description and any content attributes
such as content-type, content-disposition, content-description, etc.
Regards
Ravi Raman -
Can any one tell me how to attach a pdf file to the mail through workflow
I have a smart which i am able to convert it to a pdf file...now.. can any one tell me how to attach a pdf file to the mail through workflow
Hi,
To create the task for attachment
Use the BOR SELFITEM and method NOTES_APPEND.
The out come of this task contain a link called attachment with a clip attached. Clisk on that icon and choose the type of attachment u want . RAW , EXCEL , TXT , PDF... Then using the import icon u can attach the document u like.
But the TYPE : OBJ.
Similarly using NOTE_DISPLAY method u can display the documents u like.
In any work item u have the facility to attach any atttchment for further circulation .
Attchment @ WORKITEM
1.Click the workitem for which you want to create the attchment
2.Press create attachment
3. Add the attachment u like (PDF)
Reward points for useful answer.
Richard A -
How to create a link in a PDF pointing to PDF attachment in the same document.
I have Acrobat Pro 9.3.1 and I want to create a link inside a PDF document which points to the PDF attachment in the same document. Though I'm able to do this with the help of the documentation at http://help.adobe.com/en_US/Acrobat/8.0/Standard/help.html?content=WS58a04a822e3e50102bd61 5109794195ff-7cad.html but the issue is that whenever I click on the link my original document closes and the attached PDF opens.
Is there a way to open the PDF (attachment) in a new window when user clicks on the link in the parent PDF?Hi.,
Search - Passing a hyperlink in a Work item in <<link removed>>
Accoding to Forum Rules it will not allow to post link., please search it as above.,
hope this helps u.,
Thanks & Regards
Kiran
Moderator Message: If you know the Rules, why break it?
Edited by: kishan P on May 26, 2011 11:11 AM -
Smartform - PDF attachment through E-mail issue
Hi,
A custom form and custom program was created to print the Purchase order information through ME21N, 22n and 23n.
It also has E-mail option. when output medium 5(Simple mail) and 7(External send), email will be send to respective mail-id's with the PDF attachment.
I have issue at the time of saving PO which processed with medium 5. when i save A popup appears "Express document update was terminated received from author". Brief message about it is
"Error Info... 00 671: ABAP/4 processor: COMMIT_IN_POSTING"
In Smartform driver program i am using below function modules to convert OTF into PDF and send through e-mail.
Function Module: CONVERT_OTF.
Function Module: SO_DOCUMENT_SEND_API1.
I am not sure, what i missed out. Can you guys tell is this the correct way to send PDF attachment through E-mail or i missed out any function module for commit.
Regards,
Hemanth.
Edited by: keerthipati hemanth on Jul 31, 2008 1:15 PM
<MOVED BY MODERATOR TO THE CORRECT FORUM>
Edited by: Alvaro Tejada Galindo on Jul 31, 2008 3:14 PMHi Hemant,
Below is the code for the downloading of the smartform into the PDF Format.
* Program Name : ZPPREP_SHOPFLOOR_VIEWER_ZOOM
REPORT zppeerep_shorepfloor_viewer_zoom.
* T A B L E S D E C L A R A T I O N
*---Tables Used.
TABLES: afpo,
mara,
marc,
aufk,
afko,
itcoo,
nast, "Messages
*nast, "Messages
tnapr, "Programs & Forms
addr_key,
arc_params, "Archive parameters
toa_dara. "Archive parameters
* I N T E R N A L T A B L E S D E C L A R A T I O N
*--Internal Tables Used.
* D A T A D E C L A R A T I O N
*--Global Variables Used.
DATA: ws_matnr LIKE afpo-matnr,
ws_werks LIKE aufk-werks,
ws_mtart LIKE mara-mtart,
ws_wrkst LIKE mara-wrkst,
ws_fname TYPE rs38l_fnam,
ws_ctrlp TYPE ssfctrlop,
ws_optns TYPE ssfcompop,
w_padest LIKE tsp03l-padest. "BMC01+
DATA: da_message_printed(1) TYPE c,
da_preview_processed(1) TYPE c,
repeat(1) TYPE c,
da_subrc LIKE sy-subrc.
DATA: w_otfdata TYPE ssfcrescl.
DATA: BEGIN OF it_itcoo OCCURS 0.
INCLUDE STRUCTURE itcoo.
DATA: END OF it_itcoo.
DATA: w_otf TYPE itcoo.
*--Data Declaration for Printing Layout
DATA: ls_itcpo TYPE itcpo.
DATA: lf_repid TYPE sy-repid.
DATA: lf_device TYPE tddevice.
DATA: cf_retcode TYPE sy-subrc.
DATA: ls_recipient TYPE swotobjid.
DATA: ls_sender TYPE swotobjid.
DATA: ls_control_param TYPE ssfctrlop.
DATA: ls_composer_param TYPE ssfcompop.
DATA: ls_addr_key LIKE addr_key.
DATA: w_screen(1) TYPE c.
DATA: xscreen(1) TYPE c.
DATA: da_mess LIKE vbfs OCCURS 0 WITH HEADER LINE.
* C O N S T A N T S
CONSTANTS: c_fas1(8) TYPE c VALUE 'PRINTFAS',
c_fas2(15) TYPE c VALUE 'PRINTFASDRAWING',
c_wip1(8) TYPE c VALUE 'PRINTWIP',
c_wip2(15) TYPE c VALUE 'PRINTWIPDRAWING'.
* S E L E C T I O N - S C R E E N.
SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME TITLE text-bl1.
* Production order
PARAMETERS: p_aufnr LIKE afpo-aufnr OBLIGATORY.
SELECTION-SCREEN END OF BLOCK bl1.
START-OF-SELECTION.
*--Begin of Commenting "
*--Get Partially processed orders
MOVE: sy-mandt TO nast-mandt,
'V1' TO nast-kappl,
p_aufnr TO nast-objky,
p_aufnr TO nast-parnr,
sy-langu TO nast-spras,
sy-datum TO nast-erdat,
'1' TO nast-nacha,
'3' TO nast-vsztp,
'X' TO nast-manue,
sy-uname TO nast-usnam,
'DFLT' TO nast-ldest,
sy-langu TO nast-tdspras,
'Shop Floor Papers' TO nast-tdcovtitle,
'1' TO nast-tdarmod,
'BUS2032' TO nast-objtype.
*--Printer settings
CALL FUNCTION 'WFMC_PREPARE_SMART_FORM'
EXPORTING
pi_nast = nast
pi_repid = sy-repid
IMPORTING
pe_returncode = cf_retcode
pe_itcpo = ls_itcpo
pe_device = lf_device
pe_recipient = ls_recipient
pe_sender = ls_sender.
MOVE-CORRESPONDING ls_itcpo TO ls_composer_param.
ls_control_param-device = 'PRINTER'.
ls_control_param-no_dialog = 'X'.
ls_control_param-preview = 'X'.
ls_control_param-getotf = ls_itcpo-tdgetotf.
ls_control_param-langu = sy-langu.
*--End of Commenting "
*--Start of Addition "
CLEAR: ws_werks.
SELECT SINGLE werks
INTO ws_werks
FROM aufk
WHERE aufnr = p_aufnr.
CLEAR: ws_matnr.
SELECT SINGLE plnbez
INTO ws_matnr
FROM afko
WHERE aufnr = p_aufnr.
CLEAR: marc.
SELECT SINGLE matgr
INTO marc-matgr
FROM marc
WHERE matnr = ws_matnr
AND werks = ws_werks.
*--End of Addition "
* CHECK NOT ws_matnr IS INITIAL.
IF NOT ws_matnr IS INITIAL.
*--Start of Addition
SELECT SINGLE matgr
INTO marc-matgr
FROM marc
WHERE matnr = ws_matnr
AND werks = ws_werks.
*--Start of Addition BY Rapidigm01_01+
ELSE.
marc-matgr = c_wip1.
ENDIF.
*--End Of Addition BY Rapidigm01_01+
*--End of Addition "
END-OF-SELECTION.
PERFORM call_smartform.
* F O R M R O U T I N E S
*& Form call_smartform
* text
FORM call_smartform.
CLEAR: ws_ctrlp, ws_optns, ws_fname.
*--Start of Addition "
TRANSLATE marc-matgr TO UPPER CASE.
IF marc-matgr = c_fas1 OR
marc-matgr = c_fas2.
PERFORM call_paper_a.
ELSEIF marc-matgr = c_wip1 OR
marc-matgr = c_wip2.
PERFORM call_paper_b.
ENDIF.
*--End of Addition "
ENDFORM. "call_smartform
*& Form call_paper_a
* text
FORM call_paper_a.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
*>>BC SPARTA03 DATE: 19/05/2008
* formname = 'ZPPSF_SHOP_FLOOR_PAPER_A' "Rapidigm03_01-
formname = 'ZPPSF_SHOP_FLOOR_PAPER_C' "Rapidigm03_01-
*<<EC SPARTA03 DATE: 19/05/2008
* formname = 'ZPPSF_SHOP_FLOOR_PAPER_A_2893' "Rapidigm03_01+
IMPORTING
fm_name = ws_fname
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
CHECK NOT ws_fname IS INITIAL.
CLEAR w_otfdata.
ls_control_param-getotf = 'X'.
CALL FUNCTION ws_fname
EXPORTING
archive_index = toa_dara
archive_parameters = arc_params
control_parameters = ls_control_param
mail_recipient = ls_recipient
mail_sender = ls_sender
output_options = ls_composer_param
user_settings = ' '
is_nast = nast
aufnr = p_aufnr
flag_orig = 'X'
IMPORTING
job_output_info = w_otfdata
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
LOOP AT w_otfdata-otfdata INTO w_otf.
APPEND w_otf TO it_itcoo.
ENDLOOP.
CALL FUNCTION 'HR_IT_DISPLAY_WITH_PDF'
TABLES
otf_table = it_itcoo.
ENDFORM. "call_paper_a
*& Form call_paper_b
* text
FORM call_paper_b.
DATA: ws_doknr TYPE draw-doknr,
ws_dokvr TYPE draw-dokvr.
CLEAR: ws_doknr, ws_dokvr.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZPPSF_SHOP_FLOOR_PAPER_B'
IMPORTING
fm_name = ws_fname
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
CHECK NOT ws_fname IS INITIAL.
CLEAR w_otfdata.
ls_control_param-getotf = 'X'.
CALL FUNCTION ws_fname
EXPORTING
archive_index = toa_dara
archive_parameters = arc_params
control_parameters = ls_control_param
mail_recipient = ls_recipient
mail_sender = ls_sender
output_options = ls_composer_param
user_settings = ' '
is_nast = nast
aufnr = p_aufnr
doknr = ws_doknr
dokvr = ws_dokvr
flag_orig = 'X'
IMPORTING
job_output_info = w_otfdata
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
LOOP AT w_otfdata-otfdata INTO w_otf.
APPEND w_otf TO it_itcoo.
ENDLOOP.
CALL FUNCTION 'HR_IT_DISPLAY_WITH_PDF'
TABLES
otf_table = it_itcoo.
ENDFORM. "call_paper_b -
Send a remuneration statement (paystub) as a PDF attachment by e-mail
Hi,
Does anybody send to their employees remuneration statement (paystub) as a PDF attachment by e-mail?
Could you please share the method that you using for it and advice why you choose this method?
I need to analyse at least two options:
u2022 Sending standard SAP Remuneration FORM
u2022 Sending custom made Remuneration FORM (more relevant to my situation)
Thank you in advance,
YutahThank you Rohan,
It may work for standard SAP payslip form but still need to find out how to send it out by e-mail automatically after pay-run is done to a bunch of employees.
Is there any standard solution or I need to create custom program to do it?
Any idea about custom made payslip form.
Right now we create a text file which we send to third party for payslip printing and have a custom made report which reads this file if we need to display/print payslip in house. -
Send PDF Attachment to SAP Mail Inbox.
Dear all,
I have problem please help me out.
i have to create an PDF file with
my own data and that created PDF file
i have to send it to SAP mail inbox
(Transaction code : so01).hi sudheer,
Let the data be populated into ur itab ,
Now in the code just concentrate on
Perform fill structure.
the process u need to do is from ur layout convert from
itab o/p format itab>OTF/OTF->PDF .
see the function modules .
on execution of this a mail will be in ur outbox .
regards,
vijay.
tables : vbak.
type-pools:slis.
data: begin of it_t1 occurs 0,
vbeln like vbak-vbeln,
erdat like vbak-erdat,
ernam like vbak-ernam,
netwr like vbak-netwr,
waerk like vbak-waerk,
end of it_t1.
select-options : so_vbeln for vbak-vbeln.
DATA : it_fieldcat TYPE slis_t_fieldcat_alv,
it_sort TYPE slis_t_sortinfo_alv,
it_listheader TYPE slis_t_listheader,
it_alvevent TYPE slis_t_event.
DATA : wa_fieldcat TYPE slis_fieldcat_alv,
w_pos TYPE i VALUE 1,
wa_listheader TYPE slis_listheader,
wa_alvevent TYPE slis_alv_event,
wa_sort TYPE slis_sortinfo_alv.
Data: it_outtab like it_t1 occurs 0 with header line.
DATA : MAILREC LIKE SOMLRECI1 occurs 0 WITH HEADER LINE,
MAILBIN LIKE SOLISTI1 occurs 0 WITH HEADER LINE,
MAILBIN2 LIKE SOLISTI1 occurs 0 WITH HEADER LINE,
MAILTXT LIKE SOLISTI1 occurs 0 WITH HEADER LINE,
MAILHEAD LIKE SOLISTI1 occurs 0 WITH HEADER LINE,
MAILSTRUC LIKE SOPCKLSTI1 occurs 0 WITH HEADER LINE,
MAILDATA LIKE SODOCCHGI1 occurs 0 WITH HEADER LINE.
DATA: BEGIN OF GT_OTF OCCURS 0.
INCLUDE STRUCTURE ITCOO .
DATA: END OF GT_OTF.
DATA: ITCPO LIKE ITCPO,
ITCPP LIKE ITCPP.
DATA: tlines type i,
len_in like SOOD-OBJLEN,
len_out like SOOD-OBJLEN.
data: gt_pdf like solisti1 occurs 0 with header line.
DATA: gt_otfdata LIKE SOLISTI1 occurs 0 WITH HEADER LINE.
CONSTANTS: c_formname_top_of_page TYPE slis_formname
VALUE 'F_TOP_OF_PAGE'.
select vbeln
erdat
ernam
netwr
waerk into corresponding fields of table
it_outtab from vbak where vbeln in so_vbeln.
loop at it_t1.
write:/ it_t1-vbeln,
it_t1-erdat,
it_t1-ernam,
it_t1-netwr,
it_t1-waerk.
endloop.
perform alv_disp.
*& Form alv_disp
text
--> p1 text
<-- p2 text
FORM alv_disp.
PERFORM build_fcat USING '1' 'VBELN' 'IT_OUTTAB' ' ' ' ' ' '
'SALESNO'.
PERFORM build_fcat USING '2' 'ERDAT' 'IT_OUTTAB' ' ' ' ' ' '
'CRTNDATE'.
PERFORM build_fcat USING '3' 'ERNAM' 'IT_OUTTAB' ' ' ' ' ' '
'CRNAME'.
PERFORM build_fcat USING '4' 'NETWR' 'IT_OUTTAB' ' ' ' ' ' '
'NETPRICE'.
PERFORM build_fcat USING '5' 'WAERK' 'IT_OUTTAB' ' ' ' ' ' '
'CURRENCY'.
***Top of Page Heading purpose " u can add the date and column over here
PERFORM buildtop USING it_listheader[].
perform top_of_page.
*------Sort The Catalog
PERFORM sort_cat TABLES it_outtab USING it_sort[].
*------Display Table In GRID
PERFORM disp_grid TABLES it_outtab[].
**For email stuff follow the perform
perform fill_struct.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = MAILDATA
PUT_IN_OUTBOX = 'X'
TABLES
PACKING_LIST = MAILSTRUC
OBJECT_HEADER = MAILHEAD
CONTENTS_BIN = MAILBIN
CONTENTS_TXT = MAILTXT
CONTENTS_HEX =
OBJECT_PARA =
OBJECT_PARB =
RECEIVERS = MAILREC
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.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " alv_disp
*& Form build_fcat
text
-->P_0104 text
-->P_0105 text
-->P_0106 text
-->P_0107 text
-->P_0108 text
-->P_0109 text
-->P_0110 text
FORM build_fcat USING value(col_pos)
value(fieldname)
value(tabname)
value(key)
value(no_zero)
value(do_sum)
value(reptext_ddic).
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = col_pos.
wa_fieldcat-fieldname = fieldname.
wa_fieldcat-tabname = tabname.
wa_fieldcat-key = key.
wa_fieldcat-no_zero = no_zero.
wa_fieldcat-do_sum = do_sum.
wa_fieldcat-reptext_ddic = reptext_ddic.
APPEND wa_fieldcat TO it_fieldcat.
ENDFORM. " build_fcat
*& Form Top_Of_Page
Top of page for Grid.
FORM top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = it_listheader
I_LOGO = 'MY_SAP_ENJOY'.
ENDFORM. "top_of_page
text
-->P_IT_LISTHEADER[] text
FORM buildtop USING IT_LISTHEADER type slis_t_listheader.
DATA : text(100) TYPE c.
CLEAR it_listheader.
CLEAR wa_listheader.
wa_listheader-typ = 'H'.
wa_listheader-info = 'Sales Details' .
APPEND wa_listheader TO it_listheader.
CLEAR wa_listheader.
wa_listheader-typ = 'S'.
wa_listheader-info = 'Demo'.
APPEND wa_listheader TO it_listheader.
*CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = it_listheader
I_LOGO =
I_END_OF_LIST_GRID =
ENDFORM. " Top_Of_Page
*& Form sort_cat
text
-->P_IT_OUTTAB text
-->P_IT_SORT[] text
FORM sort_cat TABLES IT_OUTTAB STRUCTURE IT_OUTTAB USING IT_SORT
TYPE
slis_t_sortinfo_alv.
CLEAR wa_sort.
wa_sort-fieldname = 'VBELN'.
wa_sort-tabname = 'IT_OUTTAB'.
wa_sort-spos = 1.
wa_sort-up = 'X'.
wa_sort-subtot = ' '.
APPEND wa_sort TO it_sort.
ENDFORM. " sort_cat
*& Form disp_grid
text
-->P_IT_OUTTAB[] text
FORM disp_grid TABLES IT_OUTTAB STRUCTURE IT_OUTTAB.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = 'ZEX2' "sy-repid
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
IT_FIELDCAT = IT_FIELDCAT
IT_SORT = IT_SORT
TABLES
T_OUTTAB = IT_OUTTAB
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.
ENDFORM. " disp_grid
*& Form fill_struct
text
--> p1 text
<-- p2 text
FORM fill_struct.
Text
MOVE 'Hi vijay ' TO MAILTXT-LINE.
APPEND MAILTXT.
Data
MAILDATA-OBJ_NAME = 'Document'.
MAILDATA-OBJ_DESCR = 'E-maiL From vij'.
MAILDATA-OBJ_PRIO = '1'.
MAILDATA-DOC_SIZE = strlen( MAILTXT ).
Structure
MAILSTRUC-HEAD_START = 1.
MAILSTRUC-HEAD_NUM = 0.
MAILSTRUC-BODY_START = 1.
MAILSTRUC-BODY_NUM = 1.
mailstruc-obj_name = 'Vijay Simha'.
MAILSTRUC-DOC_TYPE = 'RAW'.
APPEND MAILSTRUC.
Receivers
**u can use ur mail id(s) overhere
MOVE '[email protected]' TO MAILREC-RECEIVER.
MAILREC-REC_TYPE = 'U'.
APPEND MAILREC.
CLEAR ITCPO.
ITCPO-TDGETOTF = 'X'.
***moving to the output/format of the attachment.
final pdf format in the mail attachemnt
LOOP AT it_outtab.
MOVE it_outtab-vbeln TO MAILBIN.
MOVE it_outtab-erdat TO MAILBIN+18.
MOVE it_outtab-ernam TO MAILBIN+40.
MOVE it_outtab-netwr TO MAILBIN+70.
MOVE it_outtab-waerk TO MAILBIN+78.
APPEND MAILBIN.
CLEAR MAILBIN.
ENDLOOP.
**convert the scrap to otf.
CALL FUNCTION 'SX_OBJECT_CONVERT_SCR_OTF'
EXPORTING
format_src = 'RAW'
format_dst = 'OTF'
devtype = 'POSTSCPT'
funcpara = ' '
len_in = LEN_IN
IMPORTING
LEN_OUT = LEN_OUT
tables
content_in = MAILBIN
content_out = MAILBIN2
EXCEPTIONS
ERR_CONV_FAILED = 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.
REFRESH MAILBIN.
CONVERT OTF to PDF
CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
EXPORTING
FORMAT_SRC = 'OTF'
FORMAT_DST = 'PDF'
DEVTYPE = 'POSTSCPT'
FUNCPARA =
LEN_IN = LEN_IN
IMPORTING
LEN_OUT = LEN_OUT
TABLES
CONTENT_IN = MAILBIN2
CONTENT_OUT = MAILBIN
EXCEPTIONS
ERR_CONV_FAILED = 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.
REFRESH MAILBIN2.
DESCRIBE TABLE MAILBIN LINES TLINES.
Structure
MAILSTRUC-HEAD_START = 1.
MAILSTRUC-HEAD_NUM = 1.
MAILSTRUC-BODY_START = 1.
MAILSTRUC-BODY_NUM = TLINES.
MAILSTRUC-TRANSF_BIN = 'X'.
MAILSTRUC-DOC_TYPE = 'PDF'.
MAILSTRUC-DOC_TYPE = 'XLS'.
mailstruc-obj_name = 'Vijay.S.Reddy'.
MAILSTRUC-DOC_SIZE = tlines * 255.
APPEND MAILSTRUC.
ENDFORM. " fill_struct -
How to open a pdf attachment in imac mail
I am unable to open a PDF attachment in Mac Mail. There is not a PDF Icon in the email message. Is there a setting that should be checked?
I have a new iMac (less than a month old) with Mountain Lion.
Help would be greatly appreciated. ThanksIt is an actual PDF that is an attachment to an email. There is not a link to click on to open the attachment.
The attachment is a statement that I normally open, then print..
What I am seeing on the monitor is the heading portion of the email with the statement image, all on one page..It prints exactly as seen on the screen.
I have checked my Mail>Preferences>Viewing Tab."Display remote images in HTML" messages is checked..
Thanks for the help. -
Error while opening PDF attachment sent via mail
Hi,
I am attaching PDF file to PO in me22n and sending the same file as attachment in the mail to the vendor using class CL_BCS.
The mail is sent to the vendor successfully and they are able to successfully open the PDF attachment. But in some cases the mail is successfully received but while opening the attachment it is giving the error as file is corrupted.
Please help me to resolve this issue.
Thanks and regards,
JayashreeHi,
I would like to know what font type, you are using in the forms.
Ideally it should be HELVETICA .
If you are using any other font in your style/form,try changing it to HELVETICA & Test.
Also Check the OTF data at the call of gen. FM,before converting it to PDF.
Regds,
AS
Edited by: abheesawant on Oct 12, 2011 7:48 AM -
Adapter Module Error-Sending excel file as an attachment of the mail
Hi ,
My scenario is as follows
1)I am sending an excel file as an attachment of the mail.I need to read that excel attachment as a payload.
So mail adapter is used in sender side.
To configure this, have used standard PayloadSwapBean module with proper module key.
Next to convert excel to XML another custom adapter module is being used.
Both this adapter module , I configured into the CC of sender mail adapter.
The order in which adapter modules are being used in the sender CC are as follows
1)localejbs/AF_Modules/PayloadSwapBean
2)localejbs/MDPExcelToXMLConversion
3)sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean
MDPExcelToXMLConversion-Custom adapter module written to convert excel to xml.
I am getting the following error
exception caught during processing mail message [4899]com.sap.aii.af.lib.mp.module.ModuleException
And also,
no messages in coming MONI of PI.
Pls suggest what to do.
Thanks
AyanShabarish,
Will the ordering in which the adapter modules(In this case there are two-PayloadSwapBean & MDPExcelToXML) are appearing into Module tab of sender adapter matter?
Firstly, what is happenning
1)If I take out the custom adapter module MDPExcelToXML and put only PayloadSwapBean then it is successfully converting mail attachment into the main Payload i.e PayloadSwapBean module is working.
2)Nextly, my local code( i.e java code without including standard Module specific method like ejbActivate(),ejbPassivate(),process() etc etc.)) for MDPExcelToXML is successfuly converting the excel file into the XML file.Then I am making the local code into adapter module specific code and deploying that.
A few question arises here,
Do I need to do any specific configurations here in PI for this particular things.Maybe both the adapter module is clashing with each other.
And also using tracing and logging into my custom adapter module code.Getting the following error,
java.io.IOException: Unable to read entire header; 116 bytes read; expected 512 bytes#
Thanks
Ayan -
Script to open an pdf attachment in the adobe form is not working.
Hello Experts,
I have a requirement where i should open pdf attachment from the attachment tab of adobe form.
For this i have written below java script in the click event of a button ->
I have an attachment pdf with name attach.pdf in the attachment tab of adobe form.
var oObj = event.target;
oObj.openDataObject();
->When i click on the button it is giving the error -> TypeError: Invalid Argument type.
Parameter cName.
Can any one help me how can i use openDataObject method to open an attachment from the attachment tab of adobe form.
Regards,
Menaka.H.B
Moderator message: wrong forum, please post again in Adobe Interactive Forms.
Edited by: Thomas Zloch on Oct 18, 2010 12:52 PMHi,
Please refer to the thread below where this issue has been discussed:
Creative cloud wants to make changes
Regards,
Sheena -
Opening a list item pdf attachment from the display form in a new window
I have a list setup in which attachments are enabled.
Users attach pdf's to list items.
When they go into the display form for a list item and click on a pdf attachment in the "Attachments" area at the bottom of the form, it opens in the same browser window.
I would like to amend this so it opens in a new window. Has anyone found a fix for this?
Thanks in advance,
MarkHi ,
Put the code below in your DispForm.aspx page .The you can open the attachments in a new window. Including all the other links on the DispForm.aspx page .
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">
$(function(){
$('a').click(function(){
window.open(this.href);
return false;
});</script>
Thanks,
Entan Ming -
Error message an error occurred while signing in " when I worked with Create PDF and at the signed
Error message "an error occurred while signing in " when I worked with Create PDF and at the signed in status. Please help so that I can continu my work.
Hi Stacy,
Thank you for your attention.
I have been working with Create PFD under normal procedures including
sign-in and several documents had been finished. However, when continued
creating another document the computer took a long time to pprocess and
finally a mesage appeared: "An error occurred while signing in" and stopped
there. I clicked the OK button and start creating again and the same
message appeared once more. I tried to log off and log in again in no
avail. So I went to the help site and called for help.
Later, I decided to reboot the computer and tried once more. This time it
worked and I continued creating. Thanks.
laozhao39 -
After installing two updates, I cannon create .pdf documents as the window says "Missing PDF Maker Files." I've uninstalled Acrobat and re-installed twice, same problem. How do I correct problem?
Thank you. I googled my problem and got good answers involving making changes to my Office settings - which worked.
Sent via the Samsung GALAXY S® 5, an AT&T 4G LTE smartphone
Maybe you are looking for
-
I have a frameset with just a topframe & mainframe. Is there a way to have another web address (home page) automatically open in the mainframe without having to click on a link. I have my information in the topframe and want another web address to op
-
What is ignore=y in import n export
what is ignore=y in import n export and what is diffrnce betwen conventional path n direct path
-
I cannot get the option of "None" to show up under payment methods. Does anyone know why this is or how to fix it?
-
Convert from RAW to Jpeg on iPad?
Do any of the 3rd party photography apps let you convert RAW images to Jpeg on the iPad itself? Do any of them let you change the resolution, especially resize to 72 dpi for Web viewing?
-
Event Insight 4.0 - License
Hi, We've installed BO 4.0 with a permanent license. We have Event Insight on top of it. Do we need a seperate permenant license for EI 4.0 ? Thanks, -S.