Movemts

Hi,
I have report which is used for slow moving goods...
I would like to calculated the reprot for last three months.. how to gohead... but one more condition if i ran a report 1st day of every month it should take last three month of vlaues...
thnks
Sonu

Hi,
I have report which is used for slow moving goods...
I would like to calculated the reprot for last three months.. how to gohead... but one more condition if i ran a report 1st day of every month it should take last three month of vlaues...
thnks
Sonu

Similar Messages

  • How to revert stock in quality stock after qty issued with movemt type 704

    Hi Experts,
    User issued qty from quality stock to cost centre trough T-Code MI10. Inspection lot against the issue qty has status u201CREL CALC SPCO PRII CROK QLCHu201D This lot has been generated through mov  101 against PO (GR). After doing GR qty posted in quality stock. By mistake user has issued qty from quality stock to cost centre trough T-Code MI10. For same movement type was 704.
    Now they want same qty back in quality stock also they want to do UD for the same. How to get back this stock in quality stock?
    Awaiting for your expert reply.
    Thanks and Regards,
    Sandy

    hi Sandy,
    Quickest and easiest option without lot of configuration and process change for your scneario will be ,
    The transaction code is MB0A.
    The steps for executing the above trancode is as follows.
    Inputs:-
    Posting date : UD date.
    Movement type : 102
    Enter relevant plant, storage location, vendor and the material code
    The purchase order/sch.agreement for the given vendor-matl-plant combination will be displayed.
    Select the correct PO and click adopt selected.
    The material with quantities to be reversed will appear in various line items. Select the correct quantity for which the reversal to be made.
    Click adopt + details
    Enter storage location
    Remove "X" in the stocktype field
    Save.
    Material document will be generated.
    The correct material could be inwarded again and correct usage decision can be taken  against this lot.  
    Get approval from Materials and  Finance guys.   As long as your accounting documents nurlifies each other  ,  you should be good to go.
    If not  you have to use the same proess   witht twiests , with other movement types for which you have activated  inspection type.
    Hope this helps
    Cheers
    Rav

  • M7 301 - The value of goods movement is negative. Movemt. typ. 101

    Hi Team,
    While doing GRN for import material in foreign currency with movement type '101', system is giving an error "The value of goods movement is negative" under message number M7 301.
    Please let me know the cause for the error.
    Regards,
    Anmol Saxena.
    Edited by: Anmol Saxena on Apr 26, 2011 4:34 PM

    Hi,
    This error can be caused by the exchange rate differences.
    Best Regards,
    Arminda Jack

  • Step by step how to link background movemts in video 2 to video 1  ae  cs6

    Never used after effects before  I have a video of a rock sticking out of the ocean  I ultra keyed the sky  and brought clip of the moon.
    Ocean sceen is a bit shaky  and  so when you see moon video in background it looks great til ocean vid moves.
    Can you please give me the step by step on how to do this   haven't found any tutorials that helped.
    Please post and send  to [email address removed] Thank you so much

    I'm not trying to be anything but helpful so please don't take offence.
    Step 1: Plan every aspect of your shot by deciding what you want to do and then list all the potential problems.
    Step 2: Carefully design the production of the shot considering all solutions then decide on the simplest solutions for each problem.
    Step 3: Carefully and skillfully shoot the elements and then conform them the production plan in step 2.
    It sounds to me like you came across a shot of the ocean with and you'd like to add a moon to the shot. Even though you are kind of going about this backwards the same steps apply.
    The same steps apply.
    First step: The shot of the ocean is shaky, the camera isn't locked down. The shot of the moon is. So what is the easiest way to combine the two.
    Second step: I can fix the problem by removing the camera motion from the shot of the ocean or adding the motion to the moon. I can combine the two shots by creating a matte with a couple of dozen techniques. From what you've said you've chosen to key out the sky. I probably would have keyed out the moon or simply used a blend mode to add it to the ocean shot. Without seeing either I can't tell what would be easier. If the camera is fairly stable for the ocean shot it's probably easier to remove the motion or stabilize the footage, but it may be more interesting to add movement to the moon.
    Third Step: Track the shot of the ocean. Without seeing the shot I can't tell you which tracker would be best. There are at least 6 possible solutions inside AE and dozens more with 3rd party software. Once you get a good track decide what to do with it. If there's some kind of stable plane in the shot (like the shoreline) I'd probably track that plane in Mocha, then add the motion of that track to the moon. Then I'd lay the moon on top of the footage so that both were shaky.
    So there you have it. 3 simple steps to a successful shot. The problem with my answer is that without seeing your footage and talking more about what you want to achieve I can't give you any better answer. There are just too many ways to do it. BTW, all of them require more than a basic knowledge of After Effects.

  • Report for deviation of yield

    Hello Gurus,
    Is there a standard report available in ECC6.0 to check all the process orders that had deviated from the yields.
    Thanking you in anticipation
    Sri.

    Dear,
    Try transaction code MCPM also use MB51 with relevant movemt type for scrap and Yield, you will get data.
    Please refer this thread,
    Re: Yield Analysis Report
    Regards,
    R.Brahmankar

  • Change of count on the header on filtering the ALV

    Hi Gurus!
    I have this ALV report which gives the sales order report, in the output right on the top the report shows the count of all the distinct sales order displayed when the report is run based ona  selection criteria. Is it possible to show the total count of teh sales order in the report to change and show teh number of distinct sales doc when we use filter on teh report. Suppose if we run the report based on a particular selection criteria and it gives a count of 30 . In the output if we put filter on a particular column and the report shows fewer lines , which will reduce the number of sales doc, is it possible to show this number which for eg will be say 20 , is it possible to show the number 20 after filetr on ALV instead of that 30 remainiung constant. I am wanting the report to show the change in count of distinct sales doc when I put filter on any columnh.
    report  zsales_orders message-id zsd no standard page heading.
    * For ALV usage
    type-pools: slis.
    data: gs_layout   type slis_layout_alv,
          ta_events   type slis_t_event_exit,
          tp_event    type slis_event_exit,
          tp_print    type slis_print_alv,
          gt_sort     type slis_t_sortinfo_alv,
          gt_events   type slis_t_event,
          t_fieldcat  type slis_t_fieldcat_alv with header line,
          repid       type syrepid,               " ABAP Program.
          gt_list_top_of_page type slis_t_listheader,     " Top of page text.
          gs_list_top_of_page type slis_listheader,
          alv_variant   type disvariant.           " Customize Disp. Variant
    data: w_field    type slis_fieldcat_alv.
    data: count type i.
    data: count1 type i.
    tables: vbak, vbap, vbpa, knvv.
    * Definition of selection screen                                       *
    *   By plant, storage location, sold-to customers, material and        *
    *   posting date of the sales orders                                   *
    selection-screen begin of block one with frame title text-001.
    parameters:     p_vkorg  type vkorg obligatory memory id vko,"DEVK906677
                    p_vtweg  type vtweg obligatory default '01',
                    p_spart  type spart obligatory default '01'.
    select-options: s_vkbur  for  vbak-vkbur,      " Sales Office     "DEVK906677
                    s_kunnr  for  vbak-kunnr.      " Sold-to customer number.
    select-options: s_shipto for  vbap-oid_ship,   " Ship-to customer number.
                    s_billto for  vbpa-kunnr,      " bill-to from S.O. header.
                    s_load   for  vbpa-kunnr,      " Load confirmation contact.
                    s_truck  for  vbap-oid_extbol. " Trucking ticket number.
    select-options: s_werks for vbap-werks obligatory no intervals. " Plant.
    select-options: s_lgort for vbap-lgort.        " Storage location.
    select-options: s_matnr for vbap-matnr.        " Material number.
    select-options: s_konda for knvv-konda.        " price group
    selection-screen skip 1.
    select-options: s_vdatu for vbak-vdatu default sy-datum.
    selection-screen end of block one.
    * ALV display layout
    selection-screen begin of block layout with frame title text-003.
    parameters: pa_vari type slis_vari default ' '. " Display variant.
    selection-screen end of block layout.
    selection-screen begin of block two with frame title text-028.
    selection-screen comment: /1(79) text-029.
    selection-screen comment: /1(79) text-030.
    selection-screen comment: /1(79) text-031.
    selection-screen comment: /1(79) text-032.
    selection-screen comment: /1(79) text-033.
    selection-screen comment: /1(79) text-034.
    selection-screen comment: /1(79) text-035.
    selection-screen comment: /1(79) text-036.
    selection-screen end of block two.
    * Data Definitions                                                     *
    * Storing Extracted Info.
    types: begin of t_extract,
             vbeln        type vbeln_va,   " Sales order number.
             augru        type augru,      " order reason
             vdatu        type edatu_vbak, " Requested delivery date.
             kunnr        type kunag,      " Sold-to customer number.
             soldto_name  type name1_gp,   " Sold-to name.
             posnr        type posnr_va,   " Item number.
             matnr        type matnr,      " Material number.
             vrkme        type vrkme,      " Sales UoM.
             mseh3        type mseh3,      " UoM text.
             netwr        type netwr_ap,   " Net value of the order item.
             kwmeng       type p length 13 decimals 1, " Quantity.
             werks        type werks_d,    " Plant.
             lgort        type lgort_d,    " Storage location.
             oid_extbol   type oid_extbol, " External BOL or truck ticker header.
             maktx        type maktx,      " Material description.
             oid_ship     type kunwe,      " Ship-to customer number.
             shipto_name  type name1_gp,   " Ship-to name.
             billto       type kunre,      " Bill-to customer number.
             billto_name  type name1_gp,   " Bill-to name.
             load_contact type kunnr,      " Load confirmation contact.
             load_name    type name1_gp,   " Load confirmation contact name.
             truck        type kunnr,      " Truck company number.
             truck_name   type name1_gp,   " Truck company name.
             bstkd        type bstkd,      " PO number.
             ihrez        type ihrez,      " AFE number per the contract/sales order.
             delivery     type vbeln_vl,   " Delivery number.
             posnr_vl     type posnr_vl,   " Delivery item number.
             bill_vbeln   type vbeln_vf,   " Invoice number.
             bill_posnr   type posnr_vf,   " Invoice item number.
             bill_netwr   type netwr_fp,   " Invoice net value.
             statu        type stats,      " Document status.
             auart        type auart,      " order type
             vkorg        type vkorg,      " sales org.
             vtweg        type vtweg,      " distrbtn channel
             spart        type spart,      " division
             vkbur        like vbak-vkbur, " Sales Office DEVK906677
             konda        type konda,      " price group
             tdline       type tdline,     " text for customer account reference
             count        type i,
           end of t_extract.
    data : it_extract  type table of t_extract with header line,
           it_extract2 type table of t_extract with header line.
    data:  it_text type table of tline with header line.
    data: w_index type sy-index,
          w_tdname type tdobname.
    constants: c_minus1       type netwr_ap value '1.00-'.
    *RANGES: r_auart FOR vbak-auart.
    data: r_auart type range of t_extract-auart,
          r_auart_line like line of r_auart.
    * initialization
    initialization.
      tp_event-ucomm = '&ILT'.  " Filter event.
      tp_event-after = 'X'.
      append tp_event to ta_events.
      gs_layout-colwidth_optimize = 'X'.
      tp_print-no_print_listinfos = 'X'.
      tp_print-no_coverpage = 'X'.
      perform set_fieldcat.
      perform alv_eventtab_build using:
    **    Event name     Form to execute     Event internal table
       'TOP_OF_PAGE'  'TOP_OF_PAGE'       gt_events[].
    * changed to exclude following order types
      r_auart_line-sign   = 'I'.
      r_auart_line-option = 'EQ'.
      r_auart_line-low    = 'ZEQ'.
      clear r_auart_line-high.
      append r_auart_line to r_auart.
    * credit memo
      r_auart_line-sign   = 'I'.
      r_auart_line-option = 'EQ'.
      r_auart_line-low    = 'ZPRC'.
      clear r_auart_line-high.
      append r_auart_line to r_auart.
    * debit memo
      r_auart_line-sign   = 'I'.
      r_auart_line-option = 'EQ'.
      r_auart_line-low    = 'ZPRD'.
      clear r_auart_line-high.
      append r_auart_line to r_auart.
      r_auart_line-sign   = 'I'.
      r_auart_line-option = 'EQ'.
      r_auart_line-low    = 'ZDR'.
      clear r_auart_line-high.
      append r_auart_line to r_auart.
    * Industry sales order correction
      r_auart_line-sign   = 'I'.
      r_auart_line-option = 'EQ'.
      r_auart_line-low    = 'ZSOC'.
      clear r_auart_line-high.
      append r_auart_line to r_auart.
    * oilfield FF correction
      r_auart_line-sign   = 'I'.
      r_auart_line-option = 'EQ'.
      r_auart_line-low    = 'ZOCF'.
      clear r_auart_line-high.
      append r_auart_line to r_auart.
    * oilfield WP correction
      r_auart_line-sign   = 'I'.
      r_auart_line-option = 'EQ'.
      r_auart_line-low    = 'ZOCW'.
      clear r_auart_line-high.
      append r_auart_line to r_auart.
    * Dropdown list for all created ALV layouts, global or user-specific
    at selection-screen on value-request for pa_vari.
      perform alv_variant_f4 changing pa_vari.
    * Main BODY of processing logic
    start-of-selection.
      perform extract_data.
    end-of-selection.
      if not it_extract[] is initial.
    * Build headings for report.
        perform build_top_of_page  using gt_list_top_of_page[].
        perform call_alv.
      endif.
    *&      Form  EXTRACT_KEY_DATA
    * Retreive the data for the report.
    form extract_data.
      clear: it_extract.  refresh: it_extract.
    * orders
      select vbak~vbeln vbak~auart vbak~augru vbak~vkorg vbak~vtweg
             vbak~spart vbak~vdatu vbak~kunnr vbak~vkbur
             vbap~posnr vbap~matnr vbap~vrkme vbap~netwr vbap~kwmeng
             vbap~werks vbap~lgort vbap~oid_extbol vbap~oid_ship
        into corresponding fields of table it_extract
        from vbak inner join vbap
             on  vbak~mandt = vbap~mandt
             and vbak~vbeln = vbap~vbeln where
        vbak~auart not in r_auart and
        vbak~vkorg eq p_vkorg and
        vbak~vtweg eq p_vtweg and
        vbak~spart eq p_spart and
        vbak~vkbur in s_vkbur and                               "DEVK906677
        vbak~vdatu in s_vdatu and
        vbak~kunnr in s_kunnr and
        vbap~matnr in s_matnr and
        vbap~werks in s_werks and
        vbap~lgort in s_lgort and
        vbap~oid_extbol in s_truck and
        vbap~oid_ship in s_shipto.
      if sy-subrc <> 0.
        message i000 with text-002 ' ' ' ' ' '.
      endif.
      sort it_extract by vbeln.
      check sy-subrc = 0.
      loop at it_extract.
    * Retrieve and select by load confirmation contacts from header
        select single kunnr from vbpa into it_extract-load_contact
         where vbeln = it_extract-vbeln
           and posnr = '000000'
           and parvw = 'ZB'.
        if it_extract-load_contact in s_load.
          it_extract-load_name = zcl_kna1=>get_name1( it_extract-load_contact ).
        else.
          delete it_extract.
          continue.
        endif.
    * Retrieve and select by sales order bill-to on header level
    * as well as lookup bill-to customer name/description
        select single kunnr from vbpa into it_extract-billto
         where vbeln = it_extract-vbeln
           and posnr = '000000'
           and parvw = 'RE'.
        if sy-subrc = 0.
          if s_billto is initial.
            it_extract-billto_name = zcl_kna1=>get_name1( it_extract-billto ).
          else.
            if it_extract-billto in s_billto.
              it_extract-billto_name = zcl_kna1=>get_name1( it_extract-billto ).
            else.
              delete it_extract.
              continue.
            endif.
          endif.
        else.
    * Newalta - always has bill-to, following will not occur but included
    *           as good programming practice.
          it_extract-billto_name = it_extract-billto.
        endif.
    * Retrieve and select by price group of sold-to
        select single konda from knvv into it_extract-konda
         where kunnr = it_extract-kunnr
           and vkorg = it_extract-vkorg
           and vtweg = it_extract-vtweg
           and spart = it_extract-spart.
        if sy-subrc = 0.
          if not ( it_extract-konda in s_konda ).
            delete it_extract.
            continue.
          endif.
        endif.
    * Retrieve trucking company customer
        select single kunnr from vbpa into it_extract-truck where
          vbeln = it_extract-vbeln and
          posnr = '000000' and
          parvw = 'ZT'.
        if sy-subrc = 0.
          it_extract-truck_name = zcl_kna1=>get_name1( it_extract-truck ).
        endif.
    * Retrieve sold-to name
        it_extract-soldto_name = zcl_kna1=>get_name1( it_extract-kunnr ).
    * Retrieve ship-to name
        it_extract-shipto_name = zcl_kna1=>get_name1( it_extract-oid_ship ).
    * lookup P.O.
        select single bstkd ihrez from vbkd into (it_extract-bstkd, it_extract-ihrez)
         where vbeln = it_extract-vbeln
           and posnr = '000000'.
    * Retreive the material description.
        it_extract-maktx = zcl_material=>get_maktx( it_extract-matnr ).
    * cosmetic change of material number, donot display leading zeros.
        shift it_extract-matnr left deleting leading '0'.
    * translate unit of measure
        it_extract-mseh3 = it_extract-vrkme.
        select single mseh3 from t006a into it_extract-mseh3
         where spras = sy-langu
           and msehi = it_extract-vrkme.
        w_tdname = it_extract-vbeln.
    * read customer account reference which is under 'text'
        call function 'READ_TEXT'
          exporting
            client                        = sy-mandt
            id                            = 'Z010'
            language                      = sy-langu
            name                          = w_tdname
            object                        = 'VBBK'
    *   ARCHIVE_HANDLE                = 0
    *   LOCAL_CAT                     = ' '
    * IMPORTING
    *   HEADER                        =
          tables
            lines                         = it_text
          exceptions
            id                            = 1
            language                      = 2
            name                          = 3
            not_found                     = 4
            object                        = 5
            reference_check               = 6
            wrong_access_to_archive       = 7
            others                        = 8.
        if sy-subrc = 0.
          read table it_text index 1.
          if sy-subrc = 0.
            it_extract-tdline = it_text-tdline.
          else.
            clear it_extract-tdline.
          endif.
        else.
          clear it_extract-tdline.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        endif.
    * Get the delivery item.
        call method zcl_vbap=>get_delivery
          exporting
            itp_vbeln = it_extract-vbeln
            itp_posnr = it_extract-posnr
          importing
            etp_vbeln = it_extract-delivery
            etp_posnr = it_extract-posnr_vl.
        if it_extract-delivery is not initial.
          perform process_deliveries.
        else.
          perform invoice_process.
        endif.
        it_extract-count = 1 .
        move-corresponding it_extract to it_extract2.
        append it_extract2.
        at new vbeln.
          count1 = count1 + 1.
        endat.
      endloop.
    endform.                    " EXTRACT_DATA
    *&      Form  SET_FIELDCAT
    * Create the field catalogue.
    form set_fieldcat .
      clear w_field.
      clear t_fieldcat.  refresh t_fieldcat.
      w_field-col_pos = 1 .
      w_field-fieldname = 'VBELN'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Document.Nbr'.
      w_field-emphasize = 'X'.
      w_field-hotspot   = 'X'.
      append w_field to t_fieldcat.
      clear w_field.
      w_field-col_pos = 2 .
      w_field-fieldname = 'POSNR'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Item'(023).
      append w_field to t_fieldcat.
      clear w_field.
      w_field-col_pos = 3 .
      w_field-fieldname = 'VDATU'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Req. Del. Date'(005).
      append w_field to t_fieldcat.
      w_field-col_pos = 4.                                      "DEVK909658
      w_field-fieldname = 'KUNNR'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Sold-to.'(038).
      append w_field to t_fieldcat.
      w_field-col_pos = 5 .
      w_field-fieldname = 'SOLDTO_NAME'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Sold-to'(006).
      append w_field to t_fieldcat.
      w_field-col_pos = 6 .
      w_field-fieldname = 'MATNR'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Material'(007).
      append w_field to t_fieldcat.
      w_field-col_pos = 7 .
      w_field-fieldname = 'KWMENG'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Quantity'(008).
      append w_field to t_fieldcat.
      w_field-col_pos = 8.
      w_field-fieldname = 'MSEH3'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'UOM'(009).
      append w_field to t_fieldcat.
      w_field-col_pos = 9 .
      w_field-fieldname = 'BILL_VBELN'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Invoice #'(010).
      w_field-emphasize = 'X'.
      w_field-hotspot   = 'X'.
      append w_field to t_fieldcat.
      clear w_field.
      w_field-col_pos = 10 .
      w_field-fieldname = 'BILL_NETWR'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Values'(011).
      append w_field to t_fieldcat.
      w_field-col_pos = 11.
      w_field-fieldname = 'WERKS'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Plant'(012).
      append w_field to t_fieldcat.
      w_field-col_pos = 12.
      w_field-fieldname = 'LGORT'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Storage Loc'(013).
      append w_field to t_fieldcat.
      w_field-col_pos = 13 .
      w_field-fieldname = 'MAKTX'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Description'(014).
      append w_field to t_fieldcat.
      w_field-col_pos = 14.                                     "DEVK909658
      w_field-fieldname = 'OID_SHIP'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Ship-to.'(039).
      append w_field to t_fieldcat.
      w_field-col_pos = 15 .
      w_field-fieldname = 'SHIPTO_NAME'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Ship-to'(015).
      append w_field to t_fieldcat.
      w_field-col_pos = 16.                                     "DEVK909658
      w_field-fieldname = 'BILLTO'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Bill-to .'(040).
      append w_field to t_fieldcat.
      w_field-col_pos = 17 .
      w_field-fieldname = 'BILLTO_NAME'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Bill-to'(016).
      append w_field to t_fieldcat.
      w_field-col_pos = 18 .
      w_field-fieldname = 'LOAD_NAME'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Load Contact'(017).
      append w_field to t_fieldcat.
      w_field-col_pos = 19 .
      w_field-fieldname = 'TRUCK_NAME'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Truck Comp.'(018).
      append w_field to t_fieldcat.
      w_field-col_pos = 20 .
      w_field-fieldname = 'BSTKD'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'P.O.'(019).
      append w_field to t_fieldcat.
      w_field-col_pos = 21 .
      w_field-fieldname = 'IHREZ'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'AFE Nbr'(020).
      append w_field to t_fieldcat.
      w_field-col_pos = 22 .
      w_field-fieldname = 'OID_EXTBOL'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Truck Ticket'(021).
      append w_field to t_fieldcat.
      w_field-col_pos = 23.
      w_field-fieldname = 'STATU'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Status'(022).
      append w_field to t_fieldcat.
      w_field-col_pos = 24.
      w_field-fieldname = 'AUGRU'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Ord.Reason'(024).
      append w_field to t_fieldcat.
      w_field-col_pos = 25.
      w_field-fieldname = 'TDLINE'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'cstmr.acct.ref.'(027).
      append w_field to t_fieldcat.
      w_field-col_pos = 26 .                                    "DEVK906678
      w_field-fieldname = 'VKBUR'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Sales Office'(037).
      append w_field to t_fieldcat.
      w_field-col_pos = 27.                                     "DEVK909658
      w_field-fieldname = 'COUNT'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Count'(041).
      w_field-do_sum = 'X'.
      append w_field to t_fieldcat.
    endform.                    " SET_FIELDCAT
    *&      Form  CALL_ALV
    * Call the ALV Grid function.
    form call_alv .
      sort it_extract by lgort vbeln.
    * repid is necessary since the ALV F.M. does not work properly with
    * sy-repid.
      repid = sy-repid.
      alv_variant-variant  = pa_vari.
      alv_variant-report   = sy-repid.
      alv_variant-username = sy-uname.
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_callback_program      = repid
          i_callback_user_command = 'USER_COMMAND'
          is_layout               = gs_layout
          it_fieldcat             = t_fieldcat[]
          it_sort                 = gt_sort[]
          i_default               = 'X'
          i_save                  = 'A'
          is_variant              = alv_variant
          it_events               = gt_events[]
          it_event_exit           = ta_events[]
          is_print                = tp_print
        tables
          t_outtab                = it_extract2
        exceptions
          program_error           = 1
          others                  = 2.
      if sy-subrc ne 0.
        message w000 with text-004 ' ' ' ' ' '.
      endif.
    endform.                    " CALL_ALV
    *&      Form  build_top_of_page
    * Build heading for report.                                            *
    *      -->P_GT_LIST_TOP_OF_PAGE[]  Header stuff for report
    form build_top_of_page using   e04_lt_top_of_page type slis_t_listheader.
      data: ls_line type slis_listheader.  "Header table for top of page
    * construct 'top of page' info. to display. In this case, one line.
      data: w_selections(40) type c,
            w_date_from(10) type c,
            w_date_to(10) type c.
      write: s_vdatu-low to w_date_from dd/mm/yyyy.
      if s_vdatu-high is not initial.
        write: s_vdatu-high to w_date_to dd/mm/yyyy.
        clear w_selections.
        concatenate 'Del.Req.Date: ' w_date_from 'To' w_date_to
          into w_selections separated by space.
        clear ls_line.
        ls_line-typ  = 'H'.
        ls_line-info = w_selections.
        append ls_line to e04_lt_top_of_page.
        gs_list_top_of_page-typ = 'S'.
        gs_list_top_of_page-info = ' Total Number of Sales Documents'.
        append gs_list_top_of_page to gt_list_top_of_page.
        gs_list_top_of_page-typ  = 'S'.
        gs_list_top_of_page-info = count1.
        append gs_list_top_of_page to gt_list_top_of_page.
      else.
        clear w_date_to.
        concatenate 'Del.Req.Date: ' w_date_from
             into w_selections separated by space.
        clear ls_line.
        ls_line-typ  = 'H'.
        ls_line-info = w_selections.
        append ls_line to e04_lt_top_of_page.
      endif.
    endform.                    " build_top_of_page
    *&      Form  alv_eventtab_build
    *     Pass list of events to be triggered by the ALV function module
    form alv_eventtab_build using  u_name  type slis_alv_event-name
                                   u_form  type slis_alv_event-form
                                   alv_lt_events  type slis_t_event.
      data: ls_event type slis_alv_event.   " structure for event handling
      ls_event-name = u_name.
      ls_event-form = u_form.
      append ls_event to alv_lt_events.
    endform.                    " alv_eventtab_build
    *       FORM TOP_OF_PAGE                                              *
    form top_of_page.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
        exporting
          i_logo             = 'NEWALTA_LOGO'
          it_list_commentary = gt_list_top_of_page.
    endform.                    " TOP_OF_PAGE
    *&      Form  process_deliveries
    * Process the delivery related records.
    form process_deliveries .
      data:
        ltp_date  type wadat_ist, " Goods movement date.
        ltp_vbtyp type vbtyp_n,
        ltp_mtart type mtart, " Material type.
        w_lfimg   type lfimg, " Actual quantity delivered (in sales units).
        w_vrkme   type vrkme. " Sales unit of measure.
    * Read delivery quantity and uom.
      select single lfimg vrkme into (w_lfimg, w_vrkme)
        from lips where
        vbeln = it_extract-delivery and
        posnr = it_extract-posnr_vl.
    * these fields have values from vbap. override with lips values
      if sy-subrc = 0.
        it_extract-kwmeng = w_lfimg.
        it_extract-vrkme  = w_vrkme.
    * translate unit of measure
        it_extract-mseh3 = it_extract-vrkme.
        select single mseh3 from t006a into it_extract-mseh3
         where spras = sy-langu
           and msehi = it_extract-vrkme.
      endif.
    * Determine STATUS by reading 'service confirmation', R (goods movemt)
    * it is possible to have multiple 'service confirmation' records for
    * one item. ie. delivery 80010390 in PRD.
    * As long as there is at least one 'service confirmation' record,
    * status is considered 'complete'.
    * Validate the created on date of the goods movement or service confirmation.
      ltp_mtart = zcl_material=>get_mtart( it_extract-matnr ).
    *  ltp_date = zcl_lips=>get_goods_movement_date( itp_vbeln = it_extract-delivery
    *                           itp_posnr = it_extract-posnr_vl itp_mtart = ltp_mtart ).
      call method zcl_lips=>get_goods_mvt_info
        exporting
          itp_vbeln = it_extract-delivery
          itp_posnr = it_extract-posnr_vl
          itp_mtart = ltp_mtart
        importing
          rtp_date  = ltp_date
          rtp_vbtyp = ltp_vbtyp.
    * 'h' is cancel goods issue
      if ltp_vbtyp = 'h'.
        it_extract-statu = 'Incomplete'(025).
      else.
        if ltp_date is not initial.
          it_extract-statu = 'COMPLETE'(026).
        endif.
      endif.
    * Retrieve the invoice/billing document item.
      call method zcl_lips=>get_invoice
        exporting
          itp_vbeln = it_extract-delivery
          itp_posnr = it_extract-posnr_vl
        importing
          rtp_vbeln = it_extract-bill_vbeln
          rtp_posnr = it_extract-bill_posnr.
      if it_extract-bill_vbeln is not initial.
    * retrieve net value from the invoice.
        clear it_extract-bill_netwr.
        select single netwr into it_extract-bill_netwr from vbrp
         where vbeln = it_extract-bill_vbeln
           and posnr = it_extract-bill_posnr.
      else.
        it_extract-bill_netwr = it_extract-netwr. " Use order net value.
      endif.
    endform.                    " process_deliveries
    *&      Form  user_command
    * Process the user command.
    *      -->R_UCOMM      User command
    *      -->RS_SELFIELD  Field selected
    form user_command using r_ucomm     like sy-ucomm
                            rs_selfield type slis_selfield.
      data: ltp_vbeln type vbeln.  " Sales document number.
      case  r_ucomm.
        when '&IC1'.
          if ( rs_selfield-fieldname = 'VBELN'
            or rs_selfield-fieldname = 'BILL_VBELN' )
           and rs_selfield-value is not initial.        " Display sales document.
            ltp_vbeln = rs_selfield-value.
            zcl_sales_doc=>display( ltp_vbeln ).
          endif.
        when '&ILT'.
          data:
    lta_filt type slis_t_filtered_entries.
          break rdrury.
          call function 'REUSE_ALV_LIST_LAYOUT_INFO_GET'
    importing
    *      es_layout               = gs_layout
    *      et_fieldcat             = t_fieldcat[]
    *      et_sort                 = gt_sort[]
    *   ES_LAYOUT                        =
    *   ET_FIELDCAT                      =
    *   ET_SORT                          =
    *   ET_FILTER                        =
    *   ES_LIST_SCROLL                   =
    *   ES_VARIANT                       =
    *   E_WIDTH                          =
    *   ET_MARKED_COLUMNS                =
       et_filtered_entries              = lta_filt
    *   ET_FILTERED_ENTRIES_HEADER       =
    *   ET_FILTERED_ENTRIES_ITEM         =  lta_filt
    *       TABLES
    *   et_outtab                        =
    *   ET_OUTTAB_HEADER                 =
    *   et_outtab_item                   =
    *   ET_COLLECT00                     =
    *   ET_COLLECT01                     =
    *   ET_COLLECT02                     =
    *   ET_COLLECT03                     =
    *   ET_COLLECT04                     =
    *   ET_COLLECT05                     =
    *   ET_COLLECT06                     =
    *   ET_COLLECT07                     =
    *   ET_COLLECT08                     =
    *   ET_COLLECT09                     =
           exceptions
             no_infos                         = 1
             program_error                    = 2
      endcase.
    endform.                    "user_command
    *&      Form  invoice_process
    * Process for orders without deliveries.                               *
    form invoice_process .
    * Translate unit of measure.
      select single mseh3 from t006a into it_extract-mseh3
       where spras = sy-langu
         and msehi = it_extract-vrkme.
    * Retrieve the invoice/billing document item.
      call method zcl_vbap=>get_invoice
        exporting
          itp_vbeln = it_extract-vbeln
          itp_posnr = it_extract-posnr
        importing
          rtp_vbeln = it_extract-bill_vbeln
          rtp_posnr = it_extract-bill_posnr.
      if it_extract-bill_vbeln is not initial.
    * retrieve net value from the invoice.
        clear it_extract-bill_netwr.
        select single netwr into it_extract-bill_netwr from vbrp
         where vbeln = it_extract-bill_vbeln
           and posnr = it_extract-bill_posnr.
      else. " If no Invoice, then status becomes 'incomplete'.
        it_extract-bill_netwr = it_extract-netwr. " Use order net value.
        it_extract-statu = 'Incomplete'(025).
      endif.
    endform.                    " invoice_process
    *&      Form  alv_variant_f4
    * Get the display variant.
    *      <--CTP_VARI  Variant name
    form alv_variant_f4 changing ctp_vari type slis_vari.
      alv_variant-report   = sy-repid.             " Report ID
      alv_variant-username = sy-uname.             " User ID
      call function 'REUSE_ALV_VARIANT_F4'
        exporting
          is_variant = alv_variant
          i_save     = 'A'
        importing
          es_variant = alv_variant
        exceptions
          others     = 1.
      if sy-subrc = 0.
        ctp_vari = alv_variant-variant.
      endif.
    endform.                    " alv_variant_f4

    I have used all the FM modules mentioned but I am not able to get the total of the sales doc on the top of the page to chnage when filtering of data is done . I just want to see this count of sales document (distict ) and to see it change as filtering is done , be it at any place in teh ALV , its not necessary that it has to be on the top of the ALV output. Could I get some inputs please. As you can see I used the below mentioned FM but on debugging I find the gt_stack is empty still.
    *&      Form  build_top_of_page
    * Build heading for report.                                            *
    *      -->P_GT_LIST_TOP_OF_PAGE[]  Header stuff for report
    FORM build_top_of_page USING   e04_lt_top_of_page TYPE slis_t_listheader.
      DATA: ls_line TYPE slis_listheader.  "Header table for top of page
    * construct 'top of page' info. to display. In this case, one line.
      DATA: w_selections(40) TYPE c,
            w_date_from(10) TYPE c,
            w_date_to(10) TYPE c.
      WRITE: s_vdatu-low TO w_date_from DD/MM/YYYY.
      IF s_vdatu-high IS NOT INITIAL.
        WRITE: s_vdatu-high TO w_date_to DD/MM/YYYY.
        CLEAR w_selections.
        CONCATENATE 'Del.Req.Date: ' w_date_from 'To' w_date_to
          INTO w_selections SEPARATED BY space.
        CLEAR ls_line.
        ls_line-typ  = 'H'.
        ls_line-info = w_selections.
        APPEND ls_line TO e04_lt_top_of_page.
        gs_list_top_of_page-typ = 'S'.
        gs_list_top_of_page-info = ' Total Number of Sales Documents'.
        append gs_list_top_of_page to gt_list_top_of_page.
        gs_list_top_of_page-typ  = 'S'.
        gs_list_top_of_page-info = count1.
        append gs_list_top_of_page to gt_list_top_of_page.
      ELSE.
        CLEAR w_date_to.
        CONCATENATE 'Del.Req.Date: ' w_date_from
             INTO w_selections SEPARATED BY space.
        CLEAR ls_line.
        ls_line-typ  = 'H'.
        ls_line-info = w_selections.
        APPEND ls_line TO e04_lt_top_of_page.
      ENDIF.
    ENDFORM.                    " build_top_of_page
    *&      Form  alv_eventtab_build
    *     Pass list of events to be triggered by the ALV function module
    FORM alv_eventtab_build USING  u_name  TYPE slis_alv_event-name
                                   u_form  TYPE slis_alv_event-form
                                   alv_lt_events  TYPE slis_t_event.
      DATA: ls_event TYPE slis_alv_event.   " structure for event handling
      ls_event-name = u_name.
      ls_event-form = u_form.
      APPEND ls_event TO alv_lt_events.
    ENDFORM.                    " alv_eventtab_build
    *       FORM TOP_OF_PAGE                                              *
    FORM top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          i_logo             = 'NEWALTA_LOGO'
          it_list_commentary = gt_list_top_of_page.
      Data:lt_FILTERED_ENTRIES type SLIS_T_FILTERED_ENTRIES,
      wa_filter like line of lt_FILTERED_ENTRIES.
      data: count2 type i.
    data: it_fieldcat  type slis_t_fieldcat_alv with header line.
      CALL FUNCTION 'REUSE_ALV_LIST_LAYOUT_INFO_GET'
        IMPORTING
          ET_FILTERED_ENTRIES = lt_FILTERED_ENTRIES
        EXCEPTIONS
          NO_INFOS            = 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.
        MESSAGE i000 WITH  count1  .
      ENDIF.
      loop at lt_FILTERED_ENTRIES into wa_filter.
    *    if sy-tabix <> 0.
        if sy-subrc = 0 .
          count2 = count2 + 1.
    *count3 =  count1 - count2 .
    *  write:/ 'Total number of Sales Documents =', count3 .
        endif.
      endloop.
    ENDFORM.                    " TOP_OF_PAGE
    I tried using it at user-command level too but it dosent help.
    Thanks

  • Chnaging the count of doucments on filtering

    Hi I have this report which I have created which also gives the count of distinct documnets at the top-of page, on filtering that number dosent and wont change as that comes from the internal table , I need to show the count of actual number of documents in teh output after the filetring is done alos which will change as per the filtering is done . Is it possible to show a column or somewhere in teh out like the actual document number on top somewhere which will refrlet the actual number of documents in teh output after filter is done based on any of teh selection.
    REPORT  zztest MESSAGE-ID zsd NO STANDARD PAGE HEADING.
    * For ALV usage
    TYPE-POOLS: slis.
    DATA: gs_layout   TYPE slis_layout_alv,
          tp_print    TYPE slis_print_alv,
          gt_sort     TYPE slis_t_sortinfo_alv,
          gt_events   TYPE slis_t_event,
          t_fieldcat  TYPE slis_t_fieldcat_alv WITH HEADER LINE,
          repid       TYPE syrepid,               " ABAP Program.
          gt_list_top_of_page TYPE slis_t_listheader,     " Top of page text.
          gs_list_top_of_page type slis_listheader,
          alv_variant   TYPE disvariant.           " Customize Disp. Variant
    DATA: w_field    TYPE slis_fieldcat_alv.
    DATA: count type i.
    DATA: count1 type i.
    TABLES: vbak, vbap, vbpa, knvv.
    * Definition of selection screen                                       *
    *   By plant, storage location, sold-to customers, material and        *
    *   posting date of the sales orders                                   *
    SELECTION-SCREEN BEGIN OF BLOCK one WITH FRAME TITLE text-001.
    PARAMETERS:     p_vkorg  TYPE vkorg OBLIGATORY MEMORY ID VKO,"DEVK906677
                    p_vtweg  TYPE vtweg OBLIGATORY DEFAULT '01',
                    p_spart  TYPE spart OBLIGATORY DEFAULT '01'.
    SELECT-OPTIONS: s_vkbur  for  vbak-vkbur,      " Sales Office     "DEVK906677
                    s_kunnr  FOR  vbak-kunnr.      " Sold-to customer number.
    SELECT-OPTIONS: s_shipto FOR  vbap-oid_ship,   " Ship-to customer number.
                    s_billto FOR  vbpa-kunnr,      " bill-to from S.O. header.
                    s_load   FOR  vbpa-kunnr,      " Load confirmation contact.
                    s_truck  FOR  vbap-oid_extbol. " Trucking ticket number.
    SELECT-OPTIONS: s_werks FOR vbap-werks OBLIGATORY NO INTERVALS. " Plant.
    SELECT-OPTIONS: s_lgort FOR vbap-lgort.        " Storage location.
    SELECT-OPTIONS: s_matnr FOR vbap-matnr.        " Material number.
    SELECT-OPTIONS: s_konda FOR knvv-konda.        " price group
    SELECTION-SCREEN SKIP 1.
    SELECT-OPTIONS: s_vdatu FOR vbak-vdatu DEFAULT sy-datum.
    SELECTION-SCREEN END OF BLOCK one.
    * ALV display layout
    SELECTION-SCREEN BEGIN OF BLOCK layout WITH FRAME TITLE text-003.
    PARAMETERS: pa_vari TYPE slis_vari DEFAULT ' '. " Display variant.
    SELECTION-SCREEN END OF BLOCK layout.
    SELECTION-SCREEN BEGIN OF BLOCK two WITH FRAME TITLE text-028.
    selection-screen comment: /1(79) text-029.
    selection-screen comment: /1(79) text-030.
    selection-screen comment: /1(79) text-031.
    selection-screen comment: /1(79) text-032.
    selection-screen comment: /1(79) text-033.
    selection-screen comment: /1(79) text-034.
    selection-screen comment: /1(79) text-035.
    selection-screen comment: /1(79) text-036.
    SELECTION-SCREEN END OF BLOCK two.
    * Data Definitions                                                     *
    * Storing Extracted Info.
    TYPES: BEGIN OF t_extract,
             vbeln        TYPE vbeln_va,   " Sales order number.
             augru        TYPE augru,      " order reason
             vdatu        TYPE edatu_vbak, " Requested delivery date.
             kunnr        TYPE kunag,      " Sold-to customer number.
             soldto_name  TYPE name1_gp,   " Sold-to name.
             posnr        TYPE posnr_va,   " Item number.
             matnr        TYPE matnr,      " Material number.
             vrkme        TYPE vrkme,      " Sales UoM.
             mseh3        TYPE mseh3,      " UoM text.
             netwr        TYPE netwr_ap,   " Net value of the order item.
             kwmeng       TYPE p LENGTH 13 DECIMALS 1, " Quantity.
             werks        TYPE werks_d,    " Plant.
             lgort        TYPE lgort_d,    " Storage location.
             oid_extbol   TYPE oid_extbol, " External BOL or truck ticker header.
             maktx        TYPE maktx,      " Material description.
             oid_ship     TYPE kunwe,      " Ship-to customer number.
             shipto_name  TYPE name1_gp,   " Ship-to name.
             billto       TYPE kunre,      " Bill-to customer number.
             billto_name  TYPE name1_gp,   " Bill-to name.
             load_contact TYPE kunnr,      " Load confirmation contact.
             load_name    TYPE name1_gp,   " Load confirmation contact name.
             truck        TYPE kunnr,      " Truck company number.
             truck_name   TYPE name1_gp,   " Truck company name.
             bstkd        TYPE bstkd,      " PO number.
             ihrez        TYPE ihrez,      " AFE number per the contract/sales order.
             delivery     TYPE vbeln_vl,   " Delivery number.
             posnr_vl     TYPE posnr_vl,   " Delivery item number.
             bill_vbeln   TYPE vbeln_vf,   " Invoice number.
             bill_posnr   TYPE posnr_vf,   " Invoice item number.
             bill_netwr   TYPE netwr_fp,   " Invoice net value.
             statu        TYPE stats,      " Document status.
             auart        TYPE auart,      " order type
             vkorg        TYPE vkorg,      " sales org.
             vtweg        TYPE vtweg,      " distrbtn channel
             spart        TYPE spart,      " division
             vkbur        like vbak-vkbur, " Sales Office DEVK906677
             konda        TYPE konda,      " price group
             tdline       TYPE tdline,     " text for customer account reference
             count        TYPE I,
           END OF t_extract.
    DATA : it_extract  TYPE TABLE OF t_extract WITH HEADER LINE,
           it_extract2 TYPE TABLE OF t_extract WITH HEADER LINE.
    DATA:  it_text TYPE TABLE OF tline WITH HEADER LINE.
    DATA: w_index type sy-index,
          w_tdname type TDOBNAME.
    CONSTANTS: c_minus1       type netwr_ap value '1.00-'.
    *RANGES: r_auart FOR vbak-auart.
    Data: r_auart TYPE range of t_extract-auart,
          r_auart_line like line of r_auart.
    * initialization
    INITIALIZATION.
      gs_layout-colwidth_optimize = 'X'.
      tp_print-no_print_listinfos = 'X'.
      tp_print-no_coverpage = 'X'.
      PERFORM set_fieldcat.
      PERFORM alv_eventtab_build USING:
    **    Event name     Form to execute     Event internal table
       'TOP_OF_PAGE'  'TOP_OF_PAGE'       gt_events[].
    * changed to exclude following order types
      r_auart_line-sign   = 'I'.
      r_auart_line-option = 'EQ'.
      r_auart_line-low    = 'ZEQ'.
      clear r_auart_line-high.
      append r_auart_line to r_auart.
    * credit memo
      r_auart_line-sign   = 'I'.
      r_auart_line-option = 'EQ'.
      r_auart_line-low    = 'ZPRC'.
      clear r_auart_line-high.
      append r_auart_line to r_auart.
    * debit memo
      r_auart_line-sign   = 'I'.
      r_auart_line-option = 'EQ'.
      r_auart_line-low    = 'ZPRD'.
      clear r_auart_line-high.
      append r_auart_line to r_auart.
      r_auart_line-sign   = 'I'.
      r_auart_line-option = 'EQ'.
      r_auart_line-low    = 'ZDR'.
      clear r_auart_line-high.
      append r_auart_line to r_auart.
    * Industry sales order correction
      r_auart_line-sign   = 'I'.
      r_auart_line-option = 'EQ'.
      r_auart_line-low    = 'ZSOC'.
      clear r_auart_line-high.
      append r_auart_line to r_auart.
    * oilfield FF correction
      r_auart_line-sign   = 'I'.
      r_auart_line-option = 'EQ'.
      r_auart_line-low    = 'ZOCF'.
      clear r_auart_line-high.
      append r_auart_line to r_auart.
    * oilfield WP correction
      r_auart_line-sign   = 'I'.
      r_auart_line-option = 'EQ'.
      r_auart_line-low    = 'ZOCW'.
      clear r_auart_line-high.
      append r_auart_line to r_auart.
    * Dropdown list for all created ALV layouts, global or user-specific
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR pa_vari.
      PERFORM alv_variant_f4 CHANGING pa_vari.
    * Main BODY of processing logic
    START-OF-SELECTION.
      PERFORM extract_data.
    END-OF-SELECTION.
      IF NOT it_extract[] IS INITIAL.
    * Build headings for report.
        PERFORM build_top_of_page  USING gt_list_top_of_page[].
        PERFORM call_alv.
      ENDIF.
    *&      Form  EXTRACT_KEY_DATA
    * Retreive the data for the report.
    FORM extract_data.
      CLEAR: it_extract.  REFRESH: it_extract.
    * orders
      SELECT vbak~vbeln vbak~auart vbak~augru vbak~vkorg vbak~vtweg
             vbak~spart vbak~vdatu vbak~kunnr vbak~vkbur
             vbap~posnr vbap~matnr vbap~vrkme vbap~netwr vbap~kwmeng
             vbap~werks vbap~lgort vbap~oid_extbol vbap~oid_ship
        INTO CORRESPONDING FIELDS OF TABLE it_extract
        FROM vbak INNER JOIN vbap
             ON  vbak~mandt = vbap~mandt
             AND vbak~vbeln = vbap~vbeln WHERE
        vbak~auart NOT IN r_auart AND
        vbak~vkorg EQ p_vkorg AND
        vbak~vtweg EQ p_vtweg AND
        vbak~spart EQ p_spart AND
        vbak~vkbur in s_vkbur and                               "DEVK906677
        vbak~vdatu IN s_vdatu AND
        vbak~kunnr IN s_kunnr AND
        vbap~matnr IN s_matnr AND
        vbap~werks IN s_werks AND
        vbap~lgort IN s_lgort AND
        vbap~oid_extbol IN s_truck AND
        vbap~oid_ship IN s_shipto.
      IF sy-subrc <> 0.
        MESSAGE i000 WITH text-002 ' ' ' ' ' '.
      ENDIF.
      SORT it_extract BY vbeln.
      CHECK sy-subrc = 0.
      LOOP AT it_extract.
    * Retrieve and select by load confirmation contacts from header
        SELECT SINGLE kunnr FROM vbpa INTO it_extract-load_contact
         WHERE vbeln = it_extract-vbeln
           AND posnr = '000000'
           AND parvw = 'ZB'.
        IF it_extract-load_contact IN s_load.
          it_extract-load_name = zcl_kna1=>get_name1( it_extract-load_contact ).
        ELSE.
          DELETE it_extract.
          CONTINUE.
        ENDIF.
    * Retrieve and select by sales order bill-to on header level
    * as well as lookup bill-to customer name/description
        SELECT SINGLE kunnr FROM vbpa INTO it_extract-billto
         WHERE vbeln = it_extract-vbeln
           AND posnr = '000000'
           AND parvw = 'RE'.
        IF sy-subrc = 0.
          if s_billto is initial.
            it_extract-billto_name = zcl_kna1=>get_name1( it_extract-billto ).
          else.
            if it_extract-billto in s_billto.
              it_extract-billto_name = zcl_kna1=>get_name1( it_extract-billto ).
            else.
              DELETE it_extract.
              CONTINUE.
            endif.
          endif.
        ELSE.
    * Newalta - always has bill-to, following will not occur but included
    *           as good programming practice.
          it_extract-billto_name = it_extract-billto.
        ENDIF.
    * Retrieve and select by price group of sold-to
        SELECT SINGLE konda FROM knvv INTO it_extract-konda
         WHERE kunnr = it_extract-kunnr
           AND vkorg = it_extract-vkorg
           AND vtweg = it_extract-vtweg
           AND spart = it_extract-spart.
        IF sy-subrc = 0.
          IF NOT ( it_extract-konda IN s_konda ).
            DELETE it_extract.
            CONTINUE.
          ENDIF.
        ENDIF.
    * Retrieve trucking company customer
        SELECT SINGLE kunnr FROM vbpa INTO it_extract-truck WHERE
          vbeln = it_extract-vbeln AND
          posnr = '000000' AND
          parvw = 'ZT'.
        IF sy-subrc = 0.
          it_extract-truck_name = zcl_kna1=>get_name1( it_extract-truck ).
        ENDIF.
    * Retrieve sold-to name
        it_extract-soldto_name = zcl_kna1=>get_name1( it_extract-kunnr ).
    * Retrieve ship-to name
        it_extract-shipto_name = zcl_kna1=>get_name1( it_extract-oid_ship ).
    * lookup P.O.
        SELECT SINGLE bstkd ihrez FROM vbkd INTO (it_extract-bstkd, it_extract-ihrez)
         WHERE vbeln = it_extract-vbeln
           AND posnr = '000000'.
    * Retreive the material description.
        it_extract-maktx = zcl_material=>get_maktx( it_extract-matnr ).
    * cosmetic change of material number, donot display leading zeros.
        SHIFT it_extract-matnr LEFT DELETING LEADING '0'.
    * translate unit of measure
        it_extract-mseh3 = it_extract-vrkme.
        SELECT SINGLE mseh3 FROM t006a INTO it_extract-mseh3
         WHERE spras = sy-langu
           AND msehi = it_extract-vrkme.
        w_tdname = it_extract-vbeln.
    * read customer account reference which is under 'text'
        CALL FUNCTION 'READ_TEXT'
          EXPORTING
            CLIENT                        = SY-MANDT
            ID                            = 'Z010'
            LANGUAGE                      = sy-langu
            NAME                          = w_tdname
            OBJECT                        = 'VBBK'
    *   ARCHIVE_HANDLE                = 0
    *   LOCAL_CAT                     = ' '
    * IMPORTING
    *   HEADER                        =
          TABLES
            LINES                         = it_text
          EXCEPTIONS
            ID                            = 1
            LANGUAGE                      = 2
            NAME                          = 3
            NOT_FOUND                     = 4
            OBJECT                        = 5
            REFERENCE_CHECK               = 6
            WRONG_ACCESS_TO_ARCHIVE       = 7
            OTHERS                        = 8.
        IF SY-SUBRC = 0.
          read table it_text index 1.
          if sy-subrc = 0.
            it_extract-tdline = it_text-tdline.
          else.
            clear it_extract-tdline.
          endif.
        ELSE.
          clear it_extract-tdline.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    * Get the delivery item.
        CALL METHOD zcl_vbap=>get_delivery
          EXPORTING
            itp_vbeln = it_extract-vbeln
            itp_posnr = it_extract-posnr
          IMPORTING
            etp_vbeln = it_extract-delivery
            etp_posnr = it_extract-posnr_vl.
        IF it_extract-delivery IS NOT INITIAL.
          PERFORM process_deliveries.
        ELSE.
          PERFORM invoice_process.
        ENDIF.
    it_extract-count = 1 .
        MOVE-CORRESPONDING it_extract TO it_extract2.
        APPEND it_extract2.
        AT NEW vbeln.
          count1 = count1 + 1.
        ENDAT.
    CALL FUNCTION 'REUSE_ALV_EVENT_NAMES_GET'
    * EXPORTING
    *   I_LIST_TYPE           = 0
      TABLES
        T_EVENT_NAMES         = it_extract2
    EXCEPTIONS
       LIST_TYPE_WRONG       = 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.
      ENDLOOP.
    ENDFORM.                    " EXTRACT_DATA
    *&      Form  SET_FIELDCAT
    * Create the field catalogue.
    FORM set_fieldcat .
      CLEAR w_field.
      CLEAR t_fieldcat.  REFRESH t_fieldcat.
      w_field-col_pos = 1 .
      w_field-fieldname = 'VBELN'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Document.Nbr'.
      w_field-emphasize = 'X'.
      w_field-hotspot   = 'X'.
      APPEND w_field TO t_fieldcat.
      CLEAR w_field.
      w_field-col_pos = 2 .
      w_field-fieldname = 'POSNR'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Item'(023).
      APPEND w_field TO t_fieldcat.
      CLEAR w_field.
      w_field-col_pos = 3 .
      w_field-fieldname = 'VDATU'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Req. Del. Date'(005).
      APPEND w_field TO t_fieldcat.
      w_field-col_pos = 4.                                      "DEVK909658
      w_field-fieldname = 'KUNNR'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Sold-to.'(038).
      APPEND w_field TO t_fieldcat.
      w_field-col_pos = 5 .
      w_field-fieldname = 'SOLDTO_NAME'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Sold-to'(006).
      APPEND w_field TO t_fieldcat.
      w_field-col_pos = 6 .
      w_field-fieldname = 'MATNR'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Material'(007).
      APPEND w_field TO t_fieldcat.
      w_field-col_pos = 7 .
      w_field-fieldname = 'KWMENG'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Quantity'(008).
      APPEND w_field TO t_fieldcat.
      w_field-col_pos = 8.
      w_field-fieldname = 'MSEH3'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'UOM'(009).
      APPEND w_field TO t_fieldcat.
      w_field-col_pos = 9 .
      w_field-fieldname = 'BILL_VBELN'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Invoice #'(010).
      w_field-emphasize = 'X'.
      w_field-hotspot   = 'X'.
      APPEND w_field TO t_fieldcat.
      CLEAR w_field.
      w_field-col_pos = 10 .
      w_field-fieldname = 'BILL_NETWR'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Values'(011).
      APPEND w_field TO t_fieldcat.
      w_field-col_pos = 11.
      w_field-fieldname = 'WERKS'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Plant'(012).
      APPEND w_field TO t_fieldcat.
      w_field-col_pos = 12.
      w_field-fieldname = 'LGORT'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Storage Loc'(013).
      APPEND w_field TO t_fieldcat.
      w_field-col_pos = 13 .
      w_field-fieldname = 'MAKTX'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Description'(014).
      APPEND w_field TO t_fieldcat.
      w_field-col_pos = 14.                                     "DEVK909658
      w_field-fieldname = 'OID_SHIP'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Ship-to.'(039).
      APPEND w_field TO t_fieldcat.
      w_field-col_pos = 15 .
      w_field-fieldname = 'SHIPTO_NAME'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Ship-to'(015).
      APPEND w_field TO t_fieldcat.
      w_field-col_pos = 16.                                     "DEVK909658
      w_field-fieldname = 'BILLTO'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Bill-to .'(040).
      APPEND w_field TO t_fieldcat.
      w_field-col_pos = 17 .
      w_field-fieldname = 'BILLTO_NAME'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Bill-to'(016).
      APPEND w_field TO t_fieldcat.
      w_field-col_pos = 18 .
      w_field-fieldname = 'LOAD_NAME'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Load Contact'(017).
      APPEND w_field TO t_fieldcat.
      w_field-col_pos = 19 .
      w_field-fieldname = 'TRUCK_NAME'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Truck Comp.'(018).
      APPEND w_field TO t_fieldcat.
      w_field-col_pos = 20 .
      w_field-fieldname = 'BSTKD'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'P.O.'(019).
      APPEND w_field TO t_fieldcat.
      w_field-col_pos = 21 .
      w_field-fieldname = 'IHREZ'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'AFE Nbr'(020).
      APPEND w_field TO t_fieldcat.
      w_field-col_pos = 22 .
      w_field-fieldname = 'OID_EXTBOL'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Truck Ticket'(021).
      APPEND w_field TO t_fieldcat.
      w_field-col_pos = 23.
      w_field-fieldname = 'STATU'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Status'(022).
      APPEND w_field TO t_fieldcat.
      w_field-col_pos = 24.
      w_field-fieldname = 'AUGRU'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Ord.Reason'(024).
      APPEND w_field TO t_fieldcat.
      w_field-col_pos = 25.
      w_field-fieldname = 'TDLINE'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'cstmr.acct.ref.'(027).
      APPEND w_field TO t_fieldcat.
      w_field-col_pos = 26 .                                    "DEVK906678
      w_field-fieldname = 'VKBUR'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Sales Office'(037).
      APPEND w_field TO t_fieldcat.
      w_field-col_pos = 27.                                     "DEVK909658
      w_field-fieldname = 'COUNT'.
      w_field-tabname = 'IT_EXTRACT2'.
      w_field-seltext_l = 'Count'(041).
      w_field-do_sum = 'X'.
      APPEND w_field TO t_fieldcat.
    ENDFORM.                    " SET_FIELDCAT
    *&      Form  CALL_ALV
    * Call the ALV Grid function.
    FORM call_alv .
      SORT it_extract BY lgort vbeln.
    * repid is necessary since the ALV F.M. does not work properly with
    * sy-repid.
      repid = sy-repid.
      alv_variant-variant  = pa_vari.
      alv_variant-report   = sy-repid.
      alv_variant-username = sy-uname.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program      = repid
          i_callback_user_command = 'USER_COMMAND'
          is_layout               = gs_layout
          it_fieldcat             = t_fieldcat[]
          it_sort                 = gt_sort[]
          i_default               = 'X'
          i_save                  = 'A'
          is_variant              = alv_variant
          it_events               = gt_events[]
          is_print                = tp_print
        TABLES
          t_outtab                = it_extract2
        EXCEPTIONS
          program_error           = 1
          OTHERS                  = 2.
      IF sy-subrc NE 0.
        MESSAGE w000 WITH text-004 ' ' ' ' ' '.
      ENDIF.
    ENDFORM.                    " CALL_ALV
    *&      Form  build_top_of_page
    * Build heading for report.                                            *
    *      -->P_GT_LIST_TOP_OF_PAGE[]  Header stuff for report
    FORM build_top_of_page USING   e04_lt_top_of_page TYPE slis_t_listheader.
      DATA: ls_line TYPE slis_listheader.  "Header table for top of page
    * construct 'top of page' info. to display. In this case, one line.
      DATA: w_selections(40) TYPE c,
            w_date_from(10) TYPE c,
            w_date_to(10) TYPE c.
      WRITE: s_vdatu-low TO w_date_from DD/MM/YYYY.
      IF s_vdatu-high IS NOT INITIAL.
        WRITE: s_vdatu-high TO w_date_to DD/MM/YYYY.
        CLEAR w_selections.
        CONCATENATE 'Del.Req.Date: ' w_date_from 'To' w_date_to
          INTO w_selections SEPARATED BY space.
        CLEAR ls_line.
        ls_line-typ  = 'H'.
        ls_line-info = w_selections.
        APPEND ls_line TO e04_lt_top_of_page.
        gs_list_top_of_page-typ = 'S'.
        gs_list_top_of_page-info = ' Total Number of Sales Documents'.
        append gs_list_top_of_page to gt_list_top_of_page.
        gs_list_top_of_page-typ  = 'S'.
        gs_list_top_of_page-info = count1.
        append gs_list_top_of_page to gt_list_top_of_page.
      ELSE.
        CLEAR w_date_to.
        CONCATENATE 'Del.Req.Date: ' w_date_from
             INTO w_selections SEPARATED BY space.
        CLEAR ls_line.
        ls_line-typ  = 'H'.
        ls_line-info = w_selections.
        APPEND ls_line TO e04_lt_top_of_page.
      ENDIF.
    ENDFORM.                    " build_top_of_page
    *&      Form  alv_eventtab_build
    *     Pass list of events to be triggered by the ALV function module
    FORM alv_eventtab_build USING  u_name  TYPE slis_alv_event-name
                                   u_form  TYPE slis_alv_event-form
                                   alv_lt_events  TYPE slis_t_event.
      DATA: ls_event TYPE slis_alv_event.   " structure for event handling
      ls_event-name = u_name.
      ls_event-form = u_form.
      APPEND ls_event TO alv_lt_events.
    ENDFORM.                    " alv_eventtab_build
    *       FORM TOP_OF_PAGE                                              *
    FORM top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          i_logo             = 'NEWALTA_LOGO'
          it_list_commentary = gt_list_top_of_page.
    ENDFORM.                    " TOP_OF_PAGE
    *&      Form  process_deliveries
    * Process the delivery related records.
    FORM process_deliveries .
      DATA:
        ltp_date  TYPE wadat_ist, " Goods movement date.
        ltp_vbtyp TYPE vbtyp_n,
        ltp_mtart TYPE mtart, " Material type.
        w_lfimg   TYPE lfimg, " Actual quantity delivered (in sales units).
        w_vrkme   TYPE vrkme. " Sales unit of measure.
    * Read delivery quantity and uom.
      SELECT SINGLE lfimg vrkme INTO (w_lfimg, w_vrkme)
        FROM lips WHERE
        vbeln = it_extract-delivery AND
        posnr = it_extract-posnr_vl.
    * these fields have values from vbap. override with lips values
      IF sy-subrc = 0.
        it_extract-kwmeng = w_lfimg.
        it_extract-vrkme  = w_vrkme.
    * translate unit of measure
        it_extract-mseh3 = it_extract-vrkme.
        SELECT SINGLE mseh3 FROM t006a INTO it_extract-mseh3
         WHERE spras = sy-langu
           AND msehi = it_extract-vrkme.
      ENDIF.
    * Determine STATUS by reading 'service confirmation', R (goods movemt)
    * it is possible to have multiple 'service confirmation' records for
    * one item. ie. delivery 80010390 in PRD.
    * As long as there is at least one 'service confirmation' record,
    * status is considered 'complete'.
    * Validate the created on date of the goods movement or service confirmation.
      ltp_mtart = zcl_material=>get_mtart( it_extract-matnr ).
    *  ltp_date = zcl_lips=>get_goods_movement_date( itp_vbeln = it_extract-delivery
    *                           itp_posnr = it_extract-posnr_vl itp_mtart = ltp_mtart ).
      CALL METHOD zcl_lips=>get_goods_mvt_info
        EXPORTING
          itp_vbeln = it_extract-delivery
          itp_posnr = it_extract-posnr_vl
          itp_mtart = ltp_mtart
        IMPORTING
          rtp_date  = ltp_date
          rtp_vbtyp = ltp_vbtyp.
    * 'h' is cancel goods issue
      IF ltp_vbtyp = 'h'.
        it_extract-statu = 'Incomplete'(025).
      ELSE.
        IF ltp_date IS NOT INITIAL.
          it_extract-statu = 'COMPLETE'(026).
        ENDIF.
      ENDIF.
    * Retrieve the invoice/billing document item.
      CALL METHOD zcl_lips=>get_invoice
        EXPORTING
          itp_vbeln = it_extract-delivery
          itp_posnr = it_extract-posnr_vl
        IMPORTING
          rtp_vbeln = it_extract-bill_vbeln
          rtp_posnr = it_extract-bill_posnr.
      IF it_extract-bill_vbeln IS NOT INITIAL.
    * retrieve net value from the invoice.
        CLEAR it_extract-bill_netwr.
        SELECT SINGLE netwr INTO it_extract-bill_netwr FROM vbrp
         WHERE vbeln = it_extract-bill_vbeln
           AND posnr = it_extract-bill_posnr.
      ELSE.
        it_extract-bill_netwr = it_extract-netwr. " Use order net value.
      ENDIF.
    ENDFORM.                    " process_deliveries
    *&      Form  user_command
    * Process the user command.
    *      -->R_UCOMM      User command
    *      -->RS_SELFIELD  Field selected
    FORM user_command USING r_ucomm     LIKE sy-ucomm
                            rs_selfield TYPE slis_selfield.
      DATA: ltp_vbeln TYPE vbeln.  " Sales document number.
      CASE  r_ucomm.
        WHEN '&IC1'.
          IF ( rs_selfield-fieldname = 'VBELN'
            OR rs_selfield-fieldname = 'BILL_VBELN' )
           AND rs_selfield-value IS NOT INITIAL.        " Display sales document.
            ltp_vbeln = rs_selfield-value.
            zcl_sales_doc=>display( ltp_vbeln ).
          ENDIF.
      ENDCASE.
    ENDFORM.                    "user_command
    *&      Form  invoice_process
    * Process for orders without deliveries.                               *
    FORM invoice_process .
    * Translate unit of measure.
      SELECT SINGLE mseh3 FROM t006a INTO it_extract-mseh3
       WHERE spras = sy-langu
         AND msehi = it_extract-vrkme.
    * Retrieve the invoice/billing document item.
      CALL METHOD zcl_vbap=>get_invoice
        EXPORTING
          itp_vbeln = it_extract-vbeln
          itp_posnr = it_extract-posnr
        IMPORTING
          rtp_vbeln = it_extract-bill_vbeln
          rtp_posnr = it_extract-bill_posnr.
      IF it_extract-bill_vbeln IS NOT INITIAL.
    * retrieve net value from the invoice.
        CLEAR it_extract-bill_netwr.
        SELECT SINGLE netwr INTO it_extract-bill_netwr FROM vbrp
         WHERE vbeln = it_extract-bill_vbeln
           AND posnr = it_extract-bill_posnr.
      ELSE. " If no Invoice, then status becomes 'incomplete'.
        it_extract-bill_netwr = it_extract-netwr. " Use order net value.
        it_extract-statu = 'Incomplete'(025).
      ENDIF.
    ENDFORM.                    " invoice_process
    *&      Form  alv_variant_f4
    * Get the display variant.
    *      <--CTP_VARI  Variant name
    FORM alv_variant_f4 CHANGING ctp_vari TYPE slis_vari.
      alv_variant-report   = sy-repid.             " Report ID
      alv_variant-username = sy-uname.             " User ID
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
        EXPORTING
          is_variant = alv_variant
          i_save     = 'A'
        IMPORTING
          es_variant = alv_variant
        EXCEPTIONS
          OTHERS     = 1.
      IF sy-subrc = 0.
        ctp_vari = alv_variant-variant.
      ENDIF.
    ENDFORM.                    " alv_variant_f4
    Kind help will be greatly appreciated.
    Thanks
    Aarav

    Aarav,
    when you call the ALV you need to set the event exit details for filter:
    *Set callback after filter
      REFRESH T_EVENT_EXIT.
      CLEAR WA_EVENT_EXIT.
      WA_EVENT_EXIT-UCOMM = '&ILT'.
      WA_EVENT_EXIT-AFTER = 'X'.
      APPEND WA_EVENT_EXIT TO T_EVENT_EXIT.
    Then call the ALV as per usual with the event exit details:
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
             EXPORTING
                  I_CALLBACK_PROGRAM       = 'Z_OWDR_MONTH_END_01'
                  I_CALLBACK_PF_STATUS_SET = Z_PF_STATUS_SET
                  I_CALLBACK_USER_COMMAND  = 'CALLBACK_USER_COMMAND'
                  I_BACKGROUND_ID          = 'ALV_BACKGROUND'
                  IS_LAYOUT                = Z_IS_LAYOUT
                  IT_FIELDCAT              = T_FIELDCAT2
                  IT_FILTER                = T_FILTER
                  I_SAVE                   = 'A'
                  IS_VARIANT               = Z_VARIANT
                  IT_EVENT_EXIT            = T_EVENT_EXIT
             TABLES
                  T_OUTTAB                 = T_OUT
             EXCEPTIONS
                  PROGRAM_ERROR            = 1
                  OTHERS                   = 2.
    Then in the 'callback_user_command' insert some code to read the filter settings when the filter function is selected using function 'REUSE_ALV_GRID_LAYOUT_INFO_GET':
    FORM CALLBACK_USER_COMMAND USING UCOMM LIKE SY-UCOMM
                                       SELFIELD TYPE SLIS_SELFIELD.
    CASE UCOMM.
    WHEN '&ILT'.
          PERFORM 99_STORE_FILTERS.
    ENDCASE.
    FORM 99_STORE_FILTERS.
      CALL FUNCTION 'REUSE_ALV_GRID_LAYOUT_INFO_GET'
           IMPORTING
                ET_FILTER           = T_FILTER
                ET_FILTERED_ENTRIES = T_FILTERED
           EXCEPTIONS
                NO_INFOS            = 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.
    ENDFORM.                    " 99_STORE_FILTERS
    Hope that makes it clear - worked for me.
    Claire

  • What are the transactions we use day to day in the bw before go live

    what are the transactions we use most in the bw before go live?
    Tcodes for backend objects like creating infocube and so on.
    Tcodes for front end objects like creating queries and so on.
    Thank you.
    York

    Hi Les,
    check previous posting
    Transaction Codes for BW Developers
    SAP BW n R/3 transactions.
    table TSTCT contains all the transaction codes
    RSA6 Maintain DataSources
    RSA7 BW Delta Queue Monitor
    RSA8 DataSource Repository
    RSA9 Transfer Application Components
    RSD1 Characteristic maintenance
    RSD2 Maintenance of key figures
    RSD3 Maintenance of units
    RSD4 Maintenance of time characteristics
    RSDBC DB connect
    RSDDV Maintaining Aggregates
    RSIMPCUR Load Exchange Rates from File
    RSISET Maintain InfoSets
    RSKC Maintaining the Permittd Extra Chars
    RSLGMP Maintain RSLOGSYSMAP
    RSMO Data Load Monitor Start
    RSMON BW Administrator Workbench
    RSOR BW Metadata Repository
    RSORBCT BI Business Content Transfer
    RSORMDR BW Metadata Repository
    RSPC Process Chain Maintenance
    RSPC1 Process Chain Display
    RSPCM Monitor daily process chains
    RSRCACHE OLAP: Cache Monitor
    RSRT Start of the report monitor
    RSRT1 Start of the Report Monitor
    RSRT2 Start of the Report Monitor
    RSRTRACE Set trace configuration
    RSRTRACETEST Trace tool configuration
    RSRV Analysis and Repair of BW Objects
    SE03 Transport Organizer Tools
    SE06 Set Up Transport Organizer
    SE07 CTS Status Display
    SE09 Transport Organizer
    SE10 Transport Organizer
    SE11 ABAP Dictionary
    SE24 Class Builder
    SE80 Object Navigator
    RSCUSTA Maintain BW Settings
    RSCUSTA2 ODS Settings
    RSCUSTV*
    RSSM Authorizations for Reporting
    SM04 User List
    SM12 Display and Delete Locks
    SM21 Online System Log Analysis
    SM37 Overview of job selection
    SM50 Work Process Overview
    SM51 List of SAP Systems
    SM58 Asynchronous RFC Error Log
    SM59 RFC Destinations (Display/Maintain)
    LISTCUBE List viewer for InfoCubes
    LISTSCHEMA Show InfoCube schema
    DB02 Tables and Indexes Monitor
    DB14 Display DBA Operation Logs
    DB16 Display DB Check Results
    DB20 Update DB Statistics
    r/3 (bw related)
    SBIW BIW in IMG for OLTP
    BD61 Activate Change Pointers - Generally
    BDLS Convert Logical System Names
    BF11 Application Areas
    RSA2 OLTP Metadata Repository
    RSA3 Extractor Checker
    RSA5 Install Business Content
    RSA6 Maintain DataSources
    RSA7 BW Delta Queue Monitor
    RSA8 DataSource Repository
    RSA9 Transfer Application Components
    RSO2 Oltp Metadata Repository
    RSO3 Set Up Deltas for Master Data
    LO setup table
    OLI1BW INVCO Stat. Setup: Material Movemts
    OLI2BW INVCO Stat. Setup: Stor. Loc. Stocks
    OLI3BW Reorg.PURCHIS BW Extract Structures
    OLI4BW Reorg. PPIS Extract Structures
    OLI7BW Reorg. of VIS Extr. Struct.: Order
    OLI8BW Reorg. VIS Extr. Str.: Delivery
    OLI9BW Reorg. VIS Extr. Str.: Invoices
    OLIABW Setup: BW agency business
    OLIFBW Reorg. Rep. Manuf. Extr. Structs
    OLIIBW Reorg. of PM Info System for BW
    OLIQBW QM Infosystem Reorganization for BW
    OLISBW Reorg. of CS Info System for BW
    OLIZBW INVCO Setup: Invoice Verification
    Check out AHP's reply specifically in the link:
    urgent
    Assign Points if Helpful *****
    Regards,
    Ravikanth

  • List of tcode in BW/BI

    Hi
    please let me know list of tcodes in bw/bi

    Hi Suneel,
    MODELING
    RSA1 - Modeling
    RSORBCT - Business Content
    RSORMDR - Meta Data Repository
    Object Maintenance
    RSDMPROM - MultiProvider
    RSISET - InfoSet
    RSDCUBE - InfoCube
    RSDODSD - ODS Object
    RSD1 - Info Object
    Master Data Maintenance
    RSDMD - Master Data
    RSH1 - Hierarchies
    BUSINESS EXPLORER
    RRMX - Analyzer
    Authorizations
    PFCG - Maintain Roles
    RSSM - Reporting Authorizations Objects
    Query
    RSZC - Copy
    RSZDELETE - Delete Object
    RSBBS - RRI targets
    BEx Monitor
    RSRT1 - Query Monitor
    RSRTRACE - Trace Tool
    RSRCACHE - OLAP : Cache Monitor
    SMICM - ICM Monitor
    RSA6 Maintain DataSources
    RSA7 BW Delta Queue Monitor
    RSA8 DataSource Repository
    RSA9 Transfer Application Components
    RSD1 Characteristic maintenance
    RSD2 Maintenance of key figures
    RSD3 Maintenance of units
    RSD4 Maintenance of time characteristics
    RSDBC DB connect
    RSDDV Maintaining Aggregates
    RSIMPCUR Load Exchange Rates from File
    RSISET Maintain InfoSets
    RSKC Maintaining the Permittd Extra Chars
    RSLGMP Maintain RSLOGSYSMAP
    RSMO Data Load Monitor Start
    RSMON BW Administrator Workbench
    RSOR BW Metadata Repository
    RSORBCT BI Business Content Transfer
    RSORMDR BW Metadata Repository
    RSPC Process Chain Maintenance
    RSPC1 Process Chain Display
    RSPCM Monitor daily process chains
    RSRCACHE OLAP: Cache Monitor
    RSRT Start of the report monitor
    RSRT1 Start of the Report Monitor
    RSRT2 Start of the Report Monitor
    RSRTRACE Set trace configuration
    RSRTRACETEST Trace tool configuration
    RSRV Analysis and Repair of BW Objects
    SE03 Transport Organizer Tools
    SE06 Set Up Transport Organizer
    SE07 CTS Status Display
    SE09 Transport Organizer
    SE10 Transport Organizer
    SE11 ABAP Dictionary
    SE24 Class Builder
    SE80 Object Navigator
    RSCUSTA Maintain BW Settings
    RSCUSTA2 ODS Settings
    RSCUSTV*
    RSSM Authorizations for Reporting
    SM04 User List
    SM12 Display and Delete Locks
    SM21 Online System Log Analysis
    SM37 Overview of job selection
    SM50 Work Process Overview
    SM51 List of SAP Systems
    SM58 Asynchronous RFC Error Log
    SM59 RFC Destinations (Display/Maintain)
    LISTCUBE List viewer for InfoCubes
    LISTSCHEMA Show InfoCube schema
    DB02 Tables and Indexes Monitor
    DB14 Display DBA Operation Logs
    DB16 Display DB Check Results
    DB20 Update DB Statistics
    r/3 (bw related)
    SBIW BIW in IMG for OLTP
    BD61 Activate Change Pointers - Generally
    BDLS Convert Logical System Names
    BF11 Application Areas
    RSA2 OLTP Metadata Repository
    RSA3 Extractor Checker
    RSA5 Install Business Content
    RSA6 Maintain DataSources
    RSA7 BW Delta Queue Monitor
    RSA8 DataSource Repository
    RSA9 Transfer Application Components
    RSO2 Oltp Metadata Repository
    RSO3 Set Up Deltas for Master Data
    LO setup table
    OLI1BW INVCO Stat. Setup: Material Movemts
    OLI2BW INVCO Stat. Setup: Stor. Loc. Stocks
    OLI3BW Reorg.PURCHIS BW Extract Structures
    OLI4BW Reorg. PPIS Extract Structures
    OLI7BW Reorg. of VIS Extr. Struct.: Order
    OLI8BW Reorg. VIS Extr. Str.: Delivery
    OLI9BW Reorg. VIS Extr. Str.: Invoices
    OLIABW Setup: BW agency business
    OLIFBW Reorg. Rep. Manuf. Extr. Structs
    OLIIBW Reorg. of PM Info System for BW
    OLIQBW QM Infosystem Reorganization for BW
    OLISBW Reorg. of CS Info System for BW
    OLIZBW INVCO Setup: Invoice Verification
    TSTCT IS THE TABLE WHICH CONTAINS TRANSACTION CODES
    TO GET LIST OF TRANSACTION CODES IN BW
    1.GO TO SE93
    2. PRESS F4
    3. IN THE SEARCH TYPE RS* TO GET THE LIST OF TRANSACTION CODES STARTING WITH RS.
    Here r the some of the transaction codes used by BW developers
    RSBO INFOSPOKE
    RSBOMO2 OPEN HUB MONITOR
    RSBOH1 OPEN HUB MAINTANENCE
    RSBOH2 OPEN HUB MAINTANENCE
    RSBOH3 OPEN HUB MAINTANENCE
    RSBO_EXTRACT AUTHORIZATION CHECK OPEN HUB EXTRACTION
    RSA1 ADMINISTRATOR WORK BENCH
    RSA3 EXTRACTION CHECKER
    RSA5 TRANSFER BUSINESS CONTENT
    RSA6 POST PROCESS OF DATA SORUCES
    RSA7 DELTA QUEUE MONITOR
    RSA8 DATA SOURCE REPOSITORY
    RSA9 TRANSFER APPLICATION COMPONENTS
    RSADMIN MAINTENANCE VIEW
    RSATTR ATTRIBUTE HIERARCHY RUN REALIGNMENT
    RSBBS QUERY JUMP TARGER
    RSD1 MAINTAIN INFO OBJECT
    RSDBC DB CONNECT
    RSDDV AGGREGATE MAINTANENCE
    RSDL DB CONNECT TEST PROGRAM
    RSH1 EDIT HIERARCHY
    RSH3 SIMULATE HIERARCHY
    RSIMG BW IMG
    RSIS1 CREATE INFO SOURCES
    RSISET MAINTAIN INFO SETS
    RSKC MAINTAIN PERMITTED CHARACTERS
    RSMO MONITOR
    RSO2 GENERIC DATA SOURCE
    RSO3 SET UP DELTA FOR GENERIC DATA SOURCE
    RSPC PROCESS CHAIN MAINTENANCE
    RSRAJ START REPORTING AGENT JOB
    RSRT REPORT MONITOR
    RSRTRACE SET TRACE CONFIGURATION
    RSRV ANALYSIS AND REPARI OR BW OBJECTS
    RSSM AUTHORIZATIONS FOR REPORTING
    RSSMQ START QUERY WITH USER
    RSSU53 DISPLAY BW AUTHORIZATION CHECK
    RSZC COPY QUERIES BETWEEN INFO PROVIDERS
    RSZDELETE DELETE QUERY OBJECTS
    RRMX TO GO TO BEX REPORTING FROM RSA1
    SM37 JOB SELECTION/STATUS
    SM38 ABAP EDITOR
    rsa11 InfoProvider
    rsa12 InfoSources
    rsa15 PSA
    RSODS EDIT ODS
    RSD1 EDIT INFO OBJECT
    SU53 CHECKING FOR AUTHORIZATIONS
    RS00 Start menu
    RS12 Overview of master data locks
    RSA0 Content Settings Maintenance
    RSA1 BW Administrator Workbench
    RSA10 Realtime Test Interface Srce System
    RSA11 Calling up AWB with the IC tree
    RSA12 Calling up AWB with the IS tree
    RSA13 Calling up AWB with the LG tree
    RSA14 Calling up AWB with the IO tree
    RSA15 Calling up AWB with the ODS tree
    RSA1OLD BW Administrator Workbench (old)
    RSA2 OLTP Metadata Repository
    RSA3 Extractor Checker
    RSA5 Install Business Content
    RSA6 Maintain DataSources
    RSA7 BW Delta Queue Monitor
    RSA8 DataSource Repository
    RSA9 Transfer Application Components
    RSADMIN RSADMIN maintenance
    RSADRTC70TOADR11 Conversion of table TC70 in ADR11
    RSANWB Model the Analysis Process
    RSANWB_CRM_ATTR Fill CRM Attributes
    RSANWB_EXEC Execute Analysis Process
    RSANWB_IMP Calculation of Importance
    RSANWB_START_ALL Model the Analysis Process
    RSANWB_SURVEY Analysis Process: Create Target Grp
    RSAN_CLTV CLTV Modeling
    RSAN_CLTV1 CLTV
    RSAN_RESP Response Prediction Models
    RSAN_RFM RFM Modeling
    RSAN_SALES_PL_CALL Execute Sales Planning
    RSAN_SURV_SHOW BW Survey
    RSAN_SURV_TG BW Survey: Target Group Management
    RSAN_VERI Analysis Process: Test Monitor
    RSAN_WB_TST IMC Wrapper Transaction for Testing
    RSARCH_ADMIN BW Archive Administration
    RSARFCEX Variant for RSARFCEX
    RSASSIBTCH Schedule Assistant in Background
    RSATTR Attribute/Hierarchy Realignment Run
    RSAWB New AWB
    RSAWBSETTINGSDEL Delete user settings of the AWB
    RSB0 Maintain OLAP authorization object
    RSB1 Display authorization object
    RSB2 Data Marts Generation Center
    RSBBS Maintaining BW Sender-Receiver
    RSBBS_WEB Transaction for the RRI in the Web
    RSBCTMA_AC xCBL Action Codes
    RSBCTMA_DT Mapping of Ext./Int. Document Type
    RSBEB Business Explorer Browser
    RSBMO2 Open Hub Monitor
    RSBO Open Hub Maintenance
    RSBOH1 Open Hub Maintenance
    RSBOH2 Open Hub Maintenance
    RSBOH3 Open Hub Maintenance
    RSBO_EXTRACT Auth Check Open Hub Extraction
    RSBROWSER BW Browser
    RSBWREMOTE Create Warehouse User
    RSCATTAWB CATT Admin. Workbench
    RSCDS Summarization routine
    RSCONCHA Channel conversion
    RSCONFAV Favorites Conversion
    RSCRMDEBUG Set Debug Options
    RSCRMISQ Regis. of Infosets for Target Groups
    RSCRMMDX Edit MDX
    RSCRMMON Monitor Query Extracts
    RSCRMSCEN Regist. Closed-Loop Scenarios
    RSCRM_BAPI Test Program for RSCRM Interface
    RSCRM_REPORT BW Queries with ODBO (to 2nd 0B)
    RSCRT BW Monitor (Near)-Real-Time Loading
    RSCR_MAINT_PUBLISH Maint. of Publishing Variables CR/CE
    RSCR_MAINT_URL Maint. of URL Variables for CR/CE
    RSCUSTA Maintain BW Settings
    RSCUSTA2 ODS Settings
    RSCUSTV1 BW Customizing - View 1
    RSCUSTV10 BW Customizing - View 10
    RSCUSTV11 BW Customizing - View 11
    RSCUSTV12 Microsoft Analysis Services
    RSCUSTV13 RRI Settings for Web Reporting
    RSCUSTV14 OLAP: Cache Parameters
    RSCUSTV15 BW Customizing - View 11
    RSCUSTV16 BW Reporting
    RSCUSTV17 Settings: Currency Translation
    RSCUSTV18 DB Connect Settings
    RSCUSTV19 InfoSet Settings
    RSCUSTV2 BW Customizing - View 2
    RSCUSTV3 BW Customizing - View 3
    RSCUSTV4 BW Customizing - View 4
    RSCUSTV5 BW Customizing - View 5
    RSCUSTV6 BW Customizing - View 6
    RSCUSTV7 BW Customizing - View 7
    RSCUSTV8 BW Customizing - View 8
    RSCUSTV9 BW Customizing - View 9
    RSD1 Characteristic maintenance
    RSD2 Maintenance of key figures
    RSD3 Maintenance of units
    RSD4 Maintenance of time characteristics
    RSD5 Internal: Maint. of Techn. Chars
    RSDBC DB connect
    RSDB_ADD_ID_2_CRM Create External ID for CRM-GP
    RSDB_INIT Initial Download of D&B Data
    RSDCUBE Start: InfoCube editing
    RSDCUBED Start: InfoCube editing
    RSDCUBEM Start: InfoCube editing
    RSDDV Maintaining Aggregates
    RSDIOBC Start: InfoObject catalog editing
    RSDIOBCD Start: InfoObject catalog editing
    RSDIOBCM Start: InfoObject catalog editing
    RSDL DB Connect - Test Program
    RSDMD Master Data Maintenance w.Prev. Sel.
    RSDMD_TEST Master Data Test
    RSDMPRO Initial Screen: MultiProvider Proc.
    RSDMPROD Initial Screen: MultiProvider Proc.
    RSDMPROM Initial Screen: MultiProvider Proc.
    RSDMWB Data Mining Workbench
    RSDODS Initial Screen: ODS Object Processng
    RSDODSD Initial Screen: ODS Proces. (Deliv.)
    RSDPMDDBSETUP Creates a MOLAP Database in MSAS
    RSDPMOLAPDS MOLAP DataSource creation
    RSDPRFCDSETUP Create MOLAP Rfc Tests
    RSDSD DataSource Documentation
    RSDU_SHOWTEMPINCTAB RSDU_SHOWTEMPINCTAB
    RSDV Validity Slice Maintenance
    RSD_ACAT Maintain InfoObject catalog
    RSEDIT Old editor
    RSEIDOCM Variant for RSEIDOCM
    RSENQ Display of Lock Log
    RSEOUT00 Variant for RSEOUT00
    RSFH Test Transaction Data Extractors
    RSFLAT Flat MDX
    RSFREQUPL Frequent upload from source systems
    RSGWLST Accessible Gateways
    RSH1 Edit hierarchy initial screen
    RSH3 Simulate hierarchies
    RSHIER Hierarchy maintenance w/o AdmWB
    RSHIERINT Hierarchy maintenance from AdmWB
    RSHIERSIM Simulate hierarchies
    RSICUBE Maintain/Change InfoCubes (Internal)
    RSIMG BW IMG
    RSIMPCUR Load Exchange Rates from File
    RSINPUT Manual Data Entry
    RSIR_DELTATRACK KPro Delta Tracking
    RSISET Maintain InfoSets
    RSKC Maintaining the Permittd Extra Chars
    RSLDAPSYNC_USER LDAP Synchronization of Users
    RSLGMP Maintain RSLOGSYSMAP
    RSMD Extractor Checker
    RSMDCNVEXIT Conversn to Consistent Intern. Vals
    RSMDEXITON Activate Conversion Routine
    RSMO Data Load Monitor Start
    RSMON BW Administrator Workbench
    RSMONCOLOR Traffic light color in the Monitor
    RSMONITOR_DB D&B Integration
    RSMONMAIL Mail Addresses for Monitor Assistant
    RSNPGTEST Test Network Plan Control
    RSNPGTEST2 Test Network Plan Control
    RSNSPACE BW Namespace Maintenance
    RSO2 Oltp Metadata Repository
    RSO3 Set Up Deltas for Master Data
    RSOCONTENT Administration of a Content System
    RSOCOPY Copy from TLOGO Objects
    RSODADMIN Administration BW Document Managemt.
    RSOR BW Metadata Repository
    RSORBCT BI Business Content Transfer
    RSORMDR BW Metadata Repository
    RSPC Process Chain Maintenance
    RSPC1 Process Chain Display
    RSPCM Monitor daily process chains
    RSPFPAR Display profile parameter
    RSQ02 Maintain InfoSets
    RSQ10 SAP Query: Role Administration
    RSQ11 InfoSet Query: Web reporting
    RSRAJ Starts a Reporting Agent Job
    RSRAM Reporting Agent Monitor
    RSRAPS Manages Page Store
    RSRCACHE OLAP: Cache Monitor
    RSRCATTTRACE Catt transaction for trace tool
    RSREP BW Administrator Workbench
    RSRFCCHK RFC destinations with logon data
    RSRHIERARCHYVIRT Maintain Virtual Time Hierarchies
    RSRQ Data Load Monitor for a Request
    RSRR_WEB Report-Report Interface in Web
    RSRT Start of the report monitor
    RSRT1 Start of the Report Monitor
    RSRT2 Start of the Report Monitor
    RSRTRACE Set trace configuration
    RSRTRACETEST Trace tool configuration
    RSRV Analysis and Repair of BW Objects
    RSRVALT Analysis of the BW objects
    RSR_TRACE Trace Monitor
    RSR_WEB_VARIABLES Variable Entry in Web
    RSSCD100_PFCG Change Docs for Role Administration
    RSSCD100_PFCG_USER for Role Assignment
    RSSCM_APPL Application settings SCM4.0 and BW
    RSSD Access for scheduler
    RSSE Selection start InfoCube
    RSSGPCLA Maintain program class
    RSSG_BROWSER Simple Data Browser
    RSSM Authorizations for Reporting
    RSSMQ Start Query with User
    RSSMTRACE Reporting Log Authorization
    RSSTARTMON Starting the monitor in parall.proc.
    RSSU53 Display authorization check BW
    RST22 Old Short-Dump Overview
    RSTB Choose Object Name
    RSTBHIST Table history
    RSTG_BUPA Target Group Sel. Business Partners
    RSTG_CUST Target Group Selection Customers
    RSTG_DB Target Group Selection D&B
    RSTG_DB_WEB Target Group Selection D&B
    RSTPRFC Create Destination for After-Import
    RSU0 Update rules overview
    RSU1 Create update rules
    RSU1I Create update rules
    RSU1O Create Update Rules
    RSU2 Change update rules
    RSU2I Change update rules
    RSU2O Change Update Rules
    RSU3 Display update rules
    RSU3I Display update rules
    RSU3O Display Update Rules
    RSU6 Delete update rules
    RSU6I Delete update rules
    RSU6O Delete update rules
    RSU7 Data Extraction: Maintain Parameters
    RSUSR003 Check standard user passwords
    RSUSR200 List of Users per Login Date
    RSWELOGD Delete Event Trace
    RSWEWWDHMSHOW Display Background Job SWWERRE
    RSWEWWDHSHOW Display Work Item Deadline Monitorng
    RSWWCLEAR Execute Work Item Clearing Work
    RSWWCOND Execute Work Item Rule Monitoring
    RSWWDHEX ExecuteWorkItemDeadlineMonitoring
    RSWWERRE Start RSWWERRE
    RSZC Copying Queries between InfoCubes
    RSZDELETE Deletion of query objects
    RSZT Get Test Component
    RSZTESTFB Shortcut Function Test Environment
    RSZV Call up of view V_RSZGLOBV
    RSZVERSION Set frontend version
    RS_AWB_REMOTE Remote AWB Staging
    RS_BCT_BWBEOTYP Maintain BW Backend Object Types
    RS_DS_CHECK Check consistency request
    RS_ISTD_REMOTE Maintain InfoSource
    RS_LOGSYS_CHECK Source System Tool
    RS_PERS_ACTIVATE Activation of BEx Personalization
    RS_PERS_BOD_ACTIVATE Activate BEx Open Pers.
    RS_PERS_BOD_DEACTIVA Deactivate Pers. for BEx Open
    RS_PERS_VAR_ACTIVATE Activate Variable Pers.
    RS_PERS_VAR_DEACTIVA Deactivate Pers. for Variables
    RS_PERS_WTE_ACTIVATE Activate Web Template Pers.
    RS_PERS_WTE_DEACTIVA Deactivate Pers. for Web Template
    SP01 Spool
    RSA1 BW Administrator Workbench
    RSA11 Calling up AWB with the IC tree
    RSA12 Calling up AWB with the IS tree
    RSA13 Calling up AWB with the LG tree
    RSA14 Calling up AWB with the IO tree
    RSA15 Calling up AWB with the ODS tree
    RSA2 OLTP Metadata Repository
    RSA3 Extractor Checker
    RSA5 Install Business Content
    RSA6 Maintain DataSources
    RSA7 BW Delta Queue Monitor
    RSA8 DataSource Repository
    RSA9 Transfer Application Components
    RSD1 Characteristic maintenance
    RSD2 Maintenance of key figures
    RSD3 Maintenance of units
    RSD4 Maintenance of time characteristics
    RSDBC DB connect
    RSDCUBE Start: InfoCube editing
    RSDCUBED Start: InfoCube editing
    RSDCUBEM Start: InfoCube editing
    RSDDV Maintaining
    Aggregates
    RSDIOBC Start: InfoObject catalog editing
    RSDIOBCD Start: InfoObject catalog editing
    RSDIOBCM Start: InfoObject catalog editing
    RSDL DB Connect - Test Program
    RSDMD Master Data Maintenance w.Prev. Sel.
    RSDMD_TEST Master Data Test
    RSDMPRO Initial Screen: MultiProvider Proc.
    RSDMPROD Initial Screen: MultiProvider Proc.
    RSDMPROM Initial Screen: MultiProvider Proc.
    RSDMWB Customer Behavior Modeling
    RSDODS Initial Screen: ODS Object Processng
    RSIMPCUR Load Exchange Rates from File
    RSINPUT Manual Data Entry
    RSIS1 Create InfoSource
    RSIS2 Change InfoSource
    RSIS3 Display InfoSource
    RSISET Maintain InfoSets
    RSKC Maintaining the Permittd Extra Chars
    RSLGMP Maintain RSLOGSYSMAP
    RSMO Data Load Monitor Start
    RSMON BW Administrator Workbench
    RSOR BW Metadata Repository
    RSORBCT BI Business Content Transfer
    RSORMDR BW Metadata Repository
    RSPC Process Chain Maintenance
    RSPC1 Process Chain Display
    RSPCM Monitor daily process chains
    RSRCACHE OLAP: Cache Monitor
    RSRT Start of the report monitor
    RSRT1 Start of the Report Monitor
    RSRT2 Start of the Report Monitor
    RSRTRACE Set trace configuration
    RSRTRACETEST Trace tool configuration
    RSRV Analysis and Repair of BW Objects
    SE03 Transport Organizer Tools
    SE06 Set Up Transport Organizer
    SE07 CTS Status Display
    SE09 Transport Organizer
    SE10 Transport Organizer
    SE11 ABAP Dictionary
    SE18 Business Add-Ins: Definitions
    SE18_OLD Business Add-Ins: Definitions (Old)
    SE19 Business Add-Ins: Implementations
    SE19_OLD Business Add-Ins: Implementations
    SE21 Package Builder
    SE24 Class Builder
    SE80 Object Navigator
    RSCUSTA Maintain BW Settings
    RSCUSTA2 ODS Settings
    RSCUSTV*
    RSSM Authorizations for Reporting
    SM04 User List
    SM12 Display and Delete Locks
    SM21 Online System Log Analysis
    SM37 Overview of job selection
    SM50 Work Process Overview
    SM51 List of SAP Systems
    SM58 Asynchronous RFC Error Log
    SM59 RFC Destinations (Display/Maintain)
    LISTCUBE List viewer for InfoCubes
    LISTSCHEMA Show InfoCube schema
    WE02 Display IDoc
    WE05 IDoc Lists
    WE06 Active IDoc monitoring
    WE07 IDoc statistics
    WE08 Status File Interface
    WE09 Search for IDoc in Database
    WE10 Search for IDoc in Archive
    WE11 Delete IDocs
    WE12 Test Modified Inbound File
    WE14 Test Outbound Processing
    WE15 Test Outbound Processing from MC
    WE16 Test Inbound File
    WE17 Test Status File
    WE18 Generate Status File
    WE19 Test tool
    WE20 Partner Profiles
    WE21 Port definition
    WE23 Verification of IDoc processing
    DB02 Tables and Indexes Monitor
    DB14 Display DBA Operation Logs
    DB16 Display DB Check Results
    DB20 Update DB Statistics
    RSA1 BW Administrator Workbench
    RSA11 Calling up AWB with the IC tree
    RSA12 Calling up AWB with the IS tree
    RSA13 Calling up AWB with the LG tree
    RSA14 Calling up AWB with the IO tree
    RSA15 Calling up AWB with the ODS tree
    RSA2 OLTP Metadata Repository
    RSA3 Extractor Checker
    RSA5 Install Business Content
    RSA6 Maintain DataSources
    RSA7 BW Delta Queue Monitor
    RSA8 DataSource Repository
    RSA9 Transfer Application Components
    RSD1 Characteristic maintenance
    RSD2 Maintenance of key figures
    RSD3 Maintenance of units
    RSD4 Maintenance of time characteristics
    RSDBC DB connect
    RSDCUBE Start: InfoCube editing
    RSDCUBED Start: InfoCube editing
    RSDCUBEM Start: InfoCube editing
    RSDDV Maintaining
    Aggregates
    RSDIOBC Start: InfoObject catalog editing
    RSDIOBCD Start: InfoObject catalog editing
    RSDIOBCM Start: InfoObject catalog editing
    RSDL DB Connect - Test Program
    RSDMD Master Data Maintenance w.Prev. Sel.
    RSDMD_TEST Master Data Test
    RSDMPRO Initial Screen: MultiProvider Proc.
    RSDMPROD Initial Screen: MultiProvider Proc.
    RSDMPROM Initial Screen: MultiProvider Proc.
    RSDMWB Customer Behavior Modeling
    RSDODS Initial Screen: ODS Object Processng
    RSIMPCUR Load Exchange Rates from File
    RSINPUT Manual Data Entry
    RSIS1 Create InfoSource
    RSIS2 Change InfoSource
    RSIS3 Display InfoSource
    RSISET Maintain InfoSets
    RSKC Maintaining the Permittd Extra Chars
    RSLGMP Maintain RSLOGSYSMAP
    RSMO Data Load Monitor Start
    RSMON BW Administrator Workbench
    RSOR BW Metadata Repository
    RSORBCT BI Business Content Transfer
    RSORMDR BW Metadata Repository
    RSPC Process Chain Maintenance
    RSPC1 Process Chain Display
    RSPCM Monitor daily process chains
    RSRCACHE OLAP: Cache Monitor
    RSRT Start of the report monitor
    RSRT1 Start of the Report Monitor
    RSRT2 Start of the Report Monitor
    RSRTRACE Set trace configuration
    RSRTRACETEST Trace tool configuration
    RSRV Analysis and Repair of BW Objects
    SE03 Transport Organizer Tools
    SE06 Set Up Transport Organizer
    SE07 CTS Status Display
    SE09 Transport Organizer
    SE10 Transport Organizer
    SE11 ABAP Dictionary
    SE18 Business Add-Ins: Definitions
    SE18_OLD Business Add-Ins: Definitions (Old)
    SE19 Business Add-Ins: Implementations
    SE19_OLD Business Add-Ins: Implementations
    SE21 Package Builder
    SE24 Class Builder
    SE80 Object Navigator
    RSCUSTA Maintain BW Settings
    RSCUSTA2 ODS Settings
    RSCUSTV*
    RSSM Authorizations for Reporting
    SM04 User List
    SM12 Display and Delete Locks
    SM21 Online System Log Analysis
    SM37 Overview of job selection
    SM50 Work Process Overview
    SM51 List of SAP Systems
    SM58 Asynchronous RFC Error Log
    SM59 RFC Destinations (Display/Maintain)
    LISTCUBE List viewer for InfoCubes
    LISTSCHEMA Show InfoCube schema
    WE02 Display IDoc
    WE05 IDoc Lists
    WE06 Active IDoc monitoring
    WE07 IDoc statistics
    WE08 Status File Interface
    WE09 Search for IDoc in Database
    WE10 Search for IDoc in Archive
    WE11 Delete IDocs
    WE12 Test Modified Inbound File
    WE14 Test Outbound Processing
    WE15 Test Outbound Processing from MC
    WE16 Test Inbound File
    WE17 Test Status File
    WE18 Generate Status File
    WE19 Test tool
    WE20 Partner Profiles
    WE21 Port definition
    WE23 Verification of IDoc processing
    DB02 Tables and Indexes Monitor
    DB14 Display DBA Operation Logs
    DB16 Display DB Check Results
    DB20 Update DB Statistics
    Hope this helps
    Regards
    Hemant Khemani

  • Filtering- Getting count of distinct doc after filtering

    HI Gurus!
    I have a report that shows the sales order report . In its ALV ouptput I have created a count column which gives me the number of lines in the report and also I have created the top of page in which it gives me the number of distinct sales document numbers count . I.e for a particular selection the count of line items are say 765 and the number of distinct sales documents are 70  which I have printed on the top of the page in the layout. Now if we do some kind of filtering process in the output the number of sales documents printed on top of page remains the same while the coumnt of line items changes a sper the filtering . The count on the top of page for the sales order dosent change as it prints the number from the internal table which is understandable. But is there a possibility that I create another column next to the sales doc number column and at the beginning of each of the new sales document it prints one and for all the other duplicates it prints 0 and then do the sum for it , so that even on filtering it gives me the count that remains after filter while the total number of distinct sale doc remains on top from the internal table.
    Is this possible to do so that I get thenumber of sales doc even after filter process?
    If so please advice how to get it.
    Regards

    Well as of now my report does sommething like this.
    *& Report  ZSD_SALES_ORDERS                                            *
    *&         Sales Orders Report (tcode zva05)                           *
    *&         i.e. For 'admins'/oil field application                     *
    report  zztest message-id zsd no standard page heading.
    * For ALV usage
    type-pools: slis.
    data: gs_layout   type slis_layout_alv,
          tp_print    type slis_print_alv,
          gt_sort     type slis_t_sortinfo_alv,
          gt_events   type slis_t_event,
          t_fieldcat  type slis_t_fieldcat_alv with header line,
          repid       type syrepid,               " ABAP Program.
          gt_list_top_of_page type slis_t_listheader,     " Top of page text.
          alv_variant   type disvariant.           " Customize Disp. Variant
    data: w_field    type slis_fieldcat_alv.
    data: gs_list_top_of_page type slis_listheader.
    data: l_count type I.
    data: count1 type I.
    tables: vbak, vbap, vbpa, knvv.
    * Definition of selection screen                                       *
    *   By plant, storage location, sold-to customers, material and        *
    *   posting date of the sales orders                                   *
    selection-screen begin of block one with frame title text-001.
    parameters:     p_vkorg  type vkorg obligatory memory id vko,"DEVK906677
                    p_vtweg  type vtweg obligatory default '01',
                    p_spart  type spart obligatory default '01'.
    select-options: s_vkbur  for  vbak-vkbur,      " Sales Office     "DEVK906677
                    s_kunnr  for  vbak-kunnr.      " Sold-to customer number.
    select-options: s_shipto for  vbap-oid_ship,   " Ship-to customer number.
                    s_billto for  vbpa-kunnr,      " bill-to from S.O. header.
                    s_load   for  vbpa-kunnr,      " Load confirmation contact.
                    s_truck  for  vbap-oid_extbol. " Trucking ticket number.
    select-options: s_werks for vbap-werks obligatory no intervals. " Plant.
    select-options: s_lgort for vbap-lgort.        " Storage location.
    select-options: s_matnr for vbap-matnr.        " Material number.
    select-options: s_konda for knvv-konda.        " price group
    selection-screen skip 1.
    select-options: s_vdatu for vbak-vdatu default sy-datum.
    selection-screen end of block one.
    * ALV display layout
    selection-screen begin of block layout with frame title text-003.
    parameters: pa_vari type slis_vari default ' '. " Display variant.
    selection-screen end of block layout.
    selection-screen begin of block two with frame title text-028.
    selection-screen comment: /1(79) text-029.
    selection-screen comment: /1(79) text-030.
    selection-screen comment: /1(79) text-031.
    selection-screen comment: /1(79) text-032.
    selection-screen comment: /1(79) text-033.
    selection-screen comment: /1(79) text-034.
    selection-screen comment: /1(79) text-035.
    selection-screen comment: /1(79) text-036.
    selection-screen end of block two.
    * Data Definitions                                                     *
    * Storing Extracted Info.
    types: begin of t_extract,
             vbeln        type vbeln_va,   " Sales order number.
             augru        type augru,      " order reason
             vdatu        type edatu_vbak, " Requested delivery date.
             kunnr        type kunag,      " Sold-to customer number.
             posnr        type posnr_va,   " Item number.
             matnr        type matnr,      " Material number.
             vrkme        type vrkme,      " Sales UoM.
             mseh3        type mseh3,      " UoM text.
             netwr        type netwr_ap,   " Net value of the order item.
             kwmeng       type p length 13 decimals 1, " Quantity.
             werks        type werks_d,    " Plant.
             lgort        type lgort_d,    " Storage location.
             oid_extbol   type oid_extbol, " External BOL or truck ticker header.
             maktx        type maktx,      " Material description.
             soldto_name  type name1_gp,   " Sold-to name.
             oid_ship     type kunwe,      " Ship-to customer number.
             shipto_name  type name1_gp,   " Ship-to name.
             billto       type kunre,      " Bill-to customer number.
             billto_name  type name1_gp,   " Bill-to name.
             load_contact type kunnr,      " Load confirmation contact.
             load_name    type name1_gp,   " Load confirmation contact name.
             truck        type kunnr,      " Truck company number.
             truck_name   type name1_gp,   " Truck company name.
             bstkd        type bstkd,      " PO number.
             ihrez        type ihrez,      " AFE number per the contract/sales order.
             delivery     type vbeln_vl,   " Delivery number.
             posnr_vl     type posnr_vl,   " Delivery item number.
             bill_vbeln   type vbeln_vf,   " Invoice number.
             bill_posnr   type posnr_vf,   " Invoice item number.
             bill_netwr   type netwr_fp,   " Invoice net value.
             statu        type stats,      " Document status.
             auart        type auart,      " order type
             vkorg        type vkorg,      " sales org.
             vtweg        type vtweg,      " distrbtn channel
             spart        type spart,      " division
             vkbur        like vbak-vkbur, " Sales Office DEVK906677
             konda        type konda,      " price group
             tdline       type tdline,     " text for customer account reference
             count        type I ,
             count1       type I,
           end of t_extract.
    data :
          it_extract  type table of t_extract with header line,
          it_extract2 type table of t_extract with header line.
    data: it_text type table of tline with header line.
    data: w_index type sy-index,
          w_tdname type tdobname.
    constants: c_minus1       type netwr_ap value '1.00-'.
    *RANGES: r_auart FOR vbak-auart.
    data: r_auart type range of t_extract-auart,
          r_auart_line like line of r_auart.
    * initialization
    initialization.
      gs_layout-colwidth_optimize = 'X'.
      tp_print-no_print_listinfos = 'X'.
      tp_print-no_coverpage = 'X'.
      perform set_fieldcat.
      perform alv_eventtab_build using:
    **    Event name     Form to execute     Event internal table
       'TOP_OF_PAGE'  'TOP_OF_PAGE'       gt_events[].
    * changed to exclude following order types
      r_auart_line-sign   = 'I'.
      r_auart_line-option = 'EQ'.
      r_auart_line-low    = 'ZEQ'.
      clear r_auart_line-high.
      append r_auart_line to r_auart.
    * credit memo
      r_auart_line-sign   = 'I'.
      r_auart_line-option = 'EQ'.
      r_auart_line-low    = 'ZPRC'.
      clear r_auart_line-high.
      append r_auart_line to r_auart.
    * debit memo
      r_auart_line-sign   = 'I'.
      r_auart_line-option = 'EQ'.
      r_auart_line-low    = 'ZPRD'.
      clear r_auart_line-high.
      append r_auart_line to r_auart.
      r_auart_line-sign   = 'I'.
      r_auart_line-option = 'EQ'.
      r_auart_line-low    = 'ZDR'.
      clear r_auart_line-high.
      append r_auart_line to r_auart.
    * Industry sales order correction
      r_auart_line-sign   = 'I'.
      r_auart_line-option = 'EQ'.
      r_auart_line-low    = 'ZSOC'.
      clear r_auart_line-high.
      append r_auart_line to r_auart.
    * oilfield FF correction
      r_auart_line-sign   = 'I'.
      r_auart_line-option = 'EQ'.
      r_auart_line-low    = 'ZOCF'.
      clear r_auart_line-high.
      append r_auart_line to r_auart.
    * oilfield WP correction
      r_auart_line-sign   = 'I'.
      r_auart_line-option = 'EQ'.
      r_auart_line-low    = 'ZOCW'.
      clear r_auart_line-high.
      append r_auart_line to r_auart.
    * Dropdown list for all created ALV layouts, global or user-specific
    at selection-screen on value-request for pa_vari.
      perform alv_variant_f4 changing pa_vari.
    * Main BODY of processing logic
    start-of-selection.
      perform extract_data.
    end-of-selection.
      if not it_extract[] is initial.
    * Build headings for report.
        perform build_top_of_page  using gt_list_top_of_page[].
        perform call_alv.
      endif.
    *&      Form  EXTRACT_KEY_DATA
    * Retreive the data for the report.
    form extract_data.
      clear: it_extract.  refresh: it_extract.
    * orders
      select vbak~vbeln vbak~auart vbak~augru vbak~vkorg vbak~vtweg
             vbak~spart vbak~vdatu vbak~kunnr vbak~vkbur
             vbap~posnr vbap~matnr vbap~vrkme vbap~netwr vbap~kwmeng
             vbap~werks vbap~lgort vbap~oid_extbol vbap~oid_ship
        into corresponding fields of table it_extract
        from vbak inner join vbap
             on  vbak~mandt = vbap~mandt
             and vbak~vbeln = vbap~vbeln where
        vbak~auart not in r_auart and
        vbak~vkorg eq p_vkorg and
        vbak~vtweg eq p_vtweg and
        vbak~spart eq p_spart and
        vbak~vkbur in s_vkbur and                               "DEVK906677
        vbak~vdatu in s_vdatu and
        vbak~kunnr in s_kunnr and
        vbap~matnr in s_matnr and
        vbap~werks in s_werks and
        vbap~lgort in s_lgort and
        vbap~oid_extbol in s_truck and
        vbap~oid_ship in s_shipto .
      if sy-subrc <> 0.
        message i000 with text-002 ' ' ' ' ' '.
      endif.
      sort it_extract by vbeln.
      check sy-subrc = 0.
      loop at it_extract.
    * Retrieve and select by load confirmation contacts from header
        select single kunnr from vbpa into it_extract-load_contact
         where vbeln = it_extract-vbeln
           and posnr = '000000'
           and parvw = 'ZB'.
        if it_extract-load_contact in s_load.
          it_extract-load_name = zcl_kna1=>get_name1( it_extract-load_contact ).
        else.
          delete it_extract.
          continue.
        endif.
    * Retrieve and select by sales order bill-to on header level
    * as well as lookup bill-to customer name/description
        select single kunnr from vbpa into it_extract-billto
         where vbeln = it_extract-vbeln
           and posnr = '000000'
           and parvw = 'RE'.
        if sy-subrc = 0.
          if s_billto is initial.
            it_extract-billto_name = zcl_kna1=>get_name1( it_extract-billto ).
          else.
            if it_extract-billto in s_billto.
              it_extract-billto_name = zcl_kna1=>get_name1( it_extract-billto ).
            else.
              delete it_extract.
              continue.
            endif.
          endif.
        else.
    * Newalta - always has bill-to, following will not occur but included
    *           as good programming practice.
          it_extract-billto_name = it_extract-billto.
        endif.
    * Retrieve and select by price group of sold-to
        select single konda from knvv into it_extract-konda
         where kunnr = it_extract-kunnr
           and vkorg = it_extract-vkorg
           and vtweg = it_extract-vtweg
           and spart = it_extract-spart.
        if sy-subrc = 0.
          if not ( it_extract-konda in s_konda ).
            delete it_extract.
            continue.
          endif.
        endif.
    * Retrieve trucking company customer
        select single kunnr from vbpa into it_extract-truck where
          vbeln = it_extract-vbeln and
          posnr = '000000' and
          parvw = 'ZT'.
        if sy-subrc = 0.
          it_extract-truck_name = zcl_kna1=>get_name1( it_extract-truck ).
        endif.
    * Retrieve sold-to name
        it_extract-soldto_name = zcl_kna1=>get_name1( it_extract-kunnr ).
    * Retrieve ship-to name
        it_extract-shipto_name = zcl_kna1=>get_name1( it_extract-oid_ship ).
    * lookup P.O.
        select single bstkd ihrez from vbkd into (it_extract-bstkd, it_extract-ihrez)
         where vbeln = it_extract-vbeln
           and posnr = '000000'.
    * Retreive the material description.
        it_extract-maktx = zcl_material=>get_maktx( it_extract-matnr ).
    * cosmetic change of material number, donot display leading zeros.
        shift it_extract-matnr left deleting leading '0'.
    * translate unit of measure
        it_extract-mseh3 = it_extract-vrkme.
        select single mseh3 from t006a into it_extract-mseh3
         where spras = sy-langu
           and msehi = it_extract-vrkme.
        w_tdname = it_extract-vbeln.
    * read customer account reference which is under 'text'
        call function 'READ_TEXT'
          exporting
            client                        = sy-mandt
            id                            = 'Z010'
            language                      = sy-langu
            name                          = w_tdname
            object                        = 'VBBK'
    *   ARCHIVE_HANDLE                = 0
    *   LOCAL_CAT                     = ' '
    * IMPORTING
    *   HEADER                        =
          tables
            lines                         = it_text
          exceptions
            id                            = 1
            language                      = 2
            name                          = 3
            not_found                     = 4
            object                        = 5
            reference_check               = 6
            wrong_access_to_archive       = 7
            others                        = 8.
        if sy-subrc = 0.
          read table it_text index 1.
          if sy-subrc = 0.
            it_extract-tdline = it_text-tdline.
          else.
            clear it_extract-tdline.
          endif.
        else.
          clear it_extract-tdline.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        endif.
    * Get the delivery item.
        call method zcl_vbap=>get_delivery
          EXPORTING
            itp_vbeln = it_extract-vbeln
            itp_posnr = it_extract-posnr
          IMPORTING
            etp_vbeln = it_extract-delivery
            etp_posnr = it_extract-posnr_vl.
        if it_extract-delivery is not initial.
          perform process_deliveries.
        else.
          perform invoice_process.
        endif.
        it_extract-count =   1.
        move-corresponding it_extract to it_extract2.
        append it_extract2.
        at new vbeln.
          count1 = count1 +  1.
        endat.
      endloop.
    endform.                    " EXTRACT_DATA
    *&      Form  SET_FIELDCAT
    * Create the field catalogue.
    form set_fieldcat .
      clear w_field.
      clear t_fieldcat.  refresh t_fieldcat.
      w_field-col_pos = 1.
      w_field-fieldname = 'VBELN'.
      w_field-tabname = IT_EXTRACT2.
      w_field-seltext_l = 'Document.Nbr'.
      w_field-emphasize = 'X'.
      w_field-hotspot   = 'X'.
      append w_field to t_fieldcat.
      clear w_field.
      w_field-col_pos = 2 .
      w_field-fieldname = 'POSNR'.
      w_field-tabname = IT_EXTRACT2.
      w_field-seltext_l = 'Item'(023).
      append w_field to t_fieldcat.
      clear w_field.
      w_field-col_pos = 3 .
      w_field-fieldname = 'VDATU'.
      w_field-tabname = IT_EXTRACT2.
      w_field-seltext_l = 'Req. Del. Date'(005).
      append w_field to t_fieldcat.
      w_field-col_pos = 4 .
      w_field-fieldname = 'SOLDTO_NAME'.
      w_field-tabname = IT_EXTRACT2.
      w_field-seltext_l = 'Sold-to'(006).
      append w_field to t_fieldcat.
      w_field-col_pos = 5 .
      w_field-fieldname = 'MATNR'.
      w_field-tabname = IT_EXTRACT2.
      w_field-seltext_l = 'Material'(007).
      append w_field to t_fieldcat.
      w_field-col_pos = 6 .
      w_field-fieldname = 'KWMENG'.
      w_field-tabname = IT_EXTRACT2.
      w_field-seltext_l = 'Quantity'(008).
      append w_field to t_fieldcat.
      w_field-col_pos = 7.
      w_field-fieldname = 'MSEH3'.
      w_field-tabname = IT_EXTRACT2.
      w_field-seltext_l = 'UOM'(009).
      append w_field to t_fieldcat.
      w_field-col_pos = 8 .
      w_field-fieldname = 'BILL_VBELN'.
      w_field-tabname = IT_EXTRACT2.
      w_field-seltext_l = 'Invoice #'(010).
      w_field-emphasize = 'X'.
      w_field-hotspot   = 'X'.
      append w_field to t_fieldcat.
      clear w_field.
      w_field-col_pos = 9 .
      w_field-fieldname = 'BILL_NETWR'.
      w_field-tabname = IT_EXTRACT2.
      w_field-seltext_l = 'Values'(011).
      append w_field to t_fieldcat.
      w_field-col_pos = 10.
      w_field-fieldname = 'WERKS'.
      w_field-tabname = IT_EXTRACT2.
      w_field-seltext_l = 'Plant'(012).
      append w_field to t_fieldcat.
      w_field-col_pos = 11.
      w_field-fieldname = 'LGORT'.
      w_field-tabname = IT_EXTRACT2.
      w_field-seltext_l = 'Storage Loc'(013).
      append w_field to t_fieldcat.
      w_field-col_pos = 12 .
      w_field-fieldname = 'MAKTX'.
      w_field-tabname = IT_EXTRACT2.
      w_field-seltext_l = 'Description'(014).
      append w_field to t_fieldcat.
      w_field-col_pos = 13 .
      w_field-fieldname = 'SHIPTO_NAME'.
      w_field-tabname = IT_EXTRACT2.
      w_field-seltext_l = 'Ship-to'(015).
      append w_field to t_fieldcat.
      w_field-col_pos = 14 .
      w_field-fieldname = 'BILLTO_NAME'.
      w_field-tabname = IT_EXTRACT2.
      w_field-seltext_l = 'Bill-to'(016).
      append w_field to t_fieldcat.
      w_field-col_pos = 15 .
      w_field-fieldname = 'LOAD_NAME'.
      w_field-tabname = IT_EXTRACT2.
      w_field-seltext_l = 'Load Contact'(017).
      append w_field to t_fieldcat.
      w_field-col_pos = 16 .
      w_field-fieldname = 'TRUCK_NAME'.
      w_field-tabname = IT_EXTRACT2.
      w_field-seltext_l = 'Truck Comp.'(018).
      append w_field to t_fieldcat.
      w_field-col_pos = 17 .
      w_field-fieldname = 'BSTKD'.
      w_field-tabname = IT_EXTRACT2.
      w_field-seltext_l = 'P.O.'(019).
      append w_field to t_fieldcat.
      w_field-col_pos = 18 .
      w_field-fieldname = 'IHREZ'.
      w_field-tabname = IT_EXTRACT2.
      w_field-seltext_l = 'AFE Nbr'(020).
      append w_field to t_fieldcat.
      w_field-col_pos = 19 .
      w_field-fieldname = 'OID_EXTBOL'.
      w_field-tabname = IT_EXTRACT2.
      w_field-seltext_l = 'Truck Ticket'(021).
      append w_field to t_fieldcat.
      w_field-col_pos = 20.
      w_field-fieldname = 'STATU'.
      w_field-tabname = IT_EXTRACT2.
      w_field-seltext_l = 'Status'(022).
      append w_field to t_fieldcat.
      w_field-col_pos = 21.
      w_field-fieldname = 'AUGRU'.
      w_field-tabname = IT_EXTRACT2.
      w_field-seltext_l = 'Ord.Reason'(024).
      append w_field to t_fieldcat.
      w_field-col_pos = 22.
      w_field-fieldname = 'TDLINE'.
      w_field-tabname = IT_EXTRACT2.
      w_field-seltext_l = 'cstmr.acct.ref.'(027).
      append w_field to t_fieldcat.
      w_field-col_pos = 23 .                                    "DEVK906678
      w_field-fieldname = 'VKBUR'.
      w_field-tabname = IT_EXTRACT2.
      w_field-seltext_l = 'Sales Office'(037).
      append w_field to t_fieldcat.
      w_field-col_pos = 24.
      w_field-fieldname = 'KUNNR'.
      w_field-tabname = IT_EXTRACT2.
      w_field-seltext_l = 'Sold-to Customer'(038).
      append w_field to t_fieldcat.
      w_field-col_pos = 25.
      w_field-fieldname = 'OID_SHIP'.
      w_field-tabname = IT_EXTRACT2.
      w_field-seltext_l = 'Ship-to Customer'(039).
      append w_field to t_fieldcat.
      w_field-col_pos = 26.
      w_field-fieldname = 'BILLTO'.
      w_field-tabname = IT_EXTRACT2.
      w_field-seltext_l = 'Bill-to Customer'(040).
      append w_field to t_fieldcat.
      w_field-col_pos = 27.
      w_field-fieldname = 'COUNT'.
      w_field-tabname = IT_EXTRACT2.
      w_field-seltext_l = 'Count of line items'(042).
      w_field-do_sum = 'X'.
      append w_field to t_fieldcat.
    endform.                    " SET_FIELDCAT
    *&      Form  CALL_ALV
    * Call the ALV Grid function.
    form call_alv .
      sort it_extract by lgort vbeln.
    * repid is necessary since the ALV F.M. does not work properly with
    * sy-repid.
      repid = sy-repid.
      alv_variant-variant  = pa_vari.
      alv_variant-report   = sy-repid.
      alv_variant-username = sy-uname.
      call function 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program      = repid
          i_callback_user_command = 'USER_COMMAND'
          is_layout               = gs_layout
          it_fieldcat             = t_fieldcat[]
          it_sort                 = gt_sort[]
          i_default               = 'X'
          i_save                  = 'A'
          is_variant              = alv_variant
          it_events               = gt_events[]
          is_print                = tp_print
        TABLES
          t_outtab                = IT_EXTRACT2
        EXCEPTIONS
          program_error           = 1
          others                  = 2.
      if sy-subrc ne 0.
        message w000 with text-004 ' ' ' ' ' '.
      endif.
    endform.                    " CALL_ALV
    *&      Form  build_top_of_page
    * Build heading for report.                                            *
    *      -->P_GT_LIST_TOP_OF_PAGE[]  Header stuff for report
    form build_top_of_page using   e04_lt_top_of_page type slis_t_listheader.
      data: ls_line type slis_listheader.  "Header table for top of page
    * construct 'top of page' info. to display. In this case, one line.
      data: w_selections(40) type c,
            w_date_from(10) type c,
            w_date_to(10) type c.
      write: s_vdatu-low to w_date_from dd/mm/yyyy.
      if s_vdatu-high is not initial.
        write: s_vdatu-high to w_date_to dd/mm/yyyy.
        clear w_selections.
        concatenate 'Del.Req.Date: ' w_date_from 'To' w_date_to
        into w_selections separated by space.
        clear ls_line.
        ls_line-typ  = 'H'.
        ls_line-info = w_selections.
        append ls_line to e04_lt_top_of_page.
        gs_list_top_of_page-typ = 'S'.
        gs_list_top_of_page-info = ' Total number of Sales Documents :'.
        append gs_list_top_of_page to gt_list_top_of_page.
        gs_list_top_of_page-typ  = 'S'.
        gs_list_top_of_page-info =  count1 .
        append gs_list_top_of_page to gt_list_top_of_page.
      else.
        clear w_date_to.
        concatenate 'Del.Req.Date: ' w_date_from
             into w_selections separated by space.
        clear ls_line.
        ls_line-typ  = 'H'.
        ls_line-info = w_selections.
        append ls_line to e04_lt_top_of_page.
      endif.
    endform.                    " build_top_of_page
    *&      Form  alv_eventtab_build
    *     Pass list of events to be triggered by the ALV function module
    form alv_eventtab_build using  u_name  type slis_alv_event-name
                                   u_form  type slis_alv_event-form
                                   alv_lt_events  type slis_t_event.
      data: ls_event type slis_alv_event.   " structure for event handling
      ls_event-name = u_name.
      ls_event-form = u_form.
      append ls_event to alv_lt_events.
    endform.                    " alv_eventtab_build
    *       FORM TOP_OF_PAGE                                              *
    form top_of_page.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          i_logo             = 'LOGO'
          it_list_commentary = gt_list_top_of_page.
    endform.                    " TOP_OF_PAGE
    *&      Form  process_deliveries
    * Process the delivery related records.
    form process_deliveries .
      data:
        ltp_date  type wadat_ist, " Goods movement date.
        ltp_vbtyp type vbtyp_n,
        ltp_mtart type mtart, " Material type.
        w_lfimg   type lfimg, " Actual quantity delivered (in sales units).
        w_vrkme   type vrkme. " Sales unit of measure.
    * Read delivery quantity and uom.
      select single lfimg vrkme into (w_lfimg, w_vrkme)
        from lips where
        vbeln = it_extract-delivery and
        posnr = it_extract-posnr_vl.
    * these fields have values from vbap. override with lips values
      if sy-subrc = 0.
        it_extract-kwmeng = w_lfimg.
        it_extract-vrkme  = w_vrkme.
    * translate unit of measure
        it_extract-mseh3 = it_extract-vrkme.
        select single mseh3 from t006a into it_extract-mseh3
         where spras = sy-langu
           and msehi = it_extract-vrkme.
      endif.
    * Determine STATUS by reading 'service confirmation', R (goods movemt)
    * it is possible to have multiple 'service confirmation' records for
    * one item. ie. delivery 80010390 in PRD.
    * As long as there is at least one 'service confirmation' record,
    * status is considered 'complete'.
    * Validate the created on date of the goods movement or service confirmation.
      ltp_mtart = zcl_material=>get_mtart( it_extract-matnr ).
    *  ltp_date = zcl_lips=>get_goods_movement_date( itp_vbeln = it_extract-delivery
    *                           itp_posnr = it_extract-posnr_vl itp_mtart = ltp_mtart ).
      call method zcl_lips=>get_goods_mvt_info
        EXPORTING
          itp_vbeln = it_extract-delivery
          itp_posnr = it_extract-posnr_vl
          itp_mtart = ltp_mtart
        IMPORTING
          rtp_date  = ltp_date
          rtp_vbtyp = ltp_vbtyp.
    * 'h' is cancel goods issue
      if ltp_vbtyp = 'h'.
        it_extract-statu = 'Incomplete'(025).
      else.
        if ltp_date is not initial.
          it_extract-statu = 'COMPLETE'(026).
        endif.
      endif.
    * Retrieve the invoice/billing document item.
      call method zcl_lips=>get_invoice
        EXPORTING
          itp_vbeln = it_extract-delivery
          itp_posnr = it_extract-posnr_vl
        IMPORTING
          rtp_vbeln = it_extract-bill_vbeln
          rtp_posnr = it_extract-bill_posnr.
      if it_extract-bill_vbeln is not initial.
    * retrieve net value from the invoice.
        clear it_extract-bill_netwr.
        select single netwr into it_extract-bill_netwr from vbrp
         where vbeln = it_extract-bill_vbeln
           and posnr = it_extract-bill_posnr.
      else.
        it_extract-bill_netwr = it_extract-netwr. " Use order net value.
      endif.
    endform.                    " process_deliveries
    *&      Form  user_command
    * Process the user command.
    *      -->R_UCOMM      User command
    *      -->RS_SELFIELD  Field selected
    form user_command using r_ucomm     like sy-ucomm
                            rs_selfield type slis_selfield.
      data: ltp_vbeln type vbeln.  " Sales document number.
      case  r_ucomm.
        when '&IC1'.
          if ( rs_selfield-fieldname = 'VBELN'
            or rs_selfield-fieldname = 'BILL_VBELN' )
           and rs_selfield-value is not initial.        " Display sales document.
            ltp_vbeln = rs_selfield-value.
            zcl_sales_doc=>display( ltp_vbeln ).
          endif.
      endcase.
    endform.                    "user_command
    *&      Form  invoice_process
    * Process for orders without deliveries.                               *
    form invoice_process .
    * Translate unit of measure.
      select single mseh3 from t006a into it_extract-mseh3
       where spras = sy-langu
         and msehi = it_extract-vrkme.
    * Retrieve the invoice/billing document item.
      call method zcl_vbap=>get_invoice
        EXPORTING
          itp_vbeln = it_extract-vbeln
          itp_posnr = it_extract-posnr
        IMPORTING
          rtp_vbeln = it_extract-bill_vbeln
          rtp_posnr = it_extract-bill_posnr.
      if it_extract-bill_vbeln is not initial.
    * retrieve net value from the invoice.
        clear it_extract-bill_netwr.
        select single netwr into it_extract-bill_netwr from vbrp
         where vbeln = it_extract-bill_vbeln
           and posnr = it_extract-bill_posnr.
      else. " If no Invoice, then status becomes 'incomplete'.
        it_extract-bill_netwr = it_extract-netwr. " Use order net value.
        it_extract-statu = 'Incomplete'(025).
      endif.
    endform.                    " invoice_process
    *&      Form  alv_variant_f4
    * Get the display variant.
    *      <--CTP_VARI  Variant name
    form alv_variant_f4 changing ctp_vari type slis_vari.
      alv_variant-report   = sy-repid.             " Report ID
      alv_variant-username = sy-uname.             " User ID
      call function 'REUSE_ALV_VARIANT_F4'
        EXPORTING
          is_variant = alv_variant
          i_save     = 'A'
        IMPORTING
          es_variant = alv_variant
        EXCEPTIONS
          others     = 1.
      if sy-subrc = 0.
        ctp_vari = alv_variant-variant.
      endif.
    endform.                    " alv_variant_f4

  • MATERIAL GROUP & MOVEMENT TYPE

    Hi,
    I want a report in which Material Group & Movemt type combinely should be display.
    Allready search in SDN
    Thanks in Advance
    Regards
    Vinay

    Hi vinay,
    Take the help of abaper to get the report for material group and the movement type.
    Quick viewer reporting tool will be used for this report SQVI
    This link will be useful in understanding the SQVI
    http://www.sapdb.info/sqvi-quick-viewe/
    Regards,
    Nani

  • T-Code to Fill Set Up Table

    Hi Experts,
    Can I have list of T-codes which are used to Fill Setup table for Differnt Applications.
    Thanks,
    DV

    OLI0 C Plant Maintenance Master Data      
    OLI1 INVCO Stat. Setup: Material Movemts      
    OLI1BW     INVCO Stat. Setup: Material Movemts
    OLI2 INVCO Stat.Setup: Stor. Loc. Stocks     
    OLI2BW     INVCO Stat.Setup: Stor. Loc. Stocks
    OLI3 PURCHIS Statistical Setup      
    OLI3BW     Reorg.PURCHIS extract structures BW
    OLI4 SFIS Statistical Setup      
    OLI4BW     Reorganized PPIS Extract Structures
    OLI5 PMIS Statistical Setup      
    OLI6 Periodic stock qty - Storage locatn      
    OLI7 SIS Statistical Setup: Orders      
    OLI7BW     Reorganized VIS Ext. Struct. Order
    OLI8 Set Up SIS for Deliveries      
    OLI8BW     Reorganized VIS Ext. Struct. Del.
    OLI9 SIS Statistical Setup: Billing Docs      
    OLI9BW Reorganized VIS Extr. Struct. Bill.      
    OLIA C Maintenance Processing      
    OLIB PURCHIS: StatUpdateHeader Doc Level     
    OLID SIS: Stat. Setup - Sales Activities      
    OLIE Statistical Setup - TIS: Shipments      
    OLIF PPIS: Setup-RepetitiveManufacturing     
    OLIFBW Reorganized Prod. Extract Structure      
    OLIIBW Reorg. of PM Info System for BW      
    OLIM Periodic stock qty - Plant      
    OLIP C Plant Maintenance Planning      
    OLIQ Reorganization of QM info system      
    OLIQBW Reconstruct QM Infosystem for BW      
    OLIS LIS in the IMG      
    OLISBW Reorg. of CS Info System for BW      
    OLIX Stat. Setup: Copy/Delete Versions      
    OLIZ INVCO Stat.Setup:Invoice Verificatn     
    OLIZBW     INVCO Stat.Setup:Invoice Verificatn

  • Purchase order number for 541 Mvt

    Dear all,
    i have transferred the material to third party via ME20 T.code. In ME2O t.code we can see the purchase order number but in the material document purchase ordernumber refernce is not coming, i need the PO number for the 541 mvt .how to achievre this?
    Regards,
    Renuga.A

    Hi Renuga,
    Use T code OMBW
    Go to movemt type click on material managemnt data
    u will find purchase order with three radio buttons
    tick on field required entry.
    This will show you PO no in material docuemnt.
    Thanks and regards
    Gitesh
    Edited by: gitesh mahamuni on Sep 4, 2009 11:56 AM

  • Query on setup table filling

    Hi,
    can anyone tell me whats the transaction code for filling in set-up tables for sales, delivery and billing related datasources. is it oli7bw, 8 and 9 for them respectively.
    ~rahul

    Here you go. The entire list for ready reference.
    OLI1BW               INVCO Stat. Setup: Material Movemts 
    OLI2BW               INVCO Stat. Setup: Stor. Loc. Stocks
    OLI3BW               Reorg.PURCHIS BW Extract Structures 
    OLI4BW               Reorg. PPIS Extract Structures      
    OLI7BW               Reorg. of VIS Extr. Struct.: Order  
    OLI8BW               Reorg. VIS Extr. Str.: Delivery     
    OLI9BW               Reorg. VIS Extr. Str.: Invoices     
    OLIABW               Setup: BW agency business           
    OLIFBW               Reorg. Rep. Manuf. Extr. Structs    
    OLIIBW               Reorg. of PM Info System for BW     
    OLIQBW               QM Infosystem Reorganization for BW 
    OLISBW               Reorg. of CS Info System for BW     
    OLIZBW               INVCO Setup: Invoice Verification
    Kumar Gudiseva.

  • Lo set up tables

    HI ,
    i want to use 2lis_02_itm and 2lis_03_bf
    Let me know how to fill set up table .
    for these to extractors.

    Hi,
    transaction to fill setup tables are OLI*BW  and LBWG to delete the related content!
    OLI0 C Plant Maintenance Master Data
    OLI1 INVCO Stat. Setup: Material Movemts
    OLI1BW INVCO Stat. Setup: Material Movemts
    OLI2 INVCO Stat.Setup: Stor. Loc. Stocks
    OLI2BW INVCO Stat.Setup: Stor. Loc. Stocks
    OLI3 PURCHIS Statistical Setup
    OLI3BW Reorg.PURCHIS extract structures BW
    OLI4 SFIS Statistical Setup
    OLI4BW Reorganized PPIS Extract Structures
    OLI5 PMIS Statistical Setup
    OLI6 Periodic stock qty - Storage locatn
    OLI7 SIS Statistical Setup: Orders
    OLI7BW Reorganized VIS Ext. Struct. Order
    OLI8 Set Up SIS for Deliveries
    OLI8BW Reorganized VIS Ext. Struct. Del.
    OLI9 SIS Statistical Setup: Billing Docs
    OLI9BW Reorganized VIS Extr. Struct. Bill.
    OLIA C Maintenance Processing
    OLIB PURCHIS: StatUpdateHeader Doc Level
    OLID SIS: Stat. Setup - Sales Activities
    OLIE Statistical Setup - TIS: Shipments
    OLIF PPIS: Setup-RepetitiveManufacturing
    OLIFBW Reorganized Prod. Extract Structure
    OLIIBW Reorg. of PM Info System for BW
    OLIM Periodic stock qty - Plant
    OLIP C Plant Maintenance Planning
    OLIQ Reorganization of QM info system
    OLIQBW Reconstruct QM Infosystem for BW
    OLIS LIS in the IMG
    OLISBW Reorg. of CS Info System for BW
    OLIX Stat. Setup: Copy/Delete Versions
    OLIZ INVCO Stat.Setup:Invoice Verificatn
    OLIZBW INVCO Stat.Setup:Invoice Verificatn
    -Shreya

Maybe you are looking for

  • Strange figures in Purchase Analysis report

    Hello, I am running a purchase analysis report and am a little confused by the results. I am running the reports using goods receipts. What I am finding is that there are a vast amount of zero quantity items shown in the results. When I drill down in

  • Segmentation of Organizations related to other Organizations

    Hi Experts, I am trying to segment Organizations (e.g. Sold-tos) that are related other Organizations (e.g. Buyers). Buyers are not created as contact persons but as corporate accounts as well and are connected to the Sold-to via the relationship "Ha

  • How can I include "sort name" column when burning a playlist to disc?

    I noticed the "sort name" info is missing in the burnt disc. How can I preserve the info? I spent some times in correcting some sorting order in my library and I want that info to be in my backup too.

  • PSE 6 - problem with photos disappearing from Slideshow

    Hello, I worked on a slide show recently and then exported it to a .wma file. I returned to the slide show project in Elements a couple of days later to add another slide. Out of the 27 slides only three were intact. In 25 slides, there were no longe

  • Why does not sync folder work?

    Hi, Running Lightroom 5.5. I am in folder Dress.  I export picture Dress 001.nef to a jpg.  To the same folder.  It does not show up. I then select sync folder, the jpg picture does not show up???? I go to show folder in explorer.. It show Dress 001.