Problem in saving ALV display variant with filter
Hello,
I'm displaying an ALV grid with function 'REUSE_ALV_GRID_DISPLAY'. When I load a diplay variant and apply a filter, I could save new layout. But when I run the report without a display variant, then apply a filter to the result, I couldn't save filter option when saving display variant. In the "save" tab of save layout dialog, filter checkbox is not displayed. This happens in 4.6C version. Is it a bug or am i missing a point.
Thanks,
Mustafa.
Slm Burak,
'IT_FILTER' parameter is empty. Users apply a filter but couldn't save filtered list variant. When they run the report with saved display variant, list is displayed without filters.
Similar Messages
-
Copy User Specific ALV Display Variants
Does anyone know if it is possible to copy one user's ALV display variant (that has been saved as a user-specific variant) for a particular program (in this case VA05) to another user?
Hi Eric,
I'm a bit busy now and I cannot give you a complete solution, but sure can give you some c(l)ue. Just see if you have some success. If you do not, then i wuill get back to you later.
Refer to the follwoing SAP Tables and see if you have some luck.
==========================================================
LTDX --> Generic storage of display variants
LTDXD --> Default display variants
LTDXS --> SAP Default Display Variants
LTDXT --> Display variant texts
==========================================================
The idea is to try and manipulate the table entries for various users.
Regards,
Anand Mandalika. -
ALV Display Variant copying between programs
There is a report program say PROGRAM1 whose ALV display variants we want to copy to the ALV display variants of another program say PROGRAM2.
Both these program share the same ALV output structure design. My questions are
1) Can the display variants of an ALV be copied into another program.?
2) Can this be managed programatically?Hi,
Try using LVC_VARIANT_SELECT and LVC_VARIANT_SAVE fms.
First call LVC_VARIANT_SELECT to read variant from the first program and then call LVC_VARIANT_SAVE to save it for the second program.
Take a look at report BCALV_GRID_11 for reference
Sri
Message was edited by: Srikanth Pinnamaneni -
Copying ALV Display Variants between different programs
Is there a way to copy the ALV Display Variants from one program to another? I am NOT referring to selection screen variants.
An SAP standard program was copied to a Z program. Some changes were made to the logic. The original SAP program has many (100+) ALV Display Variants. I do not want to manually re-create them. Is there a way to copy these from one program to another (without using a custom program to manipulate the tables)?
Thanks.
NormHi norman,
even i was thinking the same while you passing the alv parameter is_variant, give the the program which is having 100 variants.
is_variant-REPORT = 'STANDARDPRG'.
this will import all varaints from it, but when you save any new one it will save in the same standard program.
regards
vijay -
Select OO ALV Display Variants in a Sel Screen.
Hi, Abapers.
I'm wondering whether is possible to make a selection (in a sel-screen) over a field of the display variants which are further managed in an OO ALV.
If it's possible, from where shoud I read them?
Best regards.what do you means with "managed"?
what do you think to do with the selected field? -
OOPs : SAVE and ALV Display Variant
Can you please send me the code for 'Save and Display Variant' in ALV OOPs.
DATA : l_layout TYPE disvariant.
l_layout-report = sy-repid.
l_layouth-zebra = 'X'.
CALL METHOD gr_alvgrid->set_table_for_first_display
EXPORTING
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
I_CONSISTENCY_CHECK =
i_structure_name = 'ZQM01'
<b> is_variant = l_layout
i_save = 'A'</b>
I_DEFAULT = 'X'
is_layout = gs_layout
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING =
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
CHANGING
it_outtab = gt_list[]
it_fieldcatalog = gt_fieldcat
IT_SORT =
IT_FILTER =
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. -
hi,
I wrote a code for allowing the user to choose a display variant in the selection screen. The user chooses the required variant in the selection screen and views the ALV grid accordingly. This code is working fine in the development server but as it was transported to the quality server, somehow it has stopped working.
Any new variants that are created are displayed in the selection screeN F4 help, but somehow the variants are not working.
Could anyone suggest where i am going wrong?
Thanks,
Avirooptry to comment it and see./
it will work..
you are telling that alv Fm set the default variant.
if you don't want then comment it, then what ever you choose in selection screen will come in the output otherwise defaut variant overrides the selected one.
Regards
vijay -
Hi,
I copied an existing Z report program to a new program to conform to the naming standards and deleted the old program. (I could do renaming as well but did it this way)
When copying the program, all object including the selection variants were copied but the ALV display variants were not copied to the target program. Any thoughts on this please?
I tried using a simple program to copy the LTDX (Generic storage of display variants) and LTDXT (Display Variant Texts) entries of the old program to the new program. I checked that all entries in LTDX of the old program now exist for the new program too. When I execute the program, only the global ALV display variants are available for selection i.e all display variants that start with u2018/u2019. The user specific variants are not available although all entries in LTDX and LTDXT for the user display are in the respective tables
Thanks for respondinding.Thanks Satyasuresh. I used a similar program that copies variant entries from tables ltdx and ltdxt for a source program to new entries in the same table for the target program.
parameters report like ltdx-report obligatory.
parameters report2 like ltdx-report obligatory.
select * into table lt_ltdx from ltdx
where report = report.
select * into table lt_ltdxt from ltdxt
where report = report.
loop at lt_ltdx.
lt_ltdx-report = report2.
modify ltdx from lt_ltdx..
endloop.
loop at lt_ltdxt.
lt_ltdxt-report = report2.
modify ltdxt from lt_ltdxt..
endloop. -
How to transport display variants in alv
Hi,
Can any one please help me in transporting alv display variants?Actually I have transported the variants ,but only selection variants are getting transported.I want to transport ALV display variants accross the clients.
Please reply soon.It is very urgent.Hi,
Please use the following :
First execute the report .
Then Menubar Settings> Layout> layout management>select your variant> menubar layout--> transport
This will work only when your variant management is activve in your ALV report. -
hi gurus,
I have a ALV Display report with Sub totals at two levels.
plant wise and category wise
plant1
category1
subtot
category2
subtot
subtot
plant2
category1
subtot
category2
subtot
subtot
Now the subtotals are being displayed for both the plant wise and category wise, but they are displayed with the same row color.
so, now i want these two subtotal rows with different ROW COLORS.
so where should i change for acheving the above.
thanks in advance.
chaitanyaHi,
Check this coding it will help you alot and also check the TCode LIBS & BIBS u can find more examples here
code&----
*& Report ZALVCOLOR *
REPORT ZALVCOLOR .
DATA : mara TYPE mara. " General Material Data
TYPE-POOLS: slis. " ALV Global types
FIELD-SYMBOLS :
<data> TYPE table. " Data to display
SELECT-OPTIONS :
s_matnr FOR mara-matnr. " Material number
SELECTION-SCREEN :
SKIP, BEGIN OF LINE,COMMENT 5(27) v_1 FOR FIELD p_max. "#EC NEEDED
PARAMETERS p_max(2) TYPE n DEFAULT '50' OBLIGATORY.
SELECTION-SCREEN END OF LINE.
INITIALIZATION.
v_1 = 'Maximum of lines to display'.
START-OF-SELECTION.
PERFORM f_read_data.
PERFORM f_display_data.
Form f_read_data
FORM f_read_data.
FIELD-SYMBOLS :
<field> TYPE ANY,
<field2> TYPE ANY,
<header> TYPE ANY,
<header2> TYPE ANY,
<lt_data> TYPE table. " Data read from DB
DATA:
lp_struct TYPE REF TO data,
lp_struct2 TYPE REF TO data,
lp_table TYPE REF TO data, " Pointer to dynamic table
lp_table2 TYPE REF TO data, " Pointer to dynamic table
ls_lvc_cat TYPE lvc_s_fcat,
lt_lvc_cat TYPE lvc_t_fcat. " Field catalog
First column
CLEAR ls_lvc_cat.
ls_lvc_cat-fieldname = 'MATNR'.
ls_lvc_cat-ref_table = 'MARA'.
APPEND ls_lvc_cat TO lt_lvc_cat.
2nd column
CLEAR ls_lvc_cat.
ls_lvc_cat-fieldname = 'MAKTX'.
ls_lvc_cat-ref_table = 'MAKT'.
APPEND ls_lvc_cat TO lt_lvc_cat.
3rd column
CLEAR ls_lvc_cat.
ls_lvc_cat-fieldname = 'MATKL'.
ls_lvc_cat-ref_table = 'MARA'.
APPEND ls_lvc_cat TO lt_lvc_cat.
Create 1st internal table
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING it_fieldcatalog = lt_lvc_cat
IMPORTING ep_table = lp_table.
ASSIGN lp_table->* TO <lt_data>.
Read data into 1st internal table
SELECT matnr maktx matkl
INTO TABLE <lt_data>
FROM v_matnr
UP TO p_max ROWS
WHERE matnr IN s_matnr.
Create 2nd internal table
Checkbox
CLEAR ls_lvc_cat.
ls_lvc_cat-fieldname = 'CHECKBOX'.
APPEND ls_lvc_cat TO lt_lvc_cat.
Table color
CLEAR ls_lvc_cat.
ls_lvc_cat-fieldname = 'TABCOLOR'.
ls_lvc_cat-ref_table = 'CALENDAR_TYPE'.
ls_lvc_cat-ref_field = 'COLTAB'.
APPEND ls_lvc_cat TO lt_lvc_cat.
Create 2nd internal table
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING it_fieldcatalog = lt_lvc_cat
IMPORTING ep_table = lp_table2.
ASSIGN lp_table2->* TO <data>.
Create structure = structure of the 1st internal table
CREATE DATA lp_struct LIKE LINE OF <lt_data>.
ASSIGN lp_struct->* TO <header>.
Create structure = structure of the 2nd internal table
CREATE DATA lp_struct2 LIKE LINE OF <data>.
ASSIGN lp_struct2->* TO <header2>.
Move data from 1st internal table --> 2nd internal table
LOOP AT <lt_data> ASSIGNING <header>.
DESCRIBE TABLE lt_lvc_cat.
CLEAR <header2>.
Fill the internal to display <data>
DO sy-tfill TIMES.
READ TABLE lt_lvc_cat INTO ls_lvc_cat INDEX sy-index.
For each field of lt_lvc_cat.
ASSIGN COMPONENT ls_lvc_cat-fieldname OF STRUCTURE <header>
TO <field>.
IF sy-subrc NE 0. EXIT .ENDIF.
ASSIGN COMPONENT ls_lvc_cat-fieldname OF STRUCTURE <header2>
TO <field2>.
IF sy-subrc NE 0. EXIT .ENDIF.
<field2> = <field>.
ENDDO.
Modify color
ASSIGN COMPONENT 'TABCOLOR' OF STRUCTURE <header2>
TO <field2>.
IF sy-subrc EQ 0.
PERFORM f_modify_color USING 'MAKTX' <field2>.
PERFORM f_modify_color USING 'MATKL' <field2>.
ENDIF.
APPEND <header2> TO <data> .
ENDLOOP.
ENDFORM. " f_read_data
Form F_DISPLAY_DATA
FORM f_display_data.
Macro definition
DEFINE m_sort.
add 1 to ls_sort-spos.
ls_sort-fieldname = &1.
ls_sort-down = 'X'.
append ls_sort to lt_sort.
END-OF-DEFINITION.
DATA:
ls_layout TYPE slis_layout_alv,
lt_sort TYPE slis_t_sortinfo_alv,
ls_sort TYPE slis_sortinfo_alv,
ls_fieldcat TYPE slis_fieldcat_alv,
lt_fieldcat TYPE slis_t_fieldcat_alv. " Field catalog
Build Fieldcatalog - First column
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'MATNR'.
ls_fieldcat-ref_tabname = 'MARA'.
ls_fieldcat-key = 'X'.
APPEND ls_fieldcat TO lt_fieldcat.
Build Fieldcatalog - 2nd column
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'MAKTX'.
ls_fieldcat-ref_tabname = 'MAKT'.
APPEND ls_fieldcat TO lt_fieldcat.
Build Fieldcatalog - 3rd column
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'MATKL'.
ls_fieldcat-ref_tabname = 'MARA'.
APPEND ls_fieldcat TO lt_fieldcat.
Layout
ls_layout-zebra = 'X'.
ls_layout-colwidth_optimize = 'X'.
ls_layout-box_fieldname = 'CHECKBOX'.
ls_layout-coltab_fieldname = 'TABCOLOR'.
m_sort 'MATNR'. " Sort by creation date
Display data
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
is_layout = ls_layout
it_fieldcat = lt_fieldcat
it_sort = lt_sort
TABLES
t_outtab = <data>.
ENDFORM. " F_DISPLAY_DATA
Form F_modify_color
FORM f_modify_color USING u_fieldname TYPE lvc_fname
ut_tabcolor TYPE table.
DATA:
l_rnd_value TYPE datatype-integer2,
ls_tabcolor TYPE lvc_s_scol.
Random value
CALL FUNCTION 'RANDOM_I2'
EXPORTING
rnd_min = 0
rnd_max = 3
IMPORTING
rnd_value = l_rnd_value.
CLEAR ls_tabcolor.
ls_tabcolor-fname = u_fieldname.
CASE l_rnd_value.
WHEN 0.
ls_tabcolor-color-col = 1. " Blue.
ls_tabcolor-color-int = 0.
ls_tabcolor-color-inv = 0.
WHEN 1.
ls_tabcolor-color-col = 3. " Yellow.
ls_tabcolor-color-int = 0.
ls_tabcolor-color-inv = 0.
WHEN 2.
ls_tabcolor-color-col = 5. " Green.
ls_tabcolor-color-int = 0.
ls_tabcolor-color-inv = 0.
WHEN 3.
ls_tabcolor-color-col = 6. " Red.
ls_tabcolor-color-int = 0.
ls_tabcolor-color-inv = 0.
ENDCASE.
INSERT ls_tabcolor INTO TABLE ut_tabcolor.
ENDFORM. " F_MODIFY_COLOR[/code]
Regards,
Raj. -
Hi All,
I m trying to display ALV in report using classes but i m not able to do it. I have used following classes for alv display along with its method.
1. cl_gui_custom_container
2. cl_gui_alv_grid and its method set_table_for_first_display
I have tried to display in module pool using classes and i have succeeded but now i m trying wid report using the same classes but i m not able to display ALV
Please provide me solution and if there exists another classes to display ALV along wid its methods.
Regards,
ParagHi,
in the report program also you have to call a screen and in the PBo write the code for display of ALV
Please check the below program:
REPORT z271837_alv_grid_container .
Important Classes : CL_GUI_ALV_GRID and CL_GUI_CUSTOM_CONTAINER.
*Steps To Use ALV Grid in a Program :
*1. Declare reference variables for,
Container (class CL_GUI_CUSTOM_CONTAINER) and
Grid (class CL_GUI_ALV_GRID)
*2. Create Standard Screen and a container on that screen
*3. Call the screen which has been created
*4. Instantiate the container control and the ALV Grid Control in PBO of the screen
Tables
TABLES : mara.
TYPE-POOLS : slis.
Data declarations
DATA : fg_error TYPE flag.
TYPES : BEGIN OF x_mara,
matnr TYPE mara-matnr,
erdda TYPE mara-ersda,
ernam TYPE mara-ernam,
mtart TYPE mara-mtart,
matkl TYPE mara-matkl,
END OF x_mara.
Declare reference variables:
DATA : cl_grid TYPE REF TO cl_gui_alv_grid,
cl_container TYPE REF TO cl_gui_custom_container.
DATA : it_mara TYPE TABLE OF x_mara,
wa_fieldcat TYPE lvc_s_fcat, " occurs 1.
it_fieldcat TYPE TABLE OF lvc_s_fcat.
Selection Screen.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS : s_matnr FOR mara-matnr.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETER : rb_list TYPE char1 RADIOBUTTON GROUP r1,
rb_grid TYPE char1 RADIOBUTTON GROUP r1 DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK b2.
START-OF-SELECTION.
CLEAR fg_error.
REFRESH it_mara.
*Get the data which is to be displayed into one internal table
SELECT matnr
ersda
ernam
mtart
matkl
FROM mara
INTO TABLE it_mara
WHERE matnr IN s_matnr.
IF sy-subrc NE 0.
MESSAGE s000(zi) WITH text-s01.
fg_error = 'X'.
EXIT.
ENDIF.
END-OF-SELECTION.
CHECK fg_error IS INITIAL.
build the field catalog
wa_fieldcat-fieldname = 'MATNR'.
wa_fieldcat-row_pos = 1.
wa_fieldcat-col_pos = 1.
wa_fieldcat-SCRTEXT_M = 'Material'.
wa_fieldcat-outputlen = 18.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'ERSDA'.
wa_fieldcat-row_pos = 1.
wa_fieldcat-col_pos = 2.
wa_fieldcat-SCRTEXT_M = 'ERSDA'.
wa_fieldcat-outputlen = 18.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'ERNAM'.
wa_fieldcat-row_pos = 1.
wa_fieldcat-col_pos = 3.
wa_fieldcat-SCRTEXT_M = 'Creator'.
wa_fieldcat-outputlen = 18.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'MTART'.
wa_fieldcat-row_pos = 1.
wa_fieldcat-col_pos = 4.
wa_fieldcat-SCRTEXT_M = 'Material Type'.
wa_fieldcat-outputlen = 18.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'MATKL'.
wa_fieldcat-row_pos = 1.
wa_fieldcat-col_pos = 5.
wa_fieldcat-SCRTEXT_M = 'Material Desc'.
wa_fieldcat-outputlen = 50.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
Call the screen with container to display ALV
CALL SCREEN 100.
PBO and PAI modules code along with ALV container and display methods
INCLUDE z271837_alv_grid_container_o01.
***INCLUDE Z271837_ALV_GRID_CONTAINER_O01 .
*& Module STATUS_0100 OUTPUT
text
MODULE status_0100 OUTPUT.
SET PF-STATUS '0100'.
SET TITLEBAR 'xxx'.
Instantiate the container control and the ALV Grid
Control in PBO of the screen
IF cl_container IS INITIAL.
Instantiate the container control
CREATE OBJECT cl_container
EXPORTING
PARENT =
container_name = 'C1_CONTAINER'
STYLE =
LIFETIME = lifetime_default
REPID =
DYNNR =
NO_AUTODEF_PROGID_DYNNR =
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
OTHERS = 6
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Instantiate the ALV grid
CREATE OBJECT cl_grid
EXPORTING
I_SHELLSTYLE = 0
I_LIFETIME =
i_parent = cl_container " Container object created above
I_APPL_EVENTS = space
I_PARENTDBG =
I_APPLOGPARENT =
I_GRAPHICSPARENT =
I_NAME =
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
OTHERS = 5
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
*For displaying the data, call the method "set_table_for_first_display"
*of object reference of CL_GUI_ALV_GRID
CALL METHOD cl_grid->set_table_for_first_display
EXPORTING
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME =
IS_VARIANT =
I_SAVE =
I_DEFAULT = 'X'
IS_LAYOUT =
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING =
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
CHANGING
it_outtab = it_mara
it_fieldcatalog = it_fieldcat
IT_SORT =
IT_FILTER =
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
others = 4
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
text
MODULE user_command_0100 INPUT.
*Refresh grid display
CALL METHOD cl_grid->refresh_table_display.
CASE sy-ucomm.
WHEN 'BACK'.
Comes back to the previous screen
SET SCREEN 0.
WHEN 'EXIT'
OR 'CANCEL'.
Exit from the application/program
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
Reward if useful
Regards
Shiva -
ALV problem (with filter use)
Hi all !!
When setting a filter on ALV grid (called with fm 'Reuse_alv_grid_display') after enter, the selection field are truncated at 10 bytes, also using a match code .
the result of the list is consequently mistaken.
Somebody know how to fix that ??
Regards , AndreaHi,
Can you explain a little more? How are you setting the filter, and F4 at what place, is this a editable field which is having this issue?
Regards,
Ravi -
Problem in saving layout in ALV's
Hi all!
I am getting a strange problem in ALV's .For an ALV report some users are able to save the layouts where as some are not able to save .Why is it happening so? I have mentioned IS_SAVE = 'X' in my func.module REUSE_ALV_GRID_DISPLAY.Please help.Hi,
You Have to call the Fm Reuse_alv_variant_f4
SELECTION-SCREEN : BEGIN OF BLOCK blk3 WITH FRAME TITLE text-003.
PARAMETER:p_var TYPE disvariant-variant MODIF ID p2. "Variant Part
SELECTION-SCREEN:END OF BLOCK blk3.
Data: wa_variant TYPE disvariant,
wa_variant1 TYPE disvariant.
CONSTANTS:c_x(1) TYPE c VALUE'X',
lc_a(1) TYPE c VALUE 'A',
FORM alv_variant .
wa_variant-username = sy-uname.
wa_variant-report = sy-repid.
*For variant Part
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = wa_variant
i_save = lc_a
IMPORTING
es_variant = wa_variant1
EXCEPTIONS
not_found = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
p_var = wa_variant-variant.
ELSE.
p_var = wa_variant1-variant.
ENDIF.
ENDFORM. " alv_variant
After That
*display variant
wa_variant-report = sy-repid.
IF NOT p_var IS INITIAL.
wa_variant-variant = p_var.
ENDIF.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_callback_pf_status_set = 'PF_STATUS'
i_callback_user_command = 'USER_COMMAND'
is_layout = lwa_layout
it_fieldcat = gi_fieldcat
is_variant = wa_variant
i_default = c_x
i_save = lc_a
TABLES
t_outtab = gi_final
EXCEPTIONS
program_error = 1
OTHERS = 2.
Regards
Sandipan -
To Display Output in Grid ALV with change of some field display total with
Hi Masters,
I m working on ALV in which i have to display output with the following format.
Header
"Some String" date/time
User:XYZ01 page 1
Line
1st field 2nd 3rd 4th 5th 6th 7th 8th 9th 10th field
x y z A B C D E F G
BLANK..............................................................................
"total 3rd+4TH" P Q R S T
same thing for every change of 4th field .
So the problem is with inserting the line with string "Total of 3rd+4th" in the output .
Can Anyone help me out?
Thanks ,
Varlani AmitHi,
Use control-break statement ON-CHANGE for the 4th field, and do the changes.
regards,
sri -
Problem While Saving the editable ALV GRID
Dear Experts,
I have a scenario in which i am display the ALV(using class) with some data in the custom container of module pool screen in the non-editable mode.Also i have save and edit buttons.If i click the edit button i have written the code to edit the some columns in the ALV grid, it is working fine.After editing it,when i click the save button then ALV has to refreshed with edited data and then it should go to non editable mode but it is not working.I have written the code for changing the editable ALv to non editable mode as follows :
call method c_alvgd->set_ready_for_input
exporting
i_ready_for_input = 0.
*****Row and column of the alv are refreshed after changing values
stable-row = 'X'.
stable-col = 'X'.
*REfreshed ALV display with the changed values
*This ALV is non editable and contains new values
call method c_alvgd->refresh_table_display
exporting
is_stable = stable
exceptions
finished = 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.
Could you Suggest me solution for this issue ?
Thanks & Regards,
R.Dhineshraj.Dhinesh,
I suppose that you are able to get your changes values on screen but not able to get your field in DISPLAY mode from editable mode, let me know if this is not your problem.
When you press SAVE, after the PAI, again PBO will run and hence the editable code for that field will overwrite which will keep it editable.
So, do something like this.
data: gv_edit value 'X'..... "global variable in TOP include
PBO....
loop at ...
if gv_edit = 'X'.
CALL METHOD lo_alv->set_ready_for_input
EXPORTING
i_ready_for_input = 1.
else.
CALL METHOD lo_alv->set_ready_for_input
EXPORTING
i_ready_for_input = 0.
endif.
endloop.
PAI.
when 'SAVE'.
gv_edit = space.
When 'EDIT'.
gv_edit = 'X'.
Regards,
Diwakar
Maybe you are looking for
-
SET PARAMETER AND GET PARAMETER
What is the difference between Set parameter and Get parameter?
-
Can't find drivers for Satellite M30-842
Hello, I am a repair technician, and I am repairing a European model Satellite with corrupted Windows; I have reformatted and I am installing Windows with my generic Windows XP Home CD. I have had no luck finding the drivers for (as listed in Device
-
Hello Kind Community Gurus, The day before yesterday I connected my iPad with my Mac to update it to the latest version of iOS8.1. My Mac configuration is as follows: MBA 2012, Yosemite 10.10, and iTunes 12.0. My iPad backups were on the iCloud (not
-
Text shifting out of alignment when previewed in Muse or in web browser
Hi, I am having issues with some title text not staying where I want it to. Here are some images: http://imgur.com/a/ZX6z9 The first image shows how I have the page set up in the planner. The text in question is the title "Art Portfolio". If you look
-
What adapter to buy to attach the power from my Mac Monitor to my Mac Pro
I bought a Mac Monitor but I need to know what I need to attach the power to the Mac Pro. I can attach the video and it has some USB connectors but I can not figure out how to plug it in to the power.