How to Calculate Freight and Acquisition Overheads on Material Price

Hi Gurus,
currently i am working in Product costing. my requirement is to calculate Freight and Acquisition overheads on Material Price.i have maintaind rates for condition types ZFRA , ZA2H and ZAOH  by using MEK1 transaction code. eventhough system is not calculating this overheads while running CK11n. system showing only material price no other oveheads.
my intension is to estimate the cost for Purchased parts not for Manufacturted parts. for that i have given the priority in the Valuation Variant is Price from purchase record.
can anybody resolve my problem?
Thanks&Regards
Prasad

Hi
Thanks for your reply.According to my clients requirement i need to do material cost estimates for purchased materials thru ck11n.for this i have given priority as price from purchase info record in the Valuation Variant. my mm  friends maintaind price in the purchase info record ME11.
In additions to this i also maintained rates for Freight,Acquisition and Customs condition types in MKE1.
Now if i run CK11n, system showing only Material Price which is in the Purchase inforecord but system not calculating any required overheads.
I need to calculate Overheads thru Condition types not thru Costing sheet.
If you see Price Simulation system calculating the Overheads accordingly.but same is not getting populating while running the CK11n.
In Valuation Variant under the Deivery Costs tab I have assign all required Condition types to Valuation Variants and Controlling area accordingly.
I hope that i explained my current problem clearly.can anybody give me the solution
Thanks&Regards
Prareddy

Similar Messages

  • How to include Freight charges and unloading charges in Material price.

    Hi All,
    Can you pls. advice how we can include freight charges & unloading charges in Material price (MAP) when receive in system.
    Current Situation :
    We buy Switchgears from vendor, which transported with special vehicle arrangement from different service provider and gets unloaded at warehouse by another service provider. Currently business create seperate PO for Material vendor, Freight Vendor and for unloading service provider. But MAP is only updated with Material cost only. How can I include delivery cost and unloading cost in MAP thro standard SAP process.
    Your solution will help business heaps.
    Regards,

    Hi,
    Create three condition types namely basic material price, freight charges & unloading charges.
    For  basic material price , you can copy PB00 and rename your basic material price condition type.Now freight charges & unloading charges condition type in M/06 , do not maintain condition category ( keep it blank ), so that it will added to inventory cost .For freight charges & unloading charges do not maintain account key & accrual key in Pricing procedure.
    Cretae PO , now you will see all cost added to NET price in PO and you can for doing GR where all cost are inventoried as materisl cost.
    Regards,
    Biju K

  • How to calculates averages and send to a file?(source code)

    how to calculates averages and send to a file?(source code) I need to get started but I don't know where to begin...........the book I have doesn't really say how to handle averages and send to a file.................anybody got suggestions on how to get started? I am a newbie so place in layman's terms.............thanx

    To calculate an average: add all of the numbers together and divide by how many numbers you added together.
    ex: (1 + 2 + 3 + 10)/4 = 4 (4 is the average)
    As for writing them to a file, look over the API for random or sequential access files.

  • How to calculate excise and vat

    can anybody tell me how to calculate excise and vat as i am doing a alv reports from me23n and i have to put excise and vat in respect to document invoice number in me23n.i am using tables mseg,makt,bseg,ekpo so if there any related program please refer me.

    In this  report i have to calculate excise and vat according to po number and also i dont how to put so plesae solve this if possible......
    *& Report  ZFA_GRS
    *&RD1K903618
    REPORT  ZFA_GRS.
    TABLES : ekpo,EKKO, t001,MSEG,MKPF,komk,komp.
    TYPE-POOLS : SLIS.
    DATA : IT_FCAT TYPE SLIS_T_FIELDCAT_ALV,
           WA_FCAT TYPE SLIS_FIELDCAT_ALV.
    DATA : IT_SORT TYPE SLIS_T_SORTINFO_ALV,
           WA_SORT TYPE SLIS_SORTINFO_ALV.
    DATA:  GT_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER,
           LS_LINE TYPE SLIS_LISTHEADER.
    DATA : BEGIN OF IT_FINAL OCCURS 0,
           LIFNR LIKE MSEG-LIFNR,
           MATNR LIKE MSEG-MATNR,
           MBLNR LIKE MSEG-MBLNR,
           BELNR LIKE BSEG-BELNR,
           MAKTX LIKE MAKT-MAKTX,
           MENGE LIKE MSEG-MENGE,
           MEINS LIKE MSEG-MEINS,
           BWART LIKE MSEG-BWART,
           EBELN like MSEG-EBELN,
           EBELP LIKE MSEG-EBELP,
           DMBTR like BSEG-DMBTR ,
           EXAMT TYPE DMBTR,
           WRBTR LIKE BSEG-WRBTR,
          EXAMT LIKE BSEG-WRBTR,
           HKONT LIKE BSEG-HKONT,
           NETVALUE type DMBTR,
           VATAMT TYPE DMBTR,
           TOTAMT TYPE DMBTR,
           MWSBP LIKE KOMP-MWSBP,
           EXBED LIKE J_1IEXCDTL-EXBED,
           EXSED LIKE J_1IEXCDTL-EXSED,
           EXAED LIKE J_1IEXCDTL-EXAED,
           CESS LIKE J_1IEXCDTL-CESS,
           ECS LIKE J_1IEXCDTL-ECS,
           EXADDTAX1 LIKE J_1IEXCDTL-EXADDTAX1,
           VAT TYPE KONV-KWERT,
           UNIT TYPE EKPO-MEINS,
           TOTQNT TYPE MSEG-MENGE,
           NETWR TYPE EKPO-NETWR,
           PEINH LIKE EKPO-PEINH,
           NETPR LIKE EKPO-NETPR,
           menge1 like ekpo-menge,
           TOTEXC TYPE DMBTR,
           TOTVAT TYPE DMBTR,
           TOTVAL TYPE DMBTR,
    END OF IT_FINAL.
    DATA : WA_FINAL LIKE IT_FINAL OCCURS 0 WITH HEADER LINE,
           W_J_1IEXCDTL LIKE STANDARD TABLE OF J_1IEXCDTL WITH HEADER LINE.
    DATA : WA_FINAL LIKE IT_FINAL OCCURS 0 WITH HEADER LINE.
    SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN SKIP 1.
    SELECT-OPTIONS: P_MBLNR FOR MSEG-MBLNR .
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN : END OF BLOCK B1.
    SELECT MATNR MBLNR MENGE MEINS BWART EBELN EBELP DMBTR FROM MSEG INTO CORRESPONDING FIELDS OF TABLE IT_FINAL WHERE MBLNR IN P_MBLNR AND
                ( BWART = '101'  OR  BWART = '102' OR
                  BWART = '113'  OR  BWART = '114'  )  .
    DATA : TOTAMT TYPE DMBTR,
           NETVAL TYPE DMBTR,
           NETVALUE TYPE DMBTR,
           NETWR LIKE EKPO-NETWR,
           EXAMT TYPE DMBTR.
    SORT IT_FINAL BY MBLNR.
    LOOP AT IT_FINAL.
    ENDLOOP.
    LOOP AT IT_FINAL INTO WA_FINAL.
    SELECT SINGLE MAKTX FROM MAKT INTO WA_FINAL-MAKTX WHERE MATNR = WA_FINAL-MATNR.
    SELECT single  DMBTR from BSEG into  wa_final-DMBTR where EBELN = wa_final-EBELN .
    SELECT SINGLE WRBTR FROM BSEG INTO WA_FINAL-WRBTR WHERE EBELN = WA_FINAL-EBELN.
    *WA_FINAL-WRBTR = W_J_1IEXCDTL-EXBED + W_J_1IEXCDTL-EXSED + W_J_1IEXCDTL-EXAED + W_J_1IEXCDTL-CESS + W_J_1IEXCDTL-ECS + W_J_1IEXCDTL-EXADDTAX1.
    *wa_final-EXAMT = Wa_final-EXBED + wa_final-EXSED + Wa_final-EXAED + Wa_final-CESS + Wa_final-ECS + Wa_final-EXADDTAX1.
    SELECT SINGLE BELNR FROM BSEG INTO WA_FINAL-BELNR WHERE EBELN = WA_FINAL-EBELN.
    MODIFY IT_FINAL FROM WA_FINAL TRANSPORTING   BELNR
                                                 MAKTX
                                                 MENGE
                                                 MEINS
                                                 BWART
                                                 EBELN
                                                 EBELP
                                                 DMBTR
                                                 WRBTR
                                                 HKONT
                                                 LIFNR
                                                NETVAL
                                                NETVALUE
                                                 EXAMT
                                                 VATAMT
                                                 TOTAMT
                                                 MWSBP
                                                 VAT
                                                 UNIT
                                                 TOTQNT
                                                TOTNVL
                                                 TOTEXC
                                                 TOTVAT
                                                 TOTVAL
                                                 PEINH
                                                 netwr
                                                 netpr
    ENDLOOP.
    PERFORM GEN_TOP.
    *TOTAMT = NETVAL.
    WA_FCAT-COL_POS = 1.
    WA_FCAT-FIELDNAME = 'MATNR'.
    WA_FCAT-SELTEXT_M = 'MATERIAL NO.'.
    WA_FCAT-TABNAME = 'IT_FINAL'.
    WA_FCAT-OUTPUTLEN = 18.
    APPEND WA_FCAT TO IT_FCAT.
    WA_FCAT-COL_POS = 2.
    WA_FCAT-FIELDNAME = 'MBLNR'.
    WA_FCAT-SELTEXT_M = 'MAT.DOC NO'.
    WA_FCAT-TABNAME = 'IT_FINAL'.
    WA_FCAT-OUTPUTLEN = 15.
    APPEND WA_FCAT TO IT_FCAT.
    WA_FCAT-COL_POS = 3.
    WA_FCAT-FIELDNAME = 'BELNR'.
    WA_FCAT-SELTEXT_M = 'INVOICE DOC NO'.
    WA_FCAT-TABNAME = 'IT_FINAL'.
    WA_FCAT-OUTPUTLEN = 15.
    APPEND WA_FCAT TO IT_FCAT.
    WA_FCAT-COL_POS = 4.
    WA_FCAT-FIELDNAME = 'EBELN'.
    WA_FCAT-SELTEXT_M = 'PO DOC NO.'.
    WA_FCAT-TABNAME = 'IT_FINAL'.
    WA_FCAT-OUTPUTLEN = 12.
    APPEND WA_FCAT TO IT_FCAT.
    WA_FCAT-COL_POS = 5.
    WA_FCAT-FIELDNAME = 'MAKTX'.
    WA_FCAT-SELTEXT_M = 'DESCRIPTION'.
    WA_FCAT-TABNAME = 'IT_FINAL'.
    WA_FCAT-OUTPUTLEN = 35.
    APPEND WA_FCAT TO IT_FCAT.
    WA_FCAT-COL_POS = 6.
    WA_FCAT-FIELDNAME = 'MENGE'.
    WA_FCAT-SELTEXT_M = 'QUANTITY'.
    WA_FCAT-TABNAME = 'IT_FINAL'.
    WA_FCAT-OUTPUTLEN = 8.
    APPEND WA_FCAT TO IT_FCAT.
    WA_FCAT-COL_POS = 7.
    WA_FCAT-FIELDNAME = 'MEINS'.
    WA_FCAT-SELTEXT_M = 'UNIT'.
    WA_FCAT-TABNAME = 'IT_FINAL'.
    WA_FCAT-OUTPUTLEN = 5.
    APPEND WA_FCAT TO IT_FCAT.
    WA_FCAT-COL_POS = 8.
    WA_FCAT-FIELDNAME = 'BWART'.
    WA_FCAT-SELTEXT_M = 'MOVTYPE.'.
    WA_FCAT-TABNAME = 'IT_FINAL'.
    WA_FCAT-OUTPUTLEN = 8.
    APPEND WA_FCAT TO IT_FCAT.
    WA_FCAT-COL_POS = 9.
    WA_FCAT-FIELDNAME = 'DMBTR'.
    WA_FCAT-SELTEXT_M = 'NETVALUE'.
    WA_FCAT-TABNAME = 'IT_FINAL'.
    WA_FCAT-OUTPUTLEN = 12.
    APPEND WA_FCAT TO IT_FCAT.
    *WA_FCAT-COL_POS = 9.
    *WA_FCAT-FIELDNAME = 'EBELP'.
    *WA_FCAT-SELTEXT_M = 'LINE ITEM.'.
    *WA_FCAT-TABNAME = 'IT_FINAL'.
    *WA_FCAT-OUTPUTLEN = 12.
    *APPEND WA_FCAT TO IT_FCAT.
    WA_FCAT-COL_POS = 10.
    WA_FCAT-FIELDNAME = 'WRBTR'.
    WA_FCAT-SELTEXT_M = 'EXCISE'.
    WA_FCAT-TABNAME = 'IT_FINAL'.
    WA_FCAT-DO_SUM = 'X'.
    WA_FCAT-OUTPUTLEN = 15.
    APPEND WA_FCAT TO IT_FCAT.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
       I_CALLBACK_PROGRAM                = SY-CPROG
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
       I_CALLBACK_TOP_OF_PAGE            = 'ALV_TOP_OF_PAGE'
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         =
       IT_FIELDCAT                       = IT_FCAT
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
       I_DEFAULT                         = 'X'
       I_SAVE                            = 'A'
      IS_VARIANT                        =
      IT_EVENTS                         =
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
      TABLES
        T_OUTTAB                          = IT_FINAL
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    FORM ALV_TOP_OF_PAGE.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          I_LOGO             = 'ZROHALOGO'
          IT_LIST_COMMENTARY = GT_TOP_OF_PAGE.
    ENDFORM.                    "alv_top_of_page
    *&      Form  GEN_TOP
          text
    -->  p1        text
    <--  p2        text
    FORM GEN_TOP .
    DATA: INFO(60),
            B_DT(10), E_DT(10).
      REFRESH : GT_TOP_OF_PAGE.
      CLEAR : LS_LINE.
      LS_LINE-TYP = 'H'.
      LS_LINE-INFO = '       ROHA DYECHEM PVT LTD'.
      APPEND LS_LINE TO GT_TOP_OF_PAGE.
      CLEAR : LS_LINE.
      LS_LINE-TYP = 'S'.
    LS_LINE-KEY = 'Address'.
    LS_LINE-INFO =
      APPEND LS_LINE TO GT_TOP_OF_PAGE.
      CLEAR : LS_LINE.
      LS_LINE-TYP = 'S'.
    LS_LINE-INFO =
      APPEND LS_LINE TO GT_TOP_OF_PAGE.
      CLEAR : LS_LINE.
      LS_LINE-TYP = 'S'.
    LS_LINE-INFO =
      APPEND LS_LINE TO GT_TOP_OF_PAGE.
      CLEAR : LS_LINE.
      CLEAR LS_LINE.
      LS_LINE-TYP = 'S'.
      LS_LINE-KEY = 'Report Name'.
      LS_LINE-INFO = 'NEW GRS REPORT'.
      APPEND LS_LINE TO GT_TOP_OF_PAGE.
      CLEAR LS_LINE.
      LS_LINE-TYP = 'S'.
      LS_LINE-KEY = 'T-CODE'.
    LS_LINE-INFO =
      APPEND LS_LINE TO GT_TOP_OF_PAGE.
      CLEAR LS_LINE.
      LS_LINE-TYP = 'S'.
    LS_LINE-KEY = 'Period'.
      LS_LINE-INFO = INFO.
      APPEND LS_LINE TO GT_TOP_OF_PAGE.
      WRITE SY-DATUM TO B_DT.
      CLEAR LS_LINE.
      LS_LINE-TYP = 'S'.
      LS_LINE-KEY = 'Report Dt.'.
      LS_LINE-INFO = B_DT.
      APPEND LS_LINE TO GT_TOP_OF_PAGE.
    ENDFORM.                    " GEN_TOP

  • How to find classtype and class for a material.

    Hi,
    How to find classtype and class for a material.
    which table contains this data.
    Thanks
    Kiran

    Hi Kiran,
    Check below sample code. Use this BAPI which will give all info about the class for the material.
      DATA:      l_objectkey_imp    TYPE bapi1003_key-object
                                         VALUE IS INITIAL.
      CONSTANTS: lc_objecttable_imp TYPE bapi1003_key-objecttable
                                         VALUE 'MARA',
                 lc_classtype_imp   TYPE bapi1003_key-classtype
                                         VALUE '001',
                 lc_freight_class   TYPE bapi1003_alloc_list-classnum
                                         VALUE 'FREIGHT_CLASS',
                 lc_e               TYPE bapiret2-type VALUE 'E',
                 lc_p(1)            TYPE c             VALUE 'P',
                 lc_m(1)            TYPE c             VALUE 'M'.
      SORT i_deliverydata BY vbeln posnr matnr.
      CLEAR wa_deliverydata.
      LOOP AT i_deliverydata INTO wa_deliverydata.
        REFRESH: i_alloclist[],
                 i_return[].
        CLEAR:   l_objectkey_imp.
        l_objectkey_imp = wa_deliverydata-matnr.
    *Get classes and characteristics
        CALL FUNCTION 'BAPI_OBJCL_GETCLASSES'
          EXPORTING
            objectkey_imp         = l_objectkey_imp
            objecttable_imp       = lc_objecttable_imp
            classtype_imp         = lc_classtype_imp
    *   READ_VALUATIONS       =
            keydate               = sy-datum
            language              = sy-langu
          TABLES
            alloclist             = i_alloclist
    *   ALLOCVALUESCHAR       =
    *   ALLOCVALUESCURR       =
    *   ALLOCVALUESNUM        =
            return                = i_return
    Thanks,
    Vinod.

  • How to calculate freight,handling,insurance charges for PO

    Hi expert,
                  I need to show the details of PO with tax and freight,handling,insurance charges for purchase order. I calculated the tax amount of PO using CALCULATE_TAX_ITEM. but i don't know to calculate the freight and those charges. Guide me what table i have to be use or any other function module is there to calculate those charges. KONV is the table for conditions. how can i fetch those charges from these table using ebeln and ebelp fields.
    Regards,
    Rathish

    First you have to select Doc condition number (KNUMV) for each PO from EKKO table...then for the same KNUMV run KONV....here against each KNUMV-KPOSN (here KPOSN = EBELP)you will find the condition types & value...in the rport i think you have to hardcoat the condition types
    Regards,
    Indranil

  • How to calculate YTD and Last year YTD on Date in Bex

    Hi,
    I have a requirement in which I need to show the report as following format.
    I need to show    Year>monthday as Hierarchy. user will drill down on Month to Date.
                 Del Qty              Ord Qty              Del  Qty LY              Del Qty YTD                  Del Qty  L YTD
    Year
    > Drill Down to Months
            Jan
            Feb
            Mar
              ---> 1.03.2010
              ---> 2.03.2010
              ---> 3.03.2010
            Dec
    I have Calday, Calmonth, Calyear all three objects.
    Now my question is how I can achive this? On which i need to create hierarchy?
    and how to calculate the YTD at day level.
    Note:- in the selection calyear is mandatory. User wants to display as per year.   So What infoobject I need to take in selection?
    and the way to calculate YTD on Day (in the case also ,where user doesn't give the date in selection)
    Plz reply asap its uregent !!!
    Thanks in advance,
    Amit

    Hi,
    As per my understanding I think YTD means JAN to current date result. I means say if user enter 062005 then result in YTD should be from 012005 to 062005.
    And to do this you need to write a customer exit variable where LOW field of internal table you will put JAN year and HIGH will contain month year entered by user.
    Hope this will help you.
    Suneel

  • How to calculate difference and percentage in matrix report dynamic columns in SSRS 2008

    Hi Friends,
    I need to calculate Difference and Percentage In matrix report SSRS 2008
    1) Row grouping based On Product
    2) Column Grouping Week and Fiscal Year Current week  and Previous Year same Weeks 
    3)Data Invnetory(Value fileld)
    Example:
    If value1 and Value2 Available we need to calculate Percentage and Difference.Otherwise Not required NA I need to Show.
    For example If Particular week,Current year data is available,Previous year  week data is not available No
    need to cal Diff and Percentage we need to show Empty.
    Below Code is working for If two values is available.
    If any one of the fiscal year week data is not there it's taking some garbage values.
    I tries with If condition in GetPCT() and GetDiff() It's not working.
    Can some one please help me on this.
    I am using the custom code 
    Public Shared Value1 as String
    Public Shared Value2 as String
    Public Shared previous as string
    Public Shared previousweek as string
    Public Shared Function GetValue(Value as String,partner as String,Week as String) as String
    If partner =previous and Week =previousweek Then
    Value2=Value
    Else
    previous=partner
    previousweek=Week
    Value1=Value
    End If
    return Value
    End Function
    Public Shared Function GetDiff()
    return Value2-Value1
    End Function
    Public Shared Function GetPct()
    return (Value2-Value1)/Value1
    End Function
    How to handle this.
    Thank You, Manasa.V

    Hi veerapaneni,
    According to your description, if one of the fiscal year week doesn’t have data, the custom code returns false results.
    For your requirement, if NULL value exists in the database, we should replace it as zero then perform calculate. So within the code, we should judge whether the value is NULL. To achieve your goal, please refer to the steps below:
    1. Create a table like below.
    create table dif4
    ([Product Group] varchar(50),
    [Week] varchar(50),
    [Fiscalyearweek] varchar(50),
    value int
    insert into dif4 values
    ('Desktops','W01','FY14W01',0),
    ('Desktops','W01','FY15W01',45),
    ('Desktops','W02','FY14W02',null),
    ('Desktops','W02','FY15W02',30),
    ('Desktops','W03','FY14W03',12),
    ('Desktops','W03','FY15W03',50),
    ('Notebooks','W01','FY14W01',35),
    ('Notebooks','W01','FY15W01',56),
    ('Notebooks','W02','FY14W02',45),
    ('Notebooks','W02','FY15W02',87),
    ('Notebooks','W03','FY14W03',75),
    ('Notebooks','W03','FY15W03',105),
    ('Tablets','W01','FY14W01',34),
    ('Tablets','W01','FY15W01',46),
    ('Tablets','W02','FY14W02',49),
    ('Tablets','W02','FY15W02',96),
    ('Tablets','W03','FY14W03',42),
    ('Tablets','W03','FY15W03',113)
    2. Add the custom code in the Report Properties.
    Public Shared Value1 as Integer
    Public Shared Value2 as Integer
    Public Shared previous as string
    Public Shared previousweek as string
    Public Shared Function GetValue(Value as Integer,product as String,Week as String) as Integer
    If Value=Nothing Then
    Value=0
    End If
    If product =previous and Week =previousweek Then
    Value2=Value
    Else
    previous=product
    previousweek=Week
    Value1=Value
    End If
    return Value
    End Function
    Public Shared Function GetPct()
    If Value1=0 Then
    return 0
    Else
    return (Value2-Value1)/Value1
    End If
    End Function
    Public Shared Function GetDiff()
    return Value2-Value1
    End Function
    3. Design the matrix like below.
    4. Then get the expected results.<o:p></o:p>
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • How to calculate percentage and difference of two values in matrix report in ssrs 2008

    Hi everyone,
    DB--SQL server
    SSRS-2008
    I am creating matrix report with grouping on WEEK and Fiscalyearweek,
    I need to calculate of difference between FY14W01,FY15W01 ande  percentage of those..
    how to calculate in ssrs level.
    Thank You, Manasa.V

    Hi veerapaneni,
    According to your description, you want to calculated the increment percentage and difference between two fiscal year week within each week. Right?
    In this scenario, since we need to do calculation based on values between dynamically generated cells, we can't simply use expression to achieve this goal. In this scenario, we need to use custom code to record the value for fiscal 14 and fiscal 15, then
    we can calculate the difference and percentage within the column group. We have tested your case in our local environment, please refer to the steps and screenshots below:
    1. Add the custom code below into the report (you may need to modify the data type based on your scenario:
    Public Shared Value1 as Integer
    Public Shared Value2 as Integer
    Public Shared previous as string
    Public Shared previousweek as string
      Public Shared Function GetValue(Value as Integer,product as String,Week as String) as Integer
    If product =previous and Week =previousweek  Then
         Value2=Value
    Else
    previous=product
    previousweek=Week
    Value1=Value
    End If
         return Value
      End Function
      Public Shared Function GetPct()
         return (Value2-Value1)/Value1
      End Function
    Public Shared Function GetDiff()
         return Value2-Value1
      End Function
    2. Design the matrix like below:
    3. The result look like below:
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • How to calculate interest and tds

    friends,
    we have one asset where it is provided by our business partner. every month we have to pay interest based on the mail received from business partner. my query is how to post this interest in the system, how to calculate the tds on this,
    regards,

    Hi Subramaniyan,
       1. You need to configure interest calculation all the steps.
    http://www.sap-basis-abap.com/sapfj001.htm
    or
    OB46 - Interest Settlement Calculation Type
    Int Calc. Type
    P - calculate interest based on line items.
    S - calculate interest based on account balances.
    Secornd, make it avaliable to the interest run program.
    OB82 - Interest Terms
    Third, determine the interest rate that will be used by the calculation.
    OBAC - Define Reference Interest Rates
    OB83 - Enter the Reference Interest Rates Value
    Fourth, assign the interest indicator to the reference interest rate.
    OB81 - Define Time Dependent Terms
    Finally, determine the how and to which accounts the interest program will post.
    OBV1 - Prepare Interest on Arrears Calculation F.26    A/R: Balance Interest Calculation
       2. Create Recurring Entries.  fbd1
    http://help.sap.com/saphelp_46c/helpdata/EN/6e/1218df9f0411d189b80000e829fbbd/content.htm
      3.  Process Batch Input   sm35
    Regards,
    Srinivas Muthyala

  • How to calculate Date and Days

    Hi BW Experts,
    I have requirement, I have field original GI Date and  it is calculating based on 'Original promise date'-'Transport time'. Formula is 'Original GI Date' = 'Original promise date'-'Transport time'.
    We are getting data for original promise date as Date format and  Transport time as Days (ex: 1 or 2 days).
    Here, how can I convert into Date or how can I calculate Date and Days. I am working on BW3.5 .
    Please help me how can I overcome this requirement.
    Points will be assign.
    regards
    Yedu.

    Hi Ventatesh
    It's not a problem
    You can subtract days from date to get the resultant date
    Original Promise time  =  GI Date  - Transit time ( in days)
    Add Original Promise Time in your data target and fill that up with the above rule.
    If the above is not working you can use this function module
    DATE_IN_FUTURE
    Here you need to pass Date and Days to get future date. Only trick you need to apply that if the transit days is 5 days, you pass -5 to this function module.
    But this function module is not available in BW system. Just copy the code from ECC system and create a Z FM for BW system
    Regards
    Anindya
    Edited by: Anindya Bose on Feb 9, 2012 4:36 AM

  • How to calculate subtol and total values in alv.

    Hi expert,
    I want to calculate the subtol and total values in alv as follows,
    example:
       month:    Jan      Fer      Mar    Apr
                      -50       -30      40      -10
                      -20       -13      -12     -10
    subtotal      -70       -43      28      -20
                      -10       -10      -10     -10
                      -10       -31      -15     -10
    subtotal      -20       -41      -25     -20
    total           -90       -84       3       -40
    when i put '-' in front of the month,i define the month type c,
    and when the type is c,it cann't calculate the subtotals and totals.
    how can i do can make the layout like the example.
    thanks...
    Edited by: Heum Kim on Aug 25, 2008 3:54 AM

    The below code is not generic one. I am just looking for generic one. You try to fix it using the similiar approach.
    REPORT  ZTEST_ALV_DEC.
    data: fcat type lvc_s_fcat,
          tfcat type lvc_t_fcat.
    data: begin of itab occurs 0,
          carrid(10),
          quan type DEC_16_02_S,
          end of itab.
          itab-carrid = 'AA'.
          itab-quan = '-10000.00'.
          append itab.
    fcat-fieldname = 'QUAN'.
    fcat-tabname = 'ITAB'.
    fcat-decimals_o = 2.
    fcat-edit_mask = 'V__,___.__'.  "This is not generic
    append fcat to tfcat.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
    EXPORTING
       I_CALLBACK_PROGRAM                = sy-repid
       IT_FIELDCAT_LVC                   = tfcat
      TABLES
        t_outtab                          = itab
    EXCEPTIONS
       PROGRAM_ERROR                     = 1

  • How to calculate freight in stock transfer order.

    Hi,
    While doing stock transfer order ,the freight value is coming zero.
    In VA01 we created stock transfer order.
    we checked price in conditions in stock transfer order.PR00 is not maintained,
    while saving the document its throwing error freight value is zero.
    Please tell me ,what is the procedure to calculate the freight value.

    Hi,
    It all depends on how you want the freight to be calculated (Eg: Volume based, Weight based etc.). Please share the business requirement.
    Regards

  • How to calculate opening and closing balance for period

    Hi all,
    i have to find out opening and closing balance.
    the table structure of temporary table is
    select * from hwcn_xn_fa_report_temp1 where asset_id=10029400
    PERIOD_COUNTER CST_OP_BAL CST_ADDITION CST_TRANSFER CST_DISPOSAL COST_CLOSING_BALANCE
    24108 0 0 0
    24109 12000
    24110 0 0 0
    24111 0 0 0
    in this table cst_op_balnce and cost_closing_balace is null
    i have display cost_op_bal and cost_closing_balnce
    cost_closing_balance=cst_op_bal+cst_addition+cst_transfer+cst_disposal
    for period 2408 op_balnce=0 closing_bal=0
    for period 2409 op_balnce=0 closing_balce=1200
    for period 2410 op_bal=1200 closing_bal=1200
    closing balance of dec will be opening bal of jan
    thanks and regards
    Edited by: user10664276 on Apr 19, 2009 11:08 PM
    Edited by: user10664276 on Apr 19, 2009 11:13 PM

    Hi,
    user11118871 wrote:
    Can you explain what that is? Thank you if you have one example.
    ROWS BETWEEN  UNBOUNDED PRECEDING AND 1 PRECEDING
    When you use the analytic SUM (c) function, then, on each row, it returns the values of column (or expression) c from several rows in the result set added together.
    Which rows? That depends.
    If the analytic clause (the part in parentheses after OVER) does not include ORDER BY, then it is all rows.
    If the analytic clause has an ORDER BY clause, but no windowing clause (that is, ROWS BETWEEN ... or RANGE BETWEEN ...), then the rows included in the sum are all rows up to and including the row where the function is being called (as sorted by the analytic ORDER BY).
    If the analytic cluase has both ORDER BY and a windowing clause "ROWS BETWEEN x PRECEDING AND y PRECEDING", then the rows included in the sum are the rows from x to y rows before the one where the function is called.
    Do some experiments with different values of x and y.
    First, create a table like the one in the problem above, but simplified a little.
    CREATE TABLE     test_sum
    (      period     NUMBER
    ,      new_amt     NUMBER
    INSERT INTO test_sum (period, new_amt) VALUES (24108,     1);
    INSERT INTO test_sum (period, new_amt) VALUES (24109,     4);
    INSERT INTO test_sum (period, new_amt) VALUES (24110,     2);
    INSERT INTO test_sum (period, new_amt) VALUES (24111,     8);
    INSERT INTO test_sum (period, new_amt) VALUES (25001,     32);
    INSERT INTO test_sum (period, new_amt) VALUES (25002,     16);
    COMMIT;The original problem above used names that were meaningful for its application, and columns that have nothing to do with the SUM function. Let's simplify the former and lose the latter.
    That problem involved the SUM of three columns added together. Since we just want to understand how the windowing clause works, let's simplify that to one column.
    With these simplifications, my original query is:
    SELECT       period
    ,       new_amt     
    ,       SUM (new_amt) OVER ( ORDER BY          period
                                         ROWS BETWEEN  UNBOUNDED PRECEDING
                                 AND          1            PRECEDING
                        ) AS opening_balance
    ,       SUM (new_amt) OVER ( ORDER BY          period
                        ) AS closing_balance
    FROM       test_sum
    ORDER BY  period;Given the data above, it produces these results:
    .   PERIOD    NEW_AMT OPENING_BALANCE CLOSING_BALANCE
         24108          1                               1
         24109          4               1               5
         24110          2               5               7
         24111          8               7              15
         25001         32              15              47
         25002         16              47              63So, for example, on the row where period=24110,
    opening_balance=5, which is the total of new_amt from all rows up to but not including that row: 5=1+4, and
    closing_balance=7, which is the total of new_amt from all rows up to and including that row: 7=1+4+2.
    To really understand how the windowing clause works, do some experiments. Change the definition of opening_balance to include " BETWEEN x PRECEDING AND y PRECEDING". You'll find that:
    (a) "UNBOUNDED PRECEDING" means the same as "n PRECEDING", where n is greater than the number of rows in your result set.
    (b) "CURRENT ROW" means the same as "0 PRECEDING"
    (c) x must be greater than or equal to y
    (d) neither x nor y can be negative (but you can use "FOLLOWING" instead of "PRECEDING" to get the same effect).
    For more, see the introduction to "Analytic Functions" in the [SQL Language manual|http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/functions001.htm#sthref972]
    When you're finished, don't forget to
    DROP TABLE     test_sum;

  • How to calculate freight equally for all line items

    Hi All
    I have a situation, In a PO i have 4-5 line items and the total freight is 10% on the PO value. I need to distribute the freight value equally to all the line items.
    Your suggestions please
    Regards
    Jagadish

    Hi
    Goto V/06 and make your condition type as header condition and in maintain condition record as 10%
    HEADER condition will not be having ACCESS SEQ
    Regards
    Vishal

Maybe you are looking for

  • All of my apps were deleted from my apple id

    Somewhere between updating my phone, changing my gamecenter email and password, or transferring pictures from my phone to my computer, my apps were deleted from my apple id. I'm not talking about deleted from my phone, I mean from my apple id. I am 1

  • At a loss with my GT70-20C

    Guys I wonder if you could help, I have been trying everything I can think of to fix this issue. I have the GTX770m and I like to play most games with vsync so its smooth and tear free, unfortunately Vsync is just a stuttery mess and unplayable with

  • Project Blue Print Structure in Solar01 Transaction

    Dear All, Is it sure that the Project Structure in the Transaction Solar01 will always be remain same , i.e the structure will be as follows: 1.Organizational Units 2.Master Data 3.Business Scenarios 4.Interface Scenarios And also I want to know that

  • Idvd project won't burn, have I lost my suoerdrive ???

    Hi, firstly I'd just like to say I'm an idiot, here's why I had a large important movie to edit (22gb) in idvd4 on an emac. Did all the work in i movie, sent to idvd but wouldn't burn as I had too little disk space. So I exported from i movie to QT p

  • Concurrent Employment and MSS ( Structural Authorisation)

    Hi We are having some problem with Structural authorisation in case of concurrently employed users. The scenarios is as follows 1. User A is manager and have MSS role and relevant PD profile 2. User P is employee . This employee is concurrently emplo