Want a TN to block to ADD Purchase order Canditions Are as follows:-

Respective Experts,
         I want a TN to block ADD Purchase Order Conditions are as follows:-
         When I add Purchase order it goes for approval and the document is saves as Draft
Now    1) If there is 6 Purchase orders for a Vendor are pending for approval no one more Purchase Order is Added in the system.
              It will block to user to add Purchase order.
           2) It should block to user to Add that Purchase order And That PO is not go for Approval means block to ADD Purchase order before Documnet go to approval....
           Please help me to make TN for above conditions ??
Regards,
Sandesh

Hi Sandesh..
Try This
Create this view as PO
SELECT count(t1.docentry) as Count,cardcode
                 FROM   odrf t1
       INNER JOIN drf1 t2 ON  t1.docentry = t2.docentry and t2.ObjType='22' where t1.docstatus='O'
        group by  cardcode
Use this tnsp for the block
  IF @object_type = '112'
         AND @transaction_type IN ('A', 'u')
      BEGIN
          IF EXISTS(
SELECT t1.docentry
                 FROM   odrf t1
       INNER JOIN drf1 t2
                             ON  t1.docentry = t2.docentry and t2.ObjType='22'
                             inner join PO t3 on t3.cardcode=t1.CardCode
                 WHERE  @list_of_cols_val_tab_del = t1.docentry and t3.count>'6'
          BEGIN
              SET @error = -1
              SET @error_message ='You Cannot Perfrom this Action pending purchase order'
          END
      END
Hope Helpful
Regards
Kennedy

Similar Messages

  • Blocking material for Purchase order only

    hi all,
    i have a material and i want to block it for purchase order only bcos we dont want to allow to purchase it but it can perform all other operations. can anyone please help me?
    regards saurabh.

    Dear,
    Go to MM02, in Basic1 tab
    X-plant material status -   01     Blocked for procment/whse
    but it is relevant not only for that plant but also for client level becoz while go to MM02, please not select any plant and go to Basic Data 1 tab.
    this may help u
    Reagrds,
    pardeep Malik
    Edited by: Pardeep  Malik on Mar 14, 2009 5:59 AM
    Edited by: Pardeep  Malik on Mar 14, 2009 6:06 AM

  • How to add Purchase Order entry using B1WS?

    Hi,
    I have implemented B1WS in DI server, I am trying to add purchase order entry, but after adding it via B1WS, I am not able to find entry in SAP;
    My code using B1WS:
    public void SAPPurchaseOrder(string _SID)
                _PIService = new PurchaseInvoicesService();
                Document doc = new Document();
                doc.Address ="ab";
                doc.AgentCode = "ab";
                doc.BaseAmountSCSpecified = false;
                doc.CardCode = "VEND7";
                doc.CardName = "Baker & Taylor";
                doc.DocDate = DateTime.Now.Date;
                doc.CreationDate = DateTime.Now.Date;
                doc.DocType = DocumentDocType.dDocument_Items;
                doc.DocumentStatus = DocumentDocumentStatus.bost_Open;
                doc.BaseAmount = 100000;
                doc.DocCurrency = "USD";
                MsgHeader msgHeader = new MsgHeader();
                msgHeader.SessionID = _SID;
                msgHeader.ServiceName = MsgHeaderServiceName.PurchaseInvoicesService;
                msgHeader.ServiceNameSpecified = true;
                _PIService.MsgHeaderValue = msgHeader;
                _PIService.Add(doc);
    Also, I found error while I have use "ADD FUNCTION" as;
    can not empty list of tables, doc1, doc3 and doc10
    Please suggest me a proper entry flow or code to implement.
    Thank you.
    Piyush
    (Rob IT team - Parabox Media Group)

    Hello,
    Just like DI API, you need add doc lines to purcahse order, here is a sample to add a purchase order.
    Public Function Add() As DocumentParams
                Dim myPOParams As DocumentParams = Nothing
                Try               
                    ' Create Input parameters
                    Dim poDoc As Document = New Document
                    poDoc.DocDueDate = Date.Now
                    poDoc.CardCode = "V10000"
                    Dim docLine1 As DocumentDocumentLine = New DocumentDocumentLine
                    docLine1.ItemCode = "A00001"
                    docLine1.Quantity = 1
                    docLine1.TaxCode = "NY"
                    poDoc.DocumentLines = Array.CreateInstance(docLine1.GetType(), 2)
                    poDoc.DocumentLines.SetValue(docLine1, 0)
                    Dim docLine2 As DocumentDocumentLine = New DocumentDocumentLine
                    docLine2.ItemCode = "A00002"
                    docLine2.Quantity = 1
                    docLine2.TaxCode = "NY"
                    poDoc.DocumentLines.SetValue(docLine2, 1)
                    ' Create Service
                    myPOService = New PurchaseOrdersService
                    ' Create Header
                    Dim msgHeader As MsgHeader = New MsgHeader()
                    msgHeader.SessionID = GlbData.sessionID
                    msgHeader.ServiceName = MsgHeaderServiceName.PurchaseOrdersService
                    msgHeader.ServiceNameSpecified = True
                    myPOService.MsgHeaderValue = msgHeader
                    ' Call command with output return
                    myPOParams = myPOService.Add(poDoc)
                    MsgBox("Purhcase Order added: " + myPOParams.DocEntry.ToString(), MsgBoxStyle.DefaultButton2)
                Catch ex As System.Exception
                    MsgBox(ex.Message, MsgBoxStyle.DefaultButton2)
                End Try
                Return myPOParams
            End Function
    Kind Regards
    -Yatsea

  • F-40 Add Purchase Order Field

    Dear All,
    I awant to add purchase order field in T-Code F-40. Following is Scenario.
    Transaction to be processed : Outgoing Payment
    PstKy : 29 (Special G/L Debit)
    Account : (vendor Account)
    SGL IND : J
    uner more data also it is not showing. I have also used T-Code OB41 but still it is not showing PO field in first screen.
    Dinesh

    Hi,
    Following are the steps i have gone through.
    1. T-Code OBXT to search G/L Account, then i gone through the combination AcctypeSGL Ind (KJ). Then Chart of Accounts. Then i Listed all G/L which are in used.
    2. T-Code FS00, Field Status Group.
    3. T-code : OBC4, Then Field Status Group(which is in use of G/L Account) and marked purchase order field as required field under (material management/purchase order)
    Still it is not showing purchase order field in first screen of F-40.
    Dinesh

  • Message "Purchase Order Changes are awaiting approval"

    Hi all,
    while changing a PO document which is in status "in Approval", SRM (5.0) throws a popup message:
    "The Purchase Order Changes are awaiting approval, Continue processing?"
    Does anybody know the place were SRM throws this message?
    I want to suppress the message completely.
    I can`t find the message within table t100.
    Any ideas?
    Thanks
    Regards
    Andreas

    Hi Yang,
    thanks, this answer I was looking for
    Best regards
    Andreas

  • Block invoice from Purchase Order

    Hi,
    I would like that, for a specific kind of purchase orders, when an invoice are posted to it, they where automatically created with blocked for payment "R".
    This is something I sould decide to do in the purchase order, as for the same vendor and material sometimes I know I will pay the invoice and sometimes I will clear invoices - as in trading operations (only differences between invoices will be paid).
    could you all help me on this?
    Thanks so much!!!

    Hi
    It could be better if you create separate account group for vendors for whom you wanted to block the payment at time of invoice verification (in VMR - in payment transactions - payment block). When ever you create purchase order (as you said specific - document type) then invoice will be blocked.
    Thanks

  • How to block changes in purchase order after purchase release

    Dear all
    Can u please tell us how to block any changes in purchase order after purchase order is released...
    (We don't want any line items addition or quantity addition or any changes once purchase order is released..)We wanted this for a particular purchase order type only
    Regards
    Sudha

    Dear Sudha
    Yes it is possible to confiquire your system insuch a way where once if the PO  gets final relase then it cannot be changed.Only possiblity that will be available for the user to make chanegs in PO is possible when the final release is to be reset and then make the changes.
    Release Indicator: specicfies whether the PO documents is blocked or can be processed for the follow functions.
    You can define the release indicators you need for your release procedure:
    •The Released indicator is used to specify whether messages (PO documents in output format) may be transmitted for a purchase order with this indicator.
    •The Changeability indicator shows the effect of changes to the PO (a change to a PO may require a new release strategy to be determined, for instance).
    •By means of the Value change indicator, you can specify that the release strategy is to be re-started if a PO is changed and the value of a PO item thereby increases by a certain percentage (e.g. 10%). Set the Changeability indicator to "4 - Changeable, new release in case of new strategy or value change" or "6 - Changeable, new release in case of new strategy or value change/outputted" and enter a percentage in the Value change field.
    And after that you can specify release statuese where you can specify which release indicator/status a PO is to have after having been released via a certain release code.
    and after release simulation .
    Test for the PO change after final release System will not allow you tomake changes by giving the message that the release  indicator doesnot allow you make the changes in PO.
    Regards
    Sunny

  • Unable to view blocked vendors in Purchase order

    Hi.
    I have created vendor with partner functions for ordering address. This vendors that i have used as partner functions are blocked for all purchase organisations.
    When i create a purchase order i am not able to see the ordering address vendors (as they are blocked).
    I need to display these vendors in po.
    Regards
    Raghavendra

    Hi,
    I think you know that vendors with ordering address can be viewed during creation of purchase order for selecting whichever ordering address you want.
    In my case my ordering address vendors are blocked.... still i need to see those vendors.
    Let me know what is the setting that i need to do.
    Regards
    Raghavendra

  • Blocking creation of purchase order

    >The following is the requirement of our client :-
    >While making a purchase order, the user should be able to create a purchase order only for value below Rs. 3,00,000/- which will be inclusive of all taxes, excise duty and other purchase related costs entered in the purchase order. If the po is above Rs. 3,00,000 the user should be allowed to make a purchase order in tcode ME21N. All the POs above Rs. 3,00,000/- should be processed through the Order Approval Process developed separately.
    >What settings and configuration needs to be made in mm for the same. The customer also want a message to be flashed on screen that the Order is above rs. 3 lacs and oaf process has to be followed.
    >Thanks in advance.
    >AJ

    Hi Ashutosh,
    The PO above any certain value can brought under Release Procedure of PO.
    The aim of the SAP purchase order release procedure is to replace the manual written authorization procedures.  The person responsible for the processes of the requisition or other purchasing document in the system have to approve by marking an "electronic signature" which can give the document legal force for further processing.
    This link will help you:
    http://www.sap123.com/showthread.php?t=59
    Workflow scenario can be worked out for Release Procedure for PO instead of Flash. It intimates the user about the PO in his mail box.
    Regards,
    Nani.

  • Block release of Purchase Order

    Hi,
    Has anyone had experience with creating a release strategy to block a Purchase Order based on the X-plant matl status located on basic data tab of material master?
    Thanks
    Mike

    Hi,
    Why go to the trouble?
    Maintain message "Blocked Purch and Prod of material does not allow external procurement" (Message no. ME 053) as an error. Then no purchasing/MRP etc can be done in the first place if block is maintained for material.
    Thanks.

  • I want to print multiple Material no against Purchase Order

    hi i want to display MATNR against Purchase Order
    suppose 10 Material no is there than i want to display 10 material no against that Purchase order.
    thanks.
    laxman sankhla.

    hi
       give PURCHASE ORDER as select options on selection screen .
    select matnr from table EKPO based on PO no.
    save them in internal table .
    loop At internal table .
    endloop.
    display it any where on report SAP script or SF.
    reward if helpful.

  • Add purchase order in SAP with sdk

    Hi Experts:
    I am doing  an aplication for to export a purchase order to SAP with the SDK and I need to read the  document number of the last purchase order that was added.
    Wich method can I use?
    Thanks.

    Hi Silvia,
    You can use the GetNewObjectKey method right after you have created a new document. You can then get the DocNum using the GetByKey method.
    Here an example in VB.NET (if you use C#, it is easy to translate):
    'We declare a new document of type delivery
    'and set all the necessary properties and values
    'We then add the new delivery note
    If oDeliveryNote.Add = 0 Then
         Dim tmpDel As Documents = vCmp.GetBusinessObject(BoObjectTypes.oDeliveryNotes)
         'Then using the GetByKey method together with the GetNewObjectKey method,
         'we can get all kinds of interesting info about the newly created delivery note
         If tmpDel.GetByKey(vCmp.GetNewObjectKey) Then
              'Let's populate some variables that we declared earlier
              DelNr = tmpDel.DocNum
              NumAtcard = tmpDel.NumAtCard
              CardCode = tmpDel.CardCode
              DocType = tmpDel.UserFields.Fields.Item("U_type").Value
        End If
    End If
    The same code applies to all document types.
    Good luck,
    Johan
    Edited by: Johan Hakkesteegt on Feb 13, 2012 12:19 PM

  • Cannot add Purchase Orders?

    We have found an issue which is not happening consistently.  When trying to add a Purchase Order against certain Vendors, the PO does not get added however we do not get an error either.  We have identified the problem be the default setting for Payment Method. 
    Our vendors are all set with the default setting of check.  However when we go into the PO document and change the Payment Method to Blank then the PO gets added.
    Again this is not happening consistenly.  Has anyone ever come across this issue.  Please advise.

    Hi Rene,
    If this is somthing that you can reproduce I suggest to take a backup of the db and restore it in a test environment.
    In the test db do the following and in this order:
    - Uninstall and remove everything related to addons.
    - Remove/disactivate any transaction notifications.
    - Check if the issue is the same for all users.
    - Remove all formatted searches and udfs in the form.
    - Upgrade the db to the latest patch available.
    After this you might have a clearer picture of where the issue is coming from.
    Hope it helps,
    Jesper

  • GTS block for return purchase order

    Hi,
    Our ERP system is integrated with GTS system. After creating a return purchase order in ME21N the order is blocked on 'Sanctioned Party List Screening' and 'Legal Control'. However, it is still allowing to create return delivery with movement type 161 in VL10B even if the GTS block is not released.
    We need to build control to stop allowing to create return delivery if the order is blocked in GTS. Is there any standard way of controlling this or we have to custom develop it? Kindly guide me on how to achieve this.
    Thank you,
    Ranjith

    Hi,
    VL10B- is the PO due for delivery.
    Find the standard process for VL10B
    Stock transport order is also a  Purchse order type only When you do STO via SD Route (via delivery.picking, pgi etc) then Shipping tab must appear in your PO Then only it is possible to do via SD Route For shipping tab to appear in PO there are some necessary configurations to be done in SPRO This is done under img- -purchasing- -set up STO 1.Define shipping data for plants 2.Create checking rule 3. Define  checking rule 4.Assign delivery type and checking rule 5.Assign doc type,one step procedure and under delivery tolerance These five are important activities Enclosing here with a model settings study this and understand and then configuration will be more easy Sales area 0003, 04, 21 plant is 1002 Sales area 0004, 05, 21 plant is ABCD If you transport material from 1002 to ABCD plant then 1002 is supplying plant and ABCD is receiving plant Now this ABCD plant should be made as a customer in XD01 mainly with shipping conditions in that data in sales area 0003, 04, 21 and this internal no has to be noted In STO the receiving plant is being made as a customer in the supplying plants sales area and the internal customer no has to be assigned In- -mm- -purchase order- --define shipping data for plants Now in that img activity that i mentioned above against plant 1002 you have to give sales area as 0003, 04, 21.
    Ashish

  • Error when add Purchase Order

    Hi all,
    I have a problem when Add new Purchase Order, plz help me!
    I add new Purchase Order, system alter error as below:
    ''Document cannot contain both regular and fixed asset items"
    I checked Item Master Data and I'm sure items in this PO is not Fixed Asset
    Thanks and Best Regard!

    Hi Sudhir,
    I'm using SAP Version 9.0 PL 09 and I don't see checkbox Fixed Asset in Item Master Data.
    I selected in SQL Itemtype = 'I' and AssetItem ='N'.
    Please see below pictures and help me again.
    Many thanks!
    Regards,
    Hong Bich

Maybe you are looking for