How to activate Approval in Sales Order for the UDF with condition

Dear Expert,
                   I have created the UDF field Rebate(type amount) in Sales Order.I want to activate the approval procedure for this UDF with condition where Rebate is greater then Zero.I had applied the query and Activate it in approval procedure.--
SELECT (Case When IsNull(count(T0.[DocEntry]),0) <>0 Then 'True' Else 'False' End) AS TF            
FROM Ordr T0   where DocType='I' AND t0.U_rebate >0 and convert(Varchar(20),T0.[CreateDate],103) =(select convert(Varchar(20),Getdate(),103))
But I found that the approval procedure activate every time inspite the Rebate field is Zero.
Plaese suggest some soloution for it.
regards,
PankajK

Hi Pankaj......
Try this.......
Select Distinct 'True' From ORDR T0 Where T0.U_Rebate>0 and T0.DocType='I' And T0.DocNum=$[ORDR.DocNum.0]
Hope this will help you.......
Regards,
Rahul

Similar Messages

  • How to find that a sales order for which there is  delivery but no goods

    Hi
    How to find that a sales order for which there is  delivery but no goods issue has been done i.e we have an open delivery for a sales order.
    How in VBUK table can we find  out with the sales order no .
    Thanks in advance

    make use of table VBFA.
    Regards
    Peram

  • How user can get a Sales Text for the any Line Item in the Billing?

    Salute Masters ! !
    How user can get a Sales Text for the any Line Item in the Billing?
    It's coming for other Order (Line Item for Bought out Item at Project Site - Some Item they procure at project site & complete the task).
    Where I can configure in system for all.
    Rgds
    Srivastav
    09973504950

    Hi,
    Sales text can be copied from customer to order , order to delivery and delivery to billing .
    Check the T-code : VOTXN , do the customization as per your requirement.
    check the below link :
    http://help.sap.com/saphelp_erp60_sp/helpdata/en/dd/55f993545a11d1a7020000e829fd11/content.htm

  • In sales order for the condition type MWST, **Tax code** is displaying wron

    Hi
    In sales order for the condition type MWST, *Tax code* is displaying wrongly at header level i.e. FF instead of AO (under account determination tab)
    AO tax is 0% but for FF it is 19%
    I have checked with the Access sequence it is picking access 08 correctly according to this it should show AO in tax code field for MWST but it is not so..
    There is a manual change for tax classification for material master in va02 initially it was blank now it is changed to ' 0 ' is any way influencing....?
    Even if I consider material tax classification and customer tax code  should not be FF because  tax code  FF is not maintained for the combination of access sequences for condition type MWST
    Please help me.
    Rajendra Prasad

    Dear Rajendra,
    There is a manual change for tax classification for material master in va02 initially it was blank now it is changed to ' 0 ' is any way influencing....?
    Definitely material Tax classification will influence to determine the Tax code.
    -->So Make sure that customer and material master having proper tax classification indicator.
    -->Have you Update the price after changing the tax classification in the sales order.by going to item dat -->condition tab then click on Update push button bottom of the conditions screen.
    -->Once again the check the condition record maintanence also for your MWST access sequence.
    I hope this will help you,
    Regards,
    Murali.

  • Searching for Sales Order for the given Customer PO Number Pattern in BAPI

    Hi,
         I have developed a BAPI which retrieves all the Sales Orders for a given Customer (Sold-To). The Following are the Input Parameters given in the Function Module (RFC).
    Customer Number (Mandatory)
    From Date (Optional)
    To Date (Optional)
    Sales Order Number(Optional)
    Customer PO Number(Optional)
    Now, when the Customer PO Number is populated, it will come as a Pattern, say 9ab* and I need to retrieve all the Sales Orders with PO Number starting with 9ab.
    When I am trying to retrieve, it is giving different set of output based on the Case specified in the Customer PO Number Pattern. Lets say, if I give 9ab, I get 200 Records but if I give 9AB, I get only 5 to 6 Records.
    As I have understood from the Standard Transaction VA03, it has a Search Help VMVAA which retrieves all the Sales Orders for the given PO Number pattern irrespective of the Case, that is Lower Case, Upper Case or Mix of Upper and Lower Case.
    I can see the Code in the Search Help Exit but couldn't find useful piece of code which I can implement in my BAPI to simulate the same.
    Can somebody help me on this?
    Thanks,
    Venkat.

    Hi Sudhir,
             I think you did not understand what my problem is. What I mean to say is, for Customer X, the PO Number could be 9abc and for Customer Y, the PO Number Could be 9ABC.
           So, according to your logic, if I translate it to Upper Case, it will give the Sales Order details of Customer Y to Customer X.
          And more over, SAP stores the PO Number as it is entered in the Sales Order Screen (VA01).
        What if the Customer PO Number for Customer X is 9aBcDeFgH? and the PO Number for Customer Y is 9AbCdEf?
       Hope you've understood my question.
    Thanks,
    Venkat.

  • How to create a sales order for Onetime customer with Tax code?

    Hi everyone,
    Can I use sd_salesdocument_create for a one-time customer? From the standard bapi, which field can I use for the Tax Code ?
    pOints will be given.

    I have the same problem... should I use a different function module on this? if yes, what is it?
    I need to create a sales order for one onetime customer with tax code... help me pls....

  • How to create a Return Sales order from a PO with Return Items using IDOCS?

    Is it possible to create a Return Sales order in one system with a PO having return Items in the other system using IDOCS.
    What kind of sales documents are created from IDOCS created with PO's having return items ?

    anyone?

  • How to block sales order for a particular pricing condition

    Hi Experts,
    Here I have a requirement on sales order blocking . I have searched in the forum but I didn't find any relevant thread. So please help me in the following requirement
    On a particular pricing condition create or change I need to automatically block the sales order. I don't know how exactly to block the sales order. Please make me aware on this concept. Do we have any exit or badi to block the sales order in this requirement.
    How to block the sales order manually and automatically please explain me.
    Thanks & Regards
    G.S.Naidu

    Hi,
    You can use user exit MV45AFZZ, form-routine USEREXIT_SAVE_DOCUMENT_PREPARE to set the delivery block on sales order.  Write your required logic in this routine.  You have to set the value of VBAK-LIFSK to a relevant value available in table TVLS (Field : LIFSP).
    If the value in VBAK-LIFSK is initial, then sales order is not blocked for delivery & if it is having some value (available in TVLS), then sales order is blocked for delivery.
    Regards
    Vinod

  • How to find number of sales ordered for customers made

    Dear All,
    Is there a standard way in SAP to know, how many Sales Orders of a particular type did customers ordered in a certain time period.
    I wanted to know ? Which customer orders most orders and who ordered least.
    Thanks & Regards
    Venkat

    Hi Venkat,
    Go to [SE16]. Enter the table name as VBAK. Enter the Sales Document Type and time period in the selection screen and execute the query. Save the output into a excel sheet using System -> List -> Save -> Local File.
    In excel, you can sort and group the data as per your requiremet.
    Regards
    Nadarajah Pratheb

  • Creation of Sale Order for configurable material with availability check.

    Hi,
    We have a scenario in which the material is configurable. The configurable material (X) has few variants (Ex: X1, X2, X3, X4, X5). While booking the sale order, we use the material number (X).
    Further, the material planning is done for the variants X1, X2, X3, X4, X5. The standard variants are planned for production in advance.
    1.     While booking the sale order, we want the availability check of the stock (type matching to happen). What needs to be done in configuration?
    2.     While booking the sale order, there is a possibility that the configuration selected will not match with any of the standard variants due to some additional requirements of the optional features, in such cases how to link the standard variants to the sale order & create requirement for additional requirements.
    Regards,
    Umesh

    Hi Umesh,
               1.Create material master for configurable material and variants in mm01.
               2.Maintain BOM for the configurable material in CS01
               3. Configur the variant configuration steps
                  a. Create charecteristics T.code CT04
                  b. Create values and assign classes
                  c. assign the values to charecteristics
                  d . Maitain dependence  T.code CU01
                  e.create configuration profile t.code CU41
                  f.stimulate the configuration profile.
    4. Do the availability check configuration through this path
    IMG --> Sales and distribution > Basic functions ,> Availabilty check and Transfer of requirements.
    5. Maintain the Availbility check field and MRP views in the material masters other wise you sit with PP people and do that
    I hope it will help you
    Regards,
    Murali.

  • Value not populating in the print out (sales order) for the 1st time

    Hi friends,
    While saving a sales order, the order confirmation going to the user is not populating the LDC field. LDC is Last date of change. This field can be found in the Additonal data 2 tab of the material in the sales order. When I enter a date in this field and save, the print preview of the output has this value, but the print out does not carry this value.
    Another weird thing about this issue is that, the second time i trigger the output, the print out has the value.
    Please give me some clue on where to check and how to go about fixing this problem.
    Regards,
    Shanu.

    Dear Shanu,
    This issue may be related bug in the output program so take help of ABAPer to fix the issue.
    I hope this will help you,
    Regards,
    Murali.

  • Send all line items of a sales order to IPC along with condition lines data

    We wrote some pricing routines in R/3, where while doing he calculations for condition line item, we needed to pull in the material information for previous line items. So we exported vbap and imported it inside the routine to be able to have access to all the line items in the sales order. Now, we need to put in the same kind of logic in CRM/IPC. My question is what would be the equivalent of SAP's(import/export) commands for internal tables in case of IPC. I looked at the BADI CRM_COND_COM_BADI but still do not see how I can send all the line items  data to IPC. So I guess, the question comes down to, how do I send all the line items of the sales order (whole VBAP in R/3 terms) to IPC along with the condition line data? Can someone please help?
    Thanks

    Hi Vaibhav,
    If you can get the list of Sales orders which has deleted line items and force completion status. You can manage them in BI via lookup  or navigation attribute.
    Just my views I am sharing .
    Thanks,
    KDJ

  • Sales Order - Allow Item Changes with conditions

    Hello, i'm new to SBO and this forum.
    I want to know how can i allow to change the items on a sales order when sales order is in place and awaiting authorization but establishing a condition based on an items property (classification) and blocking the possibility to change the price.
    Thank you very much for your help.
    Regards,
    GuillermoL.-

    Hi Gordon,
    Can you give me an example to establish this control o that SP?
    i'm really poor writing Transact-SQL code, but i'm learning on my own and with several online forums and tutorials.
    Let's say i have 10 items (itemcode = 100 to 110) that have the same value on userfield or the same property group
    (U_Userfield = 100 or QryGroup10 = Y)
    And i don't want the price to be changed.
    Thank you in advanced!
    Regards,
    Guillermo.-

  • How to post a Draft Sales Order for Business Partner on hold

    Hi Experts,
    I hope you can help me with a question I have using 8.81 PL07.
    I know that the inactive / active functionality changed with 8.8 so that when a BP is inactive it no longer appears in the Choose From lists.
    Prior to 8.8 when a Customer was on hold we could still raise Draft SO's for them, which we could then add once the Customer was taken off hold. 
    How do I do this in 8.81 please?
    Thanks very much,
    Caroline

    Hello Caroline,
    I have found sap note: 1411244 this desribes these "new" functionality.
    "Item, business partner, and account "Choose from List" windows no longer show inactive objects. "
    So the answer for your question is: from version 8.8 is not possible to record any draft documents on Business Partners are on hold.
    Regards,
    János

  • How to Configure CATS Profiles in order for the Hours to be posted to CO

    Hi All,
    I have quick question for you all, how do I configure the CATS Time Entry Profiles so as to enable me to post the Hours (Different Receiving Cost Centers & Receiving Internal Orders) to CO.
    Currently I enter time using TCODE: CAT2 and a CATS Profile and Save the Timesheet.
    Following which I Approve Times using CAT4.
    Then when I try to transfer time to both HR and CO using TCODE: CATA time gets transferred to HR Time Management Infotypes but not to CO.
    I tried a couple of other TCODES as well i.e: CAT7 & CAPS and tried posting to CO but I am getting a message saying that "NO DATA TO TRANSFER" despite there been ample data fit to be transferred to CO.
    So, my question to you all is how do you handle this situation in your implementation/organization.
    Looking forward to hear from you soon.
    Regards,
    Aslam

    Hi Aslam,
    Im not sure why this isnt working.
    Try approving timesheets using CATS_APPR_LITE
    And check whether the timesheets are approved.
    Once that is done.
    Run CAT7
    This would post the data from CATS to controlling.
    Regards,
    Brinda

Maybe you are looking for