Blocking the orderdepending on the Bill amount

Hi All,
  I need to block the order if the billing amount is greater than 100000.
  in which user exit i should write the code and in which i can find the amount of the bill at header level.
  Please help me out.
Regards
Kumar

Hi Kumar,
Quick solution..try this by putting a soft beakpoint:
A) For influencing billing document you could use RV60AFZC and subroutine USEREXIT_FILL_VBRK_VBRP. This will give you VBRK/VBRP header/item values
B) For setting a header block on sales order you could use in program MV45AFZZ your own custom code within form mentioned below:
FORM userexit_save_document_prepare.
  vbak-lifsk = 'ZS'. " Set your block at header here
ENDFORM.
Let me know if this is what you were looking for..
Thanks,
Anand

Similar Messages

  • Rounding up the billing amount

    Dear SAP Gurus and Experts,
    Would like to seek for your assistant to kindly provide guide to configure the rounding up and down value in the billing amount where by
    if the amount is $8.02, it will be shown as $8.00 and
    if the amount is $8.06, it will be shown as $8.05, and
    if it is $8.04, it will be shown as $8.05, and
    if it is $8.08, it will be shown as $8.10
    Thank you
    Regards
    Leonard Tan

    Hello,
    DIFF Condition is to be inserted in the Pricing Procedure.
    Search the forum with "DIFF Condition" & date range as All & you will get details steps to do the needful.
    http://forums.sdn.sap.com/search.jspa?threadID=&q=Diff+COndition&objID=f246&dateRange=all&numResults=15&rankBy=10001
    Hope this helps.
    Thanks,
    Jignesh Mehta
    Edited by: Jignesh Mehta on Jan 17, 2012 3:50 PM

  • FM for giving the total bill amount for a specific billing month in IS-U

    Can anybody help me with a function module which will give sum for all the bill amounts shown in transaction code EA22 in IS-U.
    I just want to know the total bill amount for given billing period but through a FM.
    Thanx in advance.

    Hi Vinay, check out this as it may be of some help 4 u.
    In the fM "BAPI_BILLINGDOC_CREATEMULTIPLE",
    In the tables Parametr , u need to pass BILLINGDATAIN which contains the SD docu No (REF_DOC).
    The following are the Required entries :
    BILLING_DATA_IN-SALESORG
    BILLING_DATA_IN-DISTR_CHAN
    BILLING_DATA_IN-DIVISION
    BILLING_DATA_IN-DOC_TYPE
    BILLING_DATA_IN-ORDBILLTYP
    BILLING_DATA_IN-SOLD_TO
    BILLING_DATA_IN-ITEM_CATEG
    BILLING_DATA_IN-REQ_QTY
    BILLING_DATA_IN-SALES_UNIT
    BILLING_DATA_IN-CURRENCY
    If a material is billed for which a material master needs to be
    determined (BILLING_DATA_IN-NO_MATMAST = ' '), you must make the
    following entries :
    BILLING_DATA_IN-PLANT
    BILLING_DATA_IN-MATERIAL
    If, on the other hand, a material is billed for which no material
    master is to be determined (BILLING_DATA_IN_NO_MATMAST = 'X'), you
    must make the following entries :
    BILLING_DATA_IN-COUNTRY
    BILLING_DATA_IN-MATERIAL
    BILLING_DATA_IN-TAXCL_1MAT
    pls reward if helpful.
    cheers,
    Hema.

  • Not allow to save the billing document in the back date if FI period closed

    Hi ,
    We have a requirment in which end user should not be able to create the billing document if the billing date lies in FI posting period which has been closed.
    As of now the users are being able to create the billing documents even if the Billing date lies in the closed posting period but the sccounting document does not gets generated.
    Now we want to block the billing document creation as well.
    Please provide some pointers to the above scenaio. Thanks..

    hello,
    Has your query been solved.
    if not , here is the solution.
    go to the program RV60AFZZ. This is the exit for billing.
    In that there is a form called
    FORM userexit_number_range USING us_range_intern.
    in the form you have to write the code.
    variables to pass for the function module.
    DATA: lv_buper  LIKE  t009b-poper,
            lv_gjahr  LIKE  t009b-bdatj.
    CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
          EXPORTING
            i_date               = syst-datum
            i_periv              = 'V3'
         IMPORTING
           e_buper              = lv_buper
           e_gjahr              = lv_gjahr
    in lv_buper you will get the last posting period which is open ie the posting period month.
    based on lv_buper you get , you can write your validations.
    You have to remember that the posting period which u get is based on the fiscal year.
    hope that helps.
    reward if useful.
    cheers,
    Ravi Kiran.

  • How to block the workflow event

    hi all,
    we use the custom BAPI to trigger the workflow.
    in the custom BAPI we used <b>assigned</b> event from the <b>BOR object IFARCH21- it's related to SAP archive link .</b>. the custom BAPI is conatins the API's of  create a shipment,and shipment cost based on this opearations billing wii be done.....now the user will get the <b>error message</b> in SAP workplace from this BAPI.
    now i want to block the billing creation.
    please give a suggestion on this...
    regards
    Sukumar<b></b>

    Hi,
    Can you clarify a bit further????
    I think you have used SAP_WAPI_CREATE_EVENT in your BAPI to create the event "assigned". This event gets triggered whenever a shipment is created and the workflow send out a message to the inbox. Now you want to deactivate this message that is being sent. i.e in other words you want to disonnect the workflow itself from being triggered.
    If i am right in understanding your requirement then you will have to deactivate the linkage to the workflow that sends out the mail in the transaction SWETYPV. Or you will have to comment out the code written for SAP_WAPI_CREATE_EVENT.
    Thanks,
    Prasath N

  • Tracking of Bill amount passed by MIGO and MIRO

    How to get the batch details of the bill amount passed through MIGO with its corresponding bill amount passed through MIRO in case there is difference in the two.

    Hi Hugo,
    Perhaps you might consider creating a display variant in miro through transaction SHD0. This
    way you can have the Column of interet displayed right beside the amount
    field so the user will not get confused.
    Check out the following note in relation to this:
    315586   MIRO: Create/change display variant
    Hope this helps,
    Adam.

  • Last month I was 1 day late paying my bill, so I tried to pay the full amount.  But the website would only allow me to pay the current bill amount.  Now, I show a past due amount.  If I tried paying it and Verizon didn't allow me, how is it past due?

    Last month I was 1 day late paying my bill, so I tried to pay the full amount.  But the website would only allow me to pay the current bill amount.  Now, I show a past due amount.  If I tried paying it and Verizon didn't allow me, how is it past due?

    I'm confused - If I go online to pay my bill, and it's one day after the due date, the current bill and full amount due would be the same?  If the current bill is not the "full amount due", then what is the extra amount that's snow showing past due?
    Also, when I go in to pay my bill, I show the Current bill amount, total amount due (which are the same), and then a box where I can type in the amount I am paying, with the default amount being already filled in with the total amount. 
    Is this a pre-paid or a post-paid (contract) account?

  • Workflow fo returned sales order modified from updating the billing block t

    please tell me how to find returned sales order modified from updating the billing block to delivery block and how to create blocks here.i want to know updating means what is happening here.

    Thread locked.
    Beginner questions are very welcome, but your question makes it obvious that you didn't even bother looking at the help or searching on SDN.
    Please read the [Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement] on how to post a good question and make a little effort yourself before expecting people to give up their time to help you.

  • Retreiving the last amount billed to a customer (dynamically in the Query)

    Hi,
    I want to retrieve the last amount billed to a customer.
    For example :
    r/3 data :
    Customer____Billing date__Amount
    1___________04/04/2006____5000
    1___________05/05/2006____1200
    2___________03/04/2006____400
    The result i would like to get in the report :
    Customer___Amount
    1__________1200
    2___________400
    I tried many ways including Key figures agreg. Exception.
    Do you have any suggestion ?
    best regards,
    ludo
    Message was edited by: Ludovic Julen
    Message was edited by: Ludovic Julen

    Hi,
    The date of the data loading has no impact on the selection of the last value. In december, you can load the historical data of 2005, 2004 and 2003. The data will be stamped on 2005, 2004 or 2003 (dates of reference from the documents).
    So, in your case, the query would give you the first load as a result of the last value. But you are using 0CALDAY in your example. Of course, you would not be able to use 0CALMONTH in such scenario, because you do not bill only once a month.
    Now, please notice that the last value is based as well on the execution of the query. Is your query analyzing all december? Imagine that your query is filtered from 01.12.2006 to 14.12.2006, then you get only the second load.
    This is a double setting.
    Regards
    Laurent

  • The billing document are blocked for accounting release because of VPRS

    Hi All,
    Can anybody help me out
    In PRD we changed the pricing procedure xccc66and we insert the condition type VPRS as mandatory condition. The billing documents created with reference to orders without VPRS (created before the change) are blocked for accounting because the condition VPRS is missing. We tried to run any pricing re-determination in the billing document but the system does not determine the VPRS.
    In the new orders, created after import all, the system determines the VPRS condition correctly.
    Can you please advice how to insert VPRS? I mean the correct procedure in order to re-determine the VPRS condition in billing documents.
    Thanks,
    Siddhartha

    we changed the pricing procedure xccc66
    If you have changed the pricing procedure itself instead of inserting the VPRS condition type in your existing pricing procedure, no it is not at all possible to insert this condition type to your billing documents.  You have to cancel all those billing documents.
    On the other hand, if you have inserted this condition type in your existing pricing procedure, then I think, you can, by clicking the update button, can insert this condition type which I am not sure.
    thanks
    G. Lakshmipathi

  • Blocking the crm user to type the manual bill to / ship to columns

    Dear Experts,
    In SAP business one 8.81,
    We are using SAP Business 8.81. We have different locations set up for "ship to address" in business partners master data and all the ship to address have been saved as unique locations so that when a sales order or a work order is created, the location address is automatically populated on choosing the location of ship to address from the drop down menu
    What many users are doing: When creating work orders, they input the business partner code, choose the location and then change the ship to address to whatever they want. This creates problems when converting the work orders to delivery. I want to restrict the capability of changing the ship to address while creating work orders and sales orders. How do I do it? Do I have to do it in business partner master data or in work orders or is it some kind of user authorization that I am missing.
    Please let me know.
    Thank you.
    Manivannan. M
    Edited by: manivannan muthu on Mar 28, 2011 1:00 PM

    Dear Narayanan,
    Thanks for your reply,
    We have to write our own code to block the user to enter information on the bill to / ship to column.  Sir, I searched for the long time I did not get related code for that, can you help me in this.
    With regards
    Manivannan. M

  • Workflow item processed but not removing the billing block from item

    My credit memo has 310 items with billing block at header level and item level itself. We are removing billing block through workflow.
    The problem i am facing is work item is processed by the user but billing block is not removed from  the document at item level.
    Now if I want to remove the billing block what i have to do?

    Hi,
    Please check this sample code..
    PARAMETERS: p_vbeln TYPE vbak-vbeln.
    DATA: l_header_inx TYPE bapisdh1x,
          l_header_in  TYPE bapisdh1.
    DATA: lt_return TYPE STANDARD TABLE OF bapiret2.
    * update the flag.
    l_header_inx-updateflag = 'U'.
    l_header_inx-bill_block = 'X'.  " Billing
    l_header_in-bill_block  = ''.   " Remove Billing block.
    * Call the bapi.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
      EXPORTING
        salesdocument    = p_vbeln
        order_header_in  = l_header_in
        order_header_inx = l_header_inx
      TABLES
        return           = lt_return.
    * check for errors.
    LOOP AT lt_return TRANSPORTING NO FIELDS WHERE type = 'A' OR type = 'E'.
      EXIT.
    ENDLOOP.
    IF sy-subrc = 0.
      WRITE: / 'Error in updating'.
    ELSE.
      WRITE: / 'Billing block removed'.
      COMMIT WORK AND WAIT.
    ENDIF.
    Thanks
    Naren

  • Need to view the customer whose bill amount is constant for three month

    Suppose user will give the month and year (ex: march-2011) then result will show all the customer whose bill amount is same in March,Feb and Jan-2011 and the result will be shown in three lines.
    For these I need to create one view and the corresponding query. Whose combined output should be----
    Cust_id Base_month Bill_amount
    1 Mar-2011 500
    1 Feb-2011 500
    1 Jan-2011 500
    9 Mar-2011 800
    9 Feb-2011 800
    9 Jan-2011 800
    Can anyone help me?

    912751 wrote:
    Suppose user will give the month and year (ex: march-2011) then result will show all the customer whose bill amount is same in March,Feb and Jan-2011 and the result will be shown in three lines.
    For these I need to create one view and the corresponding query. Whose combined output should be----
    Cust_id Base_month Bill_amount
    1 Mar-2011 500
    1 Feb-2011 500
    1 Jan-2011 500
    9 Mar-2011 800
    9 Feb-2011 800
    9 Jan-2011 800
    Can anyone help me?Sorry for my given link at SQL Developer Forum. There was mistake in the link. Here is the correct Link...PL/SQL
    Hope this will help you

  • BADI to set the billing block in sales order

    Hi Friends,
      I am trying to set the billing block at the item level while creating or changing the sales order if the selling price of the item is below the cost price. I have implemented the following code in the BADI BADI_SD_SALES. Even I tried the same code in the user exit include MV45AFZZ. It is not working in both the cases. what could be the issue. please advice.
      FIELD-SYMBOLS : <fs_vbap> TYPE vbapvb.
        LOOP AT xvbap ASSIGNING <fs_vbap>.
          <fs_vbap>-faksp = '01'.
      ENDIF.

    solved. used BADI_SD_SALES

  • The bill document printed from a contract is not displaying the amount at i

    When we execute the print layout form a bill document from a contract is not displaying the amount at item level however the total amount of the document is correctly displayed in the button of the document.
    Thank you and best regards.

    Hi Alberto
    please check the field which has been mapped in the SAP Script and the Smart form.
    it must be the header amount field. you can replace it with the VBAP_NEtWR or similar fields like kzw1 if you have mapped the sub totla sot get the amount at item levels
    thanks
    akasha

Maybe you are looking for

  • What webcam is best

    I was wondering if anyone knows the best webcam to use with ichat, msn mess., yahoo. I have a Logitech quick zoom webcam right now but I can only get the audio. Yahoo sees nothing.

  • My iPhone wont work in Nigeria.

    Bought a new iPhone 5s on my last trip to NH for $748 and it has refused to accept my sim in Nigeria saying it's locked. Please help!

  • Trouble install

    I recently lost my cd and when i install a new driver i usually uninstall everything and do it clean. when i tryd this without the cd i cannot get the drivers to install properly. i have an audigy 2 zs and in add remove the driver wont even show up a

  • Changing from full recovery model to simple in sql 2012 always on

    how do I change from a full recovery model to simple in an always on sql 2012 setup? When I try to change it it gave this error

  • RMAN job not deleting old archivelogs

    I've setup an rman backup via dbconsole to backup db and archivelogs, for a retention period of 7 days, then delete obsolete. The database is 10GR2, running on windows 2008. For as yet unknown reasons, the cursed dbconsole quit working, and I haven't