Ristrict user not to go for delivery with out sale order.

Hi,
I need some Help in ristricting the user from entering the Delivery document with any sale order.
As per the requirement all the documents should run in a proper fassion.
sale order> Delivery> Invoice.
Purchase Order> GRPO> Invoice.
If any change in the flow the user should not be allowed.
Is there any possibility to implement this can you please help me in doing such.
Thanks,
Mahi.

Hello Mahi,
Is it not a trigger, it is inside store procedure of SBO_SP_TransactionNotification, which is standard part of the SAP B1 installation...
read the following blog of Lisa :
/people/lisa.mulchinock/blog/2009/05/22/the-sptransactionnotification-stored-procedure
ALTER   proc [dbo].[SBO_SP_TransactionNotification]
@object_type nvarchar(20),                     -- SBO Object Type
@transaction_type nchar(1),               -- [A]dd, <u>pdate, [D]elete, [C]ancel, C[L]ose
@num_of_cols_in_key int,
@list_of_key_cols_tab_del nvarchar(255),
@list_of_cols_val_tab_del nvarchar(255)
AS
BEGIN
-- Return VALUES
declare @error  int                    -- Result (0 for no error)
declare @error_message nvarchar (200)           -- Error string to be displayed
SELECT @error = 0
SELECT @error_message = N'Ok'
DECLARE @docnum nvarchar(50)
--     ADD     YOUR     CODE     HERE
if @object_type='15' and @transaction_type='A'
BEGIN
  if exists(select top 1 'A' from dln1 T0 where T0.BaseType != '17' and T0.DocEntry = @list_of_cols_val_tab_del)
  begin
     set @error = '-1'
     set @error_message = 'delivery without sales order is not allowed!'
  end
END
-- SELECTthe return VALUES
SELECT @error, @error_message
END
Regards,
J.

Similar Messages

  • Delivery with out sales order

    hi frnds
    In which scenario, we create the delivery without sales order? What is the Tcode for that?
    regards

    Sales Order created in non-sap/legacy system,  you want to deliver the same order in sap system . Inthis case this delivery is called "without order reference" as the Sales order created in non-sap/legacy system can not be considered as a reference document.
    Delivery type LO is used for this.
    Normally Item category is copied from the sales order to delivery document e.g.,Item category of the standard/normal item is TAN in sales order and it is copied to delivery doc., so in delivery doc also Item category is TAN.
    But, in LO type of delivery, there is no reference order, so Item category is determined in the delivery by ,
    Delivery type + Item category group + Item usage + Item category of higher level item (if exists).
    Regards

  • Pros and Cons not determining / having a Delivery Plant in Sales Order?

    Hi Mates
    Here I have come-up with one more (weired?) requirement from my client.
    We have two plants manufacturing same product and supplying to all customers (some time in same sales order with two different line items).
    At the timeof creating a sales order, marketing does't know from which plant the material will move and hence they don't want to fill the Delivering Plant field (VBRP-BUKRS at Shipping tab) for each Item.
    They are insisting me to map it as above though I had explained about various pros and cons for not determining a mandatory delivery plant
    in sales order like the requirements and shipping stuff.
    Yet, yet they want this.
    Has anyone come across this kind of requirement before? What best you had done for that?
    Can I ask you what are the Pros and cons on not having a Delivery Plant at Sales Order level?
    what if I could determine it Delivery level?
    Any comments, suggestions, replies and advices are taken humbly.
    Cheers
    Ajay Kumar Veeranki

    Dear Mahulenka
    Thanks a lot for the reply. It do have helped me.
    Yest it is VBAP-WERKS (typo error ).
    Infact I had given the same solution for the issue.
    Interstingly, they are insisting on a better solution fit for their requirement. Anyway shall 'highlight' the points again to them try to get it solved
    Just wondering has anyone faced the same situation before.
    Thanks again for the reply and good luck
    Best Regards
    Ajay Kumar Veeranki

  • Opening and closing stock with sales order and with out sales order

    hello,
    any body please help me my client want to check opening stock and and closing stock in areport.
    material contains batch and some material with sales order and some are with out sales order. my client is asking this in a single layout. please tell me isthere any teport or bapi or function module to get this report.
    this is very uregent. and layout is requesting like opening stock, production stock, sales stock and closing stock.
    please guide me to get this report.
    Thanks & Regads
    Bhakta

    Transaction MB5B
    For sales order related use specila stock as E and use radio button indicator in stock type
    For stock w/o sales order, use special stock indiactor as "space' and stock type valuated stock.
    to get a perticular month,opening stock/closing stock enter the start date/end date as month start and end date.
    See the o/p which will give the stock as required by you

  • Question - SD user exit for Billing with multiple sales orders

    We have a situation where we are summarizing Accounting Billing document updates via OBCY, transaction type VBRK .
    We will also have multiple sales orders per billing document.
    One of our accounts is a COGS- clearing account which will post for both delivery and billing documents.
    Our goal will be to clear the COGS-clearing account after the delivery and billing has occurred.
    One alternative being evaluated is to update the assignment field ( bseg -zuonr) for the sales order. 
    To do this, one of the SD user exits , perhaps SDVFX008, would be necessary to update the sales order from vbrp-vbel2 to bseg-zuonr.
    I am concerned about
    1) will the update work
    2) what will be the effect on summarization
    If we try to implement the user exit , would we be successful to just update the assignment field for just the COGS accruall account.   _Therefore the next effect is that AR,Rev, etc, would summarize , but the COGS clearing would break out due to the update to the assignment field..
    Does anyone have any experience similar to this situation.
    Thank you,
    Jeff

    Hi
    You can use SDVFX008 or FI Substitution exit RGGBS000 (Form U100)
    You can very well update the required GL (COGS Clearing) with the Sales order No... However, how exactly it would behave upon summarization, I am not sure about that.. you need to develop that and see
    In the COGS account during PGI, Sales Order No is populated always in the field "Sales Order"... In your case, the COGS clearing account should be having sales order no populated...
    So, if you are successful to populate Sales Order No during billing in the "Sale Order" Field for the COGS clearing account, that should also suffice...
    or See if you can have relevant sort key in FS00 for the COGS clearing account so that Sales order no is always populated..
    Regards
    Ajay M

  • Create invoice with out sales order or delivery

    Hi,
    is it possible to create invoice with out sales document or delivery. A scenario, where you buy some article and get the invoice and pay the money.

    need to raise direct VF01 for a customer. Is there any Bapi
    Go to SE37, input BAPI_BILLINGDOC_CREATEMULTIPLE and execute. 
    1)  There press F8
    2)  Double click on the value "BILLINGDATAIN"
    3)  Input Sales Organization, Dis.Chnl, Div, Order Type, Bill date, Sold to etc., and press F3
    4)  Now execute (F8)
    5)  Press "Success"
    thanks
    G. Lakshmipathi

  • BAPI needed for goods receipt for delivery created from sales order

    Hi experts,
    I need help.
    I want to post goods receipt for the delivery created from sales order. I have tried out BAPI BAPI_GOODSMVT_CREATE but I am not able to post it.
    Is there any way to post this? I need BAPI and not FM MB_*....
    Thanks & REgards,
    Bhavin A. Shah

    Hi,
    Please refer to link,
    https://wiki.sdn.sap.com/wiki/display/Snippets/BAPI_GOODSMVT_CREATE-ABAP
    Regards
    Shree

  • Stored Procedure for Delivery based on Sales Order Title UDF

    Dear All,
    I have made a  UDF in the Sales Order Title as U_SOApproved which has been set with valid Values for the field as 1 - Yes and 2 - No and set default value for field set as 2.
    Now I want to have Stored Procedure by which whenever a delivery is made based on a Sales Order for Document Series Named Retail if in the above udf which is there in Sales Order is not set as 1 - Yes the system should not allow the add the delivery in the system.
    I know there is a option in Sales Order itself having a approved tick box but if I implement it then it would be applicable for all document series which I don't want. I want to have a check on a particular document series e.g Retail only.
    Please help in this regard.
    Regards,
    Kamlesh

    I'm actually looking for a complete block , I want to force the user to type a value in the GrossBuyPr.
    I have the following SP that I tried to modified to work for invoices but is not working
    DECLARE @numlinii int
    IF @transaction_type IN (N'A', N'U') AND (@Object_type IN (15)) AND (@num_of_cols_in_key = 1)
    BEGIN
    IF (@Object_type = 15)
    BEGIN
    SELECT TOP 1 @numlinii = (LineNum +1) FROM DLN1 INNER JOIN OITM ON DLN1.ItemCode = OITM.ItemCode AND (OITM.InvntItem N'N')
    WHERE DLN1.DocEntry = @list_of_cols_val_tab_del AND (ISNULL(GrossBuyPr, 0) = 0)
    ORDER BY Linenum ASC
    IF (ISNULL(@numlinii, 0) 0)
    BEGIN
    SET @error = 10
    SET @error_message = N'Value of field NNNNN in line No. ' + CONVERT(nvarchar(4), @numlinii) + N' is = 0 !'
    GOTO error_mesg
    END
    END -- ODLN (15)
    END
    Any ideas ?

  • MRP for  delivery block itemsin sales order

    Hi,
    For MTO scenario, where in sales order item is blocked for delivery.When MRP  run for sales order  for that item through MD50 then system not generating any requirement.
    Which parametrs  should I check?
    Regards
    Sanjay

    Hi ,
          In MRP control Parameters you can use ,
    1 .Create Purchase Requistion - value 2
    2 .Delivery Schedule - Value 1
    3 .Planning Mode -  Value 1
    4 Scheduling - Value 1
    Try with this .

  • ATP check for delivery in ECC & Sales order ATP check in APO

    Hi All,
    Can we do an ATP check for delivery in ECC , but for the same set of Materials- Plant combination , the ATP check when a SO is created should happen in APO .
    We do not want to remove the Business event 'B'  which is meant for delivery in  APO . For some materials we need APO ATP check to happen for delivery   & for some it should be in ECC  & for SO  the ATP check should happen in APO .
    Even if we do not have check instructions pertaining to Business event 'B' & a particular check mode (for the materials where the ATP check for delivery should happen in ECC & SO check to happen in APO)  , when we are doing an ATP check for delivery , it is still pointing to APO ATP check rather than ECC check .
    Any pointers for this is highly appreciated.
    Regards
    Surendra

    Hi Surendra,
    For SO, business event is A and for delivery it's B. When integrated with ECC, the check rule in ECC points as biz event in APO.
    You can control ATP check by customized settings for check rule in ECC.
    Also, by setting requirement class and requirement type in ECC, you control check mode in APO. So, even if you dont define for check mode in APO, the system might refer from ECC for the ATP check settings. Look into your ECC customization for how requirement class is derived and settings for requirement type. (based on MRP type, strategy grp and Item cat).
    I'm not sure how you can control ATP to happen for some sales orders/deleveries in ECC and for some in APO, since check mode is mentioned in material master.
    However, there are ATP BADIs (business add-ins) available in both ECC and APO, whch can serve your purpose.
    Regards,
    Bipin

  • Create Multiple delivery with 1 sales order

    Hi,
    I have to create 3 different delivery with 3 different line item in sales order,
    I need to code in RV50C901 only, for every item i am changing LIKP-ZUKRL,but nothing works,
    Please suggest

    Dear Sameer
    As per your requirement run the Tcode VF04 (Billing Due list) and select the Delivery Documents for which you want to to have single Billing Document by clicking on Collective Billing document/Online  Push Button in that screen.
    To Have Single Billing Document for Multiple Delivery you need to have Payer,Terms of Payment,Incoterms(part 1 and part2) same for all materials orelse the billing document will split and this split analysis is visible during creating of Billing document.
    Hope this will help you in solving your problem.
    Regards
    PSH

  • Bapi for Delivery Creation from Sales Order

    Hi
    I have multiple sales order and i want to create 1 outbound delivery from it just like what Vl10A is doing.
    Can i have BAPI or fumctiona module for same.
    Best Regards
    Subham

    Check this thread:BAPI for Delivery Creation
    Also search the forums..there are many threads addressing the same issue.
    Regards,
    Kiran

  • User exit or BADI for business area in sales order

    Hi,
    At present the business area in the sales order is greyed.i want to remove the greyed field and put some input value to the  business area  when a new sales order is created....
    Please suggest the user exits or BADIS
    Kanishak
    Edited by: Kanishak Gupta on Feb 4, 2010 1:06 PM

    Hi Kanishak
    You can use userexit userexit_cobl_send_header
    If you overule the settings, you will be able to enter business area ( GSBER )
    Also, try out:
    userexit_cobl_receive_vbak to transfer the screen value entered by the user back to vbak-gsber.
    If item level is also necessary you also need :
    userexit_cobl_send_item
    userexit_cobl_receive_vbap
    Hope this helps.
    Harsh

  • Lock characteristic value for configurable material in Sales Order

    Is there a setting in SAP which can prevent user changing characteristic value for configurable material in Sales Order after production order created for this Sales Order? Currently, it can only works when first delivery create for this Sales Order.
    Thanks a lot.

    Hi,,
    in the characteristic goto additional data tab,
    you have a field called not ready for input.
    you select this when the value in this characteristic come by calculation based on the previous selection.
    that field will be greyed out.
    OR
    u can even select the no display check box,
    by selecting this u cant see the characteristic in the list,, it will give u a popup before leaving the screen.
    for this the char has to be a required field.
    OR
    if any of this is not working then may be u can try out with authorization management.
    thanks

  • Services for Object button in Sales Order

    Hello Experts,
    We are not getting Services for Object Button in Sales Orders. Actually we need to attach some documents to Sales Orders.
    Thanks in advance.
    Mamta.

    Dear Friend,
    If you are not getting Services for Object Icon in Sales Document, then follow this:
    T-code - SU01 u2013 Here Enter User ID & click in change icon.
    Then click on Parameters Tab & Add Parameter u2013 SD_SWU_ACTIVE. .
    This will definitely solve your problem...
    Thanks,
    Jignesh mehta

Maybe you are looking for

  • Help need to script(urgent)

    hai everybody... i ahve written a javascript for popup a new window...this is my script script function open() if(portal40.wwctx_api.get_user=='JAYANTHAN') window.open('http://suntechchn:7777/pls/portal40/ATCMIS.ENQUIRY_REP.show?p_arg_names=_show_hea

  • Adding 'Z' infotype to ESS

    Hi Experts, It would be great if you can guide me on a way to include a 'Z' infotype as a link in ESS. A step by step explanation would be of great help as we dont have any strong ABAP WebDynpro support. Regards Kruna

  • Detect Browser

    Hi there There is a way to detect the browser, in this case IE, and redirect to a web that shows a message of incompatibility? All this in Adobe Muse Can anybody help me please

  • DSEE 6.3.1 upgrade to 7.0

    I'm in the middle of upgrading all my 6.3.1 servers to 7.0. I've been following the upgrade and migration guide (http://docs.sun.com/app/docs/doc/820-4808/6ng8f6kgj?l=en&a=view). I have upgraded DSCC and my DPS instances in my lab environment and am

  • Emailing Photos Results In Lower Resolution

    My brother just emailed me a photo he took on the iPhone 3GS and it was showing as 600x800 and I knew something was off. Pulling the photo from his phone to my computer results in a larger 1200x1600 photo. How can we email the full size image to each