Urgent issue.......ALV grid...... Dyn pro.... ABAP
Dear all
This requirment is
A logfile has to be created where the rows per interface will be added which had to be erased from the datapackage because of forbidden values.
Logfile Data (skipped in the transfer routine) is stored in a transparent table.
This logfile data can be stored to a local flatfile at the local Work Station.
Implement this functionality at Dynpro where
1.Initially you select the interface you want to view.
2. Then the content of the transparent table for this interface is displayed in an ALV grid.
3. After that its possible to download the content into a local flatfile (Is there any standard functionality for this with ABAP?) .
4. When stored locally the content of the transparent table will be erased.
Any suggestions please......... how hanlde this issue.....
Thanks in advance
Cheers
Sailekha
Hi Sebastien,
I am new to this concept. Can you please expalin me in detail the standard functionality for export in Local work station. any example code available for this functionality.
Thanks in advance
Cheers
Sailekha
Similar Messages
-
How to reschedule a Back ground job in Normal ABAP from Web Dyn Pro abap application??
Hi Experts,
How to reschedule a Back ground job in Normal ABAP from Web Dyn Pro abap application??Can you give us some more information? Background jobs primarily don't have anything to do with Webdynpro.
-
Remove buttons in ALV grid display in ABAP Web Dynpro
Hi,
Sub: ALV grid-->Web Dynpro ABAP.
Request guidance to prevent display of the buttons "Microsoft Excel" and "Print Version" (which provide options to export the ALV grid output into an Excel format document).
Is there a way we could hide this from being displayed on the ALV grid in a Web dynpro ABAP component output?
Thanks very much.
Best Regards,
AdiHi Adithya,
really simple solution is to call cl_salv_wd_model_table_util=>if_salv_wd_table_util_stdfuncs=>set_all( abap_false ). This deactivates all ALV functionality.
For individual setting cl_salv_wd_config_table if_salv_wd_standard_functions~set_<x>_allowed.
- Michelle -
ALV GRID Using oo abap example
Hi Friends,
I am new to oo abap, Can any one give me a basic example how i can create alv grid in oo abap.
regards,
DVNSHI,
Programming for ALV grid display using the classes involves creation of a screen and calling it for display.
Since there has to be a linking between the program and the screen we have created , this comes in the form of a container. We use two important classes during the programming for displaying ALV grid, CL_GUI_ALV_GRID and CL_GUI_CUSTOM_CONTAINER.
Steps To Use ALV Grid in a Program
1. Declare reference variables for,
Container (class CL_GUI_CUSTOM_CONTAINER) and
Grid (class CL_GUI_ALV_GRID)
Example
DATA: grid TYPE REF TO cl_gui_alv_grid,
custom_container TYPE REF TO cl_gui_custom_container
2. Create Standard Screen and a container on that screen and give a name to that container ( Use custom control button from tool bar) . This name will be used to link the container we have created on the screen with the object reference of class CL_GUI_CUSTOM_CONTAINER, which we have declared in the first step
3. Call the screen which has been created
4. Instantiate the container control and the ALV Grid Control in PBO of the screen.
Example
IF custom_container IS INITIAL.
CREATE OBJECT custom_container
EXPORTING
CONTAINER_NAME = MY_CONTAINER'.
CREATE OBJECT grid
EXPORTING
I_PARENT = custom_container.
ENDIF
5. For displaying the data, call the method set_table_for_first_display of object reference of CL_GUI_ALV_GRID.
Example
CALL METHOD grid->set_table_for_first_display
EXPORTING
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME =
IS_VARIANT =
I_SAVE =
I_DEFAULT =
IS_LAYOUT =
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING =
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
CHANGING
IT_OUTTAB =
IT_FIELDCATALOG =
IT_SORT =
IT_FILTER =
EXCEPTION
INVALID_PARAMETER_COMBINATION =
PROGRAM_ERROR =
TOO_MANY_LINES =
others =
EXPLANATION OF SOME IMPORTANT PARAMETERS.
I_BYPASSING_BUFFER & I_BUFFER_ACTIVE :
When the program is run for the first time, the fields present in the output table and their positions are stored in a buffer. So the buffer is taken as reference for the successive executions. In order to bypass this buffer the above parameter values should be X and (space) respectively. If these values are not passed to the function module, the changes made in the structure of the internal table will not be reflected in the output.
I_STRUCTURE_NAME:
If the structure of your output table corresponds to a structure stored in the Data Dictionary (DDIC), the ALV Grid Control can use this information to generate the field catalog automatically. Pass the table structure as parameter. In this case, all fields of this DDIC structure are displayed in the list.
IS_VARIANT :
It allows the user to save and reuse the layout. It is a structure of type DISVARIANT and contain the display variant name. It facilitates pre-assignment for a layout, rather than displaying report and then choosing displaying variant.
I_SAVE:
This single character variable specifies whether the user specific display variants can be saved or not.
The I_SAVE "Options for saving layouts" parameter can have the following values:
U Only user specific layouts can be saved
X Only global layouts can be saved
A Both user specific and global layouts can be saved
Space Layouts can not be saved
IS_LAYOUT:
This structure of type LVC_S_LAYO
is used to control the layout of the ALV. Two important fields are:
GRID TITLE. : Title of grid
ZEBRA : Alternate lines in list are displayed in different colors.
IT_FIELDCATALOG:
This internal table of type LVC_T_FCAT
is used to specify the position of various fields in the report itab.
There are three ways we can fill the field catalog table
1. Automatically through data dictionary structure (DDIC). In this case we pass the table structure to I_STRUCTURE_NAME.
2. Manually in ABAP program. Filling the internal table of type LVC_T_FCAT
1. . With each row corresponding to each column of output table. Each row of this table will hold value like
i). TABNAME & FIELDNAME specifies the reference fields for F1 help
ii). CTABNAME & CFIELDNAME specifies the reference fields for currency formatting
iii). QTABNAME & QFIELDNAME specifies the reference fields for quantity formatting
iv). SELTEXT_L holds the long description of the field
v). SELTEXT_M holds the medium description of the field
vi). SELTEXT_S holds the small description of the field
vii). KEY specifies the Key field ( cannot be hidden )
viii). OUTPUTLEN species the output length of the field
ix). DO_SUM specifies that subtotal is required on this field
x). NO_OUT specifies a hidden field
3. Semi-Automatically by combining the above 2 procedures.
Call function Module REUSE_ALV_FIELDCATALOG_MERGE and pass DDIC
structure or the output table to generate the field catalog.
Add additional Rows or modify existing properties of the fields to be displayed.
METHODS OF IMPLEMENTING SOME EXTRA FEATURES
Set focus to the grid
After CALL METHODgrid->set_table_for_first_display insert the following stament:
CALL METHOD cl_gui_control=>set_focus EXPORTING control = grid
Refresh grid display
Use the grid method REFRESH_TABLE_DISPLAY
Example:
CALL METHOD grid->refresh_table_display.
Set the title of the grid
Fill the grid_title field of structure lvc_s_layo.
DATA:
gs_layout TYPE lvc_s_layo.
gs_layout-grid_title = 'TITLE'.
CALL METHOD go_grid->set_table_for_first_display
EXPORTING i_structure_name = 'structure name'
is_layout = gs_layout
CHANGING it_outtab = Output table.
The structure lvc_s_layo contains fields for setting graphical properties, displaying exceptions, calculating totals and enabling specific interaction options
Event Handling
We can handle the events triggered by
1. User defined Text Output
2. Mouse-controlled Actions
3. Self-defined and Standard Functions
Steps for Event Handling
1. Define a (local) class for event handling
2. Define a method for each event you need to handle
3. Implement your event handler methods.
4. Create Object of the above class
5. Link used events and event handler methods of the receiver object and the grid
object.
Example program : Handling Double Click Event
Step1.Define a class.
class lcl_my_event_receiver definition.
public section.
methods:
handle_double_click
for event double_click of cl_gui_alv_grid.
endclass.
Step 2. Implement the class
class lcl_my_event_receiver implementation.
method handle_double_click.
message i001(zz) with ' double click event - Triggerd '.
endmethod.
endclass.
Step 3. Declare and create Object for the local class defined and implemented in steps 1 and 2 respectively
o_receiver TYPE REF TO lcl_my_event_receiver (Declaration)
create object o_receiver. (Instantiation)
Step 4. Link the method for handling the event with the grid object in the PBO of screen after instantiating the grid object
set handler o_receiver->handle_double_click for grid.
EXAMPLE PROGRAM TO CHANGE A CLASSICAL REPORT OUTPUT TO A ALV GRID
This can be used as a template program to convert a classical report layout to a ALV grid.
Report<Report name>
Grid data Declarations----------------------------------------------*
INCLUDE ZVINALVD.
Internal table for ALV grid
TYPES: BEGIN OF T_ALV,
Field1 like table-field1,
Field2 like table-field2,
END OF T_ALV.
DATA: I_ALV TYPE TABLE OF T_ALV.
DATA: WA_ALV TYPE T_ALV.
-Class declarations----
INCLUDE ZVINALVE.
Add a checkbox in selection screen for ALV grid display. If it is unchecked
output will be of classical type.
SELECTION-SCREEN BEGIN OF BLOCK box01.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN: COMMENT 4(30) To display repot output as a ALV grid.
PARAMETERS: p_alv AS CHECKBOX.
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN END OF BLOCK box01.
START-OF-SELECTION.
Fill the ALV grid internal table
END-OF-SELECTION.
IF P_ALV = X.
PERFORM ALV_DISPLAY.
ELSE.
PERFORM CLASSICAL_DISPLAY.
ENDIF.
Alv Display
FORM ALV_DISPLAY.
CALL SCREEN 100.
ENDFORM.
Module STATUS_0100 OUTPUT
PBO for ALV Grid
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'GRID_DISPLAY'.
DATA:
For parameter IS_VARIANT that is used to set up options for storing
the grid layout as a variant in method set_table_for_first_display
l_layout TYPE disvariant.
GS_LAYOUT-SEL_MODE = 'B'.
Optimize column width
GS_LAYOUT-CWIDTH_OPT = 'X'.
Read data and create objects
IF go_custom_container IS INITIAL.
Create objects for container and ALV grid
CREATE OBJECT go_custom_container
EXPORTING container_name = 'ALV_CONTAINER'.
CREATE OBJECT go_grid
EXPORTING i_parent = go_custom_container.
Create object for event_receiver class
and set handlers
CREATE OBJECT o_event_receiver.
SET HANDLER o_event_receiver->handle_user_command FOR go_grid.
SET HANDLER o_event_receiver->handle_toolbar FOR go_grid.
Layout (Variant) for ALV grid
l_layout-report = sy-repid. "Layout to report
To built fieldcatalog
PERFORM alv_build_fieldcatalog.
Grid setup for first display
CALL METHOD go_grid->set_table_for_first_display
EXPORTING
is_variant = l_layout
i_save = 'A'
is_layout = gs_layout
CHANGING it_outtab = I_ALV
it_fieldcatalog = fieldcat.
Raise event toolbar to show the modified toolbar
CALL METHOD go_grid->set_toolbar_interactive.
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
Form ALV_BUILD_FIELDCATALOG.
Store contents of selected line in a internal table
FORM alv_build_fieldcatalog.
CLEAR afield.
afield-fieldname = 'FIELD1'.
afield-tabname = 'I_ALV'.
afield-coltext = Field Name 1.
afield-lzero = ' '.
afield-key = 'X'.
afield-outputlen = XX.
APPEND afield TO fieldcat.
CLEAR afield.
afield-fieldname = 'FIELD2'.
afield-tabname = 'I_ALV'.
afield-coltext = Field Name 2.
APPEND afield TO fieldcat.
ENDFORM. " alv_build_fieldcatalog
Module USER_COMMAND_0100 INPUT
PAI for ALV Grid
MODULE USER_COMMAND_0100 INPUT.
CASE OK_100.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
Form SELECT_LINE
Store contents of selected line in a internal table
FORM SELECT_LINE.
DATA:l_lines TYPE i.
REFRESH gi_index_rows.
CLEAR g_selected_row.
Read index of selected rows
CALL METHOD go_grid->get_selected_rows
IMPORTING et_index_rows = gi_index_rows.
Check if any row are selected at all. If not
table gi_index_rows will be empty
DESCRIBE TABLE gi_index_rows LINES l_lines.
IF l_lines = 0.
CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
EXPORTING
textline1 = 'You must choose a line'.
EXIT.
ENDIF.
Read indexes of selected rows.
LOOP AT gi_index_rows INTO g_selected_row.
IF sy-tabix = 1.
READ TABLE I_ALV INDEX g_selected_row-index INTO
WA_ALV.
ENDIF.
ENDLOOP.
ENDFORM. " SELECT_LINE
Includes:
1. ZVINALVD for data declarations
INCLUDE ZVINALVD .
Type pool for icons - used in the toolbar
TYPE-POOLS: icon.
To allow the declaration of o_event_receiver before the
lcl_event_receiver class is defined, decale it as deferred in the
start of the program
CLASS lcl_event_receiver DEFINITION DEFERRED.
GLOBAL DATA FOR ALV GRID
DATA:
OK code for alv grid screen
OK_100(4) TYPE C,
ALV control: Layout structure
gs_layout TYPE lvc_s_layo,
Declare reference variables to the ALV grid and the container
go_grid TYPE REF TO cl_gui_alv_grid,
go_custom_container TYPE REF TO cl_gui_custom_container,
o_event_receiver TYPE REF TO lcl_event_receiver,
Data for storing information about selected rows in the grid
Internal table
gi_index_rows TYPE lvc_t_row,
Information about 1 row
g_selected_row LIKE lvc_s_row.
fieldcatalog
DATA: fieldcat TYPE LVC_T_FCAT,
afield TYPE LVC_S_FCAT.
2. ZVINALVE for Class/object declarations
INCLUDE ZVINALVE.
C L A S S E S
CLASS lcl_event_receiver DEFINITION.
PUBLIC SECTION.
METHODS:
handle_toolbar FOR EVENT toolbar OF cl_gui_alv_grid
IMPORTING e_object e_interactive,
handle_user_command FOR EVENT user_command OF cl_gui_alv_grid
IMPORTING e_ucomm.
ENDCLASS.
CLASS lcl_event_receiver IMPLEMENTATION
CLASS lcl_event_receiver IMPLEMENTATION.
METHOD handle_toolbar.
Event handler method for event toolbar.
CONSTANTS:
Constants for button type
c_button_normal TYPE i VALUE 0,
c_menu_and_default_button TYPE i VALUE 1,
c_menu TYPE i VALUE 2,
c_separator TYPE i VALUE 3,
c_radio_button TYPE i VALUE 4,
c_checkbox TYPE i VALUE 5,
c_menu_entry TYPE i VALUE 6.
DATA: ls_toolbar TYPE stb_button.
Append seperator to the normal toolbar
CLEAR ls_toolbar.
MOVE c_separator TO ls_toolbar-butn_type..
APPEND ls_toolbar TO e_object->mt_toolbar.
Append a new button that to the toolbar. Use E_OBJECT of
event toolbar. E_OBJECT is of type CL_ALV_EVENT_TOOLBAR_SET.
This class has one attribute MT_TOOLBAR which is of table type
TTB_BUTTON. The structure is STB_BUTTON
CLEAR ls_toolbar.
MOVE 'DISPLAY' TO ls_toolbar-function.
MOVE icon_DISPLAY TO ls_toolbar-icon.
MOVE 'Displaying customer' TO ls_toolbar-quickinfo.
MOVE 'Display' TO ls_toolbar-text.
MOVE ' ' TO ls_toolbar-disabled.
APPEND ls_toolbar TO e_object->mt_toolbar.
ENDMETHOD.
METHOD handle_user_command.
Handle own functions defined in the toolbar
CASE e_ucomm.
WHEN 'DISPLAY'.
PERFORM SELECT_LINE.
ENDCASE.
ENDMETHOD.
Reward if useful -
F4 help for field in ALV grid control (using ABAP objects)
Hi All,
I have created a z table ZTAB which is a master table( with single column X). field X should be a input field in ALV Grid through F4 key. I have created searchelp and assigned it to data element of X feild, and in domain level I have assigned ZTAB as value table.
And in ALV field catalog wrote ls_fcat-ref_tab = 'ZTAB'. But still I'm not getting list of values when I press F4.
Can anyone help me to understand what is missing here? How to call standardard F4 help?
This is very urgent..
Regards
Jaker.u can refer to this standard program :BCALV_EDIT_08
also u wont get the list of values automatically..
declare a class :
CLASS LCL_EVENT_HANDLER DEFINITION.
PUBLIC SECTION.
METHODS :
handle_on_f4 for event onf4 of cl_gui_alv_grid
importing e_fieldname es_row_no er_event_data,
ENDCLASS. "LCL_EVENT_HANDLER
implementation of class
here u pass ur internal table what u want to display as pop up for f4 help.
*& Class (Implementation) LCL_EVENT_HANDLER
Text
CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
*Method to handle F4 click.
Method handle_on_f4.
Function to create a popup and passing the values of internal table in it.
CALL FUNCTION 'POPUP_WITH_TABLE'
EXPORTING
ENDPOS_COL = 60
ENDPOS_ROW = 60
STARTPOS_COL = 5
STARTPOS_ROW = 5
TITLETEXT = 'pop up'
IMPORTING
CHOICE = wa_grid-zfield
TABLES
VALUETAB = ITAB
EXCEPTIONS
BREAK_OFF = 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.
RETURN.
ENDIF.
endmethod. "handle_on_f4
ENDCLASS. "LCL_EVENT_HANDLER
hope this gives u some idea. -
Hello friends,
I want the ALV Grid to be displayed with a default layout. I am able to get the saved layout on the selection screen but when I select that layout still the output layout is not taking it.
Please refer the code which I have written.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_layout.
PERFORM variant_search CHANGING p_layout.
FORM variant_search CHANGING p_layout TYPE slis_vari.
DATA : lv_exit TYPE c,
ls_variant TYPE disvariant.
ls_variant-report = syst-repid.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = ls_variant
i_save = 'A'
IMPORTING
e_exit = lv_exit
es_variant = ls_variant
EXCEPTIONS
not_found = 1
program_error = 2
OTHERS = 3.
IF sy-subrc EQ 0 AND lv_exit IS INITIAL.
p_layout = ls_variant-variant.
ENDIF.
ENDFORM. " variant_search
*-------The above piece of code helps me to save a layout.
Now when I enter the saved layout in my parameter, I want the output to take this layout and display the grid, but I dont know why it is not taking this layout. Please refer the code which I have written.
lr_layout = gr_alv->get_layout( ).
key-report = sy-repid.
lr_layout->set_key( key ).
lr_layout->set_save_restriction( cl_salv_layout=>restrict_none ).
Please let me know how can I achieve this.
Regards,
SalilSalil,
Here is some code that uses a default variant.
*& SELECTION-SCREEN
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_werks FOR marc-werks,
s_matnr FOR mara-matnr,
s_uname FOR sy-uname,
s_datum FOR sy-datum,
s_uzeit FOR sy-uzeit,
s_mtart FOR mara-mtart,
s_matkl FOR mara-matkl.
PARAMETERS: p_toler(3) TYPE n.
SELECTION-SCREEN: END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK v1 WITH FRAME.
PARAMETERS: p_vari LIKE disvariant-variant.
SELECTION-SCREEN END OF BLOCK v1.
*& Event INITIALIZATION
INITIALIZATION.
PERFORM set_defaults.
PERFORM default_variant CHANGING p_vari.
Event AT SELECTION-SCREEN ON VALUE-REQUEST
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
PERFORM f4_for_variant CHANGING p_vari.
*& Form default_variant
text
<--PL_VARI variant
FORM default_variant CHANGING pl_vari.
g_repid = sy-repid.
set options: save variants userspecific or general
g_save = 'A'. " 'A' = standard and user-specific saving
initialize variant
CLEAR gs_variant.
gs_variant-report = g_repid.
get default variant
gs_xvariant = gs_variant.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = g_save
CHANGING
cs_variant = gs_xvariant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 0.
pl_vari = gs_xvariant-variant.
ENDIF.
ENDFORM. " default_variant
*& Form f4_for_variant
text
<--PL_VARI variant
FORM f4_for_variant CHANGING pl_vari.
display variant selection dialog box
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = gs_variant
i_save = g_save
it_default_fieldcat =
IMPORTING
e_exit = g_exit
es_variant = gs_xvariant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 2.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
IF g_exit = space.
pl_vari = gs_xvariant-variant.
ENDIF.
ENDIF.
ENDFORM. " f4_for_variant
MODULE status_0100 OUTPUT
MODULE status_0100 OUTPUT.
SET PF-STATUS '100'.
SET TITLEBAR '100'.
IF o_container IS INITIAL.
REFRESH: t_fieldcat,
t_sortcat,
t_groupcat,
gt_exclude.
CREATE OBJECT o_container
EXPORTING container_name = 'CONTAINER'.
Create TOP-Document
CREATE OBJECT o_dyndoc_id
EXPORTING style = 'ALV_GRID'.
Create Splitter for custom_container
CREATE OBJECT o_splitter
EXPORTING parent = o_container
rows = 2
columns = 1.
CALL METHOD o_splitter->get_container
EXPORTING
row = 1
column = 1
RECEIVING
container = o_parent_top.
CALL METHOD o_splitter->get_container
EXPORTING
row = 2
column = 1
RECEIVING
container = o_parent_grid.
Set height for g_parent_html
CALL METHOD o_splitter->set_row_height
EXPORTING
id = 1
height = 12.
CREATE OBJECT o_grid
EXPORTING i_parent = o_parent_grid.
gs_layout-smalltitle = 'X'.
gs_layout-no_rowmark = ' '.
gs_layout-cwidth_opt = 'X'.
gs_layout-zebra = 'X'.
gs_layout-sel_mode = 'D'.
gs_variant-report = sy-cprog.
gs_variant-variant = p_vari.
gs_exclude = cl_gui_alv_grid=>mc_fc_info.
APPEND gs_exclude TO gt_exclude.
gs_exclude = cl_gui_alv_grid=>mc_fc_graph.
APPEND gs_exclude TO gt_exclude.
CALL METHOD o_grid->set_3d_border
EXPORTING
border = 1.
SET HANDLER lcl_event_handler=>hotspot_click FOR o_grid.
SET HANDLER lcl_event_handler=>top_of_page FOR o_grid.
SET HANDLER lcl_event_handler=>print_top_of_page FOR o_grid.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'Z1271'
CHANGING
ct_fieldcat = t_fieldcat.
LOOP AT t_fieldcat INTO h_fieldcat.
CASE h_fieldcat-fieldname.
WHEN 'MATNR'.
h_fieldcat-hotspot = 'X'.
WHEN 'VBELN'.
h_fieldcat-hotspot = 'X'.
WHEN 'UNAME'.
h_fieldcat-coltext = 'Maint. By'.
h_fieldcat-tooltip = 'Material maintained by'.
WHEN 'DATUM'.
h_fieldcat-coltext = 'Maint. Date'.
h_fieldcat-tooltip = 'Material maintenance date'.
WHEN 'UZEIT'.
h_fieldcat-coltext = 'Maint. Time'.
h_fieldcat-tooltip = 'Material maintenance time'.
WHEN 'EDAYS'.
h_fieldcat-coltext = 'EDays'.
h_fieldcat-tooltip = 'Elapsed days'.
WHEN 'ETIME'.
h_fieldcat-coltext = 'ETime'.
h_fieldcat-tooltip = 'Elapsed time same day'.
WHEN 'EDATU'.
h_fieldcat-coltext = 'Delivery Date'.
h_fieldcat-tooltip = 'Delivery date'.
ENDCASE.
MODIFY t_fieldcat FROM h_fieldcat.
CLEAR h_fieldcat.
ENDLOOP.
CALL METHOD o_grid->set_table_for_first_display
EXPORTING
is_layout = gs_layout
i_save = 'A'
is_variant = gs_variant
it_toolbar_excluding = gt_exclude
CHANGING
it_fieldcatalog = t_fieldcat
it_sort = t_sortcat
it_outtab = t_rpt.
CALL METHOD o_grid->list_processing_events
EXPORTING
i_event_name = 'TOP_OF_PAGE'
i_dyndoc_id = o_dyndoc_id.
ENDIF.
ENDMODULE. "status_0100 OUTPUT -
Hi,
When taking the printout of an ALV Grid where different colors are used for displaying dates or currencies, a / is coming on top of those columns.
Could some one help me in removing the /'s and keep the colors as it is.
Best Regards,
Kumarhi paul,
thanks for the link, but unfortunately, this site is blocked here. If you want to have a look at the code that i wrote, you can check the standard program for transaction MB51. In the main program pls search for the subroutine build_runtimetable. Double click on that form and u will see where the field catalog is getting filled up.
There please check for the field MSEG ERFMG and the value at last column +, which is at column 30. the table rtt is used to fill field catalog.
Please check it and help me.
Best Regards,
Kumar -
I created an alv grid in my web dynpro...
Everything worked fine ! Then I needed to add a column to the alv grid...
SO
1 - Chnaged the structure un SE11
2 - Update component controller context so that the field is displayed
3 - Update all bindings
4 - Update biding between DATA and ALV Table
But the column is not displayed by default in the alv grid ! But if I go to settings, the colomn is available...
What should i do to display this column by default ???
Regards,
SteKamYatah !
I manage to show the columns by default !
We discovered it was stored in the user settings...
Then the question is ... "How do I disable user settings on ALV Grid"
Thanks in advance!
Stekam -
How should i start with web dyn pro abap
Hi,
I have been working on webdynpro java now i would like to start working on webdynpro abap
could any one tel me how should i start with it.. pdfs, blogs would surely help??
i do have sufficient knowledge of abap too..
some brief idea about what is "web dynpro for abap" would surely help me
Thank u in advance...hi,
please do a search before posting for basic questions, i searched the same and got around 700 hit.
any ways check these links.
As the name suggests Web Dynpro for ABAP uses exactly the same meta model as its cousin Web Dynpro for Java. A Web Dynpro component, a Web Dynpro view, a Web Dynpro model, a Web Dynpro controller have the same semantics both for ABAP and Java. The main difference is the designtime environment, the development infrastructure and the runtime environment.
The designtime environment is properly embedded in the ABAP Workbench where Web Dynpro artifacts are simply a new category like BSP applications or classical dynpro based applications before. Also no surprises regarding the development infrastructure. The correction and transport system keeps track on all changes that are done, versions them and helps to propagate the Web Dynpro application from development to production like you would do with ordinary BSP or dynpro-based applications.
Last not least the execution platform is the ABAP server that produces application content ready to be integrated in the NetWeaver Portal seamlessly. Features like portal eventing can be used between applications written in ABAP or applications developed with Java.
The following r excellent websites containing PDF & PPT docs on ABAP Web Dynpro:
Web Dynpro for ABAP in SDN
https://www.sdn.sap.com/irj/sdn/developerareas/webdynpro?rid=/webcontent/uuid/512040e1-0901-0010-769c-c238c6ca35d9
Developing ABAP Applications Using Web Dynpro
http://help.sap.com/saphelp_nw2004s/helpdata/en/42/d41b25d2216babe10000000a1553f6/frameset.htm
Web Dynpro ABAP: Development in Detail
http://help.sap.com/saphelp_nw2004s/helpdata/en/03/0048413e466e24e10000000a155106/frameset.htm
WDA Sample programs & tutorials
https://www.sdn.sap.com/irj/sdn/developerareas/webdynpro?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d
Web Dynpro ABAP Demonstration Videos
Web Dynpro ABAP Demonstration Videos
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/28113de9-0601-0010-71a3-c87806865f26?rid=/webcontent/uuid/fed073e5-0901-0010-4eb4-c9882aac7b11
SAP Web Dynpro Overview
http://wendtstud1.hpi.uni-potsdam.de/sysmod-seminar/SS2005/presentations/12-WebDynpro-Overview.ppt
Web Dynpro General Concepts
https://admin.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/30ea953b-8e57-2910-4e85-f7be60b00407
Web Dynpro
http://help.sap.com/saphelp_nw2004s/helpdata/en/15/0d4f21c17c8044af4868130e9fea07/frameset.htm
Web Dynpro for ABAP: Tutorials for Beginners
Web Dynpro for ABAP: Tutorials for Beginners
Developing ABAP applications using Web Dynpro Configuration Scenario
http://www50.sap.com/businessmaps/8729920B31E343F099B71340B15F06DB.htm
Web Dynpro for ABAP
http://www.vnsg.nl/temp/508773747/A1-WDA_Themadag.pdf
Yogesh N -
WDA with GP - Web dyn pro Abap intergration with Guided procedure
Hi All,
I tried integrating a WDA - Webdynpro ABAP application in Guided procedure. Though I was able to create a CO - Callable object out of the WDA , I am not able to access the WDA input and output parameters, I just want to know, where am I going wrong?
Does anybody have any leads? Thanks in advance.hii prab
if u want integrate Webdynpro ABAP applications ....
by using Webdynpro IVIEW Template....we can do it..
u should create Technical system under SLD and configure SSO
& u should create sytem object and system alias..
this is the procedure for integrate the Webdynpro ABAP applications
with regards,
venu -
ALV GRID WEB DYNPRO ABAP CREATE FUNCTION BUTTON ON A NEW LINE?
Dear all,
I'd like to create 2 pushbuttons on a second line of the alvgrid toolbar
Is there any way to do that ?
RegardsHai Anubhav,
Read the node which is binded to the alv and use the following syntax:
CALL METHOD node_first_page_output->get_lead_selection_index
receiving
index = index
where index is type i. and will return u the lead selection.
Regards,
Madhu -
Kindly help to develop alv grid display
Hi ,
I have a requirement in which I need to display ALV GRID display and in its tool bar 4 butons are required. In the same view down to alv display i want to develop a tabstrip and its functionalities.I have designed classic alv using SALV_WD_TABLE component. I want a good GRID Display, not like flat field names that comes in list display, looking for bulged fields(like what comes for ALV GRID in normal abap) display with print version etc hidden and buttons at the top of ALV. Kindly help
Highly rewarded
Kindly help
Regards,
Lakshmi
Edited by: Lakshmi Menon on Nov 27, 2008 4:49 PMWell Web Dynpro is generally output in HTML so the output formatting is never going to quite look like a desktop application (which is the case with the ALV Grid). You have very little control over the look of the column headers. In fact you can only manipulate what is available via the Portal Theme.
There is a new Tradeshow Plus theme available in NetWeaver 7.01 which uses a gradiant background for the column headers. This gives them a little more depth:
http://www.flickr.com/photos/tjung/3068850120/
The other option is next year when NetWeaver Business Client version 3.0 comes out, you will be able to render Web Dynpro applications using the NWBC Smart Client Rendering. This will render Web Dynpro applications using desktop libraries instead of HTML/Browser. This gives Web Dynpro a more SAPGUI/Desktop appears of course.
http://www.flickr.com/photos/tjung/2685619882/in/set-72157606418550143/ -
Sizeable alv grid using set_table_for_first_display
I would like to be able to resize the alv grid.
The abap program is executing in a MS-Windows environment
MS-window, with SAP session, can be re-sized yet alv grid stays same size
I would like to be able to re-size (make bigger or smaller) once the MS-window has been maximized
Using
CALL METHOD grid->set_table_for_first_display
EXPORTING
is_variant = w_hr_data_grid_layout_variants
i_save = w_hr_data_save_layout_option
is_layout = gs_layout
CHANGING
it_fieldcatalog = gt_fieldcat[]
it_outtab = t_reported_pos_std_table
it_sort = it_sort.Hi,
It may not be possible to resize the ALV grid using the methods of the CL_GUI_ALV_GRID. It would be possible through the methods of the custom container class CL_GUI_CUSTOM_CONTAINER because the grid id attached to the container. There is an event SIZE_CONTROL in the CL_GUI_CUSTOM_CONTAINER class which may be useful for you.
regards,
Sharat. -
Hi SAP Experts,
Currently I have ALV Grid table as below as example :
FIELD1
FIELD2
Account
Amount
1. Rev
1.Rev
Acct1
100.00
1. Rev
1.Rev
Acct2
50.00
Subtotal FIELD2 (1.Rev)
150.00
Subtotal FIELD1 (1.Rev)
150.00
2. Cost
2.1 Cost1
Acct3
100.00
2. Cost
2.1 Cost1
Acct4
75.00
Subtotal FIELD2 (2.1 Cost1)
175.00
2. Cost
2.2 Cost2
Acct5
25.00
Subtotal FIELD2 (2.2 Cost 2)
25.00
| Subtotal FIELD1 (2.Cost) | 200.00 |
I have 2 questions.
First, as you can see, I have 2 subtotal for 1.Rev eventhough 1.Rev actually only need one subtotal because there is no subgroup for 1.Rev. Is it possible to have only one subtotal for this 1.Rev but I still maintained 2 subtotal for 2.Cost because 2.Cost has subgroup?
My 2nd issue is I need to insert another row exactly below Subtotal FIELD1 (2.Cost) row like this:
Gross Margin
(Some formula)
This row does not come from any sub total. The problem is I can not just insert this column and put Gross Margin description in FIELD1 because I will have 3 row like below :
Gross Margin
(Formula)
Subtotal FIELD2 (blank)
(Formula) sub total
Subtotal FIELD1 (Gross Margin)
(Formula) sub total
Is there any way I can insert Gross Margin Row without creating new subtotal for it so it will only have one line in the ALV Grid table? Please help. Thank you.
Regards,
AbrahamHi Vijay.
I'm not posting this before I search everywhere and this is not the first time I post in this forum so I know what I should do before posting. If I miss something, maybe you can give me at least a hint whether it can be done or not.
This report that I am using is ALV Grid using REUSE_ALV_GRID_DISPLAY function module and not OOP using dialog module. I never said I need sample code because I only want to know is there a way to do that using ALV Grid which until now I will say that SAP ALV grid has this limitation where you can not insert row without including it in the subtotal.
So, I would be very thankful if someone can give me some clarity on this thing and Vijay, if you really don't know what is the answer, I really appreciate if you can hold your self from making that kind of reply. It does not need experienced ABAP Consultant to write such remarks. Thanks.
Regards,
Abraham -
How to get f4 help in alv grid in container-urgent
hi,
how to get f4 help in alv grid in container using abap objects
ganeshHi Ganesh,
Did you have a look at sample report BCALV_TEST_GRID_F4_HELP ?
Here is part of the header documentation:
*& Report BCALV_GRID_F4_HELP *
Purpose:
~~~~~~~~
This report illustrates the use of f4-Help in an alv grid control.
Background:
~~~~~~~~~~~
There a two possibilities to implement an f4-Help in the alv grid
control: one can either use standard f4-help or write one by Hand.
For the former there is nothing to do at all. This report shows how
to implement user-defined f4-help.
I am sure you will find within this report the solution you are looking for.
Reward points if this Helps.
Manish
Maybe you are looking for
-
Hf901-00001 won't install at all on some instances.
Hi, We have multiple servers with CF 9.0.1 installed, all with the multiple servers configuration and all with multiple instances. Yesterday I started patching to hf901-00001 (http://kb2.adobe.com/cps/890/cpsid_89094.html). It worked properly on 30
-
LV 8.20 crashes on opening non-existent window
With LV 8.20 and Mac OS X 10.4.8 Open LV, and by default it opens a blank window. (preferences IsFirstLaunch: False showNoNavDialog: True skipNavigatorDialog: True Close the blank window titled "Untitled 1 Front Panel" using the "close button" Note t
-
I gave my old i-pod nano to a friend
When I gave my old i-pod to a friend, I first deleted all content, then I loaded it with a few albums that I had burned from my CDs. He cannot connect it to his computer because it has my name/passwords, etc. How do we remove my registration and set
-
Setting contentType...
A very simple question: how do you set the content type so I can use html formatting? I saw somewhere it's like this msg.setcontent("text/html"); but that doesnt seem to work...
-
HT1937 i need to find out which carrier my 3GS hot plz help someone IMEI: 012265001470520
hey guys, ehm.. i wanted to find out how im gonna find out which carrier my Iphone 3GS got. so if anyone can help me out plz do my IMEI: 012265001470520 i read thats gonna be find out with the imei so i posted it plz advice me fast