ME21N validation at transaction Level

Hi All,
I want validate at SAP Transaction level (ME21N). When I am going to create PO i need to validate the EKGRP maintained at PO level and maintained at Info record level. if both are different i need to throw an error??
So can you please tell me the procedure to go ahead? if i need to write the code in the exit, please let me know the procedure where to write.
Thnks,
Raghu.

Hello Raghu
Having BAdI ME_PROCESS_PO_CUST available on your system you can use its method CHECK to do final validations which allow you to cancel saving of the PO (in case of failed validations set CH_FAILED = 'X' ).
IMPORTING parameter IM_HEADER (IF_PURCHASE_ORDER_MM) has a method GET_DATA which returns the header data (structure MEPOHEADER). Here you can find EKGRP at header level.
If I am correct then info records are found at item level. Thus, call IM_HEADER->GET_ITEMS to retrieve them.
Items are TYPE REF TO IF_PURCHASE_ORDER_ITEM_MM -> implementing class CL_PURCHASE_ORDER_ITEM_MM).
Loop over the item instances and call method lo_item->GET_DATA in order to retrieve the item data (structure MEPOITEM) which contain field INFNR ( Number of Purchasing Info Record ).
Well, from here on it should be possible to find the way on your own.
Regards
  Uwe

Similar Messages

  • Error: Creating a Connection Pool: issue with valid transaction levels

    Server: SunOS 5.8 Generic_117350-27 sun4u sparc SUNW,UltraAX-MP
    App Server: Sun Java System Application Server 8.2
    Jar: ojdbc14.jar
    Datasource Classname: oracle.jdbc.pool.OracleConnectionPoolDataSource
    Resource Type: javax.sql.ConnectionPoolDataSource
    [Issue]
    Using /SUNWappserver/lib/ojdbc14.jar, when I create my connection pool in Sun Java System Application Server 8.2, I return the following error each time I try to start the domain:
    [#|2006-07-28T14:53:56.169-0500|WARNING|sun-appserver-pe8.2|javax.enterprise.resource.resourceadapter|_ThreadID=11;|RAR5117 : Failed to obtain/create connection. Reason : The isolation level could not be set: READ_COMMITTED and SERIALIZABLE are the only valid transaction levels|#]
    When I change the value to "SERIALIZABLE" in my domain.xml file, I receive the following error in my server.log:
    Caused by: org.xml.sax.SAXParseException: Attribute "transaction-isolation-level" with value "SERIALIZABLE" must have a value from the list "read-uncommitted read-committed repeatable-read serializable ".
    So, I'm stuck!
    I can't use the values READ_COMMITTED or SERIALIZABLE since the valid values are "read-uncommitted read-committed repeatable-read serializable ".
    Case sensitivity matters.
    Any thoughts or help would be greatly appreciated.
    Thanks,
    --Todd                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    The Oracle JDBC accepts TRANSACTION_READ_COMMITTED and TRANSACTION_SERIALIZABLE isolation levels.
    Example:
    connAttr.setProperty(“TRANSACTION_ISOLATION”, “TRANSACTION_SERIALIZABLE”);
    I'd check with the Apps server folks.
    Kuassi - blog http://db360.blogspot.com/
    ------ book http://www.amazon.com/gp/product/1555583296/

  • BC4J - Transaction level Validations

    I need to introduce in my software some Transaction Level Validations (like an order mus have at least 1 detail, or a company must have 1 and only 1 president).
    Where can I put this kind of "validations" in the BC4J Framework ?
    TIA
    Tullio

    As far As I know, you can put this kind of validation:
    1) directly in the database, using constraints and/or triggers.
    2) In the Associations objects between the entity objects, by specifying the cardinality of the relationships, in the last tab of the association wizard. I have never tested it though, therefore I'm not sure it works this way.
    3) In the Entity object wizard validation tab, you can specify a custom validation method for the whole entity.
    What you have to do is implement a method in the YourEntityImpl class, perform as many checks as you wish in this method (you can use all the association accessors etc...) and then select it as the validation method for the entity in the entity object wizard.
    Hope this helps.
    Remi

  • Validation at transection level

    Hello Gurus,
    I am new in adf and using jdev 11.1.2.3.
    We have the option to validate business rules at attribute level and row level, but my requirement is i want to validate at transaction level. Mean if user has added four rows i want to validated theses four row simultaneously before commit changes to database. For example i have a vo in which user is entering data. i want when he entered all the data i want to loop through all records which he entered and then if validation is paased then will save changes to db.
    Please advice how can i do this in adf.
    Thanks,

    ADF does not have direct built-in method(s) for this purpose. Declarative Enitty validators have an option to "Defer execution to Transaction level" (have a look at the "Validation Execution" tab of the "Edit Validation Rule" dialog). However, Entity validators are not suitable for validating multiple Entity instances together.
    The recommended way to implement validation among multiple Entity instances is to override the EntityImpl.beforeCommit() method. Have a look at subtopic 8.5.2 here:
    Implementing Validation and Business Rules Programmatically
    If you follow this alternative, do not forget to set a required system property in order to avoid unexpected side effects:
    Decompiling ADF Binaries: Throwing ValidationException from the beforeCommit() logic !
    The alternative of overriding the ViewObjectImpl.beforeCommit() method is not recommended. Have a look here for explanation:
    Andrejus Baranovskis's Blog: Coding Validation in ADF BC View Object Before Commit Method
    Dimitar

  • Business rules and validation at view level?

    Hello,
    I was hoping to be able to do attribute validation at view level but I could not find this option and I would need to help to determine how to achieve this.
    I have a view based on several entities. That view include a updatable entity and others read only entities.
    Basically I have a season entity/ table and a dateRange Entity/table. The model is that dateRange is a child of Season ( a season can have several dataranges...).
    I need a validation rule to fire when users change the dateRange in the UI, I have to make sure that the date range attributes from and to are in the range of the season definition (season table has two attributes: starting date and ending date). So I would like to verify that
    daterange.from > season.startingdate and daterange.to < Season.endingdate and daterange.from < daterange.to
    Can I do that in some way? I don't how to resolve this at the entity level. the entity does not know about other entities, here I need a validation of the transaction by checking serveral entities.
    Thank you very much for your help

    You can do this programatically.
    Check out [url http://download.oracle.com/docs/cd/E21764_01/web.1111/b31974/bcrules.htm#sm0241]this part of the docs (and the surrounding chapter as well)
    John

  • How to create messages for Validation in transaction type OB28

    Hello All!
    I am creating a validation in transaction type ob28. I have created the first point "prerequisite", second point "Check" and in the third point "Message" I want to put the message number 016 but the next error appears "Entry E ZFI 160 does not exist in T100". How can I create this messages number?
    Thank you in advance!

    Hi Leyre,
    This message applies to a problem with change requests. When creating a message, it's a workbench request that system has to create. Apparently, when you try to create a message, it tries to catch 'tramp' on existing CR which is assigned to a different client in your system. You should try assigning a new CR for this change; you could ask your BASIS team to help you on this.
    Regards,
    Eli

  • Field Status at Transaction Level

    I want to change the field status for Business Place/ Section Code from Supress to Optional in transaction F-02.
    How can I change Field status at Transaction Level ?

    Hi ,
    FIelds Status can be changed by 2 ways
    1, Posting Keys - any change in the Field status will Effect all the clients
    2.Field Status Group Variant,which we assign in GL Master- Changes to FSG, Will Effect only Perticular Lilne Items of tht GL Account.
    As Per your requirment, I do not think you can change the Field Status as Per Transcation i.e for F-02 or FB50 instead you can change the Field Status of perticular GL Account which you are posting the Transcation. which will b specific to the GL Account.
    if you want the Changes across clients , you can change the Field Status By posting Keys.
    Hope the Above Helps you .
    Thanks
    Goutam

  • GL Translation at Transaction Level?

    We are mutli-national company with 22 Sets of Books and 21 different functional currencies running on 11i (11.5.10.2) We consolidate all into single SOB at end of each month into USD. Issue is we are getting a lot of questions from our upper level management wanting to see transactional and/or balance detail in USD "live" throughout the month so they do not have to wait until the end of the month to get the picture in USD.
    Currently only way we know of to do this is to schedule the standard Translation program ( GLTTRN ) to run at appropriate intervals. Not crazy about that idea because to fully please the users we'd literally have it scheduled to run every few minutes for every balancing segment in each set of books. That's a lot of load to pile up on the Concurrent Managers to constantly have the Translation program running and translating each SOB's balances to USD.
    Our users had prior system that literally translated at the transaction level. Technically Oracle translates to the the functional currency every time a transaction is posted and even marks a translated balance as out-of-date so it can be re-translated but we cannot find any indication of a "better" way to handle this to meet our users requests.
    Question is.....how are other companies handling this? Just running Translation repeatedly? Some other standard functionality we're missing? Other workarounds?
    Thanks,
    Jason

    Dear Jason,
    Gather key reporting requirements of user and convert the transactions on the basis of Translational rate at reporting level. i.e. Say a user runs GL Trial Balance, the converted transactions shall be picked from the Translated Lines and the remaining lines shall be picked from particular SOB gl_je_lines, multiplied with Translational currency rate and displayed in Report.
    Here we are mimicking the effect of translation in reports.
    I agree that these reports will have some performance issue, but not that much of Translation program.
    The advantages are, Users are given the choice, they can run report whenever they want
    Second advantage is, say he does not run the report today, there is no burden on system for Translation program schedule.
    I believe if you discuss with your Technical and Functional team, this option can work.
    Regards,
    Sridhar
    Edited by: K Sridhar on Apr 30, 2009 6:05 PM

  • Validation on Entity level

    Hi All,
    In Jdev11g, I have set the validation on attribute level to check whether a field (e.g. password) contains only alphanumeric.
    I have used Rule Type as Regular Expression with the regular expression value [A-Za-z0-9]+.
    I am worried, why this validation is not getting fired up?
    Please help me to get around this.
    Regards,
    Loganathan

    When do you expect it to fire?
    Entity level validation only occurs if you call it directly or doDML call has been issued.
    I guess the validation rules are inherited by the VO and by components build from the VO.
    Timo

  • Validation on Application Level?

    Hi,
    is there the possibility to define a validation on application level? Couldn't find anything.
    I thought about a validation on page 0, but page 0 doesn't allow to create validations...
    Purpose: I want to validate the Apex_Application.g_fxx arrays. The validation will be the same for all pages.
    Thanks for your help
    Patrick
    Check out my APEX-blog: http://inside-apex.blogspot.com

    Hi Vikas,
    thanks for the help. Just tried it out, didn't work :-(
    It does the redirect, but doesn't show the error message. I assume the g_validation_ids_in_error and g_item_ids_in_error has also to be set. But the redirect isn't good in my case anyway, because the tabular form entries are lost.
    But I just found out that APEX_Application.show_error does exactly what I was looking for!
    Thanks for your help
    Patrick
    Check out my APEX-blog: http://inside-apex.blogspot.com

  • Digital Signatures in sap workflow at transaction level.

    Hi Experts,
    How to show the digital signature at task level approval in workflow, I have requirement as below.
    For example purchase requisition approval workflow. We have 3 level of approval process for PR, if first level approves it the work item need to go to second level approval with first level user signature (Digital Signature) same like third level also.
    Can we display the digital signature at transaction level.

    Hi,
    In Task Description Tab, you can insert a graphic as a Digital Signature coding the condition you need.
    Regards,

  • JDBC sender Adapter consistency and Transaction level - URGENT

    Hi,
    We are using the JDBC adapter to read data from an Oracle view. The view joins two tables on their keys where flag = 0. The JDBC adapter carries out the select and then updates the selected rows with flag = 1. The transaction level used is the default, which according to XI help is TRANSACTION_SERIALIZABLE.
    Our question is what happens if the oracle application that feeds the underlying tables inserts a new record in the time interval between the select statement and the update statement with flag = 0.
    WILL THE UPDATE STATEMENT UPDATE EVERYTHING, EVEN THE NEWLY INSERTED RECORD??
    As we are in a live environment and we have reason to believe that some records updated to FLAG = 1 are NOT sent to XI we would appreciate the expert's help on this issue!

    Dimitris,
    I was looking at the FAQ :JDBC Driver Snote and found this information which seems to answer ur question.
    Q: If I have the following configured in a JDBC Sender:
    Select Query:
    SELECT column FROM TABLENAME WHERE FLAG = "TRUE"
    Update Query:
    UPDATE TABLENAME SET FLAG = "FALSE" WHERE FLAG = "TRUE"
    How do I know that the JDBC adapter will not update newly added rows (rows that were added between the time that the SELECT and UPDATE queries were executed) that were not read in the initial SELECT query?
    A: The SELECT and the UPDATE are run in the same DB transaction, i.e. both statements have the same view on the database.
    Make sure that both statements use the same WHERE clause. An additional requirement for the correct operation of this scenario is the configuration of an appropriate transaction isolation level on the database (i.e., repeatable_read or serializable). You might also consider using a "SELECT FOR UPDATE" statement instead of a plain SELECT statement to ensure proper locking on the database.

  • GL cost allocation batches transaction level information

    Hi
    In Gl_LINES_ALL, all reference columns information is NULL.
    After posting the cost batches into GL, what is procedure to find transaction level information for these cost batches.
    Eg: For Inventory and receivables batches transaction information stored into GL_JE_LIENS Reference columns, in the same way cost batches transaction how can we find.
    Regards
    Kishore S.

    Hi Dianne,
    Check whether the real time integration between co and fi has been done in transaction OK17.
    Thanks
    Aravind

  • Entity level validation and view level validation in programmatic approach

    I want to know entity level validation and view level validation in programmatic approach how to i start and how to fetch the data pls tell me
    am new to df

    Hi,
    did you read the documentation ? http://download.oracle.com/docs/cd/E17904_01/web.1111/b31974/toc.htm
    Frank

  • Date and Salary validation at EO level.

    Hi All,
    I have two fields Salary and Date both are present at EO level
    I need to write a validation that if the date of birth entered on UI is more than 50 years as of today then salary should not be less than 5000
    Ex: if date entered is 02-02-1961 and salary entered is 4500 then it should throw an error message on click of the button.
    There are many custom validations at eo level but exactly where should this be done.
    Thanks,
    Arun

    Thanks All ... Actually i have binded the UI fields and in the bean i have written the following code and calling it on click of a button and its working... Anyhow i will try the other options also such as using groovy and writing the code in eoimpl provided in this thread .... The code which i have written is as follows but is it the right approach please let me know
    public void comm() {
    oracle.jbo.domain.Number s = (oracle.jbo.domain.Number)sal.getValue();
    oracle.jbo.domain.Date ds = (oracle.jbo.domain.Date)dob.getValue();
    java.util.Date sa = convertDomainDateToUtilDate(ds);
    System.out.println("The dob is "+sa);
    Calendar cl = Calendar.getInstance();
    cl.setTime(new java.util.Date());
    cl.add(Calendar.YEAR, -50);
    java.util.Date toDate = cl.getTime();
    System.out.println("The 50 years before date is "+toDate);
    if ( sa.before(toDate) && s.intValue() < 5000) {
    FacesMessage msg =
    new FacesMessage(FacesMessage.FACES_MESSAGES,
    "sal should be more than 5000");
    FacesContext context = FacesContext.getCurrentInstance();
    context.addMessage(null, msg);
    } else {
    invokeEL("#{bindings.Commit.execute}");
    public static java.util.Date convertDomainDateToUtilDate(oracle.jbo.domain.Date domainDate) {
    java.util.Date date = null;
    if (domainDate != null) {
    java.sql.Date sqldate = domainDate.dateValue();
    date = new Date(sqldate.getTime());
    return date;
    Thanks,
    Arun

Maybe you are looking for