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: 

Fixing layout for an end user default in reports

Former Member
0 Kudos

Hi,

I have a request of fixing a layout for an end user.

(When a user executes the report with a variant the output layout should be fixed for that user id)

Can do it in programming level using his user id.

Please help me out in this issue.

Awaiting for valuable suggestions...

Regds

Satya

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

If the report displays by ALV layout. you can define a parameter of ALV LAYOUT variant. Then fetch the variant from table LTDX passing as report id and creator.

Regards,

Yawa

7 REPLIES 7

Former Member
0 Kudos

Yes you can do it!

see the structure of varinat and you can pass in the ALV*DISPLAY function modules

see the username

0 Kudos

Hi Kiran,

Can you please eloberate the process..

0 Kudos

Hi Satya,

You have created the varinat for example( ZXXX). in my above screen shot VARIANT is 0SAP.

if your user name ' KIRAN'.

modify the variant structre with the ZXXX instead of 0SAP. pass the modified variant structure to alv.

it will display the layout!

0 Kudos

Hi Satya,

I hope it will solve your issue with correct help

step 1:

Maintain the entries in LTDX table, it is a control table, even you can maintain in in production!

This table will have the report name, user name and variant..etc.

You assign the correct layout variant for the user in this table

Step 2;

in your program!

Select the LTDX where program name = sy-repid and user name  = sy-uname.

if sy-subrc = 0.

modify the variant structure with the user varinat

endif.

step 3: pass the modified variant to your FM

CALL FUCNTION \; ALV*DISPLAY*

pass the variant parameter

rg, kiran

Former Member
0 Kudos

Hi,

If the report displays by ALV layout. you can define a parameter of ALV LAYOUT variant. Then fetch the variant from table LTDX passing as report id and creator.

Regards,

Yawa

0 Kudos

WOW...

Former Member
0 Kudos

The value of the variant parameter should be passed to the PARAMETER IS_VARIANT (field variant with in the structure of IS_VARIANT) in Reuse_alv_grid_display.

IS_VARIANT-VARIANT = VARIANT.