Using Sales order by Defaulting Rules

I would like to ask how to capture sales order information into custom plsql by using Defaulting rules in 11i Order management.
and my custom plsql is this
create or replace package body ame_default_sch_date_ven_pkg as
FUNCTION default_SSD (p_database_object_name IN VARCHAR2,p_attribute_code IN VARCHAR2)
RETURN date IS
v_ssd DATE;
l_atp_flag varchar2(1);
l_org_id NUMBER;
BEGIN
IF ONT_LINE_Def_Hdlr.g_record.ship_from_org_id IS NOT NULL
THEN
l_org_id:=trim(ONT_LINE_Def_Hdlr.g_record.ship_from_org_id);
INSERT INTO amei_venkanna_temp values ('org_id'||l_org_id);
IF ONT_LINE_Def_Hdlr.g_record.inventory_item_id IS NOT NULL
THEN
BEGIN
SELECT atp_flag
INTO l_atp_flag
from mtl_system_items
where inventory_item_id = ONT_LINE_Def_Hdlr.g_record.inventory_item_id
and organization_id=ONT_LINE_Def_Hdlr.g_record.ship_from_org_id;
EXCEPTION
WHEN OTHERS
THEN
NULL;
END;
END IF;
COMMIT;
END IF;
IF l_atp_flag='N'
THEN
INSERT INTO ame_venkanna_temp values ('Non ATP item');
v_ssd := ONT_LINE_Def_Hdlr.g_record.request_date+5;
ELSE
INSERT INTO ame_venkanna_temp values ('ATP item');
v_ssd := ONT_LINE_Def_Hdlr.g_record.request_date+5;
COMMIT;
NULL;
END IF;
return v_ssd;
END;
END;
Please have some thought on this issue would be appreciated.
thanks
Edited by: ameer.oracle on May 15, 2013 10:50 PM

Hi Ameer,
it's not clear to me what you actually want to achieve, but if you plan to customize the defaulting rules in OM, I can recommend following note:
*Using Defaulting Rules in Oracle Order Management [ID 122461.1]*
That one in combination with some forms personalizations helped us to have some advanced defaulting logic.
I can try to help more, if you describe your business case in more details.
regards,
David.

Similar Messages

  • Manual Condition Type should be visible in Sales order by default

    Hi
    How to maintain manual condition types in Sales orders by default. They will be maintaining the value based on the discussion they had with the customer(Negotiated price). The condition type should be visible in the procedure and they will only enter the value.(The method of keying condition type manually is not accepted by the client).
    Thanks in advance.
    Regards
    Vamsi Javaji.

    Hi,
    In the PRICING PROCEDURE V/08 maintain the CONDITION TYPE as Mandatory
    In the CONDITION TYPE V/06 maintain the field  MANUAL ENTRIES  as C which is Manual entry has a priority.
    And check the box VALUE
    Now maintain the condition records for the condition type in VK11 with 0 value
    Now while processing the sales order the CONDITION TYPE will trigger from the CONDITION RECORDS with 0 value and this can be in EDITABLE mode ( and maintain the value)because of the check box VALUE you flagged in V/06.
    Please try this and revert back if you need further details
    thanks,
    santosh

  • How to find sales order no., purchase order no. using sales order ID,PO ID

    hi,
    how to find sales order no., purchase order no. using sales order ID,PO ID
    Thank you,
    hari om

    Dear Hari Om,
    Could you please tell me, to what are you referring Sales Order ID and P.O. ID?
    meanwhile check with:
    T. Code: SE16
    Table: VBKD
    Execute (F8) the Report.
    On to next Screen, Go to Menu-bar
    Settings --> Format_Lists --> Choose Fields
    Field: VBELN - Sales Order
    Field: BSTKD - Purchase Order No.
    Best Regards,
    Amit

  • Using Sales Order Approval in B1 does not Synch Orders

    Hello everyone,
    I have a customer who uses Sales Order Approvals within Business One for Over Credit Limit.  Those that go through this process, never get sent to WebTools and then later cause the error that in the Synch Manager that you Can not synch the Delivery Document#xxxx because the order does not exist, or something to that effect.  Then I simply add the Order to the Transaction Queue and all goes through fine.  Has anyone seen this occur in their environment and if so, what was the resolution?
    Thanks so much for your help!
    Kristen

    Kristen,
    Ironically after my last post I have just hit this in a live situation with 65,000 deliveries not synching.
    Have you a resolution to this and have you needed to deal with a large number of transactions, if so how?
    I am wondering what the implications of unticking Delivery Documents in the synch manager settings has on this issue and also the impact on the loss of functionality in Webtools for the user
    Geoff

  • How to retrive the purchase agreement/promotion  using sale order number

    Hi ,
    I am an ABAPER . I need a flow for *sale order to purchase agreement/promotion *
    My query is how to retrive the  purchase agreement/promotion (VBAK-KNUMA is blank  for all ) using sale order number ?
    Thanks
    Sree
    Edited by: Sree  Merugu on Sep 11, 2008 6:58 PM

    Hi ,
    I am an ABAPER . I need a flow for *sale order to purchase agreement/promotion *
    My query is how to retrive the  purchase agreement/promotion (VBAK-KNUMA is blank  for all ) using sale order number ?
    Thanks
    Sree
    Edited by: Sree  Merugu on Sep 11, 2008 6:58 PM

  • Changing Sales Order from using Sales Order Stock to Std Unrestricted

    Hi
    We have set up some materials to default to an Item Category/Schedule lines that creates the Sales Order with relevance to Sales Order Stock.
    However in some instances we need to change the Sales Order to a Std Item Category that just uses Unrestricted stock.
    When we test this currently, we are unable to update the original Line Item as it is GREY.
    So we have been adding a "reason for rejection" then copying information into a 2nd line with a Std Item Category.
    But it is still sitting in MD04 under the Sales Order Stock configuarion and not reducing Unrestricted Stock . .. .
    What are we doing wrong?
    I had assumed that changing the Item Category would remove the Sales Order Stock requirement and use normal Unrestricted.
    Thanks
    Hayley

    Hi,
    In VOV4, has the standard item category been assigned under Manual Item Category column? If the value is assigned, then you can change the item category in sales order.
    Regards,

  • Sales order and settlement rule

    Hi
    One of my clients has a problem with a settlement rule,
    apparently as soon as he saves an order the amount is immediately included in COPA.
    Where can i see this?
    I tried transaction COPA but it does not work.
    The settlement rule has Not for Settlement defined in Actual Costs/Cost of Sales.
    What does this mean apart from the obvious?
    Thx
    RM

    Hi,
    what is scenario you are using? Is it make to order ?
    are you creating sales order with reference to any project?
    you can find settlement rules in
    IMG>SD>Basic functions>account assignment/cositng> Maintain requirements classes  for costing/account assignment.
    We maintain settlement profile in requirement class.
    you can create settlement profiles in OKO7 t.code. In settlement profile we have option  like sales order settlement allowed / optional / allowed
    Regards,
    Chandra

  • Sales order  quantity default as 1 Qt

    In sales order I want to make quantity default as 1 Qt how can I do it i know it is standard process no any user exit is used.
    Ahmed

    Hi Ahmed,
    In Sales Item Category settings - General Control, there is a Check Box "Order qty = 1". You can try enabling this field and hence whatever may be the quantity you mention in Sales Order, it will be defaulted as "1". However, am not sure whether it will bring default quantity as "1", even without maintaining anything for a material in SO.
    You can try and let me if works.
    Ravi.

  • How to change Sales Order Delivery Priority rules/parameters.

    In the picture below I am in the Sales Order work Center>New Sales Order. My question pertains to the Delivery Priority selections. I have been looking to find a place to set or change the parameters/rules of these selections but all that I have been able to find within SAP Help Center is a brief description of what each priority means. I have not been able to find an option to change the rules of the delivery priorities. I have looked through the help center using multiple definitions and have used different work centers and overviews to find a lead and definitions but have not come across many leads. What we would like to do is have the delivery priority Urgent to have certain effects like releasing an order automatically if that priority is selected in the New sales order delivery priority.
    Please share any info or leads you may have in finding parameters and/or the ability to change the rules of the options Immediate, Urgent, Normal and Low.

    Dear Hohn,
    If you choose Immediate for the Delivery Priority, the sales order is treated as a rush order and is released to the execution department automatically.
    That is, this order is set to Released automatically in the Customer Demand view of the Outbound Logistics Control work center and immediately appears in the Delivery Control view of the Outbound Logistics work center.
    Rest Urgent, Normal and Low is only for reporting purpose.
    Regards
    Vignesh Ravichandran

  • Sales Order Stock, using Sales Orders

    Morning!
    We are receiving Sales Order Stock (stock segment E), thus creating special stock with a number that consists of the Sales Order Number + the Item number of the order. This is to support our Repairs process in CRM. (So we are NOT using NB Purchase orders)
    Example:
    Order: 3100501
    Item: 0010
    S.Order stock 10 pieces E-stock 31005010010
    When trying to Post Goods Issue, we do this based on the same Order, but having added one item to the order, item 0020.
    The system -understandably- does no let us find the stock, since it is looking for E-stock 31005010020, which we don't have....
    Anyone?
    Thanks,
    Nick

    Hi;
    When a Sales order is created a corresponding PO is created for building the stocks when we do a GR for this PO stocks are created for the Sales order.This is the sales order stock.
    Now when a change is made to the SO we need to either create a corresponding PO for this new item of make a similar change to the existing PO.
    To solve the issue...
    Go to the PO add the line item and choose the new item and press the "Account Assignment" button and give the SO# and the line item #.
    This should solve the issue.
    Mani.

  • Credit card handling using sales order change BAPI

    Hi all,
      Currently, I am working on creating a custom BAPI for changing the sales order information. I am having a scenario where I need to handle multiple credit cards during the change of the sales order data. For example, if I have created a sales order  with a credit card A and a bill amount of 100. Now, in the change BAPI, I need to handle the situation like I would be getting two credit cards data out of which I need to Bill against credit card A with 200 and credit card B with 300. I need to see the entries in the sales order processing in the following fashion:
    During the creation:
    Credit card type    Credit card number    Maximum amount  Limit To
    AMEX                   A                             100                        Flag checked
    After performing change order:
    Credit card type    Credit card number    Maximum amount  Limit To
    AMEX                   A                             100                       Flag checked
    VISA                    B                              300                       Flag checked
    AMEX                   A                             100                       Flag checked
    Which implies that I am billing 200 against card A and 300 against card B.
    I want to acheive this functionality. Can any one throw some light in order to accomplish my task?
    Thanks in advance,
    From,
    Adithya

    i already used same But it's not working
    s_order_header_inx-updateflag = 'U'.
    Line items
      REFRESH: i_order_item_in, i_order_item_inx.
      LOOP AT t_data INTO wa_data.
        LOOP AT t_data_item INTO wa_data_item WHERE vbeln = wa_data-vbeln. .
    BAPISDITM
          i_order_item_in-itm_number = wa_data_item-posnr.
          i_order_item_in-profit_ctr = wa_data_item-profit_ctr.
    BAPISDITMX
          i_order_item_inx-itm_number = wa_data_item-posnr.
          i_order_item_inx-updateflag = 'U'.
          i_order_item_inx-profit_ctr = 'X'.
          APPEND: i_order_item_in, i_order_item_inx.
        ENDLOOP.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            input  = wa_data-vbeln
          IMPORTING
            output = wa_data-vbeln.
        CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
          EXPORTING
            salesdocument     = wa_data-vbeln
            order_header_in   = s_order_header_in
            order_header_inx  = s_order_header_inx
            behave_when_error = 'P'
          TABLES
            return            = it_return
            order_item_in     = i_order_item_in
            order_item_inx    = i_order_item_inx.

  • Plant maintanance service order creation using Sales order

    Hi,
    We have created plant maintanance service orders  using requiremnt class in sales . so in sales order schedule line the service order is created. but in some sales orders it will show the service order number and when we double click on that shows an error service order does not exist. please let us know what would be the problem.
    Thanks & regards,
    Rohit

    Hi ROHIT,
    First check do you have authorization for (IW32 , IW33) and Check your number ranges in OION and check is there any status is blocking  that number.
    Regards
    Nishad

  • Payment terms in Sales order by default

    Hi,
    I have configured in payment terms in customer master as AB11 for description blank . but when i took printout for sale order its showing by default "Paybale immediatly by deduction" so please guide me this is Abap issue or any other config i miised.
    Thanks
    Shital D

    Hi,
    It's all depend on how your program assigned to the output type (In tx: NACE) works.
    Please ask your ABAP person to debug the print program when you generate the printout. Check whether system is picking "AB11" as it's payment term at that point.
    If it picks, then he should be able to find where the description is picking as well.
    From functional side, there is nothing you can do as payment term AB11 is picking correctly in the sales order, and it is having the correct description in the configuration.
    Issue is with the program. You HAVE TO get a help from a ABAP person.
    Best regards,
    Anupa

  • Billing for Project Systems without using Sales Orders

    Hello All,
    We are using project systems in our project and we are not creating any sales orders for the same, however I am creating delivery using t-code CNSO and hence the outbound delivery is getting created, my question is can I create a billing document for this delivery and if yes how can I create the same.
    Kind Regards
    Atul

    Hi,
    Yes you can create billing document for this delivery
    Make sure following pre requsites
    In VOFA for your billing type assign document pricing procedure under account assignment/pricing tab
    In XD02 for customer under sales area data >> Billing assign customer pricing procedure
    And last in OVKK in combination of
    sales organization + distribution channel + division + document pricing procedure + customer pricing procedure = Price procedure
    kapil

  • Getting Error while creating multiple Orders using Sales order Create BAPI

    Hi,
    I am trying to create 2 orders thru the Sales order create BAPI before I commit and save the orders. The Orders are getting created and the BAPI is coming back with success, but it is not setting the system status on the line items of the 1st order. So when I try to cancel the line items on the first order I get the error 'No status object is available for SDI 4924/10' . I would really appreciate if anyone has encountered such error before and could help me out with the reason for this error and the possible solution.
    Thanks in advance,
    David.

    Hi,
    Check the following link:
    http://www.sap-img.com/bapi.htm
    Regards,
    Bhaskar

Maybe you are looking for

  • Pages 5.2 documents unsuccessfully try to open with old version 4.3

    I understand that I have two version of pages, new (5.2) and old (4.3), with separate icons in my Applications folder. The way it has been working is this: • If I opened an document created with Pages 4, it prompted me to automatically update with Pa

  • Where is sunperf?

    I'm trying to build a simple FORTRAN program with the sunperf library using Sun Studio 12 for Solaris 10 x86/64. When I add: -xlic_lib=sunperfto my compile options, I get: ld: fatal: library -lsunperf: not foundIf I do a 'find' in SUNWspro, there's n

  • How to get total at each hierarchy

    Hello Gurus, Does anybody know how to get total at each  level. I mean, if I have the following structure... Level 1 Level 2 Level 3 Level 4 Level 5 At level 5 we have the following calculation Volume      Price    Amount(From Formula Volume * price)

  • How to limit streaming bandwith using Flash media streaming server

    Hello, We have recently designed our audio streaming player (designed in Flash) to stream mp3 content using FMS rather than progressive download. Our goal was to reduce the waste of bandwidth which occurs with progressive download - in cases where th

  • ValueBound() valueUnbound() for every jsp:setProperty .../

    Hi.           My helper class (implementing HttpSessionBindingListener) is put into           the HttpServletSession.           What I want is valueBound()/valueUnbound() on creation/deletion of the           session.           The following code: