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 Layout Display..

Former Member
0 Likes
1,745

Hi experts, I am facing problem when I am selecting the layout in selection screen. And executing the program it is not showing the out put which I saved in layout. But from the out put screen when I am selecting the layout button and double clicking on that that time it is showing the saved layout display...But I want it when I select it from selection screen that time also it should show the saved lay out.. Plz Share your Knowledge.. find the attachment Thanks Abhay Manna.

10 REPLIES 10
Read only

Former Member
0 Likes
1,721

INITIALIZATION.   repname = sy-repid.   PERFORM init_layout.   PERFORM f_init_selspart.   PERFORM f_init_spart. AT SELECTION-SCREEN ON VALUE-REQUEST FOR Layout.   PERFORM disp_layout .   PERFORM fetch_layout.   PERFORM f_validate. I am arranging my code like this way ..please suggest me also is there any problem with the arrangement.. Thanks Abhay Manna.

Read only

Former Member
0 Likes
1,721

Hi Abhay,

If you are using REUSE_ALV_GRID_DISPLAY than check if the following parameters are active.

I_SAVE and IS_VARIANT.

Pass the variant value to IS_VARIANT and I_SAVE = 'X'.

try and check your problem may get resolved.

Regards,

Ganesh.

Read only

0 Likes
1,721

hi, Please find the code..m I doing any mistake here??? Thanks. CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'     EXPORTING *  I_INTERFACE_CHECK                = ' ' *  I_BYPASSING_BUFFER                = ' ' *  I_BUFFER_ACTIVE                  = ' '       i_callback_program                = i_g_repid *  I_CALLBACK_PF_STATUS_SET          = ' ' *  I_CALLBACK_USER_COMMAND          = '' *  i_callback_top_of_page            = 'TOP_OF_PAGE' *  I_CALLBACK_HTML_TOP_OF_PAGE      = L_EVENT_HTML_TOP *  I_CALLBACK_HTML_END_OF_LIST      = L_EVENT_HTML_END *  I_STRUCTURE_NAME                  =     i_background_id                  = 'ALV_BACKGROUND' *  i_grid_title                      = 'Report' *  I_GRID_SETTINGS                  =       is_layout                        = i_gs_layout       it_fieldcat                      = i_gt_fieldcat *  IT_EXCLUDING                      = *  IT_SPECIAL_GROUPS                =       it_sort                          = i_sort *  IT_FILTER                        = *  IS_SEL_HIDE                      = *  I_DEFAULT                        = 'X'     i_save                          = 'A'     is_variant                      = var1     it_events                        = gt_events[] *  IT_EVENT_EXIT                    = *  IS_PRINT                          = *  IS_REPREP_ID                      = *  I_SCREEN_START_COLUMN            = 0 *  I_SCREEN_START_LINE              = 0 *  I_SCREEN_END_COLUMN              = 0 *  I_SCREEN_END_LINE                = 0 *  IT_ALV_GRAPHICS                  = *  IT_HYPERLINK                      = *  IT_ADD_FIELDCAT                  = *  IT_EXCEPT_QINFO                  = *  I_HTML_HEIGHT_TOP                = *  I_HTML_HEIGHT_END                = *  IMPORTING *  E_EXIT_CAUSED_BY_CALLER          = *  ES_EXIT_CAUSED_BY_USER            =     TABLES         t_outtab                      = i_finaloutput     EXCEPTIONS     program_error                    = 1     OTHERS                          = 2               .   IF sy-subrc <> 0. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO *        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.   ENDIF. ENDFORM.                    " DISPLAY_ALV

Read only

0 Likes
1,721

Abhay

Please fill     is_variant                        = v_variant "variant name with REPID as program name and the variant name on screen

Nabheet

Read only

0 Likes
1,721

Hi Abhay,

Check the variant details you are passing.

Add report name in field REPORT of variant and if any other details are persent.

Structure used is DISVARIANT.

Regards,

Ganesh Lathi.

Read only

0 Likes
1,721

Hi nabheet madan ,

is_variant = var1     .

in my I did like this is that wrong..?? Please correct me if I am wrong.

Thanks Abhay.

Read only

0 Likes
1,721

What have you filled in VAR1?

Read only

0 Likes
1,721

Hi,

var1-report = repname. 

var2 = var1.

Read only

Former Member
0 Likes
1,721

Hi Experts, Thanks for your support my problem resolved.. Thanks Abhay Manna.

Read only

0 Likes
1,721

Abhay

As a good practice and good member please document the solution

Nabheet