on 11-27-2015 9:20 AM
Hello Experts,
I have a requirement in SAP CRM Web UI like, download data from view set into excel.In my view set, I have many views with table data.Now from all Views data should be download to excel with workbooks, here each view data should be in one workbook.Standard excel dowload functionality is downloading only first view from that view set.
Can you please suggest me here to achieve this functionality?
Thanks in Advance!
Regards,
Kiran
Hi Kiran,
Use static variables [Tables], or GDC or Component Usage.
Ucan use any logic for getting data from diffrent components.
and all the data put in one internal table create one button[Download ] in to Viewset and In event : EH_ONDOWNLOAD write the logic to fech the data and make the data into EXcel format [some standard clases are there for the logic,search it ], go to View set.Htm File create File path setting code,
please find attached for refference, that is for upload same for down load also.
thanks,
venkat.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kiran,
if I understand you correctly you have a view set consisting of a set of different views, each one containing a table. Now you want to implement some functionality to download each of the tables into a different sheet in an excel work book.
In order to implement this you'll have to create some custom functionality. The standard excel download only works for one table at a time (the reason is, that it is a functionality implemented on the table level, therefore there is no way to download data from other views).
I would suggest trying the following path:
Hope this helps,
Christian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Christian,
Here one more difficulty is , all my views(in View Set) are from different component and I am using component usage to get that views and place it in my view set.
can you please suggest me how can I get that views data in to my component? is this possible through custom method in the view controller.
Thanks in Advance!
Regards,
Kiran
Hi Kiran,
in the case of dynamic component usages you could, for example, us the component controllers GET_COMPONENT_USAGE method to get the component usages. The use the method GET_CONTEXT_NODE to get a specific context node for each component. Next you could check if the context node implements a certain custom interface that you use to get the data.
If you want to build this fully dynamic you could use GET_RUNTIME_REPOSITORY of the component controller and get the runtime repository and read the used components via GET_CMP_USAGE_LIST.
Christian
Hello Kiran,
As you said 'Standard excel dowload functionality is downloading only first view from that view set'. Do you mean there is a viewset which contains several views? I want to know the steps of how to get this viewset in standard so that we can know how to achieve your requirement.
Best Regards, Corrine
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Kiran,
You said 'Standard excel dowload functionality is downloading only first view from that view set', I just want to know how you find this. There must be some sample for it. Is this sample created by yourself? or you find it from some CRM standard overviewset? If it is from CRM standard viewset, which one is it?
Best Regards, Corrine
Hello Corrine,
This is custom view set.When I created my view set ,by default I got one excel download button on the right corner of the view set.This downloads only first view table data among different views form that work set.
I did not handled this functionality.I am looking for that logic too, where it has been written.So that I can customize that as per my requirement.
Regards,
Kiran
Go to every view.htm file make this property as downloadToExcel = "TRUE", then when you click excel icon on the view it will down load to excel sheet for each view, how many views are there that many excel files will create.
if you want to create all the views data in one excel file.
then u have to create one button [ Down load to Excel ] in view set, write your own logic to fetch all views data into one internal table and download that data into Excel file.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.