Derive the Currency from Costcenter or Currency

Dear Guru's ,
I Think this problem should be easy to save but I missed something.
I have this scenario:
Table ZCHCOCOST_var
with the following fields:
USERNAME COSTCENTER FROM COSTCENTER TO Local Curr COM CODE
The table ZCHCOCOST_VAR is used to input but the FICO function manually the users that are allowed to plan on the cost centers and with currency relation.
On the planning area I have the following variables
COSTCENT type user exit
CURRENCY type user exit
The user exit has the following code:
DATA: BEGIN OF i_zchcocost_var OCCURS 0.
          INCLUDE STRUCTURE zchcocost_var.
  DATA: END OF i_zchcocost_var.
WHEN 'COSTCENT'.
          SORT i_zchcocost_var BY zchcocost_low.
          DELETE ADJACENT DUPLICATES FROM i_zchcocost_var
          COMPARING zchcocost_low.
          LOOP AT i_zchcocost_var.
            ADD 1 TO count.
            CLEAR: ls_charsel.
            ls_charsel-chanm = 'ZCHCOCOST'.
            ls_charsel-seqno = count.
            ls_charsel-sign  = 'I'.
            IF i_zchcocost_var-zchcocost_high EQ space.
              ls_charsel-opt   = 'EQ'.
              ls_charsel-low   = i_zchcocost_var-zchcocost_low.
            ELSE.
              ls_charsel-opt   = 'BT'.
              ls_charsel-low   = i_zchcocost_var-zchcocost_low.
              ls_charsel-high  = i_zchcocost_var-zchcocost_high.
            ENDIF.
            INSERT ls_charsel INTO TABLE eto_charsel.
          ENDLOOP.
  SEM-BPS Currency variable
        WHEN 'CURRENCY'.
          SORT i_zchcocost_var BY curkey_lc.
          DELETE ADJACENT DUPLICATES FROM i_zchcocost_var
          COMPARING curkey_lc.
          LOOP AT i_zchcocost_var.
            ADD 1 TO count.
            CLEAR: ls_charsel.
            ls_charsel-chanm = '0CURKEY_LC'.
            ls_charsel-seqno = count.
            ls_charsel-sign  = 'I'.
            ls_charsel-opt   = 'EQ'.
            ls_charsel-low   = i_zchcocost_var-curkey_lc.
            INSERT ls_charsel INTO TABLE eto_charsel.
          ENDLOOP.
  SEM-BPS Company code variable
        WHEN 'COMPCODE'.
          SORT i_zchcocost_var BY comp_code.
          DELETE ADJACENT DUPLICATES FROM i_zchcocost_var
          COMPARING comp_code.
          LOOP AT i_zchcocost_var.
            ADD 1 TO count.
            CLEAR: ls_charsel.
            ls_charsel-chanm = '0COMP_CODE'.
            ls_charsel-seqno = count.
            ls_charsel-sign  = 'I'.
            ls_charsel-opt   = 'EQ'.
            ls_charsel-low   = i_zchcocost_var-comp_code.
            INSERT ls_charsel INTO TABLE eto_charsel.
          ENDLOOP.
      ENDCASE.
The planning level has the following structure:
ASML Cost center               COSTCENT
Local currency               CURRENCY
When I run the layout the popup is coming to choose the values from costcenter and currency.
The program behind the variables is creating i_zchcocost_var that for example has the following values
Costcenter     Currency
100000     EUR
200000     USD
The problem is that the system can choose the wrong combination:
Costcenter Currency
100000          USD
Is there some idea how to avoid this issue?
Thanks in advance
Frank

Frank,
Here is an example. I have tried to keep it simple. You might have to modify it to suit your exact requirement.
  Tables: upc_var_cha_act, /bi0/mcostcenter.
  DATA: cur1(3) type c,
        cc1 type /bi0/mcostcenter-costcenter.
Derive values for currency
  if i_variable = 'YOUR VARIABLE FOR CURRENCY'.
  clear cur1.
    select single * from upc_var_cha_act where
     area = 'YOUR PLANNING AREA' and var = ' YOUR COST CENTER VARIABLE' and varuser = sy-uname.
    if sy-subrc = 0.
      cc1 = upc_var_cha_act-low.
    ENDIF.
derive curr
    select single * from /bi0/mcostcenter where
      costcenter = cc1 and "ADD ANYOTHER RESTRICTION AS REQUIRED".
    if sy-subrc = 0.  
      cur1 = /bi0/mcostcenter-obj_curr. 
      t_valuline-chanm = 'YOUR VARIABLE FOR CURRENCY'.
      t_valuline-seqno = '0001'.
      t_valuline-sign = 'I'.
      t_valuline-opt = 'EQ'.
      t_valuline-low = cur1.
      INSERT t_valuline INTO TABLE eto_charsel.
    endif.
  endif.
As mentioned use this as a reference to build the user exit specific for your need.
Hope this helps.
Sunil

Similar Messages

  • How to derive the UDID from serial number

    I would like to be able to get the UDID of an iPad without opening the box. Is there a way to do this?

    I can't see how it would be possible. If the UDID is in any way derived from the serial number, which I doubt, Apple has not (and almost certainly never will) document the algorithm publicly.
    Regards.

  • Can we translate currency from Non LC to any RptCurrency

    Hi All
    we are working on BPC 7.0 SP05.
    Can we traslate currency from Non local currency to any other reporting currency
    For Ex: Translating from EUR to USD . Where EUR is not the LC ( i mean its the Currency_type proper for that Entity)
    We can translate currency from Local to any Rptcurrency/ Group currency.
    thanks in advance
    AK

    Hi AK,
    Well, that is certainly an interesting situation!
    You can find the currency conversion code under package UJ in SE80. It is under the "Table Driven Logic" sub-package (which I think is UJT, but I don't really remember). If you put a breakpoint in the currency conversion code and maintain the debug user mappings on the .NET server, you should be able to debug.
    However, you can configure this scenario using the normal currency conversion business rules, at least if you only have one reporting currency. It would involve using a different rate type for expense accounts (AVGEXP, perhaps, rather than just AVG), then maintaining currency conversion business rules for AVGEXP that dictate that the LC value should be copied to the reporting currency value directly (COPY_LC) rather than multiplied by the avg rate (AVG).
    If this situation is not the case for all entities, you can use the FX Type property of the entity to allow you to maintain one set of rules for normal entities where both sales and expenses are recorded in LC and another set of rules for entities where this situation occurs.
    Alternatively, you could maintain AVGEXP rate type accounts with the AS_IS rule and then simply load the expense values directly into the reporting currencies. These accounts will then not be translated. If you want to translate USD to EUR for just these accounts (for example), you could do this with a script logic and LOOKUPs into the rate cube.
    Hope that helps,
    Ethan

  • Credit From AdvCollection does not do the Accounting from AutoAccounting

    We are using AutoInvoice to import invoices from legacy system.
    During the import we have the AutoAccounting set to derive the gl accounts
    from the Transaction Type (which is set to a Suspense account
    so that the invoices do not post to the GL again as they have already been posted on legacy system).
    After the imports the invoices, we are chaning the AutoAccounting to derive the gl accounts using the
    Inventory Item.
    We have the profile option, AR: Use Invoice Accounting For Credit Memos set to NO.
    Tried setting this profile option both at the SITE level and application (RECEIVABLES and COLLECTION) level to NO.
    We create a credit memo in Advanced Collections which works fine.
    The problem is that the credit memo is not deriving the accounting from AutoAccounting, it is deriving from the invoice.
    Note : A manual credit created from Receivable is using the accounting from auto accounting. Only when the credit is created from collection it is not using the auto accouting rules.
    How do we make the credits created from Advanced Collection use the accounting from AutoAccounting and not from the INVOICE.
    Thanks
    Shandrila
    Edited by: Shandrila on Oct 4, 2009 3:25 PM

    I have got a solution from Oracle via a patch which solved the issue.
    - Shandrila

  • COPA - Deriving the values

    Hi Friends,
    I need to derive the commision from the revenue value field but only in case of one type of order type. So, in case of order type "A", I want commission to be equal to 10% of VVREV. I need that in the profitability document itself and not in a Report from COPA.
    Can some one tell me what all will I need for it.
    thanks in advance

    Hi,
    You can carry out some sort of derivation for value fields using cost cheets and condition types (8KEV) in CO-PA itself.  You create a condition type which is a percentage of the SD revenue condition type.  You then assign this condition type to a value field (KE45).  However as standard you have no provision for limiting it based on a characteristic.  I am sure you can use substitution for limiting the population of the condition.  This will be a bit messy.
    If you have the order type in the field catalog, then you can also create a condition table with access based on order type.  This will work very well, but usually order type is not a field that is usually in the field catalog.
    I would suggest that you get the condition created in SD and limit its population in SD using a routine.
    Then you can assign this condition in CO-PA.
    Cheers.

  • Error while deriving the currency from table

    i am getting the below error while simulating the payroll for india.
    Error while deriving the currency from table T001P & Error during Initialization of payroll.
    i am SAP HCM Trainee.. practicing at home.

    Pls check the currency in table T500C.
    You can use TCode OE00 for table maintenance T500C.
    Also check whether currency is there in table V_CURC and T510.
    Hope this will help.
    Regards
    Ghouse

  • Error while deriving the currency from table T001P.

    Hi Friends,
    I am trying to run payroll for NZ using schema NZ00 but i am getting an error stating "Error while deriving the currency from table T001P. Error during initialization of Payroll"
    I have checked V_T001P, V_T001 and have deleted the personnel area and subarea and again created it but still i am unable to solve this problem.
    Could you please help me as to where this error can be corrected.
    Thanks,
    Manj

    About the incidence, the problem might be related to the links between
    personnel area, company code and currency set up (table T001P, T500P and
    T001).
    Please check the following points:
    1- Have you assigned the Personnel area to the Company code under SPRO -
    IMG -> Enterprise Structure -> Assignment -> Human Resource Management
    -> Assignment of Personnel Area to Company Code.
    2- SPRO -> Personnel Management -> Personnel Admin -> Basic Settings ->
    Determine Currencies (Public Sector Currency Need to be maintained along
    with the other node).
    3- SPRO- Personnel Management -> Personnel Admin -> Payroll Data ->
    Basic Pay -> Define Hourly Rates for several decimal places. (Please
    maintain all the nodes).
    4- Maintaining the table t500c through transaction code OE00.
    Regards
    Ramana

  • Error while deriving currency from table T001P

    Hi All,
    Error while deriving currency from table T001P
    I am getting this error while payroll run by using country GRP=99 in SU2 for Non-SAP supported country.
    I assigned country grouping as 99 in V_T500P table while assigning comp code to personnel area.
    The company code is assigned with BD as country key in configuration and currency as BDT.
    Referring previous links for the same error I checked all concerned tables and maintained correctly.
    What will be the probable reason of this error?

    Hi,
    I had the exact same problem a while back. The problem was that in V_T001 I had a different comp code which was either assigned to the same country  that had a blank currency  or assigned to the same currency but was missing the country. It was a different comp code than the one I was running payroll for so it took a long time to find the cause - I'll bet this is what's causing your error. 
    Rgds,
    Kristopher

  • The account has been changed from only local currency to multiple currency.

    hI,
    The customer has an Account "X" which is a balance sheet account. and not a reconciliation account.
    this account has been changed on November 11, 2008, from only local currency to multiple currency.
    Local currency is ZAR, and document currency is EUR.
    i.e, the check box 'only balance in local balance' has been unchecked from 11 Nov, 2008.
    so, when i see the balance of this account in FS10N.
    the balances in currency ZAR and EUR is different.
    because the balance which is in EUR is only for months 11 and 12.
    so, questions are...
    1) can we make it same balance in both the currencies by posting a document only in EUR?
    2) how to clear it?
    Regards,
    Swetha

    The balance in the currency (EUR) depends upon the currency exchange rates you have defined in the system.  When you post a document in another currency, the exchange rate mentioned for the currency pairs (ZAR & EUR for example) is applied and the balance is written in your local currency.  If you want that the balances in difference currencies are the same, then the exchange rates should be the same for all relevant pairs of currencies.

  • Trip Currency from the Scheme (TRIP, PR05)

    Hi,
    In Travel Management (FI-TV), i need to determine the currency of travel from the Scheme,
    National in local currency and international (all countries) with fixed currency (USD), I searched Exits however I find how
    to achieve.
    Tks,
    RAO

    Hi.
    I resolved to as follows: Travel Expenses > Master Data > Control Parameters for Travel Expenses > Define Global Settings in the option Settlement of Foreing Currency Repeits select Choose Between Trip Currency and Hard Currency per Receipt, This releases the two currency fields in the advance and so I can indicate manually that the currency is Dollars or currency of the Company.
    Now I can do is a validation to not allow the indication of a currency different from the dollar in the international scheme, it is easier to place it automatically currency in transactions TRIP, PR05 or PR03.
    Thank both for your help.
    RAO

  • Error FI/CO interface: Balance in transaction currency from BAPI BAPI_ACC_DOCUMENT_POST

    Hi All,
    We are facing error FI/CO interface: Balance in transaction currency from BAPI BAPI_ACC_DOCUMENT_POST.
    This error we are getting only in case of passing tax data.
    Can anyone help me on this.
    Below is the code :
       *fill header
    gd_documentheader-username   =  sy-uname.
    gd_documentheader-header_txt = 'Test'.
    gd_documentheader-comp_code  = p_ccode.   "SQ
    gd_documentheader-doc_date   =  sy-datum.
    gd_documentheader-pstng_date =  sy-datum.
    gd_documentheader-doc_type   = 'KR'.
    gd_documentheader-ref_doc_no = p_xblnr. "SQ
    *gd_documentheader-bus_act = 'RMWE'.
    city = p_city.
    state = p_state.
    zipcode = p_zip.
    *get tax juridisction code
    IF NOT ( city     IS INITIAL ) AND
       NOT ( state    IS INITIAL ) AND
       NOT ( zipcode IS INITIAL ).
      SELECT SINGLE rfcdest INTO ttxd-rfcdest FROM ttxd
       WHERE kalsm = 'TAXUSX'.
      CLEAR x_com_jur.
      REFRESH t_com_jur.
      x_com_jur-city     =  city.
      x_com_jur-state    =  state.
      IF zipcode+5(4) EQ space.
        zipcode+5(4) = '0000'.
      ENDIF.
      CONCATENATE zipcode+0(5) '-' zipcode+5(4)
             INTO x_com_jur-zipcode.
      x_com_jur-country  = 'US'.
      CALL FUNCTION 'RFC_DETERMINE_JURISDICTION'
        DESTINATION ttxd-rfcdest
        EXPORTING
          location_data    = x_com_jur
        IMPORTING
          location_err     = x_com_err
        TABLES
          location_results = t_com_jur.
      IF sy-subrc = 0.
        READ TABLE t_com_jur INTO x_com_jur INDEX 1.
        it_accountgl-taxjurcode =  x_com_jur-txjcd.
      ENDIF.
    ENDIF.
    *fill AP (line 1) - vendor related data
    SELECT SINGLE zterm FROM lfb1 INTO p_zterm WHERE lifnr = p_lifnr.
    it_accountpayable-itemno_acc = 1.
    it_accountpayable-tax_code = p_txcd.
    it_accountpayable-pmnttrms   = p_zterm. "SQ
    it_accountpayable-vendor_no  = p_lifnr. "SQ
    *it_accountpayable-item_text = 'S2P Testing in UDR1'. - SQ
    it_accountpayable-pymt_meth = p_pmet. "- SQ
    APPEND it_accountpayable.
    *fill GL (line 2)
    it_accountgl-itemno_acc      =  2.
    *item_text - sq
    IF p_asset IS NOT INITIAL.
      TABLES : anlz,
               anla.
      SELECT SINGLE * FROM anlz  WHERE anln1 = p_asset.
      SELECT SINGLE * FROM anla WHERE anln1 = p_asset.
    *concatenate '00' anla-KTOGR into it_accountgl-gl_account .
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = anla-ktogr
        IMPORTING
          output = it_accountgl-gl_account.
      it_accountgl-asset_no = p_asset.
      it_accountgl-sub_number = '0000'.
      it_accountgl-cs_trans_t = '105'.
      it_accountgl-acct_type = 'A'.
    ELSE.
      it_accountgl-gl_account      = p_gl.
      it_accountgl-costcenter      = p_cc.
      it_accountgl-wbs_element     = p_posid.
    ENDIF.
    it_accountgl-comp_code       = p_ccode.
    it_accountgl-tax_code = p_txcd.  "SQ
    it_accountgl-pstng_date      =  sy-datum.
    it_accountgl-fisc_year       =  sy-datum(4).
    APPEND it_accountgl.
    CLEAR it_currencyamount.
    *fill currency ammounts for lines 1 & 2
    it_currencyamount-currency    = p_waers.  "SQ
    it_currencyamount-itemno_acc  = 1.
    *it_currencyamount-amt_base =  -1.
    it_currencyamount-amt_doccur  = - 116. "p_totamt.
    it_currencyamount-CURRENCY_ISO = 'USD'.
    it_currencyamount-tax_amt  = - 16.
    APPEND it_currencyamount.
    CLEAR it_currencyamount.
    it_currencyamount-itemno_acc  = 2.
    it_currencyamount-currency    = p_waers.  "SQ
    it_currencyamount-amt_doccur  = 100.
    it_currencyamount-CURRENCY_ISO = 'USD'.
    *it_currencyamount-amt_base =  100.
    *it_currencyamount-TAX_AMT =  -10.
    APPEND it_currencyamount.
    *tax data
    it_accounttax-itemno_acc = 3.
    it_accounttax-tax_code = p_txcd.
    it_accounttax-gl_account = '0023110000'.
    *it_accounttax-gl_account = p_gl.
    it_accounttax-TAXJURCODE = x_com_jur-txjcd.
    it_accounttax-acct_key = 'NVV'.
    it_accounttax-cond_key = 'XP2I'.
    **it_accounttax-direct_tax = 'X'.
    APPEND it_accounttax.
    CLEAR it_currencyamount.
    it_currencyamount-itemno_acc  = 3.
    it_currencyamount-currency    = p_waers.  "SQ
    it_currencyamount-amt_doccur  = 16.
    it_currencyamount-CURRENCY_ISO = 'USD'.
    it_currencyamount-amt_base =  100.
    it_currencyamount-TAX_AMT =  - 16  .
    APPEND it_currencyamount.
       CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
      EXPORTING
        documentheader          = gd_documentheader
    IMPORTING
       obj_key                 = wa_obj_key
      TABLES
       accountgl               = it_accountgl
    *   ACCOUNTRECEIVABLE       =
       accountpayable          = it_accountpayable
       accounttax              = it_accounttax
        currencyamount          = it_currencyamount
    *   CRITERIA                =
    *   VALUEFIELD              =
    *   EXTENSION1              =
        return                  =  it_return
    COMMIT WORK.
    Regards,
    Priyaranjan

    Hi,
    Reason 1:
    An revenue-recognition-relevant item has several active conditions whose values cancel themselves so that a net item value of 0 results. The conditions have both the same revenue account (SAKN1) and the same clearing account (SAKN2).
    For these conditions, the system writes a line with value 0 into the temporary FI/CO interface (internal tables: CACCIT, CACCCR). If table VBREVK does not contain control lines for this line, no further processing occurs and the line remains in the temporary FI/CO interface. Then the system reads this line for the creation of the next billing item which conatins a net value and generates a posting line with value 0. As a result, there is a balance in the FI/CO interface, and the billing document cannot be transferred.
    Reason 2:
    The billing document contains at least one item with an item category for which there is a setting stipulating that the values of this item should not be transferred to the header total of the document.
    That is, in the maintenance of the item categories, this item category has the characteristic 'X' or 'Y' in 'Statistical value' field.
    Reason 3:
    Case: Billing document contains items without pricing conditions.
    Then, on release to accounting, error RW022 occurs.
    regards,
    Saju.S

  • Currency translation - not picking up currencies from master data

    Hi,
    We have a currency translation defined for a key figure. We've defined a variable for users to select target currency. 0currency is set to pick up from master data, but the input help on the variable is only showing currencies from infoprovider. I debugged the query and it is trying to get the currencies from the cube. Any setting that I do or update?
    We're using BW 7.3 SP10 on HANA.
    Sonni

    HI
    Once check in the BEx tab of that IO, there select the f4 option.
    Regards,
    Sunil.

  • Decimal places in currencies from flat files

    Hi experts,
    I am facing a problem in the way BI is managing decimal places when I extract them from tex files. I have read a lot of post and make a lot of changes and the problem persits. Here is my problem. I am uploading data from text files. These files come from 6 different source systems. All developments are already in production so changing the way they send the data it would be the most expensive solution at this point.
    For all currencies ratios I receive in the file  could contain these 3 kind of values:
    5.45
    3.2
    4
    Decimal indicator is "." but it is not always present and sometimes is follow 1 decimal pla or 2, which is ogial to expect depending of the nature of the value. I haven't been able to make it work for all the cases.
    I have set "." in RSCUSTV1 as decimal separator. I tried number format "direct entry" in the extraction Tab of data source. I have tried all possible combinations in the tab fields with data type CURR, DEC, even CHAR and Internal or External format, and any configuration I have made works only for some cases and not for the others. I don't know what else I can look at. Your help will be highly appreciated and rewarded with points.
    Regards,
    Raimundo Alvarez

    HI guys and Thanks for your help.
    I could solve my problem. There were some issues already fixed (a combination of the external property in the tab fields, the configuration for decimal separator and a problem with the currency). The main one was giving me the headache that I am trying to import a currency but I was not receiving the currency from the source because is always the same (Colombian Pesos). This one has an special configuration in table TCURX that was making the decimal places be wrong. I solved requesting the currency from the source even if it was a constant value.
    Thanks for your help,
    Rai.

  • Why does my system currency Aging Summery in my Query  not tie to the BP aging in System Currency

    This query works but why does the amount not tie by account in System Currency from the BP. The amounts are off slightly and I am wondering if I am missing something in my query. This same query in local currency ties to the BP but when I did it in USD it does not tie. Best Danielle SELECT CardCode, CardName, PymntGroup, SUM(Balance) BALANCE, SUM(A) FUTURE, SUM(B) '0-30', SUM(C) '31-60', SUM(D) '61-90', SUM(E) '91-120', SUM(F) '121+' FROM ( SELECT T1.CardCode, T1.CardName, T2.[PymntGroup], T0.RefDate, T0.Ref1 'Document_Number',     CASE  WHEN T0.TransType=13 THEN 'Invoice'           WHEN T0.TransType=14 THEN 'Credit Note'           WHEN T0.TransType=30 THEN 'Journal'           WHEN T0.TransType=24 THEN 'Receipt'           END AS 'Document_Type',     T0.DueDate, (T0. [BalScDeb]- T0.[BalScCred]) 'Balance'     ,ISNULL((SELECT T0.[SYSDeb] - T0.[SYSCred] WHERE DateDiff(day, T0.DueDate, getdate())=0 and DateDiff(day, T0.DueDate,getdate())30 and DateDiff(day, T0.DueDate,getdate())60 and DateDiff(day, T0.DueDate,getdate())90 and DateDiff(day, T0.DueDate,getdate())=121),0) 'F' FROM JDT1 T0 INNER JOIN OCRD T1 ON T0.ShortName = T1.CardCode Left outer join  OCTG T2 On T1.GroupNum = T2.GroupNum WHERE  T1.CardType = 'C'  and BalSccred + balscdeb <>0 ) T100 GROUP BY CARDCODE, CARDNAME, PymntGroup ORDER BY CARDCODE

    Try This
    SELECT CardCode, CardName, PymntGroup, SUM(Balance) BALANCE, SUM(A) FUTURE, SUM(B) '0-30', SUM(C) '31-60',
    SUM(D) '61-90', SUM(E) '91-120', SUM(F) '121+',Rmk FROM ( SELECT T1.CardCode, T1.CardName, T2.[PymntGroup], T0.RefDate, T0.Ref1 'Document_Number',
        CASE  WHEN T0.TransType=13 THEN 'Invoice'           WHEN T0.TransType=14 THEN 'Credit Note'    
          WHEN T0.TransType=30 THEN 'Journal'           WHEN T0.TransType=24 THEN 'Receipt'     
          END AS 'Document_Type',     T0.DueDate,  (T0. [BalScDeb]- T0.[BalScCred]) 'Balance'     ,
    CAST(T1. [Free_Text]  as varchar(250)) as Rmk,
      ISNULL((SELECT T0.[SYSDeb] - T0.[SYSCred] WHERE DateDiff(day, T0.DueDate, getdate())=0) ,0)  as A,
      ISNULL((SELECT T0.[SYSDeb] - T0.[SYSCred] WHERE  DateDiff(day, T0.DueDate,getdate())between 1 and 30 ),0 )as B,
      ISNULL((SELECT T0.[SYSDeb] - T0.[SYSCred] WHERE  DateDiff(day, T0.DueDate,getdate())between 31 and 60 ),0) as c,
      ISNULL((SELECT T0.[SYSDeb] - T0.[SYSCred] WHERE DateDiff(day, T0.DueDate,getdate()) between 61 and 90  ) ,0) as d ,
      ISNULL((SELECT T0.[SYSDeb] - T0.[SYSCred] WHERE DateDiff(day, T0.DueDate,getdate()) between 91 and 120 ),0)as e,
       ISNULL((SELECT T0.[SYSDeb] - T0.[SYSCred] WHERE DateDiff(day, T0.DueDate,getdate()) > 120 ),0)as f
      FROM JDT1 T0 INNER JOIN OCRD T1 ON T0.ShortName = T1.CardCode
    Left outer join  OCTG T2 On T1.GroupNum = T2.GroupNum WHERE  T1.CardType = 'C' ) T100 GROUP BY CARDCODE,
    CARDNAME, PymntGroup,Rmk ORDER BY CARDCODE
    Regards,
    Kennedy

  • Increasing currency from 2 to 3 decimal points

    Dear all,
    I would like to know how to make the currency view in the expense report increased from 2 to 3 decimal points as km/miles rate we have here is $0.335  per mile.  Also the USD is used for 5 other countries.  As of now it is showing as 0.34, however this is a manipulation of actual data, Ex. for 10 kms it shows rate 0.34 x miles 10 = $3.35.
    Any quick response would be of great help.
    Regards,
    LN Bhattacharya

    Yes this is a known issue as the problem is, that the USD is a currency with 2 decimals, but government allowes to reimburse 0.375 USD taxfree. The output on the travel form is in a single currency: the USD with 2 decimals. One workaround is to create a currency USDN for the decimilisation to work with 3 places - see the note 446116
    A single expense category like miles per diems is calculated in accounting program RPRTEC00 and stored in one table (PAUFA for miles).
    If currency in T706F (USDN) differs from trip currency (USD), RPRTECC00 converts the amounts from T706F into trip currency (done by FI-function 'CONVERT_TO_LOCAL_CURRENCY'). Amounts in the list are presented in this trip currency but rounding is possible with adjustment in V_T001R as PREC can handle this conversion with factors defined here.
    Hope it helps!
    Thanks
    Sally

Maybe you are looking for