Query to get PO total amount

Hi,
I want to do a query to get PO total value(sum of line item value), how to do that?
In EKPO, it will show PO+Line item value, but the user requirement is to see PO total value under 5000 local currency.
Please help, thanks.

I will try again. For example, I have a table (Payments) that has 5 records. The 5 Payments table records has $24.45 entered all for the same person, Billy Bob that totals $122.25. I have a table (Members) that Billy Bob is one of 10 records. The query:QryTotalAmtDueBy
returns 1 result (record) and it is only for Billy Bob for $122.25 because he is the only one entered in the Payments table. Total Amount Due: Sum([PaymentAmount]-[PPUnionDuesAmountNoDeduct])
When I enter into the control source for text box:
TextBoxTotalAmountDueToDateTab5 the expression: =DLookUp("[Total Amount Due]","[QryTotalAmtDueBy]","[MemberID]=" & [Forms]![Branch 142 Membership]![MemberID]) on the form: Branch 142 Membership. I get the
$122.25 total amount due for Billy Bob and for the remaining 9 records in the
TextBoxTotalAmountDueToDateTab5.
You suggested I try =DLookUp("Total Amount Due","QryTotalAmtDueBy"). I get #Error when I entered it in the text box:
TextBoxTotalAmountDueToDateTab5. I modified what you gave me and entered: =DLookUp("[Total Amount Due]","[QryIndivTotalAmtDueBy]"). I still get the
$122.25 total amount due for Billy Bob and for the remaining 9 records in the Members table.
I don’t care if I use a control source that references the
Total Amount Due from the query QryTotalAmtDueBy or if I use a control source expression that is the sum
of the PaymentAmounts minus the sum of the PPUnionDuesAmountNoDeduct for each record in the Members table. I've tried:
=IIf(IsNull([MemberID]),0,DSum("[PPUnionDuesAmountNoDeduct]-[PaymentAmount]","Payments","[MemberID]=" & [MemberID])). I get nothing for
any record in the Members table.

Similar Messages

  • DLookUp Referencing a Query To Get a Total Amount Owed

    I have a form named: Branch 142 Membership that has a text box named: TextBoxTotalAmountDueToDate. The control source is: =DLookUp("[Total Amount Due]","[QryTotalAmtDueBy]","[MemberID]=" & [Forms]![Branch 142 Membership]![MemberID])
    I'm getting the sum total for all of the records in my database that is the sum for just one member. There's one payment record in the Payments table. Of course when I open the query I get the total for the one payment record.
    I want to get the Sum([PPUnionDuesAmountNoDeduct]-[PaymentAmount]) for each record in the object: TextBoxTotalAmountDueToDate.  If the amount is zero I want the text box to display zero. When I entered =Sum([PPUnionDuesAmountNoDeduct]-[PaymentAmount])
    I got an error in text box.
    Thanks for the help.

    I will try again. For example, I have a table (Payments) that has 5 records. The 5 Payments table records has $24.45 entered all for the same person, Billy Bob that totals $122.25. I have a table (Members) that Billy Bob is one of 10 records. The query:QryTotalAmtDueBy
    returns 1 result (record) and it is only for Billy Bob for $122.25 because he is the only one entered in the Payments table. Total Amount Due: Sum([PaymentAmount]-[PPUnionDuesAmountNoDeduct])
    When I enter into the control source for text box:
    TextBoxTotalAmountDueToDateTab5 the expression: =DLookUp("[Total Amount Due]","[QryTotalAmtDueBy]","[MemberID]=" & [Forms]![Branch 142 Membership]![MemberID]) on the form: Branch 142 Membership. I get the
    $122.25 total amount due for Billy Bob and for the remaining 9 records in the
    TextBoxTotalAmountDueToDateTab5.
    You suggested I try =DLookUp("Total Amount Due","QryTotalAmtDueBy"). I get #Error when I entered it in the text box:
    TextBoxTotalAmountDueToDateTab5. I modified what you gave me and entered: =DLookUp("[Total Amount Due]","[QryIndivTotalAmtDueBy]"). I still get the
    $122.25 total amount due for Billy Bob and for the remaining 9 records in the Members table.
    I don’t care if I use a control source that references the
    Total Amount Due from the query QryTotalAmtDueBy or if I use a control source expression that is the sum
    of the PaymentAmounts minus the sum of the PPUnionDuesAmountNoDeduct for each record in the Members table. I've tried:
    =IIf(IsNull([MemberID]),0,DSum("[PPUnionDuesAmountNoDeduct]-[PaymentAmount]","Payments","[MemberID]=" & [MemberID])). I get nothing for
    any record in the Members table.

  • Query to get the Excise amount and basic amount based on the cst or vat tax

    Dear all,
                       I need a right query to get the basic amount ,excise amount and the tax amount based on the CST or VAT tax rate.The output should be like this,
    VAT
    goods excisabe at 1% - taxable amt(basic+excise for vat 1%)            tax amt
    goods excisable at 4%-   txable amt                                                       tax amt
    CST
    goods excisabe at 1% - taxable amt(basic+excise for CST 1%)            tax amt
    My problem will also be solved..if i am able to get  the basic value from base table OPCH itself............Since am using the PCH1 table to get the total basic amt...the values are duplicating.
    Regards,
    Shyam

    Hi Sowjanya,
    If you're simply trying to place a grand total, use the 'Insert Summary' option.
    Choose the measure field as the 'Field to Summarize' > Choose 'Sum' as the summary operation > Under 'Summary Location' choose 'Grand Total Report Footer'.
    -Abhilash

  • Example query for po headers total amount(including tax amount) from po_headers_all table in  r12

    HI
    there is no such column like po_amount in po_headers_all table then how can i get po total amount(including tax amount) from po_headers_all table  or else tell me how to get data from views  in R12
    As we are using sql developer tool to build queries in our project
    With regards
    siva

    PO line total is not included the tax, to View the tax amount (N) Action-> manage tax
    1) You have to sum up the lines to get the PO total,
      select ph.segment1 po_num, sum ( (pl.unit_price * pl.quantity)) price
        from po_lines_all pl, po_headers_all ph
       where     pl.po_header_id = ph.po_header_id
             and ph.type_lookup_code in ('STANDARD', 'BLANKET')   --Add as per your requirement
    --          and ph.segment1 = '2017'
    --          and ph.org_id = 7852        --Use when you have multiple OU
    group by ph.segment1
    2) To get the tax
    SELECT *
        FROM (  SELECT lines.line_num line_number,
                       lines.item_description line_description,
                       dist.distribution_num dist_number,
                       dist.code_combination_id dist_code_combination_id,
                       NVL (dist.nonrecoverable_tax, 0) nonrecoverable_tax,
                       NVL (dist.recoverable_tax, 0) recoverable_tax,
                         NVL (dist.nonrecoverable_tax, 0)
                       + NVL (dist.recoverable_tax, 0)
                          total_tax,
                       (NVL (dist.req_line_quantity, 0) * NVL (lines.unit_price, 0))
                          amount,
                       dist.org_id,
                       dist.DISTRIBUTION_ID
                  FROM po_requisition_lines_all lines, po_req_distributions_all dist
                 WHERE     lines.requisition_line_id = dist.requisition_line_id
                       AND NVL (lines.cancel_flag, 'N') <> 'Y'
                       AND NVL (lines.modified_by_agent_flag, 'N') = 'N'
    --                   AND lines.requisition_header_id = :1
              ORDER BY lines.line_num, dist.distribution_num) QRSLT
    ORDER BY LINE_NUMBER, DIST_NUMBER
    Join the po_distributions_all, po_lines_all & po_headers_all tables to get the specific value.
    Thanks

  • Query to get the po amount from the pr

    Hi
    how to get the POnumber and PO amount from the Pr number. there are hundred's of PO's raise against the PR's
    and want to know the amount from their PO's to know the avaible fund left with the department.
    Regards
    Arifuddin

    Hi Madhan,
    If you talking abt query to find the total sal of each employee i.e., SAL + CUMSAL then you can use the below query:
    select a.empno,a.ename,a.sal + b.cumsal totalsal from
    emp a, emp b
    where a.empno = b.empno;
    Regards,
    Murali Mohan

  • Get the Total Amount Paid of an A/R Invoice

    Hi to All.,
    Im doing a Report where in i should show the total amount paid in an A/R Invoice
    But my Problem is i dont know what table to get it ..
    thx in advance ..

    Hi!
    Try my query here. I'm using this to get my AR Balance base on the date I enter.
    The table I use here were OITR and ITR1 (table of internal reconciliation).
    SELECT
    T0.DocNum,
    T0.DocDate,
    T0.DocTotal,
    isnull(T3.ReconSum,0) as 'Paid to Date',
    ((T0.[DocTotal]) -isnull(T3.reconsum,0)) Balance
    FROM OINV T0 
    LEFT OUTER JOIN (
    SELECT a1.[SrcObjTyp],sum(isnull(a1.[ReconSum],0)) as 'ReconSum',a1.[SrcObjAbs] from OITR a0 INNER JOIN ITR1 a1 ON a0.ReconNum = a1.ReconNum and (a0.ReconDate < [%0]) and a0.iscard='C'
    GROUP BY a1.[SrcObjTyp],a1.[SrcObjAbs]) T3 on T0.[ObjType]=T3.[SrcObjTyp] and  T0.Docentry=T3.[SrcObjAbs]
    where T0.DocDate < [%0] and T0.DocTotal >0
    Hope this helps!
    Regards,

  • How to get the total amount and hide the field

    Hi Experts,
    In Crystal report parameter screen, user has the option to Mutliselect either Donor or Grant or Donor & Grant; based on that in report output user is expected to see list of Donors with Grand Total. Requirement is not to split Amount by Donor rather need to show list of all Donor in header and Grant Total in Footer.
    For example from the above list if user selected Algeria, Austria, Australia and India each country/Donor contribution  is 150 than expected output will be
    Algeria
    Austria
    Australia
    India
    America
    Grand Total = 600
    please let me know if any one get idea about this requirement.
    Best Regard,
    sowjanya.k

    Hi Sowjanya,
    If you're simply trying to place a grand total, use the 'Insert Summary' option.
    Choose the measure field as the 'Field to Summarize' > Choose 'Sum' as the summary operation > Under 'Summary Location' choose 'Grand Total Report Footer'.
    -Abhilash

  • Getting the total amount n creating extra profit center

    hello folks,
    I am uploading the data for open AR items, in this process..
    I am looping through the AR items internal table and for each one AR item i am taking multiple GL items looping through the GL item internal table internally.
    So here I have to do one more extra thing. I have to take the balance amount of the one AR item BSEG-WRBTR and compare with the sum of the GL items amounts for that particular AR line item and if there is any difference in the amount then with that difference amount i have to create one more extra line GL line item.
    here is the example : let us take the AR item balance amount is 100$ and the for that particular AR item if u have 3 GL line items each one with 30$ balance amounts. Then compare 100 = 303030 and  the difference is 10$. With that 10$ amount i have to create the one more GL line item how to do it can anyone guide me plzzzzzzzzzzzz
    here is my code.......
    FORM FORM_MAIN_LOGIC.
    DATA:BEGIN OF KUNNR1,
         KUNNR TYPE KUNNR,
         ALTKN TYPE ALTKN,
         BUKRS TYPE BUKRS,
         END OF KUNNR1.
    DATA: BEGIN OF IT_EXTENSION OCCURS 0,
            P_EXTENSION TYPE C,
            END OF IT_EXTENSION.
    DATA : LV_WRBTR TYPE WRBTR.
    DATA: BEGIN OF I_PRCTR,
          PRCTR TYPE PRCTR,
          END OF I_PRCTR.
    PERFORM FORM_READ_DATA_ALL.
    LOOP AT I_ARITEM.
        SELECT SINGLE KUNNR FROM KNB1 INTO KUNNR1-KUNNR WHERE ALTKN = I_ARITEM-P_KUNNR and BUKRS = 'U001' .
        IF SY-SUBRC <> 0.
          WA_ERROR-E_KUNNR = I_ARITEM-P_KUNNR.
          WA_ERROR-E_XBLNR = I_ARITEM-P_XBLNR.
          WA_ERROR-E_ERROR = ' CORRESPONDING SAP CUSTOMER NOT FOUND'.
          APPEND WA_ERROR TO IT_ERROR .
          MOVE KUNNR1-KUNNR TO I_ARITEM-P_KUNNR.
          MODIFY I_ARITEM.
        ENDIF.
      CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'
       IMPORTING
         OWN_LOGICAL_SYSTEM                   = WA_DOCUMENTHEADER-OBJ_SYS.
        WA_DOCUMENTHEADER-OBJ_TYPE   = 'IDOC'.
        WA_DOCUMENTHEADER-OBJ_KEY    = I_ARITEM-P_AWKEY.
        WA_DOCUMENTHEADER-USERNAME   = SY-UNAME.
        WA_DOCUMENTHEADER-HEADER_TXT = 'BAPI Test'.
        WA_DOCUMENTHEADER-COMP_CODE  = 'U001'.
        WA_DOCUMENTHEADER-PSTNG_DATE = P_DATE.
        WA_DOCUMENTHEADER-REF_DOC_NO = I_ARITEM-P_XBLNR.
        WA_DOCUMENTHEADER-DOC_DATE = I_ARITEM-P_BLDAT.
        WA_DOCUMENTHEADER-PSTNG_DATE = I_ARITEM-P_BUDAT.
        WA_DOCUMENTHEADER-DOC_TYPE = I_ARITEM-P_BLART.
    fill AR (line 1)
        IT_ACCOUNTRECEIVABLE-ITEMNO_ACC = '1'.
        IT_ACCOUNTRECEIVABLE-CUSTOMER = I_ARITEM-P_KUNNR.
        IT_ACCOUNTRECEIVABLE-REF_KEY_1 = I_ARITEM-P_XREF1.
        IT_ACCOUNTRECEIVABLE-REF_KEY_2 = I_ARITEM-P_XREF2.
        IT_ACCOUNTRECEIVABLE-REF_KEY_3 = I_ARITEM-P_XREF3.
        IT_ACCOUNTRECEIVABLE-PMNTTRMS = I_ARITEM-P_ZTERM.
        IT_ACCOUNTRECEIVABLE-ALLOC_NMBR = I_ARITEM-P_ZUONR.
        IT_ACCOUNTRECEIVABLE-ITEM_TEXT = I_ARITEM-P_SGTXT.
        APPEND IT_ACCOUNTRECEIVABLE.
    fill extension segments.
        it_EXTENSION1-field1+3       = 1.
        it_EXTENSION1-field1+3(18)  = I_ARITEM-P_RSTGR.
        it_EXTENSION1-field1+3(10)       = I_ARITEM-P_WSKTO.
        append IT_EXTENSION1.
        IT_CURRENCYAMOUNT-ITEMNO_ACC   = 1.
        IT_CURRENCYAMOUNT-CURR_TYPE    = '00'.
        IT_CURRENCYAMOUNT-CURRENCY     = 'USD'.
        IT_CURRENCYAMOUNT-AMT_DOCCUR   = I_ARITEM-P_WRBTR.
        APPEND IT_CURRENCYAMOUNT.
    LOOP AT I_GLITEM.
    *******GET THE PROFIT CENTER AND UPDATE THE BAPI STRUCTURE************
    *SELECT SIGLE PRCTR FROM YOCTD_C009_MKDPR INTO I_PRCTR-PRCTR WHERE LEG_MRKT_DIV = I_GLITEM-P_MRDIV AND
                                                                      LEG_SBU = I_GLITEM-P_MRSBU.
    IF SY-SUBRC = 0.
    MOVE I_PRCTR TO I_GLITEM-P_PRCTR.
    MODIFY I_GLITEM.
    ENDIF.
    *IF PROFIT CENTER IS NOT FOUND THEN CREATE A NEW PROFIT CENTER.
    IF SY-SUBRC <> 0.
    I_GLITEM-P_PRCTR = 'P1331193'.
    MODIFY I_GLITEM.
    ENDIF.
    *******CHECK THE ROLL UP GL LINE ITEM AMOUNT WITH AR LINE ITEM AMOUNT.
    GET PROFIT CENTER FOR THE CORRESPONDING MARK DIV AND SBU.
    *SELECT SINGLE PRCTR FROM YOTCD_C009_MKDPR INTO I_GLITEM-PRCRT WHERE LEG_MRKT_DIV = I_GLITEM-MARDIV AND LEG_SBU = I_GLITEM-MRSUB.
      IT_ACCOUNTGL-ITEMNO_ACC     = 2.
      IT_ACCOUNTGL-GL_ACCOUNT     = P_HKONT.
      IT_ACCOUNTGL-ITEM_TEXT      = 'CONVERSION ACCOUNT'.
      IT_ACCOUNTGL-COSTCENTER     = P_KOSTL.
      IT_ACCOUNTGL-PROFIT_CTR     = P_PRCTR.
      APPEND IT_ACCOUNTGL.
    IT_CURRENCYAMOUNT-ITEMNO_ACC   = 2.
    IT_CURRENCYAMOUNT-CURR_TYPE    = '00'.
    IT_CURRENCYAMOUNT-CURRENCY     = P_WAERS.
    IT_CURRENCYAMOUNT-AMT_DOCCUR   = I_GLITEM-P_SAMNT * -1.
    APPEND IT_CURRENCYAMOUNT.
    ENDLOOP.
    PERFORM FORM_CHECK_DATA.
    PERFORM FORM_POST_DATA.
    PERFORM FORM_COMMIT_WORK.
    PERFORM FORM_LONG_TEXT.
    ENDLOOP.
    Please its bit urgent can anyone guide me...........
    SRI

    HELLO guys,
    I tried to write the logic as below.....
    IF I_GLITEM-P_XBLNR = I_ARITEM-P_XBLNR.
    APPEND I_GLITEM TO I_EXTRAGL.
    AT END OF P_XBLNR.
    V_GLBAL = V_GLBAL + I_EXTRAGL-P_SAMNT.
    IF I_ARITEM-P_WRBTR <> V_GLBAL.
    V_DIFBAL = I_ARITEM-P_WRBTR - V_GLBAL.
    ENDIF.
    ENDAT.
    ENDIF.
    Now i got the difference amount into V_DIFBAL... then how to create the extra GL ITEM...
    please can anyone guide me to complete this?
    SRI

  • How to write a query to get the total as a last row

    Hi,
    I need to get something like this ....
    |TEAM LEADER| TEAM | OCT TRN | EMPS| YTD% |
    |_____________|__________|__________|______|_______|
    | JOHN | JD Team | 12 | 12 | 100 |
    |_____________|__________|__________|______|_______|
    | Total |      | 12 | 12 | 100 |
    |_____________|__________|__________|______|_______|
    I have to get the last row as total adding the number columns ...
    Thanks in advance ...

    Take a look at the GROUP BY ROLLUP feature:
    create table t1
    (team_name      varchar2(30)
    ,wins           number
    ,losses         number
    insert into t1 values ('Hornets',3,1);
    insert into t1 values ('Panthers',4,0);
    insert into t1 values ('Wolves',2,2);
    insert into t1 values ('Badgers',0,4);
    insert into t1 values ('Hornets',1,3);
    commit;
    select decode(team_name,
                 NULL,'TOTAL',
                 team_name) team_name, sum(wins), sum(losses)
    from   t1
    group by rollup(team_name);
    TEAM_NAME                                 SUM(WINS)          SUM(LOSSES)
    Badgers                                           0                    4
    Hornets                                           4                    4
    Panthers                                          4                    0
    Wolves                                            2                    2
    TOTAL                                            10                   10

  • How to get the total amount of filtered row in a table view

    I have created filter tables for each columns of my tableview. Now I want to add a row with some totals. For this I use an iterator and implement the RENDER_ROW_START. It is easy to add a new lines knowing the number of expected rows (add the line at the end). But the hic comes when there is a filter. How can I know how many rows I will have in the filtered table. There is no parameters that I found. Not even in an event handler.
    Thanks a lot in advance for your help

    i found the solution, thanks

  • Query to get the total effort Projectwise

    I have the following table
    create table Allocation
      projID varchar(10),
      projName varchar(20),
      associateID number,
      associateName varchar(10),
      allocationStartDate Date,
      allocationEndDate Date,
      allocationPercent number
      PRIMARY KEY(associateID,associateName)
    insert into Allocation values ('123','Mr.A','Prj1','Green Computing','to_date('05/15/2011', 'mm/dd//yyyy')','to_date('07/15/2011', 'mm/dd//yyyy')','50');
    insert into Allocation values ('123','Mr.A','Prj2','Cloud Computing','to_date('05/31/2011', 'mm/dd//yyyy')','to_date('06/30/2011', 'mm/dd//yyyy')','70');
    insert into Allocation values ('1234','Mr.B','Prj1','Green Computing','to_date('06/15/2011', 'mm/dd//yyyy')','to_date('07/31/2011', 'mm/dd//yyyy')','60');
    create table Project
      projID varchar(10),
      projName varchar(20),
      StartDate Date,
      EndDate Date,
      PRIMARY KEY(associateName)
    insert into Project values ('Prj1','Green Computing','to_date('05/01/2011', 'mm/dd//yyyy')','to_date('07/31/2011', 'mm/dd//yyyy')');
    insert into Project values ('Prj2','Cloud Computing','to_date('05/15/2011', 'mm/dd//yyyy')','to_date('08/31/2011', 'mm/dd//yyyy')');I want to select the project wise efforts. i.e. The number of working days multiplied by the 9hrs for each day for all the associates under a project. The result should look something like this
    Project ID     Project Name     Associate ID     Associate Name     Effort
    Prj1             Green Computing     123                Mr.A            100
    Prj1             Green Computing     1234                Mr.B            120Oracle version : 9i 10g/11g

    I have made my attempt at mind reading (to correct for errors in script). Do you mean the following:
    CREATE TABLE Allocation
       associateID           VARCHAR (10),
       associateName         VARCHAR (100),
       projID                VARCHAR (10),
       projName              VARCHAR (20),
       allocationStartDate   DATE,
       allocationEndDate     DATE,
       allocationPercent     NUMBER,
       CONSTRAINT pk_allocation PRIMARY KEY (associateID, ProjID)
    INSERT INTO Allocation
         VALUES ('123',
                 'Mr.A',
                 'Prj1',
                 'Green Computing',
                 TO_DATE ('05/15/2011', 'mm/dd/yyyy'),
                 TO_DATE ('07/15/2011', 'mm/dd/yyyy'),
                 '50');
    INSERT INTO Allocation
         VALUES ('123',
                 'Mr.A',
                 'Prj2',
                 'Cloud Computing',
                 TO_DATE ('05/31/2011', 'mm/dd/yyyy'),
                 TO_DATE ('06/30/2011', 'mm/dd/yyyy'),
                 '70');
    INSERT INTO Allocation
         VALUES ('1234',
                 'Mr.B',
                 'Prj1',
                 'Green Computing',
                 TO_DATE ('06/15/2011', 'mm/dd/yyyy'),
                 TO_DATE ('07/31/2011', 'mm/dd/yyyy'),
                 '60');
    COMMIT;
    CREATE TABLE Project
       projID      VARCHAR (10),
       projName    VARCHAR (20),
       StartDate   DATE,
       EndDate     DATE,
       CONSTRAINT pk_project PRIMARY KEY (projID)
    INSERT INTO Project
         VALUES ('Prj1',
                 'Green Computing',
                 TO_DATE ('05/01/2011', 'mm/dd/yyyy'),
                 TO_DATE ('07/31/2011', 'mm/dd/yyyy'));
    INSERT INTO Project
         VALUES ('Prj2',
                 'Cloud Computing',
                 TO_DATE ('05/15/2011', 'mm/dd/yyyy'),
                 TO_DATE ('08/31/2011', 'mm/dd/yyyy'));
    COMMIT;
    SELECT a.projid "Project ID",
           p.projname "Project Name",
           a.associateid "Associate ID",
           a.associatename "Associate Name",
           CASE
              WHEN a.allocationenddate - a.allocationstartdate >= 0
              THEN
                  /*if project begins and ends on the same day,
                    we still want to allocate 9 hrs,
                    so we use a "1 + " to account for the first day*/
                  to_char((1 + (a.allocationenddate - a.allocationstartdate) * 9))
              WHEN a.allocationenddate is null or a.allocationstartdate is null
              THEN
                 /*if project is still underway*/
                 'Project is in progress'
              WHEN a.allocationenddate - a.allocationstartdate < 0
              THEN
                  /*begin date is later than end date*/
                 'Invalid data - begin date must occur before end date'
              ELSE
               null
           END
              "Effort"
      FROM allocation a
      JOIN project p
      ON a.projid = p.projid;

  • PO HEADER LEVEL의 TOTAL AMOUNT 계산 LOGIC

    제품 : MFG_PO
    작성날짜 : 2004-10-13
    PO HEADER LEVEL의 TOTAL AMOUNT 계산 LOGIC
    ==========================================
    PURPOSE
    Purchase Order 화면의 Header level에 보여주는 Total Amount 계산 logic을
    알아본다.
    Explanation
    Purchase Order 화면에서 PO를 입력하거나 조회해 본 사람은 PO Header level
    에 보이는 Total amount 값은 어느곳에도 저장되지 않는다는 것을 확인 할
    수 있을 것이다.
    이 header level total amount 계산 logic은 다음과 같다.
    1.Purchase Order 화면에서 price와 quantity가 입력될 때 POXPOPOL.pld에
    있는 maintain_po_total이 불려진다.
    이 maintain_po_total procedure는 line amount를 뿌려주기 위해 line에
    정의된 quantity와 price를 고려한다.
    이 line amount sum 되고, header total에 뿌려준다.
    sum(round((quantity*unit_price),precision))-> Header_total
    2.PO를 query 할 때 header amount를 조회하기 위해 POXCOCOB.pls의
    po_core_s.get_total procedure가 불려진다.
    아래의 query가 PO header level total amount 계산을 하게 된다.
    SELECT sum(round((pll.quantity - nvl(pll.quantity_cancelled,0))*
    nvl(pll.price_override,0),x_precision))
    FROM PO_LINE_LOCATIONS PLL
    WHERE PLL.po_header_id = <<po_header_id>>
    AND PLL.shipment_type in ('STANDARD','PLANNED','BLANKET')
    여기에서 precision은 PO.(PO Currency = Functional Currency)에서 사용
    되는 것으로 fnd_currencies에 정의된 currency이다.
    Example
    Reference Documents
    Note 226697.1

    Thought so.
    And therein lies your problem.
    You should avoid updating Oracle tables directly unless you are 100% sure that no relationships are getting violated.
    Updating po line price should be done via interface. I would suggest that you use the po documents interface to change the po line prices. Then you will see the header totals get updated automatically.
    Hope this answers your question
    Sandeep Gandhi
    Independent Consultant
    513-325-9026

  • Total Amount value not displaying while executing print progrm for PO form.

    Hi All,
               I created the PO form, for this i written a print program.After executing this print program everything s displaying & populating, but only the Total Amount  not displaying r not populating.
              But, if i run the PO n tcode ME23N the Total Amount is displaying, after assigning the form n NACE.
    So help me to get the Total Amount to be displayed n main window, while executing the print program.
    Like this i declared n smartform,                    Total net value excl. tax           &is_ekko-waers& &is_pekko-netwr&......
    The print program as follows,
    report zpo.
    tables: ekko,pekko,ekpo,ekpa,eket,ekkn,ekek,komk,nast.
    data: fm_name type rs38l_fnam.
    data: is_ekko type standard table of ekko with header line.
    data: is_pekko type pekko occurs 0 with header line.
    data: it_ekpa like standard table of ekpa,
          it_ekpo like standard table of ekpo,
          it_pekpo like standard table of pekpo,
          it_eket like standard table of eket,
          it_tkomv like standard table of komv,
          it_ekkn like standard table of ekkn,
          it_ekek like standard table of ekek,
          it_komk like standard table of komk.
    selection-screen: begin of block b1 with frame title text-001.
      parameters: pr_ebeln like ekpo-ebeln obligatory.
    selection-screen: end of block b1.
    select * from ekpo into table it_ekpo where ebeln = pr_ebeln.
    select * from ekko into is_ekko where ebeln = pr_ebeln.
    endselect.

    code as follows,
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
        FORMNAME                 = 'ZPURCHASE'
    *   VARIANT                  = ' '
    *   DIRECT_CALL              = ' '
    IMPORTING
        FM_NAME                  = fm_name
    CALL FUNCTION fm_name  "'/1BCDWB/SF00000060'
      EXPORTING
    *   ARCHIVE_INDEX              =
    *   ARCHIVE_INDEX_TAB          =
    *   ARCHIVE_PARAMETERS         =
    *   CONTROL_PARAMETERS         =
    *   MAIL_APPL_OBJ              =
    *   MAIL_RECIPIENT             =
    *   MAIL_SENDER                =
    *   OUTPUT_OPTIONS             =
    *   USER_SETTINGS              = 'X'
        IS_EKKO                    = is_ekko
        IS_PEKKO                   = is_pekko
    *   IS_NAST                    =
    *   IV_FROM_MEM                =
    *   IV_DRUVO                   =
    * IMPORTING
    *   DOCUMENT_OUTPUT_INFO       =
    *   JOB_OUTPUT_INFO            =
    *   JOB_OUTPUT_OPTIONS         =
      TABLES
           it_ekpo                   = it_ekpo
           it_pekpo                  = it_pekpo
           it_ekkn                   = it_ekkn
           it_ekpa                   = it_ekpa
           it_ekek                   = it_ekek
           it_komk                   = it_komk
           it_eket                   = it_eket
           it_tkomv                  = it_tkomv.
    * EXCEPTIONS
    *   FORMATTING_ERROR           = 1
    *   INTERNAL_ERROR             = 2
    *   SEND_ERROR                 = 3
    *   USER_CANCELED              = 4
    *   OTHERS                     = 5
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

  • Report to extract the total Amount that we spent for materials

    Hi Guru's,
    I was trying to find a report that gives all the following information by Company Code. Out put should have the following fields:
    1)Vendor Name,
    2) Vendor Number,
    3)Company Code,
    4) Payment Terms Code From Vendor Master,
    5) Payment Terms Description,
    6)Material Number,
    7)Material Description and
    8) Amount Spend for last 12 months
    I would appreciate any inputs on these kind of reports.
    Thanks
    Nath..........

    Sridhar,
    Thanks for your response but I am not getting Material number using report FBL1N and also I in the amount column I was looking for the total amount (total spent during the whole year) by Vendor, Company Code and Material. I am trying to execute this for three different company codes. So, will FBL1N work for us to get these total amounts.
    Thanks
    Nath

  • Total amount info

    Hi All,
    How can I get the total amount (Net amount + Tax) of the sales order at the header and item level?
    In Quotation and inquiry documents, there is a field called Total amount (ENDBK) at the header level.
    That’s what I want; I want to have this field in the sales order at both header and item level.
    How can I do this?
    Regards,
    Ahmed

    Hi Ahmed,
    for adding functionality from your side ,  you can do as follows:
    1.    Use USEREXIT_MOVE_FIELD_TO_VBAK  to add a new field say Total Value.
    2.  Use USEREXIT_READ_DOCUMENT to read value ( net + tax) in this new field.
    3. Use USEREXIT_SAVE_DOCUMENT to save data when document is saved.
    Similarly,
    For Item level,  use USEREXIT_MOVE_FIELD_TO_VBAP instead of  USEREXIT_MOVE_FIELD_TO_VBAK.
    All these userexits are present in include MV45AFZZ.
    Hope this help you.
    Reward if it helps.
    Regards,
    Gaurav Raghav.

Maybe you are looking for