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 Split window

Former Member
0 Likes
1,162

Hi Freinds,

Pls call tcode se16 enter there the

table Name -> MARA press F7 (or press enter directly ) and then F8 to execute.

You will see result entries of Table MARA.

Pls go and choose now from the menu Settings/User Paramters and

go to the tabstrip Data Browser. Right here choose pls "ALV GRID display" and press enter key.

You will see now the entries in ALV Format. And now if you hit now

Settings/Layout/Change there will be displayed a split popup window with

Display Columns on the left side Column Set on right side.

Dear Friends please tell me urgently what is this a strange window.

How can I create such a window. Is there any tutorial or guide

about how to do that.

I would be very glad if somebody could support me in this matter

Reagards

Ilhan

1 ACCEPTED SOLUTION
Read only

keerthy_k
Product and Topic Expert
Product and Topic Expert
0 Likes
886

Hi Ilhan,

This popup window is to change the layout of the ALV displayed. U can customise fields according to ur requirement. This can be done by selecting the field and clicking the '>' button and the selected field will move from the 'Displayed Columns' to 'Column Set'. This will remove the field from the ALV grid.

If u want to create a new popup like this as a new requirement, the u need to call the function module

'ALV_GENERIC_DIALOG' as shown below:

data: ref_to_variant type ref to cl_alv_variant.

call function 'ALV_GENERIC_DIALOG'

exporting

is_dtc_layout = is_dtc_layout

i_bypassing_buffer = i_bypassing_buffer

i_buffer_active = i_buffer_active

importing

e_saved = e_saved

changing

c_ref_to_cl_alv_variant = ref_to_variant

exceptions

no_change = 1

restore_old_view = 2

no_filt_change = 3

others = 4.

where the structure 'is_dtc_layout' the component T_TABSTRIP needs to be filled, where T_TABSTRIP is a table.

Just put a ' /h' when u r in the ALV grid display and then goto menu settings->layout->change. Then u will find the code for this FM and u will find the values which needs to be passed.

If u have any more dbts please let me know.

Keerthi.

Edited by: Keerthy K on Feb 23, 2009 7:06 AM

Edited by: Keerthy K on Feb 23, 2009 7:10 AM

6 REPLIES 6
Read only

keerthy_k
Product and Topic Expert
Product and Topic Expert
0 Likes
887

Hi Ilhan,

This popup window is to change the layout of the ALV displayed. U can customise fields according to ur requirement. This can be done by selecting the field and clicking the '>' button and the selected field will move from the 'Displayed Columns' to 'Column Set'. This will remove the field from the ALV grid.

If u want to create a new popup like this as a new requirement, the u need to call the function module

'ALV_GENERIC_DIALOG' as shown below:

data: ref_to_variant type ref to cl_alv_variant.

call function 'ALV_GENERIC_DIALOG'

exporting

is_dtc_layout = is_dtc_layout

i_bypassing_buffer = i_bypassing_buffer

i_buffer_active = i_buffer_active

importing

e_saved = e_saved

changing

c_ref_to_cl_alv_variant = ref_to_variant

exceptions

no_change = 1

restore_old_view = 2

no_filt_change = 3

others = 4.

where the structure 'is_dtc_layout' the component T_TABSTRIP needs to be filled, where T_TABSTRIP is a table.

Just put a ' /h' when u r in the ALV grid display and then goto menu settings->layout->change. Then u will find the code for this FM and u will find the values which needs to be passed.

If u have any more dbts please let me know.

Keerthi.

Edited by: Keerthy K on Feb 23, 2009 7:06 AM

Edited by: Keerthy K on Feb 23, 2009 7:10 AM

Read only

Former Member
0 Likes
886

Keerthy K thank you very much for your reply.

Can you help me to fill the structure 'is_dtc_layout' completely in order to call this FM.

Regards

Ilhan

Read only

keerthy_k
Product and Topic Expert
Product and Topic Expert
0 Likes
886

Hi,

I debugged the code and I can find that there are 9 entries and they are as follows.

DATA: IS_DTC_LAYOUT TYPE DTC_S_LAYO.

DATA: T_WS type DTC_T_TS,

L_WS type DTC_S_TS.

L_WS-TS_DEFAULT = 'X'.

L_WS-TS_UCOMM = 'ALV_M_R1'.

L_WS-TS_HEADER = 'Displayed Columns'.

L_WS-TS_ORDER = '1'.

L_WS-GRID1STYLE = '1'.

L_WS-GRID2STYLE = '0'.

L_WS-GRID1NOTEM = ' '.

L_WS-GRID2NOTEM = 'X'.

append L_WS to T_WS.

clear L_WS.

L_WS-TS_DEFAULT = ' '.

L_WS-TS_UCOMM = 'ALV_M_R1_SUM'.

L_WS-TS_HEADER = 'Displayed Columns'.

L_WS-TS_ORDER = '1'.

L_WS-GRID1STYLE = '1'.

L_WS-GRID2STYLE = '0'.

L_WS-GRID1NOTEM = ' '.

L_WS-GRID2NOTEM = 'X'.

append L_WS to T_WS.

clear L_WS.

L_WS-TS_DEFAULT = ' '.

L_WS-TS_UCOMM = 'ALV_M_R2'.

L_WS-TS_HEADER = 'Sort Order'.

L_WS-TS_ORDER = '2'.

L_WS-GRID1STYLE = '1'.

L_WS-GRID2STYLE = '0'.

L_WS-GRID1NOTEM = ' '.

L_WS-GRID2NOTEM = 'X'.

append L_WS to T_WS.

clear L_WS.

L_WS-TS_DEFAULT = ' '.

L_WS-TS_UCOMM = 'ALV_M_R3'.

L_WS-TS_HEADER = 'Filter'.

L_WS-TS_ORDER = '3'.

L_WS-GRID1STYLE = '1'.

L_WS-GRID2STYLE = '0'.

L_WS-GRID1NOTEM = ' '.

L_WS-GRID2NOTEM = ' '.

append L_WS to T_WS.

clear L_WS.

L_WS-TS_DEFAULT = ' '.

L_WS-TS_UCOMM = 'ALV_M_R4'.

L_WS-TS_HEADER = 'View'.

L_WS-TS_ORDER = '4'.

L_WS-GRID1STYLE = '1'.

L_WS-GRID2STYLE = '0'.

L_WS-GRID1NOTEM = ' '.

L_WS-GRID2NOTEM = ' '.

append L_WS to T_WS.

clear L_WS.

L_WS-TS_DEFAULT = ' '.

L_WS-TS_UCOMM = 'ALV_M_R4_EXCEL'.

L_WS-TS_HEADER = 'View'.

L_WS-TS_ORDER = '4'.

L_WS-GRID1STYLE = '1'.

L_WS-GRID2STYLE = '0'.

L_WS-GRID1NOTEM = ' '.

L_WS-GRID2NOTEM = ' '.

append L_WS to T_WS.

clear L_WS.

L_WS-TS_DEFAULT = ' '.

L_WS-TS_UCOMM = 'ALV_M_R4_LOTUS'.

L_WS-TS_HEADER = 'View'.

L_WS-TS_ORDER = '4'.

L_WS-GRID1STYLE = '1'.

L_WS-GRID2STYLE = '0'.

L_WS-GRID1NOTEM = ' '.

L_WS-GRID2NOTEM = ' '.

append L_WS to T_WS.

clear L_WS.

L_WS-TS_DEFAULT = ' '.

L_WS-TS_UCOMM = 'ALV_M_R5'.

L_WS-TS_HEADER = 'Display'.

L_WS-TS_ORDER = '5'.

L_WS-GRID1STYLE = '1'.

L_WS-GRID2STYLE = '0'.

L_WS-GRID1NOTEM = ' '.

L_WS-GRID2NOTEM = ' '.

append L_WS to T_WS.

clear L_WS.

L_WS-TS_DEFAULT = ' '.

L_WS-TS_UCOMM = 'ALV_M_R6'.

L_WS-TS_HEADER = 'Web options'.

L_WS-TS_ORDER = '6'.

L_WS-GRID1STYLE = '1'.

L_WS-GRID2STYLE = '0'.

L_WS-GRID1NOTEM = ' '.

L_WS-GRID2NOTEM = ' '.

append L_WS to T_WS.

is_dtc_layout-T_TABSTRIP = T_WS.

This is there in the class 'CL_ALV_VARIANT' and the method in which the FM is called is 'LVC_VARIANT'. Please see the coding in the method, how the FM is used.

Keerthi.

Edited by: Keerthy K on Feb 23, 2009 8:50 AM

Edited by: Keerthy K on Feb 23, 2009 8:53 AM

Edited by: Keerthy K on Feb 23, 2009 8:57 AM

Read only

Former Member
0 Likes
886

I am getting a dump.

DATA: l_dummy type ref to cl_alv_variant.
DATA: IS_DTC_LAYOUT TYPE DTC_S_LAYO.
DATA: T_WS type DTC_T_TS,
L_WS type DTC_S_TS.

L_WS-TS_DEFAULT = 'X'.
L_WS-TS_UCOMM = 'ALV_M_R1'.
L_WS-TS_HEADER = 'Displayed Columns'.
L_WS-TS_ORDER = '1'.
L_WS-GRID1STYLE = '1'.
L_WS-GRID2STYLE = '0'.
L_WS-GRID1NOTEM = ' '.
L_WS-GRID2NOTEM = 'X'.
append L_WS to T_WS.

clear L_WS.
L_WS-TS_DEFAULT = ' '.
L_WS-TS_UCOMM = 'ALV_M_R1_SUM'.
L_WS-TS_HEADER = 'Displayed Columns'.
L_WS-TS_ORDER = '1'.
L_WS-GRID1STYLE = '1'.
L_WS-GRID2STYLE = '0'.
L_WS-GRID1NOTEM = ' '.
L_WS-GRID2NOTEM = 'X'.
append L_WS to T_WS.

clear L_WS.
L_WS-TS_DEFAULT = ' '.
L_WS-TS_UCOMM = 'ALV_M_R2'.
L_WS-TS_HEADER = 'Sort Order'.
L_WS-TS_ORDER = '2'.
L_WS-GRID1STYLE = '1'.
L_WS-GRID2STYLE = '0'.
L_WS-GRID1NOTEM = ' '.
L_WS-GRID2NOTEM = 'X'.
append L_WS to T_WS.

clear L_WS.
L_WS-TS_DEFAULT = ' '.
L_WS-TS_UCOMM = 'ALV_M_R3'.
L_WS-TS_HEADER = 'Filter'.
L_WS-TS_ORDER = '3'.
L_WS-GRID1STYLE = '1'.
L_WS-GRID2STYLE = '0'.
L_WS-GRID1NOTEM = ' '.
L_WS-GRID2NOTEM = ' '.
append L_WS to T_WS.

clear L_WS.
L_WS-TS_DEFAULT = ' '.
L_WS-TS_UCOMM = 'ALV_M_R4'.
L_WS-TS_HEADER = 'View'.
L_WS-TS_ORDER = '4'.
L_WS-GRID1STYLE = '1'.
L_WS-GRID2STYLE = '0'.
L_WS-GRID1NOTEM = ' '.
L_WS-GRID2NOTEM = ' '.
append L_WS to T_WS.

clear L_WS.
L_WS-TS_DEFAULT = ' '.
L_WS-TS_UCOMM = 'ALV_M_R4_EXCEL'.
L_WS-TS_HEADER = 'View'.
L_WS-TS_ORDER = '4'.
L_WS-GRID1STYLE = '1'.
L_WS-GRID2STYLE = '0'.
L_WS-GRID1NOTEM = ' '.
L_WS-GRID2NOTEM = ' '.
append L_WS to T_WS.

clear L_WS.
L_WS-TS_DEFAULT = ' '.
L_WS-TS_UCOMM = 'ALV_M_R4_LOTUS'.
L_WS-TS_HEADER = 'View'.
L_WS-TS_ORDER = '4'.
L_WS-GRID1STYLE = '1'.
L_WS-GRID2STYLE = '0'.
L_WS-GRID1NOTEM = ' '.
L_WS-GRID2NOTEM = ' '.
append L_WS to T_WS.

clear L_WS.
L_WS-TS_DEFAULT = ' '.
L_WS-TS_UCOMM = 'ALV_M_R5'.
L_WS-TS_HEADER = 'Display'.
L_WS-TS_ORDER = '5'.
L_WS-GRID1STYLE = '1'.
L_WS-GRID2STYLE = '0'.
L_WS-GRID1NOTEM = ' '.
L_WS-GRID2NOTEM = ' '.
append L_WS to T_WS.

clear L_WS.
L_WS-TS_DEFAULT = ' '.
L_WS-TS_UCOMM = 'ALV_M_R6'.
L_WS-TS_HEADER = 'Web options'.
L_WS-TS_ORDER = '6'.
L_WS-GRID1STYLE = '1'.
L_WS-GRID2STYLE = '0'.
L_WS-GRID1NOTEM = ' '.
L_WS-GRID2NOTEM = ' '.
append L_WS to T_WS.

is_dtc_layout-T_TABSTRIP = T_WS.

    CALL FUNCTION 'ALV_GENERIC_DIALOG'
         EXPORTING
              IS_DTC_LAYOUT           = is_dtc_layout
         changing
              C_REF_TO_CL_ALV_VARIANT = l_dummy
         EXCEPTIONS
              NO_CHANGE               = 1
              OTHERS                  = 2.
    IF SY-SUBRC ne 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
     endif.

Reagrds

Ilhan

Read only

keerthy_k
Product and Topic Expert
Product and Topic Expert
0 Likes
886

Hi Ilhan,

Please see the method MAINTAIN_VARIANT of the class 'CL_CRM_IPM_AVAIL_SEL_VARIANT'.

Keerthi.

Read only

Former Member
0 Likes
886

ok, I have seen it. And now ?????

I dont have the solutioin anyway