Credit check program LVKMPFZ1

hi ,
the below code i have written for checking the credit customer group.
what it is happeing suppose one credit customer group is having 5 customer.
its showing information message 5 times.
how to make it only one time information message.
while debugging i found that after click k in information messge again it s going to same program.
any idea??
FORM USER_CREDIT_CHECK1 USING   UCC1_UPDATE
                                UCC1_KKBER
                                UCC1_KNKLI
                                UCC1_FLG_ORDER
                                UCC1_FLG_DELIVERY
                          CHANGING UCC1_RC.
CLEAR UCC1_RC.
data : begin of it_knkk occurs 0,
     KUNNR type knkk-KUNNR,    "Customer Number 1
     KKBER type knkk-KKBER,    "Credit control area
     KLIMK type knkk-KLIMK,    "Customer's credit limit
     SKFOR type knkk-SKFOR,    "Total receivables
     GRUPP type knkk-GRUPP,    "Customer Credit Group
     end of it_knkk.
data : begin of it_knkk1 occurs 0,
     KUNNR type knkk-KUNNR,    "Customer Number 1
     KKBER type knkk-KKBER,    "Credit control area
     KLIMK type knkk-KLIMK,    "Customer's credit limit
     SKFOR type knkk-SKFOR,    "Total receivables
     GRUPP type knkk-GRUPP,    "Customer Credit Group
     end of it_knkk1.
select
    KUNNR
     KKBER
     KLIMK
     SKFOR
     GRUPP
     from knkk
     into  table it_knkk
     where
     kunnr = UCC1_KNKLI
     and KKBER = UCC1_KKBER .
select
    KUNNR
     KKBER
     KLIMK
     SKFOR
     GRUPP
     from knkk
     into  table it_knkk1
     for all entries in it_knkk
     where GRUPP = it_knkk-GRUPP .
data : cred_lim type knkk-KLIMK.
data : recev type knkk-SKFOR.
sort it_knkk1 DESCENDING  by  KLIMK   .
read table it_knkk1  index 1.
cred_lim = IT_KNKK1-KLIMK .
**flag = '1'.
sort it_knkk1 DESCENDING  by  SKFOR .
read table it_knkk1  index 1.
recev = it_knkk1-SKFOR.
if recev GE cred_lim .
*read table it_knkk1  index 1.
*if it_knkk1-SKFOR GE IT_KNKK1-KLIMK.
message 'Customer Group Oldest Open Items Over due' type 'I'.
endif.
CLEAR UCC1_RC.
ENDFORM.
regards
chnadramani

i used statics flag

Similar Messages

  • Credit check on the basis of quantity

    Hi Gurus
    The requirement is such that the credit check is to be configured on the basis of quantity. A customer is fixed with a total order quantity of 1 lakh and if the quantity goes beyond 1 lakh the system error should come.
    Thanx and Regards

    May be you can check whether if you can do this via a user exit for credit limit. You can follow the below steps
    1) Create a Separate risk category for this customer.
    2) and assign a User Exit check for this category customer in OVA8
    3) Modify the User exit  to your requirement.
    The User exit which can be used for this purposes are...
    LVKMPFZ1: USER_CREDIT_CHECK1
    LVKMPFZ2: USER_CREDIT_CHECK2
    LVKMPFZ3: USER_CREDIT_CHECK3
    There are three buttons of User exit in the OVA8 Screen. each button is numbered as 1,2,3 internally, if you mark User exit 1, then modify the first program  .... like tht..
    also you can explore the option of having a Quantity contract.. Create a QC for 1lakh Qty and try to refer this QC when ever u are creating the order.  Of course this will not stop you from creating an order with more qty, unless you explicitly throw an error..
    Rgds
    Srini

  • Sales document (order) credit check

    Dear colleagues,
    we have an automatic credit check in sales orders . Days overdue - oldest open item.  (OVA8)
    We want to change this, checking not the overdue days of the oldest open item but the days from create date (of the oldest item) to current date against a specific limit of days for the specific credit area-risk category-doc.
    Any help will be appreciated.
    BR
    John

    Hello John,
    there is no standard customizing solution for your request.
    You might program you requirement in user function 1 in credit management by using
    LVKMPFZ1 (FORM USER_CREDIT_CHECK1). If you branch into function module SD_ORDER_CREDIT_CHECK you can use the coding of FORM OLDEST_OPEN_ITEM_CHECK as an example for your needs and change the dates that you would like to check.
    Best regards, Baerbel

  • User Exits for Credit Check

    Hi Friends,
    I got user exits for credit check but I could not understand how to implement these rather these are not found in system (CMOD & SMOD tcodes) We have ECC6.0. These are the following.
    LVKMPTZZ
    LVKMPFZ1: USER_CREDIT_CHECK1
    LVKMPFZ2: USER_CREDIT_CHECK2
    LVKMPFZ3: USER_CREDIT_CHECK3
    Any help how to implement these is appriciable.
    Regards,
    Rajesh Vasudeva

    Hi Rajesh,
    You can make use of the implicit enhancement, where in you can add code to any standard program either at the start or after the last line in a form or function module.
    Refer the URL
    http://help.sap.com/saphelp_nw04s/helpdata/en/8f/f2e540f8648431e10000000a1550b0/frameset.htm
    for more info on Enhancement Framework.
    Hope this helps you.
    Reg
    Praveen Alex Luke.

  • Credit Check with Third Party Process

    Hi Gurz,
    I know about third party process but my problem is with credit check of the customers.
    If customer has not got enough credit limit to process the order in normal senario credit controller has to manually release the order as system blocks it. In third party process system will give you warning message when saving sales order about customer credit limit but allows you to save sales order. Once saving sales order it authomatically creates Purchase Requisition. From PR purchasing creates P.O. with out knowing about customer credit limit issue. and so on. In other words goods supplied to customer even though credit limit has exceeded. This user don't know untill raising the invoice to the customer which is too late.
    Can we stop creating Purchase requisition or block purchase requistion for credit check ? or there are better way of handling the process for credit check?
    Thanks in advance

    Hi,
    Try to implement OSS note -738171 - Delivery block does not influence purchase requisition.
    Following is the details of the note;
    Summary
    Symptom
    The delivery block in a sales order does not prevent the generattion of the purchase requisition in a third-party or individual purchase order item. Regardless of the Customizing settings in the delivery block, the system confirms the TAB or TAS item and generates the purchase requisition.
    More Terms
    Order, purchase requisition, PReq, TAB, individual purchase order, individual purchase order item, TAS, third-party, third-party item, SD order, delivery block, VBAK-LIFSK, VBEP-LIFSP
    Cause and Prerequisites
    Solution
    Create a user-specific user requirement (for example, 902: BEDINGUNG_PRUEFEN_902 in Include LV07A902) as a copy of standard user requirement 102 and assign it to requirement 'Preq' by using Transaction OVB5.
    In the source code of the user-requirement, program a check for the delivery block which, if necessary, triggers an ERROR_EXCEPTION which prevents the generation of the purchase requisition.
    You can use the existing check for the credit block as a template.
    Regards,

  • Expired Scheduling Agreements still in Credit Check / Rescheduling

    Hello everyone,
    I am running into an issue with expired Scheduling Agreements on the SD side (VA31,VA32, etc.).  There are many Scheduling Agreements that expired on a range of dates from 2005 to 2009, SA's that customers will not send JIT delivery schedules for anymore and are basically just out in the open and unused.  The issue is that these Scheduling Agreements are still being taken into account when a credit check is run.  Additionally, when our rescheduling jobs run at off-hour times, the system is still attempting to allocate materials to these orders.  The main problem with this is that it causes additional processing time for the rescheduling job.
    The current business process for these old Scheduling Agreements is to reject all the line items within the applicable SA, and as a result our rescheduling jobs avoid these orders, and they do not show up in VKM4.  However, the Valid To date in the SA is clearly in the past and I'm wondering if there is a way to have these closed without having to reject every line item.
    Any help would be greatly appreciated.

    Andy
    For credit check I would recommend:
    1) Using your own routine to exclude expired sch agreements in OVA8- Document controlling- 'No credit check' field.
    2)  rejecting at header level/ using "mass'.
    For Rescheduling
    1) Using button "Unconfirmed documents required" checked.
    2) Creating your own copy of the program SDV03V02  including document number, document type in the selection fields and creating a variant excluding specific, expired Sch Agreements. To reduce processing time, you may also try the 'divide and rule' policy and  execute several parallel/serial runs by using ranges of materials, plants, document types. I am sure you might have already tried this.
    Hope this helps.

  • Orders going on credit check hold in oracle

    New sales order is getting hold even there are open credits (Unapplied Receipts & AR Account Credits with open balance)
    Example
    However there are open credits (Unapplied Receipts & AR Credits with open balance) to the tune of $200
    If we don’t consider the AR Credits, the Outstanding Invoice Balance is “$900” .
    To this if I add the Outstanding orders in OM for this customer as per the “Orders on Credit Check Hold Report”- $250—That will put the total balance as $1150
    This balance exceeds the credit limit of $1000
    To prove this theory I have applied some Invoices to the $200 receipt there by bringing down the open Invoice Balance and then entered an order and that new order did not go on Hold.
    Is this the solution to get rid of hold or its something else?
    Thanks

    This could be one of the solutions.
    Alternatively, you could review your Credit Hold setup to check that what all transactions are being considered when calculating the credit amount.
    Also there is a concurrent program which needs to be executed so that the calculation is refreshed periodically.
    Regards
    Edited by: ssuhasar1 on May 28, 2012 6:20 AM

  • To release credit check while creating sales order

    Hi,
    I have a requirement of releasing credit check for list of open sales orders of a customer while creating a new order in VA01 for a customer.
    E.g in va01,i'm creating sales order for kunnr ABC
    for kunnr ABC, open sales order existing in database are 1,2,3,4
    So i need to release credit check for 1 2 3 4 while creating a new sales order in VA01.
    If i use FM 'SD_ORDER_CREDIT_RELEASE' in VA01 user exits it again call standard program and gives some error.
    I need to know the exact point to implement the code if someone can help and also if there is another way of releasing credit check other than above FM.

    Hello,
    Why don't you use the include MV45AFZZ, userexit USEREXIT_SAVE_DOCUMENT_PREPARE.
    You can write your code to identity all the sales orders that are due to be released for a customer and then release them.
    Edited by: Kanwardeep Singh Gill on Apr 8, 2010 5:28 AM

  • Turn on Credit Check in CRM 5.0

    Hello friends,
    I need to active credit check in CRM 5.
    I followed SAP HELP, and configured just
    "Customer Relationship Management,  CRM Middleware and Related Components, Communication Setup, Define Middleware Parameters"  and I defined the parameters as follow:
    key: CRMCREDCHE,  parname: CRMCREDCHE, rfcdest: ZLT100
    In sales order clicking on credit check button didn't anything happened. No Status change, no error message, nothing.
    Removing this parameters and clicking on credit check button the system show message that RFC destination is missing.
    In ECC system credit check is working OK.
    Do I need additional configuration in CRM to credit checks work ?
    Very thanks for your help, and any help will be rewarded
    Lalas

    Hi Praveen Rangineni 
    We gave up to use standard credit check because didnu2019t work.
    We created a abap program with rfc connection to ECC to do the credit check.
    Details to construct this abap program we got here at SDN, unfortunately I donu2019t have the link to the message, and I not working for the same company, so I donu2019t have access to the program.
    Sorry, I canu2019t help you more.
    Lalas

  • Modify the Overall credit check status in Sales order

    Dear all,
    Good morning/afternoon/evening!
    I have a question that how to modify the Overall credit check status (VBUK-CMGST) in sales order when the order saved?
    I try to do this in USEREXIT_SAVE_DOCUMENT_PREPARE, but it does not works.
    Maybe I need to do this in USEREXIT_SET_STATUS_VBUK ? But i also face the problem ........
    Anybody who can give me a sufficient solution? I promise reward to you!!!
    regards,
    Brian Liu

    Hi,
      user function 1 in credit management by using
    LVKMPFZ1 (FORM USER_CREDIT_CHECK1). If you branch into function module SD_ORDER_CREDIT_CHECK you can use the coding of FORM OLDEST_OPEN_ITEM_CHECK.
    <b>Reward points</b>
    Regards

  • Programme SDV03V02 changes Overall status of credit check in table VBUK

    Dear All,
    I happened to go through the previous threads pertaining to this program on rescheduling  the sales orders. Adding to that too
    i have an important aspect which needs the suggestion of you legends. As in my support this jobs runs every day night and reschedules all the open / back orders and it is found to change one key field "CMGST" (overall credit status)  from parameter
    B-Credit check was executed, document not OK     to     A-  Credit check was executed, document OK.        in the table VBUK.
    Due to which the blocked sales orders for delivery against credit checks  were being released and hence getting the goods issue and billing done. Users are panic on this and it created a lot of mess. Can any one suggest how to get rid of this please so that the program should not change the delivery block while it runs the batch job.
    An earlier solution might be definitely of great help for me.
    Thanks & Regards
    Krishna.K

    Dear Krishna,
    The backorder rescheduling program SDV03V02 can change confirmed quantities. The system uses confirmed quantities to calculate the credit value of the sales order. This change of the credit value can lead to a credit block or in your case a credit check where the document is ok.
    To stop SDV03V02 triggering a new credit check you could implement your own 'no credit check' routine 901 in transaction OVA8. Notes 895630 and 502930 provides more information on this.
    I hope this information helps.
    Best regards,
    Ian Kehoe

  • Automatic Credit Check- Credit active field in Item Category

    Hi All,
    In the current system, simple credit check is active and now the customer would like to consider the open sales order and delivery documents as well. Hence we are activating automatic credit check.
    The issue I am facing here is the credit active field is not activated in Item category level, since it has not been activated, the system is not performing the automatic credit check for the old as well as newly created sales order. If I activate the credit active field in Item category level its working fine for newly creating documents.
    But the credit check is not happening for the sales order which has been created in the past.Whether the credit active field not activated earlier is the reason behind this issue.
    Please let me know is there is any other way to perform credit check for the old sales orders as well.
    Regards,
    Mythily

    But the credit check is not happening for the sales order which has been created in the past.Whether the credit active field not activated earlier is the reason behind this issue.
    Credit check will not happen for the saved sales orders. It is not the reason because of credit active field was  not ticked for item category. you had performed Simple credit check for those orders,
    I assume you might be knowing that Simple credit check does not update open order, open delivery and open invoices etc, it updates only receivables. Even though you had ticked the item category the field credit active, it would not have performed.
    Now for old sales order anyway it will not perform the credit check, only thing you can do
    Run the program RVKRED88  in SE38  so that it will update the all sales values into FD32. This.This is the best way i think this will work. Please test this from your side. I did not check in my system.
    Why you want to perform the credit check on the sales documents which are already created and saved. as per me it does not make sense.
    thanks,
    Srinu.
    Message was edited by: Srinu S

  • Why Delivery doc. printed when we release credit check at VKM5.

    Hi
    when user1 create delivery doc. delivery note gets printed with output type WMTA after that user2 releases delivery through credit check (VKM5) this time again delivery doc. printed.
    why delivery doc gets printed when user2 releases the delvery doc from credit check.
    need your input 
    thank you

    check in output procedure against your output - WMTA any routine is assigned, take help of abap and ask him t check the routine. Next check output program where system is not checking the processing status from NASt table before printing.
    May you need to write logic as above.

  • Credit value used in credit check

    Hi,
    Could any one help me understand how credit value is calculated in credit check for sales orders.
    I was assuming that credit value is undelivered value returned by fm -SD_CREDIT_VALUE_ORDER.
    When i debug this fm gives me different value each time.Acoording to the config Total amount of order(incl tax) should be used for credit check.
    Thanks in advance.
    Priya.

    Hope you have released the credit block and then when you are changing any parameter(other than qty and value) the order is going on credit check again? If yes, in OVA8 - under " Released orders are still unchecked" maintain number of days or percentage of change of value. Then the reeleased orders will not be checked again .
    If you havent released the credit blocked order and when ever you do any changes to order and save it, you will get the credit blocked message all the times. If the amount is not consistent then may be you can execute few programs to reset the open credit value of the customers. Please refer to the below notes for incorrect credit values.
    Note 1176872 - Composite SAP Note Incorrect credit Updated
    Note 124571 - Incorrect credit values S066 S067 FD32
    Note 377165 - Update open credit values for credit management
    Note 716141 - Analysis Incorrect open credit values
    Note 425483 Consulting notes Credit Checks
    Regards
    Sai

  • FM for Credit check

    Hello all,
    Can anyone tell me if there is a FM or a BAPI for performing a Credit Check for given customer.
    Basically, if a customer is blocked for Credit there can be two scenarios (in our case)
       1. Overdue balance (Pending payment has exceeded the Credit Limit)
       2. An payment overdue is past the 30 (or 60, 90...) credit term
    I need to check a customer and give appropriate message in my program based on above scenarios.
    Thanks,
    Amit Purohit.

    Hi Amit,
      Check out these function modules.
    CO_IH_ORDER_CREDIT_CHECK
    FKK_CR_PERFORM_CREDIT_CHECK
    ISMAM_CM_ORDER_CREDIT_CHECK
    SD_ORDER_CREDIR_CHECK
    SD_ORDER_CREDIT_RECHECK
    SM_ORDER_CREDIT_CHECK
    Hope it helps!
    Much Regards,
    Amuktha.

Maybe you are looking for

  • How to go back more than one page at a time?

    I'm pretty sure there used to be a drop-down arrow by the back/fwd buttons, so you could go back more than one page by selecting it. Yeah? Where did it go?

  • Exchange rate automatic update in Sale Order

    Dear All, This is regarding Exchange rate automatic update in Sale Order and requirement said below. Process: User will created a Export Sale order in the month of November , that time Exchange rate is 50.00, this  will get updated in Sale order Head

  • Making a flexfield segment 'required' for a particular function

    Hi How do we make a flexfield segment 'required' for a particular function. I don't want to make this field required from core applications(System administrator), but only for a function. kindly give Suggestions..

  • Another photoshop cs6 problem

    When I tried to add text it doesn't really work. For example: Let's say I type in "Whats your name?" It won't show I typed unless I go click on a different tab and then go back to it. And the question mark will be in the front instead of in the back.

  • JSP compiler issue

    Hi, I have a JSP based web application that works well when deployed in Tomcat 6. I am trying to deploy it in jboss 4.2.1, everything seems to be ok but when I try to access to a JSP page I have the following error java.lang.IllegalStateException: No