Hiding few columns before displaying alv grid output
Hi All,
I struck up at hiding few columns before displaying alv output. I have used used FM: REUSE_ALV_GRID_DISPLAY. By using this i am displaying 29 fields to the output. But before displaying the output i want to hide few columns among them, and also those fields have to be avialable for further selection by the user by using layout.
Kindly help me in this,
Regards
Srinivas K
Hi,
In field catalog set NO_OUT='X' for all the columns you want to hide. They will be available when changing layout for ALV, so you can show them at any time.
Regards
Marcin
Similar Messages
-
hi,
i have two problems in displaying ALV grid output Using Oops.
1) How to modify the fieldcatalog after we getting a field catalog using general FM.
2) initialy it is displaying 13 fields but there are 63 fields .
eventhough we chage the layout to 63 fields it is displaying only 13 fields , these 13 fields may be different based on our selection but count of displayed fileds are same . how can display 63 fields at a time .Hi,
You can chnage using below code:
loop at gt_fieldcat.
if <gt_fieldcat-field_name> = 'FIELDNAME'.
endif.
modify gt_fieldcat.
clear gt_fieldcat.
endloop.
Make sure that all the field should not have no_out = 'X' and tech = 'X'.
Thanks,
Sriram Ponna. -
Hiding a column in an ALV Grid
Hi ,
I want to hide a column in an ALV grid and I am doing it as such.However it doesn't work.
data : gw_fieldcat type lvc_s_fcat,
gt_fieldcat type lvc_t_fcat.
perform build_grid1 changing gt_fieldcat.
form build_grid1 changing p_gt_ss.
gw_fieldcat-fieldname = 'UKURS'.
gw_fieldcat-scrtext_m = 'Exchange rate'.
gw_fieldcat-no_out = 'X'.
gw_fieldcat-col_pos = 9.
APPEND gw_fieldcat TO gt_fieldcat.
endform.
Kindly suggest.Hi,
As per code it looks good..check in the debugging corresponding to the field 'UKURS is no_out has value X in the fieldcatalog. -
Hide a Column in ALV Grid Output
Hi,
I want to hide a column in ALV Grid Output through program.
I am using lwa_fieldcat-NO_OUT = 'X'. to hide the column in output but it is not working, column in not hided in the output.
Kindly suggest.It should work..
see the code :
d_fieldcat_wa-fieldname = 'MATNR'.
d_fieldcat_wa-seltext_l = 'material number'.
d_fieldcat_wa-no_out = 'X'. * hide particular field
append d_fieldcat_wa to d_fieldcat.
clear d_fieldcat_wa.
if not please paste your code here.
Thanks
Seshu -
Displaying the selected rows in ALV Grid output
Hi Experts,
I am developing one interactive ALV Grid report where user can process the selected records/rows from the ALV Grid output.
for displaying the ALV Grid, I have used the class CL_GUI_ALV_GRID class. I am working on ECC 6.0 system.
when I select any records/rows from output and then press any Application Toolbar button, PAI and then PBO modules of the screen gets executed as per the normal flow.
however After PBO, when same ALV output comes, all the selected/highlighted rows appear as unselected, that means I want to retain the ALV
rows selection during the round trip.
please advise.
Regards,
JageshHi,
Feiyun Wu is correct.
Get_selected_rows and set_selected_rows are the methods to be used .
Some code:
Note the sequence of code:
FORM set_gui_alv_grid_1 .
DATA: wa_layout TYPE lvc_s_layo ,
wa_print TYPE lvc_s_prnt .
DATA: it_sort TYPE lvc_t_sort ,
wa_sort TYPE LINE OF lvc_t_sort .
DATA: it_fieldcatalog TYPE lvc_t_fcat.
IF gui_custom_container_1 IS INITIAL .
CREATE OBJECT gui_custom_container_1
EXPORTING
container_name = 'GUI_CUSTOM_CONTAINER_1'
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.
ENDIF.
PERFORM get_field_catalog
USING gc_log_group_1
CHANGING it_fieldcatalog .
CREATE OBJECT gui_alv_grid_1
EXPORTING i_parent = gui_custom_container_1.
CREATE OBJECT ob_event_receiver_1
EXPORTING log_group = gc_log_group_1 .
* registers the event handlers
SET HANDLER ob_event_receiver_1->handle_toolbar FOR gui_alv_grid_1 .
SET HANDLER ob_event_receiver_1->handle_user_command FOR gui_alv_grid_1 .
SET HANDLER ob_event_receiver_1->print_top_of_page FOR gui_alv_grid_1 .
SET HANDLER ob_event_receiver_1->hotspot_click FOR gui_alv_grid_1 .
wa_layout-cwidth_opt = abap_true .
* wa_layout-excp_fname = gc_excp_fname .
* wa_layout-ctab_fname = gc_ctab_fname.
* wa_layout-excp_led = abap_true .
CALL METHOD gui_alv_grid_1->set_table_for_first_display
EXPORTING
is_layout = wa_layout
is_print = wa_print
i_save = 'A'
is_variant = gs_disvariant_1
CHANGING
it_sort = it_sort
it_fieldcatalog = it_fieldcatalog
it_outtab = it_alv_grid_1.
ELSE .
CALL METHOD gui_alv_grid_1->refresh_table_display.
* Restore selections
CALL METHOD gui_alv_grid_1->set_selected_rows
EXPORTING
it_index_rows = ob_event_receiver_1->it_rows.
* Restore position
CALL METHOD gui_alv_grid_1->set_scroll_info_via_id
EXPORTING
is_col_info = ob_event_receiver_1->wa_col
is_row_no = ob_event_receiver_1->wa_roid.
ENDIF.
ENDFORM . "set_gui_alv_grid_1
Regards. -
How to send the ALV GRID output to spool by using the print button in std t
How to send the ALV GRID output to spool by using the print button in standard tool bar.
We have created a button in the va02 transaction. If user click on the button the new screen will be display on that screen we are populating the alv grid output using the oops concept. But i am unable to send the output to spool using the print button in the standard tool bar.
I am able to display the Print parameter dialog box but i am not able to send it to spool.
Kindly help.
Thanks In Advance.
G.V.RamanaHi Shaik,
There is not properties button in my print screen.
MODULE user_command_0900 INPUT.
WHEN 'EXCEL'.
PERFORM excel_download.
WHEN 'PRI'.
PERFORM print_output.
form Print_output.
CALL FUNCTION 'RSPO_LIST_LAYOUT_FITS'
EXPORTING
columns = 80
device = 'ANY '
lines = 65
maxpenality = 1999
TABLES
layouts = lt_layouts1
EXCEPTIONS
unknown_device = 1
OTHERS = 2.
IF sy-subrc = 0.
LOOP AT lt_layouts1.
IF lt_layouts1-penality < 1000 AND
lt_layouts1-penality < l_min_penality.
l_layout = lt_layouts1-layout.
l_min_penality = lt_layouts1-penality.
ENDIF.
ENDLOOP.
IF NOT l_layout IS INITIAL.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
mode = 'CURRENT'
line_size = 80 "#EC *
new_list_id = l_new_list_id
no_dialog = l_no_dialog
layout = l_layout
IMPORTING
out_archive_parameters = rs_arc_params
out_parameters = rs_pri_params
valid = l_valid
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
IF sy-subrc NE 0. " INS SLIN
ENDIF. " INS SLIN
IF rs_pri_params-linsz LT 80 OR
rs_pri_params-linsz LT gt_stack-s_lprint-width.
gt_stack-print_line_break = 'X'.
ELSE.
CLEAR gt_stack-print_line_break.
ENDIF.
IF l_valid NE 'X'.
rs_pri_params = ls_pri_params_sav.
rs_arc_params = ls_arc_params_sav.
ENDIF.
ENDIF.
ENDIF.
endform. " Print_output
CALL METHOD gv_cost_tot_alv_grand->set_table_for_first_display
EXPORTING
is_layout = gs_layout_cost_tot_grand
CHANGING
it_fieldcatalog = gt_fcat_cost_tot_grand[]
it_outtab = gt_cost_tot_grand[].
Please check my code -
Scroll text in ALV column using OO ALV grid
Hi All,
I have displayed ALV grid on the screen which has four columns. One of the columns is a text field with text255 domain. This Column is also editable. I have following problem and need help;
The column for some reason displays only 130 chars. I tried to set the output length in field cat to 255 still no difference. My custom container width is equivalent to max screen width of 255.
I also tried to crunch the other three columns to display as much characters as needed so that I am left with enough space for the last column which is comments but still it displays on 130 characters. And thoughts on why this is happening.
Thanks,
YogeetaHi,
The ALV will only let you show 130 characters. You could use 2 columns to display the text.
Martin -
How to display ALV grid in a graphical display??
Hello All,
I want to display the ALV grid output in graphical format. I did not see any particular Function code or event in ALV for graphs. Hence I designed a PF status myself. But when I use the Function module "Graph_2D", it gives me an error.
Can you guys suggest which is the best Function module to display the ALV output in graphical format?
Regards,
Abhishek
P.S: Points will be awarded to the answers which will solve the issueThis piece of code is giving graphical output , u can check it in ur machine.
REPORT ZSKC_GRAPH.
data : begin of itab occurs 0,
day type i,
val type i,
end of itab.
start-of-selection.
do 5 times.
clear itab.
itab-day = sy-index.
itab-val = sy-index + ( sy-index * sy-index ).
append itab.
enddo.
CALL FUNCTION 'GRAPH_2D'
TABLES
DATA = itab
EXCEPTIONS
GUI_REFUSE_GRAPHIC = 1
OTHERS = 2
IF SY-SUBRC <> 0.
* Give some message.
ENDIF.
You just pass ur internal table to this Function module - Do you need to display column captions etc ?? In that case you will have to use GRAPH_MATRIX_2D. -
How to preselect all rows before displaying ALV report
I would like to select all rows before sending ALV Grid Display. User then can unselect couple of rows for further processing. How do I do that ?. Im using Method grid1->SET_TABLE_FOR_FIRST_DISPLAY for ALV Report Display. Any help appreciated.
Ok,
I've started the editor and check my code. I made few small mistakes (like with this exporting/importing), here's the sample - correctly working - code:
DATA: it_selected TYPE lvc_t_row,
wa_selected TYPE lvc_s_row,
wa_sflight TYPE sflight,
ltp_layout TYPE lvc_s_layo.
SELECT *
FROM sflight
INTO TABLE gi_sflight.
ltp_layout-stylefname = 'CELLTAB'.
ltp_layout-sel_mode = 'A'.
LOOP AT gi_sflight INTO wa_sflight.
wa_selected-index = sy-tabix.
APPEND wa_selected TO it_selected.
ENDLOOP.
* * Load data into the grid and display them
CALL METHOD go_grid->set_table_for_first_display
EXPORTING i_structure_name = 'SFLIGHT'
is_layout = ltp_layout
i_save = 'A'
CHANGING it_outtab = gi_sflight.
CALL METHOD go_grid->set_selected_rows
EXPORTING
it_index_rows = it_selected.
This time it is 100% correct.
Edited by: Marcin Cudo on Apr 11, 2010 2:13 AM -
Facing problem while downloading ALV grid Output into Excel
Hi Guys,
I am facing problem while downloading ALV grid Output into Excel.
It is downloading into excel, but all character columns first and next all quantity columns it is displaying. But I need columns order as it is in the grid.
If I take all columns as characters it works fine. But it will be problem for calculating total, subtotals of quantity columns
Can someone help me regarding this
thanks for your helpHi,
Open up Excel on your desktop. Goto Tools > Macro > Security.
Make sure that your security is set to Medium (or less). SAP uses OLE automation to run the Excel instance and in Office 2003 (for example), Microsoft has increased their default security setting to High. With the High setting, the output to Excel fails.
Was this your problem? Don't forget those points, either.
check with this wetther it is solved or not.
Regards,
sana. -
How to switch off column coloring of alv grid printouts?
Hello World!
Is there any possibility (a customizing option or a parameter) to switch off cell/column coloring of alv grid printouts?
It is very useful to see colored columns in screens, but they are darkened in printouts. How to avoid it?
Thanks and regards,
VladimirHi,
You can have different layouts for a ALV report and each layout the look and feel can be different.
So, the manual activity is the user will have to switch to the B/W layout before printing. I am not sure if you have enabled the LAYOUT option for the user to change it by himself.
I hope I am able to get across my point.
If you are using OO ALV control, you can dynamically change the layout using set_frontend_layout method. The user can also change the layout --
choose Change layout or Settings ® Layout ® Change.
The Change Layout dialog box shows you which columns are currently displayed and which additional columns can be displayed.
Regards,
Ravi
Note - Please mark the helpful answers
Message was edited by: Ravikumar Allampallam -
Hiding a column in the ALV in a webdynpro component(standrad one)
Hi,
i have an requirement of hiding a column inside a ALV output of a web dynpro component which is a standrad one. please help me finding the way to do the same.
thanks,
selvakumar M.data: l_ref_usage type ref to if_wd_component_usage.
l_ref_usage = wd_this->wd_CpUse_Alv( ).
if l_ref_usage->has_active_component( ) = abap_false.
l_ref_usage->create_component( ).
endif.
DATA: l_ref_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE .
l_ref_INTERFACECONTROLLER = wd_This->wd_CpIfc_Alv( ).
data:
l_VALUE type ref to Cl_Salv_Wd_Config_Table.
l_VALUE = l_ref_INTERFACECONTROLLER->Get_Model(
data: lr_column type ref to CL_SALV_WD_COLUMN.
lr_column =
l_value->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN( 'CARRID' ).
lr_column->set_visible( CL_WD_UIELEMENT=>E_VISIBLE-NONE ).
Abhi -
How to disable sorting for some columns in a ALV GRID?
Hi i have requirement where I have to disable sorting for some columns in a ALV GRID. i am using REUSE_ALV_GRID_DISPLAY function module.
Can anybody help me. how to acieve this? Any code snippets will really be appreciated.Hi,
I have tried this but not completely successful. I think this can be done using the OOPS method.
DATA: it_event_exit TYPE slis_t_event_exit.
DATA: w_exit TYPE slis_event_exit.
w_exit-ucomm = '&ODN'.
w_exit-before = 'X'.
CLEAR w_exit-after.
APPEND w_exit TO it_event_exit.
w_exit-ucomm = '&OUP'.
w_exit-before = 'X'.
CLEAR w_exit-after.
APPEND w_exit TO it_event_exit.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = w_repid
i_callback_top_of_page = 'ALV_TOP_OF_PAGE'
i_callback_html_top_of_page = 'ALV_HTML_TOP_OF_PAGE'
i_callback_user_command = 'USER_COMMAND' <- User command form
is_layout = wm_layout
it_fieldcat = wt_fieldcat
it_events = i_events
it_event_exit = it_event_exit <- Need to fill
it_sort = wt_sort
i_default = 'X'
Now you can capture this events in the user command
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
IF r_ucomm = '&OUP' and rs_selfield-SEL_TAB_FIELD = 'Your field name'.
ENDIF.
ENDFORM. "user_command
In this form you will get the function code in 'r_ucomm' and the field selected for sorting in 'rs_selfield-SEL_TAB_FIELD'. But reseting 'r_ucomm' will not work.
May be somebody else can give some help on this.
But this will work if you follow the oop method.
Please see this document for more info.
http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/an easy reference for alv grid control.pdf
Thanks
Vinod -
How to download alv grid output(with field catalog) into excel file format
Hi all,
How to download alv grid output(with field catalogs) into excel file format and same file has to download to application server.
Please help.
Regards,
Satya.Hi,
On list where alv is displayed, select export icon( green color -> ),select spread sheet.
This will display records in Excel sheet. -
ALV GRID OUTPUT PROBLEM.
here i m sending code for u r reviews.
i have two tables: pa0002, zfm_handy
i have to display alv grid by using these tables, i m getting output but the fields in the table pa0002(nachn,vorna) r not populated i m getting output for the fields those which r in the table zfm_handy only.
plz modify this code and suggest according to my requirement...
*& Report ZFM_MOBLIST *
REPORT ZFM_MOBLIST.
TABLES: ZFM_HANDY , PA0002.
TYPE-POOLS : SLIS.
DATA: G_REPID LIKE SY-REPID,
GS_PRINT TYPE SLIS_PRINT_ALV,
GT_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER,
GT_LIST_END_OF_PAGE TYPE SLIS_T_LISTHEADER,
GT_EVENTS TYPE SLIS_T_EVENT,
GT_SORT TYPE SLIS_T_SORTINFO_ALV,
GS_LAYOUT TYPE SLIS_LAYOUT_ALV,
GT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
FIELDCAT_LN LIKE LINE OF GT_FIELDCAT,
COL_POS TYPE I.
*DATA:
t_HANDY LIKE TABLE OF ZFM_HANDY,
t_pa0002 like table of PA0002,
f_handy like line of t_handy.
*DATA : BEGIN OF I_ZFM OCCURS 0.
*INCLUDE STRUCTURE ZFM_HANDY.
*DATA : NACHN LIKE PA0002-NACHN,
VORNA LIKE PA0002-VORNA,
END OF I_ZFM.
DATA : BEGIN OF ty_MOBLIST.
include structure zfm_handy.
data: NACHN like pa0002-nachn,
VORNA like pa0002-vorna,
END OF ty_MOBLIST.
DATA : BEGIN OF ty_zfm_handy.
include structure zfm_handy.
data : END OF ty_zfm_handy.
DATA : BEGIN OF ty_pa0002,
NACHN type pa0002-nachn,
VORNA type pa0002-vorna,
pernr type pa0002-pernr,
END OF ty_pa0002.
data : it_MOBLIST LIKE table of ty_MOBLIST,
wa_MOBLIST LIKE ty_MOBLIST ,
it_zfm_handy LIKE table of ty_zfm_handy,
wa_zfm_handy LIKE ty_zfm_handy ,
it_pa0002 LIKE table of ty_pa0002,
wa_pa0002 LIKE ty_pa0002 .
*DATA : BEGIN OF IT_ZFM_MOBLIST OCCURS 0.
include structure zfm_handy.
data: NACHN like pa0002-nachn,
VORNA like pa0002-vorna,
END OF IT_ZFM_MOBLIST.
DATA : BEGIN OF IT_ZFM_HANDY OCCURS 0.
include structure zfm_handy.
END OF IT_ZFM_HANDY.
*DATA : BEGIN OF IT_ZFM_PA0002 OCCURS 0,
NACHN type pa0002-nachn,
VORNA type pa0002-vorna,
pernr type pa0002-pernr,
END OF IT_ZFM_PA0002.
INITIALIZATION.
G_REPID = SY-REPID.
PERFORM PRINT_BUILD USING GS_PRINT. "Print PARAMETERS
START-OF-SELECTION.
SELECT * from
zfm_handy
into corresponding fields of table it_zfm_handy.
if not it_zfm_handy[] is initial.
select NACHN
VORNA
from pa0002
into table it_pa0002
for all entries in it_zfm_handy
where pernr = it_zfm_handy-pernr.
endif. " not it_zfm_handy
loop at it_zfm_handy into wa_zfm_handy.
read table it_pa0002 into wa_pa0002 with key pernr = ty_zfm_handy-pernr.
if sy-subrc = 0.
clear wa_MOBLIST.
move wa_zfm_handy to wa_MOBLIST.
move wa_pa0002 to wa_MOBLIST.
append wa_MOBLIST to it_MOBLIST .
endif. " sy-subrc
endloop.
*SELECT * from
zfm_handy
into corresponding fields of table it_zfm_handy.
if not it_zfm_handy[] is initial.
select NACHN
VORNA
from pa0002
into table it_pa0002
for all entries in it_zfm_handy
where pernr = it_zfm_handy-pernr.
endif. " not it_zfm_handy
loop at it_zfm_handy.
read table it_pa0002 FROM PA0002 with key pernr = ty_zfm_handy-pernr.
if sy-subrc = 0.
clear wa_MOBLIST.
move wa_zfm_handy to wa_MOBLIST.
move wa_pa0002 to wa_MOBLIST.
append wa_MOBLIST to it_MOBLIST .
APPEND IT_ZFM_MOBLIST.
endif. " sy-subrc
endloop.
SELECT *
FROM zfm_handy
INTO TABLE t_handy.
*SELECT ZFM_HANDY~TELNUM ZFM_HANDY~KARTNR ZFM_HANDY~ZUTART ZFM_HANDY~PERNR
ZFM_HANDYZDATE ZFM_HANDYPINNR ZFM_HANDYPUKNR ZFM_HANDYTARIF1
ZFM_HANDYTARIF2 ZFM_HANDYTARIF3 ZFM_HANDYGTYPE ZFM_HANDYIMEI ZFM_HANDY~TWINCARD
ZFM_HANDYTWINBILL ZFM_HANDYEINBAU ZFM_HANDYBESCHR ZFM_HANDYTEXT1 ZFM_HANDY~TEXT2
ZFM_HANDYTEXT3 PA0002NACHN PA0002~VORNA INTO TABLE I_ZFM FROM ZFM_HANDY INNER JOIN PA0002
ON ZFM_HANDYPERNR = PA0002PERNR.
select atelnum akartnr azutart apernr azdate apinnr apuknr atarif1 atarif2 atarif3 agtype aimei a~twincard
atwinbill aeinbau abeschr atext1 atext2 atext3 bnachn bvorna into table i_zfm from zfm_handy as a inner join pa0002
as b on apernr = bpernr where apernr = bpernr.
*telnum , kartnr , zutart , pernr , zdate , pinnr , puknr ,
tarif1 , tarif2 , tarif3 , gtye , imei , twincard , twinbill , einbau , beschr , text1 , text2 , text3 , nachn , vorna) from
zfm_handy as a inner join pa0002 as b on apernr = bpernr where apernr = bpernr.
PERFORM BUILD.
PERFORM EVENTTAB_BUILD CHANGING GT_EVENTS.
PERFORM COMMENT_BUILD CHANGING GT_LIST_TOP_OF_PAGE.
PERFORM CALL_ALV.
*& Form BUILD
FORM BUILD.
DATA FIELD CATALOG
Explain Field Description to ALV
DATA: FIELDCAT_IN TYPE SLIS_FIELDCAT_ALV.
CLEAR FIELDCAT_IN.
FIELDCAT_LN-FIELDNAME = 'TELNUM'.
FIELDCAT_LN-TABNAME = 'IT_MOBLIST'.
FIELDCAT_LN-NO_OUT = ' '.
FIELDCAT_LN-SELTEXT_L = 'TELNUM'.
APPEND FIELDCAT_LN TO GT_FIELDCAT.
CLEAR FIELDCAT_IN.
FIELDCAT_LN-FIELDNAME = 'KARTNR'.
FIELDCAT_LN-TABNAME = 'IT_MOBLIST'.
FIELDCAT_LN-NO_OUT = ' '.
FIELDCAT_LN-SELTEXT_L = 'KARTNR'.
APPEND FIELDCAT_LN TO GT_FIELDCAT.
CLEAR FIELDCAT_IN.
FIELDCAT_LN-FIELDNAME = 'ZUTART'.
FIELDCAT_LN-TABNAME = 'IT_MOBLIST'.
FIELDCAT_LN-NO_OUT = ' '.
FIELDCAT_LN-SELTEXT_L = 'ZUTART'.
APPEND FIELDCAT_LN TO GT_FIELDCAT.
CLEAR FIELDCAT_IN.
FIELDCAT_LN-FIELDNAME = 'PERNR'.
FIELDCAT_LN-TABNAME = 'IT_MOBLIST'.
FIELDCAT_LN-NO_OUT = ' '.
FIELDCAT_LN-SELTEXT_L = 'PERNR'.
APPEND FIELDCAT_LN TO GT_FIELDCAT.
CLEAR FIELDCAT_IN.
FIELDCAT_LN-FIELDNAME = 'ZDATE'.
FIELDCAT_LN-TABNAME = 'IT_MOBLIST'.
FIELDCAT_LN-NO_OUT = ' '.
FIELDCAT_LN-SELTEXT_L = 'ZDATE'.
APPEND FIELDCAT_LN TO GT_FIELDCAT.
CLEAR FIELDCAT_IN.
FIELDCAT_LN-FIELDNAME = 'PINNR'.
FIELDCAT_LN-TABNAME = 'IT_MOBLIST'.
FIELDCAT_LN-NO_OUT = ' '.
FIELDCAT_LN-SELTEXT_L = 'PINNR'.
APPEND FIELDCAT_LN TO GT_FIELDCAT.
CLEAR FIELDCAT_IN.
FIELDCAT_LN-FIELDNAME = 'PUKNR'.
FIELDCAT_LN-TABNAME = 'IT_MOBLIST'.
FIELDCAT_LN-NO_OUT = ' '.
FIELDCAT_LN-SELTEXT_L = 'PUKNR'.
APPEND FIELDCAT_LN TO GT_FIELDCAT.
CLEAR FIELDCAT_IN.
FIELDCAT_LN-FIELDNAME = 'TARIF1'.
FIELDCAT_LN-TABNAME = 'IT_MOBLIST'.
FIELDCAT_LN-NO_OUT = ' '.
FIELDCAT_LN-SELTEXT_L = 'TARIF1'.
APPEND FIELDCAT_LN TO GT_FIELDCAT.
CLEAR FIELDCAT_IN.
FIELDCAT_LN-FIELDNAME = 'TARIF2'.
FIELDCAT_LN-TABNAME = 'IT_MOBLIST'.
FIELDCAT_LN-NO_OUT = ' '.
FIELDCAT_LN-SELTEXT_L = 'TARIF2'.
APPEND FIELDCAT_LN TO GT_FIELDCAT.
CLEAR FIELDCAT_IN.
FIELDCAT_LN-FIELDNAME = 'TARIF3'.
FIELDCAT_LN-TABNAME = 'IT_MOBLIST'.
FIELDCAT_LN-NO_OUT = ' '.
FIELDCAT_LN-SELTEXT_L = 'TARIF3'.
APPEND FIELDCAT_LN TO GT_FIELDCAT.
CLEAR FIELDCAT_IN.
FIELDCAT_LN-FIELDNAME = 'GTYPE'.
FIELDCAT_LN-TABNAME = 'IT_MOBLIST'.
FIELDCAT_LN-NO_OUT = ' '.
FIELDCAT_LN-SELTEXT_L = 'GTYPE'.
APPEND FIELDCAT_LN TO GT_FIELDCAT.
CLEAR FIELDCAT_IN.
FIELDCAT_LN-FIELDNAME = 'IMEI'.
FIELDCAT_LN-TABNAME = 'IT_MOBLIST'.
FIELDCAT_LN-NO_OUT = ' '.
FIELDCAT_LN-SELTEXT_L = 'IMEI'.
APPEND FIELDCAT_LN TO GT_FIELDCAT.
CLEAR FIELDCAT_IN.
FIELDCAT_LN-FIELDNAME = 'TWINCARD'.
FIELDCAT_LN-TABNAME = 'IT_MOBLIST'.
FIELDCAT_LN-NO_OUT = ' '.
FIELDCAT_LN-SELTEXT_L = 'TWINCARD'.
APPEND FIELDCAT_LN TO GT_FIELDCAT.
CLEAR FIELDCAT_IN.
FIELDCAT_LN-FIELDNAME = 'TWINBILL'.
FIELDCAT_LN-TABNAME = 'IT_MOBLIST'.
FIELDCAT_LN-NO_OUT = ' '.
FIELDCAT_LN-SELTEXT_L = 'TWINBILL'.
APPEND FIELDCAT_LN TO GT_FIELDCAT.
CLEAR FIELDCAT_IN.
FIELDCAT_LN-FIELDNAME = 'EINBAU'.
FIELDCAT_LN-TABNAME = 'IT_MOBLIST'.
FIELDCAT_LN-NO_OUT = ' '.
FIELDCAT_LN-SELTEXT_L = 'EINBAU'.
APPEND FIELDCAT_LN TO GT_FIELDCAT.
CLEAR FIELDCAT_IN.
FIELDCAT_LN-FIELDNAME = 'BESCHAR'.
FIELDCAT_LN-TABNAME = 'IT_MOBLIST'.
FIELDCAT_LN-NO_OUT = ' '.
FIELDCAT_LN-SELTEXT_L = 'BESCHR'.
APPEND FIELDCAT_LN TO GT_FIELDCAT.
CLEAR FIELDCAT_IN.
FIELDCAT_LN-FIELDNAME = 'TEXT1'.
FIELDCAT_LN-TABNAME = 'IT_MOBLIST'.
FIELDCAT_LN-NO_OUT = ' '.
FIELDCAT_LN-SELTEXT_L = 'TEXT1'.
APPEND FIELDCAT_LN TO GT_FIELDCAT.
CLEAR FIELDCAT_IN.
FIELDCAT_LN-FIELDNAME = 'TEXT2'.
FIELDCAT_LN-TABNAME = 'IT_MOBLIST'.
FIELDCAT_LN-NO_OUT = ' '.
FIELDCAT_LN-SELTEXT_L = 'TEXT2'.
APPEND FIELDCAT_LN TO GT_FIELDCAT.
CLEAR FIELDCAT_IN.
FIELDCAT_LN-FIELDNAME = 'TEXT3'.
FIELDCAT_LN-TABNAME = 'IT_MOBLIST'.
FIELDCAT_LN-NO_OUT = ' '.
FIELDCAT_LN-SELTEXT_L = 'TEXT3'.
APPEND FIELDCAT_LN TO GT_FIELDCAT.
CLEAR FIELDCAT_IN.
FIELDCAT_LN-FIELDNAME = 'NACHN'.
FIELDCAT_LN-TABNAME = 'IT_MOBLIST'.
FIELDCAT_LN-NO_OUT = ' '.
FIELDCAT_LN-SELTEXT_L = 'NACHN'.
APPEND FIELDCAT_LN TO GT_FIELDCAT.
CLEAR FIELDCAT_IN.
FIELDCAT_LN-FIELDNAME = 'VORNA'.
FIELDCAT_LN-TABNAME = 'IT_MOBLIST'.
FIELDCAT_LN-NO_OUT = ' '.
FIELDCAT_LN-SELTEXT_L = 'VORNA'.
APPEND FIELDCAT_LN TO GT_FIELDCAT.
DATA SORTING
DATA: GS_SORT TYPE SLIS_SORTINFO_ALV.
CLEAR GS_SORT.
GS_SORT-FIELDNAME = 'TELNUM'.
GS_SORT-SPOS = 1.
GS_SORT-UP = 'X'.
GS_SORT-SUBTOT = 'X'.
APPEND GS_SORT TO GT_SORT.
CLEAR GS_SORT.
GS_SORT-FIELDNAME = 'KARTNR'.
GS_SORT-SPOS = 2.
GS_SORT-UP = 'X'.
*GS_SORT-SUBTOT = 'X'.
APPEND GS_SORT TO GT_SORT.
ENDFORM. "BUILD
*& Form CALL_ALV
FORM CALL_ALV.
ABAP List Viewer
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = G_REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_STRUCTURE_NAME = 'ITAB1'
IS_LAYOUT = GS_LAYOUT
IT_FIELDCAT = GT_FIELDCAT
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT = GT_SORT
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS = GT_EVENTS
IT_EVENT_EXIT =
IS_PRINT = GS_PRINT
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IT_HYPERLINK =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = IT_ZFM_HANDY[]
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
ENDFORM. "CALL_ALV
HEADER FORM
FORM EVENTTAB_BUILD CHANGING LT_EVENTS TYPE SLIS_T_EVENT.
CONSTANTS:
GC_FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE',
GC_FORMNAME_END_OF_PAGE TYPE SLIS_FORMNAME VALUE 'END_OF_PAGE'.
DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = LT_EVENTS.
READ TABLE LT_EVENTS WITH KEY NAME = SLIS_EV_TOP_OF_PAGE
INTO LS_EVENT.
IF SY-SUBRC = 0.
MOVE GC_FORMNAME_TOP_OF_PAGE TO LS_EVENT-FORM.
APPEND LS_EVENT TO LT_EVENTS.
ENDIF.
define END_OF_PAGE event
READ TABLE LT_EVENTS WITH KEY NAME = SLIS_EV_END_OF_PAGE
INTO LS_EVENT.
IF SY-SUBRC = 0.
MOVE GC_FORMNAME_END_OF_PAGE TO LS_EVENT-FORM.
APPEND LS_EVENT TO LT_EVENTS.
ENDIF.
ENDFORM. "EVENTTAB_BUILD
*& Form COMMENT_BUILD
FORM COMMENT_BUILD CHANGING GT_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
DATA: GS_LINE TYPE SLIS_LISTHEADER.
data: today_date(10) type c.
concatenate
sy-datum+6(2) '.'
sy-datum+4(2) '.'
sy-datum(4) into today_date.
CLEAR GS_LINE.
GS_LINE-TYP = 'H'.
GS_LINE-INFO = 'MOBLIST DETAILS'.
APPEND GS_LINE TO GT_TOP_OF_PAGE.
CLEAR GS_LINE.
GS_LINE-TYP = 'S'.
GS_LINE-KEY = 'Date:'.
GS_LINE-INFO = today_date.
APPEND GS_LINE TO GT_TOP_OF_PAGE.
GS_LINE-KEY = 'User:'.
GS_LINE-INFO = sy-uname.
APPEND GS_LINE TO GT_TOP_OF_PAGE.
CLEAR GS_LINE.
GS_LINE-TYP = 'A'.
GS_LINE-INFO = 'ACTION'.
APPEND GS_LINE TO GT_TOP_OF_PAGE.
ENDFORM. "COMMENT_BUILD
*& Form TOP_OF_PAGE
FORM TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
WRITE: SY-DATUM, 'Page No', SY-PAGNO RIGHT-JUSTIFIED.
ENDFORM. "TOP_OF_PAGE
*& Form END_OF_PAGE
FORM END_OF_PAGE.
WRITE: /.
WRITE at (sy-linsz) sy-pagno CENTERED.
ENDFORM. "END_OF_PAGE
### PRINT SETTINGS
FORM PRINT_BUILD USING LS_PRINT TYPE SLIS_PRINT_ALV.
LS_PRINT-PRINT = ' '. "PRINT IMMEDIATE
LS_PRINT-NO_PRINT_SELINFOS = 'X'. "NO SELECTION INFO
LS_PRINT-NO_COVERPAGE = ' '. "NO COVER PAGE
LS_PRINT-NO_NEW_PAGE = ' '. "NO NEW PAGE
LS_PRINT-NO_PRINT_LISTINFOS = 'X'. "NO PRINT LIST INFO
LS_PRINT-RESERVE_LINES = 2. " FOOTERLINE
ENDFORM. "PRINT_BUILDHi narendra,
loop at it_zfm_handy into wa_zfm_handy.
<b>read table it_pa0002 into wa_pa0002 with key pernr = ty_zfm_handy-pernr.</b>
if sy-subrc = 0.
clear wa_MOBLIST.
move wa_zfm_handy to wa_MOBLIST.
move wa_pa0002 to wa_MOBLIST.
append wa_MOBLIST to it_MOBLIST .
endif. " sy-subrc
endloop.
<b>read table it_pa0002 into wa_pa0002 with key pernr = ty_zfm_handy-pernr.</b>
replace the above statement with
<b>read table it_pa0002 into wa_pa0002 with key pernr = it_zfm_handy-pernr.</b>
Maybe you are looking for
-
OC4J에서 DEFAULT로 제공하는 JDBC CLASSES를 원하는 JDBC CLASSES FILE로 변경하는 방법
제품 : JDBC 작성날짜 : OC4J에서 DEFAULT로 제공하는 JDBC CLASSES를 원하는 JDBC CLASSES FILE로 변경하는 방법 ================================================================= PURPOSE 9iAS에서 JDBC thin driver인 classes file을 새로운 version으로 변경하기 위한 여러가지 방법을 정리한다. Explanation 9iAS
-
HT201210 i keep getting error code 37 on my ipad 1 its in dfu mode and will not restart pls help
i keep getting error code 37 on my ipad 1 its in dfu mode and will not restart pls help
-
Apple mail in Mountain Lion keeps asking to sign in.
Hello, Ever since I updated my software to mountain lion, I had numerous problems with apple mail and the messages application. First of all, my apple mail was running fine before the update and every since I updated the software, it keeps asking me
-
Web Service (SOAP) stopped working with new update
We've got a SOAP service that sits on a second server that our main flash file calls to. It's work just fine until we've updated to the latest Flash player 9. I've read about the Socket Policy file and figure that is the issue. We are on a hosted ser
-
My facebook photos are being removed automatically
Dear Apple Group, My facebook photos are being removed automatically. I get a message in iphoto saying this album is being removed from facebook - but is still my my iPhoto library. I want to keep my photos in facebook - that's why I put them there.