cancel
Showing results for 
Search instead for 
Did you mean: 

after uploading the file how to display that data in webdynpro component

Former Member
0 Kudos

Hi all,

by using file upload ui element the file has been uploaded and now the requirement is after uploading the file if i perform some action on the button that file content data should be displayed in a webdynpro component it may be displayed in a form or it may be displayed in a table how to achieve that functionality kindly help me.

thanks & regards

naveen

Accepted Solutions (1)

Accepted Solutions (1)

ChrisPaine
Active Contributor
0 Kudos

Hi Naveen,

it really depends on what sort of file you have and how you want to display it. If you have an MS Excel or MS Word file, you can use the office integration UI element, if a PDF then the interactive form ui element can be used. If it is a text file, you can probably parse it and display it in textEdit UI element. An HTML file could be served to an IFrame (even if it is officially deprecated in 7.01). Otherwise, it's going to be quite difficult to show the content - but hopefully those options should cover your need?

The main problem that people have is trying to convert the file that has been uploaded into a format where the contents can be read by SAP. Unfortunately there is a very limited library of SAP code for reading/converting various file formats.

Please, please do not hope, or expect to extract out of an MS Excel somefile.xls document any data - it will make some frequent visitors to this forum want to cry...

Cheers,

Chris

Former Member
0 Kudos

hi Chris,

exactly what my requirement is my sales order will be displayed in adobe form ther i have option to upload one file and i have to create one button and in that action the functionality what to be achieved is by clicking on that button the sales order what i have uploaded that should be uploaded in va02 tcode where in that tcode the files can be attached. kindly help me how to proceed

thanks & regards

naveen

Former Member
0 Kudos

Hi Naveen,

If u are Uploading File..Use File Upload UI Element.

1.Data received From File Upload UI Element will in XSTRING Format.

2.Convert XSTRING To STRING using FM

3.SPLIT STRING into different fields by ABAP CHAR UTILITIES..

Thanks,

Naga Prakash

ChrisPaine
Active Contributor
0 Kudos

Hi Narveen - so you are using an offline Adobe form to enter the sales order data? Is it an SAP Adobe Interactive form or just a standard Adobe form?

you then want to upload this form into SAP using your WDA application. You then want to parse the contents of this form so that you can use it in your create sales order process?

Unless you are using an SAP Adobe Interactive form there is no standard way for you to extract the data from the Adobe file. API's do exist for reading the fields of an Adobe form - and have been implemented in SAP as part of the Abobe interactive form framework. You could implement your own - but it would very likely be cheaper to use the SAP standard - even with the licence fees involved.

Good luck in trying to use Naga Prakash's method - I would strongly suggest you remove the flag that his reply solved your issue as just trying to read the plaintext of the Adobe form will not get you very far. Try opening the file you want to view in notepad - as that is what he is pretty much suggesting - can you see your content? I'd guess not!

it is an embarrassment to SCN that this sort of response is so prevalent - why people just don't understand that file in formats like pdf's cannot be read by just converting them to strings and splitting the strings at carriage returns is beyond me.

Chris

edit - in response to a post on another unrelated thread.

What format is the file that you are uploading?

if it is a tab delimited text file, I apologise - yes the methods mentioned will work. You can then take the data and upload it into an Adobe form for output. There are various blogs/articles etc about how to create an output only Adobe form and display in WDA - so I won't go into details.

Chris

Edited by: Chris Paine on Oct 8, 2010 2:53 PM

Answers (1)

Answers (1)

Former Member
0 Kudos

hi nagaprakash,

can u tell which functionmodulw i have to use

Convert XSTRING To STRING using FM

and how to split this functionality

3.SPLIT STRING into different fields by ABAP CHAR UTILITIES.