How to block IT Creation in PA30 ??

Hi Everyone!!
I would like to block the creation of an occurrence in Pa30. And authorise the creation only in a measure.
Do you have any idea how can it be achieved?
Any help would be greatly appreciated.
Have a great day

Hi Quentin,
I assume that you've found the user-exit for PA30. Now the code you can place there is as follows.
*****************Begin of code by Sam********
DATA: GS_PERNR LIKE P9020-PERNR,
      GS_PERNR1 LIKE P9020-PERNR,
      GS_CNT TYPE I.
To check Transaction Code.
IF SY-TCODE = 'PA30' and INNNN-INFTY = '0000'.
  MOVE INNNN TO I0000.
To check whether - Creation of new record.
  IF IPSYST-IOPER = 'INS'.
To check for user-id. 
     IF SY-UNAME <> 'SAMUEL_D' AND SY-UNAME <> 'HRADMIN'.
        MESSAGE E000(ZH) WITH
        'You are not authorized to create a new record'.
     ENDIF.
  ENDIF.
ENDIF.
*********END OF CODE**********
Put this code in the user exit for PAI of PA30. It'll work perfectly. In this case, you can also store the user-ids in a ZTABLE and check the same from it rather than hardcoding it in the program.
Hope this helps. Kindly award points if this was helpful for u.
Cheers,
Sam.

Similar Messages

  • How to block the creation of a Sales Orders without a linked Purchase Order

    Hi. I'm trying to block the creation of a Sales Order that doesn't have a linked Purchase Order. The first thing I did is using the SBO Transaction Notification as follows:
    IF  @transaction_type = 'A' AND @object_type='17'
    BEGIN
         IF (SELECT PoPrss FROM ORDR WHERE DocEntry = @list_of_cols_val_tab_del) = 'N'
         BEGIN
              SET @error = 1
              SET @error_message = 'Purchase Order Missing...'
         END
    END
    This works good. I create the Sales Order, I tick the purchase order field on the logistics tab, I click Add, and then the purchase order window appears...
    Then, the problem begins... If I click the Cancel button, the purchase order is obviously not created, but the Sales Order is created.
    Can someone tell me how to block the creation of the sales order If the user press the cancel button on the purchase order window (and the purchase order is not created)
    As far as I can see, after clicking the add button in the sales order document, the Sales Order is created on the DB. If there's no way of blocking the creation of the Sales Order, can I avoid closing the purchase order window by the SBO_TransactionNotification? (if the purchase order has not been created)
    Thanks...

    Hi Yail,
    I think you can't close the purchase order with the stored procedure.
    Try to catch the Event when the user click on Cancel button.
    So you can list the vents with event logger : https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ede3be37-0e01-0010-1883-cd1b5293473e
    You can block the cancel button and force the user to create the purchase order.
    Hope i help you
    Best regards
    Michael

  • How to block the Creation of Mulitple Excise Invoice in J1IS

    Hi Sap Gurs,
    Can any tell me how to block the System allowing  to Create One more Excise Invoice in J1IS against Same GI Material Document no (Ref Trans Type:MATD) for Outgoing Materials ie:Stock Transfer from One Plant to onother Plant by Mvt Type 351(Single Step Procedure)
    In SD, System is not allowing to Create One more Excise Invoive against One Billing Document Untill we Cancell the same.
    I want to make it like same for the above Issue.
    Pls check it in your system and give a Feed Back.
    Thanks in advance.
    Bye
    Sathish

    Hi Yail,
    I think you can't close the purchase order with the stored procedure.
    Try to catch the Event when the user click on Cancel button.
    So you can list the vents with event logger : https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ede3be37-0e01-0010-1883-cd1b5293473e
    You can block the cancel button and force the user to create the purchase order.
    Hope i help you
    Best regards
    Michael

  • How to block PR creation with no release strategy

    Hi,
    We have this PR release strategy implemented. Currrently, user are able to create the PR even there's no release strategy determined. Thus, PO can be created as the processing state is "02 Active". 
    Would like to block user from creating the PR if there's no release strategy determined. How should we do in order to achieve this?
    Many thanks in advance.
    Sue

    Hi Sue
    Assuming that you are using release with classification.
    Create a new characteristic for PR document type (CT04)
    Attach this characteristic to your Class (CL02)
    Create new release strategy and in Characteristic data you will have to assign all your PR document type. This will ensure that all the PRs need to be released.
    Regards
    Rajesh
    -Do reward if this is useful.

  • How to block changes in pr  after po creation

    We have set up the system messages (06 76 as error). However still it is possible that the user can change the description or add new line item after  after the release/po creation. How to prevent this.  how to block changes in pr  after po creation
    do i have to create  new system messages if yes then hoe kindly suggest
    Thanks.
    regards

    Dear Goel,
    When setting the message 06076 and 06400 as described in the note 385002            
    to error it is no more possible to create a second purchase order with              
    reference to the purchase requisition.                                              
    See SAP note
    315448     ME21N: Referencing a purchase requisition                                                                               
    Regards
    V V

  • How to block a material that not to creation of service notification thru-IW51

    Hi All,
    I have tried in all over areas ( MM02 level and MM06 level ) to block a material that not to create service notification with that material but didn't get a solution.If any one knows solution for this kindly provide me.
    "How to block a material that not to create a service notifcation thru IW51?"
    Best Regards,
    Narendra Konnipati

    Narendra,
    1. I do not see any possibility without using this exit. It is a very simple and effective thing for your ABAPer and you too.
    2. In case of many Materials-Notification type combinations, you can maintain similar code by joining several elseif s.
    3. Alternatively, you can maintain a Z Table as under:
    QMART
    MATNR
    S3
    10000000099999
    S3
    10000000099988
    S1
    10000000088988
    S2
    12000000088988
    Means, for every Notification type there will be one or more prohibited materials. The coding will not be difficult, but will have around 15/20 lines.Finally, if you have to get your issue resolved, I feel this is the way and also easy way through your ABAPer.
    Tell me in case of any further opinions.
    Best of Luck
    KJogeswaraRao

  • How to block production order creation when maintenance order is generated.

    Hi All,
    Kindly share how to block production order generation when maintenance order is generated.

    Integration between PP module and PM module
    PP/PM Workcenter Integration
    There are many threads & documents available. Please do some search.

  • How to block an invoice if the value of a post is zero?

    Hello,
    In the rules of copy we use the field " Pricing type " with the value " C = Copy manual pricing elements and redetermine the others ".
    The order is complete and the price of the post is not equal to zero.
    During the invoicing the system makes a new search for the prices in the tables of conditions.
    If the condition does not exist in the date of invoice the post takes the zero value.
    How to block an invoice if the value of a post is zero?
    There is no incompleteness procedure for the invoice.
    The value of the post is the result of several conditions and we cannot make them obligatory.
    Who already has to meet this problem with the recalcul of the price in the invoicing?
    Best regards
    Frédéric Blaise
    e-Kenz S.A.
    Luxembourg

    Hi,
    It is not the total invoice which is equal to zero but only one post.
    As I explained it at first the problem is the following one:
    In the rules of copy we use the field " Pricing type " with the value " C = Copy manual pricing elements and redetermine the others ".
    he order is complete and the price of the post is not equal to zero.
    +During the invoicing the system makes a new search for the prices in the tables of conditions.
    If the condition does not exist in the date of invoice the post takes the zero value.
    I look for a solution to block the creation of the invoice if a post only is equal to zero after the updating of the prices.
    Thanks
    Frédéric

  • How to block creating Billing document if no accounting doc generated

    Hi,
    In Brazil, after create Billing Document a new document called Nota Fiscal is also created.
    But I can't allow creating Billing Document and Nota Fiscal if i have a problem during the releasing process of the Accounting Document.
    How Could I to do for block the creation of those documents if i had a problem in releasing the accounting document ?
    Best Regards.
    Kleyson Rios.

    HI,
    with out creating a billing document we can not expect accounting document details.
    once u create a billing document then we come to know whether accounting doc is created or not. if not created then we hav top analyze why it is not created.
    do one thing u have to check all configuration settings before creating a billing document.
    Srini

  • Block cash sales with credit limit blocking from creation of outbound

    Hello everyone,
    Can you please teach me how to block cash sales with credit limit blocking from creation of outbound delivery?  Currently, outbound delivery can not be created only for charge sales with credit limit block.  Problem is, we can not confirm the cash sales.  We have to delete first the outbound then unblock the S.O. before creating a new Outbound.
    Thanks in advance.
    Ridgy

    Cash sale transaction will not have credit limit block, as the transaction is based on receipt of immediate payment. But if you still want to try the same, configure a 'Z' transaction Type for cash sale (Copy of Cash Sale - Sales Order Type) and maintain Credit check field as 'D' and try the scenario.
    Ideally there should not be a Credir Check foe a Cash Sale Scenario.
    Regards,
    Rajesh Banka

  • Block the creation of planned order

    Dear experts
    How can I control the creation of planned order? I want to block the creation of planned order if the BOM or routing is not exist.
    BRs

    Hi,
    I think this can be done using 'Material status' try the following and let me know if it works.
    Create a new material status in transaction OMS4 (like R1 - "Created but BOM and Routing not maintained" )and in the details screen select Option "B" for MRP messages.
    You designate a material as a "R1 -Created but BOM and Routing not maintained" In the master record.
        MRP                          "B" = warning
    Please try this and let me know the result.   
    Regards,
    Prakash

  • How to block articlee for purchases

    we are planning to block some of articles for purchases. However we want to allow for stock transfers using stock transfer requests( ME21N-UB doc type).
    when i kept 01 Blocked for procment/whse in X-site status of baisc data tab system is not allowing for stock transfer order creation also.
    plz suggest how to block articles for purchases without impacting for stock transfers.
    what is the usage of follwing selections for blocking
    01     Blocked for procment/whse
    02     Blocked for task list/BOM
    03     Blocked for Purchasing

    Hello,
    If you want to block articles from procuring into DCs and do not want to block DC to Store movements, you may block articles in site-specific Block status (MARC-MMSTA) in Article/DC view. So DC to Store STOs can be created.
    You may see the definitions of various blocking statuses in transaction OMS4. For example, 01 Blocked for procment/whse means blocked from Purchasing,Forecasting and RP (No Message, Warning or Error Message).
    Thanks,
    Venu

  • Blocking PO creation without a Purch. Req

    Hello Team,
    We need to make sure that PO can be created only if there is a Purchase Requisition already created. How do I stop the system from Blocking PO creation without reference to a requisition?
    I will appreciate your feedback.
    Joel.

    Hi,
    There are two alternative solutions you can think of -
    1)   Set up the related authorization key in OMET and assign this key to your buyer with parameter EFB; or
    20  Define the ''error'' release strategy if PO is created without reference to PR.  In this particular case, the user exit shall be activated to append the CEKKO communication structure to include MRP Controller as part of the release strategy structure.
    Cheers,
    HT

  • How to block the invoice ,if the GR qty is in QA stock

    HI all,
    how to block the invoice,if the GR stock is in QA tock?
    But i have maintianed quality control key wiht the parameter like ivoice block and maintained in the respective material master data, even though invoice is not blocking?
    plese tell me is there any seetings required.
    thanx in advance.
    Regards
    Srinivas

    Hi,
    It is not the total invoice which is equal to zero but only one post.
    As I explained it at first the problem is the following one:
    In the rules of copy we use the field " Pricing type " with the value " C = Copy manual pricing elements and redetermine the others ".
    he order is complete and the price of the post is not equal to zero.
    +During the invoicing the system makes a new search for the prices in the tables of conditions.
    If the condition does not exist in the date of invoice the post takes the zero value.
    I look for a solution to block the creation of the invoice if a post only is equal to zero after the updating of the prices.
    Thanks
    Frédéric

  • Account 799999 blocked for creation in chart of accounts INT

    Hi,
    in our company code while i try to creating GL account 799999 by copying from company 1000 iam getting the below error
    "Account 799999 blocked for creation in chart of accounts INT"
    please suggest how can i resolve this error?
    Regards,
    PS

    Hi,
    Check the following links
    GL account
    ERROR IN G/L ACCOUNT
    Cheers
    Chandra

Maybe you are looking for

  • Small Office fax problem through verizon phone line

    Instead of sitting on the phone for 3 hours I figured I would try this first. I have a small office with Verizon internet and phone. I have one phone line, a credited machine, a computer and a 4 in one print scan fax copy. I was just wondering if any

  • From report server database how to know reporting services server

    from report server database how to know reporting services server Thanks

  • SRM 7.0 Reports in the "SRM Reports" transaction on the portal - need BW?

    We have an SRM 7.0 sandbox and noticed there is a transaction called "SRM Reports".  When we try to run the reports listed we get the error "Page not found or not available". I am wondering if BW is required to run these reports?  If not has anyone e

  • Does URL rewriting in JBuilder4 work?

    I am writing a shopping cart application. To keep track of the products the user has chosen I am using a URL rewriting code that appends the product details to the URL and then requests the same page again. <a href="<%= response.encodeURL(shopproduct

  • PtbyPt editing with global variable?

    Hey guys, I'm wanting to setup a counter to count a crossing of a sinewave. The thing is, the sinewave is not zeroed. It's a sinewave of a cyclic load cell that I'm testing a material with. With this test, I will put load on the load cell, then cycle