2LIS_02_ITM vs 2LIS_02_SCL

Hello
I am wondering what are the benefits of using 2LIS_02_ITM if I have 2LIS_02_SCL activated already into my DSO.
2LIS_02_SCL is more detailed extractor (at Schedule Line Level) where as 2LIS_02_ITM is at the item level.
Would someone reason for using 2LIS_02_ITM along with 2LIS_02_SCL....
Second question is, 2LIS_02_ITM does not seem to bring Goods Receipts and Invoice Receipts' Quantities and Amounts even for Process Keys 2s and 3s. Is this normal for 2LIS_02_ITM?
Anxious to see some details/discussions around this...
- Thanks for your comments

Hi,
You can see the claer SAP Help in the following urls...
2LIS_02_ITM
This DataSource provides information about the header date of a purchasing document, such as vendor, purchasing organization, and purchase order currency, as well as information about the item data, such as material, purchase order quantity, order unit, net price, and so on.
See
http://help.sap.com/saphelp_sm32/helpdata/en/58/f6383fdb800804e10000000a114084/frameset.htm
2LIS_02_SCL
This DataSource provides information about:
        The header data of a purchasing document, such as vendor, purchasing organization, order currency, and so on
        The item data such as material, purchase order quantity, order unit, net price, and so on
        The purchasing document delivery schedule lines, such as schedule line number, delivery date, schedule line quantity, value of schedule line quantity, and so on
See:
http://help.sap.com/saphelp_nw04/helpdata/en/8d/bc383fe58d5900e10000000a114084/frameset.htm
Thanks
Reddy

Similar Messages

  • 2LIS_02_ACC , 2LIS_02_ITM and 2LIS_02_SCL

    Hi Experts,
    Currently we are activating Business content for Purchasing infoCube 0PUR_C01. The current requirement is that the client wanted to see company code as well in the cube.
    The DS 2LIS_02_ITM and 2LIS_02_SCL does not have company code field, but 2LIS_02_ACC has.
    I wanted to know what is the difference between 2LIS_02_ACC and 2LIS_02_ITM, 2LIS_02_SCL DS. I know I can modify the ITM and SCL to include company code information, but I dont want to do that.
    Wanted to know if 2LIS_02_ACC is same as 2LIS_02_ITM and 2LIS_02_SCL. If not how I go about having Company code info in 0PUR_C01 cube.
    Thanks for your help.
    We are in ECC 6, BI7.0 version.
    Regards,
    Rachandr

    You can have more information about 2lis_02_acc datasourcein the following url.
    http://help.sap.com/saphelp_nw70/helpdata/en/5c/8ea0e626e442efb109232830faded9/frameset.htm
    Also if you need only company code, you can add it to the SCL and ITM extractors as well.
    I believe for the two extractors the Company Code field(MCEKKO  BUKRS) is directly available in the Pool, you have to simply bring it in and you dont need to write any code even.
    Regards.

  • Not getting transfer rules for 2LIS_02_HDR , 2LIS_02_ITM and 2LIS_02_SCL

    Hello Bi experts,
    Actually i am implementing standard Purchasing module in BI system.
    While implementing , i have installed cube 0PUR_C04 with data flow before options.
    After installation , i am not getting transfer rule for 2LIS_02_HDR , 2LIS_02_ITM and 2LIS_02_SCL .
    I am getting transfer rule for 2LIS_02_S011 only.
    0PUR_c04 contains these 4 dataspurces - 2LIS_02_HDR , 2LIS_02_ITM and 2LIS_02_SCL , 2LIS_02_S011 .
    So how can i get these transfer rule. and if we want to implement std Purchasing module in BI , which Cubes are required or necessary.
    In metadata repository also , for Cube 0PUR_c04 , it does not showing transfer rule HDR/ITM/SCL. there also it is now showing transfer rules.
    I will be also very thankful if anybody just give me overview of purchasing.
    Thanks,
    Sada.

    Hello Mani,
    Thanks a lot.you are the first one who has answered my que. which i expect .
    Look at following floe in infoprovider in my system. and please tell me what exactly i should do?
    Cube->Purchasing Groups                                                                                0PUR_C04
               Update Rule->0PUR_C04 2LIS_02_HDR                                                                       AY0XVMCJPXXXXXXXXXXXXXXXX
                                    Infosource->Purchasing Data (Document Header Level) as of 2.0B      2LIS_02_HDR
               Update Rule->0PUR_C04 2LIS_02_ITM                                                                         4YSO2PF9XXXXXXXXXXXXXXXXX
                                     INfosource->Purchasing Data (Document Item Level) as of 2.0B          2LIS_02_ITM
               Update Rule->0PUR_C04 2LIS_02_S011                                                                      CSB3FHGQXXXXXXXXXXXXXXXXX
                                     Infosurce->Purchasing groups                                                               2LIS_02_S011
                                                      Transfer Rule->from 2LIS_02_S011 for SC4 Client 600        2LIS_02_S011                  SCXCLNTXXX
                                                                             Datasource->Purchasing groups                    2LIS_02_S011
               Update Rule->0PUR_C04 2LIS_02_SCL                                                                        4ZZ0DMZXXXXXXXXXXXXXXXXXX
                                     Infosource->Pur.Data (Document Schedule Line Level)                         2LIS_02_SCL
    Mani i am expecting answer from you.
    Thanks,
    Sada

  • Transformations for 2lis_02_itm, 2lis_02_scl

    Dear Team,
    I am currently implementing Purchasing module and using the datasources 2lis_02_itm and 2lis_02_scl. I have installed 0pur_c01 cube from business content. But in the business content we dont have 7.0 transformations from data source to cube. But the update rules are available completely.
    How can we get activated complete transformations flow in system.
    Transformations for 2lis_02_itm data source is available. but the complete rules are not mapped.
    Please let me know the solution if some have faced the same situation.
    Current our system is in bi content 704 and SAP Netweaver 7.01.
    Regards,
    Don

    HI ,
    Simple way is to Install the 3.x flow from BI content and then migrate them to the 7.0 flow , we have done that most of the times when there is no BI content available for the new dataflow
    -->how to doc for reference
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/00d94ca8-9538-2c10-9b99-859afde1fa4a?QuickLink=index&overridelayout=true
    Regards,
    Sathya

  • 2lis_02_itm: bwvorg not filled

    Hello all,
    We face the following problem with extractors 2lis_02_itm and 2lis_02_scl.
    Even though the transaction keys are properly maintained in the customizing  (Transaction Key Maintenance for SAP BW), the field BWVORG is not filled.
    We have taken a look at multiple SAP-notes, eg. 684465. However that didn't solve the problem.
    Any more ideas why the field is not filled?
    Thanks in advance!
    Konrad

    Hello,
    SAP  Note 353042 helped. The industry sector was not specified in our system!

  • Where is the TR between 2LIS_02_SCL source and 2LIS_02_SCL infosource?

    Hi gurus,
    I activate the infocube 0PUR_C01 for recive purchasing information using BI Cont 7.04 level 007.
    The new method of extraction information to this cube is using the 2LIS_02_ITM and 2LIS_02_SCL sources.
    I used standard transformation between 2LIS_02_ITM and 0PUR_C01. Using a DTP I will load this source to the cube.
    But when I try to import the standar transformation between 2LIS_02_SCL and 0PUR_C01 it doesn't exist. I apreciate that it exist a 3.X infosource and a update roule, but I can't find the transfer rule of 2LIS_02_SCL surce.
    How can I connect this source and this infocource using BI content? There is another connexion?
    Someone can help me?
    Thanks!!!

    For 2LIS_02_SCL and InfoSource 2LIS_02_SCL, make use of Update Rules, instead of Transformation.
    Change the DataSource 2LIS_02_SCL from 7.x to 3.x using transaction RSDS.
    This will enable Update rules and transfer rules for this.
    That would fix the issue.
    Thanks
    System BW 7.01 Sup Pak 9
    BI Content 705 Sup Pak 2

  • After recent patch upgrade, BW delta Data loads for 2LIS_02_ITM failing

    Hi All
    We have patched our BW 3.5 system from 16 to 25. After updating patches, I am geetting delta load issues.
    2lis_02_itm and 2lis_02_scl delta loads are taking long long time. Deltas are failing even for 3000  records . some time it is taking 14 hours .  Delta loads are failing  and I am getting below message. Please advise.
    I am still getting below dump and i could not find any errors in
    ST22. Please see below error.
    Processing in Warehouse timed out; processing steps mising
    Diagnosis
    Processing the request in the BW system is taking a long time and the
    processing step Update rules has still not been executed.
    System response
    <DS:DE.RSCALLER>Caller is still missing.
    Procedure
    Check in the process overview in the BW system whether processes are
    running in the BW system under the background user.
    If this is not the case, check the short dump overview in the BW system.
    Thanks
    Pramod

    Hello Pramod,
    Is this load is to load to initial level ODS? If Yes I understand that you have issue in loading but not at activation of the ODS?
    Normally this kind of issue comes during the activation of ODS.
    1. If you are getting this during the data loads, then try to check loading only to PSA first and then from PSA to target? And check how much time that it's taking as this will help to track the issue whether its present in Source or in BW?
    2. If the load is fine till PSA then try loading the same to ODS and then check whether this issue is present or not?
    3. At the same you need to check the source side the system load and the number of processors which are available?
    4. Did you perform the delta queue draining before the stack upgrade in R/3 or not? Normally as a pre-requisite this needs to be done if not then you will have issues in extracting the data!
    5. Finally this can be avoided by having Initwithout data transfer and then performing the Delta loads. BUt for this need to first extract all the data from Source to BW and then take a down time in R/3 for few min and perform this activity so that the Init Timstamp will be reset properly and the Delta should work fine for you.
    Do get back to us with more details.
    Thanks
    Murali M

  • URGENT: 2LIS_02_ITM

    Hi All,
    I am loading data into 0PUR_c01 from 2LIS_02_ITM and the load is getting stuck and I am seeing this message in the Details tab of the Monitor
    Record 67 :No value found for attribute 0REQESTER for InfoObject 0USERNAME = PERSON 1 "
    I am not sure what it means , can someone guide me.
    It is the same , whether I load it from 2LIS_02_ITM or 2LIS_02_SCL.
    Thanks
    Message was edited by: Amanda Pete

    Hi Amanda,
    I guess it might have got cancelled. Try this as the last option:Make the request red and then goto the "details" tab of the monitor, select the data package -> right click -> process data package manually.
    If it does the trick then its fine.
    <u><b>ELSE</b></u>
    I guess your load is a delta load. Do the following steps:
    1. Your cube should have only the requests that were there before the error.
    2. Run the infopackage with "init with no data transfer" option.
    3. Now rerun the delta.
    Bye
    Dinesh

  • CostCentre in Purchasing Cube

    Hi All,
        I am using a standard SAP Business content Cube 0PUR_C01.Extractor are 2LIS_02_ITM and 2LIS_02_SCL.We have got a new requirement to see CostCentres in this report.None of these extractors have 0COSTCENTER,instead there is an other extractor 2LIS_02_ACC which carries account assignment(CostCentres) with Purchase Orders.
         What would be the best design to get CostCentres into 0PUR_C01.
    Any input is appreciated.Points assured.
    Thanks
    Neo

    Hi Neo,
    Did you resolve this issue?
    Thanks

  • PO is deleted after GR and Invoice done, but not reverting GR IR values

    Hi,
    Whenever PO line item is deleted with deletion indicator value L, I can see 2 extra entries for Process key 001, with negative Qty and amount values. But for process key 002 (GR) and 003 (IR) values are not getting reverted. So in BW I am getting 0 PO qty and value (based on process key 001 and addition of negative values). But non zero GR values (process key 002) and IR values (Process key 003).
    Data source I am using is 2LIS_02_SCL and 2LIs_02_ITM.
    Regards,
    ST

    Hi,
    I am not pretty sure but may be answer to your question lies in the question of below thread.
    2LIS_02_ITM vs 2LIS_02_SCL
    It appears that for process keys 2 and 3, the datasource 2LIS_02_ITM doesn't bring values. These would be comiing in your cube/ DSO from 2lis_02_SCL

  • 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

  • 0GR_VAL_PD KF has not mapped with source in 0Pur_C01 but value comes

    HI All
    I have problem with 0GR_VAL_PD kf in 0PUR_C01 cube. 0GR_VAL_PD KF has not mapped with source in 0Pur_C01 but in report level, value is coming for purchase organisation,material group . 
    But GR value as at posting date (0GR_VAL_PD)value not coming for particular material group or purch. org. but some days before, values were coming for particular material group or purch. org..
    so need your help.
    Thanks n Regards,
    Gaurav Sekhri
    Edited by: gaurav sekhri on Aug 18, 2010 11:41 AM
    Edited by: gaurav sekhri on Aug 18, 2010 11:43 AM

    Hi Susan
    Which datasource you are using at present. Normally 0PUR_C01 gets loaded from 2LIS_02_ITM and 2LIS_02_SCL. The keyfigure that you have mentioned will come from 2LIS_02_SCL with the code that you have written.
    The code that you have written should work. Please check if the code is in the transformation from 2LIS_02_SCL.
    Share the details on why do you think the solution didn't work.
    Regards
    Karthik

  • Extraction method for purchasing info

    Hi all!
    I need some help with this (see the infosource section)
    [http://help.sap.com/saphelp_nw70/helpdata/en/ed/62073c44564d59e10000000a114084/frameset.htm ]
    as you can see the document says you can choose one of two methods of extraction. Could you tel me the more important differences between them?. Why Purchasing Groups (2LIS_02_S011) isn't included in LBWE? Which one do you recomend?
    Bonus track...
    Doesn't "Purchasing BI Content" take into account any info on Purchasing Requisition? The user needs to analyze times between the creation of Purchasing Requisition and the creation of the related Purchase Order... Am I clear?
    We've seen that all queries, cube's and ods's are meaningful once the Purchase Order have been created, are we right?.
    Thanks a lot!!!!.

    Hi all!
    I need some help about using Purchasing BI Content. I'm prety new in SAP and I'm a bit confused. If you look the help info you'll see that cube 0pur_c01 can be conected to source system using one of two methods.
    The first one, the old one, uses 2LIS_02_S012 extractor wich fills every InfoObject on target. The new one uses 2LIS_02_ITM and 2LIS_02_SCL directly to the cube. The thing is that in the InfoCube are some InfoObjects wich I cant find neither in 2LIS_02_ITM nor in 2LIS_02_SCL. And if I take a look in some demo systems I find that InfoCube conected to the three extractors... Am I clear?
    Can you give some tips about using this BI model please?
    I'm not so sure about the way it works when there are two datasources going directly to the same Cube...
    Thanks, really thanks!!!

  • 0REVERSEDOC, 0VERSION, 0INFO_REC and 0INFO_TYPE

    Hy experts,
    I'm using cubes 0PUR_C01 and 0PUR_C04, thta receive data from DS 2LIS_02_HDR, 2LIS_02_ITM and 2LIS_02_SCL.
    I'm having some data inconsitencies in the queries.
    I've looked to the update rules, and realized 0REVERSEDOC, 0VERSION, 0INFO_REC and 0INFO_TYPE where not mapped.
    from what I've been reading I tink this might be the reason my data is not correct.
    My question is, how should I map them... To what fields and what type of mapping (direct, routine, etc)?
    Also, are there any steps that are necessary in R3 side? (i've activated the DS, included BW in trs BF11, defined industry, delete/setup tables)
    Can anyone help?
    Many thanks
    Joana

    Hi,
    0REVERSEDOC is used in BW to indicate if the record is canceled or deleted in ECC ,This InfoObject has got three values: R,X and # values,
    You can map this field to STORNO .
    0version is refer to the version of the item like Actual or plan version...
    You can check below table for mapping between field and infoobject .
    RSOSFIELDMAP
    RSGENFIELDMAP
    Regards,
    Satya

  • Implementing BI content (0PUR_C01 and 0PUR_C04)

    Hi Experts,
    while consulting help.sap regarding the standard BW cubes 0PUR_C01 and 0PUR_C04, i get the following information (in regards to extractors to activate):
    0PUR_C01
    You can supply this InfoCube with data using either the conventional extraction method or the new one:
    Conventional method: Purchasing (2LIS_02_S012)
    New method: Purchasing Data (Document Item Level) (2LIS_02_ITM) and Purchasing Data (Document Schedule Line Level) (2LIS_02_SCL)
    0PUR_C04
    You can supply this InfoCube with data using either the conventional extraction method or the new one:
    Conventional method: Purchasing Groups (2LIS_02_S011)
    New method: Purchasing Data (Document Header Level) (2LIS_02_HDR), Purchasing Data (Document Item Level) (2LIS_02_ITM), and Purchasing Data (Document Schedule Line Level) (2LIS_02_SCL)
    My questions are:
    1) why would you activate/use 2LIS_02_S012 or 2LIS_02_ITM and 2LIS_02_SCL for the 0PUR_C01. What are the differences between those 2 methods and why would one chose one over the other
    2) why would you activate/use 2LIS_02_S011 or 2LIS_02_HDR, 2LIS_02_ITM and 2LIS_02_SCL for the 0PUR_C04. What are the differences between those 2 methods and why would one chose one over the other
    Many thanks
    Joana

    Hi Joana,
    Can you please list out the differences? I've the same problem but was unable to figure out why we need both extractors 0PUR_C01 and 0PUR_C04.
    Thanks.

Maybe you are looking for

  • What are the different approaches to do Fault Handling?

    What are the different approaches to do Fault Handling?

  • [SOLVED] flashplugin video freezing while audio is fine

    I saw a post about this on this forum, but I've been searching the forum for about 5 hours now and I can't find it, so I'll post a new topic. When I do almost anything with adobe flash (in firefox or chromium) after about five seconds the visual free

  • Cropping and Blue Screening - 2 unrelated questions.

    1) When I straighten a still in Canvas by using the wire frame, to make a house level, say, the cropping lines, naturally, move with it. So a cropping line at an angle will give me a slanting top and bottom line. So how can I crop it so that the pict

  • How can i delete images from iPhoto?

    I can not delete images from iphoto. When I try to move pictures to the trash they do not move, and if I try to delete them by pressing "right click> Trash" they do not move! pretty much the only way I can delete pictures from iphoto is to delete the

  • How to control time with great precision

    Hello everybody.I know Timer could control time.But it uses thread.sleep(),isn't it.That means it is not guaranteed.So,does anybody know some approach to control time precisely? thanks in advance!