Skip to Content
0
Former Member
Jul 22, 2009 at 06:07 AM

Download to excel problem

15 Views

Hi Friends,

DATA lo_nd_hr_update TYPE REF TO if_wd_context_node.

DATA lt_hr_update TYPE wd_this->elements_hr_update.

DATA ls_hr_update TYPE wd_this->element_hr_update.

  • navigate from <CONTEXT> to <HR_UPDATE> via lead selection

lo_nd_hr_update = wd_context->get_child_node( name = wd_this->wdctx_hr_update ).

  • @TODO handle non existant child

  • IF lo_nd_hr_update IS INITIAL.

  • ENDIF.

lo_nd_hr_update->get_static_attributes_table( IMPORTING table = lt_hr_update ).

DATA text TYPE string.

DATA xtext TYPE xstring.

LOOP AT lt_hr_update INTO ls_hr_update.

CONCATENATE text ls_hr_update-mandt

ls_hr_update-pernr

ls_hr_update-effdt

ls_hr_update-upddt

ls_hr_update-ename

ls_hr_update-aedat

ls_hr_update-aenam

ls_hr_update-sigempno

ls_hr_update-signame

ls_hr_update-emailid

ls_hr_update-rejuvem

ls_hr_update-rejuvey

ls_hr_update-enrich1

ls_hr_update-enrich2

ls_hr_update-offdt

ls_hr_update-status

ls_hr_update-accdt

ls_hr_update-tedempno

ls_hr_update-tedname

ls_hr_update-skill1

ls_hr_update-skill2

ls_hr_update-skill3

ls_hr_update-skill4

ls_hr_update-comments

ls_hr_update-letter_rel

ls_hr_update-reldt

ls_hr_update-practice

ls_hr_update-practext

ls_hr_update-location

ls_hr_update-email

ls_hr_update-bill_date

cl_abap_char_utilities=>newline INTO text SEPARATED BY

cl_abap_char_utilities=>horizontal_tab.

ENDLOOP.

CALL FUNCTION 'SCMS_STRING_TO_XSTRING'

EXPORTING

text = text

IMPORTING

buffer = xtext.

wdr_task=>client_window->client->attach_file_to_response(

**path to the word file

i_filename = 'WDP.xls'

  • String Variable

i_content = xtext

  • File Type

i_mime_type = 'EXCEL' ).

The problem is i'm facing is i'm unable to download all the contents.

Is there any restriction on string size.....whether i need to increase string size....

Is it the problem with table size it has more than 25 fields & around 150 reocrds but every time when i use above code getting arnd 11 rows of data.

Kindly reply.

Thanks.