Residual Payment ABAP Logic

Hello Gurus!!!!
Do you know how I can obtain the amount of a residual payment in a Z program? For example, a have an invoice of 10,000 USD and I execute a residual payment of 3,600 USD. There is only left 6,400 for payment. How can I obtain the value of 3,600 searching in tables BSEG, BSAK, BSIK? Using logical database KDF complicates a little bit the solution.
Thanks!!!
Fernando.

Hi,
Whenever you use Residual Payment, then the Invoice Number (Original Document No.) field  and date gets updated in the BSEG/BSIK table.  With this you can get to know that this is a Residual Document for that Open Line Item and then you can get the amount as well.  Suggest you use BSIK table as this is the Secondary Index Table.
There is also one more way of handling residual item, which is by creating a separate document type for residual items.  I dont have an idea whether your company has a separate document type for the same.
Hope this info is of some help to you.
Award points if found useful.
Regards,
Venkat
Edited by: venkat bala on Nov 22, 2008 4:43 AM

Similar Messages

  • Regarding Residual Payment logic

    While runing AG report I need original invoice number for Residual Payment invoice amount
    For eg., Invoice amount Rs.10,000, customer paid Rs.2000 after 2 month he paid Rs.3000 then after 3 month he paid Rs. 4000. If i run AG report i need original Invoice number as reference.
    I need to inform to my technical team what is the logic in Residual payment and how we can bring the original invoice number in reference field

    Hi,
    For that you can create and assign installment process for that payment.
    Go to the transaction OBB8,OBB9
    Create Installment payment term and assign it.
    May be this information is useful to you
    If you have any doubt feel free to ask
    Regards
    Surya

  • Residual Payment Logic

    Hi All,
    In my project, i want to get the original accounting document no incase of residual payment made for reporting purpose. can anyone tell the logic to get the same?
    Thanks
    Lakshmi

    Dear,
    There is a field called inovice which will helpful to meet your requirement. When you create residual item against invoice then respective invoice number is filled in the Invoice field in the residual line item in the document.
    Regards,
    Chintan Joshi.

  • Link between Invoice and Residual payment

    Hello dear all,
    Is there any report that shows the invoice besides each incoming payment (in my case, residual payment) ?
    For example:
    Customer invoice: 1000
    Partial payment 1 : 400
    Partial payment 2 : 200
    In FBL5N, i do not have the customer invoice number besides these two incoming payment. Is there any other report ?
    Thanks

    Dear,
    This requirement can be filled with a custom report, you have to use the tables to get the required report.
    Use the tables:
    BSID-This table will list all the customer invoices
    BSAD-This will  list all your incoming payments against invoices.
    Ex: If an invoice is raise 100, then this will be available in the table BSID. But after the payment the data will be cleared in BSID and will be available in BSAD.
    But in case of residual payment, the original invoice will be cleared in BSID and will be available in BSAD. Here, a new document with the remaining balance of the invoice will be created and will be available in BSID. You can find the original invoice in invoice reference field.
    This will be feasible tell your requirement to ABAPer based on the above.

  • ABAP Logic in Transformations-Start or Field Routine

    Hi Experts,
    As i am new to BW Please update me with the ABAP logic  i need to implement in Transformation routine...and please advise me wether i can use that as a Start or field routine for a better performance.
    Target DSO:
    DSO A : Active Table:/BIC/AZDSOA
    Fields (ZLOC,ZPAY_ID,ZNPAY_ID,ZOPAY_ID & ZCHG_DTE)
    Source DSO
    DSO B : Active Table:/BIC/BZDSOA
    (ZLOC,ZPAY_ID)
    DSO C : Active Table:/BIC/CZDSOA
    Fields (ZLOC,ZPAY_ID,ZNPAY_ID & ZCHG_DTE(date))
    While Transfering Data from DSO B-->DSO A
    It should check DSO C for that ZLOC & ZPAY_ID
    If ZCHG_DTE IS Blank then it should pick ZNPAY_ID for that ZLOC & ZPAY_ID from DSO C and update ZNPAY_ID in DSO A
    if ZCHG_DTE IS not Blank then it should pick ZPAY_ID for that ZLOC & ZPAY_ID from DSO C and update ZOPAY_ID & ZCHG_DTE in DSO A
    ZPAY_ID - Pay ID
    ZNPAY_ID -New Pay ID
    ZOPAY_ID -Old Pay ID
    ZCHG_DTE -Change Date
    ZLOC     -Location.
    Logic in words:
    If Change date is Blank then it should pick new pay id for that Location & Pay Id and update NEw pay id field in DSO A
    If Change date is not Blank then it should pick  pay id for that Location & Pay Id and update old pay id field  & change date in DSO A
    Please update me with releavent code
    Thanks

    It must have something to do with your input variables - I ran this FM locally using my DOB and today's date and it worked fine.
    make sure your input date types are in the correct format for the FM.

  • Terms of Payment in case of Residual Payment

    Dear All
    I have made a Terms of Payment K1 for my Customer. After  making a residual payment, the terms of payment for the residual amount  is coming by default 0004. But I want it should come from Original Invoice payment terms...
    Please guide me.
    Kanwaljit

    Hi,
    Goto the TCODE  : OBA3
    in that check the payment terms given in the "Specifications for posting residula item for payment differences" category. Remove the payment term and select the "Payment term from invoice"
    VVR

  • ABAP LOGICAL ERRORS

    Expalin about ABAP Logical errors?
    Help me sending appropriate link to understand more.
    Moderator Message: Read the Rules of Engagement of this forum.
    Edited by: kishan P on Dec 27, 2011 9:50 PM

    Hi Vinay,
         You can't delete the ABAP Runtime errors. But  you can catch the errors using catch exception Statement.
    For Example,
    Class-based exceptions are handled in the following control structure:
    TRY.
      ...                       " TRY block (application coding)
    CATCH cx_... cx_... ...
        ...                     " CATCH block (exception handler)
    CATCH cx_... cx_... ...
        ...                     " CATCH block (exception handler)
      CLEANUP.
        ...                     " CLEANUP block (cleanup context)
    ENDTRY.
    Try This Sample Code,
    *--EXAMPLE FOR RUNTIME ERROR--
    *DATA : VALUE1 TYPE I.
    *VALUE1 = 1 / 0.        -
    >>>>>> IT MAKES RUN TIME ERROR.
    *WRITE : VALUE1.
    *-EXAMPLE FOR HOW TO CATCH THE ARITHMETIC ERROR AT THE RUN TIME USING SUBRC----
    DATA : VALUE1 TYPE I.
    CATCH SYSTEM-EXCEPTIONS ARITHMETIC_ERRORS = 1.
    VALUE1 = 1 / 0.
    WRITE : VALUE1.
    ENDCATCH.
    IF SY-SUBRC = 1.
    WRITE : ' IT MAKES ERROR'.
    ELSE.
    WRITE : VALUE1.
    ENDIF.
    Thanks,
    Reward If Helpful.

  • Abap logic in Transformation End Routine not working correctly

    Hi,
    I wrote a piece of code but during testing I found out that it doesn't meet my requirement.
    Requirement
    I want to extract Standard_Cost for all sales items that meets the conditon. but at the moment only the first sales item in the DSO is showing.
    I would like the following lines to display in the cube as well since the PLITEM is different.
    201021     PI31     REDBACK     999999A     78,850
    201021     PI31     FLXAAA     999999A     3154,000
    DSO Table
    CALWEEK     PLPLANT     PLITEM     SALESITEM     STRDCOST
    201020     IN06     FLXAAA     557868B     6308,000
    201021     FI24     FLXAAA     557868B     6308,000
    201021     FI24     FLXAAA     999999B     0,000
    201021     PI31     REDBACK     999999A     78,850
    201021     PI31     FLXAAA     999999A     3154,000
    InfoCube
    SALESITEM  PLPLANT       SALESDOC       STRDCOST
    999999A     PI31     1100000911         78,850
    Abap Logic
    Data ld_calweek(6) TYPE n.
    Getting the current week based on the system date.
    CALL FUNCTION 'DATE_GET_WEEK'
            EXPORTING
              date         = sy-datum
            IMPORTING
              week         = ld_calweek
            EXCEPTIONS
              date_invalid = 1
              OTHERS       = 2.
    Data rp TYPE tys_TG_1.
    LOOP AT RESULT_PACKAGE INTO rp.
    SELECT SINGLE STRDCOST FROM /N/ABC_EFG00 INTO
    rp-S_STRDCOST
    WHERE SALESITEM = rp-S_ITEMID  AND CALWEEK =
    ld_calweek AND PLPLANT EQ rp-S_SOURCE.
    MODIFY RESULT_PACKAGE FROM rp.
    Clear rp.
    ENDLOOP.
    How do I resolve this
    thanks

    Hi Vaidya
    Select single will always select the first entry from the source which matched your where condition.
    therefore you are not getting all the required data.
    WHERE SALESITEM = rp-S_ITEMID AND CALWEEK =
    ld_calweek AND PLPLANT EQ rp-S_SOURCE.
    according to your logic
    it will pick only one record e.g
    201021 PI31 REDBACK 999999A 78,850
    201021 PI31 FLXAAA 999999A 3154,000
    item id = 999999A
    plplant = PI31
    in this case it will pick only the first record due to select single will fetch only one record (whichever it gets first and which meets your where condition)
    You need to change your code logic and need to include more fileds which differentiates one record from another who have same valued as in your present where condition.
    Thanks
    Navneet

  • Limiting or control for Residual payment with reason codes

    Hi FI Gurus,
    When we are received or making payment to customer or vendor, sometimes we need to clear the invoice by receiving or making payments with small differences through residual payment. Is there any control for limiting residual payment.
    Lets have an example
    invoice posted for 1000
    customer dr 1000
    sales       cr  1000
    Partial payment recd 500
    cash/bank dr 500
    customer cr   500
    final payment received 350 and balanace amount adjusted with residual payment by defining reason code like rounding off difference. So in this case accounting entry will be
    customer cr 350  
    rounding off diff 150
    cash/bank 500
    being final payment agaisnt invoice
    My question:   Is there any way to restrict the residual payment like 10% or 20% of total invoice i.e. 100 or 200 and not more than 20% ?  other wise sometime user may adjust any amount may be 100000 through this way by putting the same reason code, which is not fair.
    I checked SPRO setting but i did not get anyt setting relating to above case.
    If any body know, please let me know? Thanks in advance
    Regards,
    Prakash

    Hi Lawerance,
    Thanks for reply.
    But I am looking for amount adjusted through residual with reason code. I dont think there is any limitation or control in the SPRO standard setting. Tolerance is preventing user to post document for more than a specific amount. But my question is something different.
    I want to control the user for adjusting amount from residual tab with selecting reason code. In other words user should not adjust more than some limit with residual payment by selecting reason codes. Thanks.
    Regards,
    Prakash

  • Duplicate invoice, partial payment, residual payment

    Hi every body
    I am facing some problems in AP
    1. I post a invoice in AP
    I see that there are two document number 190000006
    Please tell me why?
    2. I pay a invoice with amount of 200000 in two times
    firstly, I post a partial payment with amount 100000 (document number 1500000032)
    secondly, I post a residual payment with remaining amount 100000 (document number 1500000033)
    The invoice is paid completely and clear automatically but the are two documents (1500000032, 1500000033) is not cleared
    Please tell me the payment process? how to clear payment document?
    Thank in advance
    Minh

    Hi
    Pls check SAP standard program RPBNUM00 for document numbers assigned more than once,
    if your are using payment posting is using FB05 / F-53 transaction and in which Transfer Posting with clearing radio button is selected.
    Let me know for any clarifications required
    Regards,
    suresh

  • In T code F-28, residual payment tab is hideout

    Hi all,
    In F-28 for making customer residual payment, tab option is not appearing, I checked in Accounting editing options(Fb00) there "process open items with commands" and " Enter payment amt for residual amounts" were already selected.
    Eventhough the residual payment tab is hideout. Is there any thing we need to select for the tab.
    Thanks & Regards,
    Dharani

    Hi Chintan,
    Thanks for the reply. But there are no such validations.
    Regards,
    Dharani

  • Residual payment should not allow more than Vendor Invoice

    Hi,
    Eg: Vendor has booked invoice 5000 INR, when user make payment through F-53 or F-58 through "Residual" payment user can pay more than invoice 5002 INR and below accounting entry is posting.
    Bank Cr 5002 INR
            To  Vendor Dr 5000 INR (Invoice amount)
            To  Vendor Dr 02    INR  Excess than invoice 
    Business requirement is system should not allow pay more than invoice amount. How to control suggestion would be appreciated.
    I have done below settings for your understanding here system configuration.
    1. OBA3: Under "Permitted Payment difference" zero for Gain , Loss , Amount, Percent & Adjust Discount By  However "Permitted Payment Differences for Automatic write-Off(Function code AD)" zero.
    2. OBA4: Cash discount per line item: Zero and Under "Permitted Payment difference" Revenues, Expense, Percent & Cash discount  put Zero.
    Regards,
    Babu.

    Hi Prashant,
    I have restricted many fields to use through screen variant now user can not pay more than Invoice amount except through Residual payment process.
    Client side management strongly says that they want to use Partial and Residual payment process options but user should not allow pay more than invoice amount.
    If any solution please guide me.
    Regards,
    Babu.

  • Invoice reference for residual payment

    HI experts
    I observed if I receive the payment from customer  Rs 10000 for the invoice Rs15000 through residual payment then system creates new line item for Rs 5000 and this will be shown as open item and all others will be clered items.
    Here my issue is  for new line item system is not storing the original invoice details in invoice reference  field. How to maintain source invoice details to residual new line item.
    Pls advice me
    Thanks in advance
    Sneha

    Hi,
    Anil is correct. All the details you entered in your incoming payment document when you posting your residual payment, will be displayed in the new line item created after that. My practice last time is that I will maintain the original invoice number at Reference field as suggested by Anil and entered my PO or SO number at Document header text.
    If you don't wish to lose all the original details, you can use partial payment tab instead of residual. Partial payment will post the incoming payment without clearing any item. Then you can clear it off all together when you are posting for the last incoming payment for that particular invoice.
    Hope this help.

  • Residual Payment vs. Partial Payment: Design considerations

    We need to decide between implementing residual payment vs. partial payment. We will be implementing payment processing.
    I would like to understand why one would choose one method over another?
    What is the benefit of clearing original invoice and creating a new line item for the balance (as in case of residual payments)? There is a setting that allows user to capture the original invoice date at the time of payment processing while using residual payment, which I believe makes the residual payments same as partial payments, so again, why would one choose one method over another? 
    I would like to understand the benefits & limitations of each method.
    How does the decision to implement a method get impacted if reason codes are to be implemented, which method would offer a better solution considering reason codes requirement?
    Appreciate your inputs.

    Hi,
    In manual processing of incoming payments, it is of course the user who can make the decision to either make residual item, or a partial payment.
    In automatic processing of incoming payments:
    For electronic bank statements, payments that the system cannot match with open items will end up in post-processing; there the user can again choose either residual item or partial payment.
    For electronic payment advices, I know that there is configuration to match customer information for payment deductions in the payment advice, with you own reason codes, and that based on the information the system can create the residual items automatically. Of course, this is only relevant if your customers actually send you electronic payment advices with such information included.
    Regarding reason codes, you will always use reason codes with residual items; to indicate the reason for deduction for follow up in your A/R dept, and possibly to make use of the automatic write off (you can configure reason codes to automatically write off the payment deduction to some G/L account of your choosing; you would use that e.g. if the payment deduction is too small to bother).
    For partial payment, you could use reason codes I guess, if you want to in that way mark the item for some reporting or follow up purpose.
    Regards,
    Rob

  • Customer residual payment  in F-28 urgent

    Hi,
    I am trying to create residual payment for customer in F-28. But when I post the payment of 50 $ against invoice of 300$ it is creating a invoice of 350$. So it is not reducing it & making it 250 for new residual invoice but creating a residual invoice for 350 $ . Tell me why its not creating a new residual invoice for
    250.
    please help..its urgent.
    Thanks
    Nik
    Edited by: Nik Wallace on Jun 18, 2008 7:49 PM

    generally what i do to post residual payment is goto F-28 enter the amount i want to post i.e in this case $50. fill all the fields like ref, bank acc#, customer acc# etc.
    next click on process open items and then click on 'residual items' tab.
    next double click on invoice you want to pay against so that it alone appears in blue and rest all other appears in black.
    once you select the invoice you want to pay against, double click on the blank residual field. The field automatically gets filled with $50 you entered earlier and the difference postings become 0.
    award pts if it is helpful
    thanks
    Edited by: prince light on Jun 18, 2008 9:17 PM

Maybe you are looking for

  • Adding a new view in Account Identification

    We have a requirement to add a new view beside Installed Base| Object. I maintained entries in Object Component and Ac Identification Profile. While navigating to the new view there is an exception. Cannot display view CRMCMP_BPIDENT/ObjectCompVs of

  • Recording from webcam into fcp

    Can you record video from a web cam directly into FCP?

  • IOS5 upgrade/iCloud/Loss of Photos

    Finally got around to upgrading my iPad(1) with iOS5....somehow in doing so  I 'lost' all the photos on the iPad.  I have duplicates of the photos on my iMac. Can I,  and if so how, transfer photos from the Mac to the iPad?  Both 'puters are using iC

  • Tax code MIRO

    Hello to everyone, In spain actually the tax code change from 16% to 18%. Then, i create the new tax code in FI , but when i run the transaction MIRO ( Enter Incoming Invoice ) dont appear that new tax codes that i created... Anyone could help me???

  • Queue_not_empty error while applying patch

    I am getting the following error message while applying SEM patch on IDES BW3.5/SEM 4.0  on Windows 2003 server and having Oracle 9i as database Error in phase : Check_Requirement Reason for error : Queue_Not_Empty Please resolve this issue as I requ