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,

Similar Messages

  • 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 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

  • 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

  • Total amount paid per month

    Hi can someone check my sql,I what total amount paid for c_code not for people,the total amount paid for mar/apr you see its for all the people in organisation which is wrong
    SELECT par.c_code,
                                       wm_concat( per.lastname)lastname,
                                                  wm_concat(ATYPE.NAME) POSITION,
                                                   SUM(PAY.amount)totalPaid,
                                                   SUM(PAY.amount * DECODE(TO_CHAR(fpsch.payment_dt,'MONyyyy'),'APR'||fyea.YEAR,1,0))apr
                                          ,SUM(PAY.amount * DECODE(TO_CHAR(fpsch.payment_dt,'MONyyyy'),'MAY'||fyea.YEAR,1,0))may
    FROM SMS_PARTIES per,
                 SMS_ORGANISATION_CONTACTS con,
                    SMS_PARTIES par,
                    SMS_AGREEMENTS agr,
                    SMS_AGREEMENT_YEARS AYEA,
                    SMS_PAYMENTS PAY,
                    SMS_AFFILIATION_TYPES atype,
                    SMS_PAYMENT_BATCHES pbat,
                    sms_fyea_open_vw fyea
                 ,SMS_FUNDING_PAYMENT_SCHEDULES FPSCH
    WHERE per.id = con.per_id
    AND par.ID = con.ORG_ID(+)
    AND ATYPE.ID(+) = CON.ATYPE_ID
    AND par.ID = agr.PAR_ID
    AND agr.ID = AYEA.AGR_ID
    AND PAY.AYEA_ID = AYEA.ID
    AND PAY.pbat_id  = pbat.id (+)
    AND AYEA.fyea_year = fyea.YEAR
    AND PBAT.FPSCH_ID = FPSCH.ID (+)
    AND par.C_CODE IN ('C512','C70')
    GROUP BY par.C_CODEC_CODE LASTNAME POSITION TOTALPAID APR MAY
    C512 Goetham,Julies,Carolissen 2897574 1073574 912000
    ,Kleinhans,Goetham,Morris
    ,America,Julies,America,K
    leinhans,Morris,America,C
    arolissen,Julies,Goetham,
    Kleinhans,Morris,Caroliss
    en
    C70 McPherson,McPherson,McPhe Treasurer,Treasurer,Chair 25344 5280 5280
    rson,Meyer,Meyer,McPherso person,Treasurer,Chairper
    n,Meyer,Meyer son,Chairperson,Treasurer
    Edited by: user603350 on 2011/07/15 6:06 AM
    Edited by: user603350 on 2011/07/15 6:09 AM

    hi i have the create table script i hope someone will be able to help me
    drop table SMS_AFFILIATION_TYPES;
    drop table sms_months;
    drop table SMS_FUNDING_PAYMENT_SCHEDULES;
    drop table SMS_AGREEMENT_YEARS;
    drop table SMS_PAYMENTS;
    drop table SMS_AFFILIATION_TYPES;
    drop table SMS_PAYMENT_BATCHES;
    drop table SMS_FINANCIAL_YEARS;
    drop view SMS_FYEA_OPEN_VW;
    drop table SMS_AGREEMENTS;
    drop table SMS_ORGANISATION_CONTACTS;
    drop table SMS_PARTIES;
    CREATE TABLE SMS_PARTIES
    ID INTEGER NOT NULL,
    C_CODE VARCHAR2(30 BYTE),
    LASTNAME VARCHAR2(60 BYTE),
    ORG_ID INTEGER,
    par_type varchar2(10)
    CREATE TABLE SMS_ORGANISATION_CONTACTS
    PER_ID INTEGER NOT NULL,
    ORG_ID INTEGER NOT NULL,
    NOTE VARCHAR2(200 BYTE),
    START_DT DATE,
    END_DT DATE,
    ATYPE_ID INTEGER
    CREATE TABLE SMS_AGREEMENTS
    ID NUMBER NOT NULL,
    PAR_ID INTEGER,
    SSCH_ID number)
    CREATE TABLE SMS_AGREEMENT_YEARS
    ID INTEGER NOT NULL,
    AGR_ID NUMBER NOT NULL,
    ASTA_ID INTEGER NOT NULL,
    FYEA_YEAR INTEGER NOT NULL)
    CREATE TABLE SMS_PAYMENTS
    PBAT_ID INTEGER NOT NULL,
    AMOUNT NUMBER(13,2) NOT NULL,
    AYEA_ID INTEGER NOT NULL,
    OFF_ID INTEGER,
    SSCH_ID INTEGER
    CREATE TABLE SMS_AFFILIATION_TYPES
    ID INTEGER NOT NULL,
    NAME VARCHAR2(80 BYTE) NOT NULL,
    ATYPE_TYPE VARCHAR2(10 BYTE) NOT NULL,
    DATE_CREATED DATE,
    DATE_MODIFIED DATE,
    MODIFIED_BY VARCHAR2(30 BYTE),
    CREATED_BY VARCHAR2(30 BYTE),
    REQUIRED INTEGER
    CREATE TABLE SMS_PAYMENT_BATCHES
    ID INTEGER NOT NULL,
    BATCH_DT DATE ,
    BATCH_NUMBER VARCHAR2(25 BYTE) ,
    FPSCH_ID INTEGER
    CREATE TABLE SMS_FINANCIAL_YEARS
    YEAR INTEGER NOT NULL,
    START_DT DATE NOT NULL,
    END_DT DATE NOT NULL,
    CREATED_BY VARCHAR2(80 BYTE),
    DATE_CREATED DATE
    CREATE OR REPLACE VIEW SMS_FYEA_OPEN_VW
    (YEAR, START_DT, END_DT, FIN_YEAR)
    AS
    SELECT FYEA.YEAR
         ,start_dt
         ,end_dt
         ,YEAR || '/' || LPAD (LTRIM (SUBSTR (YEAR + 1, -2)), 2, 0) fin_year
         FROM SMS_FINANCIAL_YEARS fyea
         WHERE EXISTS (SELECT 1 FROM SMS_MONTHS
                             WHERE closed_dt IS NULL
                             AND fyea_year = YEAR)
    AND YEAR = (SELECT MIN(fyea_year) FROM SMS_MONTHS
                             WHERE closed_dt IS NULL);
    CREATE TABLE SMS_MONTHS
    ID NUMBER NOT NULL,
    FYEA_YEAR INTEGER NOT NULL,
    NAME VARCHAR2(30 BYTE) NOT NULL,
    MONTH_NO INTEGER,
    MONTH_END_DT DATE,
    CLOSED_DT DATE,
    DATE_MODIFIED DATE,
    MODIFIED_BY VARCHAR2(30 BYTE),
    CREATED_BY VARCHAR2(30 BYTE),
    DATE_CREATED DATE
    CREATE TABLE SMS_FUNDING_PAYMENT_SCHEDULES
    ID INTEGER NOT NULL,
    MON_ID NUMBER NOT NULL,
    TAS_ID INTEGER,
    SEQ INTEGER ,
    RUN_DT DATE ,
    PAYMENT_DT DATE ,
    RUN_TYPE INTEGER ,
    CUT_OFF_DATE DATE,
    AGR_ID NUMBER,
    PTYPE_CODE VARCHAR2(5 BYTE) DEFAULT 'EFT' NOT NULL
    INSERT INTO SMS_PARTIES ( ID, PAR_TYPE, C_CODE, LASTNAME, ORG_ID ) VALUES (
    57356, 'FAC', 'C512', NULL, null);
    INSERT INTO SMS_PARTIES ( ID, PAR_TYPE, C_CODE, LASTNAME, ORG_ID ) VALUES (
    57357, 'FAC', 'C70', NULL, null);
    INSERT INTO SMS_PARTIES ( ID, PAR_TYPE, C_CODE, LASTNAME,
    ORG_ID ) VALUES (
    5186,'PER',null,'McPherson',57357);
    INSERT INTO SMS_PARTIES ( ID,C_CODE,par_type,LASTNAME,
    ORG_ID
    ) VALUES (
    5187,null,'PER','Meyer',57356);
    INSERT INTO SMS_ORGANISATION_CONTACTS ( PER_ID, ORG_ID, ATYPE_ID ) VALUES (
    5186, 57357, 25523);
    INSERT INTO SMS_ORGANISATION_CONTACTS ( PER_ID, ORG_ID, ATYPE_ID ) VALUES (
    5187, 57357,25522);
    INSERT INTO SMS_AFFILIATION_TYPES ( ID, NAME, ATYPE_TYPE ) VALUES (
    25522, 'Treasurer', 'STYPE');
    INSERT INTO SMS_AFFILIATION_TYPES ( ID, NAME, ATYPE_TYPE ) VALUES (
    25523, 'Chairperson', 'STYPE');
    INSERT INTO SMS_AGREEMENTS ( ID, PAR_ID, SSCH_ID ) VALUES (
    258266, 57357, 3);
    INSERT INTO SMS_AGREEMENTS ( ID, PAR_ID, SSCH_ID ) VALUES (
    258263, 57356, 11);
    INSERT INTO SMS_AGREEMENT_YEARS ( ID, AGR_ID, ASTA_ID, FYEA_YEAR ) VALUES (
    53903, 258266, 2444, 2011);
    INSERT INTO SMS_AGREEMENT_YEARS ( ID, AGR_ID, ASTA_ID, FYEA_YEAR ) VALUES (
    1209077, 258263, 2444, 2011);
    INSERT INTO SMS_PAYMENTS ( PBAT_ID, AMOUNT, AYEA_ID,
    SSCH_ID ) VALUES (
    64, 152000, 53903, NULL);
    INSERT INTO SMS_PAYMENTS ( PBAT_ID, AMOUNT, AYEA_ID
    ,SSCH_ID) VALUES (
    67, 2640, 1209077, 1209077);
    INSERT INTO SMS_PAYMENT_BATCHES ( ID, BATCH_NUMBER,
    FPSCH_ID ) VALUES (
    64,'2011-002', 11494);
    INSERT INTO SMS_PAYMENT_BATCHES ( ID, BATCH_NUMBER,
    FPSCH_ID ) VALUES (
    67,'2011-001', 11496);
    INSERT INTO SMS_MONTHS ( ID, FYEA_YEAR, NAME, MONTH_NO, MONTH_END_DT, CLOSED_DT, DATE_MODIFIED,
    MODIFIED_BY, CREATED_BY, DATE_CREATED ) VALUES (
    16991, 2011, 'April', 1, TO_Date( '04/22/2011 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM')
    , TO_Date( '05/05/2011 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'), TO_Date( '05/05/2011 08:48:53 AM', 'MM/DD/YYYY HH:MI:SS AM')
    , 'SMSPUSER', 'SMSPUSER', TO_Date( '03/24/2011 09:47:34 AM', 'MM/DD/YYYY HH:MI:SS AM'));
    INSERT INTO SMS_MONTHS ( ID, FYEA_YEAR, NAME, MONTH_NO, MONTH_END_DT, CLOSED_DT, DATE_MODIFIED,
    MODIFIED_BY, CREATED_BY, DATE_CREATED ) VALUES (
    16992, 2011, 'May', 2, TO_Date( '05/22/2011 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM')
    , TO_Date( '05/31/2011 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'), TO_Date( '05/31/2011 02:28:46 PM', 'MM/DD/YYYY HH:MI:SS AM')
    , 'SMSPUSER', 'SMSPUSER', TO_Date( '03/24/2011 09:47:34 AM', 'MM/DD/YYYY HH:MI:SS AM'));
    INSERT INTO SMS_FUNDING_PAYMENT_SCHEDULES ( ID, MON_ID, TAS_ID, SEQ, RUN_DT, PAYMENT_DT, RUN_TYPE,
    CUT_OFF_DATE, AGR_ID, PTYPE_CODE ) VALUES (
    11494, 16991, NULL, NULL, TO_Date( '08/11/2011 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM')
    , TO_Date( '04/07/2011 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'), NULL, NULL, 258263
    , 'EFT');
    INSERT INTO SMS_FUNDING_PAYMENT_SCHEDULES ( ID, MON_ID, TAS_ID, SEQ, RUN_DT, PAYMENT_DT, RUN_TYPE,
    CUT_OFF_DATE, AGR_ID, PTYPE_CODE ) VALUES (
    11496, 16992, NULL, NULL, TO_Date( '08/11/2011 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM')
    , TO_Date( '05/18/2011 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'), NULL, NULL, 258266
    , 'EFT');
    INSERT INTO SMS_FINANCIAL_YEARS ( YEAR, START_DT, END_DT, CREATED_BY,
    DATE_CREATED ) VALUES (
    2009, TO_Date( '04/01/2009 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'), TO_Date( '03/31/2010 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM')
    , 'SDMS01', TO_Date( '06/20/2008 04:50:35 PM', 'MM/DD/YYYY HH:MI:SS AM'));
    INSERT INTO SMS_FINANCIAL_YEARS ( YEAR, START_DT, END_DT, CREATED_BY,
    DATE_CREATED ) VALUES (
    2010, TO_Date( '04/01/2010 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'), TO_Date( '03/31/2011 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM')
    , 'SMSPUSER', TO_Date( '03/24/2010 09:47:34 AM', 'MM/DD/YYYY HH:MI:SS AM'));
    INSERT INTO SMS_FINANCIAL_YEARS ( YEAR, START_DT, END_DT, CREATED_BY,
    DATE_CREATED ) VALUES (
    2011, TO_Date( '04/01/2011 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'), TO_Date( '03/31/2012 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM')
    , 'SMSPUSER', TO_Date( '04/19/2011 11:40:08 AM', 'MM/DD/YYYY HH:MI:SS AM'));
    INSERT INTO SMS_FINANCIAL_YEARS ( YEAR, START_DT, END_DT, CREATED_BY,
    DATE_CREATED ) VALUES (
    2006, TO_Date( '04/01/2006 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'), TO_Date( '03/31/2007 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM')
    , 'SMS01', TO_Date( '06/17/2008 12:11:22 PM', 'MM/DD/YYYY HH:MI:SS AM'));
    INSERT INTO SMS_FINANCIAL_YEARS ( YEAR, START_DT, END_DT, CREATED_BY,
    DATE_CREATED ) VALUES (
    2005, TO_Date( '04/01/2005 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'), TO_Date( '03/31/2006 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM')
    , 'SMS01', TO_Date( '06/17/2008 12:11:31 PM', 'MM/DD/YYYY HH:MI:SS AM'));
    INSERT INTO SMS_FINANCIAL_YEARS ( YEAR, START_DT, END_DT, CREATED_BY,
    DATE_CREATED ) VALUES (
    2008, TO_Date( '04/01/2008 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'), TO_Date( '03/31/2009 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM')
    , 'SMS01', TO_Date( '03/20/2008 07:33:05 AM', 'MM/DD/YYYY HH:MI:SS AM'));
    INSERT INTO SMS_FINANCIAL_YEARS ( YEAR, START_DT, END_DT, CREATED_BY,
    DATE_CREATED ) VALUES (
    2007, TO_Date( '04/01/2007 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM'), TO_Date( '03/31/2008 12:00:00 AM', 'MM/DD/YYYY HH:MI:SS AM')
    , 'SMS01', TO_Date( '06/03/2008 12:42:36 PM', 'MM/DD/YYYY HH:MI:SS AM'));
    ALTER TABLE sms_parties ADD (CONSTRAINT par_par_pk PRIMARY KEY (id)) ;
    ALTER TABLE SMS_AGREEMENT_YEARS ADD (CONSTRAINT ayea_ayea_pk PRIMARY KEY (id)) ;
    ALTER TABLE SMS_PAYMENT_BATCHES ADD (CONSTRAINT pay_bat_pk PRIMARY KEY (id)) ;
    ALTER TABLE SMS_AGREEMENTS ADD (CONSTRAINT agr_agr_pk PRIMARY KEY (id)) ;
    ALTER TABLE SMS_PARTIES ADD (
    CONSTRAINT PAR_PAR_FK FOREIGN KEY (ORG_ID)
    REFERENCES SMS_PARTIES (ID));
    ALTER TABLE SMS_ORGANISATION_CONTACTS ADD (
    CONSTRAINT OCON_ORG_FK FOREIGN KEY (ORG_ID)
    REFERENCES SMS_PARTIES (ID));
    ALTER TABLE SMS_ORGANISATION_CONTACTS ADD (
    CONSTRAINT OCON_PER_FK FOREIGN KEY (PER_ID)
    REFERENCES SMS_PARTIES (ID));
    ALTER TABLE SMS_AGREEMENTS ADD (
    CONSTRAINT AGR_PAR_FK FOREIGN KEY (PAR_ID)
    REFERENCES SMS_PARTIES (ID));
    ALTER TABLE SMS_AGREEMENT_YEARS ADD (
    CONSTRAINT AYEA_AGR_FK FOREIGN KEY (AGR_ID)
    REFERENCES SMS_AGREEMENTS (ID));
    ALTER TABLE SMS_PAYMENTS ADD (
    CONSTRAINT PAY_PBAT_FK FOREIGN KEY (PBAT_ID)
    REFERENCES SMS_PAYMENT_BATCHES (ID));
    ALTER TABLE SMS_AFFILIATION_TYPES ADD (
    CONSTRAINT ATYPE_PK PRIMARY KEY (ID))
    ALTER TABLE SMS_PAYMENT_BATCHES ADD (
    CONSTRAINT PBAT_PK PRIMARY KEY (ID))
    ALTER TABLE SMS_FUNDING_PAYMENT_SCHEDULES ADD (
    CONSTRAINT FPSCH_AGR_FK FOREIGN KEY (AGR_ID)
    REFERENCES SMS_AGREEMENTS (ID));
    update sms_months set closed_dt=NULL;
    commit;
    select * from cat;
    Edited by: user603350 on 2011/07/19 4:32 AM
    Edited by: user603350 on 2011/07/19 4:36 AM
    Edited by: user603350 on 2011/07/19 4:47 AM
    Edited by: user603350 on 2011/07/19 4:59 AM
    Edited by: user603350 on 2011/07/19 5:06 AM

  • PO is getting released even if the total amount is less than the last PO am

    Purchase Order is getting released even if the total amount is less than the last PO amount. The release strategy is only working for the first Purchase Order and if the PO amount is greater than the last PO amount.
    Please let me know how to correct this scenario (release strategy).
    Regards,
    Prishu

    Hi,
    Release strategy has nothing do with the previous PO amount. May be, Co-incidently the amount in previous PO which you are referring and the characteristics value maintained in the release strategy is same.
    1) Please go in release strategy by the path mentioned below
    IMG u2013 Material Management u2013 Purchasing u2013 Purchase Requisition u2013 Release Procedure u2013 Procedure with Classification u2013 Set Up Procedure with Classification
    2) Then go to release strategy. Here the total available release strategies would be displayed. Double click the strategy which is getting reflected in the PO you want and go the classifiction tab. There you will get the PO value. Based on this characteristic value the respective release streategy gets refelected.
    I hope this clarifies.
    Regards
    sachin

  • User Exit or BADI  to get the Total Tax Amount in a New PO (ME21M)

    Hi,
    Can somebody tell me any user exit or BADI I can look at to get the total Tax amount of a new PO, after user press SAVE button and before data is written to tables (EKKO, EKPO etc).
    Key requirement here is AFTER save button is pressed and before data is written to tables. I want to do some validation before data goes in the table.
    Thanks in advance.  Please help me.

    Dear MiniSap..
    Maybe you can use function PRICING or CALCUALTE_TAX_ITEM .
    Best regards,
    Ale

  • 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

  • Regarding: How to Get the Tax Amount

    Hai Friends,
                            I have the Input of  Amount + Tax Group.
                           I  need the amount for every Tax from Tax group.
                           How to get the Tax amount for differnt tax type.
    Please help me.
    Regards,
    K Sakthivel

    Hai Sakthi,
    As you want the report for different tax types  you can differentiate different tax types by tax rate and tax code  you can  refer the below query and modify  according to your requirement and you can add as many tax codes/tax type based on your needs.
    BASED ON TAX CODE AND TAX RATE :
    SELECT distinct  M.DocNum AS 'AR Inv. #', M.DocDate as 'Date', M.CardName as 'Customer Name',M.NumAtCard as 'Bill No. & Dt.',M.DiscSum,M.RoundDif,
    (Select Sum(LineTotal) FROM INV1 L Where L.DocEntry=M.DocEntry) as 'Base Amt.(Rs.)',M.VATSUM,
    t.statype,
    (Select Sum(LineTotal) FROM INV1 L Where L.DocEntry=M.DocEntry and statype =1 and taxrate=5  AND TAXCODE='CHVAT5' ) as 'CHENNAI VAT5  SALES',
    (SELECT SUM(TaxSum) FROM INV4 where statype=1 and TaxRATe =5 and DocEntry=M.DocEntry  AND STCCODE='CHVAT5' ) as ' CHENNAI VAT5 COLLECTED ',
    (Select Sum(LineTotal) FROM INV1 L Where L.DocEntry=M.DocEntry and statype =1 and taxrate=0.00  AND TAXCODE='CHTAXEXE' ) as 'EXEMPTED  SALES',
    (SELECT SUM(TaxSum) FROM INV4 where statype=1 and TaxRATe =0.00 and DocEntry=M.DocEntry  AND STCCODE='CHTAXEXE' ) as 'EXEMPTED COLLECTED ',
    (Select Sum(LineTotal) FROM INV1 L Where L.DocEntry=M.DocEntry and statype =1 and taxrate=14.50  AND TAXCODE='CHVT14.5' ) as 'CHENNAI VAT14.5  SALES',
    (SELECT SUM(TaxSum) FROM INV4 where statype=1 and TaxRATe =14.50 and DocEntry=M.DocEntry  AND STCCODE='CHVT14.5' ) as ' CHENNAI VAT14.5 COLLECTED ',
    (Select Sum(LineTotal) FROM INV3 Q Where Q.DocEntry=M.DocEntry) as 'FREIGHT',
    M.DocTotal as 'Total (Rs.)'
    FROM OINV M LEFT OUTER JOIN INV1 L on L.DocEntry=M.DocEntry
    LEFT OUTER JOIN INV4 T on T.DocEntry=L.DocEntry
    LEFT OUTER JOIN INV5 J ON M.DocEntry = J.AbsEntry
    LEFT OUTER JOIN INV3 Q ON M.DocEntry = Q.DocEntry
    INNER JOIN NNM1 T4 ON M.SERIES=T4.SERIES
    where (t4.series ='1' ) AND TARGETTYPE !='14'
    GROUP BY
    M.DocNum,M.DocDate,M.CardName,M.NumAtCard,M.DocEntry,M.DiscSum,M.WTSum,M.DocTotal,M.Series,T4.SeriesName,M.RoundDif,M.VATSUM,T.STATYPE,T.TAXRATE,Q.LINETOTAL,t4.series,
    Regards,
    P.V

  • 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

  • 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.

  • 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.

  • How to distribute a % of the total amount to a partner in a contract?

    Is there any way to distribute a % of the total amount to a partner, say a forwarding agent in a contract?
    Thanks & regards,
    Gokul.

    Play the video with Quicktime Player where the controls do not show when you use the space bar to stop the playing.  The forward and back keys will advance/retreat the video till you get the exact frame to make the screenshot of. 
    OT

  • HT1222 How do I increase the total amount of space I have on iPhone for things like iTunes n more music n like MusicTube n YouTube. Thank you in advance for any help that can be given.

    I am running out of usage space. How do I increase the total amount of space I have on my iPhone4S: for things like programs &amp; apps such as, iTunes &amp; more music &amp; like MusicTube &amp; YouTube. The only reason I have any space now is because the music that I had downloaded and synced onto my phone from iTunes I had to take it all off. I would really really love to be able to put my music back onto my iPhone. Currently I'm using apps like Spotify, AOLradio, and MusicTube to listen to music. Thank you so very much in advance for any help that may be given!

    Also to add to my original question: is what I'm asking even a possibility??? Meaning is there even a way to get more usage space? Or do I have to just continue to work within the confines that apple has preset on the phone?

  • How can I get the total "values" in a hashtable ?

    i know that i can get the total values in a hashtable by hash.elements() method. It returns an
    enumeration with all the values present in this hashtable. this is fine upto here.
    Now the preoblem is:
    According to what rule this enumeration will be returned. I mean..
    If i added in key A with value a,
    then key B with value b;
    then key C with value c;
    then key D with value d;
    (They all are objects of type String)
    now i call ... hash.elements(); Suppose it returns Enumeration enum;.
    Now in what order they all are present in this hashtable.
    Meaning is that if i move arond this enum in what sequence they all will be returned.
    option A ) In the same order as they were inserted in hashtable.
    option B ) According to LIFO;
    option C) There is no fix rules , simply it return all the elements and u cannot judge that the first element in enum was really the first element inserted in the hashtable and the second element of enum was really the second element inserted in the hashtable.
    What do u think..which option is correct ?
    Ny idea will highly appreciated.
    Thanks in advance.
    Sanjeev Dhiman

    hi, i am again..
    boss ! this is not true..u just change the order and or change the keys and something like ...
    "Sanjeev", "hello"
    "Dhiman", "hi"
    "Technosys" ,"Services"
    u will find that its not LIFO..really i was thinking before coding my project that option A is correct and with knowledge i wrote 3 - 4 classes but when i run the programm its starts throwing errors.
    so, i posted this question. I think "apppu" is right.
    I think , firstly hash is calculated for each value and that value is returned which can be received in a fastest way and hence not necessarily in LIFO and FIFO..
    Thanks to u also as u gave ur precious time for me.
    Once again.
    Thank you very much.
    Sanjeev Dhiman

Maybe you are looking for

  • APEX 4.0: error while opening a XLS file downloaded from interactive report

    Hi, I'm getting below error while opening a XLS file downloaded from an interactive report (APEX 4.0). "The file you trying to open, 'customer_2.xls', is in a different format than specified by the file extension. Verify that the is not corrupted and

  • Firmware Upgrade: p1102w, p1606dn, m1210 series, cp 1025nw

    The following products require a firmware upgrade (FW older than 20130210 ) and re-registration with ePrint center for use of the ePrint feature. Please print a configuration page to see what version of firmware your printer has. HP LaserJet P1100 Se

  • Jsp taglibs in include files not detected, throws errors, no code insight

    I have a jsp which is included in all the other jsp. it looks something like this taglibs.jsp <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> <%@ taglib uri="http://ww

  • Installed Mountain Lion 10.8.2 can't find files music videos pictures!!!!

    We have an iMac as our home computer and yesterday I downloaded the ML OSx 10.8.2 version.  Like everything else that Apple does, I expected this to be a seamless easy experience so I didn't pay a lot of attention during the install, just answered th

  • MC+E REPORT

    DEAR FRIENDS, I run a sales analysis report customer wise using T-CODE MCE, for all other customers the report came out properly except for the customers in other plants and distribution channels which were just created. Pls is there anything missing