In ALV Report Filter selection should be case sensitive

Dear All,
since one field is case sensitive in database table , i have to fetch that in alv report , but when i am applying  filter on that field its is simply fetching data with case description.  if its in caps it should fetch caps data but in   smaal case report showing no data
Regards,
Pankaj Vashista

Hi,
All text datas are case sensitive.
To make it work perfectly You have to Use the Keyword translate to Upper Case than display
Now filter can work.
Without Transalation to Upper Case filter will not work.
Regards
Arbind

Similar Messages

  • Run alv report without selection screen in background

    Hello Every body,
    i programmed a ALV Report without selection screen, and i want to create a job for this alv report.
    Any help?
    Thank u.
    Ouail.

    Hi Steve,
    Can you tell me where i have to put your code?
    this is my abap code:
    START-OF-SELECTION.
       p_filref = '\\SAPSERVER\f\SAFT\ivat\FI_Extract_1000_20140709_102346_910.XML'.
       PERFORM copy_from_xml_to_itab TABLES it_ref_file
                                     ref_xml_data
                                     USING p_filref.
    **Begin Extraction File
       SUBMIT ZZ_FI_IVAT_EXTRACTOR
       WITH p_bukrs EQ '1000'
       WITH p_gjahr EQ '1998'
       WITH filepath EQ '\\SAPSERVER\f\SAFT\iVAT_Extractie\'
       WITH cldata eq space
       AND RETURN.
       DATA: FILE_TABLE  TYPE TABLE OF SDOKPATH,
       DIR_TABLE  TYPE TABLE OF SDOKPATH.
       CALL FUNCTION 'TMP_GUI_DIRECTORY_LIST_FILES'
         EXPORTING
           DIRECTORY  = '\\SAPSERVER\f\SAFT\iVAT_Extractie\'
           FILTER     = '*.*'
         TABLES
           FILE_TABLE = FILE_TABLE
           DIR_TABLE  = DIR_TABLE
         EXCEPTIONS
           CNTL_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.
       "get file name
       LOOP AT FILE_TABLE INTO p_filref.
       ENDLOOP.
       CONCATENATE '\\SAPSERVER\f\SAFT\iVAT_Extractie\' p_filref INTO path.
       PERFORM copy_from_xml_to_itab TABLES t_ext_file
                                     ext_xml_data
                                     USING path.
       PERFORM fill_xml_tab_in .
       perform build_fieldcatalog.
       PERFORM compare_data_ref_ext.
       PERFORM send_email.
       perform display_alv_report.
       PERFORM delete_extraction_file.
    in the perform copy_from_xml_to_itab TABLES it_ref_file......, i use this code:
       CREATE OBJECT gcl_xml.
    *Upload XML File
       CALL METHOD gcl_xml->import_from_file
         EXPORTING
           filename = p_filref
         RECEIVING
           retcode  = gv_subrc.
       IF gv_subrc = 0.
         CALL METHOD gcl_xml->render_2_xstring
           IMPORTING
             retcode = gv_subrc
             stream  = gv_xml_string
             size    = gv_size.
         IF gv_subrc = 0.
           REFRESH gt_xml_data[].
    * Convert XML to internal table
           CALL FUNCTION 'SMUM_XML_PARSE'
             EXPORTING
               xml_input = gv_xml_string
             TABLES
               xml_table = gt_xml_data
               return    = gt_return.
         ENDIF.
       ENDIF.

  • Web reporting - variable selection should be display as key and description

    hi experts,
    Can anybody tell me the solution for my issue. My isssue is , in the web reporting, i have variable company code, i am selecting the company code thru search help. the values for company code is displaying with key. 
    the new requirement should be displayed with key and description.
    I have checked in the bex, the properties  of company code has maintained as key. when i run the report when cas selet as key and descritption. bex is not a probelm.
    only the problew with webreports,  can anybody give some inptus on my issue.
    Any help is appreciated. waiting for your response.
    thanks
    surendra sheety

    For future reference, this question was finally answered correctly recently in the following thread: 
    F4 help - Search values - I need key and text
    Hope this helps someone who is as confused about this as I have been the past few days!
    Bob

  • ALV REPORT MULTIPLE SELECTION

    CAN ANYONE PLZ TEMME HOW TO SELECT MULTIPLE RECORDS IN ALV AND EDIT THEM...........................
    EG....SELECT MULTIPLE VALUES AND CHANGE D ACTIVE INDICATOR.........
    THANX IN ADVANCE...........

    Hi,
    Reprots
    http://www.sapgenie.com/abap/reports.htm
    http://www.allsaplinks.com/material.html
    http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
    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
    Check this for basic concepts of OOPS
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/abap%20objects/abap%20code%20sample%20to%20learn%20basic%20concept%20of%20object-oriented%20programming.doc
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20display%20data%20in%20alv%20grid%20using%20object%20oriented%20programming.doc
    Tabstrip
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20for%20tab%20strip%20in%20alv.pdf
    Editable ALV
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20edit%20alv%20grid.doc
    Tree
    http://www.sapdevelopment.co.uk/reporting/alv/alvtree/alvtree_usrint.htm
    General Tutorial for OOPS
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/an%20easy%20reference%20for%20alv%20grid%20control.pdf
    http://www.sapdevelopment.co.uk/reporting/alvhome.htm
    http://www.sap-img.com/abap/what-is-alv-programming.htm
    http://www.sap-img.com/abap-function.htm
    http://www.geocities.com/mpioud/Abap_programs.html
    http://www.sapdevelopment.co.uk/reporting/alv/alvtree%5Calvtree_basic.htm
    http://esnips.com/doc/ad20dca9-6182-4903-8d8f-96a66dc8590c/ALV.pdf
    http://www.sap-img.com/abap-function.htm

  • Alv report  filter a filed

    hi,
    please give help on filtering on particular field in alv gird display.
        i want to filter on MARA-MRTAR ( Matrial type) .give me code for that.
    plz i need urgently.

    hi,.
    Thanks for you reply.
    i need to display with out filter of gsber and lifner also and give me ur syntax also.
    my requriment is :
           if i  given gsber input on selection screen i need to display particular gsber only and
          if i given lifner input without gsber i need to display particular lifner details only and
         if i given gsber and lifner on selction screen i need to display for particular lifner and plant only and
        if i am not given gsber and lifner also i need to display  output
    here gsber and lifner both are select-options.
    please give me solution on that scenario.
    Edited by: vasanth kandula on Jan 1, 2008 10:55 AM
    Edited by: vasanth kandula on Jan 1, 2008 10:56 AM

  • ALV REPORT: read selected checkbox in alv grid and process the pushbutton

    my requirement is to check some rows from alv grid and the press the pushbutton. Thereby following things should process:
    select all checked rows into an itab and call the transaction code CJ01 for all
    entries......
    I am finding the problem that when I select the checkbox....the internal table doesnt recognize the boxes as checked ones......
    thanks in advance...
    Kartikey Singh,

    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.
          loop at t_output where Flag = 'X'.
            if t_output-VKUEGRU is initial.
              message e000 with text-110.
            endif.
    endloop.

  • ALV Report. filter

    hi,
      IF p_hkont IS INITIAL.
       IF S_GSBER IS  INITIAL.
            SELECT * FROM bsik
                INTO TABLE ibsik
                WHERE bukrs = 'DHPL' AND
                      lifnr IN s_lifnr AND    "Customer
                      umskz = p_umskz AND
                      budat <= p_budat.
       ELSE.
          SELECT * FROM bsik
                INTO TABLE ibsik
                WHERE bukrs = 'DHPL' AND
                      lifnr IN s_lifnr AND    "Customer
                      umskz = p_umskz AND
                      budat <= p_budat.
          ENDIF.
        else.
        IF S_GSBER IS  INITIAL.
              SELECT * FROM bsik
                            INTO TABLE ibsik
                              WHERE bukrs = 'DHPL' AND
                               hkont = p_hkont AND    "GL accnt
                               umskz = p_umskz AND
                              GSBER IN S_GSBER AND
                               budat <= p_budat.
        ELSE.
         SELECT * FROM bsik
                INTO TABLE ibsik
                WHERE bukrs = 'DHPL' AND
                      hkont = p_hkont AND    "GL accnt
                      umskz = p_umskz AND
                      GSBER IN S_GSBER AND
                      budat <= p_budat.
    ENDIF.
    ENDIF.
      IF p_hkont IS INITIAL.
         IF S_GSBER IS  INITIAL.
           if s_lifnr is NOT initial.
              SELECT * FROM bsik
                INTO TABLE ibsik
                WHERE bukrs = 'DHPL' AND
                      lifnr IN s_lifnr AND    "Customer
                      umskz = p_umskz AND
                      budat <= p_budat.
         ELSE.
           SELECT * FROM bsik
                INTO TABLE ibsik
                WHERE bukrs = 'DHPL' AND
                      lifnr IN s_lifnr AND    "Customer
                      umskz = p_umskz AND
                      budat <= p_budat.
          ENDIF.
          ENDIF.
          else.
           IF S_GSBER IS  INITIAL.
           if s_lifnr is NOT initiaL.
             SELECT * FROM bsik
                INTO TABLE ibsik
                WHERE bukrs = 'DHPL' AND
                      hkont = p_hkont AND    "GL accnt
                      umskz = p_umskz AND
                      GSBER IN S_GSBER AND
                      budat <= p_budat.
          ELSE.
             SELECT * FROM bsik
                INTO TABLE ibsik
                WHERE bukrs = 'DHPL' AND
                      hkont = p_hkont AND    "GL accnt
                      umskz = p_umskz AND
                      GSBER IN S_GSBER AND
                      budat <= p_budat.
      ENDIF.
    endif.
      endif.
    i am trying to filter gsber and lifnr at atime. but i am not able to filter with this code .give me  solution.urgent.
    Edited by: vasanth kandula on Jan 1, 2008 10:23 AM

    hi,.
    Thanks for you reply.
    i need to display with out filter of gsber and lifner also and give me ur syntax also.
    my requriment is :
           if i  given gsber input on selection screen i need to display particular gsber only and
          if i given lifner input without gsber i need to display particular lifner details only and
         if i given gsber and lifner on selction screen i need to display for particular lifner and plant only and
        if i am not given gsber and lifner also i need to display  output
    here gsber and lifner both are select-options.
    please give me solution on that scenario.
    Edited by: vasanth kandula on Jan 1, 2008 10:55 AM
    Edited by: vasanth kandula on Jan 1, 2008 10:56 AM

  • About double click event in ALV report

    Hi all,
    I want to program a double-click event in ALV reprot.
    I am not suppose to use module pool approach for the same.
    If a user double clicks on the any of the row of ALV report, the transaction should get called.
    Again, I am using function 'REUSE_ALV_GRID_DISPLAY' for displaying ALV.
    Can you please help me to solve this?
    Thanks,
    -Siddhi

    Hi Sidhi,
    You can do it easily by using Reuse_ALV_GRID_DISPALY.
    The User Command subroutine which you pass to this function module in that you can check which field is selected and what is the value of that and also you can get the table index.
    I am giving you a code example where interactivity of ALV report is done .
    *& Report  ZRAIL_LOT_REPORT
    REPORT  zrail_lot_report.
    TABLES :qals,aufk.
    TYPE-POOLS:slis.
    TYPES:BEGIN OF x_lot,
          sel(1)   TYPE c,                    "SELECTION
          prueflos TYPE qals-prueflos,        "INSPECTION LOT NUMBER
          werk     TYPE qals-werk,            "PLANT
          losmenge TYPE qals-losmenge,        "LOT QUANTITY
          mengeneinh TYPE qals-mengeneinh,   "BASE UNIT OF MEASURE FOR THE INSPECTION LOT QUANTITY
          matnr   TYPE  qals-matnr,          " MATERIAL NO. ATTACHED TO ORDER
          zzequnr  TYPE qals-zzequnr,         "EQUIPMENT NO.
          zzassembly TYPE qals-zzassembly,    "ASSEMBLY
          herkunft  TYPE qals-herkunft,       "INSPECTION LOT ORIGIN
          aufnr     TYPE qals-aufnr,          "ORDER NO.
          sttxt     TYPE qals_d02-sttxt,      "LOT STATUS
          objnr     TYPE qals-objnr,          "OBJECT NUMBER
          enstehdat TYPE qals-enstehdat,      "lot creation date
          pruefer   TYPE qamr-pruefer,        "Name of the Inspector
          END OF x_lot.
    TYPES:BEGIN OF x_ordmat,
          aufnr TYPE aufk-aufnr,             "Order No.
          equnr TYPE afih-equnr,             "Equipment No. attached to Order
          zmatnr TYPE aufk-zmatnr,           "Material No. attached to Order
          bautl  TYPE afih-bautl,            "Assembly attached to Order
          END OF x_ordmat.
    TYPES:BEGIN OF x_status,
          objnr TYPE jest-objnr,
          stat  TYPE jest-stat,
          txt04 TYPE tj02t-txt04,
          END OF x_status.
    DATA:it_qals TYPE STANDARD TABLE OF x_lot,
         wa_qals TYPE x_lot.
    DATA:it_ordmat TYPE TABLE OF x_ordmat,
         wa_ordmat TYPE x_ordmat.
    DATA:it_status TYPE STANDARD TABLE OF x_status,
         wa_status TYPE x_status.
    DATA:mytabix TYPE sy-tabix.
    DATA: wa_layout   TYPE slis_layout_alv,
          wa_fieldcat TYPE slis_fieldcat_alv,
          it_fieldcat TYPE TABLE OF slis_fieldcat_alv,
          it_fcat TYPE TABLE OF slis_fieldcat_alv.
    DATA:mytabix1 TYPE sy-tabix.
    SELECTION-SCREEN BEGIN OF BLOCK  b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS: s_werks FOR qals-werk,
                    s_zmatnr FOR aufk-zmatnr,
                    s_assbly FOR qals-zzassembly,
                    s_equnr FOR qals-zzequnr,
                    s_lotor FOR qals-herkunft,
                    s_lotdat FOR qals-enstehdat.
    SELECTION-SCREEN END OF BLOCK b1.
    INITIALIZATION.
      s_lotdat-low = sy-datum - 7.
      s_lotdat-high = sy-datum.
      APPEND s_lotdat.
    START-OF-SELECTION.
      PERFORM get_data_qals.
      PERFORM build_fieldcat.
      PERFORM display_data.
      EXIT.
    END-OF-SELECTION.
    *&      Form  get_data_qals
          text
    -->  p1        text
    <--  p2        text
    FORM get_data_qals .
      IF it_qals[] IS INITIAL.
        SELECT a~prueflos
               a~werk
               a~losmenge
               a~mengeneinh
               a~zzequnr
               a~zzassembly
               a~herkunft
               a~aufnr
               a~objnr
               a~matnr
               a~enstehdat
               b~pruefer
               FROM qals AS a INNER JOIN qamr AS b
               ON aprueflos = bprueflos
               INTO CORRESPONDING FIELDS OF TABLE it_qals
               WHERE werk IN s_werks
               AND   zzassembly IN s_assbly
               AND   zzequnr    IN s_equnr
               AND   herkunft   IN s_lotor
               AND   enstehdat  IN s_lotdat.
      ENDIF.
      IF it_ordmat[] IS INITIAL.
        SELECT a~aufnr
               a~zmatnr
               b~bautl
               b~equnr
               FROM aufk AS a INNER JOIN afih AS b
               ON aaufnr = baufnr
               INTO CORRESPONDING FIELDS OF TABLE it_ordmat FOR ALL ENTRIES IN it_qals
               WHERE a~aufnr = it_qals-aufnr
                AND zmatnr IN s_zmatnr.
      ENDIF.
      IF it_status[] IS INITIAL.
        SELECT a~objnr
               a~stat
               b~txt04
               FROM  tj02t AS b
               INNER JOIN jest AS a ON bistat = astat
               INTO CORRESPONDING FIELDS OF TABLE it_status FOR ALL ENTRIES IN it_qals
               WHERE a~objnr = it_qals-objnr
               AND   b~spras = sy-langu
               AND   a~inact = space.
      ENDIF.
      LOOP AT it_qals INTO wa_qals.
        mytabix = sy-tabix.
        READ TABLE it_ordmat INTO wa_ordmat WITH KEY aufnr = wa_qals-aufnr.
        IF sy-subrc = 0.
          IF wa_qals-herkunft = '14'.
            wa_qals-matnr = wa_ordmat-zmatnr.
            wa_qals-zzequnr =  wa_ordmat-equnr.
            wa_qals-zzassembly = wa_ordmat-bautl.
            MODIFY it_qals FROM wa_qals INDEX  mytabix TRANSPORTING matnr zzassembly zzequnr.
          ENDIF.
        ENDIF.
        LOOP AT it_status INTO wa_status WHERE objnr = wa_qals-objnr.
          CONCATENATE wa_qals-sttxt wa_status-txt04 INTO wa_qals-sttxt SEPARATED BY space.
          CLEAR :wa_status.
        ENDLOOP.
        MODIFY it_qals FROM wa_qals INDEX  mytabix TRANSPORTING sttxt.
        CLEAR :wa_qals,wa_ordmat,mytabix.
      ENDLOOP.
      IF s_zmatnr[] IS NOT INITIAL.
        DELETE it_qals WHERE matnr IS INITIAL.
      ENDIF.
    ENDFORM.                    " get_data_qals
    *&      Form  build_fieldcat
          text
    -->  p1        text
    <--  p2        text
    FORM build_fieldcat .
      wa_layout-zebra = 'X'.
      wa_layout-colwidth_optimize = 'X'.
      wa_layout-box_fieldname = 'SEL'.
      wa_layout-box_tabname = 'IT_QALS'.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
       EXPORTING
        I_PROGRAM_NAME               =
          i_internal_tabname           = 'IT_QALS'
          i_structure_name             = 'QALS_D02'
        I_CLIENT_NEVER_DISPLAY       = 'X'
        I_INCLNAME                   =
        I_BYPASSING_BUFFER           =
        I_BUFFER_ACTIVE              =
        CHANGING
          ct_fieldcat                  = it_fieldcat
      IF sy-subrc = 0.
        LOOP AT  it_fieldcat INTO wa_fieldcat.
          CASE  wa_fieldcat-fieldname .
            WHEN  'PRUEFLOS'.
              wa_fieldcat-col_pos = 1.
              wa_fieldcat-hotspot = 'X'.
              APPEND wa_fieldcat TO it_fcat.
            WHEN   'WERK'.
              wa_fieldcat-col_pos = 3.
              APPEND wa_fieldcat TO it_fcat.
            WHEN  'LOSMENGE'.
              wa_fieldcat-col_pos = 4.
              wa_fieldcat-no_out = ''.
              APPEND wa_fieldcat TO it_fcat.
            WHEN  'MENGENEINH'.
              wa_fieldcat-col_pos = 5.
              wa_fieldcat-no_out = ''.
              APPEND wa_fieldcat TO it_fcat.
            WHEN 'ZZEQUNR'.
              wa_fieldcat-col_pos = 6.
              wa_fieldcat-no_out = ''.
              wa_fieldcat-hotspot = 'X'.
              APPEND wa_fieldcat TO it_fcat.
            WHEN  'ZZASSEMBLY'.
              wa_fieldcat-col_pos = 7.
              wa_fieldcat-no_out = ''.
              wa_fieldcat-hotspot = 'X'.
              APPEND wa_fieldcat TO it_fcat.
            WHEN  'HERKUNFT'.
              wa_fieldcat-col_pos = 8.
              APPEND wa_fieldcat TO it_fcat.
            WHEN  'AUFNR'.
              wa_fieldcat-col_pos = 9.
              wa_fieldcat-hotspot = 'X'.
              APPEND wa_fieldcat TO it_fcat.
            WHEN  'ENSTEHDAT'."enstehdat
              wa_fieldcat-col_pos = 10.
              APPEND wa_fieldcat TO it_fcat.
            WHEN  'STTXT'.
              wa_fieldcat-col_pos = 12.
              wa_fieldcat-hotspot = 'X'.
              APPEND wa_fieldcat TO it_fcat.
            WHEN OTHERS.
          ENDCASE.
          CLEAR wa_fieldcat.
        ENDLOOP.
        wa_fieldcat-fieldname = 'MATNR'.
        wa_fieldcat-tabname  =  'IT_QALS'.
        wa_fieldcat-col_pos = 2.
        wa_fieldcat-ref_tabname = 'AUFK'.
        wa_fieldcat-hotspot = 'X'.
        wa_fieldcat-seltext_l = 'Material No.'.
        APPEND wa_fieldcat TO it_fcat.
        wa_fieldcat-fieldname = 'PRUEFER'.
        wa_fieldcat-tabname  =  'IT_QALS'.
        wa_fieldcat-col_pos = 11.
        wa_fieldcat-ref_tabname = 'QAMR'.
        wa_fieldcat-seltext_l = 'Name of the Inspector'.
        APPEND wa_fieldcat TO it_fcat.
      ENDIF.
    ENDFORM.                    " build_fieldcat
    *&      Form  display_data
          text
    -->  p1        text
    <--  p2        text
    FORM display_data .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
       i_callback_program                = 'ZRAIL_LOT_REPORT'
      I_CALLBACK_PF_STATUS_SET          = ' '
         i_callback_user_command           = 'USER_COMMAND'
         is_layout                         = wa_layout
          it_fieldcat                       = it_fcat
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      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
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
        TABLES
          t_outtab                          = it_qals
    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.
    ENDFORM.                    " display_data
    *&      Form  USER_COMMAND
          text
         -->R_UCOMM      text
         -->RS_SELFIELD  text
    FORM user_command USING r_ucomm TYPE sy-ucomm  rs_selfield TYPE slis_selfield.
      CASE rs_selfield-fieldname  .
        WHEN 'PRUEFLOS'.
          SET PARAMETER ID 'QLS' FIELD rs_selfield-value.
          CALL TRANSACTION 'QA03' AND SKIP FIRST SCREEN.
        WHEN 'ZZEQUNR'.
          SET PARAMETER ID 'EQN' FIELD  rs_selfield-value.
          CALL TRANSACTION 'IE03' AND SKIP FIRST SCREEN.
        WHEN 'ZMATNR'.
          SET PARAMETER ID 'MAT' FIELD rs_selfield-value.
          CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
        WHEN 'ZZASSEMBLY'.
          SET PARAMETER ID 'MAT' FIELD rs_selfield-value.
          CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
        WHEN 'AUFNR'.
          SET PARAMETER ID 'ANR' FIELD rs_selfield-value.
          CALL TRANSACTION 'IW33' AND SKIP FIRST SCREEN.
        WHEN 'STTXT'.
          MOVE rs_selfield-tabindex TO mytabix1.
          PERFORM show_status.
      ENDCASE.
    ENDFORM.                    "USER_COMMAND
    *&      Form  show_status
          text
    -->  p1        text
    <--  p2        text
    FORM show_status .
      DATA:it_systat TYPE TABLE OF bapi2045ss,
           wa_sysstat TYPE bapi2045ss,
           it_bapi2045us TYPE TABLE OF bapi2045us.
      DATA:it_fsys TYPE TABLE OF slis_fieldcat_alv.
      DATA:insplot TYPE bapi2045d_il0-insplot.
      DATA:language TYPE bapi2045la.
      CLEAR wa_qals.
      READ TABLE it_qals INTO wa_qals INDEX mytabix1.
      insplot = wa_qals-prueflos.
      language-langu = sy-langu.
      CALL FUNCTION 'BAPI_INSPLOT_GETSTATUS'
        EXPORTING
          number        = insplot
          language      = language
        TABLES
          system_status = it_systat
          user_status   = it_bapi2045us.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          i_program_name     = 'ZRAIL_LOT_REPORT'
          i_internal_tabname = 'IT_SYSTAT'
          i_structure_name   = 'BAPI2045SS'
        CHANGING
          ct_fieldcat        = it_fsys.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = 'ZRAIL_LOT_REPORT'
          it_fieldcat        = it_fsys
        TABLES
          t_outtab           = it_systat.
    ENDFORM.                    " show_status
    IIn the subrouitne the User command the Parameter rs_selfield will give you the selected or clicked field and its value its record no .
    I hope this will help you.

  • Checkbox in alv report

    hi all,
    i am facing one problem regarding checkbox in alv.
    i have to buttons on alv report as 'select all' (to select all) and 'send mail'(as i have to send mail to selected record)
    wat i have done till now is:
    1. when i run the report and cleck on checkboxes the action is reflected in internal table..n i can capture the data.
    2.when i click on select all button all the records get selected and i can capture the data again.
    now the problem :
    when i clcik on "select all" and all the record get selected ..but when i deselect any of those record..the changes in internal table lost i.e. the checkbox field because empty for all the record.....
    PLZ GIVE SOLUTION FOR FUNCTION "REUSE_ALV_GRID_DISPLAY" ONLY...
    now the code:
    ************LAYOUT**************
    DATA: gd_layout TYPE SLIS_LAYOUT_ALV.
      gd_layout-colwidth_optimize = 'X'.
    gd_layout-zebra      = 'X'.
      gd_layout-box_fieldname  = 'CHECKBOX'.
      gd_layout-box_tabname  = 'IT_CONF'.
    ****alv display*************
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
          EXPORTING
            i_grid_title             = 'Detailed List'
            it_fieldcat              = fieldcat
            i_callback_program       = sy-repid
            i_callback_user_command  = 'USER_CMD'
            i_callback_pf_status_set = 'EMAILS'
            IS_LAYOUT                = gd_layout
          TABLES
            t_outtab                 = it_conf
          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.
      endif.
    endform.                    "alv_display
    *&      Form  sush1
          text
         -->RT_EXTAB   text
    FORM emails USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'EMAILS'.
    ENDFORM.                    "emails
    *&      Form  user_cmd
          text
         -->P_UCOMM    text
         -->LS_SELFIELDtext
    FORM user_cmd USING p_ucomm LIKE sy-ucomm ls_selfield type slis_selfield.
    IF REF_GRID IS INITIAL.
        CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
          IMPORTING
            E_GRID = REF_GRID.
      ENDIF.
    IF NOT REF_GRID IS INITIAL.
        CALL METHOD REF_GRID->CHECK_CHANGED_DATA.
      ENDIF.
      IF p_ucomm = 'EMAIL'.
        loop at it_conf  where checkbox = 'X'.
    **[[[[[[[U MAY NOT SEE THIS THIS IS FOR MAIL PUPOSE]]]]]]]]]]]]*********
          select single  sachn  telnr  into (tc_name , tc_num ) from t526
          where SACHX = it_conf-zztc
          and werks = it_conf-werks .
      ******find the emil of employee.
           clear : p_0105,p_0105[].
            CALL FUNCTION 'HR_READ_INFOTYPE'
              EXPORTING
                pernr           = it_conf-pernr
                infty           = '0105'
                BEGDA           = pn-begda
                ENDDA           = pn-endda
              TABLES
                infty_tab       = p_0105
              EXCEPTIONS
                infty_not_found = 1
                OTHERS          = 2.
           if sy-subrc = 0.
            read table p_0105 with key subty = 10.
            move p_0105-USRID_LONG to email.
        endif.
    find immediate superior by Z FM.
          clear pernr_s.
          CALL FUNCTION 'ZHR_GET_IMMMED_SUPERIOR'
            EXPORTING
              pernr     = it_conf-pernr
              begda     = '18000101'
              endda     = '99991231'
            IMPORTING
              v_pernr   = pernr_s
            EXCEPTIONS
              not_found = 1
              OTHERS    = 2.
          if sy-subrc = 0.
    find the email of the immed. superiors personal number..
            clear : p_0105,p_0105[].
            CALL FUNCTION 'HR_READ_INFOTYPE'
              EXPORTING
                pernr           = pernr_s
                infty           = '0105'
                BEGDA           = pn-begda
                ENDDA           = pn-endda
              TABLES
                infty_tab       = p_0105
              EXCEPTIONS
                infty_not_found = 1
                OTHERS          = 2.
            read table p_0105 with key subty = 10.
            move p_0105-USRID_LONG to email_s.
              endif.
            if email <> ' '.
            perform send_mail using it_conf-ename email email_s tc_name tc_num.
            endif.
            if email_s <> ' '.
            perform send_mail using it_conf-ename email email_s tc_name tc_num.
            endif.
    ****MAIL PART IS OVER*******************************************
        endloop.
    endif.
    *****FOR  "SELECT ALL " BUTTON**************
       IF p_ucomm = 'SELECT'.
       flag = 1.
        loop at it_conf.
          move 'X' to it_conf-checkbox.
          MODIFY IT_CONF.
        endloop.
        ls_selfield-refresh = 'X'.
        endif.

    " Please  see the code  of  myin  in the    'SELECT' & 'DESELECT'.
    case save_ok.
        when 'EXIT'.
          perform exit_program.
        when 'SELECT'.
          perform select_all_entries changing gt_outtab[].
        when 'DESELECT'.
          perform deselect_all_entries changing gt_outtab[].
        when 'RESET'.
          perform reset_selected_entries changing gt_outtab[].
        when 'SWITCH'.
          perform switch_activation changing gt_outtab[].
      endcase.
    form select_all_entries changing pt_outtab type standard table.
      data: ls_outtab type gs_outtab.
      data: l_valid type c,
            l_locked type c.
    *§A4ad. Before you (a)set, reset or (d)evaluate checkboxes,
    *       you must check the input cells.
    * If all entries are ok, ALV transferes new values to the output
    * table which you then can modify.
      call method g_grid->check_changed_data
                  importing
                     e_valid = l_valid.
      if l_valid eq 'X'.
        loop at pt_outtab into ls_outtab.
          perform check_lock using    ls_outtab
                             changing l_locked.
          if l_locked is initial
             and not ls_outtab-checkbox eq '-'.
            ls_outtab-checkbox = 'X'.
          endif.
          modify pt_outtab from ls_outtab.
        endloop.
        call method g_grid->refresh_table_display.
      endif.
    endform.   
    form check_lock using    ps_outtab type gs_outtab
                    changing p_locked.
      data ls_celltab type lvc_s_styl.
      loop at ps_outtab-celltab into ls_celltab.
        if ls_celltab-fieldname = 'CHECKBOX'.
          if ls_celltab-style eq cl_gui_alv_grid=>mc_style_disabled.
            p_locked = 'X'.
          else.
            p_locked = space.
          endif.
        endif.
      endloop.
    endform.       
    form deselect_all_entries changing pt_outtab type standard table.
      data: ls_outtab type gs_outtab.
      data: l_valid type c,
            l_locked type c.
    *§A4ad. Before you (a)set, reset or (d)evaluate checkboxes,
    *       you must check the input cells.
    * If all entries are ok, ALV transferes new values to the output
    * table which you then can modify.
      call method g_grid->check_changed_data
                  importing
                     e_valid = l_valid.
      if l_valid eq 'X'.
        loop at pt_outtab into ls_outtab.
          perform check_lock using    ls_outtab
                           changing l_locked.
          if l_locked is initial
             and not ls_outtab-checkbox eq '-'.
            ls_outtab-checkbox = ' '.
          endif.
          modify pt_outtab from ls_outtab.
        endloop.
        call method g_grid->refresh_table_display.
      endif.
    reward  points if it is usefull ......
    Girish

  • ALV Report in PP module

    Hi everyone.
    I need to develop an ALV report. Select options are -
    AFPO-DWERK (plant) (Obligatory)
    AFPO-AUFNR (Prd Ord Num) (optional)
    AFKO-STLBEZ (Mat Nr) (optional)
    S022-ARBPL (Work Center) (optional)
    I have extracted all open production orders from AUFK and placed them in an internal table.
    Now how can I filter this list to the select options.
    Please help me.
    Related Tables  - AUFK, AFPO, AFKO.
    Thanks,
    Lakshmi

    just go to www.alvrobot.com.ar
    and the page will generate the code for you....

  • Importing problems in alv report (stored versions)

    HI ALL, i have;
    DATA gt_results TYPE sp_data_type OCCURS 0 WITH HEADER LINE .
    FORM X .
    EXPORT gt_results TO DATABASE sp_ver_dat ID INDXKEY.
    ENDFORM .
    FORM Y .
    IMPORT gt_results  FROM DATABASE sp_ver_dat ID INDXKEY.
    ENDFORM .
    I coded this for storing alv datas as a version . Suppose i executed "form x" in 2008. After 1 year later, i would like to see this 2008 record. But my internal table type (sp_data_type) was changed (This change is obligatory). In example new 2 fields were added and 1 field was deleted. In spite of this, i have an error when i am attempting to run "form y"  because clustered data in database does not fit gt_results anymore. 
    How can i run such old stored versions of this alv report? How should i design this subroutines so there will be no problems even if internal table type frequently change in future..?
    I am expecitng your suggestions..
    Thanks..

    I think this is good solution for the versions which we will be created .  Unfortunately there is no way to save (excute) old versions in which structure of internal table  has changed  many times. We have to handle them manually..
    It means, we can save future but not past.. 
    ISN'T IT?
    Thanks all

  • ALV Report displays space instead of '0.00' for qty field. why?

    Hello friends,
    I am facing a problem to display 0 value for the field
    field - ZZQTY (Predefined Type at Domain level)
         QUAN 21,2
    In the program I am clearing the field and I can see its value as 0.00 while debugging.
    As soon as field ZZQTY is displayed on ALV, it becomes blank (Space).
    My requirement is to display '0.00' on ALV report.
    What should I do?
    Regards,
    Ronny Hanks

    Hello
    Search for
    LS_FIELDCAT-NO_ZERO = 'X'.
    for this field in programm and comment this.

  • Case Sensitive problem in Select Option for wild card search

    Hi,
         Can anyone please let me know how to make the wild card search in any select-option non case-sensitive. What I mean by this is for eg. we want to find out all the POs with short text containing the word  'process', what we do we populate a range with OPTION = 'CP' and LOW = 'process' and select EKPO with short text in this range. This select is however case-sensitive and POs with short text containing 'Process' is not retrieved. But my requirement is that this should be non case-sensitive and both the POs should be in the result set.

    Hi,
    Hope this helps you
    CS:
    You can select characters in operand2 for a direct comparison by adding the escape symbol "#" before the required characters. For these characters, upper/lower case is taken into account, wildcard characters and the escape symbol itself do not receive special treatment, and trailing blanks in operands of type c are not cut off.
    Covers Pattern: True, if the content of operand1 fits the pattern in operand2. Wildcard characters can be used for forming the operand pattern, where "" represents any character string, and "+" represents any character. Upper/lower case is not taken into account. If the comparison is true, sy-fdpos contains the offset of operand2 in operand1, whereby leading wildcard characters "" in operand2 are ignored if operand2 also contains other characters. If the comparison is false, sy-fdpos contains the length of operand1.
    Regards
    Krishna

  • Printing ALV report

    Hi everyone,
    I have a report that was created with ALV, everything works fine until we print.
    When we print the report, it is printed in one page and that's ok, but the size is reduced, I mean the size is very small, any idea why we have this issue?.
    Thanks
    Eduardo Campos.

    HI Hduardo Campos,
    For printing ALV report or Normal report we need separte format while printing.
    Please fallow the fallowing steps to achieve your requirement.
    Steps:
    1. You have to create your own page format.
    SPAD-> Full Administration -> Device Types -> Page Formats -> Define the respective Page formats
    2. You have to define your own format type and attach the newly created page format to that.
    3. while creating the format type using existing script code from other formats.
    ( Here while wrting the script just test the font & font size as per your requirement)
    4. While ALV report printing select the Format option and enter your newly created format name( If you are not seeing report format option then select the properties option then select the report format then enter the required format name)
    fallow the above steps, so that you will able to print ALV report successfully.
    Still if you are facing any problem, let me know i will send you the detailed screen shots for the same.
    Right now in my current project i am using the same procedure and succesfuuly achieved the results.
    Regards,
    Rajani

  • ALV grid case-sensitive edit field

    Hello,
    i've a editable field on a alv grid.
    The field is case-sensitive in the domain.
    But when i enter a field an click rturn, the letters get uppercase.
    What's the problem?
    Best regards,
    TomSd

    Hi,
    Add the attribute  lowercase = 'X'  while preapring field catalog for this field.
    Regards,
    Gopi.
    Reward points if helpfull.

Maybe you are looking for

  • More than one iPhone, his and hers, how to share music?

    Hey folks We've had this issue since we've had iPods and its finally bubbled to the surface enough that I cannot take it anymore. I have a desktop mac with a 250gb music library - I buy all the music in the house and it lives on my machine. I have an

  • Wanting to do this effect (did you know)

    http://www.youtube.com/watch?v=ECDZbrzkTxk The effect is the multiple "?" in yellow boxes flying at the screen. I would be replacing "?" with "!" but thats not important Im not even sure where to start on this one. Any help would be much appreciated.

  • Microphone for Skype

    Hi there, I have no idea if I'm posting in the right spot, but here goes. I just signed up for a Skype account, but don't know if my computer has a microphone. How can I find that out? I did a search on the hard drive but didn't come up with any micr

  • Can we generate a report on master data alone without Info cube?

    Could some one let me know whether Can we generate a report on master data alone in BEx without Info cube? Thanks in advance.

  • Do I have to Replace Every Word doc with a New Pages doc?

    Everytime I open an old Word document (I now use Pages exclusively) in Pages, I have to re-save the document as a Pages document. The old Word file stays on my computer, as I'm creating something new, a Pages document. I now am left with two files: t