01-07-2014 6:09 AM
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
01-07-2014 6:17 AM
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
01-07-2014 6:14 AM
Yes you can do it!
see the structure of varinat and you can pass in the ALV*DISPLAY function modules
see the username
01-07-2014 6:47 AM
01-07-2014 6:57 AM
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!
01-07-2014 9:17 AM
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
01-07-2014 6:17 AM
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
01-07-2014 6:25 AM
01-07-2014 8:45 AM
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.