How to upload and store attachments to an object in ABAP Webdynpro ?
Hi all,
I would like to upload file attachments of various types to a document within SAP (in this case Expense Reports), using Webdynpro ie. The attachment belongs to a particular expense report. So each document , whether Word, Text, Bitmap etc. would be accessible thereafter by an Expense Report number.
In SAPGUI, we have the powerful function module GOS_ATTACHMENT_LIST_POPUP which takes a user-defined object key to create and change documents.
I'm trying to find an equivalent interface for this in WDynpro. I looked at the component WDK_POWL_WF_DETAIL, but this seems to be suited to Workflow. Can anyone out there give some further tips or examples around this ?
Regards,
Gabriel
Upload using the com.oreilly.servlets package- I don't recall the exact method for using this but it is pretty easy.
Check the file size and type on upload. Only accept gifs and jpgs smaller than 50k (standard for web- go above this if you like but will take time to download and possibly annoy users.)
Use AWT to create standard size thumbnails of the pictures or to standardize them so they will fit on the page properly.
Write the images to the requisite directory. I would suggest giving them a name which matches them directly with the record id number (such as catalogueitem1.jpg) or submit the image name to the database.
If you are serving on Unix you will need Xvfb or something like it running on your server for AWT to work.
To display it just take the value from the database and add it to the filename, e.g. :
<img src="/catalogue/catalogueitem<%=databaseid%>.jpg">
I'm afraid the code I do this with at the moment is very poor and you will do a lot better with a little research into the topic than trying to follow what I have written.
Similar Messages
-
How to upload and store pic in database through Servlet
Hi
I am new to servlet programming. I need some help i am developing shopping cart of pictures
I have problem in admin module
When admin upload new picture and description of picture
i want to store information of uploaded picture in database so that user can view new photographs for shopping
Now problem is that how to upload and store picture in database and how to retrive picture from datebase and disply on user end
I am in great difficulty
I need some sample code
Can some one help me
I shall be very thankfulUse BLOBS to upload and download image files into the database....
Here is a sample code for doing it from one of my earlier posts....
http://forum.java.sun.com/thread.jsp?forum=31&thread=143837
Once you get the file from the database, use the image tag in HTML to display your picture....
Let me know if you have any further questions.... -
Display and Manage Attachments of Generic Object Services in Webdynpro
Hi All,
I need to have a button in the webdynpro that when a user clicks it will pop up a table that display a list of files already attached to a Generic Object Services(GOS) and also allow the user to delete the attachments and upload new attachments.
Can anyone advice me of any Function Modules or Methods that i can use to achieve those functions (retrive and display attachments in the GOS, delete existing attachment from GOS, upload new attachment to GOS).
Thanks and Regards,
weilongHi
You need to pass parameters as per the code below
****Data Types
CONSTANTS:lc_dokob TYPE dokob VALUE 'KNA1',
lc_dokar TYPE dokar VALUE 'LEG',
lc_dappl TYPE dappl VALUE 'BVO',
lc_sign TYPE c VALUE 'I',
lc_option(2) TYPE c VALUE 'EQ',
lc_docpart(3) TYPE c VALUE '000',
lc_docversion TYPE dokvr VALUE '00',
lc_status TYPE dokst VALUE 'AL',
ls_attc-doknr TYPE doknr,
ls_return TYPE bapiret2,
*****Function Module
CALL FUNCTION 'BAPI_DOCUMENT_DELETE_DIRECT'
EXPORTING
documenttype = lc_dokar
documentnumber = ls_attc-doknr
documentpart = lc_docpart
documentversion = lc_docversion
IMPORTING
return = ls_return.
Thanks
Vishal -
To upload and store documents in SAP
Hi,
Can anyone help me as to how to upload and store documents directly into SAP , something similar to attaching documents in standard SAP transactions.
Thanks,
Ketan.Hi,
Use tcode CV01N to create/CV02N (change)/CV03N to Display. U may require to do little bit config.
If helpful pl reward.
Cheers. -
How to upload and download a files into AL11 directory in ABAP
Hi,
How to upload and download a files into AL11 directory in ABAP
thanks
Moderator message: please search for available information/documentation.
Edited by: Thomas Zloch on Mar 21, 2011 9:18 AMYou should try one of these forums for an answer to your question:
http://swforum.sun.com/jive/forum.jspa?forumID=116
http://community.java.net/netbeans
http://linux.java.net -
How to upload and share document from pages
how to upload and share document from pages app?
Hello dannafromfl,
Documents can be shared via File Sharing to iTunes or via Email.
Pages for iOS (iPad): Send and receive documents in email messages
http://support.apple.com/kb/PH3564
Pages for iOS (iPhone, iPod touch): Share documents by connecting to your computer
http://support.apple.com/kb/PH3598
Cheers,
Allen -
How to upload and publish iphoto slide show to icloud
how to upload and publish iphoto slide show to icloud on mac book pro
Just log into your MobileMe account and go to your iDisk and delete the iWeb site that is there.
You can load your other site there by simply dropping and dragging your files for your new site to the Sites folder on your iDisk. Alternatively, MobileMe uses webdav so you can use Cyberduck to publish too. -
How to upload and download any file from plsql through weblogic server
hi all,
how to upload and download any file from plsql through weblogic server? i am using oracle 10g express edition and jboss.
Thanks and Regards,
MSORAhi bala ,
for a windown server u can use VNC (virtual network connection) which opens a session on u r desktop later u can drag and drop form there vice versa and for a linux box you can use Win SCP which helps to open a session with interface to u r desktop in both cases you can upload and down load files very easiy just as we drag and drop items in a simple pc .. we use the same technique...
bye
vamshi -
How to select and store the dynamically clicked values in the checkboxes?
Hi Gurus
How to select and store the dynamically clicked values in the checkboxes?
Scenario:-
I am having a tree structure but I am not getting that user has clicked the which nodes.
So how to do it.
Pls.Hi,
Once again, this is dependent on what your implementation expects. It would seem that your implementation is expecting all of the API to be coded in Java Card so it would make sense that you would load these packages like any other package. Loading an applet is not a special case, it just has an extra step of installing instances of it (and can actually be installed). Any other Java package just needs to be loaded. As such, just load your CAP files for each package of the API before loading any code that depends on it.
Cheers,
Shane -
How to upload and checkin oracle objects(tables,functons etc)
we are using scm repository and uploading and chicking in
oracle forms and reports . want to know the steps to upload and check in oracle database objects like tables,functions,procedures etc which we already have in our database.
plz help us .Rashid,
for all structured objects you need Oracle Designer as frontend to SCM Repository. In Designer use the design editor und choose from the GENERATE Menu the item CAPTURE DESIGN OF. There you will find SERVER MODEL.
regards
Rainer -
How 2 upload Master Data 4 a Info Object in BI 7.
Hi,
I have to load Master Data to a Info Object in BI 7 ( Like Diret Update in 3.5 )
How 2 upload Master Data 4 a Info Object in BI 7.
Dont suggest me to " Insert Characteristic as Data Target".
Points assured.
Thank you.hi...chk these steps..
Uploading of master data
Log on to your SAP
Transaction code RSA1LEAD YOU TO MODELLING
1. Creation of Info Objects
In left panel select info object
Create info area
Create info object catalog ( characteristics & Key figures ) by right clicking the created info area
Create new characteristics and key figures under respective catalogs according to the project requirement
Create required info objects and Activate.
2. Creation of Data Source
In the left panel select data sources
Create application component(AC)
Right click AC and create datasource
Specify data source name, source system, and data type ( master data attributes, text, hierarchies)
In general tab give short, medium, and long description.
In extraction tab specify file path, header rows to be ignored, data format(csv) and data separator( , )
In proposal tab load example data and verify it.
In field tab you can you can give the technical name of info objects in the template and you not have to map during the transformation the server will automatically map accordingly. If you are not mapping in this field tab you have to manually map during the transformation in Info providers.
Activate data source and read preview data under preview tab.
Create info package by right clicking data source and in schedule tab click star to load data to PSA.( make sure to close the flat file during loading )
3. Creation of data targets
In left panel select info provider
Select created info area and right click to select Insert Characteristics as info provider
Select required info object ( Ex : Employee ID)
Under that info object select attributes
Right click on attributes and select create transformation.
In source of transformation , select object type( data source) and specify its name and source system Note: Source system will be a temporary folder or package into which data is getting stored
Activate created transformation
Create Data transfer process (DTP) by right clicking the master data attributes
In extraction tab specify extraction mode ( full)
In update tab specify error handling ( request green)
Activate DTP and in execute tab click execute button to load data in data targets.
4. Monitor
Right Click data targets and select manage and in contents tab select contents to view the loaded data. Alternatively monitor icon can be used.
hope this helps.. -
Reg File Upload Object in abap Webdynpro
Hi Friends,
Would like to enquire one doubt in the file upload object in abap webdynpro.
By default when we press the browse button, near to the file name there is a button which shows the the file types like:
., *.html, ,gif,.jpeg etc.
Is there any way we can control that, as i have an requirement where in to upload only certain extension types.
thankyou.HI,
I would suggest you to follow this approach :
1. Create a Table in your View in which FileUpload is there.
2. Populate this value with valid file extension.
3. Make it invisible by default.
4. Now when you have entered value in Fileupload and click on Ok button.
5. Check whether Mimetype matches any value in Table.
6. If it is invalid, Throw an error message and mke Table of Valid extension Visible.
Sample code to have Table with Valid entries.
types : begin of str,
valid_ext type string,
end of str.
data : wa type str,
itab type table of str.
wa-valid_Ext = 'EXL'.
append wa to itab.
wa-valid_ext = 'DOC'.
append wa to itab.
lo_nd->bind_Table( itab ).
here lo_nd is your ref to node of Table having valid extensions.
7. Bind this Table's Visible property wiht wdui_visiblity .
8. Set it Visible - 02 , Inviisible - 01.
I hope it is clear. -
How to upload and display image using bsp application
hi
I just wants to know that
1- how to upload image from BSP page with attachment into sap server .?
2-how to display image in to BSP page(webpage).
thanksHello Gupta Prashant,
Just to upload and display an image, import image in MIME repository. Not only still images but also flash files can also be uploaded in the MIME repository. Once you import the image in it, use normal html code for image call;
<img src = "file.jpg/gif" width= height=>
Besides it, if your requirement is to store the image in the database and fetch it based on specified field-name, then you have to go for BLOBs i.e Binary Large Object, using this you can also store images, videos, pdfs, applications in the database.
MBLOB - Medium BLOBs store videos and pdfs,
LBLOB - Large BLOBs store movie files and applications.
You have got 2 ways to use it; some databases store BLOB objects into themselves and some store the path of the BLOB object maintained on the FTP server.
You can also implement it in ABAP;
read the following link and practice the tutorial;
[ Use of MIME Types|http://help.sap.com/saphelp_45b/helpdata/en/f1/b4a6c4df3911d18e080000e8a48612/content.htm]
also check this
[TYPES - LOB HANDLE|http://help.sap.com/abapdocu/en/ABAPTYPES_LOB_HANDLE.htm]
And looking at your question, in order to upload an image, you can make use of FILEUPLOAD tag provided by HTMLB.
Step 1: FILEUPLOAD provides a browse button to choose desired image file.
Step 2: Store that image in database using BLOBs.
Step 3: Retrieve the image using normal select query and display it on the screen.
Hope it helps you,
Zahack -
How to upload and edit an eps file
Hi all,
I have just downloaded an eps file from shutterstock and they given me this free trial idea with adobe but unfortunately i have got no idea how to upload my file and edit it and save it as a jpg file for further work. can anyone help me pleaseyou can use adobe illustrator to open that file.
-
How to upload and Download the file in a system through java programing
I am trying to upload a file as well as want to download the uploaded file in my system....I don't have any server an all.
I want to implement this in my system only .
I got this code but i don't know ,where i have to make the change and what are the parameters i have to pass.
can any one help me on this code ....please
here some piece of code
File Upload and Download Code Example
package com.resource.util;
public class FileUpload
public void upload( String ftpServer, String user, String password,
String fileName, File source ) throws MalformedURLException,
IOException
if (ftpServer != null && fileName != null && source != null)
StringBuffer sb = new StringBuffer( "ftp://" );
// check for authentication else assume its anonymous access.
if (user != null && password != null)
sb.append( user );
sb.append( ':' );
sb.append( password );
sb.append( '@' );
sb.append( ftpServer );
sb.append( '/' );
sb.append( fileName );
* type ==> a=ASCII mode, i=image (binary) mode, d= file directory
* listing
sb.append( ";type=i" );
BufferedInputStream bis = null;
BufferedOutputStream bos = null;
try
URL url = new URL( sb.toString() );
URLConnection urlc = url.openConnection();
bos = new BufferedOutputStream( urlc.getOutputStream() );
bis = new BufferedInputStream( new FileInputStream( source ) );
int i;
// read byte by byte until end of stream
while ((i = bis.read()) != -1)
bos.write( i );
finally
if (bis != null)
try
bis.close();
catch (IOException ioe)
ioe.printStackTrace();
if (bos != null)
try
bos.close();
catch (IOException ioe)
ioe.printStackTrace();
else
System.out.println( "Input not available." );
}At least that is what the code you posted suggests to me.It looks like that to me too.
I believe that
URLConnection urlc = url.openConnection(url);Will return you an FTP URLConnection implementation if you pass it a ftp:// url
So for simple FTP ops, you don't need any external libs.
Actually, looking at your code, this is already what you are doing, so I really don't get this:
am not using FTP server..... i want to implement in my system only ....So How i will do.
Can you give me any idea based on this code Can you explain a bit more what you need?
patumaire
Maybe you are looking for
-
Stuck on Disk 2 install- Tiger install- Please help
I received a bad disk #2 with my mac pro, and am unable to install tiger (then upgrade to leopard ). Apple sent a replacement dvd, but because my system is still looking for "disk #2" this isn't working. Is there a way to bypass this install and star
-
Why I can't open a sticky note with my PC
I have created a sticky note with my iPhone, but when I access the file through my PC, I can't open it. Why?
-
Final Cut Pro X and Canon LEGRIA HF M41
Hi, I need to change my video camera set-up but can't afford to make the jump to pro cameras yet so I am looking at the Canon LEGRIA HF M41's but I can find any info on how well they work with FCP-X. Is the importing seamless or do you have to transc
-
Adding multiple components in same direction ?
Hi, I'm adding multiple child panels to a single parent panel. One of such child panel is "xPanel" as shown below. The problem is that all the 4 labels overlap each other i.e. main Panel only displays "11111" i.e the last JLabel added. I know that sp
-
Flags and Monsters on my screen saver!!!
I have my screen saver set to flashing up random pictures from iPhoto, and ever 10-20 pictures or so, I get a random picture of a different flag of the world, or sometimes an animated "cartoon monster" looking thing. What should I do?????