How to See Total line in Alv Table
hi friends,
i write all code for totaling in WDDOINIT() Method of my View , but i can not see the total line .
pls help me
Hai Shah,
In the settings tab of alv,you will find <b>Calculation</b>, select that tab
in that u select the column for which u want the total.
And u also have one option whethe to display the total at the start of table,
or at the end of table.
inorder ot get that calculation tab in settings ,you need to write the follwing code when instantiating the ALV,
l_value = l_ref_interfacecontroller->get_model(
l_value->if_salv_wd_std_functions~set_aggregation_allowed( ).
Cheers,
Madhu
Similar Messages
-
How To avoid column heading for only total line in ALV list Display
Hi,
How To avoid column heading for only total line in ALV list Display.Hi,
to change colunm header field catlog is built
look at the example below
Changing column text headers
use this to change, hide, or alter the ALV columns
CLEAR: gt_fcat.
READ TABLE gt_fcat WITH KEY fieldname = 'TEXT1' " ***
*TEXT1 is your field name
ASSIGNING <gtfcat>.
IF sy-subrc = 0.
<gtfcat>-coltext = 'Date Type'.
<gtfcat>-no_out = ' '.
<gtfcat>-tooltip = 'Date Type Text from IT0019'.
<gtfcat>-seltext = 'IT0019'.
keep seltext to '' if u want to hide
ENDIF.
regards
austin -
How to keep lead selections in alv table...
Hi experts.
I made a alv.
A logic in wdmodifyview is following..
METHOD wddomodifyview .
IF first_time EQ abap_true.
wd_comp_controller->set_alv_config( ).
ENDIF.
wd_this->set_maktx( ). "<- for displaying maktx
ENDMETHOD.
When I want to select a line, do not selected.
I know because of "wd_this->set_maktx( )." sentence.
But I want to select multi lines in above condition...
How to keep selected lines in alv?
Help me please.
Thanks.
Regards.What logic is taking place in wd_this->set_maktx( )? It is pretty difficult to say what is causing the issue without knowing what code you are executing? If you are resetting the context bound to the ALV, that would explain why you are losing your selections.
-
How to include tool bar in alv table?
Dear All,
I want to know how to use tool bar in alv table? Is there any seperate interfaces available for it?
Thanks,
Gopi.Hi,
1.To deactivate the Standard buttons:
Data: lr_config_table TYPE REF TO cl_salv_wd_config_table,
lo_value = lo_interfacecontroller->get_model( ).
lr_config_table ?= lo_value .
Wd_this->lr_config_table ?= lo_value .
lr_config_table->if_salv_wd_std_functions~set_edit_append_row_allowed( abap_false ).
lr_config_table->if_salv_wd_std_functions~set_edit_insert_row_allowed( abap_false ).
lr_config_table->if_salv_wd_std_functions~set_edit_delete_row_allowed( abap_false ).
2.To create the customized buttons:
Create the a method initilaze_buttons.
Data:lv_function_add_record_sap TYPE REF TO cl_salv_wd_function,
lv_button_add_record_sap TYPE REF TO cl_salv_wd_fe_button,
R_ALV_TABLE_COMP type ref to CL_SALV_WD_CONFIG_TABLE.
r_alv_table_comp = wd_this->lr_config_table.
Generate Function Objects
lv_function_add_record_sap = wd_this->lr_config_table->if_salv_wd_function_settings~create_function( 'ADD_RECORD_SAP' ).
Generate Buttons
CREATE OBJECT lv_button_add_record_sap.
lv_button_add_record_sap->set_image_source( 'ICON_INSERT_ROW' ).
lv_button_add_record_sap->set_text( 'Add Record' ).
Assign Buttons to Functions
lv_function_add_record_sap->set_editor( lv_button_add_record_sap ).
Set positions of the buttons
lv_function_add_record_sap->set_position( value = 1 ).
Set Alignment of the buttons
lv_function_add_record_sap->set_alignment( value = if_salv_wd_c_function_settings=>align_left ).
Call this method initilaze_buttons in WDDOINIT .
3.To find out which button is clicked an dhandling that function
A)Go to methods tab.
B)give the name of the method as on_button select the method type as Eventhandler.
In the event coulmn select the event ON_FUNCTION of the ALV comp.
METHOD on_button .
DATA index TYPE i.
index = wd_this->sort_index .
CASE r_param->id."r_param->id is importing paramter which comes automatically once u use the event handler
WHEN 'DELETE_ROW'. "Delete row
wd_this->delete_row( )."methods you need to create and call them here.(your own customized button functionality
WHEN 'ADD_RECORD_SAP'.
wd_this->add_record_sap( ).
ENDCASE.
r_param->id holds the value which button is clicked.
Priya -
How to see tax rate in KONV table
hi all,
how to see tax rates in KONV table?
please helpHi
There is a field called "TX" i.e. TAX CODE.. in that check what code is that?? then check the TAX table T007A to find the Tax rate applied for the document based on the respective TAX CODE.
Hope this helps. -
Check condition on sub total line of ALV list
Hi All ,
Is it possible to check condition on the value of subtotal line in ALV list ,
I,e If the value of subtotal line is say greator than 100 I need to change the color of that line or change the text on the subtotal line .
I know how to change the subtotal text but i want to change with respect to value of the subtotal ,
Any input if this can be achieved will be great .
Thanks in adv .
Vinay
Edited by: vinay kolla on Jul 29, 2009 4:43 AMHi,
I donu2019t think there is any direct way to check the subtotal value in LIST display, try the following logic.
1. Use the event BEFORE_LINE_OUTPUT to check the subtotal value and accordingly change the text or colour of the line.
2. To use events in ALV, first get the events into a table through the FM REUSE_ALV_EVENTS_GET as shown
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = z_i_events.
SORT z_i_events BY name.
CLEAR z_wa_events.
READ TABLE z_i_events WITH KEY name = slis_ev_before_line_output
INTO z_wa_events BINARY SEARCH.
IF sy-subrc = 0.
MOVE 'BEFORE_LINE_OUTPUTu2019 TO z_wa_events-form.
MODIFY z_i_events FROM z_wa_events INDEX sy-tabix.
ENDIF.
3. Create a form with the name BEFORE_LINE_OUTPUT and do the coding to check the subtotals there.
Form BEFORE_LINE_OUTPUT USING RS_LINEINFO TYPE SLIS_LINEINFO.
*The structure RS_LINEINFO will have u2018Xu2019 in the field rs_lineinfo-subtot for subtotals.
If RS_LINEINFO-SUBTOT = u2018Xu2019.
*Here try to find the totals by looping at your final internal table till rs_lineinfo-tabindex.
*Then based on this u can give the colour to the line.
*I think there is no other way to check the subtotal value.
Endif.
Endform.
Edited by: venkatesh PH on Jul 29, 2009 5:31 AM -
How to calculate totals in Blocked ALV Report
Hi All,
Can any body tell how to calculate totals & sub totals in
Blocked ALV Report[Blocked List].
Thanks in advance
Thanks & Regards,
Rayeezuddin.read this it might help
Sums
15. No_sumchoice(1) TYPE c : This parameter allows the choice for summing up
Only by fieldcatalog.
Value set: SPACE, 'X'
'X' = fields which are to be summed, passed by the calling program (FIELDCAT-DO_SUM = 'X'). The user should not be able to change this value interactively.
16. No_totalline(1) TYPE c : Removes the option of having totals after sub-totals.
Value set: SPACE, 'X'
'X' = no total record is to be output. Subtotals can still be calculated and output. The fields in the subtotals are flagged DO_SUM = 'X' in the field list.
17. No_subchoice(1) TYPE c : Does not allow the user to interactively change the field chosen for subtotals.
Value set: SPACE, 'X'
'X' = value whose change triggers subtotals, provided by the calling program. The user should not be able to change this value interactively.
18. No_subtotals(1) TYPE c : No subtotals possible
Value set: SPACE, 'X'
'X' = no subtotals.
19. Numc_sum(1) TYPE c : Totals only possible for NUMC-Fields.
20. No_unit_splitting TYPE c: No separate total lines by inh.units
21.totals_before_items TYPE c: Display totals before the items
22. Totals_only(1) TYPE c : Show only totals
Value set: SPACE, 'X'
'X' = only total records are output.
23. Totals_text(60) TYPE c : Text for 1st col. in totals
Value set: SPACE, string (max.60)
' ' = The first column in the total record contains an appropriate number of '*'s to indicate the total by default. If the first column is wide enough, the string 'Total' is output after the asterisks.
'String = The string passed is output after the total indicated by '*', if the column is wide enough.
24. Subtotals_text(60) TYPE c : Texts for subtotals
Value set: SPACE, string (max.60)
' ' = In the first column of subtotal records, the subtotal is indicated by an appropriate number of '*' by default. If the first column is not a subtotal criterion, the string 'Total' is output after the asterisks, if the column is wide enough.
'String = the string passed is output after the subtotal indicated by '*', if the column is wide enough and the first column is not a subtotal criterion. If it is a subtotal criterion, its value is repeated after the total, if the column is wide enough.
ELSE TELL ME I WILL PASTE COMPLETE HELP
regards -
How to select multiple lines in ALV report
hi gurus,
I am working on an interactive ALV report where i have to select multiple lines from the basic list into an internal table, based on check box clicks. Using RS_SELFIELD i can select only 1 row. The coding has been done based on Call Function. Can u please suggest some way.
Regards,
Satyajithi,
try like this
TABLES: ekko.
TYPE-POOLS: slis. "ALV Declarations
TYPES: BEGIN OF t_ekko,
sel, "stores which row user has selected
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
statu TYPE ekpo-statu,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
menge TYPE ekpo-menge,
meins TYPE ekpo-meins,
netpr TYPE ekpo-netpr,
peinh TYPE ekpo-peinh,
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_ekko TYPE t_ekko.
DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
fieldcatalog1 TYPE slis_t_fieldcat_alv WITH HEADER LINE,
gd_tab_group TYPE slis_t_sp_group_alv,
gd_layout TYPE slis_layout_alv,
gd_repid LIKE sy-repid.
DATA : BEGIN OF det_tab OCCURS 0,
ebeln LIKE ekpo-ebeln,
END OF det_tab.
START-OF-SELECTION.
PERFORM data_retrieval.
PERFORM build_fieldcatalog.
PERFORM build_layout.
PERFORM display_alv_report.
*& Form BUILD_FIELDCATALOG
* Build Fieldcatalog for ALV Report
FORM build_fieldcatalog.
fieldcatalog-fieldname = 'EBELN'.
fieldcatalog-seltext_m = 'Purchase Order'.
fieldcatalog-outputlen = 10.
fieldcatalog-emphasize = 'X'.
fieldcatalog-key = 'X'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'EBELP'.
fieldcatalog-seltext_m = 'PO Item'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'STATU'.
fieldcatalog-seltext_m = 'Status'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'AEDAT'.
fieldcatalog-seltext_m = 'Item change date'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'MATNR'.
fieldcatalog-seltext_m = 'Material Number'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'MENGE'.
fieldcatalog-seltext_m = 'PO quantity'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'MEINS'.
fieldcatalog-seltext_m = 'Order Unit'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'NETPR'.
fieldcatalog-seltext_m = 'Net Price'.
fieldcatalog-outputlen = 15.
fieldcatalog-do_sum = 'X'. "Display column total
fieldcatalog-datatype = 'CURR'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'PEINH'.
fieldcatalog-seltext_m = 'Price Unit'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
ENDFORM. " BUILD_FIELDCATALOG
*& Form BUILD_LAYOUT
* Build layout for ALV grid report
FORM build_layout.
gd_layout-box_fieldname = 'SEL'.
"set field name to store row selection
gd_layout-edit = 'X'. "makes whole ALV table editable
gd_layout-zebra = 'X'.
ENDFORM. " BUILD_LAYOUT
*& Form DISPLAY_ALV_REPORT
* Display report using ALV grid
FORM display_alv_report.
gd_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = gd_repid
i_callback_user_command = 'USER_COMMAND'
i_callback_pf_status_set = 'SET_STAT'
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
i_save = 'X'
TABLES
t_outtab = it_ekko
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_REPORT
*& Form DATA_RETRIEVAL
* Retrieve data form EKPO table and populate itab it_ekko
FORM data_retrieval.
SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
UP TO 10 ROWS
FROM ekpo
INTO CORRESPONDING FIELDS OF TABLE it_ekko.
ENDFORM. " DATA_RETRIEVAL
* FORM USER_COMMAND *
* --> R_UCOMM *
* --> RS_SELFIELD *
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
* Check function code
CASE r_ucomm.
WHEN '&IC1'.
IF rs_selfield-fieldname = 'EBELN'.
READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
ENDIF.
WHEN 'DET'. "button add by me
CLEAR det_tab.
REFRESH det_tab.
LOOP AT it_ekko INTO wa_ekko WHERE sel = 'X'.
MOVE-CORRESPONDING wa_ekko TO det_tab.
APPEND det_tab.
ENDLOOP.
PERFORM build_cat.
PERFORM dis_data.
ENDCASE.
ENDFORM. "user_command
*& Form set_stat
* text
* -->RT_EXTAB text
FORM set_stat USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'ZSTAT' EXCLUDING rt_extab.
ENDFORM. "set_stat
*& Form build_cat
* text
FORM build_cat.
CLEAR fieldcatalog1.
REFRESH fieldcatalog1.
fieldcatalog1-fieldname = 'EBELN'.
fieldcatalog1-tabname = 'DET_TAB'.
fieldcatalog1-seltext_m = 'Order No.'.
fieldcatalog1-outputlen = 10.
APPEND fieldcatalog1 TO fieldcatalog1.
CLEAR fieldcatalog1.
ENDFORM. "build_cat
*& Form dis_data
* text
FORM dis_data.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = 'ZTEST_DS'
it_fieldcat = fieldcatalog1[]
i_save = 'X'
TABLES
t_outtab = det_tab.
ENDFORM. "dis_data
here i have copied standard gui status of ALV into my z status ZSTAT and add one button DET......
here u can select morethan one line using control(ctrl)
reward if usefull... -
Total and non-total lines in ALV grid
Hi all,
Does anyone know if there is any standard SAP functionality for retrieving the non-total/raw item lines that lies beneath a total line in an ALV grid (after the user has selected the total line)?
All helpful answers will be rewarded!
Best regards,
MVTry the ALV event AFTER-LINE-OUTPUT may be it can help u to achieve ur requirement.
Append AFTER-LINE-OUTPUT event to the internal table T_EVENT.
CLEAR W_EVENT.
W_EVENT-FORM = SLIS_EV_AFTER_LINE_OUTPUT.
W_EVENT-NAME = SLIS_EV_AFTER_LINE_OUTPUT.u201CAFTER_LINE_OUTPUT event
APPEND W_EVENT TO T_EVENT.
FORM AFTER_LINE_OUTPUT
USING P_RS_LINEINFO TYPE SLIS_LINEINFO.
Here you have to write the logic to retrieve the 'total' line
ENDFROM.
Now call the alv FM
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = L_REPID "Program Name
IS_LAYOUT = W_LAYOUT "Layout of the Report
IT_FIELDCAT = T_FIELDCAT "Field Catalog for Report
IT_EVENTS = T_EVENT "For setting the events
TABLES
T_OUTTAB = T_OUTPUT "Report data Internal Table
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2. -
Hi,
I want to display the total of lines on the subtotal line of my grid.
As I don't have this field on my catalog, I think I would have to edit the total line to set the total of regs above...
Could someone help me?
Tks.
Regards,
Flavio.You can do that using the event SUBTOTAL_TEXT .
REPORT ZTEST_ALV_TEXT .
type-pools : slis.
types : begin of itab_t,
ebeln like ekpo-ebeln,
lifnr like ekko-lifnr,
ekorg like ekko-ekorg,
ekgrp like ekko-ekgrp,
werks like ekpo-werks,
ebelp like ekpo-ebelp,
matnr like ekpo-matnr,
menge like ekpo-menge,
netpr like ekpo-netpr,
d, "Dummy field to fire the Subtotal text event
end of itab_t.
data: itab type table of itab_t.
data: tab type itab_t.
data : itab1 like eket occurs 0 with header line.
data: t_fcat type slis_t_fieldcat_alv,
it_sort type slis_t_sortinfo_alv,
t_events type slis_t_event,
listhead type slis_t_listheader,
ls_layout type slis_layout_alv.
start-of-selection.
select a~ebeln
a~lifnr
a~ekorg
a~ekgrp
b~werks
b~ebelp
b~matnr
b~menge
b~netpr
up to 100 rows
into corresponding fields of table itab
from ekko as a inner join ekpo as b
on a~ebeln = b~ebeln.
end-of-selection.
perform fill_fcat using t_fcat.
perform fill_event using t_events.
perform fill_layout.
perform display.
*& Form fill_fcat
text
-->P_T_FCAT text
form fill_fcat using p_t_fcat type slis_t_fieldcat_alv.
data : lfcat type slis_fieldcat_alv,
colpos type i value '0'.
data : ls_sort type slis_sortinfo_alv.
colpos = colpos + 1.
lfcat-col_pos = colpos.
lfcat-fieldname = 'EBELN'.
lfcat-tabname = 'ITAB'.
lfcat-ref_fieldname = 'EBELN'.
lfcat-ref_tabname = 'EKKO'.
lfcat-hotspot = 'X'.
append lfcat to p_t_fcat.
clear lfcat.
colpos = colpos + 1.
lfcat-col_pos = colpos.
lfcat-fieldname = 'LIFNR'.
lfcat-tabname = 'ITAB'.
lfcat-ref_fieldname = 'LIFNR'.
lfcat-ref_tabname = 'EKKO'.
append lfcat to p_t_fcat.
clear lfcat.
colpos = colpos + 1.
lfcat-col_pos = colpos.
lfcat-fieldname = 'EKORG'.
lfcat-tabname = 'ITAB'.
lfcat-ref_fieldname = 'EKORG'.
lfcat-ref_tabname = 'EKKO'.
append lfcat to p_t_fcat.
clear lfcat.
colpos = colpos + 1.
lfcat-col_pos = colpos.
lfcat-fieldname = 'EKGRP'.
lfcat-tabname = 'ITAB'.
lfcat-ref_fieldname = 'EKGRP'.
lfcat-ref_tabname = 'EKKO'.
append lfcat to p_t_fcat.
clear lfcat.
colpos = colpos + 1.
lfcat-col_pos = colpos.
lfcat-fieldname = 'WERKS'.
lfcat-tabname = 'ITAB'.
lfcat-ref_fieldname = 'WERKS'.
lfcat-ref_tabname = 'EKPO'.
append lfcat to p_t_fcat.
clear lfcat.
colpos = colpos + 1.
lfcat-col_pos = colpos.
lfcat-fieldname = 'EBELP'.
lfcat-tabname = 'ITAB'.
lfcat-ref_fieldname = 'EBELP'.
lfcat-ref_tabname = 'EKPO'.
append lfcat to p_t_fcat.
clear lfcat.
colpos = colpos + 1.
lfcat-col_pos = colpos.
lfcat-fieldname = 'MATNR'.
lfcat-tabname = 'ITAB'.
lfcat-ref_fieldname = 'MATNR'.
lfcat-ref_tabname = 'EKPO'.
append lfcat to p_t_fcat.
clear lfcat.
colpos = colpos + 1.
lfcat-col_pos = colpos.
lfcat-fieldname = 'MENGE'.
lfcat-tabname = 'ITAB'.
lfcat-ref_fieldname = 'MENGE'.
lfcat-ref_tabname = 'EKPO'.
lfcat-do_sum = 'X'.
append lfcat to p_t_fcat.
clear lfcat.
colpos = colpos + 1.
lfcat-col_pos = colpos.
lfcat-fieldname = 'NETPR'.
lfcat-tabname = 'ITAB'.
lfcat-ref_fieldname = 'NETPR'.
lfcat-ref_tabname = 'EKPO'.
lfcat-do_sum = 'X'.
append lfcat to p_t_fcat.
clear lfcat.
colpos = colpos + 1.
lfcat-col_pos = colpos.
lfcat-fieldname = 'D'.
lfcat-tabname = 'ITAB'.
lfcat-ref_fieldname = 'EBELN'.
lfcat-ref_tabname = 'EKKO'.
lfcat-no_out = 'X'.
append lfcat to p_t_fcat.
clear lfcat.
ls_sort-spos = 1.
ls_sort-fieldname = 'EBELN'.
ls_sort-tabname = 'ITAB'.
ls_sort-up = 'X'.
ls_sort-group = 'UL'.
append ls_sort to it_sort.
clear ls_sort.
ls_sort-spos = 2.
ls_sort-fieldname = 'D'.
ls_sort-tabname = 'ITAB'.
ls_sort-up = 'X'.
ls_sort-group = 'UL'.
ls_sort-subtot = 'X'.
append ls_sort to it_sort.
endform. " fill_fcat
*& Form fill_event
text
-->P_T_EVENTS text
form fill_event using p_t_events type slis_t_event.
data : ls_event type slis_alv_event.
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = p_t_events
EXCEPTIONS
LIST_TYPE_WRONG = 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.
read table p_t_events with key name = slis_ev_top_of_page
into ls_event.
if sy-subrc = 0.
move 'TOP_OF_PAGE' to ls_event-form.
append ls_event to p_t_events.
endif.
read table p_t_events with key name = SLIS_EV_SUBTOTAL_TEXT
into ls_event.
if sy-subrc = 0.
move 'SUBTOTAL' to ls_event-form.
append ls_event to p_t_events.
endif.
endform. " FILL_EVENT
FORM SUBTOTAL USING I_LISTHEAD STRUCTURE tab
I_SUBTOTAL TYPE SLIS_SUBTOT_TEXT.
*criteria type slis_fieldname,
keyword like dd03p-reptext,
criteria_text(255) type c,
max_len like dd03p-outputlen,
display_text_for_subtotal(255) type c,
if I_SUBTOTAL-criteria = 'D'.
I_SUBTOTAL-display_text_for_subtotal = 'Sub total'.
endif.
ENDFORM.
*& Form TOP_OF_PAGE
text
form top_of_page.
data : s_listhead type slis_listheader.
clear s_listhead.
s_listhead-typ = 'H'.
s_listhead-info = 'SIMPLE REPORT'.
append s_listhead to listhead.
s_listhead-typ = 'S'.
s_listhead-key = 'EBELN'.
s_listhead-info = 'ALV'.
append s_listhead to listhead.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = listhead
i_logo = 'ENJOYSAP_LOGO'
I_END_OF_LIST_GRID =
endform. "TOP_OF_PAGE
*& Form fill_layout
text
-->P_S_LAYOUT text
form fill_layout .
ls_layout-zebra = 'X'.
ls_layout-detail_popup = 'X'.
ls_layout-key_hotspot = 'X'.
ls_layout-window_titlebar = 'Dharma'.
ls_layout-detail_titlebar = 'Jasti'.
ls_layout-totals_text = 'GRAND TOTAL'.
ls_layout-subtotals_text = 'SUB'.
endform. " fill_layout
*& Form display
text
--> p1 text
<-- p2 text
form display .
call function 'REUSE_ALV_LIST_DISPLAY'
exporting
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
i_callback_program = sy-repid
i_callback_pf_status_set = 'STATUS'
i_callback_user_command = 'USER_COMMAND'
I_STRUCTURE_NAME =
is_layout = ls_layout
it_fieldcat = t_fcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
it_sort = it_sort[]
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
it_events = t_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
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
tables
t_outtab = itab
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
if sy-subrc 0.
MESSAGE ID SY-MSGI D TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endform. " display
*& Form status
text
-->EXTAB text
form status using extab type slis_t_extab.
set pf-status 'PFSA' excluding extab.
endform. "STATUS
*& Form user_command
text
-->R_UCOMM text
-->RS_SELFIELDtext
form user_command using r_ucomm like sy-ucomm
rs_selfield type slis_selfield.
case r_ucomm.
when '&ETA'.
select * from eket into corresponding fields of itab1
where ebeln = rs_selfield-value.
write:/ itab1-ebeln,
itab1-ebelp,
itab1-etenr,
itab1-eindt,
itab1-menge.
endselect.
when 'BACK' or 'EXIT' or 'CANC'.
leave .
endcase.
endform. "USER_COMMAND -
How to unhide the column in Alv table
Hi Experts,
Initially i have created webdynpro Alv table with 8 columns ,later i have added one more attribute/column to the node to display extra column
but in the output ,alv table not displaying the 9th column,Instead the column is getting hidden which i came to know clicking on settings in alv table output.If i make changes in Alv table settings it getting displaying,can anyone tell me how to unhide this field.
Regards
SandeshHi Sandesh,
It is possible that the user you are loggin in with, might have a layout saved.
You can try logging in with different user and see if its still hidden.
The explicit code to hide and unhide a column :
lo_alv_column->set_visible( if_wdl_core=>visibility_none ).
may be you can use the above code and make column visibility true(cahnge parameter).
Regards,
Tashi -
Urgent : How to modify the line type and table type
I am working on ALV Grid Control, i need to know how to modify the line type values to table type.
ls_celltab-fieldname = 'ZSAVINGS '.
ls_celltab-style = l_mode.
INSERT ls_celltab INTO TABLE pt_celltab.
Here ls_celltab is line type and pt_celltab is table type.
Please give me the suggestion ASAP.
C.Bharath KumarHi,
Here is the example
DATA: BEGIN OF LINE,
LAND(3) TYPE C,
NAME(10) TYPE C,
AGE TYPE I,
WEIGHT TYPE P DECIMALS 2,
END OF LINE.
DATA ITAB LIKE SORTED TABLE OF LINE
WITH NON-UNIQUE KEY LAND NAME AGE WEIGHT.
LINE-LAND = 'G'. LINE-NAME = 'Hans'.
LINE-AGE = 20. LINE-WEIGHT = '80.00'.
INSERT LINE INTO TABLE ITAB.
LINE-LAND = 'USA'. LINE-NAME = 'Nancy'.
LINE-AGE = 35. LINE-WEIGHT = '45.00'.
INSERT LINE INTO TABLE ITAB.
Regards
Sudheer -
How to insert horizontal lines in alv report?
hi,
i have to insert horizontal lines in alv report.( RM07MLBB )
actually my requirement is:
basis list = RM07MLBB.
first secondary list = another report is called here ( RM07DOCS )
i want to insert horizontal lines in the first secondary list, when i execute individually RM07DOCS , i can get horizontal lines, but when i dounle click in the basic list --> in the first secondary list , i am not getting the horizontal lnes.
functional modules used are REUSE_ALV_HIERSEQ_LIST_DISPLAY & REUSE_ALV_GRID_DISPLAY.
here in this program,
is_layout = alv_layout.
hence i tried to give
alv_layout-no_hline = ' '.
but not effecting.
can some one please tell me , how to insert lines in the alv report.
thanks in advance,
Dastagir.hello,
so i cannot insert horizontal lines in the first secondary list according to my sorting condition, i.e., in a single block there should be :
if same delivery challan number is repeating they should come in the same block,
for the corresponding delivery challen number, if have po number, is repeating , they also should come in the same block.
in this way i have to seperate the blocks containing EXNUM , EBELN CONDITIONED. -
How To Edit Selected Row In ALV Table
Hello Experts,
In My Webdynpro Application, I am displaying records from database table into an ALV Table.
I want to edit only selected record from ALV table.
Please Suggest How to achieve this.
Thanks,
PratibhaThe link given above is for the UI element 'Table' and does not pertain to ALV.
To Make an ALV Editable on lead selection for that particular lead selected row.
1. The ALV should be made lead selectable, when initializing
2. The ON_LEAD_SELECT function should be invoked.
3. Withing this function the index has to be retrieved to know which row was selected.
4. Based on the index retrived all the columns have to pass FALSE to read_only in the column properties.
Regards,
Pramod -
How to see lock status of a table ?
Hi,
My question is : how to see the lock status of a table ?
and how to lock a table except run the FM ENQUEUE_TABLENAME?
Is there any transcation that can lock a table ?
thx in advance.Hi Vincent
Via transaction SM12 we can check the lock entries at a particular point of time...
Kind Regards
Eswar
Maybe you are looking for
-
ID and logical component.
Dear SolMan Gurus. Is it somehow possible to forbid choosing a specific istalled base and its componet.? I would like to avoid some users to choose specific componet in the Requests for change resp. in Normal (urgent) Changes. Can I manage it via aut
-
GilAltOneMT font missing in PDF generated with FM8.0p266
Hi - Long time Frame user, reluctantly "upgraded" to Frame 8.0/Tech Comm Suite within the past 4 months. Never had issues generating PDF files using the PDF printer driver from Frame 7.0. With Frame 8.0, for some reason the font "GilAtOneMT" will not
-
I have an iPad 1. I tried to delete an app and ever since I did it keeps reboooting. By rebooting I mean that it is always giving me the screen with the black background and the apple sign. After a couple minutes it randomly shuts down. By shuts down
-
Unable to update 40.1 to 4.1
i have been trying to update for weeks now but keeps coming up with same error: cannot update this iphone at this time as cannot connect to server as it may be unavailble or temporarily down please try later. I have windows xp reinstalled itunes many
-
I have a lot of books on my Kindle/Amazon account. I have downloaded the Kindle app onto my IPAD mini by can only access my books when connected to WIFI, how can I read them off-line?