cancel
Showing results for 
Search instead for 
Did you mean: 

Download the ALV output with specific Layout to Appln server

Former Member
0 Kudos
1,387

HI

anyone know , How to download the ALV report output to the applicaiton server , when the ouput has been set to a particular layout .

Which means I dont want to download the whole content of the ITAB , Only the fields which are there in the specific layout.

I am using the REUSE_ALV_LIST_DISPLAY . After callign this FM, output displays , but itab has whole data which i dont want .

pls reply .

Rgds

Giri

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Giri,

When you say that the ourput has been set to a particular layout, only the fields that you want to see on the list are displayed, right ? In that case, when you down load the ALV List, only the columns that are being diaplyed will be downloaded anyways. Then what exactly is your problem ?

If you are using the ALV List and are unable to find a way to download the content displayed on the screen, then you can try to use the Menu Option <i>System>List>Save-->Local File</i>.

Get back if you have not found the solution yet. And also let us know if any of these answers have helped.

regards,

Anand Mandalika.

Former Member
0 Kudos

HI ANAND,

THANKS A LOT FOR YOUR REPLY .AS I MENTIONED IN MY QUESTION ITSELF ONCE OUTPUT HAS BEEN DISPLAYED, ITAB DOESN'T HAVE ONLY THE FIELDS WHICH ARE THERE IN THE LAYOUT, IT HAS ALL.

SECOND THING, REPORT WILL BE RUN IN THE BACKGROUND JOB

AND OUTPUT NEEDS TO BE DOWNLOAD INTO APPLICAITON SERVER.

I THINK I HAVE PUT IN THE RIGHT WAY NOW FOR YOU ALL TO UNDERSTAND WHAT I NEED .

GIRI

Former Member
0 Kudos

Hi Giri,

I still fail to see the problem here. You have a report which displays an ALV List. This report is going to be run in the background mode, which means that there's no user-interaction. So, the download of the data to an application server will have to happen programmatically, right?

In your case, at the time the download is going to happen, you can have an internal table which will contain only those fields which are required and you can now transfer this internal table to the application server.

Regards,

Anand Mandalika.

Former Member
0 Kudos

Hi Anand,

Thanks once again , Yes you are right, programatically i am doing the download to the Appln server.

User will be selecting the layout in the selection screen ,I am passing this to the variant parameters in the function module "REUSE_ALV_LIST_DISPLAY" . Based on that, the output will be displayed . Layout can be X OR y OR Z .

What i am trying is , by reading the layout structure want to know what are all fields are going to display in the output. But when I debug i could not see any of the fields/structure in layout(other than the name of the layout), Even the Fieldcat and the output table has all the fields(in this case its 61 fields).

I am not sure how the standard function module filters the necessary fields for the output based on the layout selected . Even before if i get variant(Layout) structure before calling the FM , i can handle the download of itab to Appln server .

Pls let me know even now if you are not clear about my problem.

Rgds

Giri

Former Member
0 Kudos

Hi Giri,

As far as I know there is no easy way to do this. You want to get the output internal table that contains data after all filtering etc done by the Display variant (put on sel screen) is complete. So what you want is a FM (or routine) that has:

Input 1 -> Full internal table

Input 2 -> Display variant name

Output -> Partial (or filtered) internal table

We had the same requirement once and to accomplish this, one of my collegues had to debug "REUSE_ALV_LIST_DISPLAY" and find out how SAP does this filtering and create our own Z FM that does the same logic. It is not a very easy task and will take a considerable amount of debugging. But it is possible! and not only for LIST, but its possible for GRID also.

I am sorry I cannot give you the code for these Z FM's that would have solved your problem, as I am no longer with that organization

Regards,

Naman

Former Member
0 Kudos

Hello Giri,

When the ALV List is displayed to the user and the user changes the layout to exclude some of the fields displayed and include others etc., it is the Field Catalog that gets changed accordingdly. Though we use the word <i>layout</i> in this context, it is actually the field catalog that we are technically referring to. (Imagine how it would sound if we said something like - <i>the ALV list is displyed to the user and he can change the field catalog as he chooses</i>).

Now let me ask you something - when your internal table contains 61 fields out of which you choose to display only 6 fields to the user on the ALV List, what would <b>you</b> do? You would set the <b>NO_OUT</b> property for the Field to 'X'. Isn't it? Similarly, when the user changes the fields that are displayed on his ALV List, the fields that are hidden will have the NO_OUT set to 'X'. And the fields that are being displayed will have the NO_OUT value set to space in the Field catalog table.

Is this what you're looking for?

Regards,

Anand Mandalika.

0 Kudos

Hi, I'm having the same issue!

Once the user changes the layout, I have a menu button to do further processing! When debugging, during a sort, I could see that the NO_OUT field had 'X' where the fields were excluded, in a table called (IT_FIELDCAT). But, when I selected my button, and went into my program "USER_COMMAND" subroutine, IT_FIELDCAT was not available. ONLY my program's FIELDCAT structure was available and did not have the updated field changes on them.

I tried (LSLUCU10)IT_FIELDCAT but that field was not accessible in memory either when in my calling program's "USER_COMMAND" routine.

Any help would be much appreciated!

kmoore007
Active Contributor
0 Kudos

What you ask should be possible to a client pc, but I'm not sure about downloading to an application server.

Former Member
0 Kudos

Thanks for the reply, could you pls tell me how to get only to a specific layout (fields) for the output, even to the frontend (PC) download .

Former Member
0 Kudos

Hi, Simple way to download only required fields to presentation server is to hide the non required columns in the ALV Grid display ( select all the columns not required and right click your mouse you have hide option ) use excel download option in the header . This will download only visual columns in the screen. Hope this answers your question.

Regards, Balaji Kuduva