Dynamic ALV Grid is not displaying !!
Hi all,
I am trying to create dynamic alv grids and upto five levels(five grids) out put is displaying fine without any problem. But when I try to display the 6th grid, the program is going into infinite loop and getting timed out. Even I tried to increse the height of the grid even though it is not displaying.
Please correct me if any thing is wrong in below code.
*1st Level grid
IF <table1> IS ASSIGNED AND <table1> IS NOT INITIAL.
CREATE OBJECT ob_split1
EXPORTING
parent = ob_custom
orientation = cl_gui_easy_splitter_container=>orientation_vertical.
PERFORM set_split_height USING ob_split1 '20'.
CREATE OBJECT ob_grid1
EXPORTING
i_parent = ob_split1->top_left_container.
ELSE.
CREATE OBJECT ob_split1
EXPORTING
parent = ob_custom
orientation = cl_gui_easy_splitter_container=>orientation_vertical.
PERFORM set_split_height USING ob_split1 '0'.
ENDIF.
*2nd Level grid
IF <table2> IS ASSIGNED AND <table2> IS NOT INITIAL.
CREATE OBJECT ob_split2
EXPORTING
parent = ob_split1->bottom_right_container
orientation = cl_gui_easy_splitter_container=>orientation_vertical.
PERFORM set_split_height USING ob_split2 '20'.
CREATE OBJECT ob_grid2
EXPORTING
i_parent = ob_split2->top_left_container.
ELSE.
CREATE OBJECT ob_split2
EXPORTING
parent = ob_split1->bottom_right_container
orientation = cl_gui_easy_splitter_container=>orientation_vertical.
PERFORM set_split_height USING ob_split2 '0'.
ENDIF.
(Created 3rd,4th,5th same like above).
*6th Level grid
IF <table6> IS ASSIGNED AND <table6> IS NOT INITIAL.
CREATE OBJECT ob_split6
EXPORTING
parent = ob_split5->bottom_right_container
orientation = cl_gui_easy_splitter_container=>orientation_vertical.
PERFORM set_split_height USING ob_split6 '20'.
CREATE OBJECT ob_grid6
EXPORTING
i_parent = ob_split6->top_left_container.
ELSE.
CREATE OBJECT ob_split6
EXPORTING
parent = ob_split5->bottom_right_container
orientation = cl_gui_easy_splitter_container=>orientation_vertical.
PERFORM set_split_height USING ob_split6 '0'.
ENDIF.
Appreciated your reply. Please let me know for additional info.
Thanks,
Ranjith.
Edited by: Thomas Zloch on Dec 8, 2010 5:44 PM - please use code tags
Hi romanch,
defining the field catalog you must reference all currency fields to the respective currency key field (type CUKY).
<alv_fieldcat>-cfieldname = 'HWAER'.
This is sample for alv output of a currency field. The alv structure has a field HWAER which carries the currency key, e.g. USD or so.
Obviously you do not provide a cutrrency key for your values. If they are initial (zero), ALV will not display them as 0,00 but leave the field empty if the reference too currency key is not established.
If you define a DDIC structure for the ALV output this refernce is enforced. You can pass the DDIC structure name to the ALV and don not have to create the field catalog manually.
Regards,
Clemens
Similar Messages
-
ALV grid is not displaying few fields of final internal table of type DMBTR
hello frnds,
i am displaying 10 fields in ALV grid using field catalog.
among them five fields are currency fields on which i doing some arithematic operations. but all these fields are not getting displayed in alv grid.
here is my code....
declaring final strucutre to generate report
TYPES:BEGIN OF ty_final,
gjahr TYPE gjahr, " Year
wwert TYPE wwert_d, " Traslation date
bukrs TYPE bukrs, " company code
hkont TYPE hkont, " General ledger account
txt20 TYPE txt20_skat, " Account name
belnr TYPE belnr_d, " Purchase order number
shkzg TYPE shkzg, " Dt/Cr indicator
dmbtr1 TYPE dmbtr, " Ammount in local currency
v_alc TYPE dmbtr, " Ammount in local currency
wrbtr TYPE wrbtr, " Ammount in foreign currency
ebeln TYPE ebeln, " Purchase order number
ebelp TYPE ebelp, " Item number
matnr TYPE matnr, " Material number
menge TYPE menge_d, " Qunatity
meins TYPE meins, " Unit of measure
stprs TYPE stprs, " Std material master
v_iv TYPE dmbtr, " Invoice value
pswsl TYPE pswsl, " Currency
v_erc TYPE dmbtr, " Exchange rate calculated
v_op TYPE dmbtr, " Order price
v_uos TYPE dmbtr, " Unit order to stock
v_io TYPE dmbtr, " Invoice to order
v_uv TYPE dmbtr, " Unit value
v_t TYPE dmbtr, " Total
v_d TYPE dmbtr, " Differecne
netpr TYPE bprei, " Net price in purchasing document
v_total TYPE dmbtr, " Total
v_os TYPE dmbtr, " Order to stock
v_ito TYPE dmbtr, " Invoice to order
saknr TYPE saknr, " G/L account number
END OF ty_final.
FORM move_data.
IF NOT i_bseg[] IS INITIAL.
LOOP AT i_bseg INTO wa_bseg.
wa_final-gjahr = wa_bseg-gjahr.
wa_final-bukrs = wa_bseg-bukrs.
wa_final-hkont = wa_bseg-hkont.
wa_final-belnr = wa_bseg-belnr.
wa_final-shkzg = wa_bseg-shkzg.
wa_final-wrbtr = wa_bseg-wrbtr.
wa_final-ebeln = wa_bseg-ebeln.
wa_final-ebelp = wa_bseg-ebelp.
wa_final-matnr = wa_bseg-matnr.
wa_final-menge = wa_bseg-menge.
wa_final-meins = wa_bseg-meins.
wa_final-pswsl = wa_bseg-pswsl.
wa_final-dmbtr1 = wa_bseg-dmbtr.
wa_final-saknr = wa_bseg-saknr.
wa_final-v_total = wa_bseg-dmbtr.
READ TABLE i_bkpf INTO wa_bkpf WITH KEY bukrs = wa_bseg-bukrs.
IF sy-subrc = 0.
wa_final-wwert = wa_bkpf-wwert.
ENDIF.
CLEAR wa_bkpf.
READ TABLE i_mbew INTO wa_mbew WITH KEY matnr = wa_bseg-matnr.
IF sy-subrc = 0.
wa_final-stprs = wa_mbew-stprs.
ENDIF.
CLEAR wa_mbew.
READ TABLE i_ekpo INTO wa_ekpo WITH KEY ebeln = wa_bseg-ebeln.
IF sy-subrc = 0.
wa_final-netpr = wa_ekpo-netpr.
ENDIF.
CLEAR wa_ekpo.
READ TABLE i_skat INTO wa_skat WITH KEY saknr = wa_bseg-saknr.
IF sy-subrc = 0.
wa_final-txt20 = wa_skat-txt20.
ENDIF.
calculating output values
IF wa_bseg-shkzg = 'H'.
wa_final-v_alc = -1 * wa_bseg-dmbtr.
ELSEIF wa_bseg-shkzg = 'S'.
wa_final-v_alc = 1 * wa_bseg-dmbtr.
ENDIF.
DATA : l_c_v_alc TYPE p DECIMALS 2,
l_c_v_iv TYPE p DECIMALS 2.
l_c_v_alc = wa_final-v_alc.
IF wa_bseg-menge NE 0.
wa_final-v_iv = wa_bseg-dmbtr / wa_bseg-menge.
ENDIF.
IF wa_bseg-dmbtr NE 0.
wa_final-v_erc = wa_bseg-wrbtr / wa_final-dmbtr1.
ENDIF.
IF wa_final-v_erc NE 0.
wa_final-v_op = wa_ekpo-netpr / wa_final-v_erc.
ENDIF.
wa_final-v_uos = wa_mbew-stprs - wa_final-v_op.
wa_final-v_io = wa_final-v_iv + wa_final-v_uos.
wa_final-v_uv = wa_final-v_uos + wa_final-v_io.
wa_final-v_t = wa_final-v_uv + wa_bseg-menge.
wa_final-v_d = wa_final-v_t - wa_final-v_alc.
wa_final-v_os = wa_final-v_uos * wa_bseg-menge.
wa_final-v_ito = wa_final-v_io * wa_bseg-menge.
CLEAR wa_bseg.
APPEND wa_final TO i_final.
CLEAR wa_final.
ENDLOOP.
ENDIF.
ENDFORM. "data_retrieval
*& Form build_fieldcat
text
--> p1 text
<-- p2 text
FORM build_fieldcat.
CLEAR wa_fieldcat.
* TYPES : v_alc TYPE dmbtr. "curr. " decimal 2.
DATA: l_c_v_alc TYPE p DECIMALS 2,
l_c_v_iv TYPE p DECIMALS 2 .
l_c_v_alc = v_alc.
l_c_v_iv = v_iv.
Constant Declarations.
CONSTANTS:
l_c_gjahr(5) TYPE c VALUE 'GJAHR', " Year
l_c_wwert(5) TYPE c VALUE 'WWERT', " Traslation date
l_c_bukrs(5) TYPE c VALUE 'BUKRS', " company code
l_c_hkont(5) TYPE c VALUE 'HKONT', " General ledger account
l_c_txt20(10) TYPE c VALUE 'TXT20', " Account name
l_c_belnr(5) TYPE c VALUE 'BELNR', " Doc number
l_c_shkzg(5) TYPE c VALUE 'SHKZG', " Dt/Cr indicator
l_c_dmbtr(5) TYPE c VALUE 'DMBTR1', " Ammount in local currency
" l_c_v_alc TYPE c VALUE 'V_ALC', " Ammount in local currency
l_c_wrbtr(5) TYPE c VALUE 'WRBTR', " Ammount in foreign currency
l_c_ebeln(5) TYPE c VALUE 'EBELN', " Purchase order number
l_c_ebelp(5) TYPE c VALUE 'EBELP', " Item number
l_c_matnr(5) TYPE c VALUE 'MATNR', " Material number
l_c_menge(7) TYPE c VALUE 'MENGE', " Qunatity
l_c_meins(5) TYPE c VALUE 'MEINS', " Unit of measure
l_c_stprs(5) TYPE c VALUE 'STPRS', " Std material master
" l_c_v_iv(4) TYPE c VALUE 'V_IV', " Invoice value
l_c_pswsl(5) TYPE c VALUE 'PSWSL', " Currency
l_c_v_erc(5) TYPE c VALUE 'V_ERC', " Exchange rate calculated
l_c_v_op(4) TYPE c VALUE 'V_OP', " Order price
l_c_v_uos(5) TYPE c VALUE 'V_UOS', " Unit order to stock
l_c_v_io(4) TYPE c VALUE 'V_IO', " Invoice to order
l_c_v_uv(4) TYPE c VALUE 'V_UV', " Unit value
l_c_v_t(3) TYPE c VALUE 'V_T', " Total
l_c_v_d(3) TYPE c VALUE 'V_D', " Differecne
l_c_netpr(5) TYPE c VALUE 'NETPR', " Net price in purchasing document
l_c_v_total(7) TYPE c VALUE 'V_TOTAL', " Total
l_c_v_os(4) TYPE c VALUE 'V_OS', " Order to stock
l_c_v_ito(5) TYPE c VALUE 'V_ITO', " Invoice to order
l_c_saknr(5) TYPE c VALUE 'SAKNR', " G/L account number
l_c_i_final(7) TYPE c VALUE 'I_FINAL'. " Final internal table
Fieldcat for fiscal year
wa_fieldcat-col_pos = 1.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_gjahr.
wa_fieldcat-seltext_m = text-007.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Translation date
wa_fieldcat-col_pos = 2.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_wwert.
wa_fieldcat-seltext_m = text-008.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Company code
wa_fieldcat-col_pos = 3.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_bukrs.
wa_fieldcat-seltext_m = text-009.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for General ledger account
wa_fieldcat-col_pos = 4.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_hkont.
wa_fieldcat-seltext_m = text-010.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Account name
wa_fieldcat-col_pos = 5.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_txt20.
wa_fieldcat-seltext_m = text-011.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Doc number
wa_fieldcat-col_pos = 6.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_belnr.
wa_fieldcat-seltext_m = text-012.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Dt/Cr indicator
wa_fieldcat-col_pos = 7.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_shkzg.
wa_fieldcat-seltext_m = text-013.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Ammount in local currency
wa_fieldcat-col_pos = 8.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = 'DMBTR1'.
wa_fieldcat-seltext_m = text-014.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Ammount in local currency
wa_fieldcat-col_pos = 9.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = 'V_ALC'.
wa_fieldcat-seltext_m = text-015.
wa_fieldcat-ref_fieldname = 'DMBTR'.
wa_fieldcat-no_sign = 'X'.
wa_fieldcat-do_sum = c_x.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Ammount in foreign currency
wa_fieldcat-col_pos = 10.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_wrbtr.
wa_fieldcat-seltext_m = text-016.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Purchse order number
wa_fieldcat-col_pos = 11.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_ebeln.
wa_fieldcat-seltext_m = text-017.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Item No
wa_fieldcat-col_pos = 12.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_ebelp.
wa_fieldcat-seltext_m = text-018.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Material number
wa_fieldcat-col_pos = 13.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_matnr.
wa_fieldcat-seltext_m = text-019.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Qunatity
wa_fieldcat-col_pos = 14.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_menge.
wa_fieldcat-seltext_m = text-020.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Unit of measure
wa_fieldcat-col_pos = 15.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_meins.
wa_fieldcat-seltext_m = text-021.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Std material master
wa_fieldcat-col_pos = 16.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_stprs.
wa_fieldcat-seltext_m = text-022.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Invoice value,
wa_fieldcat-col_pos = 17.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = 'V_IV'.
wa_fieldcat-seltext_m = text-023.
wa_fieldcat-ref_fieldname = 'DMBTR'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Currency
wa_fieldcat-col_pos = 18.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_pswsl.
wa_fieldcat-seltext_m = text-024.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Exchange rate calculated
wa_fieldcat-col_pos = 19.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = 'V_ERC'.
wa_fieldcat-seltext_m = text-025.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Order price
wa_fieldcat-col_pos = 20.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_v_op.
wa_fieldcat-seltext_m = text-026.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Unit order to stock
wa_fieldcat-col_pos = 21.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_v_uos.
wa_fieldcat-seltext_m = text-027.
wa_fieldcat-do_sum = c_x.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Invoice to order
wa_fieldcat-col_pos = 22.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_v_io.
wa_fieldcat-seltext_m = text-028.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Unit value
wa_fieldcat-col_pos = 23.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_v_uv.
wa_fieldcat-seltext_m = text-029.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Total
wa_fieldcat-col_pos = 24.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_v_t.
wa_fieldcat-seltext_m = text-030.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Difference
wa_fieldcat-col_pos = 25.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_v_d.
wa_fieldcat-seltext_m = text-031.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Net Price in Purchasing Document
wa_fieldcat-col_pos = 26.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_netpr.
wa_fieldcat-seltext_m = text-032.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Total
wa_fieldcat-col_pos = 27.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_v_total.
wa_fieldcat-seltext_m = text-033.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Order to stock
wa_fieldcat-col_pos = 28.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_v_os.
wa_fieldcat-seltext_m = text-034.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
Fieldcat for Invoice to order
wa_fieldcat-col_pos = 29.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_v_ito.
wa_fieldcat-seltext_m = text-035.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
fieldcat for invoice to order
wa_fieldcat-col_pos = 30.
wa_fieldcat-tabname = l_c_i_final.
wa_fieldcat-fieldname = l_c_saknr.
wa_fieldcat-seltext_m = text-035.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
ENDFORM. "build_fieldcatHi romanch,
defining the field catalog you must reference all currency fields to the respective currency key field (type CUKY).
<alv_fieldcat>-cfieldname = 'HWAER'.
This is sample for alv output of a currency field. The alv structure has a field HWAER which carries the currency key, e.g. USD or so.
Obviously you do not provide a cutrrency key for your values. If they are initial (zero), ALV will not display them as 0,00 but leave the field empty if the reference too currency key is not established.
If you define a DDIC structure for the ALV output this refernce is enforced. You can pass the DDIC structure name to the ALV and don not have to create the field catalog manually.
Regards,
Clemens -
ALV Grid is not Displaying after executing?
Hi Guys,
I am using ALV grid in my program with OO Concepts.I was not able to see the final o/p after entering the data into the selection Screen.Can anybody tell me what's the reason.I am sending u the code.
Call Method grid1->set_table_for_first_display
Exporting I_Structure_name = 'T_FINAL_OUT'
Changing it_outtab = i_final_out1[]
it_fieldcatalog = I_FCAT
Exceptions
Invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
Others = 4.
If sy-subrc <> 0.
ENDIF.
Please respond to this mail
Thanks,
Gopi.Hi Ashish,
I tried like what u told. but its not working.
I am sending u the complete code.
My only doubt is regarding Container does i need to crerate a conatiner .I created a custome control also but same problem
Data : grid1 type ref to cl_gui_alv_grid,
g_custom_container type ref to cl_gui_custom_container,
i_FCAT TYPE LVC_T_FCAT,
i_FCAT_str type lvc_s_fcat,
Structure for layout
i_layout_s TYPE lvc_s_layo,
i_lvccat TYPE lvc_t_fcat,
INITIALIZATION of Fields
Initialization.
v_repid = sy-repid.
set screen '101'.
MODULE STATUS_0101 output.
if g_custom_container is initial .
create object g_custom_container
Exporting
Container_name = 'CCCONTAINER'
Exceptions
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
Others = 5.
If sy-subrc <> 0.
ENDIF.
Create Object grid1
Exporting
I_Parent = g_custom_container
Exceptions
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
Others = 5.
If sy-subrc <> 0.
ENDIF.
Start-OF-Selection
i_FCAT_str-col_pos = 1.
i_FCAT_str-fieldname = 'MATNR'.
i_FCAT_str-tabname = 'I_FINAL_OUT1'.
i_fcat_str-seltext = Text-024.
append i_FCAT_str to i_FCAT.
clear i_FCAT_str.
i_FCAT_str-col_pos = 2.
i_FCAT_str-fieldname = 'GJAHR'.
i_FCAT_str-tabname = 'I_FINAL_OUT1'.
i_fcat_str-seltext = Text-012.
append i_FCAT_str to i_FCAT.
clear i_FCAT_str.
i_FCAT_str-col_pos = 3.
i_FCAT_str-fieldname = 'PERIO'.
i_FCAT_str-tabname = 'I_FINAL_OUT1'.
i_fcat_str-seltext = Text-013.
append i_FCAT_str to i_FCAT.
clear i_FCAT_str.
i_FCAT_str-col_pos = 4.
i_FCAT_str-fieldname = 'LIFNR_ND1'.
i_FCAT_str-tabname = 'I_FINAL_OUT1'.
i_fcat_str-seltext = Text-014.
append i_FCAT_str to i_FCAT.
clear i_FCAT_str.
if not grid1 is Initial.
If sy-SUBRC = 0.
Call Method grid1->set_table_for_first_display
Exporting
I_STRUCTURE_NAME = 'I_FCAT'
IS_LAYOUT = i_layout_s
Changing it_outtab = i_final_out1[]
it_fieldcatalog = I_FCAT
Exceptions
Invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
Others = 4.
If sy-subrc <> 0.
ENDIF.
ENDIF.
Else.
if g_custom_container is initial .
create object g_custom_container
Exporting
Container_name = 'CCCONTAINER'
Exceptions
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
Others = 5.
If sy-subrc <> 0.
ENDIF.
Create Object grid1
Exporting
I_Parent = g_custom_container
Exceptions
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
Others = 5.
If sy-subrc <> 0.
ENDIF.
Call Method grid1->set_table_for_first_display
Exporting
I_STRUCTURE_NAME = 'I_FCAT'
IS_LAYOUT = i_layout_s
Changing it_outtab = i_final_out1[]
it_fieldcatalog = I_FCAT
Exceptions
Invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
Others = 4.
If sy-subrc <> 0.
ENDIF.
Endif.
ENDIF.
Thanks,
Gopi. -
New ALV Grid Field not Displaying?
I revised a report to have a new column. So I added this new field to the code.
I see the field and the value when I call
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
Bbut the field I added does not display.
Thank-you.Hi,
Please ensure that you added the related logic in the FIELD CATALOG of the ALV.
Regards,
Nirmal -
Create deep structure to disable some cells in Dynamic ALV GRID
Hi,
I want to disable some cells in a Dynamic ALV Grid before calling "SET_tABLE_Display" Method.
I check the BCALV_EDIT_02, where some cells are grayed out by assign the CL_GUI_ALV_GRID-MC_STYLE_DISABLED to the field name.
But I want the same using Field symbol.
I'm creating Dynamic table and dynamic structure based on the Dynamic field catalog.
Example: <FT_TAB> TYPE STANDARD TABLE,
<FS_TAB> TYPE ANY,
DATA: INT_TAB is my dynamic table values.
For the INT_TAB internal table, I created dynamic Structure and dynamic field symbol table.
LOOP AT INT_TAB.
ASSIGN COMPONENT 'MATNR' OF STRUCTURE <FS_TAB> TO <F_VALUE>
<F_VALUE> = INT_TAB-MATNR.
APPEND <FS_TAB> TO <FT_TAB>
"Here is the problem occurs, I want to grayed out the MATNR value based on some condition.
ENDLOOP.
I would like to set the 'MATNR' value to be grayed out by passing the CL_GUI_ALV_GRID-MC_STYLE_DISABLED.
and update into <FT_TAB>( <FT_TAB> structure will have 2 structures)
Finally the fieldsymbol should have two structure ( <F_TAB> = DYNAMIC STRUCTURE + LVC_S_STYLE )
Display alv grid by passing <FT_TAB> to set_table_display method.
Thanks in advance,
Kumar.Hi,
I am not sure whether I really understand your request. Let me try to help.
> Example: <FT_TAB> TYPE STANDARD TABLE,
> <FS_TAB> TYPE ANY,
>
> DATA: INT_TAB is my dynamic table values.
>
>
> LOOP AT INT_TAB.
> ASSIGN COMPONENT 'MATNR' OF STRUCTURE <FS_TAB> TO <F_VALUE>
> <F_VALUE> = INT_TAB-MATNR.
> APPEND <FS_TAB> TO <FT_TAB>
Here <FT_TAB> must already be assigned to some internal table with a given (dynamic) structure. Did this happen before this piece of code?
What I would do is to create a dynamic table (see documentation to CREATE DATA) with MATNR and the STYLE field (LVC_T_STYL). See the documentation for CREATE DATA - creation of internal tables. When collection the field descriptions for that internal table I would also build the field catalogue for the ALV.
Then assign <FT_TAB> to that newly created internal table, <FS_TAB> to a newly created structure (same as a table line).
Move the MATNR to component 1 (or component 'MATNR') of the table and fill the style table according to your needs. Then insert the <FS_TAB> into <FT_TAB>.
Finally call the ALV SET_TABLE... method with your dynamic table and your field catalogue.
Regards,
Gerd Rother -
Hi experts, how are you.
What is the difference between ALV Grid Display and ALV List Display?ALV LIST Can be coded using only FMs
ALV GRID Can be coded using FMs and object oriented concepts
ALV LIST Can be displayed hieraicharlly
ALV GRID cannot be displayed hierarichally
ALV grid uses ActiveX controls
present on the Presentation Server.
Hence, it consumes More Memory
on the presentation server.
ALV LIST is Display Only.
Whereas
ALV Grid Can Be made EDITABLE for entry purpose.
In alv grid, these options are possible,
but not in alv list.
without horizontal lines
without vertical lines
without cell merging during sorts
display total lines above the entries
Thanks
Seshu -
Hi experts,
I am having a dynamic ALV grid. How to create a new grid(second grid) in the same page with different values?
Thanks&Regards,
vinoAdd 2 view containers, create 2 different usages of AVL component and embed the view of these 2 alv components in 2 view containers..
Hope this helps
manas dua -
Radio button in dynamic ALV grid
Hi guys!
I want to implement a dynamical ALV grid with a radiobutton in the first column.
when clicking a button, or processing the program i want to get the information of the selected row and perform other things....
Can someone help me with a code example for this, or just tell me where i can find the necessary information`?
regards
thomasHi,
I dont understand why you need Radio button, If you use REUSE_ALV_GRID_DISPLAY the output grid will by default allow you to select only one row.
see the program - BCALV_FULLSCREEN_DEMO for more information -
ALV Grid Subscreen to Display Text
Folks,
I am really sorry I am creating a new thread for this because I can see it has been discussed a lot but I am finding it hard to clearly identify what needs to be done from all the posts.
I have an ABAP with a selection screen, it runs and generates an ALV output, on that ALV output I have a column called COMMENT, in the column COMMENT there is a string of text which can be very large. Since I can not change the row height on the ALV grid I am going to implement a work-around where when the user double-clicks on the comment, it pops up a screen displaying the full text.
I presume I need to call a subscreen to get this to happen but I can not see how to do this and any help would be greatly appreciated.
Many Thanks,
Colm
P.S. Here is how I catch the double click.
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield. "#EC CALLED
DATA: w_ans(1).
CASE r_ucomm. "The users command
WHEN '&IC1'. "Double Click
*Doc drill down
IF rs_selfield-fieldname = 'COMMENT'.
READ TABLE gt_output INDEX rs_selfield-tabindex.
IF sy-subrc = 0.
*Call the screen here displaying the full note text
ENDIF.I feel so foolish, I was trying to re-invent the wheel and didn't think before I asked. Apologies and Thanks.
However, if for some reason I didn't want to use the POPUP_TEXT FM, is there a way I could have called the subscreen?
Here is the code I used if anyone is interested:
DATA: w_ans(1),
lt_text TYPE TABLE OF trtab,
ls_title TYPE c,
crlf(2) TYPE c VALUE cl_abap_char_utilities=>cr_lf.
CASE r_ucomm. "The users command
WHEN '&IC1'. "Double Click
*Doc drill down
IF rs_selfield-fieldname = 'COMMENT'.
READ TABLE gt_output INDEX rs_selfield-tabindex.
IF sy-subrc = 0.
SPLIT gt_output-comment AT crlf INTO TABLE lt_text.
CALL FUNCTION 'LAW_SHOW_POPUP_WITH_TEXT'
EXPORTING
titelbar = ls_title
line_size = 132
TABLES
list_tab = lt_text. -
How to validate the columns in dynamic alv grid
Hi Friends,
I want to validatethe value of all the columens (min 1 and max 40) which i create dynamically in alv grid.
value must be between 0 and 1 only.
Please help ,, need urgently.method handle_data_changed.
data: ls_good type lvc_s_modi,
li_diff type i,
value type p DECIMALS 3,
old_value type p DECIMALS 3,
lw_outtab1 type gt_tab.
clear value.
loop at er_data_changed->mt_good_cells into ls_good.
value = ls_good-value.
old_value = ls_good-value.
if value lt 0 or value gt 1.
MESSAGE 'Value is out of range' TYPE 'I'.
Read table gt_outtab1 into lw_outtab1 index ls_good-row_id .
perform show_alv.
clear ls_good.
ENDIF.
ENDCASE.
ENDLOOP.
I again created the table.. actually data is not changed in the internal table but still it shows the changed value in the alv grid. even in build the table again and call the refersh alv grid method.. -
COOIS- Report Grid Value not displaying
Hi Experts,
In COOIS report Prd Order item details , the grid values and stock category are not displaying values. we created the production order with AFS grid but while seeing report of item details the grid values and stock category are showing null values.
initial screen,
Report
but production order contains grid values.
any one guide me to resolve it.
Regards,
Thangam.P
Message was edited by: Thangam PerumalHi ,
my requirement is need to show the grid value and stock category of AFS production order based on item details. i think that alv reports is working based on view. it is possible to add custom view for that report? . if possible mean to any one guide me to fix the problem.
Regards,
Thangam.P -
Dynamic ALV GRID screen in a class? Possible?
I have created a class(I have done it locally as to be able to use it for mutiple clients) that I include in programs that I want to implement the alv grid for using the FM approach. Doing this allows me to easily implement the ALV quickly. However, I am wanting to use the OO ALV grid approach since there is more flexibility and control doing it this way. But I do not want to have to create a screen for every program that I want to do this for, I would like to just have a method in my existing class that would call a screen and then be able to control it like normal. I know that screens can not be called from a method so I was thinking of doing something similiar to another post using a FM to call the screen. I realize that this could be complicated because certain methods for the ALV GRID are called in the PBO/PAI events. Any help or suggestions would be appreciated.
Note: I am on 6.20 and have searched all over the web before posting.
Thanks.Yes, i have written a function module which calls a generice ALV grid in a dialog box. Everything about the ALV grid is encapsulated in a function module. In this case, all I need to do is send this function module a fieldcatalog and the data, that's about it. Doing this may limit the functionality of event handling or you would just have to handle everything by doing more code for it.. This function module is very simple, not a whole lot to it. You could do something like this only instead of using a model dialog box, you would throw a regular dynpro.
function z_popup_with_alvgrid.
*"*"Global interface:
*" IMPORTING
*" REFERENCE(ENDPOS_COL) TYPE I DEFAULT 90
*" REFERENCE(ENDPOS_ROW) TYPE I DEFAULT 22
*" REFERENCE(STARTPOS_COL) TYPE I DEFAULT 10
*" REFERENCE(STARTPOS_ROW) TYPE I DEFAULT 2
*" REFERENCE(TEXTLINE1) TYPE C OPTIONAL
*" REFERENCE(TEXTLINE2) TYPE C OPTIONAL
*" REFERENCE(TEXTLINE3) TYPE C OPTIONAL
*" REFERENCE(TEXTLINE4) TYPE C OPTIONAL
*" REFERENCE(TITLE) TYPE C OPTIONAL
*" REFERENCE(FIELDCAT) TYPE LVC_T_FCAT
*" TABLES
*" I_ALV
call screen 0200 starting at startpos_col
startpos_row
ending at endpos_col
endpos_row.
endfunction.
* Module STATUS_0200 OUTPUT
module status_0200 output.
set pf-status '0200'.
set titlebar '0200' with title.
data: alv_container type ref to cl_gui_custom_container.
data: alv_grid type ref to cl_gui_alv_grid.
data: xfieldcat type lvc_t_fcat.
xfieldcat = fieldcat.
* Create Controls
create object:
alv_container
exporting
container_name = 'ALV_CONTAINER',
alv_grid
exporting
i_parent = alv_container.
* Set grid for first display
call method alv_grid->set_table_for_first_display(
exporting
i_structure_name = 'I_ALV'
changing
it_outtab = i_alv[]
it_fieldcatalog = xfieldcat[] ).
endmodule.
* Module USER_COMMAND_0100 INPUT
module user_command_0200 input.
case sy-ucomm.
when 'CONTINUE' or 'CANCEL'.
set screen 0.
leave screen.
endcase.
endmodule.
Regards,
Rich Heilman -
alv grid column name could not be displayed fully.we manually want to drag the column,to see the column name fully. for ex. if column name is 'COMPANYNAME'.it shows 'COMPA' alone.
how could i solve this problem....?hI,
Check the below code...
*& Report ZALV_PROGRAAM
REPORT ZALV_PROGRAAM.
TYPE-POOLS SLIS.
DATA : BEGIN OF WA_KNA1,
KUNNR TYPE KUNNR,
NAME1 TYPE NAME1,
END OF WA_KNA1,
IT_KNA1 LIKE TABLE OF WA_KNA1.
DATA : IT_FCAT TYPE SLIS_T_FIELDCAT_ALV,
WA_FCAT LIKE LINE OF IT_FCAT.
SELECT KUNNR NAME1 INTO TABLE IT_KNA1 FROM KNA1 UP TO 5 ROWS.
PERFORM FCAT USING '1' 'KUNNR' 'CUSTOMERNUMBER' '40'.
PERFORM FCAT USING '2' 'NAME1' 'CUSTOMERNAME' '40'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = SY-CPROG
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT =
IT_FIELDCAT = IT_FCAT
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_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
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = IT_KNA1
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.
*& Form FCAT
text
-->P_0052 text
-->P_0053 text
-->P_0054 text
-->P_0055 text
form FCAT using FP_COL_POS
FP_FIELDNAME
FP_SELTEXT_M
FP_OUTPUTLEN.
WA_FCAT-COL_POS = FP_COL_POS.
WA_FCAT-FIELDNAME = FP_FIELDNAME.
WA_FCAT-SELTEXT_M = FP_SELTEXT_M.
WA_FCAT-OUTPUTLEN = FP_OUTPUTLEN.
APPEND WA_FCAT TO IT_FCAT.
CLEAR WA_FCAT.
endform. " FCAT
thanks,
Thiru. R -
Alv header logo not displaying in print-preview
Hi all... I had displayed an ALV report with a header and logo init. But when I had clicked on print preview ... every thing is displaying except the logo... How to overcome this...???
Hello Kiran,
<li> We can display LOGO using REUSE_ALV_GRID_DISPLAY only not using REUSE_ALV_LIST_DISPLAY. So when you click on print preview Grid output is displayed as REUSE_ALV_LIST_DISPLAY output. It is confirmed that using ABAP classical or ALV printing LOGO is not possible.
<li>To print LOGO, you can go for SCRIPTS or SMARTFORMS.
Thanks
Venkat.O -
How to Set Checkbox of ALV Grid Dark on Display Mode
ABAP experts, I want to switch between display mode and edit mode for some columns of ALV Grid. So I set "LVC_S_FCAT-EDIT" "X" for the columns which need to switch mode, and use method "SET_READY_FOR_INPUT" to switch.
Currently, the function of switch mode has been achieved. But icons of checkbox columns are light but not dark when display mode, although the columns can't be edited. (Please refer to the image below.) I want to make checkbox columns dark as other columns on display mode.
I tried to use "CL_GUI_ALV_GRID=>MC_STYLE_ENABLED" and "CL_GUI_ALV_GRID=>MC_STYLE_DISABLED", but failed. I also studied sample program "BCALV_EDIT_05" which is related to checkbox in ALV Grid, and compared my program with this program. But I still have not found problems.
Help me solve this problem, please.
Part of my codes are as follows.
Part 1:
IF iv_is_create_group = abap_true OR iv_is_edit_group = abap_true.
set_enable( iv_flag = 1 ).
LOOP AT gt_acct_group_item ASSIGNING <lfs_acct_group_item>.
CLEAR ls_celltab.
IF <lfs_acct_group_item>-celltab IS INITIAL.
CLEAR ls_celltab.
ls_celltab-fieldname = 'CHECK_BOX'.
ls_celltab-style = cl_gui_alv_grid=>mc_style_enabled.
APPEND ls_celltab TO <lfs_acct_group_item>-celltab.
CLEAR ls_celltab.
ls_celltab-fieldname = 'XPORE'.
ls_celltab-style = cl_gui_alv_grid=>mc_style_enabled.
APPEND ls_celltab TO <lfs_acct_group_item>-celltab.
ELSE.
LOOP AT <lfs_acct_group_item>-celltab ASSIGNING <lfs_celltab>.
<lfs_celltab>-style = cl_gui_alv_grid=>mc_style_enabled.
ENDLOOP.
ENDIF.
ENDLOOP.
ELSE.
set_enable( iv_flag = 0 ).
LOOP AT gt_acct_group_item ASSIGNING <lfs_acct_group_item>.
IF <lfs_acct_group_item>-celltab IS INITIAL.
CLEAR ls_celltab.
ls_celltab-fieldname = 'CHECK_BOX'.
ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
APPEND ls_celltab TO <lfs_acct_group_item>-celltab.
CLEAR ls_celltab.
ls_celltab-fieldname = 'XPORE'.
ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
APPEND ls_celltab TO <lfs_acct_group_item>-celltab.
ELSE.
LOOP AT <lfs_acct_group_item>-celltab ASSIGNING <lfs_celltab>.
<lfs_celltab>-style = cl_gui_alv_grid=>mc_style_disabled.
ENDLOOP.
ENDIF.
ENDLOOP.
ENDIF.
CALL METHOD gr_grid->refresh_table_display
* EXPORTING
* is_stable =
* i_soft_refresh =
EXCEPTIONS
finished = 1
OTHERS = 2
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
Part 2:
METHOD set_enable.
gr_grid->set_ready_for_input(
i_ready_for_input = iv_flag
ENDMETHOD.Hi Liu,
Please go through the below code.
*& Report YEDIT_DISPLAY
REPORT YEDIT_DISPLAY.
TABLES : VBAK.
TYPE-POOLS SLIS.
TYPES : BEGIN OF TY_VBAK,
VBELN TYPE VBAK-VBELN,
END OF TY_VBAK,
BEGIN OF TY_FINAL,
BOX TYPE C,
VBELN TYPE VBAK-VBELN,
END OF TY_FINAL.
DATA : IT_VBAK TYPE TABLE OF TY_VBAK,
WA_VBAK TYPE TY_VBAK,
IT_FINAL TYPE TABLE OF TY_FINAL,
WA_FINAL TYPE TY_FINAL,
IT_FCAT TYPE TABLE OF SLIS_FIELDCAT_ALV,
WA_FCAT TYPE SLIS_FIELDCAT_ALV.
START-OF-SELECTION.
PERFORM FETCH_DATA.
PERFORM FCAT_DATA.
PERFORM DISPLAY.
*& Form FETCH_DATA
* text
* --> p1 text
* <-- p2 text
FORM FETCH_DATA .
SELECT VBELN INTO TABLE IT_VBAK FROM VBAK UP TO 10 ROWS.
LOOP AT IT_VBAK INTO WA_VBAK.
WA_FINAL-VBELN = WA_VBAK-VBELN.
APPEND WA_FINAL TO IT_FINAL.
CLEAR : WA_FINAL , WA_VBAK.
ENDLOOP.
ENDFORM. " FETCH_DATA
*& Form FCAT_DATA
* text
* --> p1 text
* <-- p2 text
FORM FCAT_DATA .
WA_FCAT-COL_POS = 1.
WA_FCAT-FIELDNAME = 'BOX'.
WA_FCAT-TABNAME = 'IT_FINAL'.
WA_FCAT-OUTPUTLEN = '3'.
WA_FCAT-SELTEXT_M = 'BOX'.
wa_fcat-checkbox = 'X'.
WA_FCAT-EDIT = 'X'.
APPEND WA_FCAT TO IT_FCAT.
CLEAR WA_FCAT.
WA_FCAT-COL_POS = 2.
WA_FCAT-FIELDNAME = 'VBELN'.
WA_FCAT-TABNAME = 'IT_FINAL'.
WA_FCAT-OUTPUTLEN = '3'.
WA_FCAT-SELTEXT_M = 'Sales Document'.
APPEND WA_FCAT TO IT_FCAT.
CLEAR WA_FCAT.
ENDFORM. " FCAT_DATA
*& Form DISPLAY
* text
* --> p1 text
* <-- p2 text
FORM DISPLAY .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER = ' '
* I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = SY-REPID
* I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
* I_CALLBACK_TOP_OF_PAGE = ' '
IT_FIELDCAT = IT_FCAT
* I_DEFAULT = 'X'
* I_SAVE = ' '
TABLES
T_OUTTAB = IT_FINAL
* EXCEPTIONS
* PROGRAM_ERROR = 1
* OTHERS = 2
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.
ENDFORM. " DISPLAY
FORM USER_COMMAND USING UCOMM TYPE SY-UCOMM
RTAB TYPE slis_selfield.
CASE UCOMM.
WHEN '&IC1'.
MESSAGE 'SUCESSFUL' TYPE 'S'.
WHEN '&DATA_SAVE'.
PERFORM FIL_FCAT.
PERFORM DISPLAY1.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
WHEN OTHERS.
LEAVE TO SCREEN 0.
ENDCASE.
ENDFORM.
*& Form FIL_FCAT
* text
* --> p1 text
* <-- p2 text
FORM FIL_FCAT .
CLEAR IT_FCAT.
WA_FCAT-COL_POS = 1.
WA_FCAT-FIELDNAME = 'BOX'.
WA_FCAT-TABNAME = 'IT_FINAL'.
WA_FCAT-OUTPUTLEN = '3'.
WA_FCAT-SELTEXT_M = 'BOX'.
wa_fcat-checkbox = 'X'.
** WA_FCAT-EDIT = 'X'.
APPEND WA_FCAT TO IT_FCAT.
CLEAR WA_FCAT.
WA_FCAT-COL_POS = 2.
WA_FCAT-FIELDNAME = 'VBELN'.
WA_FCAT-TABNAME = 'IT_FINAL'.
WA_FCAT-OUTPUTLEN = '3'.
WA_FCAT-SELTEXT_M = 'Sales Document'.
APPEND WA_FCAT TO IT_FCAT.
CLEAR WA_FCAT.
ENDFORM. " FIL_FCAT
*& Form DISPLAY1
* text
* --> p1 text
* <-- p2 text
FORM DISPLAY1 .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER = ' '
* I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = SY-REPID
* I_CALLBACK_TOP_OF_PAGE = ' '
IT_FIELDCAT = IT_FCAT
* I_DEFAULT = 'X'
* I_SAVE = ' '
TABLES
T_OUTTAB = IT_FINAL
* EXCEPTIONS
* PROGRAM_ERROR = 1
* OTHERS = 2
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.
ENDFORM. " DISPLAY1
Here i written code under the SAVE button , if requires you create your own status and apply.
Regards,
Krishna
Maybe you are looking for
-
Hello SAP-Gurus, I have a Pack of SAP CD's to practice at home SolMan 3.2 e MS SQL. So I have some problems now. I have installed Central Instance, Database Instance and Dialog Instance. I have this problem: the dispacer's icon doesnt'n became green.
-
Autonumber formats change after topics are linked across projects
We are going from Robohelp HTML x5.0.2 to Robohelp HTML 8.0.2.208, so there is obviously a huge learning curve that we are working through. We generate to WebHelp and merge 15 projects into a published master. Our users view the output on our intra
-
My Fan(s) have stopped working properly. - How to send in 4 repairs?
I have a HP Pavillion dv6-2111er. I bought it in Russia. The warranty is ofcourse long gone. I, however, live in Belgium. Problem: fans SEEM to still rotate, but very slowly. "Speedfan" shows that they're not rotating at all as the RPM = 0. Because o
-
Why won't iTunes use my credits?
I am trying to buy an album and I have credits, but iTunes wants to bill me instead of using my credits. How I can I change it so the iTunes will use my creadits like it is suppose to?
-
OVI maps shuts down without warning
We have the latest version of OVI maps on both our phone (Nokia E71 and Nokia C5). when using the Drive-To Navigation. Sometimes, without any warning, the phone screen goes black, a Nokia logo is briefly displayed, and both the phones go back to thei