Purchase Order Document Total query

Hi all
I need some help with a query to copy the P.O. Document Total field to a UDF U_DOC_Total in the header level of the P.O.
Thanks
Bongani D

Hi Steffen
Thanks for your help.
When I try and add the doc i get this error :-
03/12/2008  18:18:48: [Microsoft][SQL Native Client][SQL Server]Conversion failed when converting the nvarchar value 'ZAR 15,001.00' to data type int. (CINF)
Maybe I should have explained earlier that this field will be linked to a SP that will evaluate if the Doc Total is above R 15 000.
So please check my Sp below.
IF @transaction_type = 'A' AND @object_type = '22'
BEGIN
IF EXISTS (SELECT T0.CardCode FROM dbo.OPOR T0
WHERE T0.U_DOC_TOTAL > 15000 AND T0.DocEntry=@list_of_cols_val_tab_del AND (T0.U_TAXCLEAR IS NULL OR (T0.U_TAXCLEAR IS NOT NULL AND T0.U_EXPIRYDATE IS NULL)))
BEGIN
SET @error = 10
SET @error_message = 'Amount greater than R 15,000, need a valid Tax Certificate'
END
END
Thanks

Similar Messages

  • Purchase Order form in Query only mode for some users

    Hi All,
    I want to make the Purchase Orders form as query only for a single user. I tried by giving 'Query_only=Yes' in the parameters section. I am getting 'FRM-04151: You cannot query records here' message more than 10 time. I know we get this message and this is applicable to all the users. But this message is comming more than 10 times.
    Is there anyway that I can restrict the Query only mode to a single user and please suggest about the message also.
    Thanks in Advance,
    Naresh

    Naresh,
    Since you want to achieve this for one user only, I would suggest you create a new function/menu/responsibility and assign this responsibility to the user.
    Note: 400380.1 - How To Create a QUERY-ONLY FORM
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=400380.1
    For the FRM error, please review the following document.
    Note: 116074.1 - ACCESS LEVEL - REVIEW ONLY - PO
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=116074.1
    Regards,
    Hussein

  • Purchase order Document date in AP Downpayment invoice PLD

    Dear All,
    Is it possible to capture purchase order Document Date in AP Down payment invoice PLD.My client want like this.I have tried,but i am not able to capture this field in AP Down payment invoice PLD.please give me the solution for this,If it is possible.
    Thanks,
    Silpa.N

    hi silpa,
    Create a user defined field in row level of marketing documents.
    Apply formatted search using query
    Select $[OPOR.TaxDate]
    select auto refresh
    when changing field Document Date in header level.
    On copying purchase order to ap downpayment invoice Document date will copy to it.
    U can also bring it to PLD by creating database field with table DPO1,column U_XXX
    Hope it will solve problem.
    Jeyakanthan

  • Purchase order document row is not change (document stutas is OPEN)

    Hi all,
    I am created one purchase order that are not any base or targeted document ,not any approval   procedure and  purchase order document status is steel open . Then how  I a cannot change the document row.
    thanks
    arabinda pal

    Hi Deepa,
    I think if you want to restrict the further editing of a particular row, then you just need to follow the simple procedure.
    1. create the purchase order with your desired items & vendor & add this document
    2. Now reopen it & goto that row which you want to restrict. Right click on that row & select "Close Row".
    3. Select yes to confirmation message.
    4.Now update the document.
    Now you an check it out, in that document you will not be able to edit that row contents.
    I hope this solves your issue.
    Regards.
    ShriX.

  • Purchase Orders form in Query Only mode for a single user

    Hi All,
    I want to make the Purchase Orders form as query only for a single user. I tried by giving 'Query_only=Yes' in the parameters section. I am getting 'FRM-04151: You cannot query records here' message more than 10 time. I know we get this message and this is applicable to all the users. But this message is comming more than 10 times.
    Is there anyway that I can restrict the Query only mode to a single user and please suggest about the message also.
    Thanks in Advance,
    Naresh

    Please post this question here: OA Framework
    There are so many special conditions and restrictions for E-Biz Suite that this forum is not the right place to ask these questions. The Apps forum at this location is the right place.

  • Authorization based on plant and Purchase order document type

    Hi
    My client has a requirement wherein a user will have authorization for transactions only in his plant. But only for Purchase order document type UB (Stock Transport Order) the user should be allowed to create for all plants.
    In short, if Purchase order document type is UB, should be allowed for all plants
                 if Purchase order document type is NB, should be allowed to only one particular plant.
    My Basis person says that such a restriction is not possible.
    Kindly suggest me on how to provide a solution to this.
    Thank U.

    Hi,
    This is possible.In this case you need to create two seperate roles.
    1)Create purchase order for all plants (This can be used in long text)
    2)Create purchase order for <plant no> plants.
    For case 1:--
    i)Populate field BSART of M_BEST_BSA with UB.
    ii)Populate field WERKS of M_BEST_WRK with '*'. SAP reccomends to fill up organizational data through organizational level tab only.So while doing this step you need to put * from organizational level tab only.
    For case 2:--
    i)Populate field BSART of M_BEST_BSA with NB.
    ii)Populate field WERKS of M_BEST_WRK with 'plant no'.
    Dont worry about the objects i mentioned those are maintained through SU24 and will be automatically pulled once you insert ME21 transaction code.
    Let me know if it helps.
    Thanks,
    Aveek

  • WBS Element and Service No Link Table for Purchase Order document

    Hi Experts,
    We are Facing 1 Problem for finding link between
    WBS Element and Service No for corresponding Purchase Order document . Please Suggest me to find Related tables for Project system Module .
    Thanks and Regards
    BalaNarasimman.M

    Hi,
    The link will be in MM table, not PS table. Try EKKN.
    Regards

  • Standard Purchase Order document printing

    Hi All,
    I need to modify the standard purchase order document and need to print a custom note in that based on the organization criteria.
    i have downloaded the .xsl file and as i am not very familiar with that i cant understand the code.
    1)could you please let me know, where to open that xsl file either in jdeveloper or some thing like notepad, textpad etc..
    2)If possible please share the tags to print the custom message based on organization criteria
    3) where to find the xml tags related to that to modify the xsl
    Please help!!
    Thanks!!

    We need to investigate this XSL tags and need to do R&D. I finally did it.

  • Purchase Order Document Type and Account Assignment

    Hi  ,
    We have a requirement to control Account Assignment in Purchase Order Item line based on the Document type selected on the Purchase Order header.
    Like if user selects Purchase Order document type "ZNB" (Customized created) , then he will only able to select "K" or Blank or "P" as account assignment and similary we want to limit other Account assignments based on the Purchase Document type.
    How can we make this Control settings?
    Regards
    Shrey

    Hi,
    You can't really limit the account assignment categories per document type, at least not directly.
    You can limit the item categories that can be used for a document type via configuration:
    Materials Management > Purchasing > Purchase Order > Define Document Types
    Within this transaction you can define which item categories are valid for a specific document type.
    You can then define which account assignment categories are valid for each item category
    Materials Management > Purchasing > Account Assignment > Define Combination of Item Categories/Account Assignment Categories
    BUT
    limiting the account assignment categories that are valid for an item category will affect ALL purchase order document types that this item category is valid for. And you can't create your own item categories as this is a SAP standard table that can NOT be altered.
    Regards,
    Monika

  • How to split Frieght Amount in Purchase Order Document.

    Dear Expert,
    I want to print Frieght cost  one by one in purchase order document.
    For Example : list Frieght set up below
    1. Packing & forward.--500 (Frieght cod is 5)
    2. Transport -
    300 (Frieght code  1)
    Please help me how to Design in PLD (end report).
    Thanks
    Arunraj.

    Hi
    Use POR2 Table in your PLD. Use this in repetative area field and hide the fields visible. use formula to display in other non-repetative field.
    Regards,
    Sudhir B.

  • How to configure Item Category in Purchase Order document

    Hi
    Can someone tell me how to configure the Item Category in Purchase ORder document?  This field is displayed next to Account Assignment in PO screen.
    Thanks,
    Lin-Lin

    I think your issue is screen layout of the PO
    please go to
    SPRO-MM-Purchasing-Purchase order-Define Screen Layout at Document Level
    here you can select the ME21N and double click on it
    on field selection of basic data you can make item category is optional than it will be avialable
    if still you find the problesm than check your field selection of your document type and change that field selection as above mentioned.

  • Change Purchase Order : Document Date

    Hi Gurus,
    I would like to change Purchase Order: Document Date due to wrong input but I found out this field has been grayed out from change (ME22/ME22N) after save.
    Can anyone tell me how to solve this problem?
    Thanks & regards,
    Loi

    Dear Gurus,
    Is there is any effect of changing the PO's Document date? What is the usage of PO's Document date, in which area?
    If no effect, can I customize the PO: Document Date field through Application transaction variant function?
    Pls adivse.
    Thanks & regards,
    Loi

  • The row in Purchase order documents cannot be closed.

    I try to close a row in Purchase Order by using the Right Click -> Close Row option, or from the Data menu.
    When I click on the 'Update' button, the following Error massage  appear: Document rows cannot be closed concurrently with the other document modification you have made. The row cannot be closed.
    Using SAP Business One 2007 A (8.00.241)  SP: 01  PL: 14  HOTFIX1
    Please advice the solution to solve this problem.

    Hi.......
    Do you have any kind of SP Transaction notification for Autoupdation?
    Please mention here because such things happen due to the FMS or SPs applied to the DB.....
    Also please check this thread......
    Document rows Cannot be closed concurrently - Purchase Orders
    Documents rows cannot be closed concurrently with the other document modify
    Regards,
    Rahul
    Edited by: RAHUL MOUNDEKAR on Aug 8, 2011 9:44 AM

  • Purchase Order Document type FO?

    Hi,
    Why we need to use in Purchase Order Document type FO?
    With Document type NB also we can make Services ,Right?
    Thanks

    Hi
    FO - Frame work order Document type is a standard document type , which is used for Blanket Purchases, Purchase of services.
    The FO document type has a Validity Start & End date feature whcih is not in the NB document type(You can get the same in NB also after cusotmization)
    Services & limits are also presnet. The FO document type is limited to usage for Iterm categories
         Standard
    B     Limit
    D     Service
    All these can be made for NB also, but only after customizing.
    Thanks & Regards
    Kishore

  • Purchase Order Document Type Defaulting in ME58 while converitn PR to PO

    Dear All
    While converting Purcahse Requesition to Purchase Order in ME58, System defaults one Purchase order document type . Ofcourse we can overwrite that
    But would like to know how this defaulting can be controlled in SAP
    Regards
    Shyam

    Hi,
    If you have maintained an "Order Type" in table T160 (customizing
    transaction OMH5) for the entry "ME21", then this value will be
    defaulted in the pop-up in transaction ME58. Otherwise, the "Order Type"
    of the Requisition will be defaulted.
    The following code block of program (Note 125969) is for your reference:
    SELECT SINGLE * FROM T160 WHERE TCODE EQ SY-TCODE.
    IF SY-SUBRC EQ 0 AND NOT T160-BSART IS INITIAL.
       RM06E-BSART = T160-BSART.
    ELSE.
       SELECT SINGLE * FROM T160 WHERE TCODE EQ 'ME21'.
       IF SY-SUBRC EQ 0 AND NOT T160-BSART IS INITIAL.
         RM06E-BSART = T160-BSART.
       ELSE.
         RM06E-BSART = BAT-BSART.
       ENDIF.
    ENDIF
    According to the code above, the system first checks the table T160 for
    ME58, if there is no data then for ME21, if there is no data, then it
    defaults from PREQ.This is the same as described in the note 114213.
    BR
    Nadia Orlandi

Maybe you are looking for

  • Need help to drag a rectangle to define a zoom level

    Can some help me figure this out. I am trying to draw some graphics on a JPanel, then drag a rectangle to define a new zoom extent. I am having problems understanding how to do this with the AffineTransform. If you run the following code, you will se

  • How to chk a Material for which no open docs

    Hi experts, Need to identify a material for which there are no open documents, i.e., material is created but no PRs and POs are generated. This identification should be in material master not from tables. Please help Thanks  in Advance....

  • Is my 1TB external IOMEGA drive failing?

    Note: The reason why this is Snow Leopard is because my iMac HD is getting replaced. My new iMac will use snow leopard. OK, so I went to disk utility, selected my IOMEGA external hard drive, and verified it. At the end, Disk Utility reported "Volume

  • Which edition of SCORM 2004 does CP5 report in?

    I'm watching a series of videos from ADLInitiatives and they mention that SCORM 2004 has various editions/vertions from 1-4.  I was wondering which version CP 5 is conforming to? Susan

  • [svn:osmf:] 10425: Add initial unit tests for VASTParser.

    Revision: 10425 Author:   [email protected] Date:     2009-09-18 17:35:58 -0700 (Fri, 18 Sep 2009) Log Message: Add initial unit tests for VASTParser.  Minor changes to parsing code. Modified Paths:     osmf/trunk/libs/VAST/org/openvideoplayer/vast/m