Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to create Excel from a dynamic internal table in Background

Former Member
0 Kudos
840

Hello All,

I have requirement as below please suggest .

I have zreport user want to run this report in background with layout Variant ,and the data will send to customer maintain in a z table.i m able to create dynamic internal table base on the field present in Layout variant ,now while creating Excel the field contain data type P and Date the (AMOUNT AND DATE) is not display in proper format how to handle this type of field in adynamic internal table. Please suggest any approch to handle this type of field.or how can I pass each column value of single ROw to char field and then concrinate in string..

Regards

Sam

5 REPLIES 5

sivaganesh_krishnan
Contributor
0 Kudos
215

Hi sam,

For converting internal table to excel format you can use the abap2xlsx technology as this supports background processing.

Just refer codes given in the reference documents given in those link. try abap2xlxs by Ivan Femia.

Regards,

Sivaganesh

0 Kudos
215

Hello SIva,

Thanks for the prompt replay. presently m using class method to create excel ,but my issue is with amount field and date field ,how can i pass my each field of dynamic internal table to a char variable and conc. it in string and attached it while mailing.

Thanks

Sam

0 Kudos
215

just pass the values in another internal table which are char. Then use those internal table for converting.

Sivaganesh

0 Kudos
215

Hello Siva,

just pass the values in another internal table which are char. Then use those internal table for converting.How?


Presently my data which need to convert into a Excel is in a dynamic inter table ,do u have any idea how to create a dynamic internal table with all Char field.

Thanks

Sam

0 Kudos
215

how you are creating dynamic internal table ? are you using the method   cl_alv_table_create=>create_dynamic_table. If yes , then just make the field catalog to char for all fields.

Regards,

sivaganesh