Application Development and Automation 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: 
Read only

Exporting the report as flat file using the layout defined

Former Member
0 Likes
864

Hi all,

I am creating a report program using REUSE_ALV_LIST_DISPLAY with flat file extraction using WS_DOWNLOAD. In the selection-screen, a checkbox which indicates that the report must be exported as flat and a parameter for the layout exist. The user wants the result of the flat file to be the same as the layout of the report. In my program, the flat file processing is prior to displaying the ALV. I've been searching a FM which can get the fieldcatalog of a layout but so far, I haven't found one. If I found one, I will just create a dynamic table which will be passed to WS_DOWNLOAD.

Thanks for your help!!!

Hi all,

I am creating a report program using REUSE_ALV_LIST_DISPLAY with flat file extraction using WS_DOWNLOAD. In the selection-screen, a checkbox which indicates that the report must be exported as flat and a parameter for the layout exist. The user wants the result of the flat file to be the same as the layout of the report. In my program, the flat file processing is prior to displaying the ALV. I've been searching a FM which can get the fieldcatalog of a layout but so far, I haven't found one. If I found one, I will just create a dynamic table which will be passed to WS_DOWNLOAD.

Thanks for your help!!!

5 REPLIES 5
Read only

Former Member
0 Likes
799

Hi Andrew,

Did u check the FM's

LIST_DOWNLOAD

LIST_DOWNLOAD_HTML

to download the list as you see on the screen

Cheers

VJ

Read only

0 Likes
799

Hi VJ,

Thanks for that. But what I need to do is to know the fields/columns of the layout to be displayed before the ALV report launches.

Is there a way to know the fields of an ALV layout.

Thanks!

Read only

0 Likes
799

Hi Andrew,

Try this

REUSE_ALV_LIST_LAYOUT_INFO_GET

REUSE_ALV_LIST_LAYOUT_INFO_SET

REUSE_ALV_LIST_WIDTH_GET

Cheers

VJ

Message was edited by: Vijayendra Rao

Read only

0 Likes
799

Yes, I've seen these FM but the parameters to be passed are still unclear to me. Could you help me how to use this?

Thanks,

Vijayendra

Read only

0 Likes
799

Hi Andrew,

You can just do a google & SDN search using the FM and u will get many codes where its being used,

Basically the FM is used to get the layout information. I am not sure if its a perfect match for your requirement.

http://www.geocities.com/mpioud/Z_DEMO_ALV_REFRESH_BUTTON_4.html

Cheers

VJ