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

ALV Variant

Former Member
0 Likes
696

Hi!

Can I pass to a report which has an alv output a variant. It is possible to

choose a self made layout ? If so how can I create with ALV a variant

and save it. What is necessary for it ?

Regards

ertas

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
665

Hi,

Pass the parameters which are marked in Bold characters.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = Sy-repid

I_STRUCTURE_NAME = 'OUT'

IS_LAYOUT = LAYOUT

IT_FIELDCAT = FIELDTAB

I_DEFAULT = 'A'

I_SAVE = 'A

IS_VARIANT = G_VARIANT

IT_EVENTS = EVENTS[]

IS_PRINT = PRINTS

TABLES

T_OUTTAB = OUT.

In the ALV output, Application toolbar you can find a button for changing the layout. Click on that button, choose the fields for the layout and click on SAVE. Give a name and save it.

Thanks and Regards,

Lakshmi.

Edited by: Santhanalakshmi V on Apr 29, 2008 2:53 PM

Hi!

Can I pass to a report which has an alv output a variant. It is possible to

choose a self made layout ? If so how can I create with ALV a variant

and save it. What is necessary for it ?

Regards

ertas

6 REPLIES 6
Read only

Former Member
0 Likes
665

hi,

refer to the link.

http://sap.ittoolbox.com/code/archives.asp?i=10&d=2835&a=s

regards,

sreelakshmi

Read only

Former Member
0 Likes
665

Hi,

It is possible to pass ALV layout in a variant to a report.

In the report you should have a selection parameter for layout.

SUBMIT <Report> with selection-table and return - Using this statement you can populate the selection screen of the report you want to call.

In the report program, you need to retrieve the layout and pass this to the ALV.

Requirement is, first create a layout in the report and save it.

In Reuse_alv_grid_display set I_SAVE = 'A' and I_Callback_program = sy-repid. Now you can see the layout edit icons in the ALV screen. Using that buttons save a variant.

Thanks and Regards,

Lakshmi.

Read only

Former Member
0 Likes
665

Hello,

How can I create a layout in the report (ALV output) and save it ?

Regards

sas

Read only

Former Member
0 Likes
666

Hi,

Pass the parameters which are marked in Bold characters.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = Sy-repid

I_STRUCTURE_NAME = 'OUT'

IS_LAYOUT = LAYOUT

IT_FIELDCAT = FIELDTAB

I_DEFAULT = 'A'

I_SAVE = 'A

IS_VARIANT = G_VARIANT

IT_EVENTS = EVENTS[]

IS_PRINT = PRINTS

TABLES

T_OUTTAB = OUT.

In the ALV output, Application toolbar you can find a button for changing the layout. Click on that button, choose the fields for the layout and click on SAVE. Give a name and save it.

Thanks and Regards,

Lakshmi.

Edited by: Santhanalakshmi V on Apr 29, 2008 2:53 PM

Read only

Former Member
0 Likes
665

Ok I have done so far all your instructions.

What is about ?

SUBMIT <Report> with selection-table and return - Using this statement you can populate the selection screen of the report you want to call.

Regards

ertas

Read only

Former Member
0 Likes
665

Hi,

In your question, you asked if it is possible to pass ALV varinat to a report program. I thought you are calling this report from some other program with a layout option.

If that is not your requirement, you can simply ignore that. Now you have saved the variant. What is your next requirement?

If your program needs to display the data automatically with that layout everytime when you run, you can use FM 'REUSE_ALV_VARIANT_DEFAULT_GET'. This will give you the default layout which is saved and pass this variant in REUSE_ALV_GRID_DISPLAY.

Thanks and Regards,

Lakshmi.