Vendors total sales by gjahr.

after a selection in bsik and bsak, bsek etc... into the tb_out
i collect into tb_col the total amount for each lifnr.
now i want to collect the total amount by gjahr .
how can i change my code, please?
LOOP AT tb_out.
        CLEAR  tb_col.
        SELECT SINGLE * FROM bkpf
WHERE bukrs = wa_ana-bukrs
       AND belnr = tb_out-belnr
        AND gjahr = tb_out-bldat(4).
       MOVE-CORRESPONDING tb_out TO tb_col.
        tb_col-bukrs = wa_ana-bukrs.
       tb_col-waers = bkpf-waers.
      tb_col-hwaer = bkpf-hwaer.
       COLLECT tb_col.
       MOVE-CORRESPONDING tb_col TO tb_zftforn.
       tb_zftforn-wrbtr = tb_col-fativd.
       tb_zftforn-dmbtr = tb_col-fativa.
        tb_zftforn-gjahr = tb_reg-gjahr.
     ENDLOOP.
     APPEND tb_zftforn.

better use table LFC1.
A.

Similar Messages

  • Comparing fbl1n open items  my program some vendors total amont is not tali

    Hi
    this is vendor aging report.  i have used BSEG, FAGLFLEXA, LFA1, BKPF.
    problem is  Comparing fbl1n open items  my program some vendors total amont is not tali.
    sapose : 1033  fbl1n date is : 30.01.2009.
               my report used same date .
    here proble is : fbl1n show clear item also  in  partuculr date range but
                             my report show only open items ony not peaking  close item's in ie date range.
    SELECT BUKRS BELNR BUZEI GJAHR LIFNR KTOSL XAUTO REBZG UMSKS KOART AUGBL BSCHL UMSKZ SHKZG WRBTR ZFBDT DMBTR ZBD1T ZBD2T
    FROM BSEG INTO CORRESPONDING FIELDS OF TABLE I_BSEG WHERE BUKRS EQ P_BUKRS AND
    LIFNR IN S_LIFNR AND
    AUGDT GE P_BUDAT and AUGBL = SPACE
       AND KOART = 'K'
    AND ( BSCHL = '21' OR BSCHL = '22' OR BSCHL = '23' OR BSCHL = '24' OR BSCHL = '25' OR BSCHL = '26' OR BSCHL = '27' OR
    BSCHL = '28' OR BSCHL = '29' OR BSCHL = '30' OR BSCHL = '31' OR BSCHL = '32' OR BSCHL = '33' OR BSCHL = '34' OR
    BSCHL = '35' OR BSCHL = '36' OR BSCHL = '37' OR BSCHL = '38' OR BSCHL = '39' OR BSCHL = '50' ).
    please give me solustion.

    hi,
    See perhaps this pable
    VBSEGA                         Document Segment for Document Parking - As
    VBSEGD                         Document Segment for Customer Document Par
    VBSEGK                         Document Segment for Vendor Document Parki
    VBSEGS                         Document Segment for Document Parking - G/
    Rgds

  • Accrued Sales Tax Amount  & Vendor Charged Sales Tax amount

    Hi,
    I need to Genertate a Report for Sales Tax. Please suggest TABLE & FIELDS names & information  of
    +Accrued Sales Tax Amount+
    & Vendor Charged Sales Tax amount
    Thanks in Advance.

    Hi Harshita......
    Think why you want to change the Tax Amount at transaction level?
    Because you want to match the figure with the Hard Copy.
    So if you change the Tax Amount at Outgoing Excise Invoice level then how Delivery And its AR Invoice Total will be vary?
    By the way If you see the JV of Delivery it is not at all matched with AR Invoice provided Purchase Cost should not be equalt to Sales Cost.
    Delivery is only concern with stock not value.....
    SO there wont be any problem I guess......
    Regards,
    Rahul

  • Total sales values by material and plant

    Hi,
    I was trying to extract the following information:
    material number, plant, total sales qty(2006), and total sales amount(2006) from sap table. So, can any one help me with the table or a report where in I can find all this information.
    Thanks
    Putta

    Hi,
    Good evening and greetings,
    You can get the info from the Table BSEG as below
    BSEG-BUKRS = Company Code and a Sales Org is attached to a Company Code
    BSEG-GJAHR = Fiscal Year
    BSEG-DMBTR = Amount in Local Currency
    BSEG-PSWBT =  GL Account Amount
    BSEG-HKONT = GL Account Number
    BSEG-MATNR = Material Code
    BSEG-WERKS = Plant
    BSEG-MENGE = Quantity
    BSEG-MEINS = Base Unit of Measure
    You have to execute the report with the following input parameters in SQVI
    Company Code
    GL Account Number = Revenue Account
    Fiscal Year
    You will get all the info from the system in the single table.
    Please reward points if found useful
    Thanking you
    With kindest regards
    Ramesh Padmanabhan

  • Report on open sales order ,total sales

    Hello Gurus
    I am developing a report line item wise of sales order in which i need to get
    Suppose a sales order is created on 01.12.2009 for 1000 quantity
    billed quantity in december 600
    billed quantity in january     200
    1) total sales done against this SO line item wise.
    2) sales in this month againt this SO
    3)open order qty as 01.01.2010
    4)last day sales i.e from 01.01.2010 to 20.01.2010 the date of last sales against this SO
    so my output should be
    total sales = 800
    sales in this month =200
    open order qty as on 01.01.2010= 400
    please tell me the logic
    regards
    sphoorthi
    Moderator message - Please do not post your requirements and ask the forum to do your work for you - post locked
    Edited by: Rob Burbank on Jan 20, 2010 10:47 AM

    Hi,
    I gather from your thread that the question is not to build a report on a MP yes/no but more on which MP.
    Depending on the reporting needs and on how well you are able to combine the 2 cubes in the new MP I would say go for the latter option so you have more control on this one MP (for example if you need to add something that is already available in cubes).
    However, when (future!) reporting needs could mean that characteristics need to be added to the report(s) and filtered on that are not in both cubes you will have major problems getting the data properly from new MP and you would be better off using the individuals MP's and combine the data in a workbook or in a web template giving more flexibility.
    So you need to really analyze the requirements and decide on the way forward. Keep in mind possible future requirements because for now it could seem these few fields could be enough but new requirements could directly give a problem.
    Hope this helps
    C.

  • Vendor wise sales report

    Hi Expert,
    Client requirement is like this
    Client procure "Article-ABC"from different vendors like Vendor 1, vendor 2, Vendor 3
    and client do the sale to his customers
    now client want to know how much "Article-ABC" sold from with respect to vendor1, and vendor 2 , vendor 3
    Note:-
    1) client raise @ 50 PO everyday to different different vendor
    2) and each PO contain minimum 300 to 500 different- different Articles
    if we generate the batch for each Articlel w.r.t vendor then @ 25000 batches will be generate everyday
    please suggest
    Edited by: Hanumant Nimbalkar on Jun 23, 2009 2:16 PM

    Dear Hanumant,
    You have to use Consulting Skills here; Vendor identify looses as soon as GRN done.
    Option No. 1 : Since you are using SAP IS Retail, you can use Vendor Consignment to track Vendor wise sales
    Option No. 2: You can develop customized report using following (suggested) logic;
    (a) Vendor A - Article A - EAN Code 1
    (b) Vendor B - Article A - EAN Code 2
    (c) Vendor C - Article A - EAN Code 3
    Since, Sales are happening through POS using EAN Code, you can extract all relevant information including EAN Code from POS System.
    I hope this will suffice.
    Regards - Muralidhara

  • Vendor Total open balances report

    Hi,
       Iam working in client location sbi mumbai.My client is having 2,95,000 employees/vendors total.Every month they contribute
    G/L(10000000) member contribution for PF
    G/L(10001000) bank contribution for PF
    Means every month two invoices will e posting for each employee/vendor. We can see the reports in T code :(FBLIN)/(FK10N),(FS10N).
             But my client is asking report like total vendor/employee balance at year end,member contribution at year end,bank contribution at year end. in one screen for 2,95,000 employees indiviadully.
    Vendor Total open items balances report not from T Code:(fbl1n),(fk10n),report or Bsik table.Because this all showing all line itemwise. But i want only total balance of all vendors/employees individually at year end.
    Thanks & Regards
    Rajeswari .ch

         Total vendor Balances as on 31.03.2014
    vendor no
    Total vendor balance
    Member contribution
    Bank contribution
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    till 2,95,000 employee
         Total vendor Balances = Members contribution + Bank contribution - Advances - Withdrawals
    ex:
    Members Contribution
    per month =1000
    Year end
    per anum =12000
    I want to see year end balance for all 2,95,000 employees individually
    G/l balances report also i want.

  • Vendor total in app. urgent please

    Hi all,
    Our client needs to pay the vendor total amount if exceeds Rs.20000/- they will print manual cheques.
    If the vendor total (including all line items) less than 20000, they will pay through Telegraphic transfer.
    For this in F110, i specified the amount in local currency in the tab additional selections. but it is taking line item wise below 20000. i selected this filed and i given like this (00000,20000).
    which field i have to take for this?
    Its urgent, kindly anybody give the solution....
    Raghav

    hi,
    Maintain maximum amount as 20000 in payment method maintanance for company code data in FBZP for payment method T.
    Thanks & REgards
    Sunitha

  • How to see customers total sales orders value

    Dear all,
    How can I create a query to see all customers total sales orders value.
    I have tried MC+E transaction, it is not giving accurate values when compare for a customer with VA05N report.
    moreover it doesn't have filter option.
    Please help me to resolve the issue. Your suggestion will be highly appreciated.
    Best regards,
    Raghu ram

    Hi,
    Try S_ALR_87012171  and S_ALR_87012186.   or
    S_ALR_87012160, select customer lite items only, enter customer number.
    Click on dynamic selection (Shift+F4). enter RV in document type field and press execute.
    Regards,
    Chandra

  • Tables for Vendor Totals

    Hi
    What are the tables for Vendor Totals.
    Regards
    Rupal

    Vendors it is LFC1.
    or
    Please use for vendor balances:-
    S_AC0_52000888
    Regards,
    vendor use table BSAK , BSIK

  • Automatic generation of Credit Note to Vendor from Sale order

    In  Export Sales we are giving Credit notes to the Agents (Vendors) for the price difference amount in Dollars.  We want to do automatic posting to Vendors from Sale Order. How we can do this?
    Regards/Amudha

    Hi Amudha
    Welcome to SDN Forum
    Your requirement can be fulfilled through EDI.Please go through this provided link which may give you some inputs
    Intercompany Billing (EDI) Automatic Posting to Vendor Account
    If it is still not possible through EDI also then you have to go with enhancement only
    Regards
    Srinath

  • Link of vendor in sales order through WBS element

    Hi
    My sales order line items are having WBS assigned.All these line items are direct bought out items from vendors and supplied to customer.
    Please suggest me link of vendor in sales order through WBS element.
    I want to use the same logic for billing split criteria for individual line items(hence for individual vendors) Presently my client is getting common invoice for all line items but they want separate invoice for each line items.
    Awaiting for your valuable inputs
    Thanks
    Manoj

    Hi Manoj,
    I need to understand your process in more detail.
    How do you procure?  Create a sales order with TAS item category to create a PReq and PO?
    Very simple explanation: Resource Related billing/DIP profiles are used to accumulate costs on WBS elements and then bill the client as needed.

  • Regarding Customer Total Sales table

    Hi All SAP Experts
    I like to know which table will provide me total of each customers for year. an Actual sales for per customer. I know table VBAK with filed Net value. My question is that figure is right figure for each customer. I am looking for total sales. Report requirement is total sales it will not show line itemwise. Just total sales per customer.
    Thank you

    Welcome to the forum.  As a new member, I would like to inform you that there are certain rules and regulations applicable to this forum which you can find to your right screen where it has also been indicated that posting basic / repeated query is not allowed. Please search in this forum or Google it with the same text, so that you will find many threads discussed on the same topic.  Take the inputs from there and update still if you are not able to resolve.  Meanwhile, this thread would be locked.
    G. Lakshmipathi

  • Trying to find the difference between two sub-totals (sales - credits)

    Hi Everyone,
    I have the following code which essentially lists the total sales for an items on the first row, and the total credits for the same item on the second row.
    SELECT T0.ItemCode, SUM(T0.LineTotal) as 'Total Sales'
    FROM INV1 T0
    WHERE T0.ItemCode = 'ACR2401010'
    GROUP BY T0.ItemCode
    UNION ALL
    SELECT T1.ItemCode, SUM(T1.LineTotal) as 'Total Sales'
    FROM RIN1 T1
    WHERE T1.ItemCode = 'ACR2401010'
    GROUP BY T1.ItemCode
    The results of the query are shown below (with some alterations for confidentiality).
    What I would like to do is write a code block that subtracts the total credits from the total sales, leaving me with only one row of data for the ItemCode.
    If anybody can help with writing the code to achieve this it will be greatly appreciated.
    Kind Regards,
    Davo

    Hi, Please take a look and tweak accordingly. You may pay attention to nulls and manipulate accordingly. Best of luck!
    --Option 1
    SELECT t2.ItemCode,( SUM(T2.TotalSales)-SUM(TotalCredits)) AS 'Total'
    FROM
    SELECT T0.ItemCode, SUM(T0.LineTotal) as 'TotalSales',SUM(0) as 'TotalCredits'
    FROM INV1 as T0
    WHERE T0.ItemCode = 'ACR2401010'
    GROUP BY T0.ItemCode
    UNION ALL
    SELECT T1.ItemCode, SUM(0) as 'TotalSales', SUM(T1.LineTotal) as 'TotalCredits',
    FROM RIN1 as T1
    WHERE T1.ItemCode = 'ACR2401010'
    GROUP BY T1.ItemCode
    ) AS t2
    GROUP BY t2.ItemCode
    --Option 2
    SELECT t2.ItemCode, ( SUM(T2.TotalSales)-SUM(TotalCredits)) AS 'Total'
    FROM
    SELECT T0.ItemCode, SUM(T0.LineTotal) as 'TotalSales',SUM(0) as 'TotalCredits'
    FROM INV1 as T0
    --WHERE T0.ItemCode = 'ACR2401010'
    GROUP BY T0.ItemCode
    UNION ALL
    SELECT T1.ItemCode, SUM(0) as 'TotalSales', SUM(T1.LineTotal) as 'TotalCredits',
    FROM RIN1 as T1
    --WHERE T1.ItemCode = 'ACR2401010'
    GROUP BY T1.ItemCode
    ) AS t2
    WHERE t2.ItemCode = 'ACR2401010'
    GROUP BY t2.ItemCode
    --Option 3
    SELECT t2.ItemCode, ( SUM(T2.TotalSales)-SUM(TotalCredits) ) AS 'Total'
    FROM
    SELECT T0.ItemCode, T0.LineTotal as 'TotalSales', 0 as 'TotalCredits'
    FROM INV1 as T0
    UNION ALL
    SELECT T1.ItemCode, 0 as 'TotalSales', T1.LineTotal as 'TotalCredits',
    FROM RIN1 as T1
    ) AS t2
    WHERE t2.ItemCode = 'ACR2401010'
    GROUP BY t2.ItemCode
    --Assuming credit part is optional..also assuming each table should return only one row else results would inflate...option 4
    SELECT t0.ItemCode, ( SUM(T0.TotalSales)-SUM(T1.TotalSales)) AS 'Total'
    FROM
    INV1 as t0
    left outer join
    RIN1 as t1
    ON t0.ItemCode = t1.ItemCode
    WHERE t0.ItemCode = 'ACR2401010'
    GROUP BY t0.ItemCode
    --option 4 with grouping to ensure single row from each table
    SELECT t0.ItemCode, ( isnull(T0.TotalSales,0)-isnull(T1.TotalSales,0)) AS 'Total'
    FROM
    SELECT T0.ItemCode, SUM(T0.LineTotal) as 'TotalSales'
    FROM INV1 as T0
    --WHERE T0.ItemCode = 'ACR2401010'
    GROUP BY T0.ItemCode
    )as t0
    LEFT OUTER JOIN
    ( SELECT T1.ItemCode, SUM(T1.LineTotal) as 'TotalCredits',
    FROM RIN1 as T1
    --WHERE T1.ItemCode = 'ACR2401010'
    GROUP BY T1.ItemCode
    ) as t1
    ON t0.ItemCode = t1.ItemCode
    WHERE t0.ItemCode = 'ACR2401010'
    --Option 5 with grouping to ensure single row from each table.
    --Also assuming that sales or credits can be optional
    SELECT
    ISNULL(t0.ItemCode,t0.ItemCode) AS ItemCode,
    ( isnull(T0.TotalSales,0)-isnull(T1.TotalSales,0)) AS 'Total'
    FROM
    SELECT T0.ItemCode, SUM(T0.LineTotal) as 'TotalSales'
    FROM INV1 as T0
    --WHERE T0.ItemCode = 'ACR2401010'
    GROUP BY T0.ItemCode
    )as t0
    FULL OUTER JOIN
    ( SELECT T1.ItemCode, SUM(T1.LineTotal) as 'TotalCredits',
    FROM RIN1 as T1
    --WHERE T1.ItemCode = 'ACR2401010'
    GROUP BY T1.ItemCode
    ) as t1
    ON t0.ItemCode = t1.ItemCode
    WHERE (t0.ItemCode = 'ACR2401010' OR t1.ItemCode = 'ACR2401010')

  • Total sales to date per item

    Hello folks i need some help with SQL code i think. I need to get a report showing our best selling items, but the sales analysis is only showing recent stock (even if i specify 01.01.07 - 02.06.08).
    in theory this is a simple report. i just need ItemCode, ItemName and Total Sales.
    What is the table that contains total sales?

    Thanks Petr I have used the slightly amended code below:
    select coalesce((select sum(quantity) from inv1 where itemcode = oitm.itemcode
    group by itemcode), 0)
    +
    coalesce((select sum(quantity) from ige1 where itemcode = oitm.itemcode
    group by itemcode),0), itemcode, itemname
    from oitm
    but when i export this to excel the first column (quantity) becomes invisible. How do we make it appear, for example, as 'Total Sold TD'?
    thanks

Maybe you are looking for

  • Feed Not Working -- file problems?

    Hello, I am having some problems with my feed downloading. I had it working a while ago, but then I've deleted my only episode and started anew. I've checked with feedvalidator and it's ok... but I don't understand why it's not working now. I thought

  • Storing User defined reports in SQL Developer

    Hi All,      I have created some user defined reports in SQL Developer. My company requested me to update the OS from Win XP to Win 7. I forgot to export those reports. I got my machine back, they said that the data is retained. Now i need to take th

  • InDesign CS3 - placing PDFs and the Crop To option

    Hey, y'all. Still an old-schooler using InDesign CS3 (meanwhile, the person in the adjacent cubicle gets CS4, and she's not primarily in production or art...how is this fair?) Anywho, here's my dilemma... We receive PDF ads from our clients and we as

  • GH4 and h.264 MOV and FCP 7

    I'm just now figuring out how to edit 1080 HD h.264 MOV files from my Panasonic GH4. I have no trouble importing them, but as soon as I put these clips into the Timeline they need rendering. After rendered all is fine. I've read on-line that FCP 7 do

  • Anchor Guest 3.2.171.6 Web Authentication page issue

    Hi folks, I'm having issues with our Anchor controller here running 3.2.171.6. Using a chain certificate for our Web authentication re-direct Page to a WEB-server. sometimes the Guest Clients are not re-directed to the WEb authentication page. After