Upload and Attach file to Service Notificacion through Web Dynpro
Hi,
I need to upload and attach a file (Word, PDF, TXT ...) to Service Notificacion (TX - IW53) through Web Dynpro.
I have used the integration component "File Upload" to obtain the "fileName" atribute. Also, I have used the functions SO_OBJECT_UPLOAD, SO_INSERT_OBJECT and BINARY_RELATION_CREATE_COMMIT.
But have a problem, because the function SO_OBJECT_UPLOAD use the class "cl _ gui _ frontend _ services" and that clash with Web Dynpro.
My question is: how could I resolve that problem?
I look forward to your response.
Thanks
IV_NAME Importing Type STRING
IV_CONTENT Importing Type STRING
IV_CONTENT_HEX Importing Type XSTRING
IS_LPORB Importing Type SIBFLPORB
IV_OBJTP Importing Type SO_OBJ_TP
RT_MESSAGES Returning Type BAPIRETTAB
method save.
data ls_message type bapiret2.
data:
filename type string,
filefullname type string,
mime_type type string,
size type i,
offset type i,
offset_old type i,
temp_len type i,
objname type string,
l_obj_type type so_obj_tp,
hex_null type x length 1 value '20',
l_document_title type so_text255,
file_ext type string,
lt_objcont type standard table of solisti1 initial size 6,
objcont like line of lt_objcont,
lt_ls_doc_change type standard table of sodocchgi1,
ls_doc_change like line of lt_ls_doc_change,
lt_data type soli_tab,
ls_data type soli,
lt_xdata type solix_tab,
ls_xdata type solix,
l_folder_id type sofdk,
ls_object_id type soodk,
l_object_id_fol type so_obj_id,
l_object_id type so_obj_id,
l_doc_info TYPE sofolenti1,
l_object_hd_change type sood1,
l_tab_size type int4,
l_retype type breltyp-reltype,
lt_urltab type standard table of sood-objdes.
get foler
l_folder_id = 'FOL29000000000004'.
call function 'SO_FOLDER_ROOT_ID_GET'
exporting
owner = sy-uname
region = 'B'
importing
folder_id = l_folder_id
tables
path_table =
if iv_objtp = gc_type_file.
size = xstrlen( iv_content_hex ).
get file name and extension
call method split_path
exporting
iv_path = iv_name
importing
E_PATH =
ev_filename = filename
E_PSERVER =
call method split_file_extension
exporting
iv_filename_with_ext = filename
importing
ev_filename = objname
ev_extension = file_ext.
ls_doc_change-obj_name = objname.
ls_doc_change-obj_descr = objname.
ls_doc_change-obj_langu = sy-langu.
ls_doc_change-sensitivty = 'F'.
ls_doc_change-doc_size = size.
offset = 0.
while offset <= size.
offset_old = offset.
offset = offset + 255.
if offset > size.
temp_len = xstrlen( iv_content_hex+offset_old ).
clear ls_xdata-line with hex_null in byte mode.
ls_xdata-line = iv_content_hex+offset_old(temp_len).
else.
ls_xdata-line = iv_content_hex+offset_old(255).
endif.
append ls_xdata to lt_xdata.
endwhile.
set object type relation type and other header info
l_retype = 'ATTA'.
l_obj_type = 'EXT'.
l_object_hd_change-objnam = ls_doc_change-obj_name.
l_object_hd_change-objdes = ls_doc_change-obj_descr.
l_object_hd_change-objsns = ls_doc_change-sensitivty.
l_object_hd_change-objla = ls_doc_change-obj_langu.
l_object_hd_change-objlen = ls_doc_change-doc_size.
l_object_hd_change-file_ext = file_ext.
prepare header
data lt_obj_header type standard table of solisti1.
data ls_header type solisti1.
concatenate '&SO_FILENAME=' filename into ls_header.
append ls_header to lt_obj_header.
clear ls_header.
ls_header = '&SO_FORMAT=BIN'.
append ls_header to lt_obj_header.
change hex data to text data
call function 'SO_SOLIXTAB_TO_SOLITAB'
exporting
ip_solixtab = lt_xdata
importing
ep_solitab = lt_data.
else.
for note
size = strlen( iv_content ).
objname = iv_name.
ls_doc_change-obj_descr = objname.
ls_doc_change-sensitivty = 'O'.
ls_doc_change-obj_langu = sy-langu.
put content into table
offset = 0.
if iv_objtp = gc_type_note.
it's a note
l_retype = 'NOTE'.
l_obj_type = 'RAW'.
l_object_hd_change-file_ext = 'TXT'.
read note content into table
while offset <= size.
offset_old = offset.
offset = offset + 255.
if offset > size.
temp_len = strlen( iv_content+offset_old ).
clear ls_data-line.
ls_data-line = iv_content+offset_old(temp_len).
else.
ls_data-line = iv_content+offset_old(255).
endif.
append ls_data to lt_data.
endwhile.
get title from content , if it's initial
if objname is initial.
read table lt_data index 1 into l_document_title.
while l_document_title+49 <> ' '.
shift l_document_title right.
endwhile.
shift l_document_title left deleting leading ' '.
ls_doc_change-obj_descr = l_document_title.
endif.
else.
it's url (not note)
l_retype = 'URL'.
l_obj_type = 'URL'.
if objname is initial.
split iv_content at '/' into table lt_urltab.
describe table lt_urltab lines l_tab_size.
read table lt_urltab index l_tab_size into ls_doc_change-obj_descr.
endif.
while offset <= size.
offset_old = offset.
offset = offset + 250.
if offset > size.
temp_len = strlen( iv_content+offset_old ).
clear ls_data-line.
ls_data-line = iv_content+offset_old(temp_len).
else.
ls_data-line = iv_content+offset_old(250).
endif.
concatenate '&KEY&' ls_data-line into ls_data-line.
append ls_data to lt_data.
endwhile.
endif.
ls_doc_change-doc_size = size.
l_object_hd_change-objnam = ls_doc_change-obj_name.
l_object_hd_change-objdes = ls_doc_change-obj_descr.
l_object_hd_change-objsns = ls_doc_change-sensitivty.
l_object_hd_change-objla = ls_doc_change-obj_langu.
l_object_hd_change-objlen = ls_doc_change-doc_size.
endif.
save object
call function 'SO_OBJECT_INSERT'
exporting
folder_id = l_folder_id
OBJECT_FL_CHANGE = OBJECT_FL_CHANGE
object_hd_change = l_object_hd_change
object_type = l_obj_type
ORIGINATOR_ID = OWNER_ID
OWNER = USER-USRNAM
importing
OBJECT_FL_DISPLAY = OBJECT_FL_DISPLAY
OBJECT_HD_DISPLAY = OBJECT_HD_DISPLAY
object_id = ls_object_id "l_doc_info-object_id
tables
objcont = lt_data
objhead = lt_obj_header
OBJPARA = OBJECT_PARA
OBJPARB = OBJECT_PARB
exceptions
component_not_available = 01
folder_not_exist = 06
folder_no_authorization = 05
object_type_not_exist = 17
operation_no_authorization = 21
parameter_error = 23
others = 1000.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 into ls_message-message.
ls_message-type = sy-msgty.
ls_message-id = sy-msgid.
ls_message-number = sy-msgno.
ls_message-message_v1 = sy-msgv1.
ls_message-message_v2 = sy-msgv2.
ls_message-message_v3 = sy-msgv3.
ls_message-message_v4 = sy-msgv4.
append ls_message to rt_messages.
return.
endif.
create relation
data l_obj_rolea type borident.
data l_obj_roleb type borident.
MOVE-CORRESPONDING wd_this->ms_lporb to l_obj_rolea.
l_obj_rolea-objkey = is_lporb-instid.
l_obj_rolea-objtype = is_lporb-typeid.
l_obj_rolea-logsys = is_lporb-catid.
l_object_id_fol = l_folder_id.
l_object_id = ls_object_id.
concatenate l_object_id_fol l_object_id into l_obj_roleb-objkey respecting blanks.
l_obj_roleb-objtype = 'MESSAGE'.
clear l_obj_roleb-logsys.
call function 'BINARY_RELATION_CREATE'
exporting
obj_rolea = l_obj_rolea
obj_roleb = l_obj_roleb
relationtype = l_retype
exceptions
others = 1.
if sy-subrc = 0.
commit work and wait.
wd_this->MV_UPDATE_FLAG = 'X'.
else.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 into ls_message-message.
ls_message-type = sy-msgty.
ls_message-id = sy-msgid.
ls_message-number = sy-msgno.
ls_message-message_v1 = sy-msgv1.
ls_message-message_v2 = sy-msgv2.
ls_message-message_v3 = sy-msgv3.
ls_message-message_v4 = sy-msgv4.
append ls_message to rt_messages.
return.
endif.
endmethod.
Edited by: Reyleene Hunt on May 26, 2009 10:05 AM
Similar Messages
-
Uploading and attaching files problem
Dear all,
Since a couple of weeks, I can not attach anything to a mail nor upload any image or file on any website (facebook, fileshare etc.).
The finder always freezes (no matter if it's Mail, Safari, Chrome or etc.) and I have to start the app again. I don't know where the issue comes from and I would appreciate any help on this matter.
I'm under OS X 10.9.2. (Macbook air 13")
Thanks for your help!
RossHistorically, if you wanted to send a UNIX folder via email, you would compress it into a foo.zip file. Apple understood this with Pages ’09 v4.n, when it took a Package (folder), compressed it, and renamed the .zip extension to .pages. All automatically, with general email and filesharing compatibility.
Along comes Pages v5+, with a totally new document architecture that is incompatible with prior Pages versions. To the Finder, it too looks like a file due to Package magic — and yet, in its natural state, is an uncompressed folder. To get this to play nice with Gmail webmail, and non-Apple filesharing services, you have to compress this document (folder) yourself before mail attachment, or placing on your preferred filesharing service. This is achieved by right-clicking the document icon, and choosing compress, which produces foo.pages.zip.
The other work-around is to simply not use Pages v5+, and resume using Pages ’09 v4.3. If you had Pages ’09 v4.3 previously installed, the new Pages installation moved it into /Applications/iWorks ’09. The trick here is that you cannot double-click on a document to open it as Pages v5+ will try to open it. You wil need the right-click contextual menu and Open With... Pages (4.3).
Yes, it is a PITA. -
How do I upload and attach the file to Service Request
[This thread was migrated from the On Demand Developer Forum in the old Siebel Community]
drangineni
New Contributor
Hi,
I am trying to upload a file and add it to a Service object as an
attachement. I greatly appreciate if you could provide any code or
sample...
Thanks.
Daya
Product: CRM OnDemand
10-21-2006 10:58 AM
Re: How do I upload and attach the file to Service Request...
BigSlick
Valued Contributor
On Demand doesn't support adding attachments via web services. One
solution I've seen is depending on the scenario is to create a web link
field on an object that's based on a custom text field. Your web service
can populate that custom field and the web link can generate a dynamic
link to the file in On Demand's UI. However, this depends on where the
attachment is located and if the user needs some sort of firewall access.
Hope this helps
-BigSlick
10-23-2006 11:43 AM
==============================================================================
Click on the board or message subject at the top to return.Yes this still holds ture.
Bardo -
Upload and Manage Files missing from Tools area
We are attempting to set up a new iTunes U site but have hit a roadblock when we get to the point of uploading content. All the instructions say to click on the "Upload and Manage Files" link in the Tools section of the iTunes page, but we have no such link:
END EDITING
EDIT ACCESS
iTunes U SUPPORT
LOGOUT
Looking at screenshots from other sites, it looks like it should be between END EDITING and iTunes SUPPORT somewhere. We have only two users registered and we are both Administrators with full edit and upload privileges as far as we can tell.
What are we missing here?Were you ever able to get this resolved? We have the same issue.
Resolved, yes, to a point. After doing some extensive reading, I was able to determine that our fatal assumption was that the podcast media files would be hosted by Apple. According to at least one source, Apple has not offered hosting to new iTunesU accounts since January 2009.
Therefore, the reason we did not have a button for "Upload and Manage Files" is because there was no place for us to upload them to.
I have successfully attached feeds from both MobileMe and Podamatic and we are in the process of setting up our OS X Server with Podcast Producer. We will host the feeds locally and make them available through iTunes U, blogs and other channels.
--Brad -
Students unable to use Upload and Manage Files
Our students have been unable to use the _Upload and Manage Files_ function since last week. They receive an *Access Denied* message as soon as they click the link. Here is our debug page:
iTunes U Access Debugging
Received
Destination brockport.edu
Identity Empty string
Credentials Student@urn:mace:itunesu.com:sites:brockport.edu:classes:200901-1067-DCC-400-61
Time 1232465069
Signature aee5d3665e6350cb0e87df99810f690f4b7931110e85c4e016a86345cea63c3e
Analysis
The destination string is valid and the corresponding destination item was found.
The identity string is valid but provides no identity information.
The credential string is valid and contains the following recognized credential:
1. Student@urn:mace:itunesu.com:sites:brockport.edu:classes:200901-1067-DCC-400-61
The time string is valid and corresponds to 2009-01-20 15:24:29Z.
The signature string is valid.
Access
Because the received signature and time were valid, the received identity and credentials were accepted by iTunes U.
In addition, the following 2 credentials were automatically added by iTunes U:
1. All@urn:mace:itunesu.com:sites:brockport.edu
2. Authenticated@urn:mace:itunesu.com:sites:brockport.edu
With these credentials, you have browsing and downloading access to the requested destination.
There is a tab with +Drop Box+ access for Students and I even changed the page access to Shared for Students, but nothing has helped.Were you ever able to get this resolved? We have the same issue.
Resolved, yes, to a point. After doing some extensive reading, I was able to determine that our fatal assumption was that the podcast media files would be hosted by Apple. According to at least one source, Apple has not offered hosting to new iTunesU accounts since January 2009.
Therefore, the reason we did not have a button for "Upload and Manage Files" is because there was no place for us to upload them to.
I have successfully attached feeds from both MobileMe and Podamatic and we are in the process of setting up our OS X Server with Podcast Producer. We will host the feeds locally and make them available through iTunes U, blogs and other channels.
--Brad -
Uploading and downloading files from a web app (Urgent!!)
Hi everyone:
I'm developing an application in PL/SQL to upload and download files from an HTML webpage. I congured the document table and the parameters necessary in the DAD of my application.
when I upload the file using my webpage that file info is automatically uploaded to the doc table. This is as far as I have gotten.
I need to do the following:
- Place the uploaded file into a column in another table in my database as part of a text message (think of it as an email message), and delete the file from the doc table (as this is thought to be a temp table that holds the file when uploaded from my webpage)
- Retreive the file so that it can be downloaded from another web page.
The file can be a PDF, WORD DOC, etc...
I now that I can do this with InterMedia but I haven't figured out how :(
Can anyone please point me to an example or some documentation that can guide me through the process.
DB VERSION: 8.1.7
IAS VERSION: 1.0.2.2
Thanks,
Carlos AbarcaThe idea was for you to look at the code and get an idea of how to access the BLOB in the document table. IF you look at the procedure
insert_new_photo( new_description IN VARCHAR2,
new_location IN VARCHAR,
new_photo IN VARCHAR2 )
It shows how to access the blob that is stored in the document table. You can then copy this blob to your own table using the DBMS_LOB package.
Hope this helps,
Larry -
Uploading and Downloading files in an Applicaiton
I was able to successfully upload and download files stored in the database through Application Express by following the how to instructions at -->
http://download-uk.oracle.com/docs/cd/B31036_01/doc/appdev.22/b28839/up_dn_files.htm#CJAHDJDA
QUESTION: Is it possible to retrieve the downloaded file without granting execute to the download procedure? My DBA is requesting that I remove the procedures public grant, but when I do, I can no longer download the file.As long as the Oracle username with the connection has 'execute' on the package 'public' should not need execute. Though I do not use the tools in question so there may be factors I am unaware of, but Oracle wise the connected session needs execute. If can get it from public, a role, or a direct grant. I just say use role based grants or direct grants rather than a public grant to get the privilege.
HTH -- Mark D Powell -- -
Upload the excel file in oracle db through oracle forms
Hi all,
I want to upload the excel file in oracle db through oracle forms...I am new to oracle forms .
I have searched a lot but not getting exact solution
Is there anyone who will help me out with this .....
Any help will be appriciatedI'm trying to move data from excel into an Oracle forms field. This involves coping 2 columns of data cells in excel and pasting it into an Oracle forms field. I can get the date pasted into the Oracle forms field but there is a invisible character that separates the 2 columns of data coming from Excel. I do not know what this character is but it is causing the error 'Line 1 is invalid. Check forms'.
Any ideas how to get pass this?
Thank you -
Minimum version required to upload and download files using Netweaver Gateway
What is the minimum service pack required to use the feature of Upload and download files using netweaver gateway. I already have a SP05
Hi,
as per this blog How to Read Photo from SAP system using SAP Gateway this should be possible with SP05.
also refer How To Upload and Download Files Using SAP NW Gateway SP06
Regards,
Chandra -
Uploading and downloading files in webdynpro java
how to upload and download xl files in webdynpro java application .
Hi ,
Refer these links they maybe helpful to you
You can check this sampple example from SDN
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40db4a53-41a9-2910-d4a2-9c28283f6658
Uploading and Downloading Files In Web Dynpro Java
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00062266-3aa9-2910-d485-f1088c3a4d71
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/202a850a-58e0-2910-eeb3-bfc3e081257f
http://help.sap.com/saphelp_nw04/helpdata/en/43/85b27dc9af2679e10000000a1553f7/content.htm
Uploading and Downloading Files In Web Dynpro Tables
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b0e10426-77ca-2910-7eb5-d7d8982cb83f
Some more links regarding Uploading and DownLoading Files
Uploading and downloading files
Upload and Download file through RFC called by java
Regards,
Saleem -
Our admins don't see "Upload and Manage Files" - even the Primary Admin. Why?
We are setting up our iTunes U site for the first time. NONE of our admins, including the primary admin, can see the "Upload and Manage Files" link in the Tools section, when we are editing a Course page. We can set up Course pages all day long, but we cannot upload content. Obviously this is a show-stopping problem, and so far nobody from Apple has been able to tell us why.
Any suggestions? Thanks in advance,
-- WillGreetings Will;
Are you and your Administrators using iTunes U Public Site Manager to edit your content or does your tools section look like the attached screen capture?
Syd Rodocker
iTunes U Administrator
Tennessee State Department of Education
Tennessee's Electronic Learning Center -
Upload and download file in jdev adf
hi,
i'm still looking for upload and downlaod files in jdev adf
any idea sir
TQHi spnolin,
Can u tell me how to download a file from server, so that the client can get the file. such as click on the link or button, and the pop up windows (save as) appear?
Please tell me in details. if possible provide the example code as well and some explanations.
Thx in advance
FELIX -
Upload and Copy files using PLSQL.
Hi All,
Can UTL package can be used to upload any local data file to server?
Or is there any in-built package which can be used to upload files to servers and copy files to another directory?
Thanks in advance.Avishek wrote:
Thanks.
But i've a requirement to upload and copy files from one directory to another.
How can i approach?Realize we only know what you post & so far you have posted NOTHING useful.
How exactly does end user interact with the DB?
3-tier application?
EndUser<=>browser<=>WebServer<=>ApplicationServer<=>DatabaseServer
What OS name & version for client system?
Handle: Avishek
Email: [email protected]
Status Level: Newbie (5)
Registered: Jun 3, 2008
Total Posts: 68
Total Questions: 27 (16 unresolved) -
Upload and Download Files in an Application
hi,
I'm use Application Express 2.1.0.00.39 and the procedure " How to Upload and Download Files in an Application" :
http://download-west.oracle.com/docs/html/B16376_01/up_dn_files.htm#sthref177
I do not find the following tables or view:
HTMLDB_APPLICATION_FILES or wwv_flow_file_objects$.
which it is my error?
thanks.
LuigiThe documentation was for version 2.2. I could not find a 2.0 version of this howto:
http://download-west.oracle.com/docs/cd/B31036_01/doc/appdev.22/b28839/up_dn_files.htm#CIHCFCHF
However, I did find the correct name of the view for my version, HTMLDB_APPLICATION_FILES
After following the instructions in the above-mentioned "how to" (uploading and downloading files), I am a getting a html 403 error (You are not authorized to view this page) when I try to download from my custom table using the procedure specified in the howto.
I've granted execute on the procedure to public only (as specified in the doco).
err nvm. This has already been answered,
http://download-west.oracle.com/docs/cd/B25329_01/doc/appdev.102/b25309/adm_wrkspc.htm#BEJCGJFJ.
Message was edited by:
user507810 -
Internal Server Error when trying to upload and manage files
The instructor was experiencing this difficulty on Tuesday 1/13, after the notice was closed. I just
went into their site again(1/14/09 2:48pm), launched iTunes U and received the same error after clicking on 'Upload And Manage Files' in their iTunes U page.
I was able to reproduce the same error on our iTunes U site.
https://deimos.apple.com/WebObjects/Core.woa/EditFiles/indiana.eduI have only found two that work correctly. They were created the same way and permissions are the same. I don't know why one works over the other.
/Indiana University/Project Sites/Oncourse Team - FAIL
/Indiana University/Project Sites/SyllabusTest - Success
/Indiana University/Project Sites/CHEN-TES 101 01 - FAIL
/Indiana University/Project Sites/UITS Podcast Team - FAIL
/Indiana University/Project Sites/ePortfolio Playgroun - FAIL
/Indiana University/Project Sites/Testong - FAIL
/Indiana University/SP08 Spring Semester/SP08 IN UITS PRAC 14431 - FAIL
/Indiana University/SP08 Spring Semester/SP08 IN UITS PRAC 14431 - FAIL
/Indiana University/SP08 Spring Semester/SP08 OC DEV C201 DEV2 - FAIL
/Indiana University/SP08 Spring Semester/SP08 IN UITS PRAC 14438 - FAIL
/Indiana University/SP08 Spring Semester/SP08 IN UITS PRAC 14552 - success
/Indiana University/SP08 Spring Semester/SP08 IN UITS PRAC 14392 - FAIL
Maybe you are looking for
-
Strange behavior with Premiere and effects in CS6
Hello I created a PS file with several layers of a subject for a TV show idea i am preparing for a presintation but every time a render my effects are not as i see them., speciffialy the 8-16 point Garbage mattes and keying. The PS files where dragge
-
How to create a new tab to a dialog box in Illustrator CS3 Plug-in?
Hi, Im creating a dialog using Plugin in Visual Studio 2005. I need to add another dialog in tab. For example in the existing sample dialog another dialog Test has to be added.. How this can be done? Anyone guide me..
-
Name/Password not being accepted when trying to install software
New iMac user here. When trying to install new software I get a message "Type your password to allow install of _________ to make changes." I am entering the correct password for my user name, even changed it to make sure. Not able to get through thi
-
OBIEE 11g - Application role migration from DEV to UAT or to PROD
Hello All, there are blogs which mentioned about application role migration from dev to UAT or Prod.. Kindly provide the correct path of below two files which we use for application Role migration 1. system-jazn-data.xml 2. jps-config.xml I have sear
-
Selection screen related problem
Hi All, I have one query for which i am looking for some help. I have one selection screen on which there are two radio buttons namely for upload pricing and download pricing. The thing is that when user select one of those radio button and press F8,