4 Replies Latest reply on Aug 29, 2018 12:04 PM by Bommi

    AP Invoice Lines DFF default values

    user568657

      Hi All,

       

       

      We have  a requirement to populate the GBP and EUR currency amount in AP Invoice Lines DFF. based on the following calculation.

       

       

      Case1:

       

      If Ap_invoice_currency = 'EUR' then

      GBP/EUR Amount := Ap_invoice_header_exchange_rate * AP_invoice_Line_Amount

      End if;

       

       

       

      Case2:

      If Ap_invoice_currency = 'GBP' then

      GBP/EUR Amount := Ap_invoice_line_amount

      End if;

       

      Exchange rate will be null for GBP currency, hence we needs to display the AP_invoice_line_amount in EUR/GBP_Amount_Field (without exchange rate manipulation)

       

       

      We wrote various sql queries in DFF default value(system administrator--> flexfield-->Descriptive-->segments(Query title with "Invoice Lines")--> open-->Default_Type = SQL Statement, Default value used below mentioned queries) but it was not working for above cases.

       

      Queries 1:

       

      SELECT ((SELECT :LINE_SUM_FOLDER.AMOUNT_DISP FROM DUAL) * DECODE(:INV_SUM_FOLDER.INVOICE_CURRENCY_CODE,'GBP',1,:INV_SUM_FOLDER.EXCHANGE_RATE))  FROM DUAL

       

       

      Queries 2:

      SELECT (DECODE(:$FLEX$.VISA_GBP_CURNCY_CODE,'GBP',:$FLEX$.VISA_INVOICE_LINE_AMT*1,1) * DECODE(:$FLEX$.VISA_GBP_CURNCY_CODE,'EUR',:$FLEX$.VISA_INVOICE_LINE_AMT*1,1)) FROM DUAL

       

       

      Can anyone please help me to solve the issue.