F4 help not reflecting in ALV Grid for fixed values specified in domain
Hi experts,
As per subject i have a field for which i have assigned 5 fixed values in the domain level (of that field) . The problem is when i am displaying my ALV grid output i need a F4 help and F4 Option for the same is not reflecting and i have assigned in the field catlog as shown bellow.
wa_fcat-fieldname = 'ZDEPLOY'.
wa_fcat-tabname = 'IT_FINAL'.
wa_fcat-f4availabl = 'X'.
wa_fcat-key = 'X'.
WA_FCAT-SELTEXT_L = 'Deployment Planned'.
wa_fcat-outputlen = '25'.
WA_FCAT-EDIT = 'X'.
WA_FCAT-REF_FIELDNAME = 'ZDEPLOY'.
WA_FCAT-REF_TABNAME = 'ZETMDEPL'.
APPEND WA_FCAT TO IT_FIELDCAT.
CLEAR WA_FCAT.
for the above field the f4 help is not reflecting.
Intrestingly i have another field which i have declared using the same procedure for which my F4 help (with fixed values ) is reflecting in the same program .with the values as shown below
wa_fcat-fieldname = 'ZFINAL'.
wa_fcat-tabname = 'IT_FINAL'.
WA_FCAT-SELTEXT_L = 'Final Status'.
wa_fcat-outputlen = '10'.
WA_FCAT-EDIT = 'X'.
wa_fcat-ref_fieldname = 'ZFINAL'.
wa_fcat-ref_tabname = 'ZETMDEPL'.
APPEND WA_FCAT TO IT_FIELDCAT.
CLEAR WA_FCAT.
can u plz suggest me with a solution .
Regards,
Edited by: abhilash aswath on Oct 20, 2010 3:32 PM
Moderator message: please do not use SMS speak.
Edited by: Thomas Zloch on Oct 20, 2010 3:58 PM
hi,
There was a mismatch of characteristics. I resolved by matching the same.
Similar Messages
-
Search help (PREM) for personal no. is not coming in ALV grid table control
hi experts,
Search help (PREM) for personal no. is not coming in ALV grid table control.
i have assigned the srch help (prem) to my 'ZFIEXP_PROJALLOC' table for the emp_id.
but in output it is now showing the help.
ls_fcat-fieldname = 'EMPLOYEE CODE'.
ls_fcat-ref_table = 'ZFIEXP_PROJALLOC'.
ls_fcat-ref_field = 'EMP_ID'.
ls_fcat-outputlen = '10'.
ls_fcat-key = 'X'.
ls_fcat-edit = 'X'.
ls_fcat-coltext = 'EMPLOYEE CODE'.
ls_fcat-seltext = 'EMPLOYEE CODE'.
append ls_fcat to pt_fieldcat.
clear ls_fcat.
Then i tried to solve it using the PA0002 . ie.,
ls_fcat-fieldname = 'EMPLOYEE CODE'.
ls_fcat-ref_table = 'PA0002'.
ls_fcat-ref_field = 'PERNR'.
ls_fcat-outputlen = '10'.
ls_fcat-key = 'X'.
ls_fcat-edit = 'X'.
ls_fcat-coltext = 'EMPLOYEE CODE'.
ls_fcat-seltext = 'EMPLOYEE CODE'.
append ls_fcat to pt_fieldcat.
clear ls_fcat.
with this it is showing the help in employee code, but, when i click on an empl number, it is not added to my table control and allowing me to add the number by typing them.
plz help me.
thanks.Hi
In the layout give layout-sel_mode = 'A'. and
pass 'A' to i_save exporting parameter to method set_table_for_first_display.
The same thing if you are working with function module
reuse_alv_grid_display.
Reward points for useful answer.
Venkat -
Sub:Filtering is not working in ALV Grid
Hi All,
I developed a new ALV report,where in the out put i can set filtering for other columns(ex:Date,Number),but i can'nt able to set Filtering for one of the column which is CHAR type.
But when we went to table for this field filtering is working,but not in the ALV Grid of our report.
Regards,
Seshadri Ghi,
1) for filtering, we create an internak table of type <b>LVC_T_FILT</b>,
U can assign fields to the above created internal as per u requirements.
2) passing the above internal table to CHANGING parameter of method SET_TABLE FORFIRST_DISPLAY in ALV GRID.
<b>IT_FILTER = < internal table TYPE LVC_T_FLIT>.</b>
<u><b>OR call this method for setting filter criteria as per u r requirement.</b></u>
Set current filter settings. A row of the table describes the selection conditions for column entries that are not to be displayed.
You should never manually set up the internal table with the filter settings. Use this method only to set filter criteria that you got using get_filter_criteria or a layout.
Features
CALL METHOD <ref. var. to CL_GUI_ALV_GRID > ->set_filter_criteria
EXPORTING
IT_FILTER = <internal table of type LVC_T_FILT > .
Parameter
Meaning
IT_FILTER
Table with filter settings
regards,
AshokReddy.
Message was edited by:
Ashok Reddy
Message was edited by:
Ashok Reddy -
Hi experts.
Can someone assist me with information on using ALV grid for data input. Please give a simple example if possible.
I am mainly interested in the part in which we can transfer data from the grid changing the internal table's data.Try this code:
REPORT z_demo_alv_jg.
TYPE-POOLS *
TYPE-POOLS: slis.
INTERNAL TABLES/WORK AREAS/VARIABLES *
DATA: i_fieldcat TYPE slis_t_fieldcat_alv,
i_index TYPE STANDARD TABLE OF i WITH HEADER LINE,
w_field TYPE slis_fieldcat_alv,
p_table LIKE dd02l-tabname,
dy_table TYPE REF TO data,
dy_tab TYPE REF TO data,
dy_line TYPE REF TO data.
FIELD-SYMBOLS *
FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE,
<dyn_wa> TYPE ANY,
<dyn_field> TYPE ANY,
<dyn_tab_temp> TYPE STANDARD TABLE.
SELECTION SCREEN *
PARAMETERS: tabname(30) TYPE c,
lines(5) TYPE n.
START-OF-SELECTION *
START-OF-SELECTION.
Storing table name
p_table = tabname.
Create internal table dynamically with the stucture of table name
entered in the selection screen
CREATE DATA dy_table TYPE STANDARD TABLE OF (p_table).
ASSIGN dy_table->* TO <dyn_table>.
IF sy-subrc <> 0.
MESSAGE i000(z_zzz_ca_messages) WITH ' No table found'.
LEAVE TO LIST-PROCESSING.
ENDIF.
Create workarea for the table
CREATE DATA dy_line LIKE LINE OF <dyn_table>.
ASSIGN dy_line->* TO <dyn_wa>.
Create another temp. table
CREATE DATA dy_tab TYPE STANDARD TABLE OF (p_table).
ASSIGN dy_tab->* TO <dyn_tab_temp>.
SORT i_fieldcat BY col_pos.
Select data from table
SELECT * FROM (p_table)
INTO TABLE <dyn_table>
UP TO lines ROWS.
REFRESH <dyn_tab_temp>.
Display report
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_structure_name = p_table
i_callback_user_command = 'USER_COMMAND'
i_callback_pf_status_set = 'SET_PF_STATUS'
TABLES
t_outtab = <dyn_table>
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
*& Form SET_PF_STATUS
Setting custom PF-Status
-->RT_EXTAB Excluding table
FORM set_pf_status USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'Z_STANDARD'.
ENDFORM. "SET_PF_STATUS
*& Form user_command
Handling custom function codes
-->R_UCOMM Function code value
-->RS_SELFIELD Info. of cursor position in ALV
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
Local data declaration
DATA: li_tab TYPE REF TO data,
l_line TYPE REF TO data.
Local field-symbols
FIELD-SYMBOLS:<l_tab> TYPE table,
<l_wa> TYPE ANY.
Create table
CREATE DATA li_tab TYPE STANDARD TABLE OF (p_table).
ASSIGN li_tab->* TO <l_tab>.
Create workarea
CREATE DATA l_line LIKE LINE OF <l_tab>.
ASSIGN l_line->* TO <l_wa>.
CASE r_ucomm.
When a record is selected
WHEN '&IC1'.
Read the selected record
READ TABLE <dyn_table> ASSIGNING <dyn_wa> INDEX
rs_selfield-tabindex.
IF sy-subrc = 0.
Store the record in an internal table
APPEND <dyn_wa> TO <l_tab>.
Fetch the field catalog info
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = 'Z_DEMO_PDF_JG'
i_structure_name = p_table
CHANGING
ct_fieldcat = i_fieldcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc = 0.
Make all the fields input enabled except key fields*
w_field-input = 'X'.
MODIFY i_fieldcat FROM w_field TRANSPORTING input
WHERE key IS INITIAL.
ENDIF.
Display the record for editing purpose
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_structure_name = p_table
it_fieldcat = i_fieldcat
i_screen_start_column = 10
i_screen_start_line = 15
i_screen_end_column = 200
i_screen_end_line = 20
TABLES
t_outtab = <l_tab>
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc = 0.
Read the modified data
READ TABLE <l_tab> INDEX 1 INTO <l_wa>.
If the record is changed then track its index no.
and populate it in an internal table for future
action
IF sy-subrc = 0 AND <dyn_wa> <> <l_wa>.
<dyn_wa> = <l_wa>.
i_index = rs_selfield-tabindex.
APPEND i_index.
ENDIF.
ENDIF.
ENDIF.
When save button is pressed
WHEN 'SAVE'.
Sort the index table
SORT i_index.
Delete all duplicate records
DELETE ADJACENT DUPLICATES FROM i_index.
LOOP AT i_index.
Find out the changes in the internal table
and populate these changes in another internal table
READ TABLE <dyn_table> ASSIGNING <dyn_wa> INDEX i_index.
IF sy-subrc = 0.
APPEND <dyn_wa> TO <dyn_tab_temp>.
ENDIF.
ENDLOOP.
Lock the table
CALL FUNCTION 'ENQUEUE_E_TABLE'
EXPORTING
mode_rstable = 'E'
tabname = p_table
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
IF sy-subrc = 0.
Modify the database table with these changes
MODIFY (p_table) FROM TABLE <dyn_tab_temp>.
REFRESH <dyn_tab_temp>.
Unlock the table
CALL FUNCTION 'DEQUEUE_E_TABLE'
EXPORTING
mode_rstable = 'E'
tabname = p_table.
ENDIF.
ENDCASE.
rs_selfield-refresh = 'X'.
ENDFORM. "user_command -
Changes not reflected in alv after calling check change method
Hi to all experts,
i have alv report with two editable fields ( checkbox and qty to print) when i check the checkbox and dont change the qty to print i m able to see the changes . but when i change the checkbox and qty to print fields (both ) im unable to see the changes . what could be the reasons for this .please help ........
user_command
FORM user_command USING r_ucomm TYPE sy-ucomm
rs_selfield TYPE slis_selfield .
DATA: p_ref1 TYPE REF TO cl_gui_alv_grid.
DATA: l_menge(4).
CASE r_ucomm .
WHEN 'SEL_ALL'.
fl_sel = 'X'." setting up the flag for all selection.
PERFORM sel_rec.
* rs_selfield-refresh = 'X'.
WHEN 'DES_ALL'.
fl_del = 'X'.
PERFORM del_sel.
* rs_selfield-refresh = 'X'.
WHEN 'EXEC' .
IF p_ref1 IS INITIAL.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = p_ref1.
ENDIF.
IF p_ref1 IS NOT INITIAL.
CALL METHOD p_ref1->check_changed_data.
ENDIF.
LOOP AT it_output INTO wa_output WHERE cbox EQ 'X'.
READ TABLE it_mard INTO wa_mard WITH KEY matnr = wa_output-matnr.
IF sy-subrc EQ 0.
wa_smart-lgpbe = wa_mard-lgpbe.
ENDIF.
wa_smart-matnr = wa_output-matnr.
wa_smart-maktx = wa_output-maktx.
wa_smart-meins = wa_output-meins.
wa_smart-bldat = wa_output-bldat.
wa_smart-no_cop = wa_output-menge1.
APPEND wa_smart TO it_smart.
CLEAR wa_smart.
ENDLOOP.
CHECK fl_del NE 'X'.
IF 1x3 = 'X'.
PERFORM print_smartform1x3.
ELSE.
PERFORM print_smartform2x4.
ENDIF.
ENDCASE.
fieldcatalog
wa_fieldcat-col_pos = 1 .
wa_fieldcat-fieldname = 'CBOX' .
wa_fieldcat-tabname = 'IT_OUTPUT' .
wa_fieldcat-outputlen = '1' .
wa_fieldcat-seltext_m = 'SELECTION'.
wa_fieldcat-checkbox = 'X'.
wa_fieldcat-edit = 'X' .
wa_fieldcat-input = 'X'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = 2.
wa_fieldcat-fieldname = 'MENGE1'.
wa_fieldcat-datatype = 'INT4'.
wa_fieldcat-seltext_m = 'QTY TO PRINT'.
wa_fieldcat-tabname = 'IT_OUTPUT'.
wa_fieldcat-edit = 'X'.
wa_fieldcat-input = 'X'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = 3 .
wa_fieldcat-fieldname = 'MBLNR' .
wa_fieldcat-tabname = 'IT_OUTPUT' .
wa_fieldcat-seltext_m = 'MATERIAL DOCUMENT NO'.
wa_fieldcat-outputlen = '10'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = 4.
wa_fieldcat-fieldname = 'BWART'.
wa_fieldcat-tabname = 'IT_OUTPUT'.
wa_fieldcat-seltext_m = 'MOVEMENT TYPE'.
wa_fieldcat-outputlen = '3'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = 5.
wa_fieldcat-fieldname = 'MATNR' .
wa_fieldcat-tabname = 'IT_OUTPUT' .
wa_fieldcat-seltext_m = 'MATERIAL ID'.
wa_fieldcat-outputlen = '10'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = 6 .
wa_fieldcat-fieldname = 'BTEXT' .
wa_fieldcat-tabname = 'IT_OUTPUT' .
wa_fieldcat-seltext_m = 'MOVEMENT TYPE DESC'.
wa_fieldcat-outputlen = '10'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = 7.
wa_fieldcat-fieldname = 'MAKTX'.
wa_fieldcat-tabname = 'IT_OUTPUT'.
wa_fieldcat-outputlen = '40'.
wa_fieldcat-seltext_l = 'MATERIAL DESCRIPTION'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = 8.
wa_fieldcat-fieldname = 'MENGE'.
wa_fieldcat-tabname = 'IT_OUTPUT'.
wa_fieldcat-seltext_m = 'QUANTITY'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = 9.
wa_fieldcat-fieldname = 'MEINS'.
wa_fieldcat-tabname = 'IT_OUTPUT'.
wa_fieldcat-seltext_m = 'UNIT OF MEASUREMENT'.
wa_fieldcat-ref_tabname = 'T006'.
wa_fieldcat-outputlen = '3'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = 10.
wa_fieldcat-fieldname = 'WERKS'.
wa_fieldcat-tabname = 'IT_OUTPUT'.
wa_fieldcat-seltext_m = 'PLANT'.
wa_fieldcat-outputlen = '4'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = 11.
wa_fieldcat-fieldname = 'LGORT'.
wa_fieldcat-tabname = 'IT_OUTPUT'.
wa_fieldcat-seltext_m = 'STORAGE LOCATION'.
wa_fieldcat-outputlen = '4'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = 12.
wa_fieldcat-fieldname = 'EBELN'.
wa_fieldcat-tabname = 'IT_OUTPUT'.
wa_fieldcat-seltext_m = 'PUR ORDER NO'.
wa_fieldcat-outputlen = '10'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = 13.
wa_fieldcat-fieldname = 'LIFNR'.
wa_fieldcat-tabname = 'IT_OUTPUT'.
wa_fieldcat-seltext_m = 'VENDOR'.
wa_fieldcat-outputlen = '10'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = 14.
wa_fieldcat-fieldname = 'XBLNR'.
wa_fieldcat-tabname = 'IT_OUTPUT'.
wa_fieldcat-seltext_m = 'DELIEVERY NOTE'.
wa_fieldcat-outputlen = '16'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = 15.
wa_fieldcat-fieldname = 'BLDAT'.
wa_fieldcat-tabname = 'IT_OUTPUT'.
wa_fieldcat-seltext_m = 'DOCUMENT DATE'.
wa_fieldcat-outputlen = '10'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = 16.
wa_fieldcat-fieldname = 'BUDAT'.
wa_fieldcat-tabname = 'IT_OUTPUT'.
wa_fieldcat-seltext_m = 'POSTING DATE'.
wa_fieldcat-outputlen = '10'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-col_pos = 17.
wa_fieldcat-fieldname = 'USNAM'.
wa_fieldcat-tabname = 'IT_OUTPUT'.
wa_fieldcat-seltext_m = 'USER ID'.
wa_fieldcat-outputlen = '12'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.Hi,
Refer this wiki code ALV Grid Display with checkbox to process selected records at runtime, it will definitely help you:-
https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/alv%252bgrid%252bdisplay%252bwith%252bcheckbox%252bto%252bprocess%252bselected%252brecords%252bat%252bruntime
Regards,
Tarun -
Simple tutorial for using alv-grid for data entry into table, please!
Hi friends,
I urgently need a basic, simple tutorial or step-by-step or sample code on the following:
I want to have a alv-grid like entry list where i can add/remove additional lines/entries that then are saved into an internal table. Please help me with that, as i studied already some documents but do not really get the idea of how to do - <REMOVED BY MODERATOR>
Thanks in advance,
Edited by: Alvaro Tejada Galindo on Jan 11, 2008 6:18 PMhi clemens,
follow this link it may be useful to u
http://www.sap-basis-abap.com/sapab033.htm
http://www.abapprogramming.blogspot.com/2007/04/alv-details.html
for tutorial on alv:
http://www.sapbrainsonline.com/TUTORIALS/TECHNICAL/ALV_tutorial.html
i have pdf material also ican give it to you if u give your email id.
hope this helps you
regards,
sravanthi -
Hotspot click for only some rows in ALV grid for a particular column ?
Hi there,
In ALV grid, we can make Hotspot enable for all rows in a specified column
by specifying in the fieldcatalog with Hotspot attribute set as true.
But I want to enable Hotspot only for certain rows in the particular column. I tried with MC_STYLE4_LINK , but I didnt got the required result.
So , how could I achieve that in ALV grid.
Points would be rewarded for helpful answers.
Regards,
Anil .Hi,
You can do it for a column. Please refer to the code snippet below,
DATA : it_fcat TYPE lvc_t_fcat,
wa_fcat LIKE LINE OF it_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
I_BUFFER_ACTIVE =
i_structure_name = 'SMMW_ALERTS_ICON_S'
I_CLIENT_NEVER_DISPLAY = 'X'
I_BYPASSING_BUFFER =
I_INTERNAL_TABNAME =
CHANGING
ct_fieldcat = it_fcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3
LOOP AT it_fcat INTO wa_fcat.
IF wa_fcat-fieldname = 'STATUS'.
wa_fcat-hotspot = 'X'.
MODIFY it_fcat FROM wa_fcat.
CLEAR wa_fcat.
ENDIF.
ENDLOOP.
CALL METHOD l_obj_alv_grid->set_table_for_first_display
EXPORTING
i_structure_name = 'SMMW_ALERTS_ICON_S'
CHANGING
it_outtab = lt_alerts_st
it_fieldcatalog = it_fcat.
In the above replace the structure 'SMMW_ALERTS_ICON_S' with your structure and column 'STATUS' with your desired column.
Hope this helps,
Regards,
Vinodh -
Urgent : Problem with Editable ALV Grid for Quantity and Currency Fields
Hi All,
I am using Editable ALV Grid display and have quantity and value as editable fields in the display.
When user changes these values these values are not changing properly .
For the quantity field the domain is MENG13 with 3 deciamal places and here if we enter 500 it takes it as 0.500 .
The same problem is for the currency field. Here the Domain is WERT7 with 3 decimal places.
Here also it takes last 2 digits after decimal places by default.
Please advice how to get proper values in this case from ALV editable fields.
Thanks and Regards
Harshad
Edited by: Harshad Rahirkar on Dec 25, 2007 7:39 AMfor all the currency field , it will display like that only.
u have to manipulate uin program before displaying.
if they are giving 500, in program multiply with 100 and move it to table.
when u are getting from table, divinde and display.
this is what I am doing.
Reward if helpfull. -
Dear friends,
How can I set a ALV Grid layout for the MB5M report? I get the data in two rows when I download the report. Instead I want it in a single row. I tried to change the layout but without success. Please help.Hi,
Wtih the help of ABAPer you can use your own report with your requirement.
Regards,
MBKM -
Generic function displaying alv grid for undefined structure
Hi experts,
I'm doing my first steps on abap development (Totally noob).
I'm writing some little reports based on simple selections (1 or 2 tables).
In every report, I've defined a structure (internal table) that i'm displaying with an ALV Grid.
In every report, I need to create a catalog for my structure in order to make the alv grid working.
What I would like to do is :
Create a function that receives a undefined structure (for all my reports) as a parameter.
This function sould create the catalog for the coresponding structure and call the alv grid function to display the data's contained in this structure.
The goal is : In every report, I would like to use this function to show the selected data's without taking care of catalogs, alv grid, etc...
Is it possible ?
I really don't see how I can do that... Does anybody already tried something like that ?
Thank you for your help
Regards
QuentinHi,
In this method Pass the structure name-
CALL METHOD gh_grid->set_table_for_first_display
EXPORTING
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME = "<- here pass the structure
IS_VARIANT =
I_SAVE =
I_DEFAULT = 'X'
IS_LAYOUT = "<-Layout variable if using layout
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING =
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
CHANGING
it_outtab = gt_line[]
it_fieldcatalog = gt_fieldcat
IT_SORT =
IT_FILTER =
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4 -
Like SM30 ,table should be display in editable ALV Grid(for Dynamic DB )
Hi Friends,
plese help me how to display ALV grid in editable mode for differnt types of data base tables.
same as like SM30 transaction.
Moderator message: please search for available information/documentation/previous discussions before asking.
Edited by: Thomas Zloch on Nov 11, 2010 6:40 PMHi,
In SLIS_T_FIELDCAT_ALV you specify the field as edit = X.
Give it as mentioned, where you assign fieldname and positions etc.
Thanks&Regards -
Filter Not working in ALV grid
Hi All,
The filter button in ALV Grid is not working for some fields. if the filter button is selected for a particular field in the ALV grid then no entries are getting displayed in the ALV. For few fields it is working. for few fields is it not displaying any entries after selecting filter.
Please let me know what may be the possible causes for this issue.
Thanks in Advance!
Thanks & Regards,
Preethi GHi,
Ex: your output is something like this
A B C
1 2 3
4 2 5
5 3 6
When you filter B for value 2, then internally it creates one more internal table like this
A B C
1 002 3
4 002 5
5 003 6
it tries to matches value 2 to 002 and it fails to retrive the record.
The solution is try to do the conversion exit on the column/field you are trying to filter it. It will work.
Regards,
Ramesh. -
Hi,
how and what kind of ALV i must use to build own ALV-List (columns with content i create).
For understanding:
to test it, i will counting something and show that in a new column (counter). But i dont find any way to do that. In one thread i read "cl_salv_table", in the next "cl_gui_alv_grid", then "fieldcatalog" and so on... i'm confused at the moment.
the only answer i need is:
1. what are the correct way... cl_gui_alv_grid, cl_salv_table, ... i will find a way to create a list like my own conceivabilities. not a classic one.. a new one.
Thats my code, but i dont know how i can create any new column (with a name i give and content i create [anywhere in code - till now not in snipped])
*&---------------------------------------------------------------------*
*& Report ZMW_TESTOBJECTS2
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT zmw_testobjects2.
*&---------------------------------------------------------------------*
*& Global Declarations
*&---------------------------------------------------------------------*
TABLES: tabelle1,
tabelle2,
tabelle3.
* SELECTION-SCREEN *
SELECTION-SCREEN BEGIN OF BLOCK choices WITH FRAME.
PARAMETERS:
l_field1 TYPE tabelle1-field1 OBLIGATORY,
l_field2 TYPE tabelle2-field2 OBLIGATORY,
l_field3 TYPE tabelle2-field3,
l_field4 TYPE tabelle1-field4.
SELECTION-SCREEN END OF BLOCK choices.
*&---------------------------------------------------------------------*
*& Class Test Definition
*&---------------------------------------------------------------------*
CLASS test_class DEFINITION.
PUBLIC SECTION.
CLASS-METHODS: read_data,
fill_list.
PRIVATE SECTION.
TYPES: BEGIN OF struc_out_table1,
field3 LIKE tabelle2-field3,
field2 LIKE tabelle2-field2,
field4 LIKE tabelle1-field4,
field1 LIKE tabelle1-field1,
field5 LIKE tabelle3-field5,
END OF struc_out_table1.
CLASS-DATA: it_out_table1 TYPE TABLE OF struc_out_table1,
ctl_salv_list TYPE REF TO cl_salv_table,
ctl_salv_exc TYPE REF TO cx_salv_msg.
ENDCLASS. "test_class DEFINITION
*&---------------------------------------------------------------------*
*& Class Test Implementation
*&---------------------------------------------------------------------*
CLASS test_class IMPLEMENTATION.
*&---------------------------------------------------------------------*
*& Method read_data
*&---------------------------------------------------------------------*
METHOD read_data.
SELECT tabelle2~field2 tabelle2~field3 tabelle1~field1
FROM tabelle2
INNER JOIN tabelle1
ON tabelle2~field3 = tabelle1~field3
INTO CORRESPONDING FIELDS OF TABLE it_out_table1
WHERE tabelle1~field1 = l_field1
AND tabelle2~field2 = l_field2
ORDER BY tabelle2~field3.
CALL METHOD fill_list.
ENDMETHOD. "read_data
*&---------------------------------------------------------------------*
*& Method fill_list
*&---------------------------------------------------------------------*
METHOD fill_list.
TRY.
cl_salv_table=>factory(
EXPORTING
list_display = 'X'
IMPORTING
r_salv_table = ctl_salv_list
CHANGING
t_table = it_out_table1
ctl_salv_list->display( ).
CATCH cx_salv_msg INTO ctl_salv_exc.
MESSAGE ctl_salv_exc TYPE 'I'
DISPLAY LIKE 'E'.
ENDTRY.
ENDMETHOD.
ENDCLASS. "test_class IMPLEMENTATION
START-OF-SELECTION.
test_class=>read_data( ).Hi Marc,
You may use any of the above ALVs. Either should suit your requirements.
If I understand you correctly, you want to add an extra column in the displayed ALV grid/table. The values to be displayed in this additional column are not present in the Tables, but you want to calculate the values at runtime.
As you know already, the ALV needs a field-catalog [FC] and a table storing the data [IT].
Please do the following.
1. Create a local structure (LS) having the relevant database tables and your new columns. You can't use a DB structure if all the columns you want to show are not present in the DB structure.
2. Create a internal table with line type LS. This table (IT) has to be passed to the ALV.
3. Manually fill the columns in the IT as you need it.
If you are using FM 'REUSE_ALV_FIELDCATALOG_MERGE' to build your field-catalog, your problem is solved here. Instead of the DB structure, you have to pass your own structure to this FM.
However, if you are using manual creation of the FC, you'll need to append additional rows to the FC manually.
Cheers!
Abhinava -
Not reflecting the sales offices for top down manual planning hierarchy
Hi Experts,
Please help me on this issue.
I hava an Hierarchy like from District to Offices
for eg: for district- 'ZBHDEL' I have salesoffice like 100, 101, 102, 103,105.
like wise for other district 'zbhyd' i have salesoffices like 200, 201, 202.
I have created the Mannual layout with Hierachy datamodel with BPS characteristics, TOP-DOWN, AND enabled check entry.
In the additional setting i have select All Possible combinations.
District at Headerlevl, along with Product and Division
and selected salesoffice at Leadcoloumn.
My Planning levell and package contains : for sales office slected Hierarchy at planning level.
BRAND
Base Unit
Company code
Country
Currency
Division
Fiscal year/period
Fiscal Year Variant
PRODUCT
SIZE
Sales District
Sales Office
Segment
Version
*The Prolem is when i input some plan for a district ZBHDEL from the other layout, WHEN I RUN THE sALES OFFICE hIERARCHY
Mannual Layout its not reflecting the sales office where i have to plan for the salesoffices by seeing the values
of planned District.
where as for one district i can able to see the sales offices. even i have maintained the masterdata at Infoobject level.
Can anybody please help me out.
thanks
Deenu
Edited by: deenu prasad on Aug 4, 2010 7:07 AMCreate hierarchy for sales district info-object in following way.
Sales District Text Node Level 1
Sales Distirct Characteristics Node Level 2
value 1 = ZBHDEL
value 2 = ZBHYD
sales Office Characteristics Node Level 3
values will be according to district (include diff sales offices for diff districts in level 2)
restrict district to this hierarchy in planning level and plan according by both approaches (create 2 seperate layouts):
Top down - to plan at main node i.e. sales district
bottom up - to plan at sub node i.e. sales office -
Subtotal in ALV grid for a particular type and Grand total in ALV
Hi,
I need to have sub total for a particular type(eg: goods, services).. and grand total at end in ALV grid..
ALV output required as below:
Type VAT registration number Country Total Gross Amounts Total Tax Amounts Total Amount, ex-tax
Goods ATU12345678 AT 222.42 0 222.42
Goods NL123456789B02 NL 3,417.00 0 3,417.00
Goods Total 3,639.42 - 3,639.42
Services ATU12345678 AT 2,342.34 0 2,342.34
Services NL123456789B02 NL 223.33 0 223.33
Services Total 2,565.67 - 2,565.67
Grand Total 6,205.09 - 6,205.09
Let me as to how to achieve the above type in ALV grid...
Regards
Shivacheck this link..
Grand Totals in ALV grid disply function module
or do like this..
REPORT ZALVTESTFORSUBTOTAL.
tables:pa0008.
type-pools:slis.
types:begin of ty_pa0008,
pernr like pa0008-pernr,
begda like pa0008-begda,
endda like pa0008-endda,
ansal like pa0008-ansal,
lga01 like pa0008-lga01,
bet01 like pa0008-bet01,
end of ty_pa0008.
data:it_pa0008 type standard table of ty_pa0008 with header line.
data:it_fieldcat type SLIS_T_FIELDCAT_ALV,
wa_fieldcat type slis_fieldcat_alv,
it_layout type slis_layout_alv,
WA_events TYPE slis_alv_event,
it_events TYPE slis_t_event.
select-options:s_pernr for pa0008-pernr.
start-of-selection.
perform getD_data.
perform disp_alv.
*& Form getD_data
text
--> p1 text
<-- p2 text
form getD_data .
select pernr
begda
endda
ansal
lga01
bet01
from pa0008
into table it_pa0008
where pernr in s_pernr.
sort it_pa0008 by pernr begda descending.
endform. " getD_data
*& Form disp_alv
text
--> p1 text
<-- p2 text
form disp_alv .
wa_fieldcat-fieldname = 'PERNR'.
wa_FIELDCAT-REPTEXT_DDIC = 'Personnel no'.
*WA_FIELDCAT-no_subtotals = 'X'.
append wa_fieldcat to it_fieldcat.
clear wa_fieldcat.
wa_fieldcat-fieldname = 'BEGDA'.
wa_FIELDCAT-REPTEXT_DDIC = 'Start date'.
append wa_fieldcat to it_fieldcat.
clear wa_fieldcat.
wa_fieldcat-fieldname = 'ENDDA'.
wa_FIELDCAT-REPTEXT_DDIC = 'End date'.
append wa_fieldcat to it_fieldcat.
clear wa_fieldcat.
wa_fieldcat-fieldname = 'ANSAL'.
wa_FIELDCAT-REPTEXT_DDIC = 'Annula salary'.
wa_fieldcat-do_sum = 'X'.
append wa_fieldcat to it_fieldcat.
clear wa_fieldcat.
wa_fieldcat-fieldname = 'LGA01'.
wa_FIELDCAT-REPTEXT_DDIC = 'Wage Type'.
append wa_fieldcat to it_fieldcat.
clear wa_fieldcat.
wa_fieldcat-fieldname = 'BET01'.
wa_FIELDCAT-REPTEXT_DDIC = 'Amount for wagetype'.
append wa_fieldcat to it_fieldcat.
clear wa_fieldcat.
DATA: sort TYPE slis_sortinfo_alv,
it_sort TYPE slis_t_sortinfo_alv.
sort-fieldname = 'PERNR'.
sort-subtot = 'X'.
SORT-UP = 'X'.
APPEND sort TO it_sort.
*sort-fieldname = 'BEGDA'.
*SORT-NO_SUBTOTS = 'X'.
*APPEND sort TO it_sort.
IT_layout-totals_text = 'total text'.
IT_layout-subtotals_text = 'Subtotal text'.
*WA_EVENTS-NAME = 'SUBTOTAL TEXT'.
*WA_EVENTS-FORM = 'SUBTOTAL TEXT'.
*APPEND WA_EVENTS TO IT_EVENTS.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = sy-repid
IS_LAYOUT = it_LAYOUT
IT_FIELDCAT = IT_FIELDCAT
it_sort = it_sort
it_events = it_events
TABLES
t_outtab = it_pa0008 .
endform. " disp_alv
Maybe you are looking for
-
ITunes 11.0 - no longer gives acurate playlist times
Is anyone else having this issue? The new itunes no longer gives an exact count of my playlists. For instance, I have a playlist that was 63 minutes and 32 seconds and now it just says "1 Hour", the same thing goes for my playlist that is 55 minute
-
Configuration details for Adaptive Web Service
Hai, I an importing adaptive webservice model but it shows the error Exception on execution of web service with WSDL URL 'http://sapsrv02:50200/HelloBeanWS/HelloConfig?wsdl' with operation 'getHello' in interface 'HelloBeanWSVi_Document
-
Anyone else having trouble with pinch scrolling randomly going away?
Anyone else having trouble with "pinch scrolling" randomly going away on a macbook pro?
-
ITunes 7.3: What's new?
Hi all, I'm sure that no one will be surprised there is a new iTunes 7.3 out. Besides iPhone support, what is new with 7.3.0.54? Thanks, Steven
-
Where is TextExpander in Yosemite?
iMac OS 10.10.2 Does Yosemite not include TextExpander? I can't locate it anywhere. I know it's a helper app, but where are they? Thanks for any suggestions.