How to carry out entry validation in SM30 with events

Hi people,
I'm creating a Z table with Maintenance view in SM30...i've modified the view so all fields are required as Rich H explained in some other post. But now i need to validate user input for a particular field against a standard table, and force to reenter if data is not valid. I've been looking up the available events...event 05 triggers when the line is new, but not when modifying. I've tried a couple of other events but don't serve my purpose. What i want is to validate data upon user's entered all the required fields (whether the line was preeexistant or  not). If data is valid then go on, if not trigger a message and force correction prior continuing (disallowing saving).
Anyone knows how to do this?
Many thanks

I get what you suggest, but unfortunately i've already done that, it's not enough.
Here's the situation: The table has this fields:
KSCHL (PK-FK T685)
LIFNR (PK-FK LFA1)
EBELN (FK EKKO)
EBELP (FK EKPO)
Besides the implicit foreign key validations (i.e. the PO item exists in EKPO), i need to validate that it's not deleted (LOEKZ = 'L') and that the PO vendor is the one entered (i must not enter any PO which vendor isn't the one in that line). Hope I make myself clear.
This code works but in event 05 (new lines). I need to find out an event for the modified lines as well:
FORM f_validate_po.
  CHECK NOT ( ztmmiv001rps-lifnr IS INITIAL OR
              ztmmiv001rps-ebeln IS INITIAL OR
              ztmmiv001rps-ebelp IS INITIAL ).
  SELECT COUNT(*)
  FROM ekko
  WHERE ebeln = ztmmiv001rps-ebeln AND
        lifnr = ztmmiv001rps-lifnr AND
        exists ( SELECT *
                 FROM ekpo
                 WHERE ebeln = ztmmiv001rps-ebeln AND
                       ebelp = ztmmiv001rps-ebelp AND
                       loekz <> 'L' ).
  IF sy-dbcnt = 0.
    MESSAGE e000.
  ENDIF.
ENDFORM.

Similar Messages

  • How to Carry out New Pricing in Sales Order userexit

    Hello,
    In userexit save_document_prepare of program MV45AFZZ, I'm adding an entry in XKOMV for a header pricing condition ZD01.  After saving, if I go back into the order and go directly into the line item conditions, the ZD01 does not exists at the item level.  If I navigate the the header conditions and then go back to the items, ZD01 appears as it should.  I believe what is happening is that the header condition is not being distributed to the line items unless New Pricing is carried out.  If I manually enter the ZD01 condiiton instead of relying on the userexit code, everything works fine.  The header condition is properly distributed to the line items.  Therefore, I believe the configuration is correct.  My question is, "How can I programatically trigger New Pricing from a sales order userexit".  Is this possible in SAVE_DOCUMENT_PREPARE or do I need to do it somewhere else.".
    Thank you,

    this problem has been resolved.  The problem was that I was appending the header condition to XKOMV instead of inserting the header condition as the first line in the table.  SAP will carry out the new pricing if the header condition is on the first line.

  • How to find out which validation is failed.

    Hi Experts,
    Here is another problem I am facing. I am getting an exception during record update.
    com.sap.mdm.commands.CommandException: com.sap.mdm.internal.protocol.manual.ServerException: One or more records failed a validation
    I am not able to print additional info about the exception. How to find out exacty which validaton or assignment failed. Please let me know.
    Thanks
    -Sai

    Hi Sai,
    Is your problem solved? If yes, then please mark the thread as answered. If no, then use the following code:
         int failedValidations =     validateRecCmd.getValidationResult().getTotalValidationsFailed();
         if (failedValidations > 0) {
                   for (int cnt = 0; cnt < failedValidations; cnt++) {
                   messages.addvalidateRecCmd.getValidationResult).getFailedValidations(recrd.getId())[cnt]
                                            .getMessage());
    where messages is arrayList which will contain all the error messages where the validations failed.
    Hope it helps.
    Regards.
    Rajat

  • How to carry out / trigger defined substitution

    Hello,
    Can you tell me why I can not carry out the substitution, which is defined as following:
    Tcode: OPSN
    Applicatn area  PS       Project System
    Callup point    1120     Network activity
    Prerequisite:  AFVGD-STEUS = 'PS01'
    So when I change the some user fields of the (internal) activity in a project, when I save the project, the substition is not carried out, can you tell me what else I need to implement the trigger of substitution.
    Thanks a lot!
    Jing

    Dear,
    For first Query:
    1) Create a value assignment type with type u201CAu201D Node with class with all the tick marks for activate indicator a
    Path: SPRO>>Environment, Health and Safety >> Basic Data and Tools >> Specification management >> Specification Data Base Structure >> Settings for value Assignment >> Specify value Assignment Types.
    Here you will find total value assignment Types available in the system.
    Double click on the value assignemnt type, which you would like to change.
    In this screen you need to select the value ***. Category as "A". after selecting the category "A" you need to enter the class in the column class(valAss.). Select the last 2 check boxes (New VA Active & Change Active) out of six.
    If you want to create a new one go to "new entries" and follow the steps mentioned above.
    For second Query:
    2) Run Table based value assignment creation make sure the check edit is ticked ok
    Once the updations or changes happened in the value assignments, you need to do this activity.
    Path: SPRO>>Environment, Health and Safety >> Basic Data and Tools >> Specification management >> Specification Data Base Structure >> Settings for value Assignment >> Set Up Table-Based Value Assignment
    Here you will find 2 rows
    1. Create Entries for the Value Assignments
    2. Set Up Table-Based Value Assignment
    You need to select "Create Entries for the Value Assignments" first
    double click on this. You will find a execution button. execute it.
    system asks "Do you really want to change value assignment type entries?"
    click on "Yes".
    system updates the information in the value assignment tables, what ever you did the updates in value assignment types.
    you will find the message of "number of new entries and number of entries deleted"
    Go back...........you will find the activity performed tick mark.
    you have to do the same thing in the second line "Set Up Table-Based Value Assignment". Here execution is not required.
    Kamal

  • How to find out i phone is unlock with out sim card

    how to find out i phone is unlock without sim card

    Put a SIM in the device from a carrier that it is not locked to.
    Contact Apple Customer support, provide them the Serial number and they may be able to provide that information.

  • How to find out which list is associated with specific incoming email address

    Hey Guys,
    I've a received a request today from a user asking me which list was setup with a specific incoming email address.
    Is there a way to find out which list is associated with an email address?
    Thanks

    OK after a bit of research I found a way to achieve this.
    I simply looked up the email address in ADUC, then did a search in SP with the display name. I could locate the list and manually confirm it was configured with the incoming email address I was looking for.
    I also found the below script on Stackoverflow, but got "The 'using' keyword is not supported in this version of the language." when I tried to run it. Any idea how to fix that? I'd like to have a script to link a library to an email address istead of the
    manual approach described above.
    http://stackoverflow.com/questions/4974110/sharepoint-how-do-i-find-a-mail-enabled-list-if-i-only-have-the-email
    $SiteCollection = ""
    $EmailAddress = "" # only the part before the @
    # Load SharePoint module if not done yet
    if((Get-PSSnapin | Where {$_.Name -eq "Microsoft.SharePoint.PowerShell"}) -eq $null) {Add-PSSnapin Microsoft.SharePoint.PowerShell;}
    cls
    using System;
    using Microsoft.SharePoint;
    namespace FindListByEmail
    class Program
    {a
    static void Main(string[] args)
    string siteUrl = $SiteCollection;
    string email = $EmailAddress;
    using (SPSite site = new SPSite(siteUrl))
    foreach (SPWeb web in site.AllWebs)
    try
    foreach (SPList list in web.Lists)
    if (list.CanReceiveEmail)
    if (list.EmailAlias != null && list.EmailAlias.Equals(email, StringComparison.InvariantCultureIgnoreCase))
    Console.WriteLine("The email belongs to list {0} in web {1}", list.Title, web.Url);
    Console.ReadLine();
    return;
    finally
    if (web != null)
    web.Dispose();

  • How to find out the list of workflows with active event linkage?

    Hi All,
    I want to find out the list of workflows whoe event linkage is activated in the system.
    Through SWU0, we can get a list of workflows attached to a particular event of a business object.
    Thanks,
    Sivagami

    Hi,
    Thanx for ur reply..
    I got the list from the table...
    thanks,
    sivagami

  • How to find out all the tables associated with particular T-code or Program

    Hi All,
    In 4.6B we have a transaction code SE49, where we can see all the tables associated with particular Transaction code or Program.
    But in ECC 5.0 or in ECC 6.0 this transaction code is not available.So is there any alternative where i can find out all the tables associated with particular T-code or Program.
    Thanks
    Shubham

    Hi,
    you are right, Transaction SE49 as well as SE48 do not exist anymore I'm afraid, they        
    are discontinued.                                                              
    You might try to create a transaction variant:                                        
    1) Start SE93 to create a transaction variant                                         
    2) Specify a name, eg. ZSE49, and choose the first option:                            
       "program and screen (dialog transaction)                                           
    3) Here specify SAPMSEUZ as program, and 200 as screen number                         
    4) Choose a suitable development class (package) if you want it to be                 
       transportable or Local (=$TMP) if non-transportable                                
    5) press Save                                                                         
    Same applies for SE48, same program but dynpro 100.                                   
    Sorry for not being able the reasons behind the decision to discontinue            
    these transactions. I suppose at least part of the functionality was               
    integrated in SE38.           
    Best regards
    Erika

  • How to carry out real-time or near real-time alerts?

    I just wonder when the source audit data transfer to audit vault server, does it done by Refreshing the Warehouse , or another process? Refreshing the Warehouse seems only normalize the raw audit data into the data warehouse. And can we control the frequency of transfering source audit data from soucre to audit valult server ?

    I was traced into transfering audit data from source to audit vault server, and found that it's very quickly to get the new audit data from source db into the audit vault server's table named avsys.av$rads_flat, it's almost realtime, but I have no idea about which process has done this, which process? how to control the frequecy ?
    Although the server has gotten the new audit data into the avsys.av$rads_flat, the warehouse still cann't get the new audit data whatever I refreshed the warehouse via Audit Vault Console or using command "avctl refresh_warehouse -wait" until 24 hours later. user579967 seems has the same problem, it really frustrated me. Is there anyone knows how ?

  • How to carry out license measurement for PLM Content Server

    Hi,
    Can anyone guide us on how the License measurement will work in case we have deployed the content server on a separte hardware box with AIX and Oracle
    thanks

    Hi
    The database is MaxDB and not oracle as mentioned.
    Thanks

  • How to Carry out Bulk SMS services on your website

    Hello friends
    Please I would like to introduce bulk sms services on my site I designed it with Fireworks and exported to Dreamweaver, then uploaded. But recently I have decided to make it more dynamic/blog with it by installing Wordpress and would not mind discarding the static aspects of it.
    With this, how can I introduce bulk sms services into this site?
    Thank you in anticipation

    Let me google that for you
    Nancy O.

  • How to carry out multiple searches on the same engine simultaneously.

    As mentioned above. I'm looking for a way to search multiple text at the same time.

    Can you give a more detailed example of what you mean?
    For example:
    * Do you want to type query #1 into the search box or address bar and open it in results tab #1, then type query #2 into the search box or address bar and open it in results tab #2? To do that, hold down the Alt key when pressing Enter or hold down the Ctrl key when clicking the icon that submits your search.
    * Do you want to combine numerous queries into a single request to Google and get the results all mixed together? You can use OR (must be in capital letters) with quotation marks or parentheses for grouping. For example: Android OR ios OR "windows phone"
    * Something else?

  • How to carry out an action on a task in a bpm process from another adf app?

    Hi everyone,
    We have a simple BPM process with only one human task with two actions: approve and reject.
    We want to know if it is possible to approve or reject this task from another adf application; I mean by clicking a button on a different page - not using the Actions menu in workspace, can I change the status of the task to approved or rejected and remove the task from the workspace of the assignee?

    I think you can use ItemAdding event to update your fields. This works better for you instead of ItemAdded event.
    Bala

  • How to carry out Dynamic Replace action in OSb

    Hi all
    I want to do a dynamic replace in OSB.
    like
    Lets my input be :-
    <cli:AccountInquiryRequest xmlns:cli="http://client.accountInquiry.dto.cards.nab.cz.fc.ofss.com">
    <cli:requestUID>string</cli:requestUID>
    <cli:cardType>string</cli:cardType>
    <cli:AcctId>5</cli:AcctId>
    <cli:scr>AcctId</cli:scr>
    <cli:dest>requestUID</cli:dest>
    </cli:AccountInquiryRequest>
    So what i want to do is check for element name in <scr>(in this case AcctId) and then replace the contains of the <AcctId> with the contains of the element name given in <dest>(in this case its requestUID)
    so in this case i want to replace the contain of requestUID with AcctId .
    Please help !!!
    Thanks

    I think you need to determine the xpath used for replace at runtime.. You can try looking at xslt xalan:evaluate function for this.
    The function syntax is as :
    <xsl:value-of select="xalan:evaluate($XPath)"/>
    You need to construct $XPath to point to right xpath . e.g concat("$body/*:",$body/*:dest)
    This will make $XPath to = $body/*:requestUID
    You can then pass this xpath string to xalan:evaluate.

  • How to find out the developed Web templates with repect to the User?

    Hi All,
    Can anyone help me to find out the User specific web templates i.e
    How can we find that the User wise web templates.

    Hi,
    Thanks for ur replyyy
    Can u give a solution for this problem which is mentioned in the previous threads also..but not got the solution still...
    An error came while using Web Aplication Designer functionality.
    Can you please help me to resolve this issue.
    X person Developed a web template, but when Y person attempted to broadcast the associated query result, an error message returned indicating access was denied: part of error message Form: PHIO_GET_CONTENT_ACCESS of program SAPLSDCI.
    The same X person developed a web template, but when he attempted to broadcast the associated query result, an error message was returned indicating access was denied.
    From these test results it appears as though the errors encountered are authorization related. It is a requirement that web templates developed by X to be broadcasted.
    I need to understand what permissions the X person requires in order for this to work so that his access can be changed.
    Waiting for quick response.
    Can u give me solution for this problem that what needs to be done.

Maybe you are looking for

  • Download pictures not recognized in catalog

    I downloaded pictures from my camera into the folder where all of the other catalog pictures exist (by date 5/24) and they do not come up into the catalog (as May). After getting photos I get an error message that reads "The ODBC data source returned

  • Invoice block for partial goods receipt

    Hii.. I have a requirement where i need to block the invoice its respective PO is partially receipted. does SAP provide any customizing settings wher if i tyr to do MIRO for PO which is partially receipted the invoice should be blocked. Suggestion wi

  • Itunes does not start because msvcr80.dll is missing

    Having an issue since the new itunes updated to 11.1.4.62 on Windows 7x64.  After the update to 11.1.4.62, Itunes can not start because mscvr80.dll is missing. I have reinstaleed, uninstalled, reinatelled, same issue each time. When I search for mscv

  • Broadcasting 'Page cannot be displayedu0092 error

    Dear all, I have a problem with our broadcasting in BW7. I've checked all the pameters in ICM, that is correct. I used RSBB_URL_PREFIX_GET to check HTTP server host and port settings, and also check for message server. The port of message server is 8

  • Inserted video appears as a dot, sound does play but no video

    Ever since QuickTime was updated to 7.4 (and subsequently to 7.4.1), I have been unable to insert .mp4 video's into my Keynote presentations! These videos do not play in quicktime any more either! The videos do play without a problem in iTunes. They