Regarding portion dates

am confused between the portion dates

Dear Qhairuddin,
I think this will help you, A detail about Document of Portions,
1. When you create a portion, you can transfer existing values from another portion and use these as a template.
2.  Dynamic Scheduling
When you create a portion, you must decide whether you want the portion and the corresponding meter reading units to be used for dynamic scheduling. Set this indicator if you want the portion to be used for dynamic scheduling.
3.   End Bill. Per. (End of Billing Period)
Here you can determine the date when the portion is billed for the first time. This date is used as the base date for calculating the end of the billing periods or floating backbilling periods.
This date cannot come before the end of the meter reading period or the scheduled meter reading date of all allocated meter reading units.
4.  All Date Billg (Billing Allocation Date)
This date enables you to statistically allocate billing. It is used during cross-contract billing to allocate billing orders and documents. The date is also copied to the billing order.
This date cannot come after the end of the billing period. The end of the billing period cannot come before the end of the meter reading period or the scheduled meter reading date of all allocated meter reading units.
If you use budget billing procedure 3 (payment plan) in your system and a payment plan has already been created for this portion, you can no longer change the allocation date.
5.  Sch. Bill. Date (Scheduled Billing Date)
This date specifies the day the system starts billing contracts that belong to a portion. The factory calendar is used for this.
This date displays the point in time when a billing period is prepared. Billing orders that have the status billableafter this date are not processed. The date, therefore, acts as the selection date for determining billable billing orders during mass and single billing.
6.  Billing Class / Division Category
You can restrict how the portion is used by entering a billing class and a division category. You have the following options for this:
Restricted portion
In the meter reading unit, you can only use the constellations of billing class and division category that are entered in the portion. You can also not make any restrictions.
Portion not restricted
The meter reading unit can be restricted or unrestricted.
Regards
Rehan K.

Similar Messages

  • How can I select a radio button in a table regarding the data in the cells?

    Hi everyone
    This is the issue: I need to select the RadioButton which is in a table with data related to transfers in the cells next to it, so I need to select the correct radio regarding the data next to it.
    This is the whole process: First I go to the Add Recurring Transfer section and select the parameters of the transfer (Accounts, date, amount, months etc), then with VB code I capture those parameters from the page and store them into Global variables for further usage on my E-tester script.
    Right after that I need to select the radiobutton regarding the data of the transfer that I already created in order to delete it or modify it (Please see Attachment selectradio1.jpg)
    So How can I move along the table and compare each cell with the variables that I created with the transfer information, so when I finish comparing a row cell by cell and if all the comparison match well in that row, I could select the radiobutton of the row.
    Note: Second Attachment selectradio2.jpg shows the source code of the table...If you need more info please let me know
    Could you please help me with this problem?? I'm Kind of frustrated with this issue jejeje

    Here is an example. I uploaded mock html so that you can actually try this code. I think this does exactly what you are asking.
    Private Sub RSWVBAPage_afterPlay()
    Dim tbl As HTMLTable
    Dim tblRow As HTMLTableRow
    Dim tblCell As HTMLTableCell
    Dim strValue As String
    Dim rButton As HTMLInputElement
    ' ******** This would be your global variable. I put this so that values are seperated by a semicolin you can use what ever format works for you.
    strValue = "03/22/2008;03/22/2008;*************1977;*************1977;$25.25;Jan, Jun, Jul, Dec"
    ' Strip out the ; for inner text comparison
    strValue = Replace(strValue, ";", "")
    ' This will get the table but can be modifoed to be more specific
    Set tbl = RSWApp.om.FindElement(, "TABLE")
    ' This loops through all the rows in the table until a match to the strValue is found
    ' then clicks the radio button. Findelements allows you to specify a root element
    ' once the correct root row is found, FindElemets can get the correct radio button
    For Each tblRow In tbl.rows
      If tblRow.innerText = strValue Then
        Set rButton = RSWApp.om.FindElement("account", "INPUT", "NAME", , , tblRow)
         rButton.click
       End If
    Next
    End Sub
    I also uploaded the script I created. You should be able to run it and see how it works.
    This should get you going.

  • Query regarding the data type for fetcing records from multiple ODS tables

    hey guys;
    i have a query regarding the data type for fetcing records from multiple ODS tables.
    if i have 2 table with a same column name then in the datatype under parent row node i cant add 2 nodes with the same name.
    can any one help with some suggestion.

    Hi Mudit,
    One option would be to go as mentioned by Padamja , prefxing the table name to the column name or another would be to use the AS keyoword in your SQL statement.
    AS is used to rename the column name when data is being selected from your DB.
    So, the query  Select ename as empname from emptable will return the data with column name as empname.
    Regards,
    Bhavesh

  • Regarding baseline date

    i want to show the base line date is unchangeble.how can i do that , for the base line date where can i supress.one of our friends told me regarding baseline date, you can supress by selecting FSG, or validations and parameter ID.
    but i have tried the above scenarios , it is not showing  any field in account groups,postingkeys and field status groups. and in the validations also it is not showing any baseline date. and in the parameter id it is not showing any parameter id for the baselind date.if i supress user cannot change that date.
    please help me

    Reddy,
    Follow the menu path for validation
    Spro-FA-GLA-Business Transactions-General Ledger posing-make check and document settings-validation for accounting documents.
    In this you can select line items and in prerequisite step you can select Baseline Date, which is in almost down in the column, give the baseline date table and give the condition as you require.  Make active callup point.
    i hope it will work.
    If it is useful award points.
    sd/-
    Sreenivasulu.P

  • Question regarding Polling data from database using DB Adapters in BPEL

    Hi,
    I have the following question regarding Polling data from database using DB Adapters in BPEL -
    If I am selecting data from multiple tables/view to ultimately generate hierarchical xml document, is there a way that I specify polling all of these tables/views. Is polling limited only to one table/view?
    Thanks
    Ravi

    Hi Ravi,
    your question seems to have been answered for the question of polling a set of tables with one as the root, and getting back a hierarchical xml representing multiple related tables.
    However you can also poll for changes to both the root table and its related tables. Not sure if this was your question or the one already answered. If the former please check out the sample
    bpel/samples/tutorials/122.DBAdapter/advanced/polling/PollingForChildUpdates
    Thanks
    Steve

  • Regarding Posting Date in IDOC for Intercompany Invoice

    Hi,
    We have priority issue regarding posting date in IDOC. When we create Intercompany invoice, billing date in intercompany is Actual GI date of delivery document and also Invoice posted with Actual GI date only. But, in IDOC, Posting date is appearing as Planned GI date of delivery document.
    Actual GI date and Billing date and Posting date in IDOC should be same., but, posting date in IDOC is appearing as Planned GI date of delivery doc.
    Kindly help in finding out the root cause of, why posting date in IDOC is not appearing as Billing date and appearing as Planned GI date of Delivery document. This issue is happening from past one month for Intercompany invoice, previously posting date in IDOC used to appear as Billing date only.
    Thanks & Regards,
    Jai Prabhu.

    Hi Jai,
    Are you using standard message type INVOIC ?
    If so check SEGMENT E1EDK02 for date field
    and also check if there is no code put to overwrite the date
    you can check the code in Function module  "IDOC_OUTPUT_INVOIC"
    thanks
    santosh

  • Regarding genric data source

    hi guyz,
         i have some doubts regarding generic data source for the following qeastion.
       1).what is ALE pointer(ALE delta)?.in which senario we use this?.can u explain me with one realtime senario so that i can understand easily.
       2).what is SLA? explain with one senario.
       3).when we use these t-codes: RSMO,SM50 in process chain.

    1. ALE is Application Link Enabling (ALE)
    It is the set of tools, programs, and data definitions that provides the mechanism for distributing SAP functionality and data across multiple systems. ALE enables the construction and operation of distributed applications.
    Its purpose was to overcome the limitations of a single SAP system. A single SAP system that runs on top of one database often does not fulfill the needs of larger corporations, either from a business or a technical perspective.ALE allows the implementation of loosely coupled SAP systems; each of the SAP systems has its own database and is essentially independent from the other systems. ALE allows us to distribute data between different systems and different business processes.
    ALE enables you to transfer data(master/transactional data) from an SAP system to SAP/Non-SAP system you can use ALE.This done using IDOCs.
    ALE can be divided into
    Output Process: Extracting data from database and putting it in the IDOC.
    Communication Process: Which involves transferring the IDOC to the target system.
    Inbound Process: Posting the IDOC data into the tables of the receiver system.
    2. SLA is service level agreement, what you need on this ?? Its an agreement betn client and service provider regarding the service request and their resolution. Like P! issue should be solved in 1 hr , P2 issue 3 hr..something like that, varies from client to client
    3. RSMO is used to monitor the data load in BW. You have several options to restrict your criteria to monitor load.
    In SM37 if you goto the job and double click on that, it brings you to another screen with some details for the job. IN this screen if you hit the job details button in the resulting screen, it'll show you a PID number and an executing server number. With this combination, you can check the job in SM50.
    Assign Points if helpfull.
    Thanks
    Tripple k

  • Regarding PA data upload

    Hi Experts,
    I just wanted to have a discussion regarding PA data upload.
    What we feel is that, it should be ok if we go with BDC for each of the infotrype.
    hr_infotype_operation can be used but  again it  also use bdcdata only so it should not  be a big performmance issue.
    Both approach can be used as per the data upload and its' going to be one time only.
    Can anyone of you suggest something regarding the same.
    I have searched the forum and i got responses like bdc can be used ( some might sue FM also).
    Can i have some comments from you guys regardimng the same ?

    Hi Rinki;
    Try LSMW recording method for data upload in PA Infotype.
    Regards

  • Regarding master data loading for different source systems

    Hi Friends,
    I have an issue regarding master data loading.
    we have two source systems one is 4.6c and another is ecc 6.0.
    First i am loading the master data from 4.6c to bi7.0.
    Now this 4.6c is upgraded to ecc6.0.
    *In 4.6c and ecc6.0c master data is changing.
    After some time there is no 4.6c, only ecc 6.0 is there.
    Now if i load master data from ecc6.0 to bi7.0 what will happen.
    Is it possible ?
    Could you please tell me?
    Regards,
    ramnaresh.

    Hi ramnaresh porana,
    Yes, its possible. You can load data from ECC.
    Data will not change, may be you may get more fields in datasource at r/3 side, but BW/BI side no change in mappings structures are same. So data also same.
    You need to take care of Delta's before and after upgrade.
    Hope it Helps
    Srini

  • Regarding fetching data into internal table from D.B Tables, D.B View

    Hi All,
    I Have following 5 tables in my Database.
    LTAP
    TABNAME
    FIELDNAME
    KEYFLAG
    LTAP
    MANDT
    X
    LTAP
    LGNUM
    X
    LTAP
    TANUM
    X
    LTAP
    TAPOS
    X
    LTAP
    VLPLA
    Z0MNH
    TABNAME
    FIELDNAME
    KEYFLAG
    Z0MNH
    MANDT
    X
    Z0MNH
    WERKS
    X
    Z0MNH
    ZMANNO
    X
    Z0MNH
    LGNUM
    X
    Z0MNH
    AENAM
    Z0MNH
    BUDAT
    Z0MNH
    CPUTM
    Z0MNH
    LAEDA
    Z0MNH
    STATUS
    Z0MNH
    USNAM
    Z0MNH
    ZARDAT
    Z0MNH
    ZARTIM
    Z0MNH
    ZCLDAT
    Z0MNH
    ZCLTIM
    Z0MNH
    ZDPDAT
    Z0MNH
    ZDPTIM
    Z0MNH
    ZDRIVR
    Z0MNH
    ZINDAT
    Z0MNH
    ZINTIM
    Z0MNH
    ZLOAD
    Z0MNH
    ZNOTES
    Z0MNH
    ZPRDAT
    Z0MNH
    ZPRTIM
    Z0MNH
    ZSUPR
    Z0MNH
    ZTRAILR
    Z3MANBOXIDHDR
    TABNAME
    FIELDNAME
    KEYFLAG
    Z3MANBOXIDHDR
    MANDT
    X
    Z3MANBOXIDHDR
    WERKS
    X
    Z3MANBOXIDHDR
    ZMANNO
    X
    Z3MANBOXIDHDR
    EXIDV
    X
    Z3MANBOXIDHDR
    NLPLA
    Z3MANBOXIDHDR
    NLTYP
    Z3MANBOXIDHDR
    VLTYP
    Z3MANBOXIDHDR
    Z0PAL
    Z3MANBOXIDHDR
    Z3COMENT
    Z3MANBOXIDHDR
    Z3RECPT_FLAG
    Z3MANBOXIDITM
    TABNAME
    FIELDNAME
    KEYFLAG
    Z3MANBOXIDITM
    MANDT
    X
    Z3MANBOXIDITM
    WERKS
    X
    Z3MANBOXIDITM
    ZMANNO
    X
    Z3MANBOXIDITM
    EXIDV
    X
    Z3MANBOXIDITM
    ITEM_NO
    Z3MANBOXIDITM
    MATNR
    Z3MANBOXIDITM
    VEMEH
    Z3MANBOXIDITM
    VEMNG
    Z3MANBOXIDITM
    Z_CARTON
    Z3MANBOXIDSERIAL
    TABNAME
    FIELDNAME
    KEYFLAG
    Z3MANBOXIDSERIAL
    MANDT
    X
    Z3MANBOXIDSERIAL
    WERKS
    X
    Z3MANBOXIDSERIAL
    EXIDV
    X
    Z3MANBOXIDSERIAL
    ZMANNO
    X
    Z3MANBOXIDSERIAL
    ITEM_NO
    Z3MANBOXIDSERIAL
    SERNR
    Based on all the above tables i need to fill in below internal table field as given below:
    <b>Internal Table I_TAB
    ZMANNO
    LGNUM
    WERKS
    EXIDV
    ITEM_NO
    MATNR
    SERNR
    VEMNG
    VEMEH
    VLTYP
    NLTYP
    VLPLA
    NLPLA
    ZLOAD
    USNAM
    STATUS
    BUDAT
    CPUTM
    ZINDAT
    ZINTIM
    ZARDAT
    ZARTIM
    ZCLDAT
    ZCLTIM</b>
    Extract data from Manifest header <b>Z0MNH, Z3MANBOXIDHDR,
    Z3MANBOXIDITM, Z3MANBOXIDSER and LTAP</b> tables based on selection parameter.
    Selection Screen will have folowing Select-option fields-
    <b>LGNUM
    WERKS
    ZMANNO
    USNAM
    ZLOAD
    EXIDV
    MATNR
    SERNR
    VLTYP
    NLTYP
    VLPLA
    NLPLA
    BUDAT
    ZINDAT
    ZARDAT
    ZCLDAT</b>
    Based on above selection criteria i need to fetch above internal table fields data.
    Then need to Move corresponding header and item data in ITAB_RESULT internal table.
    I need to fetch above fields based on above 5 tables and put in final Internal Table.
    Can anybody tell me the logic how can i write the same.
    Also can anybody tell me i am trying to create a DataBaseView for
    Z0MNH, Z3MANBOXIDHDR, Z3MANBOXIDITM, Z3MANBOXIDSERIAL and LTAP tables.
    <b>Note:
    1. Z3MANBOXIDITM table may contain multiple material[MATNR] for same box-id[EXIDV] (with another line item).
    2.  Z3MANBOXIDSERIAL table may contain multiple record for one box id[EXIDV]+item_no[ITEM_NO].</b>
    But what are the <b>TABLE/JOIN Conditions</b> i need to write while creating <b>DB View</b> for above <b>5</b> tables.
    Can anybody solve above 2 issues!
    Thanks in advance.
    Thanks,
    Deep.

    Hi Deep,
    While creation of DB view just make sure abt the key relation between the tables. Based on that u can join the tables...First fetch the data from header table then by using for all entries u can fetch the line items data.
    Hope this helps you. Reply for queries, shall post the updates.
    Regards. 
    Kumar.

  • Regarding the date of last change in sales order...

    Hi,
    Can anyone help me in the scenario...
    I have to pick the date of last change in sales order...whether it is done on Configuration items ,additional data B or on the ordered quantity...
    the problem is that it has some customized fields that are included in VBAK....
    So i need help regarding this...shud i have to writ a user exit for this....or i hv to do a change in USEREXIT_SAVE_DOCUMENT .
    Plz help me..
    Edited by: Amit Gupta on May 1, 2008 3:02 PM

    VBAK-AEDAT will be updated, evenIf you have your custom fields in Sales Order.
    Regards,
    Naimesh Patel

  • Regarding reading data from a file in the application server.

    Hello Everyone,
    My question is:
    The file in the application server consists of data with header, detail and trail out of which the detail contains the main information. The detail again contains the data in the form of a continuous string and again some spaces corresponding to a single record. I need to split the data in the internal table in such a way so that the first few characters get into field-1 of the target internal table. Again I need to consider the spaces for accessing the data for filling up in field-2. How do I decide on the 'Split' statement and specially when the whole string has to be taken care of as contatining data in a single string format without space and again some data after some spaces corresponding to a single record.
    Your help is very much needed. Thanks to all the experts in advance.

    Hi
      This is the sample code I was used for the similar requirement.
    DATA: single_line TYPE string .
    v_file_listings = pa_filn1.
    IF v_file_listings IS INITIAL .
    MESSAGE e039 WITH v_file_listings.
    ENDIF.
    *-- read file, split lines into fields and put data into table
    OPEN DATASET v_file_listings FOR INPUT IN TEXT MODE ENCODING NON-UNICODE. "Opening the files
    IF sy-subrc EQ 0.
    DO.
    READ DATASET v_file_listings INTO single_line. "Reading the content of file into line
    IF sy-subrc = 0.
    IF sy-index > 1. "skip header-line
    SPLIT "Split the content of line into work area
    single_line
    AT k_split
    INTO
    wa_listings-kschl " Condition type
    wa_listings-tabname16 " Condition table name
    wa_listings-vkorg " Sales organisation
    wa_listings-kunnr " sold-to party numberor ship-to party number
    wa_listings-matnr " Material Number
    wa_listings-kodatab " Valid-from date
    wa_listings-kodatb1. " Valid-to date
    APPEND wa_listings TO itab_listings. "Appending Work Area to internal table
    ENDIF.
    ELSE.
    EXIT.
    ENDIF.
    v_count1 = sy-tabix.
    ENDDO.
    Regards,
    Sreeram

  • URGENT: REGARDING POSTING DATE AND DELETION OF ZEROS IN ALV REPORT

    Hi,
      I had made a report in which i have to display 'POSTING DATE' (iseg-budat) when we execute the report i.e. it should be displayed as  PERIOD :- _______  to _______ .
    2nd problem is i had displayed the material no. ,but there are zeros which are displaying in dere ,i want to remove dem ... example, if the mat.no. is  2321 ,it is displaying 000002321. i want to remove these zeros.
    Its request to all of u dat plz help me as fast as possible as it is most urgent to me and if any body provide me help he or sh e will be definately rewarded..
    Regards,
    ric.s

    Here i am giving you one of the ALV reports i have generated. Check this program. I hope it will be helpful to you.
    REPORT  ZFI_ASSIGNED_FUNDS_FINAL.
    TABLES: FMIT,FMCIT,FPOS,IFMEISA1,FMFCTRT,BSEG,ZREV_BUDGET.
    TYPE-POOLS: SLIS.
    *ALV data declarations
    DATA: FIELDCATALOG TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
          GD_SORT      TYPE SLIS_T_SORTINFO_ALV WITH HEADER LINE,
          GD_TAB_GROUP TYPE SLIS_T_SP_GROUP_ALV,
          GD_LAYOUT    TYPE SLIS_LAYOUT_ALV,
          GD_REPID     LIKE SY-REPID.
    *For ALV top of page
    DATA : IT_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
    *For ALV Events
    DATA : IT_EVENT1 TYPE SLIS_T_EVENT.
    *For ALV Events
    DATA : IT_EVENT TYPE SLIS_ALV_EVENT.
    *For top of page heading
    DATA: IT_LINE TYPE SLIS_LISTHEADER.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETER : RADIO RADIOBUTTON GROUP R1.
    IF RADIO EQ 'X'.
      SELECT-OPTIONS: FIPEX  FOR FPOS-FIPEX,                  " SELECTION FOR FUNDS CENTER & COMMITMENT ITEM
                      RFISTL FOR FMIT-RFISTL.
    ENDIF.
    PARAMETER: RADIO1 RADIOBUTTON GROUP R1.
    IF RADIO1 EQ 'X'.
      SELECT-OPTIONS : HKONT FOR BSEG-HKONT,                 " SELECTION FOR COST CENTER & G/L ACCOUNT
                       KOSTL FOR ZREV_BUDGET-KOSTL.
    ENDIF.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS: PERDE  FOR IFMEISA1-PERDE DEFAULT '01' TO '12' OBLIGATORY.
    PARAMETER :     RYEAR  LIKE FMIT-RYEAR OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK B2.
    DATA: BEGIN OF IT_TAB OCCURS 0,
             FIKRS LIKE FMFCTR-FIKRS,
             FICTR LIKE CSKS-KOSTL,
             CTR_OBJNR LIKE FMFCTR-CTR_OBJNR,
             RFISTL LIKE FMIT-RFISTL,
             OBJNR LIKE BPPE-OBJNR,
          END OF IT_TAB.
    DATA: BEGIN OF IT_TAB1 OCCURS 0,
             CO_OBJNR LIKE BPIJ-CO_OBJNR,
             POSIT LIKE BPPE-POSIT,
             FIPEX LIKE FMPOSIT-FIPEX,
             FICTR LIKE FMFCTR-FICTR,
             KSTAR LIKE COSP-KSTAR,
             RFISTL LIKE FMIT-RFISTL,
             OBJNR1 LIKE BPPE-OBJNR,
          END OF IT_TAB1.
    DATA: BEGIN OF IT_FMIT OCCURS 0,
            RYEAR LIKE FMIT-RYEAR,
            FIKRS LIKE FMIT-FIKRS,
            RFISTL LIKE ZREV_BUDGET-KOSTL,
            RFIPEX LIKE ZREV_BUDGET-KSTAR,
            HSL01 LIKE FMIT-HSL01,
            HSL02 LIKE FMIT-HSL02,
            HSL03 LIKE FMIT-HSL03,
            HSL04 LIKE FMIT-HSL04,
            HSL05 LIKE FMIT-HSL05,
            HSL06 LIKE FMIT-HSL06,
            HSL07 LIKE FMIT-HSL07,
            HSL08 LIKE FMIT-HSL08,
            HSL09 LIKE FMIT-HSL09,
            HSL10 LIKE FMIT-HSL10,
            HSL11 LIKE FMIT-HSL11,
            HSL12 LIKE FMIT-HSL12,
            HSL13 LIKE FMIT-HSL13,
            HSL14 LIKE FMIT-HSL14,
            HSL15 LIKE FMIT-HSL15,
            HSL16 LIKE FMIT-HSL16,
         END OF IT_FMIT.
    DATA: BEGIN OF IT_FMIT1 OCCURS 0,
            RYEAR LIKE FMIT-RYEAR,
            FIKRS LIKE FMIT-FIKRS,
            RFISTL LIKE ZREV_BUDGET-KOSTL,
            RFIPEX LIKE FMPG-FIPEX,
            TOTAL LIKE FMIT-TSL01,
            TOTAL1 LIKE FMIT-TSL01,
            OBJNR LIKE BPPE-OBJNR,
            POSIT LIKE BPPE-POSIT,
         END OF IT_FMIT1.
    DATA: BEGIN OF IT_BPPE OCCURS 0,
            OBJNR LIKE BPPE-OBJNR,
            POSIT LIKE BPPE-POSIT,
            GJAHR LIKE BPPE-GJAHR,
            WLP01 LIKE BPPE-WLP01,
            WLP02 LIKE BPPE-WLP02,
            WLP03 LIKE BPPE-WLP03,
            WLP04 LIKE BPPE-WLP04,
            WLP05 LIKE BPPE-WLP05,
            WLP06 LIKE BPPE-WLP06,
            WLP07 LIKE BPPE-WLP07,
            WLP08 LIKE BPPE-WLP08,
            WLP09 LIKE BPPE-WLP09,
            WLP10 LIKE BPPE-WLP10,
            WLP11 LIKE BPPE-WLP11,
            WLP12 LIKE BPPE-WLP12,
          END OF IT_BPPE.
    DATA: BEGIN OF IT_BPPE1 OCCURS 0,
            OBJNR LIKE BPPE-OBJNR,
            POSIT LIKE BPPE-POSIT,
            GJAHR LIKE BPPE-GJAHR,
            RFISTL LIKE FMIT-RFISTL,
            FIPEX LIKE FPOS-FIPEX,
            TOTAL2 LIKE BPPE-WLP01,
          END OF IT_BPPE1.
    DATA: BEGIN OF IT_CSKS OCCURS 0,
           KOKRS LIKE CSKS-KOKRS,
           KOSTL LIKE CSKS-KOSTL,
           BUKRS LIKE CSKS-BUKRS,
           OBJNR LIKE CSKS-OBJNR,
         END OF IT_CSKS.
    DATA: BEGIN OF IT_COSP OCCURS 0,
           OBJNR LIKE COSP-OBJNR,
           GJAHR LIKE COSP-GJAHR,
           KSTAR LIKE COSP-KSTAR,
           BEKNZ LIKE COSP-BEKNZ,
           WKG001 LIKE COSP-WKG001,
           WKG002 LIKE COSP-WKG002,
           WKG003 LIKE COSP-WKG003,
           WKG004 LIKE COSP-WKG004,
           WKG005 LIKE COSP-WKG005,
           WKG006 LIKE COSP-WKG006,
           WKG007 LIKE COSP-WKG007,
           WKG008 LIKE COSP-WKG008,
           WKG009 LIKE COSP-WKG009,
           WKG010 LIKE COSP-WKG010,
           WKG011 LIKE COSP-WKG011,
           WKG012 LIKE COSP-WKG012,
         END OF IT_COSP.
    DATA: BEGIN OF IT_COSP2 OCCURS 0,
           OBJNR LIKE COSP-OBJNR,
           GJAHR LIKE COSP-GJAHR,
           KSTAR LIKE COSP-KSTAR,
           FIPEX LIKE FMPG-FIPEX,
           TOTAL LIKE COSP-WKG001,
           TOTAL1 LIKE COSP-WKG001,
           OBJNR1 LIKE BPPE-OBJNR,
           POSIT LIKE BPPE-POSIT,
         END OF IT_COSP2.
    IF RADIO EQ 'X'.
      DATA: BEGIN OF IT_FINAL OCCURS 0,
             FIKRS LIKE FMIT-FIKRS,
             RFISTL LIKE FMIT-RFISTL,
             RFIPEX LIKE FMIT-RFIPEX,
             TEXT LIKE FMCIT-TEXT1,
             ALLOC LIKE FMIT-TSL16,
             USED LIKE FMIT-TSL16,
             REMAIN LIKE FMIT-TSL16,
             BEZEICH LIKE FMFCTRT-BEZEICH,
           END OF IT_FINAL.
    ENDIF.
    IF RADIO1 EQ 'X'.
      DATA: BEGIN OF IT_FINAL1 OCCURS 0,
              GJAHR LIKE ZREV_BUDGET-GJAHR,
              KOSTL LIKE ZREV_BUDGET-KOSTL,
              KSTAR LIKE ZREV_BUDGET-KSTAR,
              TOTAL1 LIKE COSP-WKG001,
              TOTAL3 LIKE COSP-WKG001,
              TEXT LIKE CSKU-KTEXT,
              VARIANCE LIKE COSP-WKG001,
              BEZEICH LIKE FMFCTRT-BEZEICH,
            END OF IT_FINAL1.
    ENDIF.
    DATA: BEGIN OF IT_FISTL OCCURS 0,
           RFISTL LIKE FMIT-RFISTL,
           BEZEICH LIKE FMFCTRT-BEZEICH,
          END OF IT_FISTL.
    DATA: BEGIN OF IT_HKONT OCCURS 0,
           KSTAR LIKE CSKU-KSTAR,
           KTEXT LIKE CSKU-KTEXT,
          END OF IT_HKONT.
    DATA: PERIOD1 TYPE I,
          PERIOD2 TYPE I,
          PERIOD3 TYPE I,
          PERIO TYPE I.
    DATA: BEZEICH LIKE FMFCTRT-BEZEICH.
    CONSTANTS: C_00 TYPE MONAT VALUE '00',
               C_13 TYPE MONAT VALUE '13'.
    DATA : IT_RETURN LIKE DDSHRETVAL OCCURS 0 WITH HEADER LINE.
    DATA: FIPEX1 LIKE COSP-KSTAR.
    A T - S E L E C T I O N  S C R E E N
    AT SELECTION-SCREEN.
      LOOP AT PERDE.
        IF  PERDE-LOW >= C_13 OR PERDE-HIGH >= C_13 .
          MESSAGE E022(ZA)  WITH 'Enter Period values from 1 to 12'.
          EXIT.
        ENDIF.
      ENDLOOP.
      IF NOT PERDE-LOW IS INITIAL.
        PERIOD1 = PERDE-LOW.
      ENDIF.
      IF NOT PERDE-HIGH IS INITIAL.
        PERIOD2 = PERDE-HIGH.
        PERIOD3 = PERIOD2 - PERIOD1.
        PERIOD3 = PERIOD3 + 1.
      ELSE.
        PERIOD3 = 1.
      ENDIF.
      PERIO = PERIOD1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR RFISTL-LOW.
      SELECT FICTR BEZEICH INTO TABLE IT_FISTL FROM FMFCTRT
                                               WHERE SPRAS EQ 'EN'
                                               AND   FIKRS EQ 'NFFM'.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          RETFIELD   = 'RFISTL'
          VALUE_ORG  = 'S'
        TABLES
          VALUE_TAB  = IT_FISTL
          RETURN_TAB = IT_RETURN.
      IF SY-SUBRC = 0.
        READ TABLE IT_RETURN INDEX 1.
        MOVE IT_RETURN-FIELDVAL TO RFISTL-LOW.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR RFISTL-HIGH.
      SELECT FICTR BEZEICH INTO TABLE IT_FISTL FROM FMFCTRT
                                               WHERE SPRAS EQ 'EN'
                                               AND   FIKRS EQ 'NFFM'.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          RETFIELD   = 'RFISTL'
          VALUE_ORG  = 'S'
        TABLES
          VALUE_TAB  = IT_FISTL
          RETURN_TAB = IT_RETURN.
      IF SY-SUBRC = 0.
        READ TABLE IT_RETURN INDEX 1.
        MOVE IT_RETURN-FIELDVAL TO RFISTL-HIGH.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR HKONT-LOW.
      SELECT KSTAR KTEXT INTO TABLE IT_HKONT FROM CSKU WHERE SPRAS EQ 'EN'.
      SORT IT_HKONT BY KSTAR.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          RETFIELD   = 'HKONT'
          VALUE_ORG  = 'S'
        TABLES
          VALUE_TAB  = IT_HKONT
          RETURN_TAB = IT_RETURN.
      IF SY-SUBRC = 0.
        READ TABLE IT_RETURN INDEX 1.
        MOVE IT_RETURN-FIELDVAL TO HKONT-LOW.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR HKONT-HIGH.
      SELECT  KSTAR KTEXT INTO TABLE IT_HKONT FROM CSKU WHERE SPRAS EQ 'EN'.
      SORT IT_HKONT BY KSTAR.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          RETFIELD   = 'HKONT'
          VALUE_ORG  = 'S'
        TABLES
          VALUE_TAB  = IT_HKONT
          RETURN_TAB = IT_RETURN.
      IF SY-SUBRC = 0.
        READ TABLE IT_RETURN INDEX 1.
        MOVE IT_RETURN-FIELDVAL TO HKONT-HIGH.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR KOSTL-LOW.
      SELECT FICTR BEZEICH INTO TABLE IT_FISTL FROM FMFCTRT
                                               WHERE SPRAS EQ 'EN'
                                               AND   FIKRS IN KOSTL.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          RETFIELD   = 'KOSTL'
          VALUE_ORG  = 'S'
        TABLES
          VALUE_TAB  = IT_FISTL
          RETURN_TAB = IT_RETURN.
      IF SY-SUBRC = 0.
        READ TABLE IT_RETURN INDEX 1.
        MOVE IT_RETURN-FIELDVAL TO KOSTL-LOW.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR KOSTL-HIGH.
      SELECT FICTR BEZEICH INTO TABLE IT_FISTL FROM FMFCTRT
                                               WHERE SPRAS EQ 'EN'
                                               AND   FIKRS IN KOSTL.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          RETFIELD   = 'KOSTL'
          VALUE_ORG  = 'S'
        TABLES
          VALUE_TAB  = IT_FISTL
          RETURN_TAB = IT_RETURN.
      IF SY-SUBRC = 0.
        READ TABLE IT_RETURN INDEX 1.
        MOVE IT_RETURN-FIELDVAL TO KOSTL-HIGH.
      ENDIF.
    *START-OF-SELECTION
    START-OF-SELECTION.
      IF RADIO EQ 'X'.                     " FOR FUNDS CENTER AND COMMITMENT ITEM
        PERFORM GET_DATA.
        PERFORM PROCESS_DATA.
      ENDIF.
      IF RADIO1 EQ 'X'.                    " FOR COST CENTER AND G/L ACCOUNT
        PERFORM GET_DATA1.
        PERFORM PROCESS_DATA1.
      ENDIF.
    *END OF SELECTION
      PERFORM BUILD_LAYOUT.
      PERFORM BUILD_EVENTS.
      IF RADIO EQ 'X'.
        PERFORM BUILD_FIELDCATALOG.
        PERFORM BUILD_SORT.
        PERFORM DISPLAY_ALV_REPORT.
      ENDIF.
      IF RADIO1 EQ 'X'.
        PERFORM BUILD_FIELDCATALOG1.
        PERFORM BUILD_SORT1.
        PERFORM DISPLAY_ALV_REPORT1.
      ENDIF.
    *&      Form  GET_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM GET_DATA .
      SELECT FIKRS FICTR CTR_OBJNR INTO TABLE IT_TAB FROM FMFCTR
                                                     WHERE FIKRS EQ 'NFFM'
                                                     AND   FICTR IN RFISTL.
      SELECT CO_OBJNR POSIT INTO TABLE IT_TAB1 FROM BPIJ
                                               FOR ALL ENTRIES IN IT_TAB
                                               WHERE CO_OBJNR EQ IT_TAB-CTR_OBJNR.
      LOOP AT IT_TAB1.
        SELECT SINGLE FIPEX INTO IT_TAB1-FIPEX FROM FMPOSIT WHERE FIKRS EQ 'NFFM'
                                               AND   POSIT EQ IT_TAB1-POSIT
                                               AND   FIPEX IN FIPEX.
        IF SY-SUBRC EQ '0'.
          MODIFY IT_TAB1.
        ELSE.
          DELETE IT_TAB1.
        ENDIF.
      ENDLOOP.
      SELECT OBJNR
             POSIT
             GJAHR
             WLP01
             WLP02
             WLP03
             WLP04
             WLP05
             WLP06
             WLP07
             WLP08
             WLP09
             WLP10
             WLP11
             WLP12
             INTO TABLE IT_BPPE
             FROM BPPE
             FOR ALL ENTRIES IN IT_TAB1
             WHERE OBJNR EQ IT_TAB1-CO_OBJNR
             AND   POSIT EQ IT_TAB1-POSIT
             AND   GJAHR EQ RYEAR
             AND   VORGA IN ('KBFR','KBUE','KBUS').
      LOOP AT IT_BPPE.
        MOVE-CORRESPONDING IT_BPPE TO IT_BPPE1.
        IT_BPPE1-RFISTL = IT_BPPE1-OBJNR+6(4).
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
          EXPORTING
            INPUT  = IT_BPPE1-RFISTL
          IMPORTING
            OUTPUT = IT_BPPE1-RFISTL.
        CALL FUNCTION 'FM_FIPEX_GET_FROM_POSIT'
          EXPORTING
            I_FIKRS = 'NFFM'
            I_POSIT = IT_BPPE1-POSIT
          IMPORTING
            E_FIPEX = IT_BPPE1-FIPEX.
        PERIOD1 = PERIO.
        DO PERIOD3 TIMES.
          CASE PERIOD1.
            WHEN 1.
              IT_BPPE1-TOTAL2 =  IT_BPPE1-TOTAL2 + IT_BPPE-WLP01.
            WHEN 2.
              IT_BPPE1-TOTAL2 = IT_BPPE1-TOTAL2 + IT_BPPE-WLP02.
            WHEN 3.
              IT_BPPE1-TOTAL2 = IT_BPPE1-TOTAL2 + IT_BPPE-WLP03.
            WHEN 4.
              IT_BPPE1-TOTAL2 = IT_BPPE1-TOTAL2 + IT_BPPE-WLP04.
            WHEN 5.
              IT_BPPE1-TOTAL2 = IT_BPPE1-TOTAL2 + IT_BPPE-WLP05.
            WHEN 6.
              IT_BPPE1-TOTAL2 = IT_BPPE1-TOTAL2 + IT_BPPE-WLP06.
            WHEN 7.
              IT_BPPE1-TOTAL2 = IT_BPPE1-TOTAL2 + IT_BPPE-WLP07.
            WHEN 8.
              IT_BPPE1-TOTAL2 = IT_BPPE1-TOTAL2 + IT_BPPE-WLP08.
            WHEN 9.
              IT_BPPE1-TOTAL2 = IT_BPPE1-TOTAL2 + IT_BPPE-WLP09.
            WHEN 10.
              IT_BPPE1-TOTAL2 = IT_BPPE1-TOTAL2 + IT_BPPE-WLP10.
            WHEN 11.
              IT_BPPE1-TOTAL2 = IT_BPPE1-TOTAL2 + IT_BPPE-WLP11.
            WHEN 12.
              IT_BPPE1-TOTAL2 = IT_BPPE1-TOTAL2 + IT_BPPE-WLP12.
          ENDCASE.
          IF PERIOD2 >= PERIOD1.
            PERIOD1 = PERIOD1 + 1.
          ENDIF.
        ENDDO.
        COLLECT IT_BPPE1.
        CLEAR PERIOD1.
        CLEAR IT_BPPE1.
      ENDLOOP.
      SELECT RYEAR
             FIKRS
             RFISTL
             RFIPEX
             HSL01
             HSL02
             HSL03
             HSL04
             HSL05
             HSL06
             HSL07
             HSL08
             HSL09
             HSL10
             HSL11
             HSL12
             HSL13
             HSL14
             HSL15
             HSL16
             INTO TABLE IT_FMIT FROM FMIT
             FOR ALL ENTRIES IN IT_BPPE1
             WHERE RYEAR EQ RYEAR
             AND   FIKRS EQ 'NFFM'
            AND   RFIPEX EQ IT_BPPE1-FIPEX
             AND  RFIPEX IN FIPEX
             AND   RFISTL EQ IT_BPPE1-RFISTL.
      LOOP AT IT_FMIT.
        MOVE-CORRESPONDING IT_FMIT TO IT_FMIT1.
        PERIOD1 = PERIO.
        DO PERIOD3 TIMES.
          CASE PERIOD1.
            WHEN 1.
              IT_FMIT1-TOTAL =  IT_FMIT1-TOTAL + IT_FMIT-HSL01.
            WHEN 2.
              IT_FMIT1-TOTAL = IT_FMIT1-TOTAL + IT_FMIT-HSL02.
            WHEN 3.
              IT_FMIT1-TOTAL = IT_FMIT1-TOTAL + IT_FMIT-HSL03.
            WHEN 4.
              IT_FMIT1-TOTAL = IT_FMIT1-TOTAL + IT_FMIT-HSL04.
            WHEN 5.
              IT_FMIT1-TOTAL = IT_FMIT1-TOTAL + IT_FMIT-HSL05.
            WHEN 6.
              IT_FMIT1-TOTAL = IT_FMIT1-TOTAL + IT_FMIT-HSL06.
            WHEN 7.
              IT_FMIT1-TOTAL = IT_FMIT1-TOTAL + IT_FMIT-HSL07.
            WHEN 8.
              IT_FMIT1-TOTAL = IT_FMIT1-TOTAL + IT_FMIT-HSL08.
            WHEN 9.
              IT_FMIT1-TOTAL = IT_FMIT1-TOTAL + IT_FMIT-HSL09.
            WHEN 10.
              IT_FMIT1-TOTAL = IT_FMIT1-TOTAL + IT_FMIT-HSL10.
            WHEN 11.
              IT_FMIT1-TOTAL = IT_FMIT1-TOTAL + IT_FMIT-HSL11.
            WHEN 12.
              IT_FMIT1-TOTAL = IT_FMIT1-TOTAL + IT_FMIT-HSL12.
          ENDCASE.
          IF PERIOD2 >= PERIOD1.
            PERIOD1 = PERIOD1 + 1.
          ENDIF.
        ENDDO.
        IT_FMIT1-TOTAL1 = IT_FMIT1-TOTAL * -1 .
        COLLECT IT_FMIT1.
        CLEAR PERIOD1.
        CLEAR IT_FMIT1.
      ENDLOOP.
    ENDFORM.                    " GET_DATA
    *&      Form  PROCESS_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM PROCESS_DATA .
      SORT IT_FMIT1 BY FIKRS RFISTL RFIPEX.
      SORT IT_BPPE1 BY RFISTL FIPEX.
      LOOP AT IT_BPPE1.
        IT_FINAL-RFISTL = IT_BPPE1-RFISTL.
        IT_FINAL-RFIPEX = IT_BPPE1-FIPEX.
        IT_FINAL-ALLOC   = IT_BPPE1-TOTAL2.
        READ TABLE IT_FMIT1 WITH KEY RFISTL = IT_BPPE1-RFISTL  RFIPEX = IT_BPPE1-FIPEX.
        IF SY-SUBRC EQ 0.
          IT_FINAL-USED   = IT_FMIT1-TOTAL1.
        ENDIF.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
          EXPORTING
            INPUT  = IT_FMIT1-RFIPEX
          IMPORTING
            OUTPUT = IT_FMIT1-RFIPEX.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
          EXPORTING
            INPUT  = IT_FMIT1-RFISTL
          IMPORTING
            OUTPUT = IT_FMIT1-RFISTL.
    Changes made on 13/11/2007  *******************************
       SELECT SINGLE TEXT1 INTO IT_FINAL-TEXT FROM FMCIT WHERE SPRAS EQ 'EN'
                                                         AND   FIPEX EQ  IT_FMIT1-RFIPEX.
        SELECT SINGLE TEXT1 INTO IT_FINAL-TEXT FROM FMCIT WHERE SPRAS EQ 'EN'
                                                          AND   FIPEX EQ  IT_BPPE1-FIPEX.
    Changes made on 13/11/2007  *******************************
        SELECT SINGLE BEZEICH INTO IT_FINAL-BEZEICH FROM FMFCTRT
                                                    WHERE SPRAS EQ 'EN'
                                                    AND   FICTR EQ IT_FMIT1-RFISTL.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
          EXPORTING
            INPUT  = IT_FINAL-RFIPEX
          IMPORTING
            OUTPUT = IT_FINAL-RFIPEX.
        IT_FINAL-REMAIN = IT_FINAL-ALLOC - IT_FINAL-USED.
        APPEND IT_FINAL.
        CLEAR IT_FINAL.
      ENDLOOP.
    SORT IT_FINAL BY FIKRS RFISTL RFIPEX.
       LOOP AT IT_FMIT1.
        READ TABLE IT_FINAL WITH KEY RFISTL = IT_FMIT1-RFISTL RFIPEX = IT_FMIT1-RFIPEX.
        IF SY-SUBRC NE 0.
          IT_FINAL-RFISTL = IT_FMIT1-RFISTL.
          IT_FINAL-RFIPEX = IT_FMIT1-RFIPEX.
          IT_FINAL-USED   = IT_FMIT1-TOTAL1.
        IT_FINAL-ALLOC   = '0'.
          CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
            EXPORTING
              INPUT  = IT_FMIT1-RFIPEX
            IMPORTING
              OUTPUT = IT_FMIT1-RFIPEX.
          CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
            EXPORTING
              INPUT  = IT_FMIT1-RFISTL
            IMPORTING
              OUTPUT = IT_FMIT1-RFISTL.
          SELECT SINGLE TEXT1 INTO IT_FINAL-TEXT FROM FMCIT WHERE SPRAS EQ 'EN'
                                                            AND   FIPEX EQ  IT_FMIT1-RFIPEX.
          SELECT SINGLE BEZEICH INTO IT_FINAL-BEZEICH FROM FMFCTRT
                                                      WHERE SPRAS EQ 'EN'
                                                      AND   FICTR EQ IT_FMIT1-RFISTL.
          IT_FINAL-REMAIN = IT_FINAL-ALLOC - IT_FINAL-USED.
          APPEND IT_FINAL.
          CLEAR IT_FINAL.
        ELSE.
          DELETE IT_FMIT1.
        ENDIF.
      ENDLOOP.
      SORT IT_FINAL BY FIKRS RFISTL RFIPEX.
    ENDFORM.                    " PROCESS_DATA
    *&      Form  GET_DATA1
          text
    -->  p1        text
    <--  p2        text
    FORM GET_DATA1 .
      SELECT KOKRS KOSTL BUKRS OBJNR INTO TABLE IT_CSKS
                                     FROM CSKS
                                     WHERE KOKRS EQ '1000'
                                     AND   KOSTL IN KOSTL
                                     AND   BUKRS EQ 'NFCL'.
      SELECT OBJNR
             GJAHR
             KSTAR
             BEKNZ
             WKG001
             WKG002
             WKG003
             WKG004
             WKG005
             WKG006
             WKG007
             WKG008
             WKG009
             WKG010
             WKG011
             WKG012
             FROM COSP
             INTO TABLE IT_COSP
             FOR ALL ENTRIES IN IT_CSKS
             WHERE OBJNR EQ IT_CSKS-OBJNR
             AND   GJAHR EQ RYEAR
             AND   KSTAR IN HKONT.
      LOOP AT IT_COSP.
        MOVE-CORRESPONDING IT_COSP TO IT_COSP2.
        PERIOD1 = PERIO.
        DO PERIOD3 TIMES.
          CASE PERIOD1.
            WHEN 1.
              IT_COSP2-TOTAL =  IT_COSP2-TOTAL + IT_COSP-WKG001.
            WHEN 2.
              IT_COSP2-TOTAL = IT_COSP2-TOTAL + IT_COSP-WKG002.
            WHEN 3.
              IT_COSP2-TOTAL = IT_COSP2-TOTAL + IT_COSP-WKG003.
            WHEN 4.
              IT_COSP2-TOTAL = IT_COSP2-TOTAL + IT_COSP-WKG004.
            WHEN 5.
              IT_COSP2-TOTAL = IT_COSP2-TOTAL + IT_COSP-WKG005.
            WHEN 6.
              IT_COSP2-TOTAL = IT_COSP2-TOTAL + IT_COSP-WKG006.
            WHEN 7.
              IT_COSP2-TOTAL = IT_COSP2-TOTAL + IT_COSP-WKG007.
            WHEN 8.
              IT_COSP2-TOTAL = IT_COSP2-TOTAL + IT_COSP-WKG008.
            WHEN 9.
              IT_COSP2-TOTAL = IT_COSP2-TOTAL + IT_COSP-WKG009.
            WHEN 10.
              IT_COSP2-TOTAL = IT_COSP2-TOTAL + IT_COSP-WKG010.
            WHEN 11.
              IT_COSP2-TOTAL = IT_COSP2-TOTAL + IT_COSP-WKG011.
            WHEN 12.
              IT_COSP2-TOTAL = IT_COSP2-TOTAL + IT_COSP-WKG012.
          ENDCASE.
          IF PERIOD2 >= PERIOD1.
            PERIOD1 = PERIOD1 + 1.
          ENDIF.
        ENDDO.
        IT_COSP2-OBJNR1 = IT_COSP2-OBJNR+10(6).
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
          EXPORTING
            INPUT  = IT_COSP2-OBJNR1
          IMPORTING
            OUTPUT = IT_COSP2-OBJNR1.
        CONCATENATE 'FSNFFM' IT_COSP2-OBJNR1 INTO IT_COSP2-OBJNR1.
        IT_COSP2-FIPEX = IT_COSP2-KSTAR.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
          EXPORTING
            INPUT  = IT_COSP2-FIPEX
          IMPORTING
            OUTPUT = IT_COSP2-FIPEX.
        CALL FUNCTION 'FM_POSIT_GET_FROM_FIPEX'
          EXPORTING
          I_FIKRS                = 'NFFM'
          I_FIPEX                = IT_COSP2-FIPEX
      I_FLG_BUFFER_ALL       =
       IMPORTING
       E_POSIT                = IT_COSP2-POSIT
    TABLES
      T_FMPOSIT              =
        EXCEPTIONS
          INPUT_ERROR            = 1
          DATA_NOT_FOUND         = 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.
        CONDENSE IT_COSP2-OBJNR1.
        CONDENSE IT_COSP2-POSIT.
        COLLECT IT_COSP2.
        CLEAR PERIOD1.
        CLEAR IT_COSP2.
      ENDLOOP.
      SORT IT_COSP2 BY OBJNR KSTAR.
      SELECT OBJNR
             POSIT
             GJAHR
             WLP01
             WLP02
             WLP03
             WLP04
             WLP05
             WLP06
             WLP07
             WLP08
             WLP09
             WLP10
             WLP11
             WLP12
             INTO TABLE IT_BPPE
             FROM BPPE
             FOR ALL ENTRIES IN IT_COSP2
             WHERE OBJNR EQ IT_COSP2-OBJNR1
             AND   POSIT EQ IT_COSP2-POSIT
             AND   GJAHR EQ RYEAR
             AND   VORGA IN ('KBFR','KBUE','KBUS').
      LOOP AT IT_BPPE.
        MOVE-CORRESPONDING IT_BPPE TO IT_BPPE1.
        PERIOD1 = PERIO.
        DO PERIOD3 TIMES.
          CASE PERIOD1.
            WHEN 1.
              IT_BPPE1-TOTAL2 =  IT_BPPE1-TOTAL2 + IT_BPPE-WLP01.
            WHEN 2.
              IT_BPPE1-TOTAL2 = IT_BPPE1-TOTAL2 + IT_BPPE-WLP02.
            WHEN 3.
              IT_BPPE1-TOTAL2 = IT_BPPE1-TOTAL2 + IT_BPPE-WLP03.
            WHEN 4.
              IT_BPPE1-TOTAL2 = IT_BPPE1-TOTAL2 + IT_BPPE-WLP04.
            WHEN 5.
              IT_BPPE1-TOTAL2 = IT_BPPE1-TOTAL2 + IT_BPPE-WLP05.
            WHEN 6.
              IT_BPPE1-TOTAL2 = IT_BPPE1-TOTAL2 + IT_BPPE-WLP06.
            WHEN 7.
              IT_BPPE1-TOTAL2 = IT_BPPE1-TOTAL2 + IT_BPPE-WLP07.
            WHEN 8.
              IT_BPPE1-TOTAL2 = IT_BPPE1-TOTAL2 + IT_BPPE-WLP08.
            WHEN 9.
              IT_BPPE1-TOTAL2 = IT_BPPE1-TOTAL2 + IT_BPPE-WLP09.
            WHEN 10.
              IT_BPPE1-TOTAL2 = IT_BPPE1-TOTAL2 + IT_BPPE-WLP10.
            WHEN 11.
              IT_BPPE1-TOTAL2 = IT_BPPE1-TOTAL2 + IT_BPPE-WLP11.
            WHEN 12.
              IT_BPPE1-TOTAL2 = IT_BPPE1-TOTAL2 + IT_BPPE-WLP12.
          ENDCASE.
          IF PERIOD2 >= PERIOD1.
            PERIOD1 = PERIOD1 + 1.
          ENDIF.
        ENDDO.
        COLLECT IT_BPPE1.
        CLEAR PERIOD1.
        CLEAR IT_BPPE1.
      ENDLOOP.
    ENDFORM.                                                    " GET_DATA1
    *&      Form  PROCESS_DATA1
          text
    -->  p1        text
    <--  p2        text
    FORM PROCESS_DATA1 .
      LOOP AT IT_COSP2.
        IT_FINAL1-GJAHR = IT_COSP2-GJAHR.
        IT_FINAL1-KSTAR = IT_COSP2-KSTAR.
        IT_FINAL1-TOTAL1 = IT_COSP2-TOTAL.
        SELECT SINGLE KOSTL FROM CSKS INTO IT_FINAL1-KOSTL WHERE KOKRS = '1000'
                                                            AND BUKRS EQ 'NFCL'
                                                            AND OBJNR = IT_COSP2-OBJNR.
        READ TABLE IT_BPPE1 WITH KEY OBJNR = IT_COSP2-OBJNR1 POSIT = IT_COSP2-POSIT.
        IF SY-SUBRC EQ 0.
          IT_FINAL1-TOTAL3 = IT_BPPE1-TOTAL2.
        ENDIF.
        SELECT SINGLE KTEXT INTO IT_FINAL1-TEXT FROM CSKU WHERE SPRAS EQ 'EN'
                                                          AND  KSTAR EQ  IT_COSP2-KSTAR.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
          EXPORTING
            INPUT  = IT_FINAL1-KOSTL
          IMPORTING
            OUTPUT = IT_FINAL1-KOSTL.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
          EXPORTING
            INPUT  = IT_FINAL1-KSTAR
          IMPORTING
            OUTPUT = IT_FINAL1-KSTAR.
        SELECT SINGLE BEZEICH INTO IT_FINAL1-BEZEICH FROM FMFCTRT
                                                    WHERE SPRAS EQ 'EN'
                                                    AND   FICTR EQ IT_FINAL1-KOSTL.
        IT_FINAL1-VARIANCE = IT_FINAL1-TOTAL3 - IT_FINAL1-TOTAL1.
        APPEND IT_FINAL1.
        CLEAR IT_FINAL1.
      ENDLOOP.
      SORT IT_FINAL1 BY KOSTL KSTAR.
      DELETE IT_FINAL1 WHERE KOSTL IS INITIAL.
    ENDFORM.                    " PROCESS_DATA1
    *&      Form  BUILD_FIELDCATALOG
          text
    -->  p1        text
    <--  p2        text
    FORM BUILD_FIELDCATALOG .
      FIELDCATALOG-FIELDNAME   = 'RFISTL'.
      FIELDCATALOG-SELTEXT_M   = 'Funds Center'.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'BEZEICH'.
      FIELDCATALOG-SELTEXT_M   = 'Fund Center Description'.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'RFIPEX'.
      FIELDCATALOG-SELTEXT_M   = 'Commitment Item'.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'TEXT'.
      FIELDCATALOG-SELTEXT_M   = 'Commitment Item Description'.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'ALLOC'.
      FIELDCATALOG-SELTEXT_M   = 'Allocated Budget'.
      FIELDCATALOG-DO_SUM      = 'X'.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'USED'.
      FIELDCATALOG-SELTEXT_M   = 'Used Budget'.
      FIELDCATALOG-DO_SUM      = 'X'.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'REMAIN'.
      FIELDCATALOG-SELTEXT_M   = 'Remaining Budget'.
      FIELDCATALOG-DO_SUM      = 'X'.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_FIELDCATALOG1
          text
    -->  p1        text
    <--  p2        text
    FORM BUILD_FIELDCATALOG1 .
      FIELDCATALOG-FIELDNAME   = 'KOSTL'.
      FIELDCATALOG-SELTEXT_M   = 'Cost Center'.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'BEZEICH'.
      FIELDCATALOG-SELTEXT_M   = 'Cost Center Description'.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'KSTAR'.
      FIELDCATALOG-SELTEXT_M   = 'G/L Account'.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'TEXT'.
      FIELDCATALOG-SELTEXT_M   = 'G/L Account Description'.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'TOTAL3'.
      FIELDCATALOG-SELTEXT_M   = 'Planned amount'.
      FIELDCATALOG-DO_SUM      = 'X'.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'TOTAL1'.
      FIELDCATALOG-SELTEXT_M   = 'Actuals'.
      FIELDCATALOG-DO_SUM      = 'X'.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'VARIANCE'.
      FIELDCATALOG-SELTEXT_M   = 'Variance'.
      FIELDCATALOG-DO_SUM      = 'X'.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
    ENDFORM.                    " BUILD_FIELDCATALOG1
    *&      Form  BUILD_LAYOUT
          text
    -->  p1        text
    <--  p2        text
    FORM BUILD_LAYOUT .
      GD_LAYOUT-NO_INPUT          = 'X'.
      GD_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
    ENDFORM.                    " BUILD_LAYOUT
    *&      Form  BUILD_SORT
          text
    -->  p1        text
    <--  p2        text
    FORM BUILD_SORT .
      DATA: GT_SORT TYPE SLIS_SORTINFO_ALV.
      GT_SORT-UP = 'X'.
      GT_SORT-FIELDNAME = 'RFISTL'.
      GT_SORT-TABNAME  = 'IT_FINAL'.
      GT_SORT-SUBTOT  = 'X'.
      APPEND GT_SORT TO GD_SORT.
      CLEAR GT_SORT.
      GT_SORT-UP = 'X'.
      GT_SORT-FIELDNAME = 'BEZEICH'.
      GT_SORT-TABNAME  = 'IT_FINAL'.
      APPEND GT_SORT TO GD_SORT.
      CLEAR GT_SORT.
    ENDFORM.                    " BUILD_SORT
    *&      Form  BUILD_SORT1
          text
    -->  p1        text
    <--  p2        text
    FORM BUILD_SORT1 .
      DATA: GT_SORT TYPE SLIS_SORTINFO_ALV.
      GT_SORT-UP = 'X'.
      GT_SORT-FIELDNAME = 'KOSTL'.
      GT_SORT-TABNAME  = 'IT_FINAL'.
      GT_SORT-SUBTOT  = 'X'.
      APPEND GT_SORT TO GD_SORT.
      CLEAR GT_SORT.
      GT_SORT-UP = 'X'.
      GT_SORT-FIELDNAME = 'BEZEICH'.
      GT_SORT-TABNAME  = 'IT_FINAL'.
      APPEND GT_SORT TO GD_SORT.
      CLEAR GT_SORT.
    ENDFORM.                    " BUILD_SORT1
    *&      Form  BUILD_EVENTS
          text
    -->  p1        text
    <--  p2        text
    FORM BUILD_EVENTS .
      IT_EVENT-NAME = 'TOP_OF_PAGE'.
      IT_EVENT-FORM = 'TOP_OF_PAGE'.
      APPEND IT_EVENT TO IT_EVENT1.
    CLEAR IT_EVENT.
    ENDFORM.                    " BUILD_EVENTS
    *&      Form TOP_OF_PAGE
          ALV TOP-OF-PAGE
    FORM TOP_OF_PAGE.                                           "#EC CALLED
      REFRESH : IT_LIST_TOP_OF_PAGE.
      CLEAR : IT_LINE.
      IT_LINE-TYP  = 'H'.
      IT_LINE-INFO = TEXT-001.
      APPEND IT_LINE TO IT_LIST_TOP_OF_PAGE.
      CLEAR IT_LINE.
      IF RADIO EQ 'X'.
        IT_LINE-TYP  = 'S'.
        IT_LINE-INFO  = TEXT-101.
        IF NOT FIPEX-LOW IS INITIAL.
          CONCATENATE TEXT-101 '-' FIPEX-LOW INTO IT_LINE-INFO SEPARATED BY SPACE.
          IF NOT FIPEX-HIGH IS INITIAL.
            CONCATENATE TEXT-101 '-' FIPEX-LOW 'to' FIPEX-HIGH INTO IT_LINE-INFO SEPARATED BY SPACE.
          ENDIF.
        ENDIF.
        APPEND IT_LINE TO IT_LIST_TOP_OF_PAGE.
        CLEAR IT_LINE-INFO.
        IT_LINE-INFO = TEXT-102.
        IF NOT RFISTL-LOW IS INITIAL.
          CONCATENATE TEXT-102 '-' RFISTL-LOW INTO IT_LINE-INFO SEPARATED BY SPACE.
          IF NOT RFISTL-HIGH IS INITIAL.
            CONCATENATE TEXT-102 '-' RFISTL-LOW 'to' RFISTL-HIGH INTO IT_LINE-INFO SEPARATED BY SPACE.
          ENDIF.
        ENDIF.
        APPEND IT_LINE TO IT_LIST_TOP_OF_PAGE.
      ENDIF.
      IF RADIO1 EQ 'X'.
        CLEAR IT_LINE-INFO.
        IT_LINE-INFO = TEXT-105.
        IF NOT KOSTL-LOW IS INITIAL.
          CONCATENATE TEXT-105 '-' KOSTL-LOW INTO IT_LINE-INFO SEPARATED BY SPACE.
          IF NOT KOSTL-HIGH IS INITIAL.
            CONCATENATE TEXT-105 '-' KOSTL-LOW 'to' KOSTL-HIGH INTO IT_LINE-INFO SEPARATED BY SPACE.
          ENDIF.
        ENDIF.
        APPEND IT_LINE TO IT_LIST_TOP_OF_PAGE.
        CLEAR IT_LINE-INFO.
        IT_LINE-INFO = TEXT-106.
        IF NOT HKONT-LOW IS INITIAL.
          CONCATENATE TEXT-106 '-' HKONT-LOW INTO IT_LINE-INFO SEPARATED BY SPACE.
          IF NOT HKONT-HIGH IS INITIAL.
            CONCATENATE TEXT-106 '-' HKONT-LOW 'to' HKONT-HIGH INTO IT_LINE-INFO SEPARATED BY SPACE.
          ENDIF.
        ENDIF.
        APPEND IT_LINE TO IT_LIST_TOP_OF_PAGE.
      ENDIF.
      CLEAR IT_LINE-INFO.
      IT_LINE-INFO = TEXT-103.
      IF NOT PERDE-LOW IS INITIAL.
        CONCATENATE TEXT-103 '-' PERDE-LOW INTO IT_LINE-INFO SEPARATED BY SPACE.
        IF NOT PERDE-HIGH IS INITIAL.
          CONCATENATE TEXT-103 '-' PERDE-LOW 'to' PERDE-HIGH INTO IT_LINE-INFO SEPARATED BY SPACE.
        ENDIF.
      ENDIF.
      APPEND IT_LINE TO IT_LIST_TOP_OF_PAGE.
      CLEAR IT_LINE-INFO.
      IT_LINE-INFO = TEXT-104.
      IF NOT RYEAR IS INITIAL.
        CONCATENATE TEXT-104 '-' RYEAR INTO IT_LINE-INFO SEPARATED BY SPACE.
      ENDIF.
      APPEND IT_LINE TO IT_LIST_TOP_OF_PAGE.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY = IT_LIST_TOP_OF_PAGE.
    ENDFORM.                               "TOP_OF_PAGE
    *&      Form  DISPLAY_ALV_REPORT
          text
    -->  p1        text
    <--  p2        text
    FORM DISPLAY_ALV_REPORT .
      GD_REPID = SY-REPID.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM     = GD_REPID
          I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
          IS_LAYOUT              = GD_LAYOUT
          IT_EVENTS              = IT_EVENT1[]
          IT_FIELDCAT            = FIELDCATALOG[]
          IT_SORT                = GD_SORT[]
        TABLES
          T_OUTTAB               = IT_FINAL
        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_ALV_REPORT
    *&      Form  DISPLAY_ALV_REPORT1
          text
    -->  p1        text
    <--  p2        text
    FORM DISPLAY_ALV_REPORT1 .
      GD_REPID = SY-REPID.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM     = GD_REPID
          I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
          IS_LAYOUT              = GD_LAYOUT
          IT_EVENTS              = IT_EVENT1[]
          IT_FIELDCAT            = FIELDCATALOG[]
          IT_SORT                = GD_SORT[]
        TABLES
          T_OUTTAB               = IT_FINAL1
        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-MSG

  • Regarding detail data coming in a grid in a PO Report

    Hi
    I have a requirement where in the detail data need to be printed in a grid. I have placed this in the jfmain page and all the subforms in the next page.
    when i run the report for multiple purchase order numbers the grid is not coming from the second Purchase order number but the data is coming correctly.
    I am using ^eject for page break after each PO related data.
    Can any one help me in this regard.
    TIA
    vijay
    [email protected]

    Hi abilash n      
    as in dictionary, all quantity fields should have a reference to the unit field which then defines the number of decimals.
    The rest is done automatically as long as you do it standard way. In field catalog you have to set the fcat-qfieldname to the name of the field that has the unit.
    If you do so, also totals will be grouped by unit.
    SAP has really done a great thing by inventing  units for quantities (and currency keys for currency amounts). Only developers do not understand and thus refuse to use it.
    Regards,
    Clemens

  • Regarding large date range

    hi all,
    i am using Forms [32 Bit] Version 6.0.8.24.1 (Production)
    Oracle Database 10g Release 10.2.0.1.0 - Production
    i am selecting some fileds from some tables for certain condition
    for ex:
    select a,b,c
    from table1
    where trunc(col) between from_date and to_date
    with the help of cursor i am accessing these selected columns.
    the problem is if i run it for small date range(from 01-jan-2009 to 10-jan-2009) its giving the correct result but if i run it for large date range for example 2005 to 2011 i am getting error as ora-302000.
    i have written this code in the button in the front end.
    what could be the reason behind this?
    Please help to sort it out..
    Thanks..

    I appreciate your views. However here is why it works...
    The default date format is DD-MON-RR (RR Date Format)
    Oracle does an implicit convertion from CHAR to DATE when we specify in this format 'DD-MON-RR'
    Here is how it works...
    SELECT * FROM EMP WHERE TRUNC(HIREDATE) = '17-DEC-80'This SQL will give me this record from emp table
    SQL> SELECT * FROM EMP WHERE TRUNC(HIREDATE) = '17-DEC-80';
    EMPNO     ENAME     JOB     MGR     HIREDATE     SAL     COMM     DEPTNO
    7369     SMITH     CLERK     7902     17-12-1980     800          20Regarding, specifying 2 digits for the year. Oracle is intelligent enough to decode it based on its built-in internal functionality...
    Quoting from Oracle Docs..
    •If the specified two-digit year is 00 to 49, then
        ◦If the last two digits of the current year are 00 to 49, then the returned year has the same first two digits as the current year.
        ◦If the last two digits of the current year are 50 to 99, then the first 2 digits of the returned year are 1 greater than the first 2 digits of the current year.
    •If the specified two-digit year is 50 to 99, then
        ◦If the last two digits of the current year are 00 to 49, then the first 2 digits of the returned year are 1 less than the first 2 digits of the current year.
        ◦If the last two digits of the current year are 50 to 99, then the returned year has the same first two digits as the current year.To know more about implicit year decoding you can refer this.
    Look for The RR Datetime Format Element at this page http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements004.htm#SQLRF00210
    Regards,
    Rakesh
    Edited by: Rakesh Desai on Mar 28, 2011 8:11 PM

Maybe you are looking for