Excel Upload via Web dynpro ABAP
Hi All,
Could any one please explain how to upload MS Excel file in Web Dynpro ABAP?
Regards,
Surya
Hi Surya,
Ya Excel upload is not supported some times.
You can save your excel sheet as "Tab Limited" file. Then you can easily upload the file contents to your WebDynpro.
Thanks.
Similar Messages
-
Hi all
I have got a requirement wherein i need to upload excel in Web Dynpro.
Currently we are trying to upload an excel file in our WDC. However it gives an error (Error occurred during character conversion) and dumps while converting the data to xstring format.
It converts csv files successfully, but we must have excel file conversion.
If anyone before has worked on this kind of requirement or if has got any ideas then please share the same.
Thanks,
ShantanuHi Shantanu,
Firstly , convert the uploaded data in XSTRING format into STRING format using FM u2018HR_KR_XSTRING_TO_STRINGu2019 .
Then using the utilities cl_abap_char_utilities , convert string into horizontal tabs and bind the data accordingly.
I hope this helps.
With Regards,
Vipin. -
Unable to perform Calculations on Excel exported from Web Dynpro ABAP
Hi Gurus,
I have a custom functionality "Export to Excel" internal table data on my web dynpro application. I dint go with standard ALV feature because it doesnot give flexibility to add colours to excel sheet and add multiple tabs and so i had to write XML ABAP coding in the web dynpro application to achieve this. While passing the internal table data into cells, i created cells with string data type and hence all the fields in the excel are now in char type. Users are unable to perform any calculations because of this issue, i tried to format the cells but it doesnot work. Please help me.
Regards,
Pravs.Hi,
Just do the following in excel before downloading and check whether it works.
Tools->Options->International tab.
In that mention decimal separator as ,(comma).
Thousand separator as .(dot).
Uncheck use system separators. -
File Upload in Web Dynpro ABAP not using File Upload UI element
Hi all ,
I have searching for a way to upload a file using the file open dialog ( or even by manually specifying the path/file name) without using the file upload UI Element in ABAP web Dynpro . The File Upload UI element works for smaller files however with large file sizes 64 MB , the system seems to be running of memory (SYSTEM_NO_ROLL) . This is due to a known fact that the UI element makes a duplicate copy of the whole copy while it does the upload.
I have been looking at the ACFUPDOWNLOAD as a way to solve this problem but cannot seem to figure out how it works , even the sample program provided by SAP does not work. I am working with a regular abap server and not kpro( knowledge mananagement provider) or portal .
Any help would be greatly appreciated.
thanks,
Ali.If you are on NetWeaver 7.01, you can try both the ACFUpDownload UI element or try creating your own FileUpload in Adobe Flex with Flash Islands. ACFUpDownload requires the KPRO by default (which is why the same application isn't working for you), but you can write your own handler class to act as the KPRO receiver. Here is an eLearning on the topic:
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/109b9b52-bc00-2c10-8786-e4c5e96d7e04
and source code:
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70645070-bb00-2c10-f086-f126721acdb4
If you want an eLearning on the FlashIslands approach, you can find it here as well:
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50d42644-91ef-2b10-228c-9e0ae75b274e
and Source Code:
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f044b62c-90ef-2b10-64a6-9ec25294d133
However in both of these approaches you still have to be careful with how you handle large files. The problem is that they are processed often a single binary string. This makes the processing easy, but requires total amount of session memory at least as large as the file being uploaded. In NetWeaver 7.02 ABAP adds the concept of Streams and Locators to help with the partial processing of large files. This feature doesn't come until later this year, but if you are interested you can learn about it here:
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/80f983df-213e-2c10-ba89-b5a12ef178e8 -
Hi all,
I want to use Ole2 object in my web dynpro. But i doesn't works.
I think that i need to use [OfficeControl|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/d1/af8841349e1909e10000000a155106/frameset.htm].
I know how to use OLE2, but I don't know how to begin with this...
Do you know any manual or you can give an example to use?
I want to create an excel cell by cell by code.
Thanks in advance.Finally i use an iview for call a transaction to do it...
-
Uploading excel file in Web Dynpro for ABAP
Hello Gurus,
I need to upload a excel file in my Web Dynpro (ABAP) program. Can anyone please tell me how do i do this. Kindly help.
Regards,
Aditya.Hi Aditya,
Please search the forum...
Please check this link
Uploading Data from Excel File To Dynpro
Excel Upload via Web dynpro ABAP
Upload and Reading Excel File in Web Dynpro
Best regards,
raam -
Unable to upload File to DMS (Document Managemt Sys) Via web Dynpro App
Hi .
I want add file to DMS i,e, SAP Document Management System .
I first tried calling BAPI : BAPI_CREATE_DOCUMENT2 in Report and I was successfull.
I am trying out same thing via Web Dynpro Application but I am getting error in Return of BAPI .Error is Error while checking in and storing: C:\Documents and Settings\Desktop\Hi.doc.
I am pasting code I have written on click of Upload .
method ONACTIONON_UPLOAD .
implicitly available data objects
wd_Context type ref to if_wd_context_node.
wd_This type ref to if_FileUpload.
DATA: gv_documento TYPE draw-doknr ,
gv_clase TYPE draw-dokar VALUE 'Z99' ,
gv_version TYPE draw-dokvr VALUE '00',
gv_part TYPE draw-doktl VALUE '000',
gv_descripcion TYPE drat-dktxt VALUE 'Description111',
gv_return TYPE bapiret2,
filename(60) type c ,
lt_documentdata TYPE STANDARD TABLE OF bapi_doc_draw2,
ls_documentdata LIKE LINE OF lt_documentdata,
lt_characteristicvalues TYPE STANDARD TABLE OF bapi_characteristic_values ,
lt_classallocations TYPE STANDARD TABLE OF bapi_class_allocation ,
lt_documentfiles TYPE STANDARD TABLE OF bapi_doc_files2 ,
ls_documentfiles LIKE LINE OF lt_documentfiles ,
lv_content type xstring ,
size type i.
DATA lo_el_context TYPE REF TO if_wd_context_element.
DATA ls_context TYPE wd_this->element_context.
DATA lv_filename LIKE ls_context-filename.
get element via lead selection
lo_el_context = wd_context->get_element( ).
get single attribute
lo_el_context->get_attribute(
EXPORTING
name = `FILENAME`
IMPORTING
value = lv_filename ).
ls_documentdata-documenttype = 'Z99'.
ls_documentdata-documentversion = '000'.
ls_documentdata-documentpart = '00'.
ls_documentdata-description = 'Test Document Created Parag'.
ls_documentdata-STATUSEXTERN = 'WR'.
ls_documentdata-USERNAME = 'I046361'.
ls_documentdata-WSAPPLICATION1 = 'DOC'.
ls_documentdata-DOCFILE1 = lv_filename.
ls_documentdata-DATACARRIER1 = 'DEFAULT'.
ls_documentfiles-wsapplication = 'DOC'.
ls_documentfiles-docfile = lv_filename.
ls_documentfiles-storagecategory = 'DMS_C1_ST'.
ls_documentfiles-checkedin = 'X'.
APPEND ls_documentfiles to lt_documentfiles.
CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
EXPORTING
documentdata = ls_documentdata
pf_http_dest = 'SAPHTTP'
IMPORTING
return = gv_return
TABLES
documentfiles = lt_documentfiles.
IF gv_return-type CA 'AE'.
WRITE gv_return-message.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
ENDIF .
endmethod.
Now Can anyone tell
In case of Web Dynpro what Is this code right ?
Do I need to change value of Parameters I have Set ?
Do i need to some change as I am trying to Upload file Via WebApplication ?
Do I have to change data Carrier ?
Please let me know urgently .Points will be surely Given ...
Regards ,
ParagHi ,
Finally I was successfull in Uploading Docs.It seems I was not getting right Parameters ..anyways correct code is as follows ...
method ONACTIONON_UPLOAD .
implicitly available data objects
wd_Context type ref to if_wd_context_node.
wd_This type ref to if_FileUpload.
DATA: gv_documento TYPE draw-doknr ,
gv_clase TYPE draw-dokar VALUE 'Z99' ,
gv_version TYPE draw-dokvr VALUE '00',
gv_part TYPE draw-doktl VALUE '000',
gv_descripcion TYPE drat-dktxt VALUE 'Description111',
gv_return TYPE BAPIRETURN ,
gv_return TYPE BAPIRET2 ,
gv_ruta TYPE bapi_doc_files2-docfile VALUE 'C:\BAPI_DMS.doc' ,
filename(60) type c ,
lt_documentdata TYPE STANDARD TABLE OF bapi_doc_draw2,
ls_documentdata LIKE LINE OF lt_documentdata,
lt_characteristicvalues TYPE STANDARD TABLE OF bapi_characteristic_values ,
lt_classallocations TYPE STANDARD TABLE OF bapi_class_allocation ,
lt_documentfiles TYPE STANDARD TABLE OF bapi_doc_files2 ,
ls_documentfiles LIKE LINE OF lt_documentfiles ,
lv_content type xstring ,
size type i ,
lt_binary TYPE TABLE OF sdokcntbin ,
ls_binary LIKE LINE OF lt_binary ,
lv_size TYPE I ,
ls_doc_status TYPE CVAPI_DOC_STATUS ,
ls_API_ctrl TYPE CVAPI_API_CONTROL ,
l_MSG TYPE MESSAGES ,
lt_files type STANDARD TABLE OF CVAPI_DOC_FILE ,
lt_drao TYPE STANDARD TABLE OF DRAO ,
ls_drao LIKE LINE OF lt_drao ,
lv_documenttype TYPE DRAW-DOKAR ,
lv_documentnumber TYPE DRAW-DOKNR ,
lv_documentversion TYPE DRAW-DOKVR ,
lv_documentpart TYPE DRAW-DOKTL ,
lv_text TYPE string .
FIELD-SYMBOLS <fs> TYPE ANY.
DATA lo_el_context TYPE REF TO if_wd_context_element.
DATA ls_context TYPE wd_this->element_context.
DATA lv_filename LIKE ls_context-filename .
get element via lead selection
lo_el_context = wd_context->get_element( ).
get single attribute
lo_el_context->get_attribute( EXPORTING name = `FILENAME` IMPORTING value = lv_filename ).
lo_el_context->get_attribute( EXPORTING name = `FILECONTENT` IMPORTING value = lv_content ).
CONCATENATE lv_text 'by' sy-uname 'cretaed at ' sy-uzeit INTO lv_text .
ls_documentdata-documenttype = 'Z99'.
ls_documentdata-documentversion = '00'.
ls_documentdata-documentpart = '000'.
ls_documentdata-description = 'Test Document Created in Web Dynpro ABAP '.
ls_documentdata-STATUSEXTERN = 'WR'.
ls_documentdata-USERNAME = 'I046361'.
ls_documentdata-WSAPPLICATION1 = 'DOC'.
ls_documentdata-DOCFILE1 = lv_filename.
ls_documentdata-DATACARRIER1 = 'DEFAULT'.
ls_documentfiles-DOCUMENTTYPE = 'Z99'.
ls_documentfiles-WSAPPLICATION = 'DOC'.
ls_documentfiles-DOCUMENTVERSION = '00'.
ls_documentfiles-DOCUMENTPART = '000'.
ls_documentfiles-DOCFILE = lv_filename.
ls_documentfiles-description = 'Test Document Created in Web Dynpro ABAP '.
ls_documentfiles-CREATED_BY = sy-uname.
ls_documentfiles-CHECKEDIN = 'X'.
ls_documentfiles-DOCFILE = lv_filename.
APPEND ls_documentfiles to lt_documentfiles .
CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
EXPORTING
documentdata = ls_documentdata
pf_http_dest = 'SAPHTTPA'
IMPORTING
DOCUMENTNUMBER = lv_DOCUMENTNUMBER
return = gv_return
TABLES
documentfiles = lt_documentfiles.
IF gv_return-type CA 'AE'.
WRITE gv_return-message.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING wait = 'X'.
get message manager
data lo_api_controller type ref to if_wd_controller.
data lo_message_manager type ref to if_wd_message_manager.
lo_api_controller ?= wd_This->Wd_Get_Api( ).
CALL METHOD lo_api_controller->GET_MESSAGE_MANAGER
RECEIVING
MESSAGE_MANAGER = lo_message_manager
CLEAR lv_text .
CONCATENATE 'Dcoument ' lv_filename 'Successfully stored with Document No. ' lv_DOCUMENTNUMBER INTO lv_text .
report message
CALL METHOD lo_message_manager->REPORT_SUCCESS
EXPORTING
MESSAGE_TEXT = lv_text
PARAMS =
MSG_USER_DATA =
IS_PERMANENT = ABAP_FALSE
SCOPE_PERMANENT_MSG = CO_MSG_SCOPE_CONTROLLER
VIEW =
SHOW_AS_POPUP =
CONTROLLER_PERMANENT_MSG =
MSG_INDEX =
CANCEL_NAVIGATION =
ENDIF .
endmethod. -
Upload a .xls file in web dynpro abap
Hello,
I want to upload a .xls file into a internal table in web dynpro abap (Netweaver 7.31).
The file is not delimited, is not an csv file.
In my view I have an fileUpload UI Element with the attribute data is un attribute type XSTRING and the following function module are not in my system:
HR_KR_XSTRING_TO_STRING
ALSM_EXCEL_TO_INTERNAL_TABLE
How can I upload the file with this format?.
Thanks in advance.
XaviUnless the files are zipped together into one archive file, you have to do them one at a time. Furthermore with the normal browser based fileUpload UI element, you must do them one at a time and the user must manually select each one (browser security limitation).
If you are on 7.01 you can use ACFUpDown to perform multiple file uploads, but there is no file dialog or directory scan so file selection is difficult.
If you are on 7.02 you can use ACFUpdown and it has a multiple file open/save dialog.
If you are on 7.01 you could use FlashIslands to perform the multiple file upload. I have a tutorial and source code sample for this on SCN.
If you are on 7.01 you could also use ACFExecute to run a batch script on the client side that zips all the files and then upload the zip archive. -
Upload file into KM using Web Dynpro ABAP
Hi, I'm looking at converting an existing Web Dynpro Java application to a Web Dynpro ABAP application. However, I cannot find how to upload a file and store it in the Portal KM repository using WDA. I have been able to do it successfully using WDJ. Any help on how to do this would be very much appreciated. Thanks.
Hi, I'm looking at converting an existing Web Dynpro Java application to a Web Dynpro ABAP application. However, I cannot find how to upload a file and store it in the Portal KM repository using WDA. I have been able to do it successfully using WDJ. Any help on how to do this would be very much appreciated. Thanks.
-
Upload and Reading Excel File in Web Dynpro
Hi all,
I have a requirement in my application( in 04s), where in, i need to upload an excel from a client through a web dynpro application(using fileupload UI) and read each and every the content of that excel file in web dynpro and process the data accordingly.
The format of the excel is fixed and pre-defined.
I went through a lot of blogs, but could not find a direct and exact solution to this requirement.
Please help me.
Looking forward to your contribution
Thank you,
Gita KC.Reading Excel Sheet from Java without using any Framework
Enhanced File Upload - Uploading and Processing Excel Sheets
Reading Multiple Sheets of Excel Sheet from Java
nikhil -
How do we scan for viruses of uploaded excel file in Web Dynpro for JAVA
Hi All,
Please let me know "How do we scan for viruses of uploaded excel file in Web Dynpro for JAVA"
Regards,
Ganga.Hi ,
pl go through this note "Integrating a virus scan into SAP applications 817623 "
SAP Virus Scan Interface
http://help.sap.com/saphelp_nw2004s/helpdata/en/30/42c13a38b44d5e8d1b140794e8e850/frameset.htm
Sample Application
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/6e1c4221-0901-0010-63ba-b1f9459d6e74
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f2681486-0a01-0010-8497-c778eac80da5
Regards
Ayyappparaj -
Excel Export issue in Web Dynpro ABAP
Hello,
We are facing a problem and need suggestion. In one of our WD Abap applications the output is displayed in an ALV table. We have a button (provided by standard ALV functions) to export Excel.
So far so good, but the issue is the amount columns display in the portal show the values as per user default settings. For example 123.456,78 whereas on export to excel it shows 12345.78
Is there some way to export to excel with the users regional settings (same as displayed on portal). So far we check, almost all columns follow the regional user default settings except the amount column. Is there someway we can fix this.
Users mention it worked before but not now. Its difficult to verify this statement now.
Kindly help how we could solve this issue.
Best regards,
Moderator message: please have a look in the separate forum for Web Dynpro ABAP.
Edited by: Thomas Zloch on Dec 19, 2010 9:31 PMHI,
You cannot use GUI classes and methods in web dynpro . That will dump.
Instead you can use file down load UI element or..
If you have the content in xstring format use ATTACH_FILE_TO_RESPONSE method of CL_WD_RUNTIME_SERVICES class.
Regards,
Madhu -
Are ZCI interactive forms available via Web Dynpro for ABAP?
Note 955795 talks about ZCI forms available via Web Dynpro for Java. Is this kind of forms also available via Web Dynpro for ABAP?.
Do ZCI interactive forms work via Web Dynpro for ABAP without the need of ACF?
If available, which support package levels are required?
RegardsHi Mahamed,
I got your problem. You have not done anything wrong.
It is WebAS version which is not supported for this functionality.
But there is solution to this problem
Please refer to the SAP Note number - 1055738.
I think you will get the answer and the scenario described there will match your requirement.
This is a know issues with WebDypro ABAP but this works fine for Java Web Dynpro.
I have also tried for 2 months but finally came to know about it.
Regards
Satya -
Web dynpro abap application on Portal does not work via internet access.
Dear All,
I have created a web dynpro abap application and deployed the same on Portal.
The issue I am facing is that the webdynpro application works fine when the end user logs into Portal from Local Network,
However when the Portal is accessed from outside the local N/W via Internet, Portal is working fine for other applications like ESS
but the web dynpro application dont work.
Is this some configuration issue on the portal / abap development or any workaround is possible.
Regards
Abhinav DagarHi
Please try to use the [HTTP Watch 5.0 Basic |http://www.httpwatch.com/download/] tool to trace that WD Application link from the portal and you can easily find out the problem.
Regards
Prakash T -
Hi,
I am getting an error while uploading an excel file in web Dynpro application. i am using the HR_KR_XSTRING_TO_STRING this function. I am getting the following error message 'Unable to interpret as a number'.First of all, are you sure you know what you are working with here. If this is standard Excel file in the Microsoft binary/propriatery format there is not function module or class in ABAP that can magically just transform this to a character string. You should search the forums as this has been discussed extensively. On that topic, please also do not post duplicate threads. I have already locked your other thread with the same basic question.
Instead of the binary/propriatery format of Excel, the file should be saved on the client as a text based format - like XML or Text Tab Delimited. You can then use several different options on the server to convert the XSTRING to STRING and process the content (becuase it was text based to begin with). You could use CL_BCS_CONVERT, the function modules in the function group SCMS_CONV, or the class CL_ABAP_CONV_IN_CE.
Maybe you are looking for
-
How to get variable value in BI 7.0 Workbook (Excel 2007)
Dear experts, We are creating workbooks with BI 7.0 BEx Analyzer Addon 7.10 (Excel 2007). And we'd like to get the variable value (that are passed to the backend using the variable screen) so that we can reuse it as an input value for planning func
-
Virtual Key Figure in report giving values
Hi Gurus, I have created a Virtual Key Figure on a Multi Provide and completed all necessary user-exit coding. When I run the BEX report for a single material my Key Figure is populating correct values. But when I run the BEX report for multiple mate
-
HOW DO I ACTIVATE MY DOWNLOADED GAMES
I CANT SEE ANY THING ON THE TOOL BAR TO ACTIVATE
-
Pro XI 11.0.10 fails to highlight text. Works fine on 11.0.09
I use Acrobat text highlighting all the time. It continues to work correctly in XI 11.0.09, but is now failing on 11.0.10 Any solution for this?
-
Should I re-install the apps? I also have problems when ipdating existing apps.