Need to choose fields from alv grid output and send mail

Hi,
I need to choose few orders from alv grid output and send mail as PDF for chosen orders.
Suggest if possible and how.

Moderator message - Please do not post your requirements and ask the forum to do your work for you - post locked
Rob

Similar Messages

  • F4 - Help for field in ALV Grid Output

    Hi,
    I generated a report which gives output in ALV Grid output.
    In the output, 1 of the field is editable.Here, for this field I need to have my own F4-Help.
    I think the procedure to be followed is:--
    Create a Search Help in SE11.
    Link the Search Help to the editable field.
    Please let me know if its the correct procedure.
    I f yes, how can I link user defined Search Help to the editable field?
    Thanks,
    Shivaa........

    Hi siva,
    you can also do that way.
    while filling the fieldcatalog use the parameter F4AVAILABL
    for more info check
    F4 help in ALV Grid...
    f4 help for a field in alv grid
    hope it helps you
    Thanks!
    Edited by: Prasanth on Mar 6, 2009 3:59 PM

  • How to supress dialog while ALV Grid output is send to Spool

    Hi,
    I need to get the ALV grid output in spool.But when i am executing my program using ALV grid function module with print parameter passed,first its giving a popup with default printer and number of copies and when i press ok for the popup ,spool request is created.But i dont want this popup to come while executing my program.It should create the spool request directly. How to solve this issue.
    Regards
    Shibin

    Hi Shibin,
    Try the below parameter in IS_PRINT Structure:
    is_print-print = 'N'.
    This will Supress the Dialog and create a Spool with no Immeadiate Output.
    Hope This Helps you..
    Thanks & Regards,
    Suresh Karri

  • Pages in ALV grid output and header on everypage

    Hi,
    My report output is displayed in a ALV grid. The output has around 100 records.
    Now , my requirement is to display the output in pages, say 25 records per page and I also want to have the header details for every page.
    How  can I do it?
    Thanks, Shivaa.....

    see following:
    alv grid page break
    ALV Page break?
    how to give a page break in alv grid display after 65 lines are displayed?

  • How to Convert internal table data into text output and send mail in ABAP

    Hi All,
    Good Morning.
    Taking a glance at a code that converts internal table data to an Excel file in ABAP. also checked how to send this excel to mailing list as attachment.
    But thought of doing it without excel.
    I mean, I have an internal table which contains fields of all types (character,integer,date,time). Since it is only around 4 to 5 rows in it (output),why to convert it to excel. not required!!.  Instead I  want to send this output to User's mails as Normal mail body with No attachments.
    Could anybody please suggest me a way as to how to send internal table data as a mail ( not as an excel or PDF etc).
    as of now my findings are, it is quite complex to convert internal table data to email (Text) format. but i believe if there is some way of doing it.
    Best Regards
    Dileep VT

    here's something I have used in the past where we send out information about failed precalculation settings (which are stored in internal table gt_fail)
    notice we use gt_text as "mail body"
    TRY.
    *     -------- create persistent send request ------------------------
           gv_send_request = cl_bcs=>create_persistent( ).
    *     -------- create and set document -------------------------------
    *     create text to be sent
           wa_line = text-001.
           APPEND wa_line TO gt_text.
           CLEAR wa_line.
           APPEND wa_line TO gt_text.
           LOOP AT gt_fail ASSIGNING <fs_fail>.
             MOVE <fs_fail>-retry_count TO gv_count.
             CONCATENATE text-002
                         <fs_fail>-setting_id
                         text-003
                         gv_count
                         INTO wa_line SEPARATED BY space.
             APPEND wa_line TO gt_text.
             CLEAR wa_line.
           ENDLOOP.
           APPEND wa_line TO gt_text.
           wa_line = text-007.
           APPEND wa_line TO gt_text.
    *     create actual document
           gv_document = cl_document_bcs=>create_document(
                           i_type    = 'RAW'
                           i_text    = gt_text
                           i_length  = '12'
                           i_subject = 'Failed Precalculation Settings!' ).
    *     add document to send request
           CALL METHOD gv_send_request->set_document( gv_document ).
    *     --------- set sender -------------------------------------------
           gv_sender = cl_sapuser_bcs=>create( sy-uname ).
           CALL METHOD gv_send_request->set_sender
             EXPORTING
               i_sender = gv_sender.
    *     --------- add recipient (e-mail address) -----------------------
           LOOP AT s_email INTO wa_email.
             MOVE wa_email-low TO gv_email.
             gv_recipient = cl_cam_address_bcs=>create_internet_address(
                                               gv_email ).
             CALL METHOD gv_send_request->add_recipient
               EXPORTING
                 i_recipient = gv_recipient
                 i_express   = 'X'.
           ENDLOOP.
    *     ---------- set to send immediately -----------------------------
           CALL METHOD gv_send_request->set_send_immediately( 'X' ).
    *     ---------- send document ---------------------------------------
           CALL METHOD gv_send_request->send(
             EXPORTING
               i_with_error_screen = 'X'
             RECEIVING
               result              = gv_sent_to_all ).
           IF gv_sent_to_all = 'X'.
             WRITE text-004.
           ENDIF.
           COMMIT WORK.
    *   exception handling
         CATCH cx_bcs INTO gv_bcs_exception.
           WRITE: text-005.
           WRITE: text-006, gv_bcs_exception->error_type.
           EXIT.
       ENDTRY.
    with the following declarations
    * TABLES                                                               *
    TABLES:
       adr6,
       rsr_prec_sett.
    * INTERNAL TABLES & WORK AREAS                                         *
    DATA:
       gt_fail          TYPE SORTED TABLE OF rsr_prec_sett
                             WITH UNIQUE KEY setting_id run_date,
       gt_text          TYPE bcsy_text,
       wa_fail          LIKE LINE OF gt_fail,
       wa_line(90)      TYPE c.
    FIELD-SYMBOLS:
       <fs_fail>        LIKE LINE OF gt_fail.
    * VARIABLES                                                            *
    DATA:
       gv_count(4)      TYPE n,
       gv_send_request  TYPE REF TO cl_bcs,
       gv_document      TYPE REF TO cl_document_bcs,
       gv_sender        TYPE REF TO cl_sapuser_bcs,
       gv_recipient     TYPE REF TO if_recipient_bcs,
       gv_email         TYPE adr6-smtp_addr,
       gv_bcs_exception TYPE REF TO cx_bcs,
       gv_sent_to_all   TYPE os_boolean.
    * SELECTION-SCREEN                                                     *
    SELECT-OPTIONS:
       s_email          FOR adr6-smtp_addr NO INTERVALS MODIF ID sel.
    DATA:
       wa_email         LIKE LINE OF s_email.

  • Total for a Numeric field in ALV Grid display

    Hi all,
    I am not getting the Total for a Numeric field in ALV Grid output. What might be the problem.
    Regards,
    Balavardhan.K

    Check this code for subtotals and totals..
    REPORT ZYFI_REPT007
           NO STANDARD PAGE HEADING
           LINE-SIZE 300
           LINE-COUNT 50
           MESSAGE-ID ZYFI.
    TABLES : COOI, " Commitments Management: Line Items
             LFA1,                         " Vendor master (general section)
             VBEP,
             RKPLN.
          TABLE TYPES AND INTERNAL TABLES                                *
    DATA : BEGIN OF TYP_COOI ,
           OBJNR LIKE COOI-OBJNR,
           SAKTO LIKE COOI-SAKTO,
           MEGBTR LIKE COOI-MEGBTR,
           MEINH LIKE COOI-MEINH,
           WKGBTR LIKE COOI-WKGBTR,
           REFBN LIKE COOI-REFBN,
           RFPOS LIKE COOI-RFPOS,
           SGTXT LIKE COOI-SGTXT,
           BUDAT LIKE COOI-BUDAT,
           LIFNR LIKE COOI-LIFNR,
           END OF TYP_COOI.
    DATA : BEGIN OF TYP_LFA1 ,
            LIFNR LIKE LFA1-LIFNR,
            NAME1 LIKE LFA1-NAME1,
           END OF TYP_LFA1.
    DATA : BEGIN OF IT_OUTTAB OCCURS 0,
             OBJNR LIKE COOI-OBJNR,
             SAKTO LIKE COOI-SAKTO,
             MEGBTR LIKE COOI-MEGBTR,
             MEINH LIKE COOI-MEINH,
             WKGBTR LIKE COOI-WKGBTR,
             REFBN LIKE COOI-REFBN,
             RFPOS LIKE COOI-RFPOS,
             SGTXT LIKE COOI-SGTXT,
             BUDAT LIKE COOI-BUDAT,
             LIFNR LIKE COOI-LIFNR,
             NAME1 LIKE LFA1-NAME1,
           END OF IT_OUTTAB.
    DATA : IT_COOI LIKE TYP_COOI OCCURS 0 WITH HEADER LINE,
           IT_LFA1 LIKE TYP_LFA1 OCCURS 0 WITH HEADER LINE.
    *-- ALV Declarations
    TYPE-POOLS SLIS.
    DATA: IT_EVENTS            TYPE SLIS_T_EVENT,
          GS_EVENT             TYPE SLIS_ALV_EVENT,
          wa_fldcat            type slis_fieldcat_alv.
    DATA: S_LAYOUT TYPE SLIS_LAYOUT_ALV,
          GT_PRINT TYPE SLIS_PRINT_ALV.
    DATA: IT_FLDCAT       TYPE SLIS_T_FIELDCAT_ALV.
    DATA: IT_SORT             TYPE SLIS_T_SORTINFO_ALV.
    DATA: V_REPID LIKE SY-REPID.
                        SELECTION SCREEN                                 *
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS : S_KOKRS FOR COOI-KOKRS NO-EXTENSION NO INTERVALS,
                                           " Controlling Area
                     S_BUKRS FOR COOI-BUKRS NO-EXTENSION NO INTERVALS,
                                           " Company code
                     S_GJAHR FOR COOI-GJAHR NO-EXTENSION NO INTERVALS,
                                           " Fiscal Year
                     S_OBJNR FOR RKPLN-AUFNR MATCHCODE OBJECT ORDE,
                                                            " Internal order
                     S_SAKTO FOR COOI-SAKTO MATCHCODE OBJECT KART,
                                                              " Cost Element
                     S_BUDAT FOR COOI-BUDAT, " Debit Date
                     S_LIFNR FOR COOI-LIFNR. " Vendor
    SELECTION-SCREEN END OF BLOCK B1.
           S T A R T   O F   S E L E C T I O N                           *
    START-OF-SELECTION.
    *-- Read data
      PERFORM GET_DATA.
           E N D   O F   S E L E C T I O N                               *
    END-OF-SELECTION.
    *-- Process the data and prepare the output data
      PERFORM CALCULATE_FINAL_INFO.
    *--Display Report output
      PERFORM DISPLAY_REPORT.
          FORM CALCULATE_FINAL_INFO                                     *
        Process the data and prepare final internal table               *
    FORM CALCULATE_FINAL_INFO.
      DATA : L_OBJNR LIKE COOI-OBJNR.
      SORT IT_LFA1 BY LIFNR.
      DELETE ADJACENT DUPLICATES FROM IT_LFA1 COMPARING LIFNR.
      LOOP AT IT_COOI.
        L_OBJNR = IT_COOI-OBJNR+2(20).
        SHIFT L_OBJNR LEFT DELETING LEADING '0'.
        IF L_OBJNR IN S_OBJNR.
          READ TABLE IT_LFA1 WITH KEY LIFNR  = IT_COOI-LIFNR.
          IF SY-SUBRC EQ 0.
            IT_OUTTAB-NAME1 = IT_LFA1-NAME1.
          ENDIF.
          MOVE-CORRESPONDING IT_COOI TO IT_OUTTAB.
          CLEAR IT_OUTTAB-OBJNR.
          IT_OUTTAB-OBJNR = L_OBJNR.
          APPEND IT_OUTTAB.
          CLEAR IT_OUTTAB.
          CLEAR IT_LFA1.
          CLEAR L_OBJNR.
        ENDIF.
      ENDLOOP.
    ENDFORM.
    *&      Form  GET_DATA
         Fetch the Data from the table COOI and LFA1
    FORM GET_DATA.
      SELECT OBJNR
            SAKTO
            MEGBTR
            MEINH
            WKGBTR
            REFBN
            RFPOS
            SGTXT
            BUDAT
            LIFNR
            FROM COOI
            INTO TABLE IT_COOI
            WHERE   BUDAT IN S_BUDAT
            AND LIFNR IN S_LIFNR
            AND KOKRS IN S_KOKRS
            AND BUKRS IN S_BUKRS
            AND GJAHR IN S_GJAHR
            AND SAKTO IN S_SAKTO.
      IF SY-SUBRC EQ 0 .
    Get the Vendor name from LFA1
        SELECT LIFNR
               NAME1
               FROM LFA1
               INTO TABLE IT_LFA1
               FOR ALL ENTRIES IN IT_COOI
               WHERE LIFNR EQ IT_COOI-LIFNR.
      ELSE.
        MESSAGE I999 WITH TEXT-013.
      ENDIF.
    ENDFORM.                               " GET_DATA
    *&      Form  DISPLAY_REPORT
           Display the output
    FORM DISPLAY_REPORT.
      PERFORM BUILD_CATALOG.
      PERFORM FRM_PREPARE_EVENT_LIST TABLES IT_EVENTS.
      IF NOT IT_OUTTAB[] IS INITIAL.
        CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
             EXPORTING
                  I_CALLBACK_PROGRAM      = V_REPID
                  I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
                  IT_FIELDCAT             = IT_FLDCAT
                  IT_SORT                 = IT_SORT
                  IT_EVENTS               = IT_EVENTS
             TABLES
                  T_OUTTAB                = IT_OUTTAB
             EXCEPTIONS
                  PROGRAM_ERROR           = 1
                  OTHERS                  = 2.
      ELSE.
        MESSAGE I999 WITH TEXT-013.
      ENDIF.
    ENDFORM.                               " DISPLAY_REPORT
    *&      Form  BUILD_CATALOG
          Build the Field catalog for the ALV Report
    FORM BUILD_CATALOG.
      DATA: V_INDEX LIKE SY-TABIX.
      V_REPID = SY-REPID.
      DATA: LS_SORT TYPE SLIS_SORTINFO_ALV.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
           EXPORTING
                I_PROGRAM_NAME         = V_REPID
                I_INTERNAL_TABNAME     = 'IT_OUTTAB'
                I_INCLNAME             = V_REPID
           CHANGING
                CT_FIELDCAT            = IT_FLDCAT
           EXCEPTIONS
                INCONSISTENT_INTERFACE = 1
                PROGRAM_ERROR          = 2
                OTHERS                 = 3.
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      READ TABLE IT_FLDCAT WITH KEY FIELDNAME = 'WKGBTR'
                             TABNAME = 'IT_OUTTAB' INTO WA_FLDCAT.
      IF SY-SUBRC  EQ 0.
        WA_FLDCAT-DO_SUM  = 'X'.
        MODIFY IT_FLDCAT FROM WA_FLDCAT INDEX SY-TABIX.
      ENDIF.
      READ TABLE IT_FLDCAT WITH KEY FIELDNAME = 'OBJNR'
                                TABNAME =  'IT_OUTTAB' INTO WA_FLDCAT.
      IF SY-SUBRC EQ 0.
         WA_FLDCAT-SELTEXT_L = 'Order'.
         WA_FLDCAT-COL_POS = 1.
         WA_FLDCAT-DDICTXT = 'L'.
        MODIFY IT_FLDCAT FROM WA_FLDCAT INDEX SY-TABIX.
      ENDIF.
      LS_SORT-FIELDNAME = 'OBJNR'.
      LS_SORT-SPOS      = 1.
      LS_SORT-UP        = 'X'.
      LS_SORT-SUBTOT    = 'X'.
      APPEND LS_SORT TO IT_SORT.
    ENDFORM.                               " BUILD_CATALOG
    *&      Form  FRM_PREPARE_EVENT_LIST
          Build the Events
    FORM FRM_PREPARE_EVENT_LIST TABLES IT_EVENTS TYPE SLIS_T_EVENT.
      CLEAR GS_EVENT.
      GS_EVENT-NAME = SLIS_EV_TOP_OF_PAGE.
      GS_EVENT-FORM = 'TOP_OF_PAGE_REPORT'.
      APPEND GS_EVENT TO IT_EVENTS.
    ENDFORM.                               " FRM_PREPARE_EVENT_LIST
         TOP OF PAGE
    FORM TOP_OF_PAGE_REPORT.
      CALL FUNCTION 'Z_YREPORT_HEADER'
           EXPORTING
                DL_TITLE = SY-TITLE
                DL_REPID = SY-CPROG
                DL_LINSZ = SY-LINSZ
           EXCEPTIONS
                OTHERS   = 1.
    ENDFORM.                               " FRM_TOP_OF_PAGE_REPORT
    *&      Form  USER_COMMAND
      Drill Down Functionality to Call the Transaction ME23
    FORM USER_COMMAND USING    P_UCOMM    LIKE SY-UCOMM
                               P_SELFIELD TYPE SLIS_SELFIELD.
      DATA : L_INDEX LIKE SY-INDEX,
             L_REFBN LIKE COOI-REFBN.
      L_INDEX = P_SELFIELD-TABINDEX.       " holds the selected table index
      CLEAR L_REFBN.
      CASE P_UCOMM.
    *-- On Double Click
        WHEN '&IC1'.
          CLEAR L_REFBN.
    *-- Read the Current Line
          READ TABLE IT_OUTTAB INDEX L_INDEX.
          IF SY-SUBRC EQ 0.
            L_REFBN = IT_OUTTAB-REFBN.
            IF NOT L_REFBN IS INITIAL.
    *-- Set the BES Paramater Id to the Current line Purchase Order Number
              SET PARAMETER ID 'BES' FIELD L_REFBN.
    *-- Call the Transaction Purchase Order Display with the above PO Number
              CALL TRANSACTION 'ME23' AND SKIP FIRST SCREEN.
            ENDIF.
          ELSE.
            MESSAGE E999 WITH TEXT-014.
          ENDIF.
      ENDCASE.
    ENDFORM.                               " USER_COMMAND

  • How to download alv grid output(with field catalog) into excel file format

    Hi all,
    How to download alv grid output(with field catalogs) into excel file format and same file has to download to application server.
    Please help.
    Regards,
    Satya.

    Hi,
    On list where alv is displayed, select export icon( green color -> ),select spread sheet.
    This will display records in Excel sheet.

  • Disable editable field in ALV grid using OOPS

    I have following requirements,
    Displaying ALV grid output with most of the fields editable.
    Validations on data entered for each fields,for error messages
    Query :
    I want to make all the fields except the field in ERROR in display only mode
    similar to case when we do validation of fields in table controls.

    HI
    check the below links lot of info and examples r there for OOPS
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.geocities.com/victorav15/sapr3/abap_ood.html
    http://www.brabandt.de/html/abap_oo.html
    Check this cool weblog:
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://www.allsaplinks.com/
    http://www.sap-img.com/
    http://www.sapgenie.com/
    http://help.sap.com
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.sapgenie.com/abap/controls/index.htm
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    these links
    http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
    For funtion module to class
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm
    for classes
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
    for methods
    http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
    for inheritance
    http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
    for interfaces
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
    For Materials:
    1) http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf -- Page no: 1291
    2) http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    3) http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    4) http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    5) http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
    6) http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
    7) http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
    8) http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
    1) http://www.erpgenie.com/sap/abap/OO/index.htm
    2) http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    Check these sample code
    data : begin of it_mara occurs 0,
    mark type flag,
    matnr type matnr,
    mtart type mtart,
    meins type meins,
    end of it_mara.
    data : begin of it_mara1 occurs 0,
    mark type flag,
    matnr type matnr,
    mtart type mtart,
    meins type meins,
    end of it_mara1.
    data : begin of it_mara2 occurs 0,
    mark type flag,
    matnr type matnr,
    mtart type mtart,
    meins type meins,
    end of it_mara2.
    data : t_fieldcat type lvc_t_fcat,
    t_fieldcat1 type lvc_t_fcat,
    s_fieldcat like line of t_fieldcat.
    data : s_layout type lvc_s_layo.
    data : control type ref to cl_gui_custom_container,
    grid type ref to cl_gui_alv_grid.
    data: begin of wa ,
    mark type flag,
    matnr type matnr,
    mtart type mtart,
    meins type meins,
    end of wa.
    class lcl_events_box definition.
    public section.
    methods :
    *Handler_Data_Changed for event Data_Changed of cl_gui_alv_grid
    *imporTing er_data_changed,
    Handler_User_Command for event User_Command of cl_gui_alv_grid
    imporTing e_ucomm,
    Handler_ToolBar for event ToolBar of cl_gui_alv_grid
    importing E_object E_interactive.
    endclass.
    class lcl_events_box implementation.
    method Handler_user_command.
    PERFORM FORM_USERCOMMAND CHANGING E_UCOMM.
    endmethod.
    method Handler_ToolBar.
    PERFORM FORM_TOOLBAR CHANGING E_OBJECT E_INTERACTIVE
    E_OBJECT->MT_TOOLBAR.
    endmethod.
    ENDCLASS.
    start-of-selection.
    data : w_events type ref to lcl_events_box.
    select matnr mtart meins from mara into corresponding fields of table
    it_mara.
    call screen 100.
    *& Module pbo_module OUTPUT
    text
    MODULE pbo_module OUTPUT.
    if GRID is initial.
    CREATE OBJECT CONTROL
    EXPORTING
    CONTAINER_NAME = 'CUST_CTRL'.
    CREATE OBJECT GRID
    EXPORTING
    I_PARENT = CONTROL.
    PERFORM BUILD_CATALOG.
    PERFORM BUILD_CATALOG1.
    PERFORM BUILD_LAYOUT.
    CALL METHOD GRID->SET_TABLE_FOR_FIRST_DISPLAY
    EXPORTING
    IS_LAYOUT = s_layout
    CHANGING
    IT_OUTTAB = it_mara[]
    IT_FIELDCATALOG = t_fieldcat.
    CREATE OBJECT W_EVENTS.
    SET HANDLER : W_EVENTS->HANDLER_TOOLBAR FOR GRID,
    W_EVENTS->HANDLER_USER_COMMAND FOR GRID.
    CALL METHOD GRID->SET_TOOLBAR_INTERACTIVE.
    ELSE.
    call method grid->refresh_table_display.
    ENDIF.
    ENDMODULE. " pbo_module OUTPUT
    *& Form BUILD_CATALOG
    FORM BUILD_CATALOG .
    S_FIELDCAT-COL_POS = '1'.
    S_FIELDCAT-FIELDNAME = 'MARK'.
    S_FIELDCAT-CHECKBOX = 'X'.
    S_FIELDCAT-eDIT = 'X'.
    APPEND S_FIELDCAT TO T_FIELDCAT.
    CLEAR S_FIELDCAT.
    S_FIELDCAT-COL_POS = '2'.
    S_FIELDCAT-FIELDNAME = 'MATNR'.
    S_FIELDCAT-SCRTEXT_M = 'MATERIAL'.
    APPEND S_FIELDCAT TO T_FIELDCAT.
    S_FIELDCAT-COL_POS = '3'.
    S_FIELDCAT-FIELDNAME = 'MTART'.
    S_FIELDCAT-SCRTEXT_M = 'MATERL TYPE'.
    APPEND S_FIELDCAT TO T_FIELDCAT.
    S_FIELDCAT-COL_POS = '4'.
    S_FIELDCAT-FIELDNAME = 'MEINS'.
    S_FIELDCAT-SCRTEXT_M = 'UOM'.
    APPEND S_FIELDCAT TO T_FIELDCAT.
    ENDFORM. " BUILD_CATALOG
    *& Form BUILD_LAYOUT
    text
    --> p1 text
    <-- p2 text
    FORM BUILD_LAYOUT .
    S_LAYOUT-ZEBRA = 'X'.
    S_LAYOUT-CWIDTH_OPT = 'X'.
    S_LAYOUT-GRID_TITLE = 'Material Details'.
    ENDFORM.
    " BUILD_LAYOUT////////////////////////////////////
    " USER_COMMAND_0100 INPUT
    *& Form FORM_USERCOMMAND
    text
    <--P_E_UCOMM text
    form FORM_USERCOMMAND changing p_e_ucomm.
    CASE P_E_UCOMM.
    WHEN 'INT1'.
    DO.
    READ TABLE IT_MARA INDEX SY-INDEX TRANSPORTING MARK MATNR.
    IF SY-SUBRC <> 0.
    EXIT.
    ENDIF.
    IF IT_MARA-MARK = 'X'.
    read table it_mara into wa TRANSPORTING MATNR MTART MEINS .
    MOVE-CORRESPONDING WA TO IT_MARA1.
    READ TABLE IT_MARA1 TRANSPORTING MATNR MTART MEINS .
    MOVE-CORRESPONDING IT_MARA1 TO IT_MARA2.
    APPEND IT_MARA2.
    CALL METHOD GRID->SET_TABLE_FOR_FIRST_DISPLAY
    EXPORTING
    IS_LAYOUT = s_layout
    CHANGING
    IT_OUTTAB = it_mara2[]
    IT_FIELDCATALOG = t_fieldcat1.
    SET PARAMETER ID 'MAT' FIELD IT_MARA-MATNR.
    CALL TRANSACTION 'MM02'.
    . ENDIF.
    ENDIF.
    ENDDO.
    ENDCASE.
    endform. " FORM_USERCOMMAND
    *& Form FORM_TOOLBAR
    text
    <--P_E_OBJECT text
    <--P_E_INTERACTIVE text
    <--P_E_OBJECT_>MT_TOOLBAR text
    FORM FORM_TOOLBAR CHANGING P_E_OBJECT TYPE REF TO
    CL_ALV_EVENT_TOOLBAR_SET
    P_E_INTERACTIVE
    MT_TOOLBAR TYPE TTB_BUTTON.
    DATA WAL_BUTTON TYPE STB_BUTTON.
    *WAL_BUTTON-ICON = ICON_status_reverse.
    WAL_BUTTON-TEXT = 'GO'.
    WAL_BUTTON-QUICKINFO = 'PROCEED'.
    waL_button-FUNCTION = 'INT1'.
    WAL_BUTTON-BUTN_TYPE = 0.
    WAL_BUTTON-DISABLED = SPACE.
    insert WAL_BUTTON INTO P_E_OBJECT->MT_TOOLBAR index 1.
    endform. " FORM_TOOLBAR
    *& Module PF-STATUS OUTPUT
    text
    module PF-STATUS output.
    set pf-status 'Z7PSTAT'.
    endmodule. " PF-STATUS OUTPUT
    *& Module USER_COMMAND_0100 INPUT
    text
    module USER_COMMAND_0100 input.
    CASE SY-UCOMM.
    WHEN 'BACK'.
    LEAVE PROGRAM.
    WHEN 'CANCEL'.
    LEAVE PROGRAM.
    ENDCASE.
    endmodule. " USER_COMMAND_0100 INPUT
    *& Form BUILD_CATALOG1
    text
    --> p1 text
    <-- p2 text
    form BUILD_CATALOG1 .
    S_FIELDCAT-COL_POS = '1'.
    S_FIELDCAT-FIELDNAME = 'MATNR'.
    S_FIELDCAT-SCRTEXT_M = 'MATERIAL'.
    APPEND S_FIELDCAT TO T_FIELDCAT1.
    S_FIELDCAT-COL_POS = '2'.
    S_FIELDCAT-FIELDNAME = 'MTART'.
    S_FIELDCAT-SCRTEXT_M = 'MATERL TYPE'.
    APPEND S_FIELDCAT TO T_FIELDCAT1.
    S_FIELDCAT-COL_POS = '3'.
    S_FIELDCAT-FIELDNAME = 'MEINS'.
    S_FIELDCAT-SCRTEXT_M = 'UOM'.
    APPEND S_FIELDCAT TO T_FIELDCAT1.
    endform. " BUILD_CATALOG1
    check the below link may be useful for you
    http://www.sapdevelopment.co.uk/reporting/alvhome.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf
    Simple ALV report
    http://www.sapgenie.com/abap/controls/alvgrid.htm
    http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
    ALV
    1. Please give me general info on ALV.
    http://www.sapfans.com/forums/viewtopic.php?t=58286
    http://www.sapfans.com/forums/viewtopic.php?t=76490
    http://www.sapfans.com/forums/viewtopic.php?t=20591
    http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
    2. How do I program double click in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=11601
    http://www.sapfans.com/forums/viewtopic.php?t=23010
    3. How do I add subtotals (I have problem to add them)...
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    4. How to add list heading like top-of-page in ABAP lists?
    http://www.sapfans.com/forums/viewtopic.php?t=58775
    http://www.sapfans.com/forums/viewtopic.php?t=60550
    http://www.sapfans.com/forums/viewtopic.php?t=16629
    5. How to print page number / total number of pages X/XX in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
    6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
    http://www.sapfans.com/forums/viewtopic.php?t=64320
    http://www.sapfans.com/forums/viewtopic.php?t=44477
    7. How can I set the cell color in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=52107
    8. How do I print a logo/graphics in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=81149
    http://www.sapfans.com/forums/viewtopic.php?t=35498
    http://www.sapfans.com/forums/viewtopic.php?t=5013
    9. How do I create and use input-enabled fields in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=84933
    http://www.sapfans.com/forums/viewtopic.php?t=69878
    10. How can I use ALV for reports that are going to be run in background?
    http://www.sapfans.com/forums/viewtopic.php?t=83243
    http://www.sapfans.com/forums/viewtopic.php?t=19224
    11. How can I display an icon in ALV? (Common requirement is traffic light icon).
    http://www.sapfans.com/forums/viewtopic.php?t=79424
    http://www.sapfans.com/forums/viewtopic.php?t=24512
    12. How can I display a checkbox in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=88376
    http://www.sapfans.com/forums/viewtopic.php?t=40968
    http://www.sapfans.com/forums/viewtopic.php?t=6919
    Go thru these programs they may help u to try on some hands on
    ALV Demo program
    BCALV_DEMO_HTML
    BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
    BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
    BCALV_GRID_DEMO Simple ALV Control Call Demo Program
    BCALV_TREE_DEMO Demo for ALV tree control
    BCALV_TREE_SIMPLE_DEMO
    BC_ALV_DEMO_HTML_D0100
    <b>Reward all helpfull answers</b>
    Regards

  • Add List box for one field in ALV GRID

    Hi All,
      I need to add drop down list box for one field in ALV Grid.
      If any body knows, please help.
    Thanks in advance.
    Regards
    Manglesh

    Hi,
    Here is the ex where i have used for date parameter in the sel screen
    type-pools: vrm.
    data: name type vrm_id,
          list type vrm_values,
          value like line of list.
    parameters :    p_date like p_date2
                                  as listbox visible length 15.
    at selection-screen output.
      name = 'P_DATE'.
      value-key = '1'.
      value-text = 'Today'.
      append value to list.
      value-key = '2'.
      value-text = 'Last 7 days'.
      append value to list.
      value-key = '3'.
      value-text = 'Last 30 days'.
      append value to list.
      value-key = '4'.
      value-text = 'Last 90 days'.
      append value to list.
      value-key = '5'.
      value-text = 'Last year'.
      append value to list.
    Call the ''VRM_SET_VALUES' to display the values in Listbox
      call function 'VRM_SET_VALUES'
        exporting
          id     = name
          values = list.
    at selection-screen.
      if sy-ucomm = 'CLI1'.
        sscrfields-ucomm = 'ONLI'(001).
      endif.
      if p_date = '1'.
        p_date11 =  sy-datum .
      elseif p_date = '2'.
        p_date11 = ( sy-datum - 7 ).
      elseif p_date = '3'.
        p_date11 = ( sy-datum - 30 ).
      elseif p_date = '4'.
        p_date11 = ( sy-datum - 90 ).
      elseif p_date = '5'.
        p_date11 = ( sy-datum - 365 ).
      endif.
    Hope this helps u..
    Please reward points if useful.
    Regards,
    Sreenivas

  • Leading Zeros Missing - When exporting data from ALV grid display to Excel

    Hi,
    Am exporting the data from ALV GRID DISPLAY to Excel sheet using standard toolbar icon 'Local file'
    the leading zeros displayed in the ALV output is missing in the EXCEL sheet.
    (eg)  in ALV o/p - 0029. 
            in Excel - Only 29 is appearing.
    As per the requiement i have to show the leading zeros in excel also.
    Pls help on this issue.
    Thanks in advance..

    Hi ,
      Please set the property  :
      wa_fieldcat-lzero = 'X' .
    when you are creating field catalog for display alv data .
    your prob will solved .
    Regards ,
    Nilesh Jain

  • Export TO XXL from ALV Grid - Column order mismatch

    Hi All,
    The user is trying to download data from Option -> Export -> Spreadsheet which will create XXL.
    But while downloading there is mismatch in the order of columns displayed on the alv grid & columns downloaded.
    All character fields are displayed on left, then date fields then quantity fields are downloaded to XXL. but in ALV Grid user has chosen a layout in which date fields come first.
    Please help me to find solution

    Grid display using    'REUSE_ALV_GRID_DISPLAY'. From the alv grid output, user is trying to download data using export -> Excel . so for download there is no custom code.
    We have copied standard report and added few more fields to the custom report. strangely Standard report also has this issue.
    I searched for SAP notes also..no clue

  • I need to print logo in alv grid

    I need to print logo in alv grid .As of now its getting displayed but it cannot be printed .Kindly tell me wether there is any option to print it .Eitjer using ALV or Object oriented ALV.Please reply soon

    Hi Deepti,
    Refer the code below.
    report  sy-repid.
    type-pools : slis.
    *ALV Formatting tables /structures
    data: gt_fieldcat type slis_t_fieldcat_alv.
    data: gt_events type slis_t_event.
    data: gs_layout type slis_layout_alv.
    data: gt_page   type slis_t_listheader.
    data: gs_page type slis_listheader.
    data: v_repid like sy-repid.
    *ALV Formatting work area
    data: w_fieldcat type slis_fieldcat_alv.
    data: w_events type slis_alv_event.
    data: gt_bsid type table of bsid with header line.
    initialization.
      perform build_events.
      perform build_page_header.
    start-of-selection.
    *perform build_comment.     "top_of_page - in initialization at present
      select * from bsid into table gt_bsid up to 10 rows.
    *perform populate_for_fm using '1' '3' 'BUKRS' '8' 'GT_BSID' 'Whee'.
    *USING = Row, Column, Field name, display length, table name, heading
    *OR
      perform build_fieldcat.
      gs_layout-zebra = 'X'.
    *top of page event does not work without I_callback_program
      v_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_callback_program                = v_repid
          i_structure_name                  = 'BSID'
       i_background_id                   = 'ALV_BACKGROUND'
          i_grid_title                      = 'This is the grid title'
      I_GRID_SETTINGS                   =
          is_layout                         = gs_layout
          it_fieldcat                       = gt_fieldcat[]
          it_events                         = gt_events[]
        tables
          t_outtab                          = gt_bsid.
    Form..............:  populate_for_fm
    Description.......:  Populates fields for function module used in ALV
    form populate_for_fm using    p_row
                                        p_col
                                        p_fieldname
                                        p_len
                                        p_table
                                        p_desc.
      w_fieldcat-row_pos = p_row.          "Row Position
      w_fieldcat-col_pos = p_col.          "Column Position
      w_fieldcat-fieldname = p_fieldname.  "Field name
      w_fieldcat-outputlen = p_len.        "Column Lenth
      w_fieldcat-tabname = p_table.        "Table name
      w_fieldcat-reptext_ddic = p_desc.    "Field Description
      w_fieldcat-input = '1'.
      append w_fieldcat to gt_fieldcat.
      clear w_fieldcat.
    endform.                    " populate_for_fm
    *&      Form  build_events
    form build_events.
      data: ls_event type slis_alv_event.
      call function 'REUSE_ALV_EVENTS_GET'
           exporting
                i_list_type = 0
           importing
                et_events   = gt_events.
      read table gt_events with key name =  slis_ev_user_command
                               into ls_event.
      if sy-subrc = 0.
        move slis_ev_user_command to ls_event-form.
        append ls_event to gt_events.
      endif.
      read table gt_events with key name =  slis_ev_top_of_page
                               into ls_event.
      if sy-subrc = 0.
        move slis_ev_top_of_page to ls_event-form.
        append ls_event to gt_events.
      endif.
    endform.                    " build_events
    *&      Form  USER_COMMAND
    When user command is called it uses 2 parameters. The itab
    passed to the ALV is in whatever order it currently is on screen.
    Therefore, you can read table itab index rs_selfield-tabindex to get
    all data from the table. You can also check r_ucomm and code
    accordingly.
    form user_command using  r_ucomm      like sy-ucomm
                             rs_selfield type slis_selfield.
      read table gt_bsid index rs_selfield-tabindex.
    error checking etc.
      set parameter id 'KUN' field gt_bsid-kunnr.
      call transaction 'XD03' and skip first screen.
    endform.
    *&      Form  top_of_page
    Your own company logo can go here if it has been saved (OAOR)
    If the logo is larger than the size of the headings in gt_page,
    the window will not show full logo and will have a scroll bar. Thus,
    it is a good idea to have a standard ALV header if you are going to
    use logos in your top of page.
    form top_of_page.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
           exporting
                it_list_commentary = gt_page
                i_logo             = 'ENJOYSAP_LOGO'.
    endform.
    *&      Form  build_fieldcat
    *Many and varied fields are available here. Have a look at documentation
    *for FM REUSE_ALV_LIST_DISPLAY and REUSE_ALV_FIELDCATALOG_MERGE
    form build_fieldcat.
      w_fieldcat-fieldname = 'BUDAT'.
      w_fieldcat-seltext_m = 'Dte pst'.
      w_fieldcat-ddictxt(1) = 'M'.
    Can change the position of fields if you do not want them in order
    of the DDIC or itab
    w_fieldcat-row_pos = '1'.
    w_fieldcat-col_pos = '10'.
      append w_fieldcat to gt_fieldcat.
      clear w_fieldcat.
    endform.                    " build_fieldcat
    *&      Form  build_page_header
          gt_page is used in top of page (ALV subroutine - NOT event)
          *H = Header, S = Selection, A = Action
    form build_page_header.
    For Headers, Key is not printed and is irrelevant. Will not cause
    a syntax error, but is not used.
      gs_page-typ = 'H'.
      gs_page-info = 'Header 1'.
      append gs_page to gt_page.
      gs_page-typ = 'H'.
      gs_page-info = 'Header 2'.
      append gs_page to gt_page.
    For Selections, the Key is printed (bold). It can be anything up to 20
    bytes. It gets printed in order of code here, not by key value.
      gs_page-typ = 'S'.
      gs_page-key = 'And the winner is:'.
      gs_page-info = 'Selection 1'.
      append gs_page to gt_page.
      gs_page-typ = 'S'.
      gs_page-key = 'Runner up:'.
      gs_page-info = 'Selection 2'.
      append gs_page to gt_page.
    For Action, Key is also irrelevant.
      gs_page-typ = 'A'.
      gs_page-info = 'Action goes here'.
      append gs_page to gt_page.
    endform.                    " build_page_header
    Settings for the Logo :
    01) GOTO - OAOR (Business Document Navigator)
    02) Give Class Name - PICTURES
    Class Type - OT
    Object type - whatever you want to call your area EG: OURCOMP.... then Execute
    03) Top left will say PICTURES. Bottom left will have multi tab. Select Create and double-click on Screen.
    04) Select your image from the appropriate directory.
    05) Give the image an appropriate name (not Screen)
    06) It will tell you document stored successfully.
    07) You can now find your logo under the heading OURCOMP in top left window.
    08) You can reference the logo in things like FM REUSE_ALV_COMMENTARY_WRITE or any other area which may reference these things. EG: I_LOGO = 'OURCOMP'. You can preview image by double-clicking it.
    <b>Please reward points if it helps.</b>
    Regards,
    Amit Mishra
    Message was edited by: Amit Mishra

  • Push Button in Every record in ALV grid output

    Dear Experts,
    I need to print a push button in first column of every record in ALV grid output. How ?
    No OOPS concepts please.
    Thanks,
    Siva.

    For this requirement, you have to copy the standard PF status of the ALV output. Do as below :-
    1) Go to SE41
    2) Enter the program name as SAPLKKBL
    3) In the field status enter STANDARD_FULLSCREEN
    4) Click on STATUS button on the application toolbar.
    5) Enter the name of your Program & a new status name.
    6) Click on COPY.
    This way the standard status will be copied to the custom status & call the same status in your program using SET PF STATUS statement. Then double click on the custom status name & you will be navigated to SE41, there you can add you new button on the application tool bar & assign a function code, which you can program by enabling the export parameter I_CALLBACK_USER_COMMAND of the Function module REUSE_ALV_GRID_DISPLAY.
    Just a sample code snippet for your reference :-
    FORM USER_COMMAND USING L_UCOMM LIKE SY-UCOMM
    LS_SELFIELD TYPE SLIS_SELFIELD.
    CASE L_UCOMM.
    WHEN 'your function code goes here'.
    Do further processing.
    This way you will have the standard PF status alongwith your button as well.
    Edited by: Kumar Manas Mishra on Jan 29, 2010 1:03 PM

  • Menu in ALV grid output

    Hi all,
    Iam in need of a code that may help me out to get my cuztomized menu for my alv grid output.
    Please give your suggestions,
    Thanks,
    Rajesh.

    Hello Rajesh,
    First copy the standard ALV GUI Status STANDARD_FULLSCREEN to an ZSTANDARD_FULLSCREEN and make ur changes.
    FOr this u have
    DATA:g_callback_user_command TYPE slis_formname,
    g_callback_pf_status_set TYPE slis_formname.
    g_callback_pf_status_set = 'ZSTANDARD_FULLSCREEN'.
    g_callback_user_command = 'ALV_USER_COMMAND'.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
           I_INTERFACE_CHECK              = ' '
           I_BYPASSING_BUFFER             =
           I_BUFFER_ACTIVE                = ' '
         i_callback_program             = g_progname
         i_callback_pf_status_set       =
    g_callback_pf_status_set
    i_callback_user_command = g_callback_user_command       I_STRUCTURE_NAME               =
         is_layout                      = g_r_layout
         it_fieldcat                    = g_t_fieldcat
           IT_EXCLUDING                   =
           IT_SPECIAL_GROUPS              =
           IT_SORT                        =
           IT_FILTER                      =
           IS_SEL_HIDE                    =
           I_DEFAULT                      = 'X'
            i_save                         = 'A'
           IS_VARIANT                     =
           IT_EVENTS                      =
           IT_EVENT_EXIT                  =
         is_print                       = g_r_print
           IS_REPREP_ID                   =
            i_screen_start_column          = g_screen_start_column
            i_screen_start_line            = g_screen_start_line
            i_screen_end_column            = g_screen_end_column
            i_screen_end_line              = g_screen_end_line
         IMPORTING
           E_EXIT_CAUSED_BY_CALLER        =
           ES_EXIT_CAUSED_BY_USER         =
        TABLES
          t_outtab                       = p_t_liste
       EXCEPTIONS
         program_error                  = 1
         OTHERS                         = 2
    FORM alv_user_command USING r_ucomm     LIKE sy-ucomm
                                rs_selfield TYPE slis_selfield.
      CASE r_ucomm.
        WHEN '&IC1'.
    *--- Hotspot selektion
          CASE rs_selfield-sel_tab_field.
    *------ Material
            WHEN 'T_MAT-MATNR'.
              READ TABLE t_mat INDEX rs_selfield-tabindex.
              PERFORM call_mm02 USING t_mat-matnr.
            WHEN 'G_T_LISTE-PSPID' OR 'G_T_HEADER-PSPID'.
    *------ Projekt
    Click auf Projekt -> Projekt anzeigen (CJ20)
              SET PARAMETER ID 'PSP' FIELD rs_selfield-value.
              SET PARAMETER ID 'PRO' FIELD space.
              CALL TRANSACTION 'CJ20' AND SKIP FIRST SCREEN.
            WHEN 'G_T_LISTE-POSID'.
    *------ PSP-Element
    Click auf PSP Element -> PSP Element anzeigen (CJ12)
              SET PARAMETER ID 'PSP' FIELD space.
              SET PARAMETER ID 'PRO' FIELD rs_selfield-value.
              CALL TRANSACTION 'CJ12' AND SKIP FIRST SCREEN.
            WHEN 'G_T_LISTE-STTXT_INT'.
    *------ Systemstatus
             g_sttxt_int = rs_selfield-value.
    G_T_LEGENDE erfüllen
             PERFORM f_fill_g_t_legende_int.
             g_r_layout-window_titlebar = 'Systemstatus'(004).
             PERFORM f_status_legende_popup.
            WHEN 'G_T_LISTE-STTXT_EXT'.
    *------ Anwenderstatus
             g_sttxt_ext = rs_selfield-value.
    G_T_LEGENDE erfüllen
             PERFORM f_fill_g_t_legende_ext.
             g_r_layout-window_titlebar = 'Anwenderstatus'(005).
             PERFORM f_status_legende_popup.
            WHEN 'G_T_LISTE-ICON'.
    *------ Status Detail
             PERFORM f_fill_g_t_status_detail USING rs_selfield-tabindex.
             PERFORM f_status_detail_popup.
          ENDCASE.
        WHEN 'MTNR'.
          READ TABLE t_mat INDEX rs_selfield-tabindex.
          PERFORM call_mm02 USING t_mat-matnr.
        WHEN 'INFO'.
          READ TABLE t_mat INDEX rs_selfield-tabindex.
          CALL SCREEN 900 STARTING AT 20 5
                          ENDING AT 100 20.
      ENDCASE.
    ENDFORM. "ALV_USER_COMMAND
    Hope this will solve ur problem.
    Reward if helps.
    Vasanth
    Message was edited by: Vasanth M

  • Sub fields under main field in ALV GRID

    Hi folks,
    In my ALV, i need to display a field called Days. this field is again sub divided into 4 different fields as diffeerent interval levels(1 to 7, 7 to 50,etc). Depend on the number of days, it should fall in that particular bucket. I need to display these these sub fields under the Mian fiedld 'Days' in the ALV GRID output.Could any body suggest me how to do this. Can we divide the main field into different sub fields in ALV? if so how can it possible ?
    Thanks,
    Ram.

    In the final internal table collect the data for different ranges.Take 4 separate fields.Move the to the data corresponding fields.Display it normally in ALV.

Maybe you are looking for

  • Select query differences between oracle 9 and oracle 8.

    Hi, I have a problem using the select query between oracle 7 and oracle 9i I don't have the same result : ex: With oracle7 SQL> select 'champ1','champ2' from DUAL; 'CHAMP 'CHAMP champ1 champ2 With Oracle 9 SQL> select 'champ1','champ2' from DUAL; 'CH

  • S_ALR_87012993 Line items displaying problem

    Hi everyone, launching the report S_ALR_87012993 - Orders: Actual/Plan/Variance from period 4 to period 4 2007 I find a trouble on displaying line items of the order: the balance of internal order is corrected, in fact it's the balance of April, but

  • Where does the commission come from in the iTunes affiliates program?

    The developer's cut? Or Apple's cut? I am interested in this affiliates program...but curious as to where the commission stems from.  Logically, I would think Apple.  Most the time when I try to think logically about Apple, I'm wrong.

  • Patch XSS components confusion

    in SAP Note 761266, it says " You can only use this procedure if you have not made any modifications to the JAVA source code." does this mean that if you deploy portal programs, you can not apply patch for XSS component? Br, Chrina

  • Mail not checking for new messages in IMAP subfolders

    Hello everyone, I am disappointed to see that Mail version 3.0 (912.1/912) displays the same wrong behavior as pre-Leopard versions in the way that it fails to check for new messages in subfolders on an IMAP account (it only checks the INBOX). One ha