Total BT incompetence

I'm moving house, I'd like to stop one phone line and start another, and take my (thankfully) third party broadband service with me. It must happen all the time - how hard can it be?
Simple, you might think, but despite the fact that I had to go through the 20 minute order process twice in the first place because the first BT representative I spoke to failed to provide me with a SIM provide code to transfer my broadband services simultaneously (even though I told her I used a third party provider and she hung up reminding me to speak to them), I find out now from my broadband provider that BT have, without notifying me, changed the new line number, thereby cancelling the PSTN order on which the SIM provide code was reliant. I will now likely be without a broadband service for a week. Great stuff, well done BT. I am looking forward to calling customer services AGAIN tomorrow morning.
These forums are seemingly browsed by some competent staff at BT (they have helped me out before after I spent hours spent on the phone speaking to people who clearly knew nothing about how to solve a problem) so if there is anyone with any influence over these matters actually reading these messages is there any chance you could get in touch to help me sort out this mess?
Thank you

Hi,
The whole SIM code thing is a slightly tricky one. I believe that BT advisors placing homemoves won't add a SIM code to the order unless the customer specifically requests one. The reason for this is that there are a number of ISPs who don't have their systems set up to use a SIM code, and placing an order containing a SIM code which isn't used makes the order more likely to fail/be delayed, as openreach perform the steps necessary to simultaneously provide broadband and then wait for a response from an ISP which they don't receive.
In regards to the number changing, this occasionally happens when placing homemoves, and shouldn't mean that the order containing the PSTN service and SIM code was cancelled and replaced - if openreach have difficulty activating the phone number originally reserved they simply modify the order 'in-flight', and the SIM provide code would remain unchanged. If BT Retail or Openreach have cancelled and replaced the order it would be because of something other than renumbering; them most likely explanation is that they've determined the status of the line going into your new property is different from what the line tests originally showed, which would mean a different kind of order is required.
If they have indeed cancelled and replaced the order then as you say you will unfortunately be without broadband for a week, however you might get lucky and find that its just a number change on the original order, in which case your ISP can use the SIM code you were originally given and there's no reason (or at least no reason caused by BT) that they'd need to start the 5 working day lead time again).
Good luck, hope this helps! Welcome to the fun world of moving house

Similar Messages

  • BT incompetence!

    Sorry if this is the wrong forum - but i am a little fed up with the incompetence shown by BT when dealing with a customer complaint at trying to transfer phone services to a new property (new build). This is the text of an email, and letter that we have just sent to BT, i'm hoping that someone will have the guts to stand up and take responsibilty for the problems and not start a "not my fault, it's department X's fault, or department Y's fault. BT would not deal with any aspect of our complaint until such time as the phone and broadband connection was set up. They would not even (despite this being their fault, and immediately admitting that this was their fault) escalate the problem to get it recified quickly.
    Dear Sirs
    Following on from our previous correspondence (please see our complaints submitted on 7 & 14 October, under your reference (removed for security)), we can confirm that our phone & broadband have been set up and are now working. However, our experience of dealing with BT over our recent house move has left us totally disgusted with your appalling lack of customer service and unless you are able to rectify matters, as outlined below, we shall be looking for a replacement provider of telephone and broadband services as soon as we are able to do so.
    In summary our complaint is as follows:
    Original order placed on 17 September for a BT engineer to come on 7 October to install our phone line etc. .
    No BT engineer arrived on 7 October, so we contacted BT and we were told that the original order had not been processed correctly and we would have to place a new order.
    In addition, you failed to disconnect our old line on 4 October as agreed with you on 17 September, and did not do so until after our phone call with you on 7 October. The original line –  MUST be cancelled in our name W.E.F 04 Oct 2013. We will not be liable for, nor will we pay any line rental for that number from that date.
    The new order was placed at that point and as we had moved into a new build property, the first available appointment for a BT engineer to come round was not until 29 October (3 weeks later!)
    An engineer (not BT) had been booked to attend the house on 8 October to finalise the installation of networking cables and sockets as part of the house build. This process had to be postponed with the company at very short notice, resulting in the engineer still arriving to carry out the work. This was a wasted day, both for us and the engineer.
    As well as the problems outlined above, we are also very disappointed with the late delivery of our BT home hub 4. Your correspondence to us confirming our replacement order stated that our new home hub kit would be delivered on 25 October, so we arranged for one of us to be at home that day to receive it. After it not arriving on that day we rang BT and they informed us that our new home hub kit would not be delivered until 29 October (the same day as the engineer would be arriving). On 29 October, the BT engineer came and installed the line, but still no home hub arrived, so again another phone call to BT and this time we were told that we were never getting a Home Hub 4 because we already had the Home Hub 3.
    As we have started a new contract with you, we thought we would be entitled to new Home Hub 4.This has now been delivered. However we are not impressed that it was a refurbished version, which we had not been informed that we would be receiving, and the only cable that was included was the power cable, no broadband connection cable, no installation CD etc. Please note that the cable that we are currently using is a spare cable we had from an old phone and is not actually designed for this usage.
    When the original order was placed, we were advised that our new monthly direct debit would be around £40. The amount we had previously been paying, which included BT Infinity 2 was £53.50PM. The last payment taken from us was £65.50. We would have expected this payment to have significantly reduced, not increased. We have recently been advised that our monthly payments will be £51 – this cannot be correct as you have significantly downgraded our service
    As you will appreciate, the overall impression of this regrettable sequence of events is that BT is a grossly incompetent organisation, with poor internal communications and a cavalier disregard of normal standards of customer service. In addition to the stress and waste of our time created by your broken promises, they have caused one or other of us to take three additional days off work, none of which would have been necessary had you installed the line on the date originally agreed with you. The cost of these days off is approximately £250, for which we hold you responsible.
    Accordingly, taking everything into consideration and for the previous problems outlined in our last correspondence (as above) we expect BT to reimburse us to the value of £250. We would also expect a period of free line rental due to the period for which we were without any phone or broadband service, and also a free upgrade and lowered line rental when BT Infinity becomes available to our property.
    We shall look forward to hearing from you soon. Please note that anything other than full compliance with our request is likely to lead to this matter being escalated within and, if necessary, beyond your organisation.

    Hi treker_ed,
    Thanks for posting and welcome to the community!  We can deal with your complaint from here.  Click on my username and under the section "about me" you'll see the link to get in touch with us.
    Please include the link to this thread when you complete the form and whenever we've received your details we'll take it from there.
    Thanks a million,
    Robbie
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry that we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)
    If someone answers your question correctly please let other members know by clicking on ’Mark as Accepted Solution’.

  • Total is not getting displayed in the ALV output.

    Hi,
    Total is not getting displayed in the ALV output.
    I m using :REUSE_ALV_BLOCK_LIST_APPEND & REUSE_ALV_BLOCK_LIST_DISPLAY
    Are  there any issues with it as the same settings are working fine with REUSE_ALV_LIST_DISPLAY
    source code:
    DATA: layout TYPE slis_layout_alv,
          IT_eventS  TYPE slis_t_event,
          fcat   TYPE slis_t_fieldcat_alv WITH HEADER LINE,
          rec_fcat TYPE slis_t_fieldcat_alv WITH HEADER LINE.
    TYPES: BEGIN OF ty_tab,
          belnr TYPE dberchz-belnr,
          belzart TYPE dberchz-belzart,
          net TYPE dberchz-nettobtr,
          END OF ty_tab.
    DATA: lt_tab TYPE STANDARD TABLE OF ty_tab.
    SELECT belnr belzart nettobtr
      FROM dberchz
      INTO TABLE lt_tab[]
    WHERE belnr eq '000000000001'.
      if sy-subrc ne 0.
      ENDIF.
    *  defining layout
    layout-colwidth_optimize = 'X'.
    layout-def_status = 'X'.
    *defning event
    *event
    *defining field catalog
    fcat-col_pos = 1.
    fcat-fieldname = 'BELNR'.
    fcat-tabname  = 'LT_TAB'.
    APPEND fcat.
    fcat-col_pos = 2.
    fcat-fieldname = 'BELZART'.
    fcat-tabname  = 'LT_TAB'.
    APPEND fcat.
    fcat-col_pos = 3.
    fcat-fieldname = 'NET'.
    fcat-tabname  = 'LT_TAB'.
    fcat-do_sum = 'X'.
    APPEND fcat.
    *calling alv
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
      EXPORTING
        i_callback_program             = 'YZ_PLR'
    *   I_CALLBACK_PF_STATUS_SET       = ' '
    *   I_CALLBACK_USER_COMMAND        = ' '
    *   IT_EXCLUDING                   =
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
      EXPORTING
        is_layout                        = layout
        it_fieldcat                      = fcat[]
        i_tabname                        = 'LT_TAB'
        it_events                        = IT_EVENTS[]
    *   IT_SORT                          =
    *   I_TEXT                           = ' '
      tables
        t_outtab                         = lt_tab[]
    * EXCEPTIONS
    *   PROGRAM_ERROR                    = 1
    *   MAXIMUM_OF_APPENDS_REACHED       = 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.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
    Thanks,
    Gaurav

    Hi
    No I don't think, this is my code (based on your code) and it works fine:
    TYPE-POOLS SLIS.
    DATA: BEGIN OF LT_TAB OCCURS 0,
           BELNR LIKE BSEG-BELNR,
           GJAHR LIKE BSEG-GJAHR,
           WRBTR LIKE BSEG-WRBTR,
           WAERS LIKE BKPF-WAERS,
          END OF LT_TAB.
    DATA: LAYOUT     TYPE SLIS_LAYOUT_ALV,
          IT_EVENTS  TYPE SLIS_T_EVENT,
          FCAT       TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
          REC_FCAT   TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE.
    START-OF-SELECTION.
      FCAT-COL_POS       = 1.
      FCAT-FIELDNAME     = 'BELNR'.
      FCAT-TABNAME       = 'LT_TAB'.
      FCAT-REF_FIELDNAME = 'BELNR'.
      FCAT-REF_TABNAME   = 'BSEG'.
      APPEND FCAT.
      FCAT-COL_POS       = 2.
      FCAT-FIELDNAME     = 'GJAHR'.
      FCAT-TABNAME       = 'LT_TAB'.
      FCAT-REF_FIELDNAME = 'GJAHR'.
      FCAT-REF_TABNAME   = 'BSEG'.
      APPEND FCAT.
      FCAT-COL_POS       = 3.
      FCAT-FIELDNAME     = 'WRBTR'.
      FCAT-TABNAME       = 'LT_TAB'.
      FCAT-CFIELDNAME    = 'WAERS'.
      FCAT-REF_FIELDNAME = 'WRBTR'.
      FCAT-REF_TABNAME   = 'BSEG'.
      FCAT-DO_SUM        = 'X'.
      APPEND FCAT.
      FCAT-COL_POS       = 4.
      FCAT-FIELDNAME     = 'WAERS'.
      FCAT-TABNAME       = 'LT_TAB'.
      FCAT-REF_FIELDNAME = 'WAERS'.
      FCAT-REF_TABNAME   = 'BKPF'.
      FCAT-DO_SUM        = SPACE.
      APPEND FCAT.
      SELECT * FROM BSEG INTO CORRESPONDING FIELDS OF TABLE LT_TAB
        WHERE BUKRS = 'MAAB'
          AND BELNR = '0000000001'.
      LT_TAB-WAERS = 'EUR'.
      MODIFY LT_TAB FROM LT_TAB TRANSPORTING WAERS WHERE WAERS = SPACE.
    *CALLING ALV
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
        EXPORTING
          I_CALLBACK_PROGRAM = 'ZPROVAMAX5'.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
        EXPORTING
          IS_LAYOUT   = LAYOUT
          IT_FIELDCAT = FCAT[]
          I_TABNAME   = 'LT_TAB'
          IT_EVENTS   = IT_EVENTS[]
        TABLES
          T_OUTTAB    = LT_TAB[].
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'.
    I've also inserted a currency field
    Max

  • Quantity fields not getting displayed in the second total row

    Hi,
    As per the requirement I have to display 2 total rows for an ALV report using CL_GUI_ALV_GRID. I am able to get the first total row properly using method get_subtotal(). However for the next total row only the character fields are getting displayed and the quantity fields are coming blank.
    The second total row will have different values based on a formula.
    Please help me out in resolving the issue.
    Thanks,
    Abhishek

    You can provide first row as the SUBTOTAL and next row as the TOTAL.
    Get one extra column on which you can do the SUBTOTAL.
    Regards,
    Naimesh Patel

  • To find total in blocked alv

    hi experts,
    i have created blocked ALV program.
    in the o/p , it displays list of recors for open items,then list of records for cleared items.
    now i want it  to display sum of both open and cleared items of particular column.
    in grid display it is displaying total for open and cleared items.
    but in blocked alv it is not displaying total for open and closed items separately.
    and also i need grand total of both.
    if any body knows please tell me..

    Hi Sridevi
    Refer this code as an example.
    This code calculates the occupied column from sflight table.
    TYPE-POOLS: slis.
    DATA:it_fieldcat  TYPE  slis_t_fieldcat_alv,
         is_layout TYPE slis_layout_alv,
         it_events TYPE  slis_t_event ,
        it_sort TYPE  slis_t_sortinfo_alv .
    DATA: wa_fcat LIKE LINE OF it_fieldcat,
          wa_sort LIKE LINE OF it_sort.
    DATA: i_flight TYPE sflight_tab1.
    SELECT * FROM sflight
    INTO TABLE i_flight
    UP TO 10 ROWS.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
      EXPORTING
        i_program_name         = sy-repid
        i_structure_name       = 'SFLIGHT'
      CHANGING
        ct_fieldcat            = it_fieldcat
      EXCEPTIONS
        inconsistent_interface = 1
        program_error          = 2.
    wa_fcat-do_sum = 'X'.
    MODIFY it_fieldcat FROM wa_fcat
         TRANSPORTING do_sum WHERE fieldname = 'SEATSOCC'.
    wa_sort-up = 'X'.
    wa_sort-fieldname = 'CARRID'.
    wa_sort-subtot = 'X'.
    APPEND wa_sort TO it_sort.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
      EXPORTING
        i_callback_program = sy-repid.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
      EXPORTING
        is_layout                        = is_layout
        it_fieldcat                      = it_fieldcat
        i_tabname                        = 'I_FLIGHT'
        it_events                        = it_events
        it_sort                          = it_sort
    *   I_TEXT                           = ' '
      TABLES
        t_outtab                         = i_flight
    EXCEPTIONS
       program_error                    = 1
       maximum_of_appends_reached       = 2
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
      EXPORTING
        is_layout                        = is_layout
        it_fieldcat                      = it_fieldcat
        i_tabname                        = 'I_FLGIHT'
        it_events                        = it_events
       it_sort                          = it_sort
    *   I_TEXT                           = ' '
      TABLES
        t_outtab                         = i_flight
    EXCEPTIONS
       program_error                    = 1
       maximum_of_appends_reached       = 2
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
    Thanks and Regards

  • ALV Totals , Subtotals for a particular field in ALV Grid report

    Hi,
    I have an issue in ALV totals and subtotals.
    Scenario is like this.
    i have a vendor data to be pulled out of SAP and to be shown in the form of report.
    i am populating all the data and doing do_sum based on Vendor ( has expansin & collapse option ) and display the number of reports .
    Vendor -
    100
    Vendor1 -
    1
    Vendor2----
    2.
    Vendor100----
    100.
    but my problem is in the same report i have a date field .
    if i have a five vendors created on 03/03/2008. in the same report for the date field having ( expansion & collapse ) , when i expand based on that date can i be able to sum up all the vendors created on 03/03/2008 and display in the same report along with the vendor count.
    Let me know . Thank you in advance
    Regards,
    Ry

    Hi Roby,
    Have a look at this sample code
    It will help u,
    REPORT ZIN_FI_AGEING
           message-id zbdc
           no standard page heading.
    Title                   : For Ageing Details
    Author                  :
    Date                    : 22/11/2004
    Transport/Correction Id :
    Clarify case ID         :
    Application             : FI
    Program Type            :
    Frequency               :
    Purpose                 :
    Comments                :
    Request No              :
      TABLES DELCARATIONS
    Tables: zzgeinz9a,    "Actual line item table
            t001.         "Plants/Branches
      ALV TTPE DELCARATIONS
    type-pools: slis.
    *Type Declarations for Field Catalog
    data : i_fldcat_head type slis_t_fieldcat_alv,
           wa_fldcat_head type slis_fieldcat_alv.
    *Type Declarations for ALV Events
    data : i_events type slis_t_event,
           wa_event like line of i_events.
    *Type Declarations for Layout Design
    data : wa_layout type slis_layout_alv.
    *Type Declarations for Sorting Fields
    data:  it_sort type slis_sortinfo_alv occurs 0 with header line.
    *Type Declarations for Displaying Images on Grid
    data : i_comment type slis_t_listheader,
           wa_comment type slis_listheader.
    *Type Declarations for Grouping fields
    data : wa_group type slis_sp_group_alv,
           i_group type slis_t_sp_group_alv.
      DATA DELCARATIONS
    data: v_flag,                 "Status Flag
          v_repid like sy-repid,  "Program Name
          p_year(4) type c,       "Year
          v_due_days type i.      "To hold the due days
      CONSTANTS DELCARATIONS
    constants: c_x type c value 'X',
               c_bukrs(4) type c value '0373'.
      INTERNAL TABLES DELCARATIONS
    *--Internal table to hold the required data
    data: begin of it_final_vendor occurs 0,
            rzzlifnr    like zzgeinz9a-rzzlifnr,  "Vendor
            name1       like lfa1-name1,          "Vendor Name
            docnr       like zzgeinz9a-DOCNR,     "Accounting Doc No
            refdocnr    like zzgeinz9a-REFDOCNR,  "Reference document no
            belnr       like bkpf-belnr,          "FI Doc No
            doc_date    like bkpf-awkey,          "Document Date
            zbd1t       like bsik-zbd1t,          "Cash discount days 1
            bldat       like bkpf-bldat,          "Document Date
            due_date    like bkpf-bldat,          "Due Date
            due_days    type i,                   "Due Days
            rzz_ebeln   like zzgeinz9a-rzz_ebeln, "P.O. Ref No
            not_due     like zzgeinz9a-hsl,       "Not Yet Due
            hsl         like zzgeinz9a-hsl,       "local currency
            found       type c,                   "Existance Flag
          end of it_final_vendor.
    data: begin of it_final_vendor_temp occurs 0,
            rzzlifnr    like zzgeinz9a-rzzlifnr,  "Vendor
            name1       like lfa1-name1,          "Vendor Name
            belnr       like bkpf-belnr,          "FI Doc No
            bldat       like bkpf-bldat,          "Document Date
            rzz_ebeln   like zzgeinz9a-rzz_ebeln, "P.O. Ref No
            hsl        like zzgeinz9a-hsl,        "local currency
            due_date    like bkpf-bldat,          "Due Date
            due_days    type i,                   "Due Days
            not_due     like zzgeinz9a-hsl,       "Not Yet Due
            buck_0_30   like zzgeinz9a-hsl,       "Invoiceamt in localcurr
            buck_31_60  like zzgeinz9a-hsl,       "Invoiceamt in localcurr
            buck_61_90  like zzgeinz9a-hsl,       "Invoiceamt in localcurr
            buck_91_180 like zzgeinz9a-hsl,       "Invoiceamt in localcurr
            buck_180    like zzgeinz9a-hsl,       "Invoiceamt in localcurr
            docnr       like zzgeinz9a-DOCNR,     "Accounting Doc No
            refdocnr    like zzgeinz9a-REFDOCNR,  "Reference document no
            doc_date    like bkpf-awkey,          "Document Date
            found       type c,                   "Existance Flag
          end of it_final_vendor_temp.
    data: begin of it_final_customer occurs 0,
            rzzkunnr    like zzgeinz9a-rzzkunnr,  "Customer
            name1       like kna1-name1,          "Customer Name
            docnr       like zzgeinz9a-DOCNR,     "Accounting Doc No
            refdocnr    like zzgeinz9a-REFDOCNR,  "Reference document no
            belnr       like bkpf-belnr,          "FI Doc No
            doc_date    like bkpf-awkey,          "Document Date
            zbd1t       like bsik-zbd1t,          "Cash discount days 1
            bldat       like bkpf-bldat,          "Document Date
            due_date    like bkpf-bldat,          "Due Date
            due_days    type i,                   "Due Days
            rzz_ebeln   like zzgeinz9a-rzz_ebeln, "P.O. Ref No
            not_due     like zzgeinz9a-hsl,       "Not Yet Due
            hsl         like zzgeinz9a-hsl,       "local currency
            found       type c,                   "Existance Flag
          end of it_final_customer.
    data: begin of it_final_customer_temp occurs 0,
            rzzkunnr    like zzgeinz9a-rzzkunnr,  "Customer
            name1       like kna1-name1,          "Customer Name
            belnr       like bkpf-belnr,          "FI Doc No
            bldat       like bkpf-bldat,          "Document Date
            rzz_ebeln   like zzgeinz9a-rzz_ebeln, "P.O. Ref No
            hsl        like zzgeinz9a-hsl,        "local currency
            due_date    like bkpf-bldat,          "Due Date
            due_days    type i,                   "Due Days
            not_due     like zzgeinz9a-hsl,       "Not Yet Due
            buck_0_30   like zzgeinz9a-hsl,       "Invoiceamt in localcurr
            buck_31_60  like zzgeinz9a-hsl,       "Invoiceamt in localcurr
            buck_61_90  like zzgeinz9a-hsl,       "Invoiceamt in localcurr
            buck_91_180 like zzgeinz9a-hsl,       "Invoiceamt in localcurr
            buck_180    like zzgeinz9a-hsl,       "Invoiceamt in localcurr
            docnr       like zzgeinz9a-DOCNR,     "Accounting Doc No
            refdocnr    like zzgeinz9a-REFDOCNR,  "Reference document no
            doc_date    like bkpf-awkey,          "Document Date
            found       type c,                   "Existance Flag
          end of it_final_customer_temp.
    *--Internal Table to hold the Cash discount days 1 for Vendors
    data: begin of it_final_bsik occurs 0,
            belnr like bsik-belnr,
            zbd1t like bsik-zbd1t,
          end of it_final_bsik.
    *--Internal Table to hold the Cash discount days 1 for Customers
    data: begin of it_final_bsid occurs 0,
            belnr like bsid-belnr,
            zbd1t like bsid-zbd1t,
          end of it_final_bsid.
      INITIALIZATION
    v_repid = sy-repid.
      SELECTION SCREEN
    selection-screen: begin of block b1 with frame title text-h01.
    selection-screen skip.
    select-options: s_vendor for zzgeinz9a-rzzlifnr modif id ven.
    parameters: p_comp1 like t001-bukrs modif id ven.
    parameters: p_rundt1 like bkpf-bldat modif id ven.
    select-options: s_cust for zzgeinz9a-rzzkunnr modif id cst.
    parameters: p_comp2 like t001-bukrs modif id cst.
    parameters: p_rundt2 like bkpf-bldat modif id cst.
    selection-screen skip.
    selection-screen: begin of block b2 with frame title text-h02.
    parameters : p_vendor radiobutton group gr1 default 'X'
                                      user-command test,
                 p_cust  radiobutton group gr1.
    selection-screen: end of block b2.
    selection-screen: end of block b1.
    **************************AT Selection Screen OutPut ******************
    at selection-screen output.
      loop at screen.
        if p_cust = 'X'.
          if screen-group1 = 'VEN'.
            screen-active = '0'.
            screen-input = '0'.
            screen-output = '0'.
            screen-invisible = '0'.
          endif.
        elseif p_vendor = 'X'.
          if screen-group1 = 'CST'.
            screen-active = '0'.
            screen-input = '0'.
            screen-output = '0'.
            screen-invisible = '0'.
          endif.
        endif.
        modify screen.
      endloop.
      SELECTION SCREEN ON
    at selection-screen on s_vendor.
    *--Validating Vendor
      if not s_vendor[] is initial.
        perform validate_s_vendor.
      endif.
    at selection-screen on s_cust.
    *--Validating Customer
      if not s_cust[] is initial.
        perform validate_s_cust.
      endif.
    at selection-screen on p_comp1.
    *--Validating Company Code.
      if not p_comp1 is initial.
        perform validate_p_comp1.
      endif.
    at selection-screen on p_comp2.
    *--Validating Company Code.
      if not p_comp2 is initial.
        perform validate_p_comp2.
      endif.
      START OF SELECTION
    start-of-selection.
    if p_vendor = 'X'.
       perform get_vendor_data.
    elseif p_cust = 'X'.
       perform get_customer_data.
    endif.
      END OF SELECTION
    end-of-selection.
    if p_vendor = 'X'.
    *--Generating the output for vendor
      perform generate_field_catalog_vendor.
      perform get_events_vendor.
      perform generate_layout_vendor.
      perform generate_sort_vendor.
      perform generate_group_vendor.
      perform disp_alv_grid_vendor.
    elseif p_cust = 'X'.
    *--Generating the output for customer
      perform generate_field_catalog_cust.
      perform get_events_customer.
      perform generate_layout_customer.
      perform generate_sort_customer.
      perform generate_group_customer.
      perform disp_alv_grid_customer.
    endif.
    *&      Form  validate_s_vendor
          Validating the Vendor
    form validate_s_vendor.
      select rzzlifnr up to 1 rows
      into (zzgeinz9a-rzzlifnr)
      from zzgeinz9a
      where rzzlifnr in s_vendor.
      endselect.
      if sy-subrc ne 0.
        message e004 with 'Invalid Range of Vendor'(002)
    s_vendor-low 'To'(006) s_vendor-high.
      endif.
    endform.                    " validate_s_vendor
    *&      Form  validate_s_cust
          Validating the Customer
    form validate_s_cust.
       select rzzkunnr up to 1 rows
       into (zzgeinz9a-rzzkunnr)
       from zzgeinz9a
       where rzzkunnr in s_cust.
       endselect.
       if sy-subrc ne 0.
         message e004 with 'Invalid Range of Customer'(005)
    s_cust-low 'To'(006) s_cust-high.
      endif.
    endform.                    " validate_s_cust
    *&      Form  validate_p_comp1
          Validating the Company Code
    form validate_p_comp1.
      select single bukrs
             into   (t001-bukrs)
             from   t001
             where  bukrs eq p_comp1.
      if sy-subrc ne 0.
        message e004 with 'Company Code'(004) p_comp1 'Does not Exists'(003)
      endif.
    endform.                    " validate_p_comp1
    *&      Form  validate_p_comp2
          Validating the Company Code
    form validate_p_comp2.
      select single bukrs
             into   (t001-bukrs)
             from   t001
             where  bukrs eq p_comp2.
      if sy-subrc ne 0.
        message e004 with 'Company Code'(004) p_comp2 'Does not Exists'(003)
      endif.
    endform.                    " validate_p_comp2
    *&      Form  get_vendor_data
          Getting the Vendor Related Docs
    form get_vendor_data.
    select a~rzzlifnr
            b~name1
            a~docnr
            a~refdocnr
            a~rzz_ebeln
            a~hsl
        into corresponding fields of table it_final_vendor
        from zzgeinz9a as a
        inner join lfa1 as b
        on arzzlifnr = blifnr
        where rzzlifnr in s_vendor
        and   rbukrs   eq p_comp1.
        if sy-subrc eq 0.
          v_flag = 'X'.
          p_year = sy-datum+0(4).
          perform get_doc_date using p_comp1
                                     p_year.
          perform move_records.
          sort it_final_vendor by rzzlifnr.
          perform generate_data.
        else.
          v_flag = space.
        endif.
    endform.                    " get_vendor_data
    *&      Form  get_customer_data
          Getting the Customer Related Docs
    form get_customer_data.
    select a~rzzkunnr
            b~name1
            a~docnr
            a~refdocnr
            a~rzz_ebeln
            a~hsl
        into corresponding fields of table it_final_customer
        from zzgeinz9a as a
        inner join kna1 as b
        on arzzkunnr = bkunnr
        where rzzkunnr in s_cust
        and   rbukrs   eq p_comp2.
        if sy-subrc eq 0.
          v_flag = 'X'.
          p_year = sy-datum+0(4).
          perform get_doc_date_cust using p_comp2
                                          p_year.
          perform move_records_cust.
          sort it_final_customer by rzzkunnr.
          perform generate_data_cust.
        else.
          v_flag = space.
        endif.
    endform.                    " get_customer_data
    *&      Form  get_doc_date
          Getting the Document Date and FI Doc No
         -->P_P_COMP1 Company Code
         -->P_P_YEAR  Fiscal Year
    form get_doc_date using    p_p_comp1
                               p_p_year.
      loop at it_final_vendor.
        concatenate it_final_vendor-refdocnr '*' into
    it_final_vendor-doc_date.
        modify it_final_vendor index sy-tabix.
    endloop.
    clear it_final_vendor.
    data: v_doc_date(11) type c,
          v_belnr like bkpf-belnr,
          v_bldat like bkpf-bldat.
          loop at it_final_vendor.
           concatenate it_final_vendor-refdocnr '%' into v_doc_date.
            select single belnr
                          bldat
                   into corresponding fields of it_final_vendor
                   from bkpf
                   where bukrs eq p_p_comp1
                   and   gjahr eq p_p_year
                   and   awkey like v_doc_date.
                   modify it_final_vendor.
           endloop.
        clear:it_final_vendor.
    endform.                    " get_doc_date
    *&      Form  move_records
          Moving records to final internal table
    form move_records.
    *--Checking the existance of belnr in bsik
    clear it_final_vendor.
      select belnr
             zbd1t
             into table it_final_bsik
             from bsik
             for all entries in it_final_vendor
             where belnr eq it_final_vendor-belnr
             and   bukrs eq c_bukrs.
    clear it_final_bsik.
      loop at it_final_vendor.
        read table it_final_bsik with key belnr = it_final_vendor-belnr.
        if sy-subrc eq 0.
          it_final_vendor-zbd1t = it_final_bsik-zbd1t.
          it_final_vendor-due_date = it_final_vendor-bldat +
    it_final_bsik-zbd1t.
          it_final_vendor-found    = 'X'.
          modify it_final_vendor.
        endif.
      endloop.
    endform.                    " move_records
    *&      Form  generate_data
          Segregating the records based on due_date
    form generate_data.
      delete it_final_vendor[] where found ne 'X'.
      sort it_final_vendor by belnr.
      loop at it_final_vendor.
        if it_final_vendor-due_date > p_rundt1.
          move-corresponding it_final_vendor to it_final_vendor_temp.
          move it_final_vendor-hsl to it_final_vendor_temp-not_due.
        elseif it_final_vendor-due_date < p_rundt1.
          it_final_vendor-due_days = p_rundt1 - it_final_vendor-DUE_DATE.
        endif.
    *--filling 0-30 bucket.
        if it_final_vendor-due_days ge 0 AND it_final_vendor-due_days le 30.
          move-corresponding it_final_vendor to it_final_vendor_temp.
          move it_final_vendor-hsl to it_final_vendor_temp-buck_0_30.
    *--filling 31-60 bucket.
    elseif it_final_vendor-due_days ge 31 AND it_final_vendor-due_days le 60
          move-corresponding it_final_vendor to it_final_vendor_temp.
          move it_final_vendor-hsl to it_final_vendor_temp-buck_31_60.
    *--filling 61-90 bucket.
    elseif it_final_vendor-due_days ge 61 AND it_final_vendor-due_days le 90
          move-corresponding it_final_vendor to it_final_vendor_temp.
          move it_final_vendor-hsl to it_final_vendor_temp-buck_61_90.
    *--filling 91-180 bucket.
        elseif it_final_vendor-due_days ge 91 AND it_final_vendor-due_days
    le 180.
          move-corresponding it_final_vendor to it_final_vendor_temp.
          move it_final_vendor-hsl to it_final_vendor_temp-buck_91_180.
    *--filling 180 bucket.
        elseif it_final_vendor-due_days gt 180.
          move-corresponding it_final_vendor to it_final_vendor_temp.
          move it_final_vendor-hsl to it_final_vendor_temp-buck_180.
        endif.
         append it_final_vendor_temp.
         clear it_final_vendor_temp.
      endloop.
    endform.                    " generate_data
    *&      Form  DISP_ALV_GRID_VENDOR
          Displaying the output in grid For Vendor
    form DISP_ALV_GRID_VENDOR.
    *--Generating the OUTPUT GRID FOR VENDOR
      call function 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
        I_INTERFACE_CHECK                 = ' '
        I_BYPASSING_BUFFER                =
        I_BUFFER_ACTIVE                   = ' '
          I_CALLBACK_PROGRAM                = v_repid
        I_CALLBACK_PF_STATUS_SET          = ' '
        I_CALLBACK_USER_COMMAND           = ' '
        I_CALLBACK_TOP_OF_PAGE            = ' '
        I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
        I_CALLBACK_HTML_END_OF_LIST       = ' '
        I_STRUCTURE_NAME                  =
        I_BACKGROUND_ID                   = ' '
        I_GRID_TITLE                      =
        I_GRID_SETTINGS                   =
          IS_LAYOUT                         = wa_layout
          IT_FIELDCAT                       = i_fldcat_head
        IT_EXCLUDING                      =
          IT_SPECIAL_GROUPS                 = i_group
          IT_SORT                           = it_sort[]
        IT_FILTER                         =
        IS_SEL_HIDE                       =
        I_DEFAULT                         = 'X'
        I_SAVE                            = ' '
        IS_VARIANT                        =
          IT_EVENTS                         = i_events
        IT_EVENT_EXIT                     =
        IS_PRINT                          =
        IS_REPREP_ID                      =
        I_SCREEN_START_COLUMN             = 0
        I_SCREEN_START_LINE               = 0
        I_SCREEN_END_COLUMN               = 0
        I_SCREEN_END_LINE                 = 0
        IT_ALV_GRAPHICS                   =
        IT_ADD_FIELDCAT                   =
        IT_HYPERLINK                      =
        I_HTML_HEIGHT_TOP                 =
        I_HTML_HEIGHT_END                 =
        IT_EXCEPT_QINFO                   =
      IMPORTING
        E_EXIT_CAUSED_BY_CALLER           =
        ES_EXIT_CAUSED_BY_USER            =
        tables
          t_outtab                          = it_final_vendor_temp
       EXCEPTIONS
         PROGRAM_ERROR                     = 1
         OTHERS                            = 2
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    endform.                    " DISP_ALV_GRID
    *&      Form  get_doc_date_cust
          text
         -->P_P_COMP2 Company Code
         -->P_P_YEAR  Fiscal Year
    form get_doc_date_cust using    p_p_comp2
                                    p_p_year.
      loop at it_final_customer.
        concatenate it_final_customer-refdocnr '*' into
    it_final_customer-doc_date.
        modify it_final_customer index sy-tabix.
    endloop.
    clear it_final_customer.
    data: v_doc_date(11) type c,
          v_belnr like bkpf-belnr,
          v_bldat like bkpf-bldat.
          loop at it_final_customer.
           concatenate it_final_customer-refdocnr '%' into v_doc_date.
            select single belnr
                          bldat
                   into corresponding fields of it_final_customer
                   from bkpf
                   where bukrs eq p_p_comp2
                   and   gjahr eq p_p_year
                   and   awkey like v_doc_date.
                   modify it_final_customer.
           endloop.
        clear:it_final_customer.
    endform.                    " get_doc_date_cust
    *&      Form  move_records_cust
          Moving Customer Data to Final Internal Table
    form move_records_cust.
    *--Checking the existance of belnr in bsid
      select belnr
             zbd1t
             into table it_final_bsid
             from bsid
             for all entries in it_final_customer
             where belnr eq it_final_customer-belnr
             and   bukrs eq c_bukrs.
    clear it_final_bsid.
      loop at it_final_customer.
        read table it_final_bsid with key belnr = it_final_customer-belnr.
        if sy-subrc eq 0.
          it_final_customer-zbd1t    = it_final_bsid-zbd1t.
          it_final_customer-due_date = it_final_customer-bldat +
    it_final_bsid-zbd1t.
          it_final_customer-found    = 'X'.
          modify it_final_customer.
        endif.
      endloop.
    endform.                    " move_records_cust
    *&      Form  generate_data_cust
          Generating the Customer Output
    form generate_data_cust.
      delete it_final_customer[] where found ne 'X'.
      sort it_final_customer by belnr.
      loop at it_final_customer.
        if it_final_customer-due_date > p_rundt2.
         move-corresponding it_final_customer to it_final_customer_temp.
         move it_final_customer-hsl to it_final_customer_temp-not_due.
        elseif it_final_customer-due_date < p_rundt2.
         it_final_customer-due_days = p_rundt2 - it_final_customer-DUE_DATE.
        endif.
    *--filling 0-30 bucket.
    if it_final_customer-due_days ge 0 AND it_final_customer-due_days le 30
          move-corresponding it_final_customer to it_final_customer_temp.
          move it_final_customer-hsl to it_final_customer_temp-buck_0_30.
    *--filling 31-60 bucket.
    elseif it_final_customer-due_days ge 31 AND it_final_customer-due_days
    le 60
          move-corresponding it_final_customer to it_final_customer_temp.
          move it_final_customer-hsl to it_final_customer_temp-buck_31_60.
    *--filling 61-90 bucket.
    elseif it_final_customer-due_days ge 61 AND it_final_customer-due_days
    le 90
          move-corresponding it_final_customer to it_final_customer_temp.
          move it_final_customer-hsl to it_final_customer_temp-buck_61_90.
    *--filling 91-180 bucket.
        elseif it_final_customer-due_days ge 91 AND
    it_final_customer-due_days
    le 180.
          move-corresponding it_final_customer to it_final_customer_temp.
          move it_final_customer-hsl to it_final_customer_temp-buck_91_180.
    *--filling 180 bucket.
        elseif it_final_customer-due_days gt 180.
          move-corresponding it_final_customer to it_final_customer_temp.
          move it_final_customer-hsl to it_final_customer_temp-buck_180.
        endif.
         append it_final_customer_temp.
         clear it_final_customer_temp.
      endloop.
    endform.                    " generate_data_cust
    *&      Form  generate_field_catalog_vendor
          Generating the Field Catalog for Vendor
    form generate_field_catalog_vendor.
      call function 'REUSE_ALV_FIELDCATALOG_MERGE'
       EXPORTING
          I_PROGRAM_NAME               = v_repid
          I_INTERNAL_TABNAME           = 'IT_FINAL_VENDOR_TEMP'
        I_STRUCTURE_NAME             =
        I_CLIENT_NEVER_DISPLAY       = 'X'
          I_INCLNAME                   = v_repid
        I_BYPASSING_BUFFER           =
        I_BUFFER_ACTIVE              =
        changing
          ct_fieldcat                  = i_fldcat_head
       EXCEPTIONS
         INCONSISTENT_INTERFACE       = 1
         PROGRAM_ERROR                = 2
         OTHERS                       = 3
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
      if not i_fldcat_head[] is initial.
        loop at i_fldcat_head into wa_fldcat_head.
        case wa_fldcat_head-fieldname.
         when 'RZZLIFNR'.
            wa_fldcat_head-col_pos = '1'.
            wa_fldcat_head-ref_tabname = ' '.
            wa_fldcat_head-seltext_m  = 'Vendor No'(001).
            wa_fldcat_head-ddictxt = 'M'.
            wa_fldcat_head-outputlen = '12'.
         when 'NAME1'.
            wa_fldcat_head-col_pos = '2'.
            wa_fldcat_head-seltext_m  = 'Vendor Name'(007).
            wa_fldcat_head-ddictxt = 'M'.
            wa_fldcat_head-outputlen = '35'.
         when 'BELNR'.
            wa_fldcat_head-col_pos = '3'.
            wa_fldcat_head-seltext_m  = 'Invoice No'(008).
            wa_fldcat_head-ddictxt = 'M'.
            wa_fldcat_head-outputlen = '12'.
            wa_fldcat_head-KEY       = ' '.
         when 'BLDAT'.
            wa_fldcat_head-col_pos = '4'.
            wa_fldcat_head-seltext_m  = 'Document Date'(009).
            wa_fldcat_head-ddictxt = 'M'.
            wa_fldcat_head-outputlen = '13'.
            wa_fldcat_head-ref_tabname = ' '.
         when 'RZZ_EBELN'.
            wa_fldcat_head-col_pos = '5'.
            wa_fldcat_head-seltext_m  = 'PO.Ref.No'(010).
            wa_fldcat_head-ddictxt = 'M'.
            wa_fldcat_head-outputlen = '13'.
            wa_fldcat_head-ref_tabname = ' '.
         when 'HSL'.
            wa_fldcat_head-col_pos = '6'.
            wa_fldcat_head-seltext_m  = 'Invoice Amount'(011).
            wa_fldcat_head-ddictxt = 'M'.
            wa_fldcat_head-outputlen = '16'.
            wa_fldcat_head-do_sum = 'X'.
         when 'DUE_DATE'.
            wa_fldcat_head-col_pos = '7'.
            wa_fldcat_head-seltext_m  = 'Due Date'(012).
            wa_fldcat_head-ddictxt = 'M'.
            wa_fldcat_head-outputlen = '12'.
            wa_fldcat_head-ref_tabname = ' '.
         when 'DUE_DAYS'.
            wa_fldcat_head-col_pos = '8'.
            wa_fldcat_head-seltext_m  = 'Due Days'(013).
            wa_fldcat_head-ddictxt = 'M'.
            wa_fldcat_head-outputlen = '9'.
         when 'NOT_DUE'.
            wa_fldcat_head-col_pos = '9'.
            wa_fldcat_head-seltext_m  = 'Not Due'(014).
            wa_fldcat_head-ddictxt = 'M'.
            wa_fldcat_head-outputlen = '16'.
            wa_fldcat_head-do_sum = 'X'.
         when 'BUCK_0_30'.
            wa_fldcat_head-col_pos = '10'.
            wa_fldcat_head-seltext_m  = '0 To 30'(015).
            wa_fldcat_head-ddictxt = 'M'.
            wa_fldcat_head-outputlen = '16'.
            wa_fldcat_head-do_sum = 'X'.
         when 'BUCK_31_60'.
            wa_fldcat_head-col_pos = '11'.
            wa_fldcat_head-seltext_m  = '31 To 60'(016).
            wa_fldcat_head-ddictxt = 'M'.
            wa_fldcat_head-outputlen = '16'.
            wa_fldcat_head-do_sum = 'X'.
         when 'BUCK_61_90'.
            wa_fldcat_head-col_pos = '12'.
            wa_fldcat_head-seltext_m  = '61 To 90'(017).
            wa_fldcat_head-ddictxt = 'M'.
            wa_fldcat_head-outputlen = '16'.
            wa_fldcat_head-do_sum = 'X'.
         when 'BUCK_91_180'.
            wa_fldcat_head-col_pos = '13'.
            wa_fldcat_head-seltext_m  = '91 To 180'(018).
            wa_fldcat_head-ddictxt = 'M'.
            wa_fldcat_head-outputlen = '16'.
            wa_fldcat_head-do_sum = 'X'.
         when 'BUCK_180'.
            wa_fldcat_head-col_pos = '14'.
            wa_fldcat_head-seltext_m  = 'Beyond 180'(019).
            wa_fldcat_head-ddictxt = 'M'.
            wa_fldcat_head-outputlen = '16'.
            wa_fldcat_head-do_sum = 'X'.
        when 'DOCNR'.
            wa_fldcat_head-no_out = 'X'.
        when 'REFDOCNR'.
            wa_fldcat_head-no_out = 'X'.
        when 'DOC_DATE'.
            wa_fldcat_head-no_out = 'X'.
        when 'FOUND'.
            wa_fldcat_head-no_out = 'X'.
         endcase.
         modify i_fldcat_head from wa_fldcat_head index sy-tabix.
        endloop.
      endif.
    endform.                    " generate_field_catalog_vendor
    *&      Form  get_events_vendor
          Getting ALV Events
    form get_events_vendor.
        call function 'REUSE_ALV_EVENTS_GET'
      EXPORTING
        I_LIST_TYPE           = 0
       importing
         et_events             = i_events
      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.
      if not i_events[] is initial.
       read table i_events into wa_event with key name = 'TOP_OF_PAGE'(024)
       wa_event-form = 'GENERATE_USERCOMMAND'.
       modify i_events from wa_event index sy-tabix.
       read table i_events into wa_event with key name = 'END_OF_LIST'(025)
       wa_event-form = 'GENERATE_USERCOMMAND_FOOTER'.
       modify i_events from wa_event index sy-tabix.
      endif.
    endform.                    " get_events_vendor
    *&      Form  GENERATE_USERCOMMAND
          Displaying Header-Text and Logo on Grid
    form generate_usercommand .
      clear i_comment[].
      wa_comment-typ = 'H'.
      wa_comment-info = 'Vendor Ageing Report'(026).
      append wa_comment to i_comment.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
        exporting
          it_list_commentary = i_comment
          i_logo             = 'ENJOYSAP_LOGO'
        I_END_OF_LIST_GRID       = 'X'
    endform.                    " GENERATE_USERCOMMAND
    *&      Form  GENERATE_USERCOMMAND_FOOTER
          Displaying Footer-Text on Grid
    form generate_usercommand_footer.
      clear i_comment[].
      clear wa_comment.
      wa_comment-typ = 'S'.
      wa_comment-key = 'GE-Betz'(027).
      append wa_comment to i_comment.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
        exporting
          it_list_commentary       = i_comment
        I_LOGO                  = ''
          i_end_of_list_grid       = 'X'.
    endform.                    " GENERATE_USERCOMMAND_FOOTER
    *&      Form  generate_layout_vendor
          Generating the ALV Layout
    form generate_layout_vendor.
      WA_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.     "OPTIMIZING FIELD WIDTH
      wa_layout-zebra = 'X'.                  "PUTTING ZEBRA COLORS
      wa_layout-confirmation_prompt = 'X'.    "DISPLAYS CONFIRMATION DIALOG
      wa_layout-totals_text = 'Totals'(028).       "DISPLAYS TOTALS TEXT
      wa_layout-subtotals_text = 'Sub Totals'(029)."DISPLAYS SUBTOTALS TEXT
    endform.                    " generate_layout_vendor
    *&      Form  generate_sort_vendor
          Sorting the Internal Table by Vendor
    form generate_sort_vendor.
      it_sort-fieldname = 'RZZLIFNR'.
      it_sort-tabname = 'IT_FINAL_VENDOR_TEMP'.
      it_sort-up = 'X'.
      it_sort-subtot = 'X'.
      append it_sort.
    endform.                    " generate_sort_vendor
    *&      Form  generate_group_vendor
          Grouping the Data
    form generate_group_vendor.
      clear i_group.
      wa_group-sp_group = 'A'.
      wa_group-text  = 'RZZLIFNR'.
      append wa_group to i_group.
    endform.                    " generate_group_vendor
    *&      Form  GENERATE_FIELD_CATALOG_CUST
          Generating Field Catalog for Customer
    form GENERATE_FIELD_CATALOG_CUST.
      call function 'REUSE_ALV_FIELDCATALOG_MERGE'
       EXPORTING
          I_PROGRAM_NAME               = v_repid
          I_INTERNAL_TABNAME           = 'IT_FINAL_CUSTOMER_TEMP'
        I_STRUCTURE_NAME             =
        I_CLIENT_NEVER_DISPLAY       = 'X'
          I_INCLNAME                   = v_repid
        I_BYPASSING_BUFFER           =
        I_BUFFER_ACTIVE              =
        changing
          ct_fieldcat                  = i_fldcat_head
       EXCEPTIONS
         INCONSISTENT_INTERFACE       = 1
         PROGRAM_ERROR                = 2
         OTHERS                       = 3
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
      if not i_fldcat_head[] is initial.
        loop at i_fldcat_head into wa_fldcat_head.
        case wa_fldcat_head-fieldname.
         when 'RZZKUNNR'.
            wa_fldcat_head-col_pos = '1'.
            wa_fldcat_head-ref_tabname = ' '.
            wa_fldcat_head-seltext_m  = 'Customer No'(020).
            wa_fldcat_head-ddictxt = 'M'.
            wa_fldcat_head-outputlen = '12'.
         when 'NAME1'.
            wa_fldcat_head-col_pos = '2'.
            wa_fldcat_head-seltext_m  = 'Customer Name'(021).
            wa_fldcat_head-ddictxt = 'M'.
            wa_fldcat_head-outputlen = '35'.
         when 'BELNR'.
            wa_fldcat_head-col_pos = '3'.
            wa_fldcat_head-seltext_m  = 'Invoice No'(008).
            wa_fldcat_head-ddictxt = 'M'.
            wa_fldcat_head-outputlen = '12'.
            wa_fldcat_head-KEY       = ' '.
         when 'BLDAT'.
            wa_fldcat_head-col_pos = '4'.
            wa_fldcat_head-seltext_m  = 'Document Date'(009).
            wa_fldcat_head-ddictxt = 'M'.
            wa_fldcat_head-outputlen = '13'.
            wa_fldcat_head-ref_tabname = ' '.
         when 'RZZ_EBELN'.
            wa_fldcat_head-col_pos = '5'.
            wa_fldcat_head-seltext_m  = 'PO.Ref.No'(010).
            wa_fldcat_head-ddictxt = 'M'.
            wa_fldcat_head-outputlen = '13'.
            wa_fldcat_head-ref_tabname = ' '.
         when 'HSL'.
            wa_fldcat_head-col_pos = '6'.
            wa_fldcat_head-seltext_m  = 'Invoice Amount'(011).
            wa_fldcat_head-ddictxt = 'M'.
            wa_fldcat_head-outputlen = '16'.
            wa_fldcat_head-do_sum = 'X'.
         when 'DUE_DATE'.
            wa_fldcat_head-col_pos = '7'.
            wa_fldcat_head-seltext_m  = 'Due Date'(012).
            wa_fldcat_head-ddictxt = 'M'.
            wa_fldcat_head-outputlen = '12'.
            wa_fldcat_head-ref_tabname = ' '.
         when 'DUE_DAYS'.
            wa_fldcat_head-col_pos = '8'.
            wa_fldcat_head-seltext_m  = 'Due Days'(013).
            wa_fldcat_head-ddictxt = 'M'.
            wa_fldcat_head-outputlen = '9'.
         when 'NOT_DUE'.
            wa_fldcat_head-col_pos = '9'.
            wa_fldcat_head-seltext_m  = 'Not Due'(014).
            wa_fldcat_head-ddictxt = 'M'.
            wa_fldcat_head-outputlen = '16'.
            wa_fldcat_head-do_sum = 'X'.
         when 'BUCK_0_30'.
            wa_fldcat_head-col_pos = '10'.
            wa_fldcat_head-seltext_m  = '0 To 30'(015).
            wa_fldcat_head-ddictxt = 'M'.
            wa_fldcat_head-outputlen = '16'.
            wa_fldcat_head-do_sum = 'X'.
         when 'BUCK_31_60'.
            wa_fldcat_head-col_pos = '11'.
            wa_fldcat_head-seltext_m  = '31 To 60'(016).
            wa_fldcat_head-ddictxt = 'M'.
            wa_fldcat_head-outputlen = '16'.
            wa_fldcat_head-do_sum = 'X'.
         when 'BUCK_61_90'.
            wa_fldcat_head-col_pos = '12'.
            wa_fldcat_head-seltext_m  = '61 To 90'(017).
            wa_fldcat_head-ddictxt = 'M'.
            wa_fldcat_head-outputlen = '16'.
            wa_fldcat_head-do_sum = 'X'.
         when 'BUCK_91_180'.
            wa_fldcat_head-col_pos = '13'.
            wa_fldcat_head-seltext_m  = '91 To 180'(018).
            wa_fldcat_head-ddictxt = 'M'.
            wa_fldcat_head-outputlen = '16'.
            wa_fldcat_head-do_sum = 'X'.
         when 'BUCK_180'.
            wa_fldcat_head-col_pos = '14'.
            wa_fldcat_head-seltext_m  = 'Beyond 180'(019).
            wa_fldcat_head-ddictxt = 'M'.
            wa_fldcat_head-outputlen = '16'.
            wa_fldcat_head-do_sum = 'X'.
        when 'DOCNR'.
            wa_fldcat_head-no_out = 'X'.
        when 'REFDOCNR'.
            wa_fldcat_head-no_out = 'X'.
        when 'DOC_DATE'.
            wa_fldcat_head-no_out = 'X'.
        when 'FOUND'.
            wa_fldcat_head-no_out = 'X'.
         endcase.
         modify i_fldcat_head from wa_fldcat_head index sy-tabix.
        endloop.
      endif.
    endform.                    " GENERATE_FIELD_CATALOG_CUST
    *&      Form  get_events_customer
          Getting ALV Events
    form get_events_customer.
        call function 'REUSE_ALV_EVENTS_GET'
      EXPORTING
        I_LIST_TYPE           = 0
       importing
         et_events             = i_events
      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.
      if not i_events[] is initial.
       read table i_events into wa_event with key name = 'TOP_OF_PAGE'(024)
       wa_event-form = 'GENERATE_USERCOMMAND_CUST'.
       modify i_events from wa_event index sy-tabix.
       read table i_events into wa_event with key na

  • Regd: Calculation of TOTAL field in ALV report

    Hi All,
    We have a scenario that we are not getting the total value for numeric fields in ALV report.
    Below i have given the code used for it.
    G_KEY = 'X'.
      G_NOKEY = SPACE.
      G_SUM = 'X'.
      G_NOSUM = SPACE.
      PERFORM BUILD_FIELDCAT USING 'VBELN'  G_KEY G_NOSUM.
      PERFORM BUILD_FIELDCAT USING 'BLDAT'  G_NOKEY G_NOSUM.
      PERFORM BUILD_FIELDCAT USING 'VGBEL'  G_KEY G_NOSUM.
      PERFORM BUILD_FIELDCAT USING 'POSNR'  G_KEY G_NOSUM.
      PERFORM BUILD_FIELDCAT USING 'MATNR'  G_KEY G_NOSUM..
      PERFORM BUILD_FIELDCAT USING 'LFIMG'  G_NOKEY G_NOSUM.
      PERFORM BUILD_FIELDCAT USING 'VRKME'  G_NOKEY G_NOSUM.
      PERFORM BUILD_FIELDCAT USING 'NETPR'  G_NOKEY G_NOSUM.
      PERFORM BUILD_FIELDCAT USING 'BRTWR'  G_NOKEY G_NOSUM.
      PERFORM BUILD_FIELDCAT USING 'VALUE_INR'  G_NOKEY G_SUM.
      PERFORM BUILD_FIELDCAT USING 'B_DUTY'     G_NOKEY G_SUM.
      PERFORM BUILD_FIELDCAT USING 'S_TOTAL1'   G_NOKEY G_SUM.
      PERFORM BUILD_FIELDCAT USING 'CV_DUTY'    G_NOKEY G_SUM.
      PERFORM BUILD_FIELDCAT USING 'C_CVD'      G_NOKEY G_SUM.
      PERFORM BUILD_FIELDCAT USING 'S_TOTAL2'   G_NOKEY G_SUM.
      PERFORM BUILD_FIELDCAT USING 'C_DUTY'     G_NOKEY G_SUM.
      PERFORM BUILD_FIELDCAT USING 'S_TOTAL3'   G_NOKEY G_SUM.
      PERFORM BUILD_FIELDCAT USING 'A_DUTY'     G_NOKEY G_SUM.
      PERFORM BUILD_FIELDCAT USING 'T_DUTY'     G_NOKEY G_SUM.
    PERFORM BUILD_LAYOUT.
      PERFORM BUILD_DISPLAY.
    *&      Form  DISPLAY
          text
    FORM BUILD_DISPLAY.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
      I_CALLBACK_PROGRAM                = ' '
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
         I_GRID_TITLE                      = TEXT-000
      I_GRID_SETTINGS                   =
       IS_LAYOUT                         = IG_LAYOUT
         IT_FIELDCAT                       = IG_FIELDCAT
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
         I_SAVE                            = 'A'
      IS_VARIANT                        =
      IT_EVENTS                         =
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        TABLES
          T_OUTTAB                          = IG_INBOUND
       EXCEPTIONS
         PROGRAM_ERROR                     = 1
         OTHERS                            = 2
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "DISPLAY
    *&      Form  BUILD_FIELDCAT
          text
         -->G_FIELDNAME  text
         -->L_KEY        text
         -->L_SUM        text
    FORM BUILD_FIELDCAT USING L_FIELDNAME LIKE DD03L-FIELDNAME L_KEY TYPE C L_SUM TYPE C.
      CLEAR WG_FIELDCAT_LN.
      ADD 1 TO G_COL_POS.
      WG_FIELDCAT_LN-REF_TABNAME = 'IG_INBOUND'.
      WG_FIELDCAT_LN-FIELDNAME = L_FIELDNAME.
      WG_FIELDCAT_LN-KEY = L_KEY.
      WG_FIELDCAT_LN-DO_SUM = L_SUM.
      WG_FIELDCAT_LN-COL_POS = G_COL_POS.
      WG_FIELDCAT_LN-NO_OUT = SPACE.
      WG_FIELDCAT_LN-QFIELDNAME = SPACE.
      WG_FIELDCAT_LN-HOTSPOT = SPACE.
      APPEND WG_FIELDCAT_LN TO IG_FIELDCAT.
    ENDFORM.                    "BUILD_FIELDCAT
    *&      Form  BUILD_LAYOUT
          text
    FORM BUILD_LAYOUT.
    IG_LAYOUT-TOTALS_TEXT = 'Total Amount'.
    *IG_LAYOUT-SUBTOTALS_TEXT = 'A'.
    IG_LAYOUT-ZEBRA = 'X'.
    ENDFORM.
    Help and Sugesstions will be much appreciated.
    Thanks & Regds.
    Ramesh.

    This is sample program for the same
    REPORT  Z_50657_ALV_EX2
            NO STANDARD PAGE HEADING
            LINE-COUNT 65(3)
            LINE-SIZE 220
            MESSAGE-ID ZZ.
    *                             Type Pools                               *
    TYPE-POOLS: SLIS, ICON.
    *                              Tables                                  *
    TABLES: VBAK. "Sales Document Data
    *                         Internal Tables                              *
    * TABLE TO HOLD DATA OF SALES DOCUMENT
    DATA: BEGIN OF IT_VBAK OCCURS 0,
          VBELN LIKE VBAK-VBELN, "Sales Document
          VBTYP LIKE VBAK-VBTYP, "SD document category
          AUDAT LIKE VBAK-AUDAT, "Document date (date received/sent)
          AUGRU LIKE VBAK-AUGRU, "Order reason (reason for the business)
          AUART LIKE VBAK-AUART, "Sales Document Type
          NETWR LIKE VBAK-NETWR, "Net Sales Order in Doc. Currency
          WAERK LIKE VBAK-WAERK, "SD document currency
          ICON TYPE ICON-ID,     "traffic lights
          END OF IT_VBAK.
    *                             Work Areas                               *
    *WORK AREAS DEFINED FOR ALV'S
    DATA: WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV,      "field catalog
          IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,     "field catalog ITAB
          WA_SORT TYPE SLIS_SORTINFO_ALV,           "SORT work area
          IT_SORT TYPE SLIS_T_SORTINFO_ALV,         "SORT ITAB
          LAYOUT TYPE SLIS_LAYOUT_ALV,              "LAYOUT
          WA_FCODE TYPE SLIS_EXTAB,                 "FUN CODE
          I_FCODE_EXTAB TYPE SLIS_T_EXTAB,
          WA_EVENTS TYPE SLIS_ALV_EVENT,
          IT_EVENTS TYPE SLIS_T_EVENT.
    *                       Selection-Screen                               *
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
    SELECT-OPTIONS: S_VBELN FOR VBAK-VBELN.
    PARAMETERS: P_VBTYP LIKE VBAK-VBTYP DEFAULT 'C'.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME.
    PARAMETERS: LIST RADIOBUTTON GROUP G1,
                GRID RADIOBUTTON GROUP G1.
    SELECTION-SCREEN END OF BLOCK B2.
    *                     At  Selection-Screen                             *
    *VALIDATION
    *                       Start of Selection                             *
    START-OF-SELECTION.
    *POPULATION OF DATA INTO INTERNAL TABLE ITAB
      PERFORM GET_DATA.
    *DEFINE USER DEFINED FIELDCATALOG
      PERFORM DEFINE_FIELDCATALOG.
    *SUBTOTALS AND TOTALS DISPLAY USING SORT
      PERFORM SORT_LIST.
    *CHANGE FCODE OF STATUS
      PERFORM CHANGE_FCODE.
    *CHECK RADIOBUTTON OPTION AND ACCORDINGLY FINAL DISPLAY
      PERFORM CHECK_OPTION.
    *&      Form  GET_DATA
    *       text
    FORM GET_DATA.
      SELECT VBELN
             VBTYP
             AUDAT
             AUGRU
             AUART
             NETWR
             WAERK FROM VBAK INTO TABLE IT_VBAK
             WHERE VBELN IN S_VBELN AND VBTYP = P_VBTYP
             AND ERDAT > '01.01.2004' AND NETWR > 0.
      LOOP AT IT_VBAK.
        IF IT_VBAK-NETWR < 10000.
          IT_VBAK-ICON = '@08@'.
        ELSEIF IT_VBAK-NETWR > 100000.
          IT_VBAK-ICON = '@0A@'.
        ELSE.
          IT_VBAK-ICON = '@09@'.
        ENDIF.
        MODIFY IT_VBAK INDEX SY-TABIX.
      ENDLOOP.
    ENDFORM.                    "GET_DATA
    *&      Form  CHECK_OPTION
    *       text
    FORM CHECK_OPTION.
      WA_EVENTS-NAME = 'TOP_OF_PAGE'.
      WA_EVENTS-FORM = 'TOP'.
      APPEND WA_EVENTS TO IT_EVENTS.
      CLEAR WA_EVENTS.
      WA_EVENTS-NAME = 'END_OF_LIST'.
      WA_EVENTS-FORM = 'END_LIST'.
      APPEND WA_EVENTS TO IT_EVENTS.
      CLEAR WA_EVENTS.
      IF LIST = 'X'.
        PERFORM LIST_DISP.
      ENDIF.
      IF GRID = 'X'.
        PERFORM GRID_DISP.
      ENDIF.
    ENDFORM.                    "CHECK_OPTION
    *&      Form  DEFINE_FIELDCATALOG
    *       text
    FORM DEFINE_FIELDCATALOG.
      WA_FIELDCAT-COL_POS = 1.
      WA_FIELDCAT-FIELDNAME = 'ICON'.
      WA_FIELDCAT-SELTEXT_L = 'ICON'.
      WA_FIELDCAT-ICON = 'X'.
      WA_FIELDCAT-OUTPUTLEN = 8.
      WA_FIELDCAT-TABNAME = 'IT_VBAK'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-COL_POS = 2.
      WA_FIELDCAT-FIELDNAME = 'VBELN'.
      WA_FIELDCAT-SELTEXT_L = 'SALES DOC NO.'.
      WA_FIELDCAT-OUTPUTLEN = 10.
      WA_FIELDCAT-TABNAME = 'IT_VBAK'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-COL_POS = 3.
      WA_FIELDCAT-FIELDNAME = 'AUDAT'.
      WA_FIELDCAT-SELTEXT_L = 'CREATED ON'.
      WA_FIELDCAT-OUTPUTLEN = 10.
      WA_FIELDCAT-TABNAME = 'IT_VBAK'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-COL_POS = 4.
      WA_FIELDCAT-FIELDNAME = 'VBTYP'.
      WA_FIELDCAT-SELTEXT_L = 'CATEGORY'.
      WA_FIELDCAT-OUTPUTLEN = 1.
      WA_FIELDCAT-TABNAME = 'IT_VBAK'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-COL_POS = 6.
      WA_FIELDCAT-FIELDNAME = 'AUGRU'.
      WA_FIELDCAT-SELTEXT_L = 'REASON'.
      WA_FIELDCAT-OUTPUTLEN = 3.
      WA_FIELDCAT-TABNAME = 'IT_VBAK'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-COL_POS = 5.
      WA_FIELDCAT-FIELDNAME = 'AUART'.
      WA_FIELDCAT-SELTEXT_L = 'DOC TYPE'.
      WA_FIELDCAT-OUTPUTLEN = 4.
      WA_FIELDCAT-TABNAME = 'IT_VBAK'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-COL_POS = 7.
      WA_FIELDCAT-FIELDNAME = 'NETWR'.
      WA_FIELDCAT-SELTEXT_L = 'NET VALUE'.
      WA_FIELDCAT-OUTPUTLEN = 17.
      WA_FIELDCAT-DECIMALS_OUT = 2.
    *  WA_FIELDCAT-DO_SUM = 'X'.
      WA_FIELDCAT-TABNAME = 'IT_VBAK'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-COL_POS = 8.
      WA_FIELDCAT-FIELDNAME = 'WAERK'.
      WA_FIELDCAT-SELTEXT_L = 'UNIT'.
      WA_FIELDCAT-OUTPUTLEN = 50.
      WA_FIELDCAT-TABNAME = 'IT_VBAK'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
    ENDFORM.                    "DEFINE_FIELDCATALOG
    *&      Form  DEFINE_LAYOUT
    *       text
    FORM DEFINE_LAYOUT.
      LAYOUT-ZEBRA = 'X'.
      LAYOUT-SUBTOTALS_TEXT = 'SUBTOTAL SUM'.
      LAYOUT-WINDOW_TITLEBAR = 'EXERCISE 2'.
      LAYOUT-TOTALS_TEXT  = 'TOTAL'.
    ENDFORM.                    "DEFINE_LAYOUT
    *&      Form  SORT_LIST
    *       text
    FORM SORT_LIST.
      WA_SORT-FIELDNAME = 'VBELN'.
      WA_SORT-TABNAME = 'IT_VBAK'.
      WA_SORT-SPOS = 1.
      WA_SORT-UP = 'X'.
      WA_SORT-SUBTOT = 'X'.
      APPEND WA_SORT TO IT_SORT.
      CLEAR WA_SORT.
      WA_SORT-FIELDNAME = 'NETWR'.
      WA_SORT-TABNAME = 'IT_VBAK'.
      WA_SORT-UP = 'X'.
      WA_SORT-SPOS = 2.
      WA_SORT-SUBTOT = 'X'.
      APPEND WA_SORT TO IT_SORT.
      CLEAR WA_SORT.
    ENDFORM.                    "SORT_LIST
    *&      Form  LIST_DISP
    *       text
    FORM LIST_DISP.
      PERFORM DEFINE_LAYOUT.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
         I_CALLBACK_PROGRAM             = SY-REPID
         IT_FIELDCAT                    = IT_FIELDCAT
         IS_LAYOUT                      = LAYOUT
         IT_SORT                        = IT_SORT
         I_CALLBACK_PF_STATUS_SET       = 'STATUS'
         IT_EXCLUDING                   = I_FCODE_EXTAB
         I_CALLBACK_USER_COMMAND        = 'USER_COMMAND'
         IT_EVENTS                      = IT_EVENTS[]
    *   IMPORTING
    *     E_EXIT_CAUSED_BY_CALLER        =
    *     ES_EXIT_CAUSED_BY_USER         =
        TABLES
         T_OUTTAB                       = IT_VBAK
    *   EXCEPTIONS
    *     PROGRAM_ERROR                  = 1
    *     OTHERS                         = 2
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "LIST_DISP
    *&      Form  GRID_DISP
    *       text
    FORM GRID_DISP.
      PERFORM DEFINE_LAYOUT.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM       = SY-REPID
          IS_LAYOUT                = LAYOUT
          IT_FIELDCAT              = IT_FIELDCAT
          IT_SORT                  = IT_SORT
          I_CALLBACK_PF_STATUS_SET = 'STATUS'
          IT_EXCLUDING             = I_FCODE_EXTAB
          I_CALLBACK_USER_COMMAND  = 'USER_COMMAND'
          IT_EVENTS                = IT_EVENTS[]
        TABLES
          T_OUTTAB                 = IT_VBAK.
    * EXCEPTIONS
    *   PROGRAM_ERROR                     = 1
    *   OTHERS                            = 2
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "GRID_DISP
    *&      Form  STATUS
    *       text
    *      -->P_EXTAB    text
    FORM STATUS USING P_EXTAB TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'STATUS' EXCLUDING P_EXTAB.
    ENDFORM.                    "STATUS
    *&      Form  USER_COMMAND
    *       text
    *      -->R_UCOMM      text
    *      -->RS_SELFIELD  text
    FORM USER_COMMAND USING R_UCOMM     LIKE SY-UCOMM
                                   RS_SELFIELD TYPE SLIS_SELFIELD.
      CASE R_UCOMM.
        WHEN 'BACK' OR 'CANC' OR 'EXIT'.
          LEAVE TO SCREEN 0.
        WHEN '&IC1'.
          SET PARAMETER ID 'AUN' FIELD RS_SELFIELD-VALUE.
          CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
      ENDCASE.
    ENDFORM.                    "USER_COMMAND
    *&      Form  CHANGE_FCODE
    *       text
    FORM CHANGE_FCODE.
      WA_FCODE = 'PRNT'.
      APPEND WA_FCODE TO I_FCODE_EXTAB.
      WA_FCODE = '&OAD'.
      APPEND WA_FCODE TO I_FCODE_EXTAB.
      WA_FCODE = '&AVE'.
      APPEND WA_FCODE TO I_FCODE_EXTAB.
      WA_FCODE = '&EB9'.
      APPEND WA_FCODE TO I_FCODE_EXTAB.
      WA_FCODE = '&SUM'.
      APPEND WA_FCODE TO I_FCODE_EXTAB.
      WA_FCODE = '&UMC'.
      APPEND WA_FCODE TO I_FCODE_EXTAB.
      WA_FCODE = '&XPA'.
      APPEND WA_FCODE TO I_FCODE_EXTAB.
      WA_FCODE = '&OMP'.
      APPEND WA_FCODE TO I_FCODE_EXTAB.
    ENDFORM.                    "CHANGE_FCODE
    *&      Form  TOP
    *       text
    FORM TOP.
      IF LIST = 'X'.
        WRITE:/ SY-ULINE.
        WRITE:/ 'DATE:', SY-DATUM,55 'INTELLIGROUP ASIA PVT LTD'.
        WRITE:/ 'TIME:', SY-UZEIT.
        WRITE:/ 'USER NAME:', SY-UNAME,60 SY-TITLE.
        WRITE:/ 'PAGE', SY-PAGNO.
        WRITE:/ SY-ULINE.
      ENDIF.
      IF GRID = 'X'.
        DATA: LS_LINE TYPE SLIS_LISTHEADER,
              E04_LT_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
    *   Listenüberschrift: Typ H
        CLEAR LS_LINE.
        LS_LINE-TYP  = 'H'.
    *   LS_LINE-KEY:  not used for this type
        LS_LINE-INFO = 'Summary'.
        APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
    *   Kopfinfo: Typ S
        CLEAR LS_LINE.
        LS_LINE-TYP  = 'S'.
        LS_LINE-KEY  = 'Intelligroup'.
        LS_LINE-INFO = ''.
        APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
        LS_LINE-KEY  = 'ASIA'.
        LS_LINE-INFO = 'PVT LTD'.
        APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
    *   Aktionsinfo: Typ A
        CLEAR LS_LINE.
        LS_LINE-TYP  = 'A'.
    *   LS_LINE-KEY:  not used for this type
        LS_LINE-INFO = 'truman'.
        APPEND LS_LINE TO  E04_LT_TOP_OF_PAGE.
        CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
          EXPORTING
            IT_LIST_COMMENTARY = E04_LT_TOP_OF_PAGE
            I_LOGO             = 'ENJOY_SAP_LOGO'.
      ENDIF.
    ENDFORM.                    "TOP
    *&      Form  END_LIST
    *       text
    FORM END_LIST.
      IF LIST = 'X'.
        SKIP 2.
        WRITE:/60 'END OF PAGE'.
      ENDIF.
      IF GRID = 'X'.
          DATA: LS_LINE TYPE SLIS_LISTHEADER,
              E04_LT_END_OF_LIST TYPE SLIS_T_LISTHEADER.
    *   Listenüberschrift: Typ H
        CLEAR LS_LINE.
        LS_LINE-TYP  = 'H'.
    *   LS_LINE-KEY:  not used for this type
        LS_LINE-INFO = 'Summary'.
        APPEND LS_LINE TO E04_LT_END_OF_LIST.
    *   Kopfinfo: Typ S
        CLEAR LS_LINE.
        LS_LINE-TYP  = 'S'.
        LS_LINE-KEY  = 'Intelligroup'.
        LS_LINE-INFO = ''.
        APPEND LS_LINE TO E04_LT_END_OF_LIST.
        LS_LINE-KEY  = 'ASIA'.
        LS_LINE-INFO = 'PVT LTD'.
        APPEND LS_LINE TO E04_LT_END_OF_LIST.
    *   Aktionsinfo: Typ A
        CLEAR LS_LINE.
        LS_LINE-TYP  = 'A'.
    *   LS_LINE-KEY:  not used for this type
        LS_LINE-INFO = TEXT-105.
        APPEND LS_LINE TO  E04_LT_END_OF_LIST.
        CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
          EXPORTING
            IT_LIST_COMMENTARY = E04_LT_END_OF_LIST.
      ENDIF.
    ENDFORM.                    "END_LIST

  • Report on open sales order ,total sales

    Hello Gurus
    I am developing a report line item wise of sales order in which i need to get
    Suppose a sales order is created on 01.12.2009 for 1000 quantity
    billed quantity in december 600
    billed quantity in january     200
    1) total sales done against this SO line item wise.
    2) sales in this month againt this SO
    3)open order qty as 01.01.2010
    4)last day sales i.e from 01.01.2010 to 20.01.2010 the date of last sales against this SO
    so my output should be
    total sales = 800
    sales in this month =200
    open order qty as on 01.01.2010= 400
    please tell me the logic
    regards
    sphoorthi
    Moderator message - Please do not post your requirements and ask the forum to do your work for you - post locked
    Edited by: Rob Burbank on Jan 20, 2010 10:47 AM

    Hi,
    I gather from your thread that the question is not to build a report on a MP yes/no but more on which MP.
    Depending on the reporting needs and on how well you are able to combine the 2 cubes in the new MP I would say go for the latter option so you have more control on this one MP (for example if you need to add something that is already available in cubes).
    However, when (future!) reporting needs could mean that characteristics need to be added to the report(s) and filtered on that are not in both cubes you will have major problems getting the data properly from new MP and you would be better off using the individuals MP's and combine the data in a workbook or in a web template giving more flexibility.
    So you need to really analyze the requirements and decide on the way forward. Keep in mind possible future requirements because for now it could seem these few fields could be enough but new requirements could directly give a problem.
    Hope this helps
    C.

  • Discoverer Report Row Total

    We are running Oracle BI Discoverer Viewer version 11.1.1.4.0. When we upgraded to this version we lost some functionality. In the previous version the report displayed the number of rows the query returned. Now the row totals display only under certain conditions. For instance, I have a inventory report name INV-REP-120 and it prompts the user for 6 parameters & displays 6 columns of data. One of the parameters is named ‘Keyword' and I’ll use this one in the problem description. When I set the keyword parameter to ‘HINGE’ The bar at the top of the results sheet it displays:
    ‘Rows 1-25 of 81, Columns 1-6 of 9’
    When I change the keyword to ‘TUBE’ the viewer displays:
    ‘Rows 1-25, Columns 1-6 of 9’
    The total rows are not displayed but the number of pages. It appears that if the total number of rows is less than 200 then the row total is displayed. I changed the rows displayed from 25 to 100 and scrolled down to the last page and now the reports displays:
    ‘451 – 458 of 458, Columns 1-6 of 9’
    When I use the key word TEE I get :
    ‘Rows 1-50, Columns 1-6 of 9’
    There are 596 tees, which would be about 12 pages of 50 rows. I noticed that at the top of table there is a field ‘Page 1 of 5.’ It looks like if there are more than 5 pages it does not display the total number of rows.
    There seems to be some interaction between the total number of rows the number of rows per page and perhaps a setup on the back-end that determines whether or not the row total is displayed. How can I configure the viewer at the front-end and/or back-end to consistently display the row total for a report? Is there a Discoverer preference located in the pref.txt in the apps server that controls this?

    Hi,
    You can inform to your SP to edit the table EUL4_documents
    and ask him to modify the name of the report that is stored in the column DOC_NAME .There is absolutely no necessary to open the work book that is stored in the database and change the work book name
    Regards
    Swamy!

  • Is there a way to create a field with total pages viewed?

    Is there a way to create a field for a contact that stores the total # of pages he has ever viewed? We'd like to use this as a bases for lead scoring.

    Please don't use big red text. There's no need to do so - it won't be more attention and in fact may put people off of helping - and it's really difficult to read.
    Adding to what JG said, you can also purchase a prepaid iTunes card, available from most grocery store and discount chains in the US and other countries, and use that. You will need to enter in your address information, but you won't need a credit card.
    Regards.

  • How do I find the total size of all my Music in iTunes 11?

    I'm looking to get a new iPod, either a nano or Touch, so I'm trying to find the total size of all of my Music. Since iTunes 11's interface is so different from previous versions, I don't see a way to view that.

    Ctrl B to show top menu
    View Show Status Bar to show the grey bar at the bottom with the info you want.
    While your there View> Show Sidebar and see if you prefer that.

  • At a total loss how to export IPhone 4 video To My PC

    I've read and posted in various threads and looked all over the net. I admit I'm at a total loss as what I'm doing wrong at this point.
    I want to take the video from my Iphone and move it to my PC so I can upload it in HD to youtube.
    I've made sure to make sure my phone doesn't sync right away, gone to the my computer and click on my phone (shows a camera), then copy and paste or drag. When it moves it over it say 0 bytes.
    I'll even post a link a buddy of mine sent and if you look at step 9 it says the videos should be quick time files. Mine says nothing where it says file types.
    http://www.notebooks.com/2010/06/29/how-to-get-hd-video-from-you-iphone-4/
    Is there something I'm doing wrong? Like I said I'm at a total loss.

    I'm not sure if this will help you, but I ran across the same issue. When I tried to pull the videos off the phone in windows, it would hang during the transfer, or not transfer at all. My photos and videos are kept on an external drive and I was trying to copy to that external drive. I copy and pasted the videos into the pictures folder on my PC (instead of the external drive) and it worked like a charm. Once that was done, I just had to drag and drop into the external drive.
    I hope that helps!

  • SSRS with DAX - parameters multivalue vs total element

    Hi all,
    I'm using SSRS on top of a SSAS tabular model to create intuitive dashboards for management department.
    One thing I'm struggling with is the lack of a "total" on parameters. What I'm doing is, based on the fact table, I create the datasets that will feed each parameter, so it only has the dimension members available on the fact table. That is fine
    performance wise, you only have 1 element and it renders very quickly.
    For a management perspective at a higher level it is important to view the totals to have the big picture of the information. In my project we are in a University, so I have the parameters Year, school (there are several schools in the university campus)
    and the course (computer sciences, math, statistics, etc).
    At first glance, if I'm a course coordinador I want to pick my course and have a global view, and I'm achiveing that, but imagine now, that I am the school coordinator, or the university coordenator.
    I want to see the aggregate values by all courses or by all schools.
    In my view I have 2 ways to do this and I come from a tradition cubes background:
    1 - I would use the all element the cubes hierarchy have on each attribute
    2 - I would use multivalue parameters with StrToSet (worse performance)
    Using DAX what is your approach?
    Best regards

    Hi AsifMehmood,
    Per my understanding you have create an SSRS report with SharePoint list, now you don’t know to create the distinct parameters by using CAML query,  right?
    For the CAML language doesn’t have any reserved word (or tag) to set this particular filter to remove duplicate results, but we can use the custom code to do this function. I have tested on my local environment and we can do that by create one hidden parameter(Param1)
    to get all the values from the fields which will  add the filter and then create another parameter(Param2) to get the distinct values based on the Param1, we use the custom code to do the deduplication.
    Step by Steps information in below thread for your reference to create the parameters and the custom code:
    "How to get distinct values of sharepoint column using SSRS"
    Other similar thread for your reference:
    https://audministrator.wordpress.com/2014/02/17/sharepoint-list-add-distinct-parameter-value/
    If your problem still exists, please feel free to ask and also try to provide us more details information.
    Regards
    Vicky Liu

  • SSRS 2008 R2 Report - Sum Totals of a Filtered Group

    I'm at a loss here, so any help will me much appreciated. I will do my best to explain, but if you need additional information, please let me know:
    I have a very large dataset of patient data. Specifically for the numbers I need, I have a patient number field, a county field, a 1 or 0 for LastYear field, and a 1 or 0 for CurrentYear field.
    Example:
    PtNo    County  PY  CY
    45676  Scott     0    1
    45322  Cape     1     0
    47686  North     0     1
    The thing I am shooting for on my report is, "Volume growth in 3 counties (+20 cases)."
    I created a group and grouped by County (group name County) and I included a group filter to only include "total cases of CY" are greater than "total cases of PY" to narrow my data to only counties that had a higher current year sum
    than previous year sum.
    Example:
    County  PY    CY  Difference
    Scott    141  143     2
    Cape     90    98      8
    North    78     88    10 
    All is working well, except I don't need to see the Counties themselves, I just need the 3 counties and a difference of 20. 
    I explored online and found tutorials that said to right click on the field and select "Add Total" but this total did not have my filter in it and gave me everyone. I also tried adding a row outside the group and used the RunningValue function
    (i.e. RunningValue(Fields!FYTD_Current_Year.Value, Sum, "County"))  but it gave me a message that states "The Value expression for the text box 'Textbox456' has a scope parameter that is not valid for an aggregate function. The scope
    parameter must be set to a string constant that is equal to either the name of a containing data region or the name of a dataset."
    When I move the row with the RunningValue function inside the group, it runs but I get the same information repeated twice for each county with no final total.
    So I am not sure how to go about getting my values I need for my report. Anybody know how to resolve this?
    Thanks,
    Cyndi
    cpemtp1

    Hi Cyndi,
    Based on my understanding, you specify a filter condition in group properties. Then you want to sum the filtered values for each field.
    In this scenario, we need to specify a filter condition on group level. If we use sum() function out of group, the expression will calculate the total values on dataset level instead of group level. So we can’t simply use expression to achieve this goal.
    However, we can use custom code to record the filtered values for each field, then we can calculate the total based on these values. Please refer to the steps and screenshots below:
    1. Add the custom code below into the report:
    Public Shared Value1 as Integer=0
    Public Shared Function GetValue1(Item as Integer) as Integer
    value1= value1 + Item
    return Item
    End Function
    Public Shared Function GetTotal1()
    return value1
    End Function
    Public Shared Value2 as Integer=0
    Public Shared Function GetValue2(Item as Integer) as Integer
    value2= value2 + Item
    return Item
    End Function
    Public Shared Function GetTotal2()
    return value2
    End Function
    2. Design the tablix like below:
    3. The result looks like below:
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu

  • SSRS 2008 - Expression for totals in a Matrix

    Hi,
    I have a simple Matrix with the following groups:
    Row Group: Program
    Column Group: Employee
    I need to add a new total column on the right side of the matrix using a simple calculation but I haven't been able to find how to do that other than doing it on the query side. Here's how the Matrix looks like:
    Program
    Employee1
    Employee2
    Employee3
    New Column
    Program1
    45.0%
    0.0%
    87.5%
    Program2
    12.5%
    50.0%
    3.8%
    Program3
    28.8%
    1.3%
    8.7%
    Program4
    1.3%
    23.8%
    0.0%
    Total
    87.6%
    75.1%
    100.0%
    The new column should display the sum of each program divided by the sum of all totals....for example for Program1 the calculation should be (45+0+87.5)/(87.6+75.1+100) which should be equal 50.44% ...the same logic applies for the other
    rows.
    The number of columns (Employees) and rows (Programs) are dynamic, so they change according to who is seeing the report. I'm unable to reference the sum of the total at the bottom row, not sure what I am missing.
    Any input on this is greatly appreciated.

    Hi Cleber,
    I have tested on my local environment and your issue can be caused by you haven't include the scope in the sum function, please find details information below about how to do the calculation:
    Please design the matrix like below:
    You can find the Row Group name is "Program" and the Column Group name is "Empolyee", this will include in the sum expression as below:
    Expression1: =SUM(Fields!Amount.Value,"Empolyee")
    Expression2: =SUM(Fields!Amount.Value,"Program")
    Expression2: =Sum(Fields!Amount.Value,"Program")/Sum(Fields!Amount.Value,"DataSet1")
    Preview you will got the result like below:
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    If you have any feedback on our support, please click
    here.
    Vicky Liu
    TechNet Community Support

Maybe you are looking for

  • Problem when Reading Multiple values from Arduino to Vb

    Hi Mates, I am getting 4 values from Arduino using Serial.Println statement 4 times. How do I need to receive these values to 4 different variables in VB without using any buttons. We have to serial data received as per my knowledge. I've written the

  • Install HRCS 9.0 R5 with Linux Issue: upgrade HRCS 9.0 PT8.52 to PT8.53

    Folks, Hello. I have been installing HCM and Campus Solution 9.0 with PeopleTools8.53. Server machine is Oracle Linux 5.10 and client machine is Windows XP.  My internet architecture is WebLogic11g/Tuxedo11g/OracleDatabase 11gR1. Peopletools 8.53 run

  • Audio to TV from macbook pro

    I am using an HMDI cable along with an adapter to get streaming video to my TV. Once I figured out the mirroring issue it works great except the audio. It doesn't transfer to the TV like the video did. Audio still comes from the laptop. Any ideas?

  • Nested Repeat Region Question

    Hi, I am trying to summarise the activity within a forum. The forum contains 4 different discussion boards you can post to, and I want to list each discussion board, along with the 5 latest threads within each discussion board. (each thread is assign

  • Endpoint for FTP based proxy in Linux-urgent

    Hi, I have configured FTP based proxy. Both FTP server and ALSB are running on same machine. I have configured endpoint as ftp://<ip>:21/. FTP directory is /home/alsb I have also mentioned error,archive and download dirs in /home/Dir/download ,/home/