Fiscal Year wise GR Value display

Dear SDN,
I need to generate the report Fiscal year wise GR Value.
Example:
Selection Parameters:
Material number:
Fiscal Year(Apr to March):
Output ... like this.
Fiscal Year  GR Value in cr
2006          100
2007          200
2008          300
2009          400
In the cube time chars are Calender Year,Calender Year/Month,Calender Year/Quarter,Fiscal Year/Period but Fiscal Year is not
availabe......
waiting for reply
Thanks & Regards,
Praveen.K

Hi,
We can do it using 2LIS_02_ITM and 2LIS_02_SCL with 0PUR_C01 InfoCubes. So check it, I have done using the same combinations.
https://wiki.sdn.sap.com/wiki/display/BI/BWSDMMFIDATASOURCES
Else you also check 0IC_C03 with 2LIS_03_ * DataSources.
Thanks
Reddy

Similar Messages

  • Why a fiscal year 4 digit value display 2 on web?

    In a BEx query, there is a fiscal year/period variable, give it a value, eg, 010/2009, the query result shows the year value is still 2009, but when run this query on the web, it shows 09.  We check that there is no replacement path for this variable in query design, then why when run it on web, it shows only 2 digit value?   BTW, in WAD, we are unable to locate this custom web template, because it's created with someone else's role?
    Welcome anyone's input!

    Hi,
    Looks like some exit is written for fiscal year/period variable
    Go and have a check for in EXIT_SAPLRRSO_001. check if any code is written for the fiscal year/period variable .
    if soo please comment it and re transport it including web templet and query
    santosh
    Edited by: Santhosh Nagaraj on Oct 27, 2009 12:30 AM

  • I want to display year wise sales value

    Dear expert's,
                         i am loaded sales overview infocube 0sd_c03 with 11 series infosource in to infocube  expect for calyear..... time chara.......
    so i am only having monthwise values in infocube. now i want to display year wise sales value in my query based on month wise time chara....values.......
    how to do it..... with out loading once again in to infocube.......
    Regards
    Harikrishna N

    Bex 3.x displays report in Excel as you know.
    In the Bex query designer ,include a dummy formula or calc kf or any such thing
    In the excel sheet, you have option of writing a VB code that can refer you calmonth and populate relevant calyear in that dummy column created by you.
    This will avoid any kind of upload in cube as the data population goes in runtime. For huge data sets , check on performance

  • Web Report not printing the fiscal year period variable value

    Hi,
    In web report where in one text element, we enabled the fiscal year period variable value to display
    in the report result.
    If we run the report then this fiscal year period is displaying in the general information.
    We have print button (Java Code),  where user can take a printout of the same report.
    In the printout this Fiscal year period is NOT PRINTING, other variables like rollup time, technical name of report etc are printing perfectly.
    It is required to print the fiscal period also in the print out of the report.
    Any help to come out of this.....
    Thanks
    Srinivas

    Hi
    Any Help.....
    Srini

  • Reports with variables on fiscal year and want to display the current fiscal period values

    Hi
    i wan to display the fiscal periods in one of the reports when i give input for fiscal year, let say i will pass the fiscal year  as 2012 , then i need to display the revenue for 2012.01,2012.02,2012.03,....2012.12 and in another selection i need to restrict the revenue with the previous year.
    how can we achieve that.

    Hi,
    Refer this thread:Same thing has been discussed.
    http://scn.sap.com/thread/3365593
    Regards,
    AL

  • Asset Legacy dt upld-problem in uploading fiscal year assets without value

    Hi all ,
    I am trying to upload Assets which are pertaining to current Fiscal year and for which no depreciation run is taken place , using Tcode AS91,
    Initially I got error :
    Capitalization date must be earlier than or same as transfer date.
    Then I changed transfer date to  31.03.2009 .
    Now I am getting error  :
    Current fiscal year 2008 has to be after transfer date 31.03.2009 .
    How do I take these Assets with / without values ?
    and if without values , then how can I update Asset values ?
    Regards ,
    Pallavi .

    Hi Ramesh,
    I have same scenaio we are uploading the assets on 30.09.2008, so our data transfer date is same.
    The issue is
    1. When we start AS91 for current year, assets takeover values fields are in display mode.
    System configuration was:-
      A). Legacy data transfer date was 30.09.2008
    B). last period posted in previous system was 6th
    C). capitalized date taken by me is after 31.03.2008 (Note: - when I take capitalization date before 31.03.2008, than system show me take over tab in change mode)
    2). While doing AS92 also system shows me all takeover tab fields in display mode, when I select capitalization date after 31.03.2008.
    The thing is that how we can upload all those assets which we have purchased in the current year and how we will treat with the depreciation in the system
    up to which date we should take accumulated dep for previous year assets.
    please answer if u want i can raise a seprate question.
    Regards

  • Serial no Fiscal year wise

    sample data
    year          Month          Srno
    2010          05          1          ----Fianacial Year 09-10-----
    2010          05          2
    2010          05          3
    2010          06          4
    2010          06          5
    2010          06          6
    2010          07          1          ----Financial Year 10-11-----
    2010          07          2
    2010          07          3Year represents Year
    Month Represent month
    Srno is auto Generated No.
    financial year
    July-2009 to June-2010
    July-2010 to June-2011 so on.
    I want that every financial year start serial no 1
    If our one financial year closed and we are in new financial year.
    now i want to insert record in previous financial year so it check the max Serial no of this year record and generate it next serial no.
    and if want to insert record in current financial year so it check the max serial no of this year and generate it next serial no.

    No. This is a problem.
    pv_period number(2) --- monthYou had posted above where month has values like 05, 06 where as in your structure it is Number (2) which means you are storing 05 as 5, this will create problem.
    year          Month          Srno
    2010          05          1          ----Fianacial Year 09-10-----
    2010          05          2
    2010          05          3
    2010          06          4
    2010          06          5
    2010          06          6
    2010          07          1          ----Financial Year 10-11-----
    2010          07          2
    2010          07          3
    It's always better to post the table structure and data types properly.

  • Variable to display data from Current Fiscal Year to the MONTH entered

    Hi Friends,
    In the Quey Designer I require a CHARACTERISTIC VARIABLE for the 0CALMONTH which should have the following features:-
    1.Input Month(e.g JUN 2008)
    2.Mandatory
    3.Ready for Input
    The query should show the following OUTPUT:-
    The data should be displayed from the CURRENT FISCAL YEAR to the value of the Input MONTH entered.
         e.g For Input  =  DEC2008
               Output = from APRIL 2008 to DEC2008.
    Do we have a standard variable for this or we have to go for a Customer Exit??
    Thanks in Advance!!!
    Vivek

    Hi,
    Create a customer exit as follows.
    WHEN 'ZCMTD'.
    you variable name
    data: ZCMTD_LOW like sy-datum.
    ZCMTD_LOW = sy-datum.
    ZCMTD_LOW+4(2) = '04'.
    *replacing last two symbols (month) in the current month with '04'
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW = ZCMTD_LOW.
    *initializing low interval limit
    L_S_RANGE-HIGH = SY-DATUM.
    *initializing high interval limit
    L_S_RANGE-SIGN = 'I'.
    *defining interval as inclusive
    L_S_RANGE-OPT = 'BT'.
    APPEND L_S_RANGE TO E_T_RANGE.
    ENDCASE.
    Thanks,
    Ashok

  • Fiscal Year fixed Values.

    Hi all,
    I have this situation.I have a report in DEVELOPMENT which uses the Fisal Year in column.The problem is when i rt.click on it>>edit>>Fiscal year Variant>>Restrict In the window(Selection for Fiscal Year Variant)..i don't see any values under Fixed Values and it has values under variables.
    But the in PRODUCTION when i run the other reports i see that fiscal year has Fixed values for fiscal year but no values under variables.
    Can anyone tell me why this is happening.This is true for all the reports that we have in prod.I checked the T009 table and saw that under fiscal year V6 nad K4 is taken.Then where is the problem?Can anyone help plz.
    Thanks a lot.

    Sorry..i was wrong i just verified that there is data in Production but not in Development. do u think thts the reason why i am facing this problem?
    Thanks.

  • Fiscal year in bi

    We are writing a query on the cube which has flat file entry and r/3 datas.  The output of the query is the monthwise vehicle production vs (r/3) sales.  In the transformation of flat file vs standard, we have mapped fiscal year to 0fiscper.
    The problem is when we execute the report for 2006, the months April 2006 to Dec 2006 is appearring correctly and for Jan to March appearing as Jan2006 Feb 2006, March 2006 rather than 2007. How to correct this.
    Further if we execute for 2007, April 2007, May 2007 is appearring and after that July,August,--, oct-- appearring. There is a gap in between the months.
    Please tell us the solution to proceed further.

    The following are the entries in the table t009b
    Fi.Year Variant Year Calendar month Calendar day Posting period Year sh
    fiscvarnt    year  calmonth  calday   post per. year shift
    V3              0000 01             31           010            -1
    V3              0000 02             29           011            -1
    V3              0000 03             31           012            -1
    V3              0000 04             30           001            0
    V3              0000 05             31           002            0
    V3              0000 06             30           003            0
    V3              0000 07             31           004            0
    V3              0000 08             31           005            0
    V3              0000 09             30           006            0
    V3              0000 10             31           007            0
    V3              0000 11             30           008            0
    V3              0000 12             31           009            0
    We want the report to be executed for April 2006 to March 2007 and not from jan 2006 to Dec 2006. Our problem is
    the report for the fiscal year Jan 2007 is displayed as Jan 2006, February 2007 as February 2006 etc when the report is executed for Fisca year 2006.
    What has to be done to solve this

  • Number Ranges Year Wise

    Hello All,
    This is with the reference to the Thread
    [Number range;
    My client want to maintain the number ranges year wise for Billing, Orders etc., We have suggested not to go with Year wise  best practise
    Is there any OSS notes which tells that number ranges can not be maintained fiscal year wise?
    Regards,
    Narasimha Kumar

    As said in above replies,
               You can achieve the same by using USEREXIT_Number_range in include;RV60AFZZ.
    where create new Ztable = ZNR_Billing:
    Year / Sales Organization / Distribution chanel(Optional) / NR interval.
    eg: 2010 / Z100 / Z1 = ZZ
    where Z100 -= Sales Org & Z1 = Dist Channel &
    ZZ = Number range Interval (maintain number ranges in SNRO for ZZ- Make sure interval should not be overlap with other number ranges, but i dont think its possible.
    eg:
    Z1:2009--> 1000 - 9000
    at the same time you cant create another number range in SNRO as Z2:1000-9000 ( numbers will overlap)
    But i f you dont maintain same numbers in different years, then you can use the above Userexit, but still doesnt have any sense to use Userexit, when you dont maintain same numbers.

  • BSC:  Display values for Fiscal Year/Period

    Hi all,
        We are trying to create a small test scenario to know about balance score card. We have a cube which has Actual and Plan data in one KF diffentiated based on Value type character. Time character is fiscal year/period.
    We want to display a graph which displays actual and plan for fiscal year/period wise. But when we execute the score card it shows the total year's plan and actual for the individual fiscal year/period. But ideally it should display actual and plan for the respective fiscal year/period.
    we have created two value field in the measures of score card. and formula a/b (Plan / Actual ) is used.
    Please guide us in solving the problem.
    Regards,
    PM

    <FONT FACE = "Tahoma", Font Color = "Blue">
    Hi
    <Br>
    Do you have Fiscal Year Period in the Rows of your BW Report? If not, please try that.
    <Br><Br>Hope it helps.
    <Br>
    Cheers
    Abhijit
    <Br>* It's a good habit to reward someone with points in SDN if you think his/her
    response was helpful to you
    </FONT>

  • How to display values year wise in a request

    Hi All,
    My requirement is I have 3 years of data. I need to display that data year-wise in different tables at a time i.e., suppose if i have 2010,2011,2012 data then i need to display 2010 data in one table ,2011 data in next table and 2012 data in another table in same request. At a time i should get all three years of data but in different tables.
    Here table in the sense data should be separated year_wise.
    How can I achieve this?
    Thanks in Advance,
    Regards,
    Sindhu

    Hi,
    It is good know you got your requirement.
    Pivot table is on of the specialized view we are using to create the report. The options available in the view is same like Microsoft Excel Pivot table view.
    Pivot table optioins:
    Page: It is like prompt in the view itselft. If we are adding column in the page it will show all the values of that column for e.g if you are adding year column into that page tab it will show the values of the year, so we can select any particular year and can filter the report in the view itself.
    Section: It will separate the report into different section by the column value which we are having in section tab.
    Measures: It is the special place for adding number columns (e.g amount, employee count, quantity,revenue and etc, like that ) basically called measures in the fact table. The column dragged into the measures have special aggregation rules such as sum, min, max, avg,count and etc
    excluded: if want to add any column in the saved request but donot want to display, you can drag that column into excluded tab.
    Rows: These option will display the report by value of the column wise.
    Columns: It will separate the measure value by the column what we are having in this tab. (for e.g if we are putting year in column tab the column 'Revenue' in the measure table will be separated by year wise.
    Please mark the answer if it helpful.

  • Report display will be 2010,2011 year wise display and 2012 Month display

    Hi,
           I want to Create Report, output will be 2010,2011 year wise display, 2012,2013 month wise display and Fiscal year quarter display, all are display based on input value of Fiscal year data, please anyone guide me, How to do?
    Thanks,
    Nandish

    Hi, 
          How to assign KF to Time Characteristics,My report dsplay will be like this, For example
          Input Fiscal YEAR=2010 to 2013
                        Material              2010   2011  APR.2012 to MARCH 2013 
    Quantity              A1              200      300        *                    *
    Quantity              A2              300      400        *                    * 
    Also Display quarter wise display. How to do
    Thanks,
    Nandish

  • Fiscal Moth wise Display

    Dear All
                 i have new report for customer booking plan. i  am display month wise.
    but now i am dispay Fiscal month wise but not working
    the following is my code
    *& Report  ZCUST_ORDER                                                 *
    REPORT  z_cust_balance   LINE-SIZE 335.
    TABLES   : kna1,
               vbak,
               vbap,
               lips,
               vbuk,
               t247,
               zmm_style_mast,
               vbep.
    INCLUDE <icons>.
    *DATA:  t_month LIKE t247 OCCURS 0 WITH HEADER LINE.
    DATA:  BEGIN OF t_month OCCURS 0,
               SPRAS LIKE t247-SPRAS,
               MNR LIKE t247-MNR,
               KTX LIKE t247-KTX,
               LTX LIKE t247-LTX,
               TMPMNR LIKE t247-MNR,
            END OF t_month.
    DATA : begin of jest1 OCCURS 0,
           objnr like jest-objnr,
           stat like jest-stat,
           inact like jest-inact,
           end of jest1.
    DATA : BEGIN OF itab_month OCCURS 0,
           month_val(2),
           width_val(4) TYPE n,
           END OF itab_month.
    Data: begin of month_total occurs 0,
           monthcode(2),
           month(10),
          tempttl type p,
           qty(16) type p ,
           val(16) type p  ,
           tmpqty type p,
           tmpval type p ,
           end of month_total.
    *for Grand total
    Data: begin of month_ttl occurs 0,
           ttlqty type p ,
           ttlval type p  ,
          end of month_ttl.
    DATA: BEGIN OF it_summary OCCURS 0,
          month(2),
         tmpmonth(2),
          kunnr LIKE vbak-kunnr,
          name1 LIKE kna1-name1,
          kwmeng(16) TYPE p,
          tempso like vbap-vbeln,
          kursk(16) TYPE p DECIMALS 2,
          delqty(16) TYPE p,
          matnr like vbap-matnr,
          balqty(16)  TYPE p,
          netval(16) TYPE p DECIMALS 2,
          END OF it_summary.
    DATA: BEGIN OF t_list1 OCCURS 0,
          kunnr LIKE vbak-kunnr,
          month(2),
          name1 LIKE kna1-name1,
          kwmeng(16) TYPE p,
    fld2 TYPE VBAK-VBELN,
          kursk(16) TYPE p,
          delqty(16) TYPE p,
          balqty(16)  TYPE p,
          netval(16) TYPE p,
          END OF t_list1.
    DATA : t_list LIKE t_list1 OCCURS 0 WITH HEADER LINE.
    *DATA : t_list1 LIKE it_summary OCCURS 0 WITH HEADER LINE.
    DATA tmp_vlist LIKE it_summary OCCURS 0 WITH HEADER LINE.
    DATA tmp_vlist1 LIKE it_summary OCCURS 0 WITH HEADER LINE.
    data month_total1 like month_total OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF itb_vbak OCCURS 0,
          kunnr  LIKE vbak-kunnr,
          month(2),
           TMPmnr(2),
          tempso like vbap-vbeln,
          name1 LIKE kna1-name1,
          kwmeng(16) TYPE p," LIKE vbap-kwmeng,
          vbeln  LIKE vbak-vbeln,
          posnr  LIKE vbap-posnr,
          vgbel LIKE lips-vgbel,
          vgpos LIKE lips-vgpos,
          matnr like vbap-matnr,
          waerk  LIKE vbap-waerk ,
          pstyv LIKE vbap-pstyv,
          objnr LIKE vbap-objnr,
          etenr LIKE vbep-etenr,
          netwr(16) TYPE p,"  LIKE vbap-netwr ,
          vkorg  LIKE vbak-vkorg,
          edatu  LIKE vbep-edatu,
          lfimg LIKE lips-lfimg,
          vrkme  LIKE vbap-vrkme,
          netvl(16) TYPE p ,
          style like zmm_style_mast-style,
          jahr like zmm_style_mast-jahr,
          cu_style like zmm_style_mast-CU_STYLE,
         DECIMALS 2,
         netvl LIKE vbap-netwr,
          kursk(16) TYPE p DECIMALS 2,
          netpr LIKE vbap-netpr,
          balqty(16)  TYPE p,
          totdlr type p DECIMALS 2,   "total dlr value
          comp(1) ,
          END OF itb_vbak.
    DATA: BEGIN OF itb_del OCCURS 0,
          vbeln LIKE lips-vbeln,
          lfdat LIKE likp-lfdat,
          kunnr LIKE likp-kunnr,
          posnr LIKE lips-posnr,
          lfimg LIKE lips-lfimg,
          meins LIKE lips-meins,
          vgbel LIKE lips-vgbel,
          vgpos LIKE lips-vgpos,
          month(2),
          END OF itb_del.
    DATA: BEGIN OF itb_price OCCURS 0,
          vbeln LIKE vbkd-vbeln,
          posnr LIKE vbkd-posnr,
          kursk LIKE vbkd-kursk,
          END OF itb_price.
    DATA :tmp_qty(16) TYPE p ,
          flag(3),
          FRMyear(4),
          TOyear(4),
          FRMMON(2),
          TOMON(2),
          difyr(2),
          difmo(2),
          tmpvbeln like lips-vbeln.
    DATA t_vbak LIKE itb_vbak OCCURS 0 WITH HEADER LINE .
    DATA t_vbak1 LIKE itb_vbak OCCURS 0 WITH HEADER LINE .
    DATA t_vbak2 LIKE itb_vbak OCCURS 0 WITH HEADER LINE .
    DATA t_vbak3 LIKE itb_vbak OCCURS 0 WITH HEADER LINE .
    DATA t_vbak4 LIKE itb_vbak OCCURS 0 WITH HEADER LINE .
    DATA t_vbak5 LIKE itb_vbak OCCURS 0 WITH HEADER LINE .
    DATA t_vbak6 LIKE itb_vbak OCCURS 0 WITH HEADER LINE .
    DATA t_jest LIKE jest1 OCCURS 0 WITH HEADER LINE.
    for perform sub total
    DATA tmp_vbak LIKE t_vbak1 OCCURS 0 WITH HEADER LINE.
    DATA tmp_vbak1 LIKE t_vbak1 OCCURS 0 WITH HEADER LINE.
    DATA t_kunnr TYPE kunnr OCCURS 0 .
    DATA : t_eindt(4),
           wa_name1 LIKE kna1-name1,
           conf LIKE vbep-bmeng,
           t_vbeln LIKE vbak-vbeln,
           t_lfimg(16) TYPE p,
           t_kursk(16) TYPE p DECIMALS 2,
           t_kwmeng(16) TYPE p ,
           t_netval(16) TYPE p,
           tmp_posnr LIKE vbap-posnr,
           customer_bal_qty(16) TYPE p,
           dbcnt TYPE i,
           p_month(2),
           TMPmnr(2),
           tmpmonth(2),
           tbcnt(4) TYPE n,
           month_name(10) ,
           result_width(4) TYPE n,
           h_width(4) TYPE n,
           f_width(4) TYPE n,
           fld(30),
           bal_tot_val(16) TYPE p ,
           drilldown_cnt(1) TYPE n VALUE 0,
           vbeln1 LIKE vbap-vbeln,
           subtot LIKE vbep-wmeng,
           eblen1 LIKE vbap-vbeln,
           t_totdlr(16) type p DECIMALS 2,
           t_tmpnetval(16) type p DECIMALS 2.
    RANGES: salesno FOR vbak-vbeln,
            fld1 FOR vbak-kunnr,
            it_objnr FOR vbap-objnr.
    DATA:  f(12),
           current_row(20),
           tmp_kunnr LIKE vbak-kunnr.
    DATA : balance_qty(16) TYPE p,
           balance_val(16) TYPE p,
           cust_bal_val(16) TYPE p,
           tmp_bal_val(16) TYPE p,
           tmp_bal(16) TYPE p.
    SELECTION-SCREEN: BEGIN OF BLOCK 1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS: kunnr FOR vbak-kunnr.
    SELECT-OPTIONS: p_vdatu FOR vbak-erdat OBLIGATORY.
    SELECT-OPTIONS: p_vbeln  FOR vbak-vbeln.
    SELECT-OPTIONS: vkorg FOR vbak-vkorg OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK 1.
    SELECTION-SCREEN: BEGIN OF BLOCK 2 WITH FRAME TITLE text-002.
    PARAMETERS: qty RADIOBUTTON GROUP r1 DEFAULT 'X',
                val RADIOBUTTON GROUP r1.
    SELECTION-SCREEN: END OF BLOCK 2.
    START-OF-SELECTION.
      DATA tmp_date(6) TYPE c.
    CONCATENATE '%' eindt+3(4) '%' INTO tmp_date.
          FRMyear =  p_vdatu+3(4).
          TOyear =  p_vdatu+11(4).
          difyr = TOyear - FRMyear.
          FRMMON =  p_vdatu+7(2).
          TOMON =  p_vdatu+15(2).
           if ( difyr = 0 ) AND ( ( FRMMON > 3 ) AND ( TOMON <= 12 ) ) .
                  write: 'Srini'.
             elseif
                ( difyr = 0 ) AND ( ( FRMMON <= 3 ) AND ( TOMON <= 3 ) ).
                    write: 'ravi'.
                    elseif
            endif.
               difyr = 1 and ( FRMMON > 3 and TOMON <= 3 ).
                 write: 'Suresh'.
    else.
    if difyr > 1.
          WRITE : 'Check Your Fiscal Date Month Year  ....'.
          exit.
        endif.
      SELECT * FROM t247 INTO TABLE t_month WHERE spras EQ 'EN'.
       BMENG(Confirmed qty) changed by  wMENG(Order qty)
      SELECT  shkunnr kname1  slWMENG sfwaerk sf~netwr
              shvbeln slposnr shvkorg sledatu sf~vrkme
              shnetwr vkkursk sfnetpr sletenr sf~objnr
              sfpstyv sfmatnr
          INTO (itb_vbak-kunnr,
                itb_vbak-name1,
                itb_vbak-kwmeng,
                itb_vbak-waerk,
                itb_vbak-netwr,
                itb_vbak-vbeln,
                itb_vbak-posnr,
                itb_vbak-vkorg,
                itb_vbak-edatu,
                itb_vbak-vrkme,
                itb_vbak-netvl,
                itb_vbak-kursk,
                itb_vbak-netpr,
                itb_vbak-etenr,
                itb_vbak-objnr,
                itb_vbak-pstyv,
                itb_vbak-matnr)
                      FROM vbak AS sh
                           INNER JOIN vbuk AS vb ON
                             shvbeln = vbvbeln
                           INNER JOIN vbap AS sf ON
                             shvbeln = sfvbeln
                           INNER JOIN vbep AS sl ON
                             sfvbeln = slvbeln AND
                             sfposnr = slposnr
                           INNER JOIN vbkd AS vk ON
                             slvbeln = vkvbeln
                           INNER JOIN kna1 AS k ON
                             shkunnr = kkunnr
                           WHERE
                         "  sh~vdatu IN p_vdatu AND
                             vk~posnr EQ 0 AND
                             sh~vbeln IN p_vbeln AND
                             sh~kunnr IN kunnr AND
                             sh~vkorg IN vkorg AND
                            vbak-erdat
                             sh~erdat IN p_vdatu AND
                            vb~spstg EQ space AND
                             sl~wmeng NE 0 AND
                             sf~abgru EQ space
                            " sf~pstyv EQ 'TASS'
                              ORDER BY sh~kunnr.
        itb_vbak-month   = itb_vbak-edatu+4(2).
      itb_vbak-netvl = ( itb_vbak-kwmeng - itb_vbak-lfimg ) *
    *(  itb_vbak-kursk * itb_vbak-netpr ).
        salesno-low = itb_vbak-vbeln.
        salesno-sign = 'I'.
        salesno-option = 'EQ'.
        it_objnr-low = itb_vbak-objnr.
        it_objnr = 'I'.
        it_objnr-option = 'EQ'.
        APPEND it_objnr.
        APPEND itb_vbak.
        APPEND salesno.
    *Test
        select  objnr stat inact INTO (t_jest-objnr, t_jest-stat, t_jest-inact) FROM jest
            WHERE  objnr eq  itb_vbak-objnr and inact ne 'X' and  ( stat = 'I0043' OR stat = 'I0045' ) .
            append t_jest.
        endselect.
      ENDSELECT.
      DELETE ADJACENT DUPLICATES FROM salesno.
      CLEAR salesno.
    SELECT * FROM jest INTO CORRESPONDING FIELDS OF TABLE t_jest WHERE
                objnr IN it_objnr.
    *test
    *select objnr stat inact FROM jest INTO CORRESPONDING FIELDS OF TABLE t_jest WHERE
                objnr IN it_objnr.
    *loop at it_objnr.
    *select  objnr stat inact FROM jest INTO (t_jest-objnr, t_jest-stat, t_jest-inact) WHERE
                objnr IN it_objnr and inact ne 'X' and  ( stat = 'I0043' OR stat = 'I0045' ).
    *append t_jest.
    *endselect.
    *endloop.
    *t_vbak5[] = itb_vbak[].
    *SORT t_vbak5 BY   month.
    **Test
    loop  at t_vbak5.
        read table t_vbak6 with key month = t_month-MNR.
              if sy-subrc = 0.
                 t_vbak6-month = t_month-tmpMNR.
                 modify t_vbak6 index sy-tabix.
              else.
               append t_vbak5 to t_vbak6.
               endif.
              clear : t_vbak5,   t_vbak6.
      endloop.
    t_vbak3[] = itb_vbak[].
      t_vbak3[] = t_vbak6[].
        LOOP AT t_vbak3 WHERE objnr NE space .
           LOOP AT t_jest WHERE objnr = t_vbak3-objnr AND
               ( stat = 'I0043' OR stat = 'I0045' )    AND
                 inact NE 'X'.
              DELETE salesno WHERE low EQ t_vbak3-vbeln.
              DELETE itb_vbak WHERE vbeln EQ t_vbak3-vbeln.
            EXIT.
          ENDLOOP.
        ENDLOOP.
      DELETE itb_vbak WHERE pstyv = 'TASS'.
    SELECT  lp~vbeln
             lp~posnr
             lp~lfimg
             lk~lfdat
             lk~kunnr
             lp~meins
             lp~vgbel
             lp~vgpos INTO
             (itb_del-vbeln,
              itb_del-posnr,
              itb_del-lfimg,
              itb_del-lfdat,
              itb_del-kunnr,
              itb_del-meins,
              itb_del-vgbel,
              itb_del-vgpos)
                      FROM lips AS lp INNER JOIN likp AS lk ON
                                   lpvbeln EQ lkvbeln INNER JOIN
                                   vbap AS vb ON
                                   lpvgbel EQ vbvbeln AND
                                   lpvgpos EQ vbposnr
                                   INNER JOIN vbuk AS vk ON
                                   lpvbeln EQ vkvbeln
                            WHERE vk~wbstk EQ 'C' AND
                                  lp~vgbel IN salesno.
       itb_del-month   = itb_del-lfdat+4(2).
       APPEND itb_del.
    ENDSELECT.
    loop at itb_vbak .
      tmpvbeln = itb_vbak-vbeln.
      SELECT vbeln posnr kursk  INTO
                        (itb_price-vbeln,
                         itb_price-posnr,
                         itb_price-kursk) FROM vbkd
                        where VBELN eq tmpvbeln  .
        APPEND itb_price.
      ENDSELECT.
      endloop.
      CLEAR conf.
    SORT itb_vbak BY   month
                        kunnr
                        name1
                        kwmeng
                        vbeln
                        posnr
                        etenr.
      REFRESH t_vbak3.
      CLEAR t_vbak3.
        t_vbak2[] = itb_vbak[].
      SORT t_vbak2 BY  kunnr month .
    *Test
    loop  at it_vbak2.
        read table t_month with key month = t_month-MNR.
              if sy-subrc = 0.
                 it_vbak2-month = t_month-tmpMNR.
                endif.
      endloop
      LOOP AT t_vbak2  .
        tmp_kunnr = t_vbak2-kunnr.
        wa_name1  = t_vbak2-name1.
        t_month   = t_vbak2-month.
        p_month   = t_vbak2-month.
        t_kursk   = t_vbak2-kursk.
        AT NEW month.
          PERFORM get_finmonth_name TABLES it_summary USING p_month.
          AT NEW kursk.
          PERFORM tot_qty_cust_month TABLES itb_vbak USING p_month
          tmp_kunnr.
          it_summary-kursk = t_kursk.
          it_summary-month = p_month.
          it_summary-kunnr = tmp_kunnr.
          it_summary-name1 = wa_name1.
          it_summary-kwmeng = t_kwmeng.
         PERFORM tot_del_cust USING p_month tmp_kunnr.
          it_summary-delqty = tmp_qty .
          it_summary-balqty =  it_summary-kwmeng - tmp_qty.
         it_summary-netval =  it_summary-balqty * it_summary-kursk * t_totdlr.
         it_summary-netval =  it_summary-kursk * t_totdlr.
           it_summary-netval =  t_tmpnetval.
          For get month wise total qty and value
            month_total-monthcode = p_month.
            month_total-qty = it_summary-balqty.
            month_total-val = it_summary-netval.
            month_ttl-ttlqty  =  month_ttl-ttlqty  +  it_summary-balqty.
            month_ttl-ttlval  =  month_ttl-ttlval  +  it_summary-netval.
        ENDAT.
         it_summary-netval = t_kursk.
          APPEND it_summary.
      append month_total.
      append month_ttl.
        ENDAT.
      ENDLOOP.
    SORT month_total BY   monthcode.
      DELETE it_summary WHERE balqty LE 0.
      IF qty = 'X'.
    write all the month's horizontaly********************************
       IF sy-subrc = 0 .
        SORT it_summary BY  month kunnr.
        loop at it_summary.
        move-corresponding  it_summary to t_list  .
        append t_list.
        endloop.
        SORT : t_vbak  BY KUNNR month ,
               t_list by kunnr MONTH.
       DESCRIBE TABLE t_vbak3 LINES dbcnt .
        IF it_summary IS NOT INITIAL .
          h_width   = 50.
          WRITE: 1 sy-vline.
          LOOP AT it_summary.
            AT NEW month.
              PERFORM get_month_name USING it_summary-month.
              FORMAT COLOR 4 INTENSIFIED OFF.
              WRITE AT h_width(17) sy-vline.
              WRITE AT h_width(17) month_name CENTERED.
              h_width = h_width - 1.
              WRITE AT h_width sy-vline.
              h_width = h_width  + 17         .
              itab_month-month_val = it_summary-month.
              itab_month-width_val = h_width + 20.
              APPEND itab_month.
              HIDE month_name.
            ENDAT.
            AT LAST .
              WRITE AT h_width(1) sy-vline.
              h_width = h_width + 3.
              WRITE: AT h_width 'Total' CENTERED.
              h_width = h_width + 30.
              WRITE AT h_width sy-vline.
            ENDAT.
          ENDLOOP.
          WRITE AT h_width sy-vline.
           NEW-LINE .
    ********Write qty horizontaly***************************
          h_width = 50.
          WRITE AT 1 sy-vline.
          WRITE AT 1(h_width) sy-vline.
          LOOP AT it_summary.
            AT NEW month.
              FORMAT COLOR 5 INTENSIFIED OFF.
              WRITE AT h_width(16) sy-vline.
              WRITE AT h_width(16) 'Order Qty' CENTERED.
              h_width = h_width - 1.
              WRITE AT h_width sy-vline.
              h_width = h_width  + 17.
              WRITE AT h_width sy-vline.
            ENDAT.
            AT LAST .
              h_width = h_width + 1.
              WRITE AT h_width(16) sy-vline.
              WRITE AT h_width(33) 'Order Qty' CENTERED.
              h_width = h_width - 1.
              WRITE AT h_width sy-vline.
              h_width = h_width + 33.
              WRITE AT h_width sy-vline.
                      ENDAT.
          ENDLOOP.
    ******Write customer  Name grouped by*************************
          WRITE AT /1(h_width) sy-uline.
          LOOP AT t_list.
            WRITE :AT 1 sy-vline.
             AT NEW kunnr.
                LOOP AT it_summary  WHERE kunnr EQ t_list-kunnr.
                MOVE-CORRESPONDING it_summary TO t_list1.
                APPEND t_list1.
              ENDLOOP.
              DELETE it_summary WHERE kunnr EQ t_list-kunnr.
              HIDE kunnr.
            ENDAT.
            SORT t_list1  BY kunnr name1 month.
            LOOP AT t_list1.
              AT FIRST .
                FORMAT COLOR 3 INTENSIFIED OFF.
                NEW-LINE.
                WRITE: 1 sy-vline.
                WRITE:2(10) t_list-kunnr HOTSPOT ON.
                WRITE: AT 12 sy-vline.
                WRITE:13(37) t_list-name1 HOTSPOT ON.
                WRITE: AT 49 sy-vline.
                SET LEFT SCROLL-BOUNDARY.
              ENDAT.
              FORMAT COLOR 2  INTENSIFIED OFF.
              AT NEW month.
                PERFORM write_position USING t_list1-month.
                f_width = result_width - 35.
                  SUM.
                WRITE :AT f_width(15) t_list1-balqty.
                f_width = f_width + 15.
              ENDAT.
              AT LAST.
                   SUM.
                f_width = h_width - 32.
              WRITE :AT f_width(3) icon_sum AS ICON COLOR 6 INTENSIFIED OFF.
                f_width = f_width + 3.
              WRITE :AT f_width(30)  t_list1-balqty COLOR 6 INTENSIFIED OFF.
                f_width = f_width + 30.
              ENDAT.
            ENDLOOP.
            WRITE :AT  h_width sy-vline.
            REFRESH t_list1.
          ENDLOOP.
          WRITE :AT /1(h_width) sy-uline.
    write:  /'                   '.
    write: / '                   '.
    WRITE :'TOTAL'.
    loop at month_total.
              AT NEW monthcode.
                PERFORM write_position USING month_total-monthcode.
                f_width = result_width - 35.
                  SUM.
                WRITE :AT f_width(15) month_total-qty.
                f_width = f_width + 15.
    endat.
    endloop.
    WRITE :AT f_width(34)  month_ttl-ttlqty COLOR 6 INTENSIFIED OFF.
                f_width = f_width + 30.
        ELSE.
          WRITE : 'Sorry No Results found ....'.
        ENDIF.
    *    command
                             value
    ELSEIF val = 'X'.
    write all the month's horizontaly********************************
       IF sy-subrc = 0 .
        SORT it_summary BY  month kunnr.
        loop at it_summary.
        move-corresponding  it_summary to t_list  .
        append t_list.
        endloop.
        SORT : t_vbak  BY KUNNR month ,
               t_list by kunnr MONTH.
       DESCRIBE TABLE t_vbak3 LINES dbcnt .
        IF it_summary IS NOT INITIAL .
          h_width   = 50.
          WRITE: 1 sy-vline.
          LOOP AT it_summary.
            AT NEW month.
              PERFORM get_month_name USING it_summary-month.
              FORMAT COLOR 4 INTENSIFIED OFF.
              WRITE AT h_width(17) sy-vline.
              WRITE AT h_width(17) month_name CENTERED.
              h_width = h_width - 1.
              WRITE AT h_width sy-vline.
              h_width = h_width  + 17         .
              itab_month-month_val = it_summary-month.
              itab_month-width_val = h_width + 20.
              APPEND itab_month.
              HIDE month_name.
            ENDAT.
            AT LAST .
              WRITE AT h_width(1) sy-vline.
              h_width = h_width + 3.
              WRITE: AT h_width 'Total' CENTERED.
              h_width = h_width + 30.
              WRITE AT h_width sy-vline.
            ENDAT.
          ENDLOOP.
          WRITE AT h_width sy-vline.
          NEW-LINE .
    ********Write qty horizontaly***************************
          h_width = 50.
          WRITE AT 1 sy-vline.
          WRITE AT 1(h_width) sy-vline.
          LOOP AT it_summary.
            AT NEW month.
              FORMAT COLOR 5 INTENSIFIED OFF.
              WRITE AT h_width(16) sy-vline.
              WRITE AT h_width(16) 'Order Val(INR)' CENTERED.
              h_width = h_width - 1.
              WRITE AT h_width sy-vline.
              h_width = h_width  + 17.
              WRITE AT h_width sy-vline.
            ENDAT.
            AT LAST .
              h_width = h_width + 1.
              WRITE AT h_width(16) sy-vline.
              WRITE AT h_width(33) 'Order Val(INR)' CENTERED.
              h_width = h_width - 1.
              WRITE AT h_width sy-vline.
              h_width = h_width + 33.
              WRITE AT h_width sy-vline.
            ENDAT.
          ENDLOOP.
    ******Write customer  Name grouped by*************************
          WRITE AT /1(h_width) sy-uline.
          LOOP AT t_list.
            WRITE :AT 1 sy-vline.
            AT NEW kunnr.
              LOOP AT it_summary  WHERE kunnr EQ t_list-kunnr.
                MOVE-CORRESPONDING it_summary TO t_list1.
                APPEND t_list1.
              ENDLOOP.
              DELETE it_summary WHERE kunnr EQ t_list-kunnr.
              HIDE kunnr.
            ENDAT.
            SORT t_list1  BY kunnr name1 month.
            LOOP AT t_list1.
              AT FIRST .
                FORMAT COLOR 3 INTENSIFIED OFF.
                NEW-LINE.
                WRITE: 1 sy-vline.
                WRITE:2(10) t_list-kunnr HOTSPOT ON.
                WRITE: AT 12 sy-vline.
                WRITE:13(37) t_list-name1 HOTSPOT ON.
                WRITE: AT 49 sy-vline.
                SET LEFT SCROLL-BOUNDARY.
              ENDAT.
              FORMAT COLOR 2  INTENSIFIED OFF.
              AT NEW month.
                PERFORM write_position USING t_list1-month.
                f_width = result_width - 35.
                SUM.
                WRITE :AT f_width(15) t_list1-netval.
                f_width = f_width + 15.
              ENDAT.
              AT LAST.
                SUM.
                f_width = h_width - 32.
              WRITE :AT f_width(3) icon_sum AS ICON COLOR 6 INTENSIFIED OFF.
                f_width = f_width + 3.
              WRITE :AT f_width(30)  t_list1-netval COLOR 6 INTENSIFIED OFF.
                f_width = f_width + 30.
              ENDAT.
            ENDLOOP.
            WRITE :AT h_width sy-vline.
            REFRESH t_list1.
          ENDLOOP.
          WRITE :AT /1(h_width) sy-uline.
    write:  /'                   '.
    write: / '                   '.
    WRITE :'TOTAL'.
    loop at month_total.
              AT NEW monthcode.
                PERFORM write_position USING month_total-monthcode.
                f_width = result_width - 35.
                  SUM.
                WRITE :AT f_width(15) month_total-val.
               f_width = f_width + 15.
    endat.
    endloop.
    WRITE :AT f_width(34)  month_ttl-ttlval COLOR 6 INTENSIFIED OFF.
                f_width = f_width + 30.
        ELSE.
          WRITE : 'Sorry No Results found ....'.
        ENDIF.
      ENDIF.
      NEW-LINE.
    *********Position of the field for the corresponding month******
    FORM write_position USING p_position.
      LOOP AT itab_month WHERE month_val EQ p_position.
        result_width = itab_month-width_val.
      ENDLOOP.
    ENDFORM.                    "Write_position
    *&      Form  month_splitter
          text
    FORM get_month_name USING p_month.
      CASE p_month.
        WHEN '01'.
          month_name = 'January'.
        WHEN '02'.
          month_name = 'February'.
        WHEN '03'.
          month_name = 'March'.
        WHEN '04'.
          month_name = 'April'.
        WHEN '05'.
          month_name = 'May'.
        WHEN '06'.
          month_name = 'June'.
        WHEN '07'.
          month_name = 'July'.
        WHEN '08'.
          month_name = 'August'.
        WHEN '09'.
          month_name = 'September'.
        WHEN '10'.
          month_name = 'October'.
        WHEN '11'.
          month_name = 'November'.
        WHEN '12'.
          month_name = 'December'.
    *WHEN '01'.
         month_name = ' April '.
       WHEN '02'.
         month_name = ' May '.
       WHEN '03'.
         month_name = ' June '.
       WHEN '04'.
         month_name = ' July '.
       WHEN '05'.
         month_name = ' August '.
       WHEN '06'.
         month_name = ' September '.
       WHEN '07'.
         month_name = ' October '.
       WHEN '08'.
         month_name = ' November '.
       WHEN '09'.
         month_name = ' December '.
       WHEN '10'.
         month_name = ' January '.
       WHEN '11'.
         month_name = ' February '.
       WHEN '12'.
         month_name = ' March '.
        WHEN OTHERS.
          month_name = 'Errror..'.
      ENDCASE.
    ENDFORM.                    "month_splitter
    FORM get_finmonth_name USING p_month.
    LOOP AT t_month where mnr eq p_month.
    CASE t_month-mnr.
        WHEN '01'.
          TMPmnr = '10'.
        WHEN '02'.
          TMPmnr = '11'.
        WHEN '03'.
          TMPmnr = '12'.
        WHEN '04'.
          TMPmnr = '1'.
        WHEN '05'.
          TMPmnr = '2'.
       WHEN '06'.
          TMPmnr = '3'.
        WHEN '07'.
          TMPmnr = '4'.
        WHEN '08'.
          TMPmnr = '5'.
        WHEN '09'.
          TMPmnr = '6'.
        WHEN '10'.
          TMPmnr = '7'.
        WHEN '11'.
          TMPmnr = '8'.
        WHEN '12'.
          TMPmnr = '9'.
       WHEN OTHERS.
          TMPmnr = 'Errror..'.
      ENDCASE.
           ENDLOOP.
    ENDFORM..
    AT LINE-SELECTION.
      IF sy-lsind = 1 .
        READ CURRENT LINE LINE VALUE INTO f.
        WRITE f+1(10) TO tmp_kunnr.
        CLEAR:   t_vbak.
        REFRESH  t_vbak1.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            input  = tmp_kunnr
          IMPORTING
            output = tmp_kunnr.
        LOOP AT itb_vbak WHERE kunnr EQ tmp_kunnr.
          MOVE-CORRESPONDING itb_vbak TO t_vbak1.
          APPEND t_vbak1.
        ENDLOOP.
        FORMAT COLOR 5 INTENSIFIED OFF.
        REFRESH t_vbak2.
        CLEAR t_vbak2.
        PERFORM get_balance_per_customer.
      ELSEIF sy-lsind = 2 .
        READ CURRENT LINE LINE VALUE INTO current_row.
        READ  LINE 4 LINE  VALUE INTO f.
        WRITE current_row+11(9) TO month_name.
        WRITE f+1(10) TO tmp_kunnr.
        PERFORM get_month_val USING month_name.
        CLEAR:   t_vbak,
                 t_vbak1.
        REFRESH:  t_vbak1.
        CLEAR:   t_vbak,
                 t_vbak1.
        REFRESH:  t_vbak1.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            input  = tmp_kunnr
          IMPORTING
            output = tmp_kunnr.
        LOOP AT itb_vbak
                       WHERE kunnr EQ tmp_kunnr AND
                             month EQ p_month.
          MOVE-CORRESPONDING itb_vbak TO t_vbak1.
          APPEND t_vbak1.
        ENDLOOP.
        SORT:t_vbak1 BY KUNNR month vbeln.
        REFRESH t_vbak2.
        CLEAR t_vbak2.
        REFRESH t_vbak.
        CLEAR t_vbak.
        t_vbak[] = itb_vbak[].
        PERFORM  get_month_namewise.
        FORMAT COLOR 5 INTENSIFIED OFF.
      ELSEIF sy-lsind = 3.
    IF sy-cucol > 1 AND sy-cucol < 13.
    GET CURSOR FIELD fld VALUE fld.
    SET PARAMETER ID 'AUN' FIELD fld.
    CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
    endif.
      ENDIF.
    PERFORM write_item .
    *&      Form  write_item
          text
    FORM write_item .
      READ TABLE t_vbak2 INDEX 1.
      IF t_vbak2 IS NOT INITIAL.
        WRITE : 1(70)  sy-uline.
        WRITE : /1     sy-vline.
        WRITE : 2(36) 'Customer'  COLOR 1 INTENSIFIED ON.
        WRITE : 38(22) 'Quantity'  COLOR 1 INTENSIFIED ON.
        WRITE : 58(12) 'Value in INR'  COLOR 1 INTENSIFIED ON.
        WRITE : 70     sy-vline.
        WRITE : /1(70) sy-uline.
        WRITE : /1     sy-vline.
        FORMAT         COLOR 2 INTENSIFIED OFF.
        WRITE : 2(10)  t_vbak2-kunnr  COLOR 1 INTENSIFIED OFF.
        WRITE : 12(58) t_vbak2-name1  COLOR 1 INTENSIFIED OFF.
        WRITE 70 sy-vline.
        IF sy-lsind  = 2.
          FORMAT COLOR 1 INTENSIFIED OFF.
         WRITE :/1  sy-vline,
                 2(15)  'Sales Document',
                 17(10) 'Delivery Date',
                 28(10) 'Quantity ',
                 39(7)  'Uom',
                 47(15) 'Value in INR' RIGHT-JUSTIFIED,
                 65(20)   'Style'.
           WRITE :/1  sy-vline,
                  2(15)  'Sales Document',
                  17(20)   'Style',
                  27(10) 'Delivery Date',
                  38(10) 'Quantity ',
                  49(7)  'Uom',
                  55(15) 'Value in INR' RIGHT-JUSTIFIED.
        ENDIF.
        WRITE 70 sy-vline.
        DELETE t_vbak2 WHERE balqty <= 0.
        LOOP AT t_vbak2.
          AT NEW month.
            PERFORM get_month_name USING t_vbak2-month.
            WRITE /1(70) sy-uline.
            WRITE /1 sy-vline.
            WRITE :2(10) 'Month of'  COLOR 3 INTENSIFIED ON ,
                   12(26) month_name COLOR 3 INTENSIFIED OFF.
            HIDE month_name.
            SUM.
            PERFORM sum_balance TABLES t_vbak2 USING t_vbak2-month.
            WRITE : 35(23) balance_qty COLOR 3 INTENSIFIED OFF CENTERED,
                    58(12) t_vbak2-netvl COLOR 3 INTENSIFIED OFF CENTERED.
    *TEST
            WRITE : 70 sy-vline.
          ENDAT.
          IF sy-lsind = 2.
            FORMAT COLOR 4 INTENSIFIED OFF.
           WRITE :/1 sy-vline.
           WRITE : 2(15)  t_vbak2-vbeln,
                   17(10) t_vbak2-edatu,
                   28(10) t_vbak2-balqty,
                   39(5)  t_vbak2-vrkme HOTSPOT ON,
                  50(12) t_vbak2-netvl,
                 65(20)  t_vbak2-cu_style.
           WRITE 62 sy-vline.
    WRITE :/1 sy-vline.
            WRITE : 2(15)  t_vbak2-vbeln,
                    17(20)  t_vbak2-cu_style,
                    28(10) t_vbak2-edatu,
                    39(10) t_vbak2-balqty,
                    49(5)  t_vbak2-vrkme HOTSPOT ON,
                   55(12) t_vbak2-netvl.
            WRITE 70 sy-vline.
            HIDE: t_vbak1-vbeln.
      ENDIF.
          AT LAST.
            WRITE /1(70) sy-uline.
          ENDAT.
        ENDLOOP.
    ENDIF.
    ENDFORM.                    "writeat_item
    **&      Form  get_month_val
          text
         -->MONTH_NAME text
    FORM get_month_val USING month_name.
      LOOP AT t_month  WHERE ltx EQ month_name.
       p_month = t_month-mnr.
    p_month = t_month-TMPmnr.
      ENDLOOP.
    ENDFORM.                    "Write_position
    *&      Form  sum_balance
          text
         -->P_MONTH    text
    FORM sum_balance TABLES p_table USING p_month .
      CLEAR : tmp_vbak,
              balance_qty.
      REFRESH tmp_vbak.
      tmp_vbak[] = p_table[].
      LOOP AT tmp_vbak WHERE month EQ p_month AND kwmeng NE 0.
        balance_qty =  balance_qty +  tmp_vbak-balqty .
        "( tmp_vbak-kwmeng  - tmp_vbak-lfimg ).
      ENDLOOP.
    ENDFORM.                    "sum_balance
    *&      Form  sum_tot_balance
          text
    FORM sum_cust_tot_balance USING p_customer .
      CLEAR : tmp_vbak1,
              customer_bal_qty.
      REFRESH tmp_vbak1.
      tmp_vbak1[] = t_vbak[].
      LOOP AT tmp_vbak1 WHERE  kwmeng NE 0 AND
                               kunnr EQ p_customer .
        customer_bal_qty =  customer_bal_qty + tmp_vbak1-balqty .
        "( tmp_vbak1-kwmeng  - tmp_vbak1-lfimg ).
      ENDLOOP.
    ENDFORM.                    "sum_balance
    *&      Form  sum_tot_balance
          text
    FORM sum_tot_balance .
      CLEAR : tmp_vbak1,
              balance_qty.
      REFRESH tmp_vbak1.
      tmp_vbak1[] = t_vbak[].
      LOOP AT tmp_vbak1 WHERE  kwmeng NE 0 .
        balance_qty =  balance_qty + tmp_vbak1-balqty .
        "( tmp_vbak1-kwmeng  - tmp_vbak1-lfimg ).
      ENDLOOP.
    ENDFORM.                    "sum_balance
    *&      Form  sum_bal_val
          text
         -->P_TABLE    text
         -->P_MONTH    text
    FORM sum_bal_val TABLES p_table USING p_month .
      CLEAR : tmp_vbak,
              balance_val.
      REFRESH tmp_vbak.
      tmp_vbak[] = p_table[].
      LOOP AT tmp_vbak WHERE month EQ p_month AND kwmeng NE 0.
        balance_val =  balance_val +   tmp_vbak-netvl .
        "( tmp_vbak-kwmeng  - tmp_vbak-lfimg ).
      ENDLOOP.
    ENDFORM.                    "sum_balance
    *&      Form  sum_cust_tot_bal_val
          text
         -->P_CUSTOMER text
    FORM sum_cust_tot_bal_val USING p_customer.
      CLEAR : tmp_vbak1,
              cust_bal_val.
      REFRESH tmp_vbak1.
      tmp_vbak1[] = t_vbak[].
      LOOP AT tmp_vbak1 WHERE  kwmeng NE 0 AND
                               kunnr EQ p_customer.
        cust_bal_val =  cust_bal_val + tmp_vbak1-netvl .
        "( tmp_vbak1-kwmeng  - tmp_vbak1-lfimg ).
      ENDLOOP.
    ENDFORM.                    "sum_balance
    *&      Form  sum_tot_bal_val
          text
    FORM sum_tot_bal_val .
      CLEAR : tmp_vbak1,
              bal_tot_val.
      REFRESH tmp_vbak1.
      tmp_vbak1[] = t_vbak[].
      LOOP AT tmp_vbak1 WHERE  kwmeng NE 0 .
        bal_tot_val =  bal_tot_val + tmp_vbak1-netvl .
    *bal_tot_val =  bal_tot_val + tmp_vbak1-totdlr .
    t_totdlr
        "( tmp_vbak1-kwmeng  - tmp_vbak1-lfimg ).
      ENDLOOP.
    ENDFORM.                    "sum_balance test
    *&      Form  sum_tot_delivery
          text
    FORM sum_tot_delivery USING p_saleno p_item.
      LOOP AT itb_del WHERE vgbel EQ p_saleno AND
                            vgpos EQ p_item.
        tmp_qty =  tmp_qty + itb_del-lfimg.
      ENDLOOP.
    ENDFORM.                    "sum_tot_delivery
    *&      Form  tot_del_cust
          text
         -->P_MONTH    text
         -->P_KUNNR    text
    FORM tot_del_cust USING p_month p_kunnr.
      CLEAR tmp_qty.
      LOOP AT itb_del WHERE month EQ p_month AND
                            kunnr EQ p_kunnr.
        tmp_qty =  tmp_qty + itb_del-lfimg.
      ENDLOOP.
    ENDFORM.                    "sum_tot_delivery
    &----

    Hi,
    We can do it using 2LIS_02_ITM and 2LIS_02_SCL with 0PUR_C01 InfoCubes. So check it, I have done using the same combinations.
    https://wiki.sdn.sap.com/wiki/display/BI/BWSDMMFIDATASOURCES
    Else you also check 0IC_C03 with 2LIS_03_ * DataSources.
    Thanks
    Reddy

Maybe you are looking for

  • Nokia 5800 XM and LACK OF Nokia 810 Contact Downlo...

    I had nokia n82 with this app from nokia 810. I transferred contacts to my BT car kit and it worked perfectly. Now I cannot find such application and cannot transfer contact in any way. I read in forum several different ways, but it didnt help. I tri

  • Applewroks 6 Spreadsheet:  Results of a cell in one sheet to another sheet

    How do I add the results from the cell of one spreadsheet to the cell of another spreadsheet? It's easy on Excel. iMac   Mac OS X (10.4.8)  

  • ITouch will not come on, only displays picture of USB cord and iTunes

    My daughter's iTouch will only display a picture of the USB cord with an arrow pointing to an iTunes icon.  I have turned it off (it will give you the bar to turn it off) and reset it, but it will not work.  When I plug it into the computer (iTunes)

  • Error when executing Integration Gateway service

    Hello, I created  a service on IGW to expose an oracle db as odata but i'm getting the following error when i call it from the browser: <error><code/><message xml:lang="en-US">An exception occurred.</message></error> The service itself is working. It

  • Macbook pro doesn't start up anymore

    Guys i got a pretty big problem. My 1st gen macbook pro doesn't wanna completely start up anymore. When i press the startup button, I get the bong and when the apple logo appears, it suddenly restarts. So the bong appears, the apple logo shows up and