SP blocking GRPO without Base PO unless it is zero value

Hello experts
I am trying to make stored procedure that block adding of GRPO if it is:  > 0.00 value AND not based on a PO
--GRPO without Base Document MUST be zero value
IF (@object_type = '20' AND @transaction_type= 'A')
BEGIN
IF EXISTS (SELECT T0.DocTotal FROM dbo.OPDN T0 where T0.DocTotal > '0')
SELECT @error = 1, @error_message = N'Independent GRPO must be zero value'
END
Can anyone assist me?
Or tell me if there is a better way to do this..
Thanks
Karen

Hi Andrew,
Please check below Transaction Notification.
If @object_type='20' and @transaction_type='A'
BEGIN
If Exists (Select T0.DocEntry 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 and T0.[DocTotal] > 0)
BEGIN
Select @error = -1,
@error_message = 'GRPO without PO must be ZERO Value'
End
End
Hope this help
Regards::::
Atul Chakraborty

Similar Messages

  • Stored Procedure to block DN for specified BP unless ODLN.NumAtCard contain 6-digit number

    Hello experts
    I am trying to us SPTN block delivery for specified BP unless supplier reference field contains 6 digit number (this is Customer PO number format)
    --Block CCOR001 DN unless 6 figure number in ODLN.NumAtCard
    IF @object_type = '15' AND @transaction_type = 'A'
    BEGIN
    IF EXISTS(SELECT T0.[Docentry] FROM ODLN T0 WHERE T0.[CardCode] = 'CCOR001' AND T0.[NumAtCard] != ###### AND T0.docentry = @list_of_cols_val_tab_del)
    SELECT @error = 1, @error_message = N'Cannot deliver without 6 digit Purchase Order number'
    END
    I am working on above query needing assistance with how to specify 6-digit number here ###### ?
    Regards,
    Karen

    Hi Nagarajan,
    Thank you for assistance these queries are functioning well and due to improving knowledge I have added another condition to because when I tested I discover it is possible to add DN by putting "Verbal" in the field. Because we have many customers who do not require formal purchase orders it is necessary to block 'Verbal' and 'To be confirmed' 'TBC' 'follow' and so on.
    Here is query: It seems to work fine with basic testing so far..
    IF @object_type = '15' AND @transaction_type IN ('A','U')
    BEGIN
    IF EXISTS(SELECT T0.[Docentry] FROM ODLN T0 WHERE T0.[CardCode] = 'CCOR001' AND T0.[NumAtCard] is null AND ISNUMERIC( T0.NumAtCard ) = 0 OR LEN(CAST(T0.[NumAtCard] As nvarchar(4000))) <> 6 AND T0.docentry = @list_of_cols_val_tab_del)
    SELECT @error = 1, @error_message = N'Cannot deliver without 6 digit Purchase Order number'
    END

  • Authorization without BASIS help

    Dear all,
    Kindly let me know, what all the authorization that we can give without BASIS help.
    Let me know the t-codes and what's possible (blocking some one to access something, hide something for some group etc) for a functional consultant without a BASIS person.
    Regards
    ET

    Hi,
    You can start in tcode su01. If you put your user name and click on modify you can get in the tab "Roles" and tab "Profiles". In roles you should have some roles in it. If you get into. If you double click next to any role you have it will take you to tcode pfcg, which is where the role is build. In there you have some tabs. The most importants would be "Menu" and "Authorizations".
    In the Menu tab you can assign transactions to the role. In the Authorization tab at the bottom you have an icon called "Change authorization data". In there is where the most complex work is done, because is where you assign what can of things will the profile be able to do and what kind of data will be he able to modify or see.
    As I mentioned there are a lot of details and from a basis point of view there would be even more.
    Hope it helps.
    Kind Regards,
    Edoardo

  • Is it possible to enter GR in GR Blocked stock without reference to PO

    Hi Experts,
    Is it possible to enter GR in GR Blocked Stock without reference to PO?
    Regards
    Manas

    HI All,
    I need the GR in GR Blocked stock and not in Blocked Stock.
    Scenario is : Material came to the gate without PO reference. Client told to enter the material into GR blocked stock. Po will be raised soon.
    Please help,
    Manas

  • Is it possible for my iPhone 5s to unblock a number that was blocked? Without me physically unblocking it?

    Is it possible for my iPhone 5s to unblock a number that was blocked? Without me physically unblocking it?

    The battery percentage indicator needs to be calibrated. For that, you need to drain down the battery way to 3-4% and charge it back to 100% without any interruptions. Let it get charged for 15 min more even if it's showing that it's fully charged and can be disconnected. No hardware problems as such!

  • Block Goods Issue base on Projects if null

    i have this requirement in SP
    Scenario.
    i want to block Goods Issue base on the ff. requirement
    1. if Project is Null it will block adding the Goods Issue if U_Department and U_Section is empty
    2. if Project is not Null i will allow adding the Goods Issue even the U_Department and U_section is null
    base on this requirement i made an SP but it doesn't work.
    --      Make Department Mandatory in Goods Issue
    IF (@object_type = '60') and (@transaction_type IN (N'A', N'U'))
    BEGIN
         IF EXISTS (SELECT T0.Docentry from OIGE T0 Inner Join IGE1 T1 ON T0.Docentry=T1.Docentry where
         T1.DocEntry = @list_of_cols_val_tab_del and (T1.Project is not null and T0.U_DEPT is null or T0.U_DEPT ='' ) )
         BEGIN
              Select @error = 10, @error_message = N'Department Must be filled-up!'
         END
    END
    --      Make Section Mandatory in Goods Issue
    IF (@object_type = '60') and (@transaction_type IN (N'A', N'U'))
    BEGIN
         IF EXISTS (SELECT T0.Docentry from OIGE T0 Inner Join IGE1 T1 ON T0.Docentry=T1.Docentry where
         T1.DocEntry = @list_of_cols_val_tab_del and (T1.Project is not null and T0.U_SECT is null or T0.U_SECT =''))
         BEGIN
              SET @error = 10
              SET @error_message = N'Section Must be filled-up!'
         END
    END
    What seems to be wrong w/ my Code?
    Best Regards...
    Fidel

    hi Avelino Fidel try this try this final query ,it will work
    IF (@object_type = '60') and (@transaction_type IN (N'A', N'U'))
    BEGIN
    IF EXISTS (SELECT distinct  T0.Docentry from OIGE T0 Inner Join IGE1 T1 ON T0.Docentry=T1.Docentry where
    T1.DocEntry = @list_of_cols_val_tab_del and (isnull(T1.Project,'') = '')  or  (isnull(T0.U_DEPT,'') = '' ) )
    BEGIN
    Select @error = 10, @error_message = N'Department Must be filled-up!'
    END
    END
    Edited by: Prasanna s on Aug 29, 2009 10:20 AM

  • Cross Company Stock Transfer- Please check excise base for the item is zero

    Hi,
    My scenario is Cross company Stock transfer (Two different Company Codes)
    I have done following steps :
    1.Create Purchase Order
    2.Create Outbound Delivery for Purchase Order
    3.Post Goods Issue for Delivery
    4.Creating Billing Document
    5.Creating Excise Invoice
    6.Printing of Excise Invoice
    7.Post Goods Receipt for Stock Transport Order
    Till MIGO there is no problem.
    I am getting a errro while doing MIGO with reference to Outbound Delivery, when I enter Excise Invoice created in sending plant, I am getting error as
    "Please check excise base for the item is zero" - Message no. 4F121
    Excise Duty values are flowing as per the excise invoice but system make base value as 0 , I have maintained Assesable value in J1ID also. We are using TAXINN.
    Pl. help
    Thanks
    Vikas

    Hi
    The best way to slolve this problem, Now is to maintain Assable value in Material Master For reciving Plant.
    Hear you can maintain all the chapter id, register A or C, etc
    and then try doing GR,
    The other way and the permanent solution is
    VPRS or equivalent
    Condition class B Prices
    Calculat.type C Quantity
    Condit.category  H
    Cond.control H Condition value fixed
    Condit.origin A Automatic pricing
    In this Condition category is most important and by this only system copies the base amount for excise duty calculation in MIGO or J1IEX.
    Regs
    Niti Narayan

  • On basis of drop down by key values i want to enable and disable ui elements is wda

    How to enable and disable ui elements on basis of drop down by key values as i show in screen shot i have 3 values in drop down by key on basis of those values i need to enable and disable ui elements in webdynpro abap kindly reply back

    Hi Sreedhara,
    There are many tutorials on SCN for learning Web Dynpro ABAP. If the following steps don't make sense to you, please do a search for some tutorials and read through the tutorial materials. Hopefully the tutorials will help you to become familiar with some of the basics of Web Dynpro ABAP.
    Here is how to enable or disable a UI element upon selection from a DropDownByKey.
    In your view context, create a context attribute of type wdy_boolean. For now, let's call this attribute IS_ENABLED
    In your view layout, bind the enabled property of the UI element to the context attribute IS_ENABLED.
    In your view actions, create an action-- let's call it SET_ENABLED-- and bind this action to the DropDownByKey element's onSelect event in the view layout.
    In the event handler method for the SET_ENABLED action, use the Code Wizard to read the value of the DropDownByKey selected value, then use the Code Wizard again to set the value of context attribute IS_ENABLED to either true or false.
    Now when a value is selected from the DropDownByKey, the SET_ENABLED action will be triggered and the IS_ENABLED context attribute will be set to either true or false. Since your UI element's enabled property is bound to this true or false value via the context binding, the UI element will change to enabled or disabled.
    Good luck!
    Cheers,
    Amy

  • Please check excise base for the item is zero

    Hi,
    My scenario is Cross company Stock transfer (Two different Company Codes)
    I have done following steps :
    1.Create Purchase Order
    2.Create Outbound Delivery for Purchase Order
    3.Post Goods Issue for Delivery
    4.Creating Billing Document
    5.Creating Excise Invoice
    6.Printing of Excise Invoice
    7.Post Goods Receipt for Stock Transport Order
    Till MIGO there is no problem.
    I am getting a errro while doing MIGO with reference to Outbound Delivery, when I enter Excise Invoice created in sending plant, I am getting error as
    "Please check excise base for the item is zero" -  Message no. 4F121
    Excise Duty values are flowing as per the excise invoice but system make base value as 0 , I have maintained Assesable value in J1ID also. We are using TAXINN.
    Pl. help
    Thanks
    Vikas

    hi
    can u please share how u slove , we also face same issue
    Thanks
    Leo

  • Cannot post document : Tax base in local currency is zero

    Hi,
    I have an order with a down payment.
    When I want to create the billing document, I get following error message:
    Message no. FF759.
    Cannot post document: tax base in local currency is zero.
    You tried generating a document in which the tax base in local currency is zero although the tax amount and tax base in foreign currency is not zero.
    I see in the sales order conditions that the VPRO is filled out.
    Where can I check what is wrong?
    How can I create the billing document?
    Thank you.
    Kind regards,
    Linda

    Hi,
    Thanks for your reply.
    The error message does not make sense.
    We have maintained the exchange rates.
    We only have postings in local currency (PLN).
    In the order I can't find any zero values for the tax amount or the tax base.
    But when we do a be-bugging, we get the following:
    Error is being trown in LTAX2U27:
    Prüfung: Steuer <> 0 und Steuerbasisbetrag = 0
      IF ( i_bset-hwbas = 0 AND i_bset-hwste <> 0 ) OR
         ( i_bset-fwbas = 0 AND i_bset-fwste <> 0 ) OR
         ( i_bset-h2bas = 0 AND i_bset-h2ste <> 0 ) OR
         ( i_bset-h3bas = 0 AND i_bset-h3ste <> 0 ).
    no error in case of external system is active             "N515047
    AND  billing document AND bas-amount = 0                  "N515047
    prerequisite: note 549712                                 "N515047
        IF  ext_activ IS INITIAL                              "N515047
        OR  i_bkpf-awtyp NE 'VBRK'.                           "N515047
          message_store 'FF' 'E' '759' blank blank blank blank.
        ENDIF.                                                "N515047
      ENDIF.
    At the moment of entry fields have following values:
    HWBAS     HWBAS_BSES     CURR     15     2     Tax Base Amount in Local Currency
    FWBAS     FWBAS_BSES     CURR     15     2     Tax base amount in document currency
    HWSTE     HWSTE     CURR     13     2     Tax Amount in Local Currency
    FWSTE     FWSTE     CURR     13     2     Tax Amount in Document Currency
    Do you have any idea to solve it?
    Thank you!
    Kind regards,
    Linda

  • Base Currency Or Base Amount Does Not Have a Value?

    Hi
    I've received the following error on the PRC: Distribute Borrowed and Lent Amounts process: Base Currency Or Base Amount Does Not Have a Value
    Does anyone know what it means?

    Hi
    Do you have different currencies for your provider and receiver operating units?
    Is there a difference between the transaction currency Ithe expenditure item) and the receiving OU currency?
    Verify daily exchange rates exists for the relevant transaction dates.
    Dina

  • Block Creation of Production order Unless released in Order.

    Hi Experts.
    we have a requirement where we want to block the creation of production order inless it is confirmed. Is there any User exit / or anyother indicator where i can define or configure so that the MRP run and also the Creation of the production order can be block for a sales order.
    Plz advice.
    Thanks in Advance
    Rishi

    Hi
    But Manually it does allow the user to create Production order .
    I want unless, Say the delivey block at item level is removed , User should not be allowed to create the production order for the relevant line item of the sales order.
    Any more suggestion
    Thanks
    Rishi

  • Automatic Block refresh without execute_query

    Can I have my block refresh automatically without doing an execute query ? I would like to refresh only the lines that got changed or updated in the DB by another process.
    -Ramesh

    Thanks for the reply.
    I have upgraded to Patch 14 and I do commit within the Form and have the DML Returning Value = YES. I still do not see the changes in the rows until I refresh or execute the query.
    I do not want to use a timer or some kind of polling to the server to see if the changes happened on the DB. Ideal way would be to have the server (8i) send the client any changes on the DB automatically and Form accept them without any requering or refreshing.
    -Ramesh.

  • Need blocking method without blocking main thread

    I have this problem:
    public void blockingMethod() {
      frame.setVisible(true);
      // wait for the user to click on a button on the frame
      return;
    }I want to make a method blocking until the user press a button on the frame. However, I can't make the current thread sleep or wait and then notify it when the button is pressed, because it is the main thread that calls this method. And the main thread is responsible for listening to events and repaint the frame.
    I could solve my problem by using a modal Dialog and let the user enter some data there and then exit the Dialog. Dialog.show() would block until the user exits it again. But I would rather use my frame, so I took a look at the code for Dialog.show() method, and it does something like this:
    EventDispatchThread dispatchThread =(EventDispatchThread)Thread.currentThread();
    * pump events, filter out input events for
    * component not belong to our modal dialog.
    * we already disabled other components in native code
    * but because the event is posted from a different
    * thread so it's possible that there are some events
    * for other component already posted in the queue
    * before we decide do modal show. 
    dispatchThread.pumpEventsForHierarchy(new Conditional() {
      public boolean evaluate() {
        return keepBlocking && windowClosingException == null;
    }, this);But EventDispatchThread is package protected, so I can't do this.
    Any suggestions? I think there are circumstances where you would like a method block, but where it is the main thread that calls the method (out of my control), and you would not like the main thread block unless you could make sure the gui would still repaint and events would run.

    Ah, nm. The main thread is not the same as the event thread.
    Whew! :)
    The first who reply will get the dukes.

  • Firewall Blocking Website without manual input

    Our firewall appears to be blocking a website without us setting it to block it. We only have basic threat detection enabled, but it seems the firewall did this on it's own, and we cannot find where to unblock the website.
    Anyone have any tips for new users?
    Thanks!

    Thanks for the information.
    Unfortunately you posted on the wrong forum.
    I would try this one:
    https://supportforums.cisco.com/community/5991/wan-routing-and-switching
    or this one:
    https://supportforums.cisco.com/community/6016/lan-switching-and-routing
    This forum is meant for Small Business units, so you may not be reaching the right audience to get the best answers for your issue
    I hope this helps

Maybe you are looking for

  • Difference in F-03

    Hello Sap Guru, we have a issue where when user is posting a document in back date & checing that document in F-03 (Clearing Doc), he is a facing this problem 1.  for one co.code, F-03 is taking old exchange rate only for old posted document 2  for a

  • ITunes can't find apps on iPod Touch and doesn't sync album artwork

    Ugh.  Here I go again. I have an iPod Touch (4th gen), 2010 MacBook Pro, all the latest operating systems and updates.  My iPod Touch crashed a bit and so I wanted to sync it again (using the USB cable, not wirelessly). (1) Suddenly, there was no mus

  • Error " M7 185 " consignment stock does not exists with Customer/vendor

    Dear SDN Team, The system is throwing the error "Special stock at customer/vendor 3000000001 does not exist (Notification E M7 185) . The consignment Process has been sucessfully maintained correctly with the customer/vendor in ECC system ,but the CR

  • Does CAF have the possibility to implement wait steps?

    I'm wondering if CAF has functionality to allocate a wait time to an action, in the same way that it is possible to put a wait step in ABAP workflow tasks. I can see one tab on the Action definition in design time GP that has a fixed date and allows

  • Using "Flagged" in a Mail rule

    I want to make all Flagged messages a different color (as well as being flagged) and looked at using a simple mail rule. However "Message is Flagged" is not a Mail rule criterion so it appears impossible to make something along the lines of: If any m