Open attachment in WEB UI
Hi,
I have my file in application server and in WEB UI attachment block, the reference is shown as file name. When I click on the file name in attachment block, it should open the file from application server.
I have read the data into an internal table from application server. Can any one suggest how to built the file from internal table (I have file name, file type,etc) and open the file.
Thanks in Advance.
Dear Ginger,
implement the following sample code to achieve this requirement:
I think you have already developed a custom program to do that. Please incoroporate following steps to complete the requirement:
CONSTANTS : c_active TYPE char20 VALUE 'ACTIVE',
c_attach TYPE char20 VALUE 'ATTACH'.
CALL FUNCTION 'CRM_ICSS_GET_MIMETYPE'
EXPORTING
iv_ext = lv_ext " File Extension Type
IMPORTING
ev_mimetype = lv_mime
EXCEPTIONS
mimetype_not_found = 1
OTHERS = 2.
*Passing GUID ,typeid and catid.
ls_business_object-instid = lv_guid. " GUID of the Business Object
ls_business_object-typeid = lv_object_type " e.g Object Type e.g BUS2000126 for Business Activity
ls_business_object-catid = 'BO'.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = file " File Path on the App Server
filetype = 'BIN'
read_by_line = 'X'
IMPORTING
filelength = l_filelength
TABLES
data_tab = res_tab
EXCEPTIONS
OTHERS = 1.
LOOP AT res_tab .
CONCATENATE wf_var_stringx
res_tab-raw
INTO wf_var_stringx IN BYTE MODE.
ENDLOOP.
*********Convert data from xstrinf to binary format*******
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = wf_var_stringx
IMPORTING
output_length = lv_length
TABLES
binary_tab = lt_content_bin.
IF lt_content_bin IS INITIAL.
EXIT.
ENDIF.
lv_temid = ip_temp_id. " File Name which will appear in UI
REPLACE REGEX c_active IN lv_temid WITH c_attach.
wa_properties-name = 'DESCRIPTION'.
wa_properties-value = lv_desc. " File Description
APPEND wa_properties TO ls_properties.
wa_properties-name = 'KW_RELATIVE_URL'.
wa_properties-value = lv_desc_02. " File Name
APPEND wa_properties TO ls_properties.
wa_properties-name = 'MIME_TYPE'.
wa_properties-value = lv_mime.
APPEND wa_properties TO ls_properties.
wa_sdokfilaci-file_size = lv_length.
wa_sdokfilaci-binary_flg = c_x.
wa_sdokfilaci-file_name = ip_temp_id .
wa_sdokfilaci-mimetype = lv_mime .
APPEND wa_sdokfilaci TO ls_file_access_info.
*Attaching the document
CALL METHOD cl_crm_documents=>create_with_table
EXPORTING
business_object = ls_business_object
properties = ls_properties
file_access_info = ls_file_access_info
file_content_binary = lt_content_bin
IMPORTING
error = ls_att_error.
IF sy-subrc <> 0.
IF ls_att_error-type = 'E'.
CALL FUNCTION 'BBP_BAPIRETURN_GET'
EXPORTING
type = 'E'
cl = sy-msgid
number = sy-msgno
IMPORTING
e_bapireturn = wa_att_return.
MOVE wa_att_return TO rt_att_return.
ENDIF.
ENDIF.
Hope this helps.
Thanks
Vishal
Similar Messages
-
OWA - Disable PRINT when opening attachment as Web Page
Hi,
To prevent data leakage in our organization I disabled Direct File Access so our users cant download attachments.
I would like to ask on how to Disable PRINT icon when opening attachment as Web Page in OWA without using RMS.
Regards, Jerome PacificarJerome,,, did you find a solution for this , if yes please mail me [email protected]
Sathya Paul -
Openning a native web browser on Air desktop app
I have developed an desktop air app with aptana studio.
i want to attach a google adsense banner into my air app.
but i got a problem that air app doesn't open a native webrowser.
How can app open a native web browser when click in iframe?The iframe seems to load code from a remote location, and thus this code will be in a remote sandbox, not in the application sandbox, for obvious security reasons. This means that the code inside the iframe will net be able to use the air APIs.
If you can control the content from the remote location, you can use the parent sandbox bridge (http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7f08. html#WS5b3ccc516d4fbf351e63e3d118666ade46-7edd) to make a call from inside the iframe to the main application to open the browser window.
Otherwise, I don't think there's a way for content loaded from a remote location to open native browser windows (this would be a security issue). -
I can not open attached documents sent on my email, sent to me or when I send them to others, ? Why ?
Reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files.
*Press and hold Shift and left-click the Reload button.
*Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
*Press "Command + Shift + R" (MAC)
Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
*Do not click the Reset button on the Safe mode start window or otherwise make changes.
*https://support.mozilla.org/kb/Safe+Mode
*https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes -
CS6: DistributedCOM Error id: 10016 when open pdf from web page in Win8.1
For example here below I've got the issue:
http://modemwifi.it/wp-content/uploads/asus-dsl-n55u.pdf
Adobe Acrobat X pro V 10.1.8:
DistributedCOM Error id: 10016 when open pdf from web page.
Nome registro: System
Origine: Microsoft-Windows-DistributedCOM
Data: 04/11/2013 19:09:19
ID evento: 10016
Categoria attività:Nessuna
Livello: Errore
Parole chiave: Classico
Utente: PC-PIERO\Piero
Computer: Pc-Piero
Descrizione:
Le impostazioni delle autorizzazioni impostazioni predefinite del computer non concedono l'autorizzazione di Attivazione in Locale per l'applicazione server COM con CLSID
{B801CA65-A1FC-11D0-85AD-444553540000}
e APPID
{2EAF0840-690A-101B-9CA8-9240CE2738AE}
all'utente Pc-Piero\SID Piero (S-1-5-21-3453328585-262132574-2759341577-1001) dall'indirizzo LocalHost (tramite LRPC) in esecuzione nel SID del contenitore di applicazioni Non disponibile (S-1-15-2-1430448594-2639229838-973813799-439329657-1197984847-4069167804-1277922394). Per modificare tale autorizzazione di sicurezza, è possibile utilizzare lo strumento amministrativo Servizi componenti.
XML evento:
< Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Microsoft-Windows-DistributedCOM" Guid="{1B562E86-B7AA-4131-BADC-B6F3A001407E}" EventSourceName="DCOM" />
<EventID Qualifiers="0">10016</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x8080000000000000</Keywords>
<TimeCreated SystemTime="2013-11-04T18:09:19.468877700Z" />
<EventRecordID>14806</EventRecordID>
<Correlation />
<Execution ProcessID="768" ThreadID="776" />
<Channel>System</Channel>
<Computer>Pc-Piero</Computer>
<Security UserID="S-1-5-21-3453328585-262132574-2759341577-1001" />
</System>
<EventData>
<Data Name="param1">impostazioni predefinite del computer</Data>
<Data Name="param2">Locale</Data>
<Data Name="param3">Attivazione</Data>
<Data Name="param4">{B801CA65-A1FC-11D0-85AD-444553540000}</Data>
<Data Name="param5">{2EAF0840-690A-101B-9CA8-9240CE2738AE}</Data>
<Data Name="param6">Pc-Piero</Data>
<Data Name="param7">Piero</Data>
<Data Name="param8">S-1-5-21-3453328585-262132574-2759341577-1001</Data>
<Data Name="param9">LocalHost (tramite LRPC)</Data>
<Data Name="param10">Non disponibile</Data>
<Data Name="param11">S-1-15-2-1430448594-2639229838-973813799-439329657-1197984847-4069167804-1 277922394</Data>
</EventData>
< /Event>
How can I solve this problem?
Thanks// I got this from an Action (I�m using Struts)
java.sql.Blob file=(java.sql.Blob)request.getAttribute("PDFfile");
String filename=(String)request.getAttribute("filename");
try{
int iLength = (int)(file.length());
response.setHeader("Content-type", "application/pdf");
response.setHeader("Content-Disposition", "inline; filename=\""+filename+"\"");
response.setHeader("Expires","0");
response.setHeader("Cache-Control","must-revalidate, post-check=0, pre-check=0");
response.setHeader("Pragma","public");
response.setContentLength(iLength);
ServletOutputStream os = response.getOutputStream();
InputStream in = null;
in = file.getBinaryStream();
byte buff[] = new byte[1024];
while (true) {
int i = in.read(buff);
if (i<0) break;
os.write(buff,0,i);
os.flush();
os.close();
} catch(Exception ex){
out.println("Error while reading file : " + ex.getMessage());
}and now it�s running !!! I�m not using response.setContentType(...) and I do this in response.setHeader("Content-type", "application/pdf"). And I use response.setHeader("Content-Disposition", "inline; filename=\""+filename+"\"") instead of response.setHeader("Content-Disposition", "attachment; filename=\""+filename+"\""); -
Open attachements in PDF from mobile
Hello,
I created a PDF with some attached files and links (in fact annotations) to these files:
When I open the PDF from my computer with Acrobat Reader I'm able to open all files either by clicking directly on the "Attachments" column or clicking to the links (annotations).
But when I try to do the same on mobile (iOS, Android or WP) via the Acrobat Reader application, it doesn't work:
I can't access to the attachments column
When I click to the links (annotations), nothing happen
Thank you in advance for your help.
PS: This question was posted on stackoverflow too https://stackoverflow.com/questions/27859349/open-attachements-in-pdf-from-mobile
Gerald.Hi Gerald,
Adobe Reader mobile products (for iOS, Android, Windows Phone) support PDF and non-PDF attachments.
If a PDF document contains attachments, Adobe Reader for iOS shows the attachments icon in the bottom bar.
When you tap the icon, Adobe Reader will display the attachments.
You can tap an individual file to view it in Adobe Reader.
There are three different hyperlink actions that the desktop version of Adobe Reader supports.
Go to a page view (within the same document)
Open a web page
Open a file
Adobe Reader mobile products support the first two but does not support opening a PDF file or any other types.
Please let us know if you have additional questions. Thank you. -
I cant open attachment on my outlook web access using the safari, can anyone help? I tried reinstalling the safari applications and also the MAC Snow Leopard but was not successful. The error message is "Safari can't open this page. Server is not responding please try again. I try and try but to no avail.
Hi,
Might depend on the attachment, ie., .doc .jpg
And check Safari / Preferences - Extensions. If you have any installed, turn that off then try to open an attachment.
Carolyn -
When I download an attachment, it doesn't open in a new window. It goes to my finder, but I must click on an email attachment at least 3 times in order to find it there. Is there a way to change the preferences to simply open attachment in a new window?
http://www.apple.com/feedback/kaywerty wrote:
A rather long winded way of asking if anybody knows if it's possible to have multi-windows open
It's not possible.
Suggestions here -> Apple Product feedback -
Error message says need Adobe reader 8 or 9 installed to open pdfs from web pages yet Reader 9alredy
Error message says need Adobe reader 8 or 9 installed to open pdfs from web pages yet Reader 9 is alredy installed on computer. Is this a 64 bit ossue although I am sure I did not have this problem prior to a replacement hard drive being installed.
What is your operating system, browser?
What is the exact message you are getting? -
Unable to open reports with Web intelligence
Hi there,
We are unable to open reports using Webi Intelligence. Error of "Session is closed(Error: INF)" apears.
I have restarted the SIA and Apache services with no luck.
Version : Business Objects XI3, Edge Series professional
Kind regards,Try changing the idle connection timeout on your Web Intelligence Processing Server to 60 minutes (from the CMC).
If this doesn't work, please add a trace to the Web Intelligence Processing Server (add a -trace to the command line parameters of the server). and post the log for the relevant time period. -
Open Attachment option in Mail opens incorrect invite in Calendar
My issue: if I double click or use the Open Attachment option in Mail for calendar invites, an invite from 2 years ago opens in Calendar for me to accept. If I use the Add to Calendar function, no problem & reads like it should do.
I upgraded to ML about 2-3 weeks ago and Mail was spectacularly painful with the merge from SL not working at all. Calendar seemed to be ok, however this usse has started to appear in the last 24 hours.
Ivites can be accepted no dram using the iPad or my wifes iPhone just seesm to beon the Mac that its a problem.
Any thoughts/ideas/fixes would be great.
Cheers.This link solved the problem
https://discussions.apple.com/thread/4165985?start=15&tstart=0 -
My reader will not open a PDF file that I have downloaded from a government web site (an application form) - it states that the file is not good. I can open on the web site but not from my mac computer.
Maybe this: http://helpx.adobe.com/acrobat/kb/pdf-error-1015-11001-update.html ?
Do you have a link to that document? -
Ever since one of my kids tried to watch football on a website called crichd tv I keep getting pop us come up like Mackeeper and every time i try to open a web page it comes up with Smartsearch rather than google which is my preferred search engine in preferences. I have blocked extensions and changed homepage to google but this Smartsearch keeps overriding. Also a thing called MacKeeper keeps popping up I have followed the instructions to uninstall but the file it says to move to trash from the Applications folder but it simply isn't there or anywhere else. The file to uninstall Smartsearch is also not where they say it is in Library>frameworks>
Very frustrating from going from a perfectly working system to a now very frustrating and annoying pop ups coming uo after every time i open a new web page.
Any help or assistance in this matter would be very much appreciated.
RussYou (or your kids) inadvertently installed adware. You do not need to download or install anything to fix it.
Any tips on how to stop it from happening?
Yes. To learn how to avoid it in the future read How to install adware.
If you require them, Apple's removal instructions are linked in the Recovery Procedure near the end of that document. Read and follow them carefully. Pay particular attention to the easily overlooked passages directing you to restart your Mac when required. -
My Safari quits unexpectedly while trying to open attached files or download?
I had that problems once. My friend reinstalled My IMac for me. It worked. But now it is happening again. Safari quits unexpectedly while I am trying to open attached files or download anything. I hate that. I want that to never happen again. And I don't actually know how to reinstall the system. I am afraid of doing smthing wrong. So I have to call apple or my friend. What is the easiest way and solution for that? What is the reason for this problem?
Thank you.Try the following:
1. Shutdown the computer and then start it up again, see if Safari repeats the problem.
2. Consider the source file, if it is just one or the same ones all the time but other open, the files are the problem and not Safari.
3. Run a permissions repair on the mac. Do this via Applications > Utilities > Disk Utility and select the hard drive (Second Icon with the Hard Drive Name, not the one showing the drive size above it) in the left pane and in the bottom middle click on permissions repair, don'yt worry you won't break the computer. -
The graphic is partially shown. You can see only text and you can't orient yourself.
It's interesting that I can open all these web sites with Internet Explorer without any problems!!!
Maybe you are looking for
-
Returning a table from a stored procedure
hi, i need to return a table from a stored procedure and show it, and come to this, but a don't know hoy to run it, so i don't know if it is right, can anyone help me? uTable out objects_uptime%rowtype as begin select * into uTable from objects_uptim
-
Hello Experts, I would like to pull all Open Sales Orders that do not have purchase orders and are more than 180 days old. I tried the following query but does not seems to work exactly: select t0.DocNum ,t0.DocDate ,DateAdd(Day,180,t0.DocDate) as Du
-
How can I retrieve an ex employees Apple ID password when she can't even remember it? Plus Apple ID used to her company email address, which no longer exists for her. Apple support says it will send an email to her so I can change the password, but I
-
System design for remote control
I just wonder which tech of ni I should use. My system is one data center and some remote DAQ site. The communication is through WAN. It need to - start stop and schedule DAQ card from remote data center - send realtime data back for display - report
-
How do I save 'Reader' pages?
I love the Safari 'Reader' option - removing all the cr*p and clutter from a webpage and just being able to see the text. Safari (5.0.6 on my G4 PB) gives me the option to Mail or Print the Reader page, but I can't Save it. I do save quite a few page