Sending PDF file through PI
hi all,
I followed one blog to create PDF file using file adapter and custom adapter module : http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3414700)ID1540235550DB11887853428651970314End?blog=/pub/wlg/14363
As per this blog ,, my processing sequence in communication channel is: custom adapter module (module created for converting xml to pdf file) -> CallSapAdapter (stores file with pdf extension to an ftp location). I had added audit logs in module and i am able to see them in RWB.
But file created at ftp location contains only name com.lowagie.text.Document6e42c8a3 & also i am not able to open it as PDF.
my last few lines of code are:
document.add(table);
document.close();
String xmlpld = document.toString();
xpld.setText(xmlpld);
inputModuleData.setPrincipalData(msg);
return inputModuleData;
Please help!
thanks,
mayank
hi shabarish,
As i am trying through Custom modules, need to know one thing,
PdfWriter.getInstance(document,oos);
after creating PDF file according to your code, how to set oos stream to inputModuleData, i feel that i am doing something wrong in converting oos to inputModuleData
as of now my code is:
String xmlpld = oos.toString();
xpld.setText(xmlpld);
inputModuleData.setPrincipalData(msg);
return inputModuleData;
Please help!
Mayank
Similar Messages
-
HR: Need to Send the Paysilp as a PDF file through Mail to Employees
Dear All ,
Need to Send the Paysilp as a PDF file through Mail to Employees.
can anyone please suggest any Standard Function Modules which takes the Payslip Form as input and convert it into PDF and can send it through mail to the concern employees.
Can anyone please explain the procedure in detail.
Thanks in Advance,
Regards.venu,
below is code which helps to generate pdf ,,,,hope u know how to use the mail sending function
data:
fm_name TYPE RS38L_FNAM, "Smart Forms: FM Name
sf_name TYPE TDSFNAME
value 'YOUR_FORM_NAME', "Smart Forms: Form Name
P_OUTPUT_OPTIONS TYPE SSFCOMPOP,
P_JOB_OUTPUT_INFO TYPE SSFCRESCL,
P_CONTROL_PARAMETERS TYPE SSFCTRLOP,
P_LANGUAGE TYPE SFLANGU value 'E',
P_E_DEVTYPE TYPE RSPOPTYPE.
data:
P_BIN_FILESIZE TYPE I,
P_BIN_FILE TYPE XSTRING,
P_OTF type table of ITCOO,
P_DOCS type table of DOCS,
P_LINES type table of TLINE,
name type string,
path type string,
fullpath type string,
filter type string,
guiobj type ref to cl_gui_frontend_services,
uact type i,
filename(128).
GET SMARTFORM FUNCTION MODULE NAME ---
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = sf_name
IMPORTING
FM_NAME = fm_name
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
EXPORTING
I_LANGUAGE = P_LANGUAGE
I_APPLICATION = 'SAPDEFAULT'
IMPORTING
E_DEVTYPE = P_E_DEVTYPE.
P_OUTPUT_OPTIONS-XSFCMODE = 'X'.
P_OUTPUT_OPTIONS-XSF = SPACE.
P_OUTPUT_OPTIONS-XDFCMODE = 'X'.
P_OUTPUT_OPTIONS-XDF = SPACE.
P_OUTPUT_OPTIONS-TDPRINTER = P_E_DEVTYPE.
P_CONTROL_PARAMETERS-NO_DIALOG = 'X'.
P_CONTROL_PARAMETERS-GETOTF = 'X'.
****...................................PRINTING.........................
CALL FUNCTION fm_name
EXPORTING
CONTROL_PARAMETERS = P_CONTROL_PARAMETERS
OUTPUT_OPTIONS = P_OUTPUT_OPTIONS
(....) <--- your form import parameters
IMPORTING
JOB_OUTPUT_INFO = P_JOB_OUTPUT_INFO.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
P_OTF[] = P_JOB_OUTPUT_INFO-OTFDATA.
****...................................CONVERT TO PDF...............
CALL FUNCTION 'CONVERT_OTF_2_PDF'
IMPORTING
BIN_FILESIZE = P_BIN_FILESIZE
TABLES
OTF = P_OTF
DOCTAB_ARCHIVE = P_DOCS
LINES = P_LINES
EXCEPTIONS
ERR_CONV_NOT_POSSIBLE = 1
ERR_OTF_MC_NOENDMARKER = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
now you can mail the pdf.
Reward points if helpful
Regards,
jinesh -
Send oracle table to pdf file through forms 6i
please dear sirs,
I want to send oracle table to pdf file through forms 6i
waiting help
thanks in advance
Yasserdear Francois
i use this code which sarah give it to me
and i write as the following put not give me the pdf file
DECLARE
PL_ID PARAMLIST;
BEGIN
PL_ID := GET_PARAMETER_LIST('TEMPDATA');
IF NOT ID_NULL(PL_ID) THEN
DESTROY_PARAMETER_LIST(PL_ID);
END IF;
PL_ID := CREATE_PARAMETER_LIST('TEMPDATA');
ADD_PARAMETER(PL_ID, 'PARAMFORM', TEXT_PARAMETER, 'NO');
ADD_PARAMETER(pl_id, 'DESTYPE', TEXT_PARAMETER, 'FILE');
ADD_PARAMETER(pl_id, 'DESFORMAT', TEXT_PARAMETER, 'PDF');
ADD_PARAMETER(pl_id, 'DESNAME', TEXT_PARAMETER, 'D:\YASSER');
RUN_PRODUCT(REPORTS, 'D:\YASSER\crm02002.rep', ASYNCHRONOUS, RUNTIME, FILESYSTEM, PL_ID, NULL);
END;
pls help me and tell me where is the error which i did
thanks in advance dear -
How to send image file through mail without any attachment
Plz tell me how to send image file through mail without any attachment ( i mean not converting that image into pdf or any format ) i want to send that text or image through mail .
Hi Sandeep,
I think you can setup the type of email in Shared office Settings in transaction S016.
There is an option called <Preset document classes>
You choose this pushbutton to branch to the maintenance screen for the document classes that are directly displayed to users in the Business Workplace for selection when they use the Create function. The name under which the documents are displayed can also be maintained.
http://help.sap.com/saphelp_nw70/helpdata/en/6c/69c30f418d11d1896e0000e8322d00/content.htm
Haven't tried it though.
Regards,
Siddhesh -
Open and print pdf file through form 6i
I want to run and print a pdf file through the form. Any suggestion please......
thanks in advance....
iftiyou could try using the DDE package to open the file
and then print from the actual file location using a host command. -
I have an iPad 2, and I am sending PDF files to my iPad, via a Hotmail account. But, the PDF arrives to the iPad Mail account already opened at the bottom of the email. Is there a way to prevent this auto-opening of the PDF. I've seen screen shots with the box, and PDF listed inside the box, but mine open automatically. I want to get them into iBooks...?
I am having the same problem and it is even bigger.
When opening a 1-page PDF in iBooks and sending it via mail it is sent inline as preview, but the recipient cannot open the file anymore. Also on iPad and iPhone there is no "open in" possible.
Somehow the mail app does destroy the file. What is going wrong? -
Opening a pdf file through form 10g
Dear all,
I have requirement to open a pdf file through my form application.
Ho will i do this?
What is the procedure to do this??
Please help me.
RegardsCan you tell me where the pdf can be found. Through a webserver or inside the database or is the pdf somewhere else?
If the pdf is available through an url you could use web.show_document which can open the url/pdf document in a new browser window.
If the pdf is inside the database you could download the pdf to the client using webutil and then open the pdf document using a host command.
If the pdf is inside the database or by a url you can also use a forms bean. I've used forms bean bean to unload a pdf from the database and show it inside the forms application. Most important when using a forms bean is that the bean component can show all the fonts which are used inside the pdf. There are some free solutions which can not show i.e. bar codes. The are also some paid components which will do the trick.
Regards,
Mark -
I have few PDf files on my computer and I want to add them to my ipod touch, please tell me the procedure on how should I do that? Secondly I want to run these Pdf files through the ibook app, as it also have the Pdf file sections
You should be able to just place them in your Books library in iTunes and check to ensure that your Book library is configured to sync to your iPod when you sync your iPod to iTunes.
-
Not able to send pdf file as attachment in my apple mail.
Hi, I was easily able to attach pdf files to my apple mail. infact I could just open a pdf file and then send it as attachment in the email earlier. but after downloading and upgrading to os X Mountain lion, I am neither being able to attach and send pdf files in my apple mail, nor can I send PDF file as an attachment.
Is there any issue with OS X Mountain Lion.
Issue 1. I compose Email , then click attach > Browse > select pdf file > click attach > it shows in my Email body either as an icon or as first page of the pdf document > I send it. >>> But when the receipient opens the Email, that pdf attachment is missing. In fact When I put a cc to my self and I open the Email, the attachment is mssing in the incoming E amil.
Issue 2. I open the PDF document > Click on File > send as attachment in E-Mail > on right, a menu appears where I select the File and click attach> I get a message
The SendMail doesnot know how to talk to your default mail client. Please select a different mail application to use. Attaching a screen shot.
I never had these issues earlier with my Lion OS . but since the time I have upgraded to mountain Lion OS, I am having these issues.
Are these the Mountain Lion issues, how to fix these please.I believe, the software team forgot to put a button for send or share as an attachment to preview.
-
How to Sender PDF file as attachment in Payload?
Hi Experts,
After I done some of PI scenarios, I'm stuck with one of my requirement... In requirement, "Web service" will send request to "SAP ECC 6" in order to get PO document print out in PDF file by call smartform or any form printing as usual.
In my understand, I'm using SOAP adapter as sender and RFC adapter in receiver side, in RFC function, I will call form and generate PDF file by using normal ABAP function, but here, how can I send PDF file as response message of SYNC call from web service.
I try to search and read some of document and blog, some said I can attach file as Payload attachment, but no clear solution or guide to do so.
Here is example blog that I found, I really useful
/people/michal.krawczyk2/blog/2006/04/19/xi-rfc-or-abap-proxy-abap-proxies-with-attachments
Please suggest me in my case,
Thanks in advance...
Cheers,
TerryHi,
>>In my understand, I'm using SOAP adapter as sender and RFC adapter in receiver side, in RFC function, I will call form and generate PDF file by using normal ABAP function, but here, how can I send PDF file as response message of SYNC call from web service.
as per my blog you can attach PDF to a message only if you use abap proxy on ECC and not RFC
the code is just copy and paste from my blog:
/people/michal.krawczyk2/blog/2006/04/19/xi-rfc-or-abap-proxy-abap-proxies-with-attachments
so there is nothing spectacular there
Regards,
Michal Krawczyk -
.pdf file changed into .tmp when trying to send pdf file as attachment
Dears,
A few days now, .pdf files are exported as .tmp files if we try to send them as attachment directly from the adobe reader plug-in in internet explorer 8.
Unfortunatly Outlook interprets .tmp files as harmfull, so we are no longer able to send pdf files directly.
(screenshot in attachment)
Is there any chance we can configure this so, pdf files are exported as .pdf instead of .tmp
More details:
OS : Win XP SP3
browser : ie 8
plug in : Adobe PDF Link Helper (not sure this is the one that provides us the pdf reader functionallity dough)I cannot reproduce that (Adobe Reader 11.0.3, IE8, Win XP-SP3). In fact, I cannot even see the Attach to Email option, but the file name is correct.
-
Hello,
I try to send pdf file as attachments file to mail with XI.
I use with this blog
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6d967fbc-0a01-0010-4fb4-91c6d38c5816
My problems is:
1. to all mails that I send have another e file Untiteld.doc, how I can avoid this file?
2. When I received the pdf file I not succeed to open it I received the message:
Adobe reader could not open 'elad.pdf' because it is either not supported
File type or because the file has been damaged (for example, it was sent as an
Email attachment and wasn't correctly decoded)
Regards
Elad Peleghi
ref this
Receiver Mail Adapter message with PDF attachment
PDF attachment in mail adapter
File adapter with attachment to mail
File with attachment to mail scenario
File To Mail Scenario With An Attachment -
Unable to send or create a link to send pdf file since update to Yosemite.
Unable to send or create a link to send pdf file since update to Yosemite.
Hi Donald S Matheson,
Are you still facing this issue?
May i know which application or service you are using. Can be more precise and provide me the steps to check the behavior at my end.
Regards,
Ajlan Huda. -
Sending PDF attachment through EMAIL Triggering
Hi,
Could you plaese let me know How to send Pdf Attachments
through Email in SAP.
Using Function Module SO_NEW_DOCUMENT_ATT_SEND_API1.
Regards
BhuvanaHi,
GP does not involve any sort of coding.
Just like workflow, GP has a flow desgined in a process.
Each step has a callable object associated with it.
Check [this|http://help.sap.com/saphelp_nw04s/helpdata/en/0f/619fd378a641b29386063019c24fc4/frameset.htm] link for details
-Ashutosh -
Merging PDF files through a script
Hi everyone,
I want to merge a couple of PDF files
through a script, because i have to do
it for a good number of them every time
I get them sent.
I was wondering, does Reader have a
command that can be called in the command
line in order to merge this pdf files through
a script.
Ted.Reader can do very few things besides being a reader. If you wanna merge PDF files, use a PDF merger.
Maybe you are looking for
-
Ok, this is screwed up. I have a 3G iPod and it has been working great. The battery got screwed up once so I bought one from techrestore.com, put it in myself and it has been working great. Now two nights ago I tried to hook my iPod up to my computer
-
Claim My Reward browser security error
I experienced an issue today after printing with my Officejet Pro 8610. Immediately after printing a dialog window popped-up calling on me to Redeem your HP Reward! I read the dialog and chose to click the Claim My Reward button. After some processi
-
What happened to my Trash?
Hi, I have what is probably an extremely trivial question but I did a google search and wasn't able to find a remedy. When I delete a file or choose to "Move to Trash," it prompts me: "The item "insert item name" will be deleted immediately. Are you
-
Using function RS_SEND_MAIL_FOR_SPOOLLIST
Hi gurus, i just want to use function RS_SEND_MAIL_FOR_SPOOLLIST with message: 'problem to update sales orderu2019. can you please suggest me what values to be passed to this function. In this function spoolnumber and user is not manditory. so how it
-
New features of process chains in BI.7
Hi, I want New features of process chains in BI.7.Any one give the list that u have avail. Thank you. sekhar..