Header in  Function module REUSE_ALV_GRID_DISPLAY

Hi,
i have to display the header which is having the user id, time, date and description.
if any one knows please help me
thanks
shiva

Hi,
if we use OO ALV GRID using cl_gui_alv_grid class then we can use splitter container, using that you can change the size of it.
for that check this sample..
REPORT  Z_OO_ALV    MESSAGE-ID ZZ                           .
DATA: G_GRID TYPE REF TO CL_GUI_ALV_GRID.
DATA: L_VALID TYPE C,
      V_FLAG,
      V_DATA_CHANGE,
      V_ROW TYPE LVC_S_ROW,
      V_COLUMN TYPE LVC_S_COL,
      V_ROW_NUM TYPE LVC_S_ROID.
DATA: IT_ROW_NO TYPE LVC_T_ROID,
      X_ROW_NO TYPE LVC_S_ROID.
DATA:BEGIN OF  ITAB OCCURS 0,
     VBELN LIKE LIKP-VBELN,
     POSNR LIKE LIPS-POSNR,
     CELLCOLOR TYPE LVC_T_SCOL, "required for color
     DROP(10),
     END OF ITAB.
"The Below Definitions Must.....
DATA:
* Reference to document
       DG_DYNDOC_ID       TYPE REF TO CL_DD_DOCUMENT,
* Reference to split container
       DG_SPLITTER          TYPE REF TO CL_GUI_SPLITTER_CONTAINER,
* Reference to grid container
       DG_PARENT_GRID     TYPE REF TO CL_GUI_CONTAINER,
* Reference to html container
       DG_HTML_CNTRL        TYPE REF TO CL_GUI_HTML_VIEWER,
* Reference to html container
       DG_PARENT_HTML     TYPE REF TO CL_GUI_CONTAINER.
"up to here
*       CLASS lcl_event_handler DEFINITION
CLASS LCL_EVENT_HANDLER DEFINITION .
  PUBLIC SECTION .
    METHODS:
**Hot spot Handler
    HANDLE_HOTSPOT_CLICK FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID
                      IMPORTING E_ROW_ID E_COLUMN_ID ES_ROW_NO,
**Double Click Handler
    HANDLE_DOUBLE_CLICK FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID
                                     IMPORTING E_ROW E_COLUMN ES_ROW_NO,
    TOP_OF_PAGE FOR EVENT TOP_OF_PAGE              "event handler
                         OF CL_GUI_ALV_GRID
                         IMPORTING E_DYNDOC_ID.
*        END_OF_LIST FOR EVENT end_of_list              "event handler
*                         OF CL_GUI_ALV_GRID
*                         IMPORTING E_DYNDOC_ID.
ENDCLASS.                    "lcl_event_handler DEFINITION
*       CLASS lcl_event_handler IMPLEMENTATION
CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
*Handle Hotspot Click
  METHOD HANDLE_HOTSPOT_CLICK .
    CLEAR: V_ROW,V_COLUMN,V_ROW_NUM.
    V_ROW  = E_ROW_ID.
    V_COLUMN = E_COLUMN_ID.
    V_ROW_NUM = ES_ROW_NO.
*    MESSAGE I000 WITH V_ROW 'clicked'.
    CLEAR IT_ROW_NO[].
    X_ROW_NO-ROW_ID = V_ROW.
    APPEND X_ROW_NO TO IT_ROW_NO .
    CALL METHOD G_GRID->SET_SELECTED_ROWS
      EXPORTING
        IT_ROW_NO = IT_ROW_NO.
  ENDMETHOD.                    "lcl_event_handler
*Handle Double Click
  METHOD  HANDLE_DOUBLE_CLICK.
    CLEAR: V_ROW,V_COLUMN,V_ROW_NUM.
    V_ROW  = E_ROW.
    V_COLUMN = E_COLUMN.
    V_ROW_NUM = ES_ROW_NO.
    IF E_COLUMN = 'VBELN'.
      SET PARAMETER ID 'VL' FIELD ITAB-VBELN.
      CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN.
    ENDIF.
    IF E_COLUMN = 'POSNR'.
      SET PARAMETER ID 'VL' FIELD ITAB-VBELN.
      CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN."
    ENDIF.
  ENDMETHOD.                    "handle_double_click
*  METHOD END_OF_LIST.                   "implementation
** Top-of-page event
*    PERFORM EVENT_TOP_OF_PAGE USING DG_DYNDOC_ID.
*  ENDMETHOD.                            "top_of_page
    METHOD TOP_OF_PAGE.                   "implementation
* Top-of-page event
    PERFORM EVENT_TOP_OF_PAGE USING DG_DYNDOC_ID.
  ENDMETHOD.                            "top_of_page
ENDCLASS.                    "LCL_EVENT_HANDLER IMPLEMENTATION
*&             Global Definitions
DATA:      G_CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,"Container1
            G_HANDLER TYPE REF TO LCL_EVENT_HANDLER. "handler
DATA: OK_CODE LIKE SY-UCOMM,
      SAVE_OK LIKE SY-UCOMM,
      G_CONTAINER1 TYPE SCRFNAME VALUE 'TEST',
      GS_LAYOUT TYPE LVC_S_LAYO.
data: v_lines type i.
data: v_line(3) type c.
*- Fieldcatalog for First and second Report
DATA: IT_FIELDCAT  TYPE  LVC_T_FCAT,
      X_FIELDCAT TYPE LVC_S_FCAT,
      LS_VARI  TYPE DISVARIANT.
*                START-OF_SELECTION
START-OF-SELECTION.
  SELECT VBELN
         POSNR
         FROM LIPS
         UP TO 20 ROWS
         INTO CORRESPONDING FIELDS OF TABLE ITAB.
describe table itab lines v_lines.
END-OF-SELECTION.
  IF NOT ITAB[] IS INITIAL.
    CALL SCREEN 100.
  ELSE.
    MESSAGE I002 WITH 'NO DATA FOR THE SELECTION'(004).
  ENDIF.
*&      Form  CREATE_AND_INIT_ALV
*       text
FORM CREATE_AND_INIT_ALV .
  DATA: LT_EXCLUDE TYPE UI_FUNCTIONS.
  "attention.....from here
  "split your container here...into two parts
  "create the container
  CREATE OBJECT G_CUSTOM_CONTAINER
           EXPORTING CONTAINER_NAME = G_CONTAINER1.
  "this is for top of page
* Create TOP-Document
  CREATE OBJECT DG_DYNDOC_ID
                   EXPORTING STYLE = 'ALV_GRID'.
* Create Splitter for custom_container
  CREATE OBJECT DG_SPLITTER
             EXPORTING PARENT  = G_CUSTOM_CONTAINER
                       ROWS    = 2
                       COLUMNS = 1.
* Split the custom_container to two containers and move the reference
* to receiving containers g_parent_html and g_parent_grid
  "i am allocating the space for grid and top of page
  CALL METHOD DG_SPLITTER->GET_CONTAINER
    EXPORTING
      ROW       = 1
      COLUMN    = 1
    RECEIVING
      CONTAINER = DG_PARENT_HTML.
  CALL METHOD DG_SPLITTER->GET_CONTAINER
    EXPORTING
      ROW       = 2
      COLUMN    = 1
    RECEIVING
      CONTAINER = DG_PARENT_GRID.
*  CALL METHOD DG_SPLITTER->GET_CONTAINER
*    EXPORTING
*      ROW       = 2
*      COLUMN    = 1
*    RECEIVING
*      CONTAINER = DG_PARENT_HTML.
*  CALL METHOD DG_SPLITTER->GET_CONTAINER
*    EXPORTING
*      ROW       = 1
*      COLUMN    = 1
*    RECEIVING
*      CONTAINER = DG_PARENT_GRID.
  "you can set the height of it
* Set height for g_parent_html
  CALL METHOD DG_SPLITTER->SET_ROW_HEIGHT
    EXPORTING
      ID     = 1
      HEIGHT = 5.
  "from here as usual..you need to specify parent as splitter part
  "which we alloted for grid
  CREATE OBJECT G_GRID
         EXPORTING I_PARENT = DG_PARENT_GRID.
* Set a titlebar for the grid control
  CLEAR GS_LAYOUT.
  GS_LAYOUT-GRID_TITLE = TEXT-003.
  GS_LAYOUT-ZEBRA = SPACE.
  GS_LAYOUT-CWIDTH_OPT = 'X'.
  GS_LAYOUT-NO_ROWMARK = 'X'.
  GS_LAYOUT-CTAB_FNAME = 'CELLCOLOR'.
  CALL METHOD G_GRID->REGISTER_EDIT_EVENT
    EXPORTING
      I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_ENTER.
  CREATE OBJECT G_HANDLER.
  SET HANDLER G_HANDLER->HANDLE_DOUBLE_CLICK FOR G_GRID.
  SET HANDLER G_HANDLER->HANDLE_HOTSPOT_CLICK FOR G_GRID.
*  SET HANDLER G_HANDLER->END_OF_LIST FOR G_GRID.
  SET HANDLER G_HANDLER->TOP_OF_PAGE FOR G_GRID.
  DATA: LS_CELLCOLOR TYPE LVC_S_SCOL. "required for color
  DATA: L_INDEX TYPE SY-TABIX.
  "Here i am changing the color of line 1,5,10...
  "so you can change the color of font conditionally
  LOOP AT ITAB.
    L_INDEX = SY-TABIX.
    IF L_INDEX = 1 OR L_INDEX = 5 OR L_INDEX = 10.
      LS_CELLCOLOR-FNAME = 'VBELN'.
      LS_CELLCOLOR-COLOR-COL = '6'.
      LS_CELLCOLOR-COLOR-INT = '0'.
      LS_CELLCOLOR-COLOR-INV = '1'.
      APPEND LS_CELLCOLOR TO ITAB-CELLCOLOR.
      MODIFY ITAB INDEX L_INDEX TRANSPORTING CELLCOLOR.
      LS_CELLCOLOR-FNAME = 'POSNR'.
      LS_CELLCOLOR-COLOR-COL = '6'.
      LS_CELLCOLOR-COLOR-INT = '0'.
      LS_CELLCOLOR-COLOR-INV = '1'.
      APPEND LS_CELLCOLOR TO ITAB-CELLCOLOR.
      MODIFY ITAB INDEX L_INDEX TRANSPORTING CELLCOLOR.
    ENDIF.
  ENDLOOP.
* setting focus for created grid control
  CALL METHOD CL_GUI_CONTROL=>SET_FOCUS
    EXPORTING
      CONTROL = G_GRID.
* Build fieldcat and set editable for date and reason code
* edit enabled. Assign a handle for the dropdown listbox.
  PERFORM BUILD_FIELDCAT.
  PERFORM  SET_DRDN_TABLE.
* Optionally restrict generic functions to 'change only'.
*   (The user shall not be able to add new lines).
  PERFORM EXCLUDE_TB_FUNCTIONS CHANGING LT_EXCLUDE.
**Vaiant to save the layout
  LS_VARI-REPORT      = SY-REPID.
  LS_VARI-HANDLE      = SPACE.
  LS_VARI-LOG_GROUP   = SPACE.
  LS_VARI-USERNAME    = SPACE.
  LS_VARI-VARIANT     = SPACE.
  LS_VARI-TEXT        = SPACE.
  LS_VARI-DEPENDVARS  = SPACE.
**Calling the Method for ALV output
  CALL METHOD G_GRID->SET_TABLE_FOR_FIRST_DISPLAY
    EXPORTING
      IT_TOOLBAR_EXCLUDING = LT_EXCLUDE
      IS_VARIANT           = LS_VARI
      IS_LAYOUT            = GS_LAYOUT
      I_SAVE               = 'A'
    CHANGING
      IT_FIELDCATALOG      = IT_FIELDCAT
      IT_OUTTAB            = ITAB[].
  "do these..{
* Initializing document
  CALL METHOD DG_DYNDOC_ID->INITIALIZE_DOCUMENT.
* Processing events
  CALL METHOD G_GRID->LIST_PROCESSING_EVENTS
    EXPORTING
      I_EVENT_NAME = 'TOP_OF_PAGE'
      I_DYNDOC_ID  = DG_DYNDOC_ID.
  "end }
* Set editable cells to ready for input initially
  CALL METHOD G_GRID->SET_READY_FOR_INPUT
    EXPORTING
      I_READY_FOR_INPUT = 1.
ENDFORM.                               "CREATE_AND_INIT_ALV
*&      Form  EXCLUDE_TB_FUNCTIONS
*       text
*      -->PT_EXCLUDE text
FORM EXCLUDE_TB_FUNCTIONS CHANGING PT_EXCLUDE TYPE UI_FUNCTIONS.
* Only allow to change data not to create new entries (exclude
* generic functions).
  DATA LS_EXCLUDE TYPE UI_FUNC.
  LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_COPY_ROW.
  APPEND LS_EXCLUDE TO PT_EXCLUDE.
  LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_DELETE_ROW.
  APPEND LS_EXCLUDE TO PT_EXCLUDE.
  LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_APPEND_ROW.
  APPEND LS_EXCLUDE TO PT_EXCLUDE.
  LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_INSERT_ROW.
  APPEND LS_EXCLUDE TO PT_EXCLUDE.
  LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_MOVE_ROW.
  APPEND LS_EXCLUDE TO PT_EXCLUDE.
  LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_COPY.
  APPEND LS_EXCLUDE TO PT_EXCLUDE.
  LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_CUT.
  APPEND LS_EXCLUDE TO PT_EXCLUDE.
  LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_PASTE.
  APPEND LS_EXCLUDE TO PT_EXCLUDE.
  LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_PASTE_NEW_ROW.
  APPEND LS_EXCLUDE TO PT_EXCLUDE.
  LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_UNDO.
  APPEND LS_EXCLUDE TO PT_EXCLUDE.
ENDFORM.                               " EXCLUDE_TB_FUNCTIONS
*&      Form  build_fieldcat
*       Fieldcatalog
FORM BUILD_FIELDCAT .
  DATA: L_POS TYPE I.
  L_POS = L_POS + 1.
  X_FIELDCAT-SCRTEXT_M = 'Delivery'(024).
  X_FIELDCAT-FIELDNAME = 'VBELN'.
  X_FIELDCAT-TABNAME = 'IT_FINAL'.
  X_FIELDCAT-COL_POS    = L_POS.
  X_FIELDCAT-NO_ZERO    = 'X'.
  X_FIELDCAT-OUTPUTLEN = '10'.
  X_FIELDCAT-HOTSPOT = 'X'.
  APPEND X_FIELDCAT TO IT_FIELDCAT.
  CLEAR X_FIELDCAT.
  L_POS = L_POS + 1.
  X_FIELDCAT-SCRTEXT_M = 'Item'(025).
  X_FIELDCAT-FIELDNAME = 'POSNR'.
  X_FIELDCAT-TABNAME = 'IT_FINAL'.
  X_FIELDCAT-COL_POS    = L_POS.
  X_FIELDCAT-OUTPUTLEN = '5'.
  APPEND X_FIELDCAT TO IT_FIELDCAT.
  CLEAR X_FIELDCAT.
  L_POS = L_POS + 1.
  X_FIELDCAT-SCRTEXT_M = 'Drop'(025).
  X_FIELDCAT-FIELDNAME = 'DROP'.
  X_FIELDCAT-TABNAME = 'IT_FINAL'.
  X_FIELDCAT-COL_POS    = L_POS.
  X_FIELDCAT-OUTPUTLEN = '5'.
  X_FIELDCAT-EDIT = 'X'.
  X_FIELDCAT-DRDN_HNDL = '1'.
  X_FIELDCAT-DRDN_ALIAS = 'X'.
  APPEND X_FIELDCAT TO IT_FIELDCAT.
  CLEAR X_FIELDCAT.
ENDFORM.                    " build_fieldcat
*&      Module  STATUS_0100  OUTPUT
*       text
MODULE STATUS_0100 OUTPUT.
  SET PF-STATUS 'MAIN100'.
  SET TITLEBAR 'MAIN100'.
  IF G_CUSTOM_CONTAINER IS INITIAL.
**Initializing the grid and calling the fm to Display the O/P
    PERFORM CREATE_AND_INIT_ALV.
  ENDIF.
ENDMODULE.                 " STATUS_0100  OUTPUT
*&      Module  USER_COMMAND_0100  INPUT
*       text
MODULE USER_COMMAND_0100 INPUT.
  CASE SY-UCOMM.
    WHEN 'BACK'.
      LEAVE TO SCREEN 0.
  ENDCASE.
ENDMODULE.                 " USER_COMMAND_0100  INPUT
*&      Form  SET_DRDN_TABLE
*       text
FORM SET_DRDN_TABLE.
  DATA:LT_DRAL TYPE LVC_T_DRAL,
        LS_DRAL TYPE LVC_S_DRAL.
  LOOP AT ITAB .
* First listbox (handle '1').
    IF SY-INDEX = 1.
      LS_DRAL-HANDLE = '1'.
      LS_DRAL-VALUE =  ' '.
      LS_DRAL-INT_VALUE =  ' '.
    ELSE.
      LS_DRAL-HANDLE = '1'.
      LS_DRAL-VALUE =  ITAB-POSNR.
      LS_DRAL-INT_VALUE =  ITAB-POSNR.
    ENDIF.
    APPEND LS_DRAL TO LT_DRAL.
  ENDLOOP.
**Setting the Drop down table for Reason Code
  CALL METHOD G_GRID->SET_DROP_DOWN_TABLE
    EXPORTING
      IT_DROP_DOWN_ALIAS = LT_DRAL.
ENDFORM.                               " set_drdn_table
*&      Form  EVENT_TOP_OF_PAGE
*       text
*      -->DG_DYNDOC_ID  text
FORM EVENT_TOP_OF_PAGE USING   DG_DYNDOC_ID TYPE REF TO CL_DD_DOCUMENT.
  "this is more clear.....check it
  "first add text, then pass it to comentry write fm
  DATA : DL_TEXT(255) TYPE C.  "Text
* Populating header to top-of-page
  CALL METHOD DG_DYNDOC_ID->ADD_TEXT
    EXPORTING
      TEXT      = 'Test Report'
      SAP_STYLE = CL_DD_AREA=>HEADING.
* Add new-line
  CALL METHOD DG_DYNDOC_ID->NEW_LINE.
  CLEAR : DL_TEXT.
* Move program ID
  CONCATENATE 'Program Name :' SY-REPID
         INTO DL_TEXT SEPARATED BY SPACE.
* Add Program Name to Document
  PERFORM ADD_TEXT USING DL_TEXT.
* Add new-line
  CALL METHOD DG_DYNDOC_ID->NEW_LINE.
  CLEAR : DL_TEXT.
* Move User ID
  CONCATENATE 'User ID :' SY-UNAME INTO DL_TEXT SEPARATED BY SPACE
* Add User ID to Document
  PERFORM ADD_TEXT USING DL_TEXT.
* Add new-line
  CALL METHOD DG_DYNDOC_ID->NEW_LINE.
  CLEAR : DL_TEXT.
* Move count (no of records).
  move v_lines to v_line.
  CONCATENATE 'No of records :' v_line INTO DL_TEXT SEPARATED BY SPACE.
* Add Client to Document
  PERFORM ADD_TEXT USING DL_TEXT.
* Add new-line
  CALL METHOD DG_DYNDOC_ID->NEW_LINE.
  CLEAR : DL_TEXT.
* Move date
  WRITE SY-DATUM TO DL_TEXT.
  CONCATENATE 'Date :' DL_TEXT INTO DL_TEXT SEPARATED BY SPACE.
* Add Date to Document
  PERFORM ADD_TEXT USING DL_TEXT.
* Add new-line
  CALL METHOD DG_DYNDOC_ID->NEW_LINE.
  CLEAR : DL_TEXT.
* Move time
  WRITE SY-UZEIT TO DL_TEXT.
  CONCATENATE 'Time :' DL_TEXT INTO DL_TEXT SEPARATED BY SPACE.
* Add Time to Document
  PERFORM ADD_TEXT USING DL_TEXT.
* Add new-line
  CALL METHOD DG_DYNDOC_ID->NEW_LINE.
* Populating data to html control
  PERFORM HTML.
ENDFORM.                    " EVENT_TOP_OF_PAGE
*&      Form  ADD_TEXT
*       To add Text
FORM ADD_TEXT USING P_TEXT TYPE SDYDO_TEXT_ELEMENT.
* Adding text
  CALL METHOD DG_DYNDOC_ID->ADD_TEXT
    EXPORTING
      TEXT         = P_TEXT
      SAP_EMPHASIS = CL_DD_AREA=>HEADING.
ENDFORM.                    " ADD_TEXT
*&      Form  HTML
*       text
FORM HTML.
  DATA : DL_LENGTH  TYPE I,                           " Length
         DL_BACKGROUND_ID TYPE SDYDO_KEY VALUE SPACE. " Background_id
* Creating html control
  IF DG_HTML_CNTRL IS INITIAL.
    CREATE OBJECT DG_HTML_CNTRL
         EXPORTING
              PARENT    = DG_PARENT_HTML.
  ENDIF.
* Reuse_alv_grid_commentary_set
  CALL FUNCTION 'REUSE_ALV_GRID_COMMENTARY_SET'
    EXPORTING
      DOCUMENT = DG_DYNDOC_ID
      BOTTOM   = SPACE
    IMPORTING
      LENGTH   = DL_LENGTH.
* Get TOP->HTML_TABLE ready
  CALL METHOD DG_DYNDOC_ID->MERGE_DOCUMENT.
* Set wallpaper
  CALL METHOD DG_DYNDOC_ID->SET_DOCUMENT_BACKGROUND
    EXPORTING
      PICTURE_ID = DL_BACKGROUND_ID.
* Connect TOP document to HTML-Control
  DG_DYNDOC_ID->HTML_CONTROL = DG_HTML_CNTRL.
* Display TOP document
  CALL METHOD DG_DYNDOC_ID->DISPLAY_DOCUMENT
    EXPORTING
      REUSE_CONTROL      = 'X'
      PARENT             = DG_PARENT_HTML
    EXCEPTIONS
      HTML_DISPLAY_ERROR = 1.
  IF SY-SUBRC NE 0.
    MESSAGE I999 WITH 'Error in displaying top-of-page'(036).
  ENDIF.
ENDFORM.                    " HTML
Regards
vijay

Similar Messages

  • Regarding the function module 'REUSE_ALV_GRID_DISPLAY'

    wat do these things do in 'REUSE_ALV_GRID_DISPLAY' function module and how to use them??
           IS_VARIANT                        =
          IT_EVENTS                         =
          IT_EVENT_EXIT                     =
          IS_PRINT                          =
          IS_REPREP_ID                      =
          I_SCREEN_START_COLUMN             = 0
          I_SCREEN_START_LINE               = 0
          I_SCREEN_END_COLUMN               = 0
          I_SCREEN_END_LINE                 = 0
          I_HTML_HEIGHT_TOP                 = 0

    Hi
    See the function module Documentation,
    Passing an EXIT routine indicates to the ALV that the application wants to respond to certain function codes.
    Generally, these are function codes that are unknown to the ALV (that is, are not standard ALV functions) and that were defined and set by a user status.
    See also the documentation on parameter I_CALLBACK_PF_STATUS_SET.
    The interface of the form routine specified must be defined as follows:
    FORM user_command USING r_ucomm LIKE sy-ucomm
    rs_selfield TYPE slis_selfield.
    Parameter R_UCOMM contains the function code triggered.
    Structure RS_SELFIELD contains the following information:
    tabname : Name of the internal output table
    tabindex : Index of the internal output table
    fieldname: Field name
    endsum : Cursor is located on the totals line
    sumindex : If >0, the cursor is located on a subtotals line
    value : Value of the field on the list
    refresh : (Exporting) List should be set up again
    col_stable:(Exporting) Keep column position when list is set up again
    row_stable:(Exporting) Keep row position when list is set up again
    exit :(Exporting) Exit list (and ALV)
    before_action: Call before standard action execution
    after_action : Call after standard action execution, before list setup
    ignore_multi : Internal use
    sel_tab_field: Internal use
    The EXIT routine is called whenever a function unknown to the ALV is triggered or if the routine call before/after the execution of a standard function code has been defined by interface parameter IT_EVENT_EXIT.
    See also the documentation on parameter IT_EVENT_EXIT.
    The function code and the current cursor position are then passed on to the calling program through the EXIT routine.
    If the user has selected multiple rows by selecting checkboxes, the output table field designated as the checkbox contains the current state of the checkbox in the list.
    Top_Of_page :
    If the caller specifies an EXIT routine, this routine must have the following form:
    FORM top_of_page.
    Module REUSE_ALV_COMMENTARY_WRITE can then be called within the EXIT routine. This module is responsible for formatting the header information and also ensures online HTML formatting. In the print preview or in batch mode, the text passed is then output in the normal format.
    If module REUSE_ALV_COMMENTARY_WRITE cannot be used, you must use two parameters instead. In I_CALLBACK_TOP_OF_PAGE you pass the form routine that is responsible for normal formatting in batch mode or in the print preview mode. The form routine that is responsible for online formatting, is passed in parameter I_CALLBACK_HTML_TOP_OF_PAGE. If one of these parameters is not filled, top-of-page is not output in the respective mode.
    The important parameters are :
    I. Export :
    i. I_callback_program : report id
    ii. I_callback_pf_status_set : routine where a user can set his own pf status or change the functionality of the existing pf status
    iii. I_callback_user_command : routine where the function codes are handled
    iv. I_structure name : name of the dictionary table
    v. Is_layout : structure to set the layout of the report
    vi. It_fieldcat : internal table with the list of all fields and their attributes which are to be printed (this table can be populated automatically by the function module REUSE_ALV_FIELDCATALOG_MERGE
    vii. It_events : internal table with a list of all possible events of ALV and their corresponding form names.
    II. Tables :
    i. t_outtab : internal table with the data to be output
    <b>REward if usefull</b>

  • How to EDIT a particular Row in ALV using normal function module Reuse_alv_grid_display

    Hi experts..
    i got one requirement like i need to edit some rows particularly in alv....
    Edit in alv output....is it possible to get  that .....using normal function module with out using oops concept...
    could any one pls help me...

    Hi Pendurti ,
    If you want a particular field to be editable , simply define the fieldcatalog as
    wa_fieldcatalog-edit          = 'X'.
    wa_fieldcatalog-input         = 'X'.
    for that field.
    and
    Now when you use FM ' Reuse alv grid display '
    define USER_COMMAND
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = v_repid
          i_callback_pf_status_set = 'SET_PF_STATUS'
          i_callback_user_command  = 'USER_COMMAND'
          it_fieldcat              = int_fieldcatalog
          is_layout                = wa_layout
        TABLES
          t_outtab                 = t_disp.
    and now in form USER_COMMAND ; code as per following
    FORM user_command  USING r_ucomm LIKE sy-ucomm
                                rs_selfield TYPE slis_selfield.
         DATA ref1 TYPE REF TO cl_gui_alv_grid.
         CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
           IMPORTING
             e_grid = ref1.
         CALL METHOD ref1->check_changed_data.
    endform.
    Regards,
    Yogendra Bhaskar

  • How to create Drop-Down with Function Module REUSE_ALV_GRID_DISPLAY

    Hi Experts,
    I have used Reuse_alv_grid_display function module in my report for ALV output. I have a requirement to add drop down in one cell of my output. I have searched but all are suggesting through OOPS programing that I can not use.
    If it is possible with the given scenerion , please help me how to write the code for it?
    Thanks a bunch in advance.

    Hi,
    You can check demo programs:
    BCALV_EDIT_06
    BCALV_EDIT_07
    Hope it helps
    Regards
    Mansi

  • Error with the function module REUSE_ALV_GRID_DISPLAY

    Hi,
    While using the fucntion module REUSE_ALV_GRID_DISPLAY
    I am getting the below error.
    Message i407(0k) with l_template_om.
    message says 'Contact your system administrator. The following template is missing: sap_mm.123
    Kindly provide me the reason why this success message is displayed for this function module.
    Vijay

    at first its an information message sind its of type I and not of type S which would be success.
    this message is beeing displayed because that template is really missing, believe it when SAP talks to you.
    So talk to your basis guys.
    to come around this problem without talking to your basis guys, i´d propose to use CL_SALV_TABLE or CL_GUI_ALV_GRID to display an ALV.

  • Adding a new conditon on head via function modul?

    Hi,
    is there a way to add a condition to an order via function module? I mean in customizing we have maintained the calc scheme (and everything else) and assign it to the order. What we want is to add the new condition type to the head of the order via function module. The scenario is as follows:
    We create an order and have on the header a field for a value. If you type a value in the field and press enter the condition should be created and calculatetd. The result is given in the condition tab of the order on header level.
    We try to not do a modifictaion. therefore i am looking for a function module. Is there someone who could help?
      thanks and regards,
           Ming

    Why can't this be done by the pricing configuration?
    There are also pricing user exits available, which are not modifications and exist for this purpose exactly (i.e. when for some reason configuration alone is not enough). See the list here:
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/erplo/sdUserexits

  • Adding a color to row of a alv grid using function modules

    Can anybody clearly explains me how to add a color to a row to an alv grid using function module reuse_alv_grid_display.
    thanks in advance
    regards
    anil.

    hi,
    chk this ample pgm
    report zxyz_0004
           no standard page heading.
    type-pools slis.
    data: fieldcat type slis_t_fieldcat_alv.
    data: begin of imara occurs 0,
          matnr type mara-matnr,
          mtart type mara-mtart,
          maktx type makt-maktx,
          color_line(4) type c,
          tcolor type slis_t_specialcol_alv,  "cell
          end of imara.
    data: xcolor type slis_specialcol_alv.
    start-of-selection.
      perform get_data.
      perform write_report.
    Get_Data
    form get_data.
      imara-matnr = 'ABC'.
      imara-mtart = 'ZCFG'.
      imara-maktx = 'This is description for ABC'.
      append imara.
      imara-matnr = 'DEF'.
      imara-mtart = 'ZCFG'.
      imara-maktx = 'This is description for DEF'.
      append imara.
      imara-matnr = 'GHI'.
      imara-mtart = 'ZCFG'.
      imara-maktx = 'This is description for GHI'.
      append imara.
      loop at imara.
        if sy-tabix = 1.
          imara-color_line = 'C410'.   " color line
        endif.
        if sy-tabix = 2.          "color CELL
          clear xcolor.
          xcolor-fieldname = 'MTART'.
          xcolor-color-col = '3'.
          xcolor-color-int = '1'. "Intensified on/off
          xcolor-color-inv = '0'.
          append xcolor to imara-tcolor.
        endif.
        modify imara.
      endloop.
    endform.
    WRITE_REPORT
    form write_report.
      data: layout type  slis_layout_alv.
      layout-coltab_fieldname = 'TCOLOR'.
      layout-info_fieldname = 'COLOR_LINE'.
      perform build_field_catalog.
    CALL ABAP LIST VIEWER (ALV)
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                is_layout   = layout
                it_fieldcat = fieldcat
           tables
                t_outtab    = imara.
    endform.
    BUILD_FIELD_CATALOG
    form build_field_catalog.
      data: fc_tmp type slis_t_fieldcat_alv with header line.
      clear: fieldcat. refresh: fieldcat.
      clear: fc_tmp.
      fc_tmp-reptext_ddic    = 'Material Number'.
      fc_tmp-fieldname  = 'MATNR'.
      fc_tmp-tabname   = 'IMARA'.
      fc_tmp-outputlen  = '18'.
      append fc_tmp to fieldcat.
      clear: fc_tmp.
      fc_tmp-reptext_ddic    = 'Material Type'.
      fc_tmp-fieldname  = 'MTART'.
      fc_tmp-tabname   = 'IMARA'.
      fc_tmp-outputlen  = '4'.
      append fc_tmp to fieldcat.
      clear: fc_tmp.
      fc_tmp-reptext_ddic    = 'Material'.
      fc_tmp-fieldname  = 'MAKTX'.
      fc_tmp-tabname   = 'IMARA'.
      fc_tmp-outputlen  = '40'.
      fc_tmp-emphasize = 'C610'.   " color column
      append fc_tmp to fieldcat.
    endform.
    <b>anil , pls chk this link also.
    http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_color.htm
    very hlpful.</b>
    rgds
    anver
    <b>pls mark points if ur issue solved</b>
    Message was edited by: Anversha s
    Message was edited by: Anversha s

  • QUESTION REGARDING FUNCTION MODULE

    what is the use  ' IT_EVENTS' in the function module 'REUSE_ALV_GRID_DISPLAY'

    Hi,
    Go to SE37 and Give your Fm Name -> Display.
    Go to Function Module Documentation.
    It will help you.
    Thanks.

  • Replace REUSE_ALV function module with use of OO ALV(obect oriented)

    HI,
    I m using function module 'REUSE_ALV_GRID_DISPLAY' to disply the report but now client want to use object oriented ALV instead of REUSE_ALV function
    pls help me.its very urgent
    thanks!
    Vipin
    pls find the code below.
    FORM f0001_get-select_data .
      SELECT a~pernr
             a~endda
             a~begda
             a~bukrs
             a~werks
             a~persg
             a~persk
             a~btrtl
             a~abkrs
             a~kostl
             a~orgeh
             a~plans
             b~nachn
             b~vorna
             b~midnm
             INTO CORRESPONDING FIELDS OF TABLE i_pa0001_pa0002
             FROM pa0001 AS a INNER JOIN pa0002 AS b
             ON apernr = bpernr
             WHERE a~pernr IN s_pernr
             AND   a~werks IN s_werks
             AND   a~orgeh IN s_orgeh
             AND   a~plans IN s_plans.
      SORT i_pa0001_pa0002 BY pernr .
      IF NOT i_pa0001_pa0002[] IS INITIAL .
      CLEAR: w_i_lines.
      DESCRIBE TABLE i_pa0001_pa0002 LINES w_i_lines.
        IF w_i_lines GT 0.
        SELECT pernr
               kostl
               lstar
               werks
               lifnr
               ebeln
               ebelp
               lstnr
               FROM pa0315
               INTO CORRESPONDING FIELDS OF TABLE i_pa0315
               FOR ALL ENTRIES IN i_pa0001_pa0002
               WHERE pernr = i_pa0001_pa0002-pernr
               AND   kostl = i_pa0001_pa0002-kostl
               AND   ebeln IN s_ebeln.
         SORT i_pa0315 BY pernr kostl.
         ENDIF.
    CLEAR: w_i_lines.
    DESCRIBE TABLE i_pa0001_pa0002 LINES w_i_lines.
        IF w_i_lines GT 0.
        SELECT pernr
               endda
               begda
               schkz
               FROM pa0007
               INTO CORRESPONDING FIELDS OF TABLE i_pa0007
               FOR ALL ENTRIES IN i_pa0001_pa0002
               WHERE pernr = i_pa0001_pa0002-pernr
               AND   endda = i_pa0001_pa0002-endda
               AND   begda = i_pa0001_pa0002-begda.
         SORT i_pa0007 BY pernr.
    ENDIF.
    CLEAR: w_i_lines.
    DESCRIBE TABLE i_pa0001_pa0002 LINES w_i_lines.
        IF w_i_lines GT 0.
        SELECT orgeh
               orgtx
               FROM t527x
               INTO CORRESPONDING FIELDS OF TABLE i_t527x
               FOR ALL ENTRIES IN i_pa0001_pa0002
               WHERE orgeh = i_pa0001_pa0002-orgeh.
       SORT i_t527x BY orgeh.
    ENDIF.
    CLEAR: w_i_lines.
    DESCRIBE TABLE i_pa0001_pa0002 LINES w_i_lines.
        IF w_i_lines GT 0.
        SELECT plans
               plstx
               FROM t528t
               INTO CORRESPONDING FIELDS OF TABLE i_t528t
               FOR ALL ENTRIES IN i_pa0001_pa0002
               WHERE plans = i_pa0001_pa0002-plans.
          SORT i_t528t BY plans.
       ENDIF.
      ENDIF.
    Merging data of i_pa0001_pa0002,i_pa0315 & i_pa0007 into i_outtab.
      LOOP AT i_pa0001_pa0002 INTO w_pa0001_pa0002 .
        MOVE-CORRESPONDING w_pa0001_pa0002 TO w_final.
        READ TABLE i_pa0315 INTO w_pa0315 WITH KEY  pernr =
       w_pa0001_pa0002-pernr
       kostl = w_pa0001_pa0002-kostl BINARY SEARCH.
        IF sy-subrc = 0.
          w_final-kostl   = w_pa0315-kostl.
          w_final-lstar   = w_pa0315-lstar.
          w_final-werks_p = w_pa0315-werks.
          w_final-lifnr   = w_pa0315-lifnr.
          w_final-ebeln   = w_pa0315-ebeln.
          w_final-ebelp   = w_pa0315-ebelp.
          w_final-lstnr   = w_pa0315-lstnr.
        ENDIF.
        READ TABLE i_pa0007 INTO w_pa0007 WITH KEY pernr =
       w_pa0001_pa0002-pernr BINARY SEARCH.
        IF sy-subrc = 0.
          w_final-schkz = w_pa0007-schkz.
        ENDIF.
        READ TABLE i_t527x INTO w_t527x WITH KEY orgeh = w_pa0001_pa0002-orgeh
        BINARY SEARCH.
        IF sy-subrc = 0.
          w_final-orgtx = w_t527x-orgtx.
        ENDIF.
        READ TABLE i_t528t INTO w_t528t WITH KEY plans =
    w_pa0001_pa0002-plans BINARY SEARCH.
        IF sy-subrc = 0.
          w_final-plstx = w_t528t-plstx.
        ENDIF.
        APPEND w_final to i_outtab.
      ENDLOOP.
    ENDFORM.                    "f001_get-select_data
    *&      Form  f002_display_data
          text
    FORM f0002_display_data.
    Build the field catalog
    ls_fieldcat-col_pos = '1'.
    ls_fieldcat-fieldname = 'PERNR'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname  = 'PA0001'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '2'.
    ls_fieldcat-fieldname = 'NACHN'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0002'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '3'.
    ls_fieldcat-fieldname = 'VORNA'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0002'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '4'.
    ls_fieldcat-fieldname = 'MIDNM'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0002'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '5'.
    ls_fieldcat-fieldname = 'BUKRS'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0001'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '6'.
    ls_fieldcat-fieldname = 'WERKS'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0001'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '7'.
    ls_fieldcat-fieldname = 'PERSG'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0001'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '8'.
    ls_fieldcat-fieldname = 'PERSK'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0001'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '9'.
    ls_fieldcat-fieldname = 'BTRTL'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0001'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '10'.
    ls_fieldcat-fieldname = 'ABKRS'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0001'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '11'.
    ls_fieldcat-fieldname = 'ORGEH'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0001'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '12'.
    ls_fieldcat-fieldname = 'ORGTX'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'T527X'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '13'.
    ls_fieldcat-fieldname = 'PLANS'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0001'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '14'.
    ls_fieldcat-fieldname = 'PLSTX'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'T528T'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '15'.
    ls_fieldcat-fieldname = 'SCHKZ'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0007'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '16'.
    ls_fieldcat-fieldname = 'KOSTL'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0315'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '17'.
    ls_fieldcat-fieldname = 'LSTAR'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0315'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '18'.
    ls_fieldcat-fieldname = 'WERKS'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0315'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '19'.
    ls_fieldcat-fieldname = 'LIFNR'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0315'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '20'.
    ls_fieldcat-fieldname = 'EBELN'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0315'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '21'.
    ls_fieldcat-fieldname = 'EBELP'.
    ls_fieldcat-tabname = 'i_outab'.
    ls_fieldcat-ref_tabname = 'PA0315'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '22'.
    ls_fieldcat-fieldname = 'LSTNR'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0315'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '23'.
    ls_fieldcat-fieldname = 'BEGDA'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0001'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '24'.
    ls_fieldcat-fieldname = 'ENDDA'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0001'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    Display the list
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program      = sy-cprog
         i_callback_user_command = 'USER_COMMAND'
          it_fieldcat             = lt_fieldcat
        TABLES
          t_outtab                = i_outtab.
    ENDFORM.                               " F_DISPLAY_DATA

    Hi,
    check the system defined program BCALV_EDIT_05.
    rgds,
    bharat.

  • Issue in function module

    Hello Friends,
    i have created one Zfunction module in tht i have written code for interactive alv with check boxes.
    now when the user selects the checkboxes amd press save button in alv grid display the output gets saved in one internal table in the source code itself but how to show the same output in the output  of function module.
    i declared the same structure type table in tables parameter of function module but m not getting any output .
    pls suggest ....
    Regards,
    Sunny
    Please use a more informative subject
    Edited by: Rob Burbank on Feb 24, 2009 11:19 AM

    Hi Sunny,
    Please ignore my previous post.
    I have partially understood your question. I assume that you have the required data in an internal table.
    1. If you want it to be displayed in the output (in an internal table), then you can use the statement
    itab2[] = itab1[].
    where itab1[] is the internal table where you have all the data to be displayed (the one your specified),
    itab2[] is the internal table declared in the "TABLES" tab of the function module.
    Note: Here itab1 and itab2 should be of same structure.
    2. If you want it to be displayed in an ALV format, then you can use the standard function module 'REUSE_ALV_GRID_DISPLAY'

  • Function Module output display

    HI Frnds,
         When I am calling the function module and displaying the output the column name is displayed as field name but my requirement is to diplay the field description of that field how to do it tell me
    Thanks in advance
    Y.Ravikumar

    hi,
    if you are displaying using ALV.
    then in fieldcatalog you can use .
    d_fieldcat_wa-fieldname = 'MATNR'.
    d_fieldcat_wa-seltext_l = 'material number'.   * user defined fieldname.
    d_fieldcat_wa-edit = 'X'.
    d_fieldcat_wa-col_pos = 1.
    append d_fieldcat_wa to d_fieldcat.
    clear d_fieldcat_wa.
    data : gd_repid like sy-repid.
           gd_repid = sy-repid.
    call function module reuse_alv_grid_display.
    exporting.
    program name = gd_repid.
    t_fieldcatalog = d_fieldcat.
    importing.
    t_outtab = itab.
    exceptions.
    Reward with points if helpful.

  • Header function module

    Hi
    all
    can any one suggest me the function module name for
    displaying header on list or grid report .
    only through the function module name

    HI,
    FM <b>'REUSE_ALV_COMMENTARY_WRITE'</b>
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                I_CALLBACK_PROGRAM      = GD_REPID
                I_CALLBACK_TOP_OF_PAGE   = <b>'TOP-OF-PAGE' </b>
                I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
               i_grid_title           = outtext
                IS_LAYOUT               = GD_LAYOUT
                IT_FIELDCAT             = FIELDCATALOG[]
               it_special_groups       = gd_tabgroup
                IT_EVENTS                = GT_XEVENTS
                I_SAVE                  = 'X'
                IS_VARIANT              = Z_TEMPLATE
           TABLES
                T_OUTTAB                = IT_EKKO
           EXCEPTIONS
                PROGRAM_ERROR           = 1
                OTHERS                  = 2.
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    FORM TOP-OF-PAGE.
        CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
          EXPORTING
            IT_LIST_COMMENTARY = LT_TOP_OF_PAGE.
           I_LOGO             = 'ENJOYSAP_LOGO'.
    ENDFORM.
    hope this helps,
    do reward if it helps,
    priya.

  • SAVE_TEXT FUNCTION MODULE USAGE TO SAVE TEXT IN AN ORDER FORM HEADER

    Hello All,
    The user enters text in a text editor and I want to save the text in the form header using a function module SAVE_TEXT. I think this is the only one for saving the text in an order header text. Can anyone provide me a sample program to use this since I am getting an error VBBK EN language not found error , error while saving the text in the database, short dumping. Please let me know the experience of you folks
    Thanks

    Chk this thread,,sample code.
    SAVE_TEXT FUNCTION MODULE

  • Function module to find wheather a user is heading any Org unit

    Function module to find wheather a user is heading any Org unit
    Hi Experts,
    I need to know if a user(SY-UNAME) is heading any Org unit(Check box marked for Head of own organisational unit in TCODE PPOMA_CRM for position in Basic Data). Is there any FM for this? I am trying to use FM RH_STRUC_GET but not able to find.
    Any help would be highly appreciated.

    Method  get_assignments_of_user of class cl_crm_ppm_um_toolkit solved this problem.

  • I need a Functional module to get the header material from the component .

    Dear Guru's
    Please help me .
    I need a name of the Functional module to get the header material from the component .
    As in if I put the Component in the Input I should get ALL the Main header materials using this Component.
    Regards,
    Roshan Lilaram Wadhwani.

    This was not answered

Maybe you are looking for

  • How to get clips to appear in good quality when editing?

    I worked with PE over a decade ago when I had a PC.  In 2008 I migrated to Apple -- specifcally desktop Intel duo-processor Mac, OS X Snow Lion 10.6.8.  So regretably I was forced to leave PE behind and begin using Final Cut Express 4.0.1.   Recently

  • Audit Log

    Hi We are doing a file-to-file scenario without content conversion. That means we did not set up any interfaces in the repository but created a so called u201CgenericInterfaceu201D in the Configuration. This leads to a scenario where the file will ju

  • I can't drag and drop songs from library to playlists

    Unable to drag and drop songs from library into playlists, however I can drop them above or below playlists. That is no help in editing playlists! Seems to be after last iTunes up date. Tkank you

  • 50gb free space on disk, but can't copy any more files onto disk.

    Hi, I use my 120gb iPod classic to store films and tv shows on (in disk mode). these occupy round 35gb of the hard disk space and my music takes up around 30gb also. But the problem is I cannot copy any more things into the iPod (not in iTunes) in wi

  • I don't want to import RAW using CCK

    Hi there I've got the Camera Connector Kit for iPad. Sweeeet But there's something I don't like: It always imports BOTH RAW and JPG files to the iPad. This fills up the iPad pretty quick... Is there a setting (which I haven't been able to find) which