Customer Allocated Balance

Hello Experts,
One of our clients does sales and service business. Here is a requirement that i am wokring on
Customers call and  allocate say $12,000 budget ( For Item Type orders)  ( I have field in OCRD, U_POIBdgt)
Customers call and allocate say $12,000 budget ( For service orders) ( I have field in OCRD, U_POSBdgt)
I also have two fields to display available budget respectively
OCRD, U_IBalAva  ( this should be U_POIBdgt-SUM(all open Item orders))
OCRD,U_SBalAva ( this should be U_POSBdgt-SUM(all open service orders))
A person from Customer's Office order some items , say $2000 ( Item Type Order)
Sales guy adds the items on Sales Order and add the document . In this case the customer used $2000 out of his $12,000 budget.
Simillarly
A person from Customer's Office place service order, say $2000 ( ServiceType Order)
Sales guy adds the service order and add the document . In this case the customer used $2000 out of his $12,000 budget.
Is it possible to update Aval Balance fields when user adds document? Please advise me on how to achive this.

Praneeth,
Just assign the below given formated searchs to your Item Available Balance field and Service Available Balance Fields, respectively.
Item Available Balances:
Select ($[OCRS.U_POIBdgt] - sum(T0.doctotal))
from [ordr] T0
where T0.cardcode = $[OCRD.CARDCODE] and T0.doctype = 'I' and T0.DocStatus = 'O'
Service Available Balances:
Select ( $[OCRS.U_POIBdgt] - sum(T0.doctotal))
from [ordr] T0
where T0.cardcode = $[OCRD.CARDCODE] and T0.doctype = 'S' and T0.DocStatus = 'O'
Assign to your U_IBalAva and U_SBalAva fields.
This should work fine.. I have tested on my database.
Regards
Reno.
Edited by: Reno on Mar 25, 2011 9:16 AM

Similar Messages

  • How to fetch the customer debit balances form the KNC1 database table

    Hi Experts,
    I am creating a ABAP report which would dispaly the customer credit balances for the currenct fiscal year.
    I am fetching the values form KNC1 database table.....But in this table values are stored year wise.
    But I want to display for the current fiscal year that means if teh user selects the 07/2011 as the month on the sleection screen then the debit balances from 072010 to 062011 should be dispalyed.
    Could anyone please help me out to fetch this the debit balaces form KNC1 database table in the above format.
    Or is there any other way to solve this problem?
    Awating your urgent reply.
    Many Thanks,
    Komal.

    Hi Komal,
    First, you have to compute the initial period and the final period.
    Next, you must read table KNC1 for the years comprised between these two periods.
    Last, you must read the fields of table KNC1. For that, you should compose dynamically the name of the field, and then ASSIGN it to a FIELD-SYMBOL.
    Now, just add up the values!
    Please try the following code:
    FIELD-SYMBOLS: <fs>.
    DATA: t_knc1 TYPE TABLE OF knc1 WITH HEADER LINE.
    DATA: d_debits LIKE knc1-um01s.
    PARAMETERS: p_kunnr LIKE knc1-kunnr,
                p_bukrs LIKE knc1-bukrs,
                p_spmon TYPE spmon.
    DATA: l_fieldname(20) TYPE c.
    DATA: l_date LIKE sy-datum,
          l_date_from LIKE sy-datum,
          l_date_to LIKE sy-datum.
    DATA: l_period(2) TYPE n.
    DATA: l_num_times TYPE i.
    START-OF-SELECTION.
    "Compute the initial and final periods
      CONCATENATE p_spmon '01' INTO l_date.
      CALL FUNCTION 'RE_ADD_MONTH_TO_DATE'
        EXPORTING
          months  = '-1'
          olddate = l_date
        IMPORTING
          newdate = l_date_to.
      CALL FUNCTION 'RE_ADD_MONTH_TO_DATE'
        EXPORTING
          months  = '-12'
          olddate = l_date
        IMPORTING
          newdate = l_date_from.
    "Read table KNC1
      SELECT *
        INTO CORRESPONDING FIELDS OF TABLE t_knc1
        FROM knc1
        WHERE kunnr = p_kunnr
          AND bukrs = p_bukrs
          AND gjahr BETWEEN l_date_from(4) AND l_date_to(4).
    "this will yield at most 2 records, one for present year, and another one for the previous year.
    "but if you select i.e. period '01.2012', initial_date = '01.01.2011' and final_date = '31.12.2011'
    " --> thus only one year --> one record
      CLEAR: d_debits.
      LOOP AT t_knc1.
    " If there's no year change
        IF l_date_from(4) = l_date_to(4).
          DO 16 TIMES.
            l_period = sy-index.
            CONCATENATE 'UM'      "compute dynamically the field name
                        l_period
                        'S'
              INTO l_fieldname.
            ASSIGN COMPONENT l_fieldname OF STRUCTURE t_knc1 TO <fs>.   "assign
            ADD <fs> TO d_debits.                  "and add up
          ENDDO.
        ELSE.
    " If there IS a year change
          IF t_knc1-gjahr = l_date_from+0(4).
            l_num_times = 16 - l_date_from+4(2) + 1.    "you must loop 16 - initial_period + 1 times for the first year
            DO l_num_times TIMES.
              l_period = sy-index + l_date_from+4(2) - 1.
              CONCATENATE 'UM'                "compute dynamically the field name
                          l_period
                          'S'
                INTO l_fieldname.
              ASSIGN COMPONENT l_fieldname OF STRUCTURE t_knc1 TO <fs>.    "assign
              ADD <fs> TO d_debits.              "and add up
            ENDDO.
          ELSE.
            l_num_times = l_date_to+4(2).            "you must loop final_period times for the second year
            DO l_num_times TIMES.
              l_period = sy-index.
              CONCATENATE 'UM'               "compute dynamically the field name
                          l_period
                          'S'
                INTO l_fieldname.
              ASSIGN COMPONENT l_fieldname OF STRUCTURE t_knc1 TO <fs>.     "assign
              ADD <fs> TO d_debits.        "and add up
            ENDDO.
          ENDIF.
        ENDIF.
      ENDLOOP.
    You'll have the result on variable 'd_debits'.
    I hope this helps. Kind regards,
    Alvaro

  • Page Breaks for Customer Open Balance Letter when printing

    Hi All,
    We are running 'Customer Open Balance Letter' report and printing the output(View Output). Which is printed irrespective of page breaks.
    I mean print is like in a single page two letters got printed, which in not expected.
    Are we missing any thing in print setup or the way of printing.
    Please let me know the possibilites of printing a letter per page or different letters printed in different pages without customization of that report.
    thanks in advance.
    Edited by: 834095 on Jun 1, 2011 2:34 AM
    Edited by: 834095 on Jun 1, 2011 2:34 AM

    What is your application release?
    What is the type of the report (text, postscript)?
    Is the issue with this specific report only? Can you reproduce the issue if you print to another printer?
    What if you download the output file to your desktop and print it, can you reproduce the issue then or it is when you print directly from the application only?
    Please post the details of the printer setup/style/driver.
    Thanks,
    Hussein

  • Customer Open Balance Aging Report S_ALR_87012178

    hello,
    we are using this report Customer Open Balance Aging Report S_ALR_87012178 but when run, it brings customers' names from VD03 search field, instead it would be handy to see full names from Name-field. I understand S_ALR_87012178 is a static report, but my question would be is there any other transaction/report which shows the same but with customers' full name?
    thanks in advance

    S_ALR_87012178 is the only standard customer aging report.
    Following two solutions I could think of to fit your requirements.
    Develop a custom report by copying standard customer reports that have full customer name and make changes according to your need.
    Or
    In report S_ALR_87012178 the customer name is populated in Address field. So you can use this field as your customer name and develop a custom report.
    Thanks

  • Customer Open Balance

    Can we get Customer open balance based on inventory organization
    I need to customize Report customer open Balance Report to drill down
    open balaces based on inventory organization instead of operating UNit
    Thanks
    Sankuratri

    When you post the partial payment, the system marks the document number of the original open item in the line item for the partial payment. The original open item and the partial payment remain open.
    The system stores the document number, fiscal year and number of the invoice item in the partial payment. <b>You can find this information in the 'Payment for' field.</b> Thus you can refer to the original open item from the partial payment. When you post the remaining amount for the invoice, both the partial payment and the invoice are cleared.
    This is per documentation for <a href="http://help.sap.com/erp2005_ehp_02/helpdata/en/01/a9bb94455711d182b40000e829fbfe/content.htm">partial payments</a> , you may want to test it out. Hope a similar feature is available for credit memos.

  • SAP table for customer account balances by document currency

    Hi experts,
    We have a requirement to produce a monthly customer statement by customer currency or customer's document currency. Example is that the company code local currency is USD and the customer currency is EUR. The customer will be allowed to carry over a balance to next period under a certain threshold so there will be a carry over beginning balance from the previous period which needs to appear on the statement. Transaction FD10N only displays customers balances in the local or company code currency which is USD in this example.
    Question: Does anyone know if there is an SAP table that stores period beginning balances by customer account currency or customer's document currency?   
    We have not been able to find one and want to get additional input prior to building our own custom table.
    Many thanks in advance for your assistance.
    Regards,
    NormaF

    Hi:
        Make use of BAPI_AR_ACC_GETKEYDATEBALANCE to calculate customer opening balance. You need to develop Z report using table BSID and BSAD other SD related tables . There is not SAP standard report that shows the customer opening balance as carried forward from previous month.. You can make alteration for for showing balances in document currency.
    Regards

  • Vendor /Customer Trial Balance between a particular date

    HI
    Is there a standard report in SAP which provides Vendor/Customer Trial balance. We are using the standard  SAP Reports for
    Vendor S_ALR_87012082 Vendor balances in local Currency
    Customer S_ALR_87012172 Customer Balances in local currency
    We also need to filter the data in Trial Balance based on profit centers. All our plants are created as profit centers
    Regards
    Sanil Bhandari

    na

  • Customer Credit Balances upload probelm in DTW of SAP 2007 B Patch Level 11

    Dear All,
    I am using SAP 2007B Patch 11. When i am trying to upload customer credit balances thorugh the DTW of the same patch (11), then DTW shows no error and says uploaded successfully. But when i open the front end then the entries are not showing there. I am using oCreditNotes on DTW to upload the customer credit balances. I also checked up the table RIN1 but ot does not shows any record. What can be the possible issue?
    Regards,
    Rahul

    Yes i did removed the 'Test Run' tickmark. Anyways i have managed to solve that problem as i have made some fields mandatory in the credit note form thorugh the Sp_Trsansaction stored procedure. After removing those validations the entries has gone perfectly.

  • Help with RAW files and custom white balance.

    ive long had this issue with RAW shooting and adobe photoshop and lightroom, my main subject is a saltwater reef aquarium that is lit by artificial lighting, i shoot canon and use the custom white balance setting to get everything looking proper and it works good.. to an extent.. if i shoot jpg the photos all turn out as shot, if i shoot RAW the white balance in adobe programs is totally messed up and you cant fix it.. if i use DPP by canon, its perfect and looks just as shot or just a a jpg would look.. my question is how can i get adobe lilightroom to render my RAW files correctly.
    below are all 3 images, first one was converted and exported to jpg in canon DPP without any adjustments and is what the photo should look like, second has been exported from photoshop, and 3rd i added a link to the actual RAW file. why cant my lightroom interpret these properly?
    heres a link to the actual RAW file
    https://www.dropbox.com/s/5a39ctllwgrem7a/_MG_8971.CR2
    this was a raw converted in canon dpp, and its what the aquarium looks like, and is what the photo should look like. just to note, any other editing or viewing program besides adobe products all render the image correctly.
    this is what photoshop and lightroom do to my Raw files, theres no way to adjust anything to get even remotely close to correct..

    The white-balance Temperature of this image as computed by the camera is way beyond the 50,000K upper limit as you can see when you open the file in LR or ACR, so Adobe cannot reach the As Shot WB temperature number and stops at 50,000K which is still too blue -- although EXIFtool says:  Color Temp As Shot : 10900, so maybe Adobe's wildly high 50,000K number is based on a faulty camera profile that exaggerates blues:
    However, using the Camera Standard makes things not nearly so garish blue, and it is possible to use Photoshop to neutralize things even more:
    However, as you say, other raw converters do ok with this image despite the high WB temperature, so I think the Canon T3/1100D profile needs some work, but probably won't get it since it is not a high-end camera.
    For example, here is the default conversion from LibRaw that is part of RawDigger, and in my opinion is an improvement on the camera rendering though perhaps lacks a bit of saturation:
    As another example, here is RawTherapee's conversion, after I neutralized the auto-tone and color values it applies by default, and appears to be a bit too saturated but that could be easily adjusted:
    I would agree that Adobe is doing something wrong with this camera in this lighting.  A clue is the bright green color of the top-central coral which seems to be yellow in the non-Adobe renderings.

  • Reclassification of Customer & Vendor Balances in Group Currency

    Hello
    It is with regards to the Reclassification of Customer & Vendor
    Balances vide T Code FAGLF101 - Sorting/Reclassification (New) as per
    IFRS.
    The reclassification entries are getting generated in Document & Local
    Currency but no values are getting accounted in Group Currency. The
    reclassification entries should also get accounted in Group Currency.
    We had also implemented following notes related to the same but were
    unable to get the required results.
    1365637 - FAGLF101: Transaction currency amount in postings
    1463016 - FAGL_CL_REGROUP: Additional local currencies (re-
    measurement)
    1493437 - FAGLF101/FAGL_CL_REGROUP: Additional local currencies
    Can some one please comment why the entries are not be flowing in Group
    currency in IF ledger. OR are there any additional notes need to be
    implemented.
    Regards
    Atul

    Hi Atul............
    This language seems you are asking your doubts related to some other version of SAP and this is SAP Business One Forum.
    You are requested to post your question to correct forum because unfortunately you can not get any help from this forum.
    And if you have the other doubts regarding same version then please close all those threads and post it to right one....
    Regards,
    Rahul

  • F-32 to clear the Customer Account Balances through BDC

    Dear Experts,
    My requirement is that i need to clear the customer account balances . It can be cleared manually thru tcode F-32.
    But i need to automate the process by writing BDC or BAPI or any FM.
    Pl help me by providing some inputs on that. Also help me by suggesting how i can do that.
    We have created BDC it is not giving any error but effect is not going to original documents.
    It is preparing posting documents (FB03) but items are still open in open list(FBL5N).
    My email: [email protected]
    OR [email protected]
    Can someone guide us.
    Thanks in advance.
    Mahendra Darwatkar

    I've done something like this. The first thing you need to do is to get your functional analyst to walk you through the process he wants you to use and then do a recording (SHDB).
    Rob

  • Related Data Source for Customer Trial Balance Report

    Hi Guys,
    Can any one please let me know the related Datasource, DSO and Cube available to develop Customer Trial Balance report on BEx.
    <b>My required Row/Colum objects are</b>
    <b>KPIs    Calculated/restricted     Formula/Logic     Unit     Authorisation</b>
    Total                Calculated     Sum of all the          Quantity
    invoiced                                     invoices for a
    Quantity                          FME
    Proposed
    Base Price        Calculated     Average price            Amount
                                                    for all invoices
                                                    per FME     
    Average Eqv.
    Base Price        Calculated     Average price            Amount
                                                    for all invoices
                                                    per FME     
    Price
    Difference             Calculated     Proposed Base         Amount
                                                    Price -  Average
                                                     Eqv. Base Price          
    <b>The aggregation behavior of the individual KPI</b>
    Key Figure                                  Aggregation            Characteristic             Time
                                              (Sum, Max, Last)          
    Net Debit Amount                         Sum                           All                  All
    Net Credit Amount                         Sum                           All                  All
    Total Debit Amount                         Sum                           All                   All
    Total Credit Amount                          Sum                          All                   All
    <b>Characteristics</b>
                         Hierarchy     Display Authorisation     Selection     Status/Mapping
    Customer Number                                 Yes     KNA1-KUNNR
    Customer Name                    
    Business Area                                  Yes        PRCTR
    Special GL Indicator                                  Yes                        Company Code                                   Yes      BKPF-BUKRS
    Industry Code                                     KNA1-BRAN1
    This is how my Functional Spec is..
    Please let me know ASAP.
    Thanks
    Murali

    hi,
    You can use this report.
    RFSLD00 Trial balance
    For Further Reference use the link.
    http://www.abapcode.info/2007/06/standard-sap-reports.html
    Regards
    Sumit AGarwal

  • Customer credit balance to include linked vendor balance

    Hi Expert,
    As per requirement, i need to include Vendor balance (associated to customer master) in customer credit balance (Table KNKK - Filed Receivables).
    Can you provide any pointer towards this on how the same can be achieved (either by SAP configuration OR Z Developments).
    Thanks in advance...
    Regards,
    Ravi Mantri

    Hi
    Enter Customer Number in Vendor Master (General data/Control data) and go to Company code data /payment transactions tab and select clearing with vendor check box
    Do the same in Customer Master as well by linking with above Vendor.
    Srinivas

  • Sap standard report for customer trial balance based on business area wise

    hi experts,
                    Can any tell me is there any standard report for customer trial balance based on business area.

    hi,
    You can use this report.
    RFSLD00 Trial balance
    For Further Reference use the link.
    http://www.abapcode.info/2007/06/standard-sap-reports.html
    Regards
    Sumit AGarwal

  • Creating entries in customer/vendor balance without posting

    Hi,
    I like to know is there anyway to add customer/vendor balance without posting that impacting the book?
    Sample like interest calculation to be keep track into customer balance but there is no FI posting that impacting the book. When i displaying customer balance the interest is shown but there is no FI posting for it.

    Anyone have any comments or suggestion?

Maybe you are looking for

  • Variable size

    So boolean is 1 byte byte is 1 byte short is 2 bytes int is 4 bytes long is 8 bytes . How many bytes are float and double? How many bytes has a pointer? Can I look this up somewhere on this website or in the documentation? I have not found it. Is the

  • Transfer disks from 2008 MBP to 2011 MBP?

    My early 2008 MBP died (Apple Genius said logic board), so I took the opportunity to purchase a refurbished early 2011 MBP from the Apple Store.  On the original MBP, I had replaced the HDD with an SSD and replaced the optical drive with a 7200 HDD.

  • How to adjust ALV size in ITS application? Please Help!

    Hi Experts,       I have a ABAP program that shows a ALV report using function module - REUSE_ALV_GRID_DISPLAY. This ABAP program I have web enabled using ITS (SICF transaction). When I see the ALV on the browser, It has only 10 rows but still vertic

  • Cant install Windows as PVM - Linux works properly

    I am playing recently witn OVM 3.1.1. Everything is fine LInux (RedHat, Oracle Enterprise LInux) was installed properly using PVM emulation using ftp as mountpoint for iso images - like in documentation. I can't emulate virtual machines as HVM becaus

  • Error when registering potential supplier in the SUS client

    Dear experts, We have configured the supplier qualification process in SRM We are on SRM 7 EhP1. Customizing switch SRM_701_SUCO_SUP_REG is active We have set up SUS in a seperate client than SRM. When trying to register a potential supplier I'm gett