Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Download to excel between two given dates

Hi All,

I already implemented Export to Excel funtionality in webdynpro java. Now i have a requirement to download the data to Excel only between two given dates.

I am taking two dates from the user and based on that it should download data into excel file.

Guide me on this or send pseudocode for this.



Former Member replied


If I understand your question correctly,

you are gettting some data from R/3. You need to filter out that data which is in between two given dates , export that data to excel.

If yes, then take one more ValueNode with same structure.

and bind the filtered data to this node.

To filter out model node, use

int size=wdContext.node<outputnode>().size();

Date stDate=wdContext.currentContextElement().get<startDate>();

Date endDate=wdContext.currentContextElement().get<endDate>();

for(int i=0;i<size;i++)


Date objDate=wdContext.node<outputNode>().get<outputNode>ElementAt(i).get<dateAttribute>();

if( (objDate.compareTo(stDate)>=0) && (objDate.compareTo(endDate)<=0) )


// Create element for value Node , set the values (ie. i'th record values) and add to ValueNode.



Long process, but you can use

Now export the ValueNode to excel



Edited by: Lakshmi Narayana Chowdary Namala on Sep 22, 2008 12:04 PM

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question