How to find out if a pattern validation failed
Hello,
I have Designed a form with several pattern-validations on it. LC's default behavior on such validation is that a message will be shown, but the user is still allowed to leave the field. Even if the entered data is crap.
So is it there any way to clear the field after a validation error or enforce the user to go back to the field?
I know it it possible to mark the validation as an error, so submitting will refuse. But in my case I have a custom submitting procedure, so this won't work.
Thanks for your help.
Edgar:
Instead of using a validation picture, you could put the logic in a FormCalc validation script and use the format() method. Then if it fails you can clear the field and setFocus() back into the field.
Alternatively, you could use a display picture and your validation script could compare rawValue with formattedValue. If a display picture fails, then rawValue and formattedValue will be the same.
I've described this in more detail (with a sample) at:
http://blogs.adobe.com/formfeed/2009/02/calling_formcalc_functions_fro.html
John Brinkman
Similar Messages
-
How to Find out What host is Sending Failed LDAP attemps from CUCM
Hello,
I have a strange issue. I have a customer who has CUCM / UCCX / Presence and Unity Connection installation on a BE6k. A couple times a week one of the users is reporting that her account is locked out. When we take a look at the audit logs on the AD servers all the failed attempts are coming from the CUCM subscriber (usually about 10 failed attempts in a 3 minute time frame). I've verified this in the CUCM tomcat security traces, however I can't find any logs that shows me the device that the attemps are comming from.
This user is a Jabber / UCCX user so it could be one of these applications. The strange part is sometimes she is locked out when her primary machine isn't even on. Obviously it might be another device on the network she has logged into but i'm wondering anyone knows of any traces that may help me. I've looked the regular tomcat logs but didn't find any detail there.
Thanks.We are having a similar issue. We started using Cisco AnyConnect about a month ago full time (Not sure if this has any bearing on issue). We have Cisco Jabber for Windows version 10.6 (Under advanced settings, Account type is set to Cisco IM and Presence with use following server checked and our Cisco Unified CM IM and Presence Administration Server IP entered), and when the user attempts to login to jabber, our CUCM Service Account (CUCMLDAP) locks out and nobody can login to Jabber, or any of our GUI interfaces for CUCM, Agent or Supervisor Software for UCCX. We are having to unlock the service account many times a day. Any assistance would be greatly appreciated.
Thanks -
RegEx: How to find out which part of the pattern failed?
Hi there,
I was wondering: is there any way to find out where the pattern matching failed?
Say I got the string "John Paul Yoko Ringo", and I want to match it against the pattern /John Paul George Ringo/.
I would like to know something like "pattern failed at index 11", or if I had groups something like "matching group 3 failed".
Is there any way to do this? Thanks in advance!
Best regards,
- Torbenjschell wrote:
I would like to know something like "pattern failed at index 11", or if I had groups something like "matching group 3 failed".
Is there any way to do this? Thanks in advance!
I wonder if that is reasonable. It means that the parse tree for the regex would need to keep mapping information.
At a minimum it is going to require an array, not a single result, because a regex can 'fail' in many ways.
Consider the following regex with the following input
/(a|b)d/
abababababx
Where does it 'fail'?Right. If you just want the character position at which it failed, those tools might tell you that as part of a bigger picture. But by itself, without any context, that number's not necessarily meaingful. A given character can be examined many times due to backtracking. Part of the expression could succeed for part of the input, then the expression might fail for the rest, so we backtrack, and may get several more failures, then more partial successes, all at different points, then ultimately it may fail anywhere within the input.
So just knowing where isn't enough. You need to know what steps were taken to get there. I do think these tools provide that, though I haven't looked closely. -
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
-SaiHi 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 find out the PATTERN, GRADIENT and BRUSHED objects?
How to find out the PATTERN, GRADIENT and BRUSHED objects information in illustrator active document file. And also how to find the CMYK and RGB color information in illustrator file through javascript. Could you please provide any examples.
I tried using the below code. But for both "cmyk" and "grayscale" pattern it gives only CMYK. Kindly check and advise.
Code:
var docRef = activeDocument;
for(var i=docRef.inkList.length-1;i>=0;i--){
var inkRef=docRef.inkList[i];
var inkRefName=inkRef.name;
alert(inkRefName);
alert(inkRef.inkInfo.kind);
Thanks for looking into this. -
How to find out the userid is ddic, how to find out thepassword for this.
hi
i am mohan. We user-id is DDIC. we forgot the password for this user id. how to find out the password for this. we find the table for this usr02. but it is hexa decimal code. how to find that codehi
check these threads
Re: Check SAP username and password.
Re: Validation of user name, pwd in ZXUSRU01 exit
if helpful, reward
Sathish. R -
JS CS3: Is a property read only? How to find out...
Hello all,
I found out about the x.reflect.properties object and find it very helpful in my current project.
Now I know how to find out about the properties of a dynamically given object :)
But here's the rub: is there any better way to find out if I can actually change one of those properties (i.e. whether it is not "read-only") other than just to try {} catch(){} it?
Thank you
Gerald[email protected] wrote:
> Hello all,
>
> I found out about the x.reflect.properties object and find it very helpful in my current project.
>
> Now I know how to find out about the properties of a dynamically given object :)
>
> But here's the rub: is there any better way to find out if I can actually change one of those properties (i.e. whether it is not "read-only") other than just to try {} catch(){} it?
From the JS Tools Guide
ReflectionInfo.type (String)
The type of the reflected element. One of:
readonly: A Read only property.
readwrite: A read-write property.
createonly: A property that is valid only during creation of an
object.
method: A method.
for photoshop scripting solutions of all sorts
contact: [email protected] -
How to find out the column causing the error while doing update or insert
I'm getting the below error when attempt to update or insert a long string that is more than its defined length in the DB2. For example in table the column length is defined as 50, however from UI the data for that column is more than 50 chars.
{color:#ff0000}**Caused by: com.ibm.db2.jcc.b.SqlException: DB2 SQL error: SQLCODE: -302, SQLSTAT**
**E: 22001, SQLERRMC: null**
**at com.ibm.db2.jcc.b.hh.b(hh.java:1369)**
**at com.ibm.db2.jcc.b.hh.c(hh.java:1356)**{color}
The above issue can be fixed by setting maxlength in the UI itself. However in my case, there is a backend program trying to insert or update load of records. If the exact column name causing the error is known, it will be helpful to load the data properly in the next attempt.
I have worked around it using SQLWarning and DataTruncation, but couldn't find the solution yet.
Any help on this issue will be really appreciated.Medraf wrote:
what is validator? Is it like validation.xml in struts? Are you suggesting like defining set of validation rules in the xml and apply the same for each record before doing any update or insert in DB? If so, then I could implement this validation logic in my backend code, however it may take more time to complete the batch prcoess.
How you implement doesn't matter.
However given a schema generating code for such validation is trivially simple at least for field types and sizes. Relationships are harder but those can be handled via custom rules.
Alternatively I'm looking for some kind of API in JDBC or Hibernate which gives the detailed sql exception message containing the error info like the column name and the reason for failure while update or insert. If not possible, then validation logic needs to be implemented.Having seen something similar in Oracle years ago I seriously doubt that you are going find it magically appearing in JDBC/hibernate. There might be warning on the SQLException (see the java docs for SQLException) but I wouldn't count on it. Other than that the only possibility is making some sort of call in db2 itself that tells you the error. Only problem with that is it might require the context which might not be available once you see the error (presuming, especially for performance, that you are using batch processing.)
As a start figure out how to find out using only db2 (docs and/or db2 forums.) -
How to find out Plant wise Cost centre/ Profit Centre
Hi Guru
My problem is How to find out plant wise cost centre. To be more clear------ I want to know what cost centre is valid for a particular plant
My mail Id. [email protected]Hi,
Then this explains the problem.
The message number starts with a Z and so it is not a standard SAP message because SAP does not link cost centres or GLs to Plants
But also, the message doesn't indicate a problem with the link? it is stating that you should check that the GL account and the PROFIT CENTRE are valid for the posting for the period???.
It looks like someone has written a custom modification in your system and so we are , unfortunately, unable to help because the data would be in custom tables and not standard SAP tables.
You can only solve this problem by speaking to someone within your own company who knows the mdofication that has been done.
Sorry
Steve B -
How to find out the user-exits?
hi.
how to find out the user-exits?
regards
eswar.Hi,
*& Report ZEXITFINDER
*report zexitfinder.
*& Enter the transaction code that you want to search through in order
*& to find which Standard SAP User Exits exists.
*& Tables
tables : tstc, "SAP Transaction Codes
tadir, "Directory of Repository Objects
modsapt, "SAP Enhancements - Short Texts
modact, "Modifications
trdir, "System table TRDIR
tfdir, "Function Module
enlfdir, "Additional Attributes for Function Modules
tstct. "Transaction Code Texts
*& Variables
data : jtab like tadir occurs 0 with header line.
data : field1(30).
data : v_devclass like tadir-devclass.
*& Selection Screen Parameters
selection-screen begin of block a01 with frame title text-001.
selection-screen skip.
parameters : p_tcode like tstc-tcode obligatory.
selection-screen skip.
selection-screen end of block a01.
*& Start of main program
start-of-selection.
Validate Transaction Code
select single * from tstc
where tcode eq p_tcode.
Find Repository Objects for transaction code
if sy-subrc eq 0.
select single * from tadir
where pgmid = 'R3TR'
and object = 'PROG'
and obj_name = tstc-pgmna.
move : tadir-devclass to v_devclass.
if sy-subrc ne 0.
select single * from trdir
where name = tstc-pgmna.
if trdir-subc eq 'F'.
select single * from tfdir
where pname = tstc-pgmna.
select single * from enlfdir
where funcname = tfdir-funcname.
select single * from tadir
where pgmid = 'R3TR'
and object = 'FUGR'
and obj_name = enlfdir-area.
move : tadir-devclass to v_devclass.
endif.
endif.
Find SAP Modifactions
select * from tadir
into table jtab
where pgmid = 'R3TR'
and object = 'SMOD'
and devclass = v_devclass.
select single * from tstct
where sprsl eq sy-langu
and tcode eq p_tcode.
format color col_positive intensified off.
write:/(19) 'Transaction Code - ',
20(20) p_tcode,
45(50) tstct-ttext.
skip.
if not jtab[] is initial.
write:/(95) sy-uline.
format color col_heading intensified on.
write:/1 sy-vline,
2 'Exit Name',
21 sy-vline ,
22 'Description',
95 sy-vline.
write:/(95) sy-uline.
loop at jtab.
select single * from modsapt
where sprsl = sy-langu and
name = jtab-obj_name.
format color col_normal intensified off.
write:/1 sy-vline,
2 jtab-obj_name hotspot on,
21 sy-vline ,
22 modsapt-modtext,
95 sy-vline.
endloop.
write:/(95) sy-uline.
describe table jtab.
skip.
format color col_total intensified on.
write:/ 'No of Exits:' , sy-tfill.
else.
format color col_negative intensified on.
write:/(95) 'No User Exit exists'.
endif.
else.
format color col_negative intensified on.
write:/(95) 'Transaction Code Does Not Exist'.
endif.
Take the user to SMOD for the Exit that was selected.
at line-selection.
get cursor field field1.
check field1(4) eq 'JTAB'.
set parameter id 'MON' field sy-lisel+1(10).
call transaction 'SMOD' and skip first screen.
Regards -
How to find out the Transactions used per month & the USER who used that
Hi,
1)How to find out the Transactions used per month & the USER who used that?
2)and can i get the above same for minimum 20 month?
System : SAP- Enterprise Core Component.You can use my program...
*& Report Z_ABAP_TCODE_MONITOR
*****& Program Type : Report *
*****& Title : Z_ABAP_TCODE_MONITOR *
*****& Transaction code : ZTCODE_USAGE *
*****& Developer name : Shailendra Kolakaluri *
*****& Deveopment start date : 26 th Dec 2011 *
*****& Development Package : ZDEV *
*****& Transport No : DEVK906086 *
*****& Program Description : This program is to display
*List all tcodes executed during previous day.
*& Show the number of users executing tcodes
*& Modification history
REPORT Z_ABAP_TCODE_MONITOR.
*& List all tcodes executed during previous day.
*& Show the number of users executing tcodes
TYPE-POOLS : slis.
DATA: ind TYPE i,
fcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,
layout TYPE slis_layout_alv,
variant TYPE disvariant,
events TYPE slis_t_event WITH HEADER LINE,
heading TYPE slis_t_listheader WITH HEADER LINE.
*REPORT z_report_usage.
TYPES: BEGIN OF zusertcode,
date TYPE swncdatum,
user TYPE swncuname,
mandt TYPE swncmandt,
tcode TYPE swnctcode,
report TYPE swncreportname,
count TYPE swncshcnt,
END OF zusertcode.
*data : date type n.
DATA: t_usertcode TYPE swnc_t_aggusertcode,
wa_usertcode TYPE swncaggusertcode,
wa TYPE zusertcode,
t_ut TYPE STANDARD TABLE OF zusertcode,
wa_result TYPE zusertcode,
t_result TYPE STANDARD TABLE OF zusertcode.
PARAMETER: month TYPE dats DEFAULT sy-datum.
*PARAMETER: date TYPE dats.
*select-options : username for wa_usertcode-account.
START-OF-SELECTION.
PERFORM get_data.
PERFORM get_fieldcatalog.
PERFORM set_layout.
PERFORM get_event.
PERFORM get_comment.
PERFORM display_data.
FORM get_data .
*date = sy-datum - 2 .
After start-of-selection add this line (parameter Month required 01 as day).
concatenate month+0(6) '01' into month.
CALL FUNCTION 'SWNC_COLLECTOR_GET_AGGREGATES'
EXPORTING
component = 'TOTAL'
ASSIGNDSYS = 'DEV'
periodtype = 'M'
periodstrt = month
TABLES
usertcode = t_usertcode
EXCEPTIONS
no_data_found = 1
OTHERS = 2.
wa-date = month.
*wa-date = date.
wa-mandt = sy-mandt.
wa_usertcode-account = username.
LOOP AT t_usertcode INTO wa_usertcode.
wa-user = wa_usertcode-account.
IF wa_usertcode-entry_id+72 = 'T'.
wa-tcode = wa_usertcode-entry_id.
wa-report = space.
ELSE.
wa-tcode = space.
wa-report = wa_usertcode-entry_id.
ENDIF.
COLLECT wa INTO t_ut.
ENDLOOP.
SORT t_ut BY report ASCENDING.
CLEAR: wa, wa_result.
endform.
FORM get_fieldcatalog .
fcat-tabname = 't_ut'.
fcat-fieldname = 'DATE'.
fcat-seltext_l = 'Date'.
fcat-key = 'X'.
APPEND fcat.
CLEAR fcat.
fcat-tabname = 't_ut'.
fcat-fieldname = 'MANDT'.
fcat-seltext_l = 'Client'.
fcat-key = 'X'.
APPEND fcat.
CLEAR fcat.
fcat-tabname = 't_ut'.
fcat-fieldname = 'USER'.
fcat-seltext_l = 'User Name'.
fcat-key = 'X'.
APPEND fcat.
CLEAR fcat.
fcat-tabname = 't_ut'.
fcat-fieldname = 'TCODE'.
fcat-seltext_l = 'Transaction Code'.
fcat-key = 'X'.
APPEND fcat.
ENDFORM.
*& Form SET_LAYOUT
text
--> p1 text
<-- p2 text
FORM set_layout .
layout-colwidth_optimize = 'X'.
ENDFORM. " SET_LAYOUT
*& Form GET_EVENT
text
--> p1 text
<-- p2 text
*FORM get_event .
events-name = slis_ev_top_of_page.
events-form = 'TOP_OF_PAGE'.
APPEND events.
*ENDFORM. " GET_EVENT
**& Form GET_COMMENT
text
--> p1 text
<-- p2 text
*FORM get_comment .
DATA: text(30).
text = 'Billing Report'.
heading-typ = 'H'.
heading-info = text.
APPEND heading.
*ENDFORM. " GET_COMMENT
**& Form top_of_page
text
--> p1 text
<-- p2 text
*FORM top_of_page .
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = heading[]
I_LOGO =
I_END_OF_LIST_GRID =
*ENDFORM. " top_of_page
*& Form DISPLAY_DATA
text
--> p1 text
<-- p2 text
FORM display_data .
sort t_ut[].
DELETE ADJACENT DUPLICATES FROM t_ut[] COMPARING ALL FIELDS.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-cprog
is_layout = layout
it_fieldcat = fcat[]
i_save = 'A'
is_variant = variant
it_events = events[]
TABLES
t_outtab = t_ut
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " DISPLAY_DATA -
How to find out the person who did a transport.
How to find out the person who did a transport.
There are 3 basis admins in our Org.
so is there a way of tracing out , who did what transport.
Regards,- Goto import Overview (STMS)
- Import Queue
- Select DEV req (goto Import History)
- Edit - Display More
It will show the user who did the transport
Rgds -
How to find out the user who has created a new field in the custom table.
How to find out the user details who has created a new field in the custom table.
Thanks,
JoanHi Jesudasan ,
You can know the user details with version management.Please find the
below procedure to know.
Go to table->Utilities tab->version->Version management->Compare the previous one .
Hope this solves the issue,Let me know if you have any issues.
Thanks,
Rajani -
How to find out web-inf path from the physical drive?
How to find out web-inf path from the physical drive?
I have some user profiles in web-inf directory.SO I want to know the path from root directory like
d:/program files/allaire/jrun/appname/web-inf/profiles/username like that.
Presently I am able to get the path upto the application directory and from that I am concatinationg web-inf/profiles/username .
But it is giving problems when it is deployed under unix or linux.Because web-inf there it treats as WEB_INF
SO I want to get the path of web-inf directory with out hard coding.
ThankuString path = application.getRealPath("/WEB-INF/profiles/username");
Note sure why you need this, but you don't need the real path to read the file - you can get an InputStream using the relative path. See ServletContext getResource() and getResourceAsStream(). -
How to find out appropriate user exit
Hi,
I want to know how to find out the user exit that matches to the requirement. Suppose for a material master program, there are so many include programs hence im unable to find call custer-function and even unable to debug an appropriate include. Please help me out how to learn user exits in a rightious way.
Thanks
BasuLook for program SAPICSS_ in your system and run it. This program can also be found under CMOD menu: Utilities -> SAP enhancements.
This will only give you the CMOD user exits.
There is a program someone made that searches for all sorts of user-exits (including BADI's etc.). I remember that it was posted on sapfans.com
Edited by: Maen Anachronos on Apr 6, 2009 3:22 PM
Maybe you are looking for
-
Regular Airport card - fit in iMac DV SE 400?
Hello there, I'm trying to install an 802.b AirPort card on my iMac DV SE 400 but it does't seem to fit. The antena cable in the iMac inserts properly in the card but the plastic slot where the card in supposed to go is too wide. Also, there's no mal
-
Can't open iTunes anymore. Get error message
I recently got an iTouch. Also recently got a new computer. I downloaded iTunes onto new computer (Windows Vista) and it worked just fine. iTouch worked too. However, one day I went to open iTunes and it didn't open. I got an error message that said:
-
COMPUTE_BCD_OVERFLOW / BCD_FIELD_OVERFLOW problem
Hi all. I have a customized program which generate PO from text file by using BAPI_PO_CREATE1. I've uploaded more than thousand items and everything's fine. There're some items which cannot be created BUT bapi returns PO number and also sends error m
-
Album Art not coming in iPhone
I have downloaded some music but not from iTunes music store. Now when i have synced my iPhone with Mac,i am not able to get the album art in iPhone which is being displayed in the itunes in my Mac. How can I make it appear in the songs in my iPhone
-
So i have read all the stuff about the ipad 2.. But can I use my iPad as a laptop while it's charging? I mean I've noticed that if the screen doesnt really charge? Will that hurt the battery ? Thanks in advance!