Restrict Goods Receipt PO without PO

Hi Experts,
I want to restrict the users on creating Goods Receipt PO without link from Purchase Order....They can only create GRPO from Purchase Order...
Im not expert on creating Sp Notification please if you any sample on how to deal with this...
Thanks a lot...
John

Hi John,
           I guess you need to apply transaction Notification.
Here is the SP,
If @object_type='20' and @transaction_type='A'
BEGIN
If Exists (Select * from [dbo].[OPDN] T0 Inner Join PDN1 T1 On T0.DocEntry=T1.DocEntry
Where T0.DocEntry = @list_of_cols_val_tab_del and T1.BaseEntry is null)
BEGIN
Select @error = -1,
@error_message = 'Must Raise PO First'
End
End
Thanks & Regards,
Shambhu

Similar Messages

  • Restricting Good Receipt Unless Production Order Confirmed

    Hi
    Experts,
    I want to Restricting Good Receipt Unless Production Order Confirmed
    I am doing following thing but the error is occured.
    Use Tcode BS02 ( Customising USer status profile).
    2. Select the order type which you want to configure (eg:PP000001) and choose "Details" button.
    3. In the User status table do the following:
    a. In the status no field type"1" , status field "Sta1", short text"GR not allowed",  lowest no "1",  Highest No "2". Mark a tick in the initial stats check box.
    b.Next line, type status no field "2" ,status field "sta2", short text"Gr allowed", lowest no "2" , highest no "2".
    4. Select the STA1 line and choose details. select the "create"button.select the "GR for prod order", mark "forbidden
    radio button" and "set radio button".
    5. Select the STA2 line and choose details. Selct the "create"button. select "confirm order", mark "permitted radio button" and "set radio button". Next choose "GR for prod order" , mark "permitted radio button".
    6.Save.
    Create a prod order and check whether the required scenario is working.
    I have created user status profile as PP000001   GR
    ERROR
    First define allowed object types
    Message no. BS218
    Diagnosis
    The object types for which a status profile may be used define which business transactions are included in business transaction control.
    Procedure
    First define for which object types this status profile can be used.
    What is object type how to define?
    Thanks & Regards
    Pert

    Hi,
    Refer to the below thread which addresses the same need:
    Re: GR not allowed :BS02
    Revert if you face any issues.
    Regards,
    Vivek

  • Don't want a Goods Receipt PO without Purchase Order

    Hello Experts,
    I am looking for a solution that Goods Receipt PO must be restricted as no Goods should be received without Purchase Order.
    Is it possible ?
    Help Required ....
    Thanks & Best Regards,

    Hi
    This restriction is possible only by the 'SBO_SP_TransactionNotification' Stored procedure.
    You can learn more about this stored procedure from the following link:
    [https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e991e2b9-0901-0010-0395-ef5268b00aaf]
    The following is the code which restricts GRPO created without PO
    set ANSI_NULLS ON
    set QUOTED_IDENTIFIER ON
    go
    ALTER proc [dbo].[SBO_SP_TransactionNotification]
    @object_type nvarchar(25),     -- 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'
    IF (@object_type='20')
    BEGIN
    /* Purchase Delivery Note (Goods Receipt PO)*/
    if (@transaction_type='A')
    BEGIN
    IF (SELECT max(ISNULL(T0.BaseEntry,-1))  FROM PDN1 T0 WHERE T0.DocEntry = @list_of_cols_val_tab_del) != -1
    BEGIN
      set @error = 0
      set @error_message = N'Ok'
    END
    ELSE
    BEGIN
        set @error_message='Goods Receipt PO cannot be created directly. Copy from PO'
        set @error=1 
    END
    END
    END
    -- Select the return values
    select @error, @error_message
    end

  • Good receipt with/without GR assignment

    Dear all,
    I am little puzzle to get an understanding in difference between...
    Goods receipt with GR assignment
    and
    Goods receipt without GR assignment.
    Can please anyone let me know in details.
    Thanks a lot in advance,
    Cheers!

    perhaps let me be more clear.
    above query is related to Confirmations -related goods issue.
    In customization-in purchasing- under confirmation- under set up conformation control .............there is an indicator to select / or not to select GR assignment indicator ...............in order to post the GR with reference to vendor confirmations.
    I wanted to enquire why and what is the functionality of this GR assignment and how system is going to react ........when we do select OR when we do not select that indicator.
    Hope this well help any body to get some idea of my query.
    Cheers!

  • I want to  after teco to restrict Goods Receipt,Goods Isssue,Conformation

    Dear Sir,
    i created status profile and assigned to order type.
    in the status profile
    Confirmation of order ,goods receipt of prod order,gi of prod order as forbidden.
    but after teco not restricted confirmation .
    please explain steps.
    Regards,
    Naresh Reddy Nandi

    This is a Standard feature of SAP.
    Create the user status and assign to the order type. In that you can create the user status TECO and forbid the CNF status. So if you activate your user status TECO to your order it will stop the confirmation.
    You can control this using transaction BS22,
    Select status I0045 TECO Technically completed, double click on this value and then select the radio button for 
    RMPH Partially confirm order
    RMPO Partially confirm operation
    RMRP Incoming invoice
    RMRU Confirm order
    RMWA Goods Movement
    RMWF Goods receipt for prodn. order
    RMWI Inventory difference
    RMWL Goods issue delivery
    SDGI Post goods issue
    and select Forbidden to Disallow the above functions, save it. With this you can restrict GI/GR/Conf. for the Orders.
    But these settings are at Client level, so please be careful.
    Alternative method is Check with this user exit, CONFPP01.
    This will help you to meet the requirement, with the help of your ABAP consultant you can achieve this by activating this user Exit. The system will throw an error message if you try to confirm an order which has the TECO status.
    Regards,
    JHPert

  • Automatic goods receipt happening without any settings

    Hi,
    I created a production order and released it... now I am confirming it through CO15 at header level... in that system is proposing automatic goods receipt...I checked these settings...no Production scheduling profile attached in material master... in the routing no control key is attached which is having automatic goods receipt indicator....then why system still allowing to do Automatic goods receipt...is there any other setting which results in this..can you guide...
    Thanks
    Kumar

    Hi Kumar
    Please check the production scheduling profile field in production order control tab.
    If you find production scheduling profile, then check the Substitute Scheduler field in order type dependent parameters for your order type. If you find entry value in production scheduler. From here the production scheduler will be picked by default and in OPJ9 what production scheduling profile assigned that will be picked in production order as default.
    Based on settings in default production scheduling profile  this automatic GR is happening.
    Regards
    Kesava

  • Goods Receipts & Issues without any financial impact - (No accounting Docs)

    Hi Experts,
    We have this new scenario to manage some goods which we do not own or manufacture in any of our plants, but only store them in our warehouse for another Company and release them upon a shipment notification from them to one of our common customers. Furthermore our own products against this customers' orders are combined with the non-owned pruducts and shipped as a strategy to cut freight & extra transit cost.
    We intend to have visibilty over these non-owned products but do not want it to have any financial impact in our system as we Receive and Issue them in and out of inventory.
    I have been thinking of consignment, subcontracting etc. but will like to get more ideas on how to do this.
    Your ideas will be appreciated.
    Thx,
    LAN.

    there is no corresponding goods issue movement to a 501 receipt.
    you can issue with any suitable goods issue movement, like goods issue to cost center 201, or goods issue to scrap 551, or 601 goods issue to outbound delivery.
    Hi Jurgen,
    As there is no direct matching GI for 501 receipts other relevant GI Mvt types could be used but in my case I get errors when trying 201-  (Update control of Movement Type is incorrect (entry 201_X_L) msg. # M7226). I have tried to create a new Mvt. Type copying from 201, but the system defaults the Mvt. Indicator field and won't let me add an L on the new custom type.
    When I tried 601 it also refereced the cost & profit centers associated with the plant in the material documents and we do not want any financial relevancy here. Could you suggest a Mvt. Type that could be ideal here.
    Thanks,
    LN.

  • Extraction Good Receipt lines without Invoice posting

    Dear,
    Is there a possibility to extract the open GR items for which no Invoice has been posted via MIRO transaction ?

    Hi,
       Use TRX ME2L
    Scope of List = BEST
    Selection Parameters = Rechnung
    This will provide a List of all POs without an invoice.(With and without a GR)
    In the report filter "To be del." = 0 to get thoose items where GR has been posted.
    regards

  • How to restrict Goods Reciept before Confirmation

    Greetings..
                  How to restrict Goods receipt (MB31,Movnt type 101) before Porduction Order Confirmation in CO11.
    Right now if i do GR without confirmation, system allowed this.
    How to restrct it .

    Dear SAP PP,
    Check this links,
    [Link1|How to stop the goods receipt before issueing the goods for production orde;
    [Restricting GR for a production order|Re: confirmation issue]
    Regards
    Mangalraj.S

  • Error adding Goods Receipt PO based on Purchase Order

    I am working on an add-on that was working against a 2005A version of SAP Business One and I am upgrading it to run against a 2007A Company (PL41)
    I am receiving strange errors when testing the add-on.
    I can add a Purchase order not based on a Goods Receipt PO without any problems but as soon as I specify a base type, entry and line I get either -1 General Error, or the Tried to Read/Write Protected Memory Error.  The error I receive seems to arbitrarily change between the two.
    I have read a few notes on the forums about this but none of them have proven useful in solving my problem.  I have checked the DI-API version on my PC and it is definitely using 8.0.177.0 which matches the version of SBO that I am running.  I have re-installed the DI etc without any success.
    The following is the code snippet which I am using to test:  I have verified that the referenced purchase order is open, contains the correct item, customer etc
    int iResult = -1;
    string sResult = string.Empty;
    string sOutput = string.Empty;
    try
    sOutput += Environment.NewLine + "Connecting to company...";
          sbocoy = new SAPbobsCOM.Company();
          sbocoy.Server = "<insert server name here>";
          sbocoy.CompanyDB = "<insert database name here>";
          sbocoy.LicenseServer = "<insert server name here>:30000";
          sbocoy.UseTrusted = true;
          sbocoy.DbServerType = SAPbobsCOM.BoDataServerTypes.dst_MSSQL2005;
          sbocoy.UserName = "manager";
          sbocoy.Password = "<inser sap user here>";
          iResult = sbocoy.Connect();
          sOutput += Environment.NewLine + "Connected";
          SAPbobsCOM.Documents PO = (SAPbobsCOM.Documents)sbocoy.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseOrders);
          SAPbobsCOM.Documents GoodsReceiptPO = (SAPbobsCOM.Documents)sbocoy.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseDeliveryNotes);
          sOutput += Environment.NewLine + "Get Purchase Order";
          PO.GetByKey(1402);
          sOutput += Environment.NewLine + String.Format("DocNum: {0}; DocEntry: {1}; ItemCode: {2}; LineNum: {3}", PO.DocNum, PO.DocEntry, PO.Lines.ItemCode, PO.Lines.LineNum);
          GoodsReceiptPO.CardCode = PO.CardCode;
          GoodsReceiptPO.CardName = PO.CardName;
          GoodsReceiptPO.Lines.ItemCode = PO.Lines.ItemCode;
          GoodsReceiptPO.Lines.ItemDescription = PO.Lines.ItemDescription;
          GoodsReceiptPO.Lines.Quantity = 1.0;
          GoodsReceiptPO.Lines.BaseType = int.Parse(PO.DocObjectCodeEx); // If I comment out this and the next two lines the document will add
          GoodsReceiptPO.Lines.BaseEntry = PO.DocEntry;
          GoodsReceiptPO.Lines.BaseLine = PO.Lines.LineNum;
          sOutput += Environment.NewLine + "Adding Goods Receipt...";
          iResult = GoodsReceiptPO.Add();
          sResult = sbocoy.GetLastErrorDescription();
          sOutput += Environment.NewLine + string.Format("Result [{0}] {1}", iResult, sResult);
    catch (Exception ex)
    sOutput += string.Format(Environment.NewLine + "Exception: {0}{1}SBOError: {2}", ex.Message, Environment.NewLine, sbocoy.GetLastErrorDescription());
    The results when I try and reference the purchase order are:
    Connecting to company...
    Connected
    Get Purchase Order
    DocNum: 301396; DocEntry: 1402; ItemCode: SEANTESTITEM; LineNum: 1
    Adding Goods Receipt...
    Exception: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
    If I comment out the 3 lines that reference the base document the Goods Receipt Adds and the following is the output...
    Connecting to company...
    Connected
    Get Purchase Order
    DocNum: 301396; DocEntry: 1402; ItemCode: SEANTESTITEM; LineNum: 1
    Adding Goods Receipt...
    Result [0]
    The above code will work correctly if we base a Delivery Note on a Sales Order so it appears to be specifically related to the Purchasing Documents.
    Edited by: Sean Archer on Feb 2, 2009 2:23 PM

    Hi Ganesh,
    Thank you for the reply.
    I ran the add-on against another database and it is working.
    I also verified that the document was failing to create if done via the Data Transfer Workbench so it would appear the issue affects the DI-API irrespective of add-on.
    I will need to do more testing to confirm whether this is a bug with PL41 of 2007A or a corrupt database as you suggest.
    Cheers,
    Sean

  • Goods Receipt Note Issue

    Hi,
    I have raised Good Receipt Note without giving Storage Location.
    In MMBE I cant able to see the stock but 101 movement is happend.
    Please let me know where can I see the stock.
    Regards,
    Karthik

    Hi Kartyic,
                   Please check the PO, must be raised by the Account Assignment, else the system would not have allowed the to post the GRN without Storage Location, Else it might have been defaulted by PO.
    in MMBE check for the respective storage location that given in PO.
    Hope it helps
    Regards,
    Yawar Khan

  • Goods Receipt workflow

    Dear All,
    What are the steps to create the workflow for Goods Receipt notification without approval. How we can assign the standard  WS10400010 -- Goods Receipt Workflow Without Approval.
    Regards,
    Rahul Singh

    Dear Suresh,
    Your contribution to SDN is appreciated.  Thank you very much. I have been looking on SDN but i did not get the exact details to trigger my work flow .
    My process in details so that others can take help from this.
    I created my own custom workflow with header BOR MKPF.
    and for triggering the workflow i used this code in enhancement point as below.
    DATA: KEY type SWEINSTCOU-OBJKEY.
    BREAK RSINGH_MI.
    KEY = IS_MKPF-mblnr.
    CLEAR KEY.
    CONCATENATE IS_MKPF-mblnr IS_MKPF-mJAHR INTO KEY.
    CALL FUNCTION 'SWE_EVENT_CREATE'
    EXPORTING
    objtype = 'MKPF' "'BUS2203'
    objkey = KEY
    event = 'CREATED' "'SAVED'
    CREATOR = ' '
    TAKE_WORKITEM_REQUESTER = ' '
    START_WITH_DELAY = ' '
    START_RECFB_SYNCHRON = ' '
    NO_COMMIT_FOR_QUEUE = ' '
    DEBUG_FLAG = ' '
    NO_LOGGING = ' '
    IDENT =
    IMPORTING
    EVENT_ID =
    TABLES
    EVENT_CONTAINER =
    EXCEPTIONS
    OBJTYPE_NOT_FOUND = 1
    OTHERS = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    Endif..
    Regards,
    Rahul Singh

  • Able to do Goods Receipt without Goods Issue in Intercompany STO process

    Hi,
    We are in ECC 6.0 and noticed that we are able to post Goods Receipt in receiving plant (Intecompany) without even goods issues in supplying plant.
    How to restrict proceeding Goods receipt in case no GI at supplying plant?
    Please advice.
    Regards,
    Ram

    SAP explains in OSS Note 25220 - No stock in transit with cross-company purchase orders:
    This procedure was chosen because usually the issuing and receiving companies have to be managed on different computers.  In addition, goods receipt in the receiving plant can be posted before goods issue in the issuing plant with this kind of stock transfer, i.e., the corresponding stock in transit would temporarily be negative.
    If you want restrict this situation, then you have to do some coding in  userexi: EXIT_SAPMM07M_001

  • List of Invoices which are paid without a Goods receipt

    Hello,
    Does anyone know a report which shows invoices which are paid without goods receipt being done on them. The reason for this is the process that we follow:
    We dont do GR based IV  because there are invoices which are received without the Goods receipt being done. So the process is that all invoices which dont have a Goods received are automatically R-blocked by the system and hence no payment can be released unless they are Goods receipted. We run transaction MRBR in background everyday and it releases invoices which have a corresponding GR. At month end, we do a GRIR clearing account transaction which cleared all invoices which didnt have a GR (this is the way it was done historically) and we are looking to improve this process. What this means is that an invoice which didnt have a goods receipt also got cleared off and the R block was removed and hence it appeared in the automatic payment program and was paid.
    Business wants to find out any report which would show them all invoices paid without a GR. Its the only way to know what payments have been made to vendors which actually shouldnt have been made.
    Any insights would be really helpful.
    Thanks
    Keyur

    dear sir
    in MB5S- list of GR/IR balances.
    this report will show the GR/IR pending.
    regards
    jrp

  • Restrict PO goods receipt based on PO due date

    Folks,
    Is there a way to restrict the processing of a PO goods receipt with tnx MIGO if the PO due date is too far in the future. Basically,I want to stop goods receipts when the physical delivery much earlier than the PO due date.
    Thanks,
    Greg Russell
    IT Analyst - SAP Supply Chain
    AngioDynamics

    There is no configuratin setting  to restrict the processing of a PO goods receipt with tnx MIGO if the PO due date is too far in the future.
        You can use the enhancement MBCF0005 and component EXIT_SAPM07DR_001 and make changes based on your requirement.
    With Best Regards,
    Srinivas

Maybe you are looking for

  • Setting up Chat Room with Jabber

    I am trying to create a chat room for multiple users all using a Jabber (gmail) account within ichat.  Is there a special naming protocol to creating a chat room or do you need to create an address somewhere before joining this chat room? I have no p

  • Lion server, time machine for clients on multiple hard disks

    I'm trying to setup a macmini server with four different firewire drives (has this working in 10.6.8 working great) however in lion server you can only have ONE timemachine backup destination. apple put an Share items/Backups folder with a .com.apple

  • ISE 1.2 patch 5 My devices portal not showing regsitered devices

    Hello Guys, I am running ISE 1.2 with all recent patches installed. I have a weird issue where AD users login to mydevices portal and are not able to view any of their registered devices. even thou the devices were successfully registered and onboard

  • FCP 7 Crashing on start up after Mavericks update.

    FCP 7 Crashing on start up after Mavericks update.   I've seemingly tried everything (trashing prefs, trashing plug-ins, OS updates, FCP re-install)  Any advise on next steps? Many thanks, sean schiavolin Running Mac Pro 12 core Intel Xeon

  • Write a file with specific path

    hi all, i found some sample code to write into a file, like using new FileOutputStream or new FileWriter. the problem is that you only specify the file name. i'd like to specify the path where the file will be. is it possible ? which class should i u