Web dynpro export functionalities
Hi all,
I'm beginning with web dynpro and I would to know if it's possible to send web dynpro's data to Excel.
Thanks to everybody.
Best regards.
Dustin Klerck
Hi Dustin,
in this Blog you can find the solition to your problem:
<a href="/people/subramanian.venkateswaran2/blog/2006/08/16/exporting-table-data-to-ms-excel-sheetenhanced-web-dynpro-binary-cache:///people/subramanian.venkateswaran2/blog/2006/08/16/exporting-table-data-to-ms-excel-sheetenhanced-web-dynpro-binary-cache
In that blog you also find a pre-requisite tutorial:
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/1208c2cd-0401-0010-4ab6-f4736074acc6">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/1208c2cd-0401-0010-4ab6-f4736074acc6</a>
Best regards.
Gianluca Barile
Similar Messages
-
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. -
Exporting content of ALV grid in Web Dynpro for ABAP
Hello Experts
I have a following request which seems to be giving some headaches.
I need to export results from one of the Web Dynpro reports (ABAP) I have developed to the Excel spreadsheet. Results are stored on ALV component. Request is to add header to export file with additional information like report title, selection criteria, date when report has been executed. By default export file contains only column names and data. I have set the header for ALV grid with all extra information I need to be passed to Excel file but it does not seem to be transferred at all.
At the moment I see 2 possible solutions: 1) write my own Excel export 2) use PDF export where it is possible to set header/footer text. None of these solutions are ideal, I'd rather set header in standard Excel export. Is that even possible? Please help.
Regards
Michael
Edited by: Soltuion Manager on Apr 20, 2009 10:08 AM
Edited by: Soltuion Manager on Apr 20, 2009 10:26 AMHello Michael,
I haven't tried using the builtin functionality of ALV to achieve a similar fnctionality as yours but can suggest you a workaround for that. As how you might be already knowing you can try using the CL_WD_RUNTIME_SERVICES=>attach_file_to_response to download the contents into Excel/notepad/word. So just can modify the internal table to contain the extra information that you need. You can use the approach below for using the attach_file_to_response method:
1) First read the table's data into an internal table.
2) Convert the internal table data to STRING format.
3) Now convert it into tab separated format as how desired.
4) Convert this STRING format to XSTRING format
5) Make use of the attach_file_to_response method.
Regards,
Uday
METHOD onactionon_submit .
DATA: lv_node TYPE REF TO if_wd_context_node,
lt_mara TYPE if_main=>elements_mara,
wa_mara TYPE if_main=>element_mara,
lead_selection_index TYPE i,
mara_string TYPE string,
mara_xstring TYPE xstring.
lv_node = wd_context->get_child_node( name = 'MARA' ).
CALL METHOD lv_node->get_static_attributes_table
IMPORTING
table = lt_mara.
LOOP AT lt_mara INTO wa_mara.
CONCATENATE mara_string
wa_mara-matnr
wa_mara-ersda
wa_mara-ernam
wa_mara-matkl
wa_mara-meins
cl_abap_char_utilities=>cr_lf INTO mara_string
SEPARATED BY cl_abap_char_utilities=>horizontal_tab.
ENDLOOP.
** Now you need to add the column headers & the desired extra information through coding to
** mara_string
CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
EXPORTING
text = mara_string
IMPORTING
buffer = mara_xstring.
CL_WD_RUNTIME_SERVICES=>attach_file_to_response( i_filename = 'TEMP.XLS'
i_content = mara_xstring
i_mime_type = 'EXCEL' ).
ENDMETHOD. -
ALV in Web dynpro ABAP - Export option as HTML
Hi All,
I am developing a webdynpro application for which output will be in ALV.
Here the requiremnet is to save the file in HTML format.
But the Standard ALV in web dynpro has only the option to export the result in Excel and PDF.
Could any one suggest or tell me that is there any customized way to add the HTML format option in the ALV.
The output of the ALV should be saved as HTML.
Note: In R/3, The ALV provides us with both Excel and HTML format.
Thanks,
ArunaHi,
You should be looking [http://weblogs.sdn.sap.com/cs/blank/view/wlg/20046?page=last&x-order=date|http://weblogs.sdn.sap.com/cs/blank/view/wlg/20046?page=last&x-order=date]
And also look in code exchange place . -
Export internal table from report to web-dynpro
Hi,
I am trying to export an internal table from a report to my web dynpro pragram however its not working.
Statement used in my report -
EXPORT it_ordbk FROM it_ordbk TO MEMORY ID 'ZORDBK'.
Statement used in my web dynpro program
IMPORT it_ordbk to it_ordbk FROM MEMORY ID 'ZORDBK'.
This dynpro application is being called in HTML container on the screen.
Kindly help.
Cordially,
DanishHi Danish,
do not use export or import in Webdynpro.
try to create a class with global variables and in the report or at the place of Export fille the data .
and next in the place of Import memory to to call the global variable in the webdynpro and fill the internal table
go to se24> create a zclasss-> methods initialize>create a ztable same as export table and also declare in glaobal vairaible
--> next in the webdynpro program -->call the method retrive and push the global data to internal table.
Prabhudas -
How to export my ABAP web dynpro content to another server
Hi,
I need to export my ABAP webdynpro application from one server to New server. Can any one please guide me how to do this.
Regards,
SPK.Hi
You mean transporting your web dynpro comopnent across your landscape, use the transport system.
Web Dynpro Object is like any other object you can transport.
If the destination server is not maintained or is in other networks use this link will be helpful
Import/Export webdynpro ABAP application
Abhi -
Exporting web Dynpro content into ms-word
Hi Experts,
Any one can tell me how to export web Dynpro content (like tables and data etc) into ms-word document.
Any help is greatly appreciated and rewarded.
Regards,
JayHi Varma,
you can follow the thred,
[http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/edc2f3c2-0401-0010-8898-acd5b6a94353]
In this pdf this code is avaliable. please chek it this code
public void Download_Reporting( com.sap.tc.webdynpro.progmodel.api.IWDNode dataNode, java.util.Map columnInfos )
//@@begin Download_Reporting()
byte[] excelXMLFile;
IWDCachedWebResource cachedExcelResource = null;
String fileName = dataNode.getNodeInfo().getName() + ".xls";
try {
// create Excel 2003 XML data as a byte array for the given context node,
// attributes and headers
excelXMLFile = toExcel(dataNode, columnInfos).getBytes("UTF-8");
// create a cached Web Dynpro XLS resource for the given byte array
// and filename
cachedExcelResource = getCachedWebResource(excelXMLFile, fileName, WDWebResourceType.XLS);
// Store URL and file name of cached Excel resource in context.
if (cachedExcelResource != null) {
wdContext.currentContextElement().setExcelFileURL(
cachedExcelResource.getURL());
wdContext.currentContextElement().setExcelFileName(
cachedExcelResource.getResourceName());
// Open popup window with a link to the cached Excel file Web resource.
openExcelLinkPopup();
} else {
wdComponentAPI.getMessageManager().reportException(
"Failed to create Excel file from table!", true);
} catch (UnsupportedEncodingException e) {
wdComponentAPI.getMessageManager().reportException(
e.getLocalizedMessage(), true);
} catch (WDURLException e) {
wdComponentAPI.getMessageManager().reportException(
e.getLocalizedMessage(), true);
//@@end
Here please check it this line cachedExcelResource = getCachedWebResource(excelXMLFile, fileName, WDWebResourceType.XLS);
here you can u put like this cachedExcelResource = getCachedWebResource(excelXMLFile, fileName, WDWebResourceType.DOC);
Here different Options is avaliable please find it
Hope it is help full for u
Regards
Vijay kalluri -
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 -
Export to Excel Problem external DC using Web Dynpro binary cache
Hallo,
I want to export from Web Dynpro to Excel. For this I study the Tutorial "Excel Export Using the Web Dynpro Binary Cache".
The example is running without a problem.
I have create a new DC only for excel export. The name is ExcelExportWD. In this DC I create a Component and programmed the methods of the example. Also I create the View and the Context for it.
This DC is used in other DCs. I put the Component to the public part. After than I make the entry in the used DCs in that DC which I want to use the Excel export. I use the DC ExcelExportWD in the DC ContactsWD.
The ContactsWD is running without a problem.
If I try now to export to Excel I got the following error.
<b>com.sap.tc.webdynpro.services.sal.api.WDDispatcherException: Requested deployable object 'mgi.de/portalscmContactsWD' and application 'ResultGetContacts.xls' are not deployed on the server. Please check the used URL.</b>
In the View of the ExcelExport the name of file is not visible in the URL of the ExcelFileName. The name "ResultGetContacts.xls" is the name of the node which I want to export.
What is wrong? I have try to set a Sharing reference in the ContactWD without success.
An idea ?
Regards
GunterHallo,
I want to export from Web Dynpro to Excel. For this I study the Tutorial "Excel Export Using the Web Dynpro Binary Cache".
The example is running without a problem.
I have create a new DC only for excel export. The name is ExcelExportWD. In this DC I create a Component and programmed the methods of the example. Also I create the View and the Context for it.
This DC is used in other DCs. I put the Component to the public part. After than I make the entry in the used DCs in that DC which I want to use the Excel export. I use the DC ExcelExportWD in the DC ContactsWD.
The ContactsWD is running without a problem.
If I try now to export to Excel I got the following error.
<b>com.sap.tc.webdynpro.services.sal.api.WDDispatcherException: Requested deployable object 'mgi.de/portalscmContactsWD' and application 'ResultGetContacts.xls' are not deployed on the server. Please check the used URL.</b>
In the View of the ExcelExport the name of file is not visible in the URL of the ExcelFileName. The name "ResultGetContacts.xls" is the name of the node which I want to export.
What is wrong? I have try to set a Sharing reference in the ContactWD without success.
An idea ?
Regards
Gunter -
hi everyone,
is it possible, to export and import a web dynpro successfully from one NWDS to another? i tried exporting to file-system and checked everything. as i imported it, mostly everything was missing. no views, models etc.
how do i have to export the web dynpro and how do i have to import it?
regards,
constantinConstantin,
If you have developed the WD application as a DC in your NWDS, you can directly copy the file structure from your repository(..\..\.dtc\LocalDevelopment\DCs\xyz.com\DCName) and paste the same file structure in the destination repository and everything would be restored as desired. On the other note it is always recommended to prepare your WD applications as part of the Development Components(DCs).
Thanks!
Surya. -
Exporting table data to MS-Excel Sheet(enhanced Web Dynpro Binary Cache)
Hi experts,
I am trying to implement the functionality of downloading the contents of a webdynpro screen to excel sheet. In order to implement the functionality of excel download i used the following blog.
[/people/subramanian.venkateswaran2/blog/2006/08/16/exporting-table-data-to-ms-excel-sheetenhanced-web-dynpro-binary-cache ]
In this blog they have used javaexcel api to implement the excel functionality. I face some problems
while implementing it.
i) The use of "Label label = new Label(0, 2, "A label record");
sheet.addCell(label); " is not supported. It says that a constructor for label with
(int, int, str) parameter is not available.
ii) Then i implemented it with "Label label = new Label("A label record"); " Then i deployed it. I got a runtime exception saying that " java.lang.ClassNotFoundException: jxl.format.CellFormat ".
This cellFormat is an interface available in the jar. I am using jexcelapi_2_6_9_1.4 version. Do i have to
download some other versions.
Please help. Thanks in advance.
Regards
RamananHi,
Please check the following steps while creating External Library DC:
1) creating an Extneral library DC
2) import the JARs to the libraries folder of the External Library DC project
3) Right-click on each of the JARs imported to the project and add them to the public part.
This DC is now ready to be used as a build-time reference that will allow CBS to build the "main" Web Dynpro application that will use the external libraries. Next, we have to create a new Web Dynpro DC to hold the class files here are the steps:
1) Create a new Web Dynpro DC
2) Create a new public part, selecting the "Can be packaged into other build results" option
3) Rename the JARs as Zip files and extrct the full content (folders and class files) to your root folder
4) Import the folders and files to the src/packages folder
5) Expand the public part node that was created and select the "Entities" node, right-click it and choose Edit
6) In the Entity Type list select the "Folder" option then in the selected entities tree pick each of the folders that you imported in step 5 (above)
7) Now do a DC build and a DC deploy of the project
Then check-in, activate, and release any activities you have associated with creating these two projects. In the DC perspective, refresh the Active DCs and Inactive DCs to ensure that both new DCs appear in the Active list. Now we have to setup the references to these DCs in our main Web Dynpro application. To do this, follow these steps:
1) Open the Web Dynpro perspective and right click the Used DCs node then choose "Add Used DC.."
2) Pick the public part of the External Library DC that we created (first) and set it to have a Build Time dependency
3) Again, right click the Used DCs node and choose "Add Used DC.." then choose the public part of the Web Dynpro DC that we created and give it a Run Time dependecy (weak) and click finish.
4) Now, due to what I think is a bug. You must right click on the Web Dynpro "used DC" that you just added in the previous step, and set the run time dependency again (it seems to revert to the default values for some reason)
5) Now do a DC build and a DC deploy on the "main" web dynpro application.
6) Check-in, activate, and release any activities associated with adding these references and then others on your team may use the classes in the external libraries within the Web Dynpro project.
Regards.
Rajat -
Does Visual Composer support to export project to Web Dynpro application
Hi Experts.
Does Visual Compoer support to export project to Web Dynpro application, if yes how to export it. Besides, can I modify the generated VC application code? Thanks!Hi,
You can use the webdynpro as Runtime environment for VC Applications
But it is not possible to Export the VC applications to Webdynpro application.
Govindu -
HI,
I have a problem with the pc on which is installed my netweaver dev studio. I would like to be able to export my web dynpro project so that I can load or import it on another pc with a correct netweaver studio.
I have looked through the forum and tutorials of the SDN but have not found a procedure to do this.
Can anyone help me ?
NicolasTHere will be a corresponding folder for your webdynpro project in your file system. Something like this.
C:\Documents and Settings\<username>\Documents\SAP\workspace
Under this folder you will see folders for all your projects in NWDS. You can copy/paste these folders from your PC to a server for storage untill you want to import them onto your new PC. You will just move them back to the same folder on the new pc.
Then you can open them in NWDS.
REgards,
Rich Heilman -
Web Dynpro ALV vs. Table
Hello,
can u please describe the main differences between Web Dynpro ALV and Web Dynpro Table ?
When do I choose which component for my applications ?
Thanks in adavance
Best regards
hermannhHi,
SAP List Viewer (ALV) is a tool which is used to display lists and tabular structures and provides a lot of flexibilty for report generation.
Flexible in the sense , it has a lot of inbuilt functionalities which are used in general in a reporting and thus helps in reducing a large amount of coding.
for eg: <code> CALL METHOD alv_grid->set_table_for_first_display
EXPORTING
I_STRUCTURE_NAME = 'YCLII_CUST_STRU'
CHANGING
it_outtab = CUST_TAB
<code>
The above method is used for table generation. Mny more funtionalities such as sorting and re-arranging of result output is also available.
for further info check this link.
http://www.sap-img.com/abap/what-is-alv-programming.htm
http://www.sdn.sap.com/irj/sdn/index?rid=/webcontent/uuid/f0b107e4-dc72-2c10-08a7-b822c9abf0e2
Thanks -
Open and close po in SRM 7.0 in web dynpro !
Hi All ,
I am creating a PO by using excel upload . After the upload , I see that there are some problems with the PO in web dynpro .
For example , when i click on the line item it dumps and some similar problems .
When I save the PO and reopen it , the problem goes away . May be the system handles them well .
So , is there a way in which I can close and reopen the po through coding ?
I know there are buttons at the top that close the PO , but some how I could not get the code for that .
I will really appreciate the help here .
Thanks in advance ,
Ambar Patil.I'd suggest that you try the download/upload functionality as such:
1. Create a new PO from portal (just select a PO type and launch the PO creation screen without further editing)
2. Save the PO on the web
3. Click "Export" and save the XLS file onto your PC
4. On your PC, edit the XLS file to fill more PO information as needed
5. On the web, click "Edit" (of the same PO)
6. Click "Import" and upload the XLS file you just updated
Maybe you are looking for
-
Why does my phones iMessage say waiting for activation?
Need to know how to fix
-
Custom nodes are deleted for IMG after upgrade
Gurus, We are in processes of upgrading form ECC5 to ECCC6. In ECC5 we have custom node in IMG , which were created using SIMGH. After the upgrade all the custom nodes are deleted , is there a way to retrieve the custom node or is there a way custom
-
Pictures attached to emails do not show.
When I open some emails with pictures embedded or attached, I only get an empty box with a torn page symbol or a red cross or a square, triangle and circle
-
I know this is a stupid question but I waited until the last minute to print nametags and can not get them to print the logo over the name. It is as if the computer thinks they are preprinted with it. It shows up in print preview correctly but it I g
-
What day can I go in the store and buy an iPod touch 4 this week?
I went in there and they didn't have them