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 pass a custom variant for the ALV list display?

Former Member
0 Kudos

For my report the online layout and the background layout are different.

Background report has more fields.

Ny reuse_Alv_list_display in background is however picking the default layout from the first report and is showing less number of fields.

So, how do I pass a different layout / variant to the ALV_LIST_Display so that it shows all the fields.

Thanks,

Ven

4 REPLIES 4

Former Member
0 Kudos

no solution so far. clsong as it is waiting for a long time

0 Kudos

nice to see someone tidy up a bit around here...

did you try something like

if sy-batch = 'X'.

is_variant-variant = 'BGD'.

else.

is_variant-variant = 'ONL'.

endif.

but that's probably too simple, you must mean something else...

0 Kudos

Tomas,

The thing is -

The output of report is the Header Level details when executed in on-line or background.

But the requirement is to output Header + Item levels. So I wrote another ALV func mod but it gets triggered when sy-batch ='X'.

It does get trieggered but the output shows only the header details as it is pulling in the default layout which I can not change.

That is where I posted this message.

I however wrote a seaprate internal table and created the layout without referring to any of the tables being used prior to this.

That took care of the issue.

I however am not able to generate a custom layout and pass it as a variant.

I closed it as it did not get answered for quite sometime.

Regards,

- Ven

0 Kudos

I am also having same problem. Solution Needed