How to check the field existence in a string at Header level?

Hello,
I have a bunch of fields on my_form, just for example here in this posting I am using US state names ....., say for example,
I have 3 fields, their names are as below
1) NY,
2) CA, 
3) TX
I placed a hidden a text field, its name is GFL (i mean, Grey Fields List), am using this GFL for my programming purpose
From the back end (in our case, its an ERP -SAP) am populating/filling this GFL field, say for example.... its data looks like, CA TX (i mean, am concatenating the state names with a seperation of a space)
( FYI.....Already i have some JS piece in my_form INITIALIZATION and docReady events for some other purposes)
Now, my requirement is as below,
1) LOOP all the FIELD objects (here they are as State names) of my_form , then check whether their name (NY) existing in GFL's data..........if exisitng (in our case, its not existing) pls. greyed out with readOnly.......... if not existing
(in our case, its not existing)   then skip the coloring and readOnly, go to next loop / iteration / state / Field
Actually, i can achieve my requirement by putting JS in each field objet's INITIALIZATION event itslef as below, (but, i have around 200 feilds in my_form, hence i would like to put at HEADER level by generically looping all the field objects in my_form in one piece of code),
var myStateName = /NY/;
var returnValue = GFL.search(myStateName);
if(returnValue != -1){; // This state/field/object is found in the Grey Fields List, hence greyed out with readOnly
this.ui.oneOfChild.border.fill.color.value = "192,192,192";
this.access = "readOnly";
For some other requirement one of expert has provided the below JS in these forums, as below
function findNodes(vNode) {
    if (vNode.className === "field") {
                   if (vNode.isPropertySpecified("name") === true) {
                                  if (vNode.getAttribute("name").search(/_U$/g) !== -1) {
                                      // Script to execute, when a match was found
    for (var i = 0; i < vNode.nodes.length; i += 1) {
        findNodes(vNode.nodes.item(i));
findNodes(xfa.form);
Actually, I tried to change the above JS as per my requirement, but its not working, pls. provide me correct JS as per my requirement
Thank you

Try this:
function findNodes(vNode){
     if (vNode.className === "field"){
          if (vNode.isPropertySpecified("name")===true){
               var myStateName=new RegExp(vNode.name);
               var returnValue = GFL.search(myStateName);
               if (returnValue!=-1){
                    this.ui.oneOfChild.border.fill.color.value="192,192,192";
                    this.access="readOnly";
               else{  
                    this.ui.oneOfChild.border.fill.color.value="255,255,255";//whatever colour is open access
                    this.access="open";
     for (var a=0;a<vNode.nodes.length;a++){
          findNodes(vNode.nodes.item(a));
findNodes(xfa.form);
Kyle

Similar Messages

  • How to update the field 'VBRK-ZUONR' of Billing Document Header(VF03)

    Hi Experts.
    I got a request to update the field 'VBRK-ZUONR' of Billing Document Header(T-code:VF03).
    At first i thought it might be a BADI or User-Exit case and looked up in Standard Program but found nothing.
    Thus i doubted if it was a configuration problem.
    I tryed to configure through transaction code "VTFA" "VTFL" "VTFF" and met another failure.
    Now i'm totally lost and hope for your advice,any information would be appreciated.
    The Billing Document is automatically generated from the posting of Outbound Delivery.
    Regards.
    Panda.

    Hi friends.
    I've found where point is.
    The include program 'RV60AFZC' contains a form named 'USEREXIT_FILL_VBRK_VBRP',
    in which the field 'VBRP-ZUONR' could be set through coding.
    In our system the codes had been changed once,which led to the misalignment that confused me yesterday.
    On the other hand,undoubtedly VTFL is available to configure the value of 'VBRP-ZUONR'.
    For more information plz refer to
    http://help.sap.com/saphelp_46c/helpdata/en/18/f62c7dd435d1118b3f0060b03ca329/content.htm
    Thanks again to all of you.
    Best Regards
    Panda.

  • How can set the responsiblity name and operatingunit name at header level y

    Dear all
    Good Morning
    i have to set the respname and org name at header level
    i taken the item at page level userinfo it is coming the right side of the page i want to be set at header level only in left side top only...
    is there any item style for this requiremt
    Regards
    Sreekanth

    Dear Sumit
    I designed one custom page in top header level i want to put Operating unit name and responsiblity name i mean in which responsiblity user working in that page...
    i want to set these two properties
    in process request i wrote the code
    int orgid=pagecontext.orgid();
    String respname = pageContext.getResponsibilityName();
    i want to set these values to icorresponding items
    these items i want to create at the top level of the header
    which region which style.........
    in page level i taken userinfo item it is coming right side of the header
    i want to set these two items either left or right i want to set header level only
    Regards
    Sreekanth

  • How to check the table existence in JPA

    1) is there a way I can check for existence of the table using JPA, before I read the rows.
    2) If I want to create two tables with same columns (name, time), Should I create two entity objects to insert? is there a way to use one enity class and specify a table to insert ?
    thanks
    Vamshi

    Try this:
    function findNodes(vNode){
         if (vNode.className === "field"){
              if (vNode.isPropertySpecified("name")===true){
                   var myStateName=new RegExp(vNode.name);
                   var returnValue = GFL.search(myStateName);
                   if (returnValue!=-1){
                        this.ui.oneOfChild.border.fill.color.value="192,192,192";
                        this.access="readOnly";
                   else{  
                        this.ui.oneOfChild.border.fill.color.value="255,255,255";//whatever colour is open access
                        this.access="open";
         for (var a=0;a<vNode.nodes.length;a++){
              findNodes(vNode.nodes.item(a));
    findNodes(xfa.form);
    Kyle

  • How to check the database existence using java.

    Hi All,
    I need to know if a database exists or not using DB2 sql statements. Is there any sql to find that.
    Thanks in advance

    try to connect to the database. if it is possible, the database exists - if not - well there may be a number of reasons, but if your database URL is correct, your network is ok and your database engine is running, the database is not existent.

  • How to check the verity version in our PeopleSoft Installation?

    How to check the verity version in our PeopleSoft Installation? I am not sure if the verity is installed or not and also if installed what is the version?

    yes. it says the version is 5.0.1
    Is there any difference in installation or configuration when the app and web server are in same machine and when the app and web server are installed in different servers?
    ============================================
    D:\fs840\webserv\peoplesoft>mkvdk
    mkvdk - Verity, Inc. Version 5.0.1 (_nti40, Jul 23 2004)
    Usage: mkvdk [<option>...] <filespec>...
    Where <option> can be a VDK switch, or any of:
    -about Show the collection's about resources
    -autodel Delete bulk insert file when no longer needed
    -backup <dir> Specify collection backup location
    -bulk Submit bulk insert file(s)
    -charmap <name> Specify the character map to VDK
    -collection <path> Specify the collection (required)
    -create Create the collection
    -credentials <user> Specify user[:passwd][:domain][:mailbox]
    -datapath <path> Specify VDK datapath
    -datefmt <fmt> Specify date format to VDK
    -debug Enable debugging output
    -delete Delete documents
    -description <desc> Set the collection's description
    -diskcache <num> Set VDK's disk cache size (kbytes)
    -extract Extract field values from text
    -help Print this usage information
    -insert Insert documents (default)
    -locale <locale> Specify the locale to VDK
    -logfile <file> Save output in a log file
    -loglevel <num> Set the VDK output level for the log
    -mailboxes This option is depracated. Use the credentials option inste
    ad
    -maxfiles <num> Set VDK's maximum number of open files
    -maxmemory <num> Set VDK's maximum memory usage (kbytes)
    -mode <mode> Set the indexing mode
    -modify Modify fields using field/value pairs from a bulkfile
    -nohousekeep Disable housekeeping
    -noindex Disable indexing
    -nolock Turns off locking (dangerous)
    -nooptimize Disable optimizations
    -nosave Don't save collection work list
    -noservice Prevents servicing of submitted work
    -nosubmit Don't submit work to VDK
    -numdocs <num> Number of documents to insert from bulk insert file(s)
    -numpages <num> Synonym for diskcache for backward compatibility
    -offset <num> Specify offset into bulk insert file(s)
    -online Flag for online Bulk Modify
    -optimize <spec> Optimize the collection
    -outlevel <num> Set the VDK output level
    -persist Service the collection forever
    -purge Remove all documents from collection
    -purgeback Purge in the background
    -purgewait <secs> Specify delay before purge
    -quiet Suppress all non-error messages
    -repair Repair the collection
    -servlev <spec> Advanced option for overriding service level
    -sleeptime <secs> Interval between service calls for persist
    -style <dir> Specify style directory for create
    -submit Synonym for noservice for backward compatibility
    -synch Perform work synchronously
    -topicset <path> Specify VDK topic set
    -update Update documents
    -vdkhome <path> Specify VDK home
    -verbose Output more information
    -words Build word assist list
    -wordindex Build word assist index
    The <spec> for -optimize is a hyphenated string of:
    maxmerge Perform maximal merging of partitions
    squeeze Recover space from deleted documents
    vdbopt Build optimized VDB's
    spanword Create word list spanning all partitions
    ngramindex Create ngram index into spanning word list
    maxclean Really clean (not for read-write)
    readonly Make the collection read-only
    tuneup Fully optimize for read-write use
    publish Fully optimize for read-only use
    The <spec> for -servlev is a hyphenated string of:
    search Enable search and retrieval
    insert Enable adding and updating documents
    optimize Enable opportunistic collection optimization
    assist Enable building of word list
    housekeep Enable housekeeping of unneeded files
    delete Enable document deletion
    backup Enable backup
    purge Enable background purging
    repair Enable collection repair
    dataprep Same as search-index-optimize-assist-housekeep
    index Same as insert-delete
    Error: must specify collection
    mkvdk done
    D:\fs840\webserv\peoplesoft>

  • How to get the field name of an internal table during runtime?

    How to get the field name of an internal table during runtime?

    Hi  Sudhir,
    Declare and Use Get Cursor Field in Your Prm to get the field Name of the Intenal Table
    Example Code:
        <b>  DATA: v_field(60).                        " Insert this code.
         GET CURSOR FIELD v_field.        " Insert this code.</b>
         <b>CHECK v_field = 'ITAB-KUNNR'.    " Insert this code. (or)
    Write: v_field.</b>
    Regards,
    Ramganesan K.

  • How to check the value in Table CDPOS

    Mostly I can't see the following fields value in the table CDPOS,
      (1) CDPOS-VALUE_NEW
      (2) CDPOS-VALUE_OLD
    In fact, it should have values, so how to check the values, is there any special method needed?
    Thanks and best regards.

    Ferry Lianto,
    Thank you very much for your expertise.
    It's helpful to get some contents via FM:CHANGEDOCUMENT_READ_POSITIONS, the problem is, to some kind of DELETION operation, the log in table CDPOS is very simple, I still don't know which contents were deleted even though I found records in table CDPOS.
    Is there any other suggestions?
    Thanks and best regards.

  • How to check Le field is missed?

    Hi,
    When the protocol is T=1, I have problem with Le field.
    When the card recieve Case 2 format command without Le(like '00B2010C' - Read Record) , how to check the Le field is missed?
    I tried below but not working.
    if(APDU.getProtocol() == APDU.PROTOCOL_T1 && apduBuffer[ISO7816.OFFSET_LC] != 0 && apdu.setIncomingAndReceive() != 0){
              ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
    I look forward your feedback.
    Many thanks in advance!
    글 수정: user11280436
    글 수정: user11280436

    Hi,
    You should check the response from apdu.setOutgoing() to see what value was passed in as Le. This will return the number of bytes expected by the terminal.
    You only need to call apdu.setIncomingAndReceive() if the INS expects data. You can also use it to ensure that there was no data passed in (returns 0).
    Cheers,
    Shane

  • How to validate the field when i am populating the data cursor to block

    Hi,
    I am populating data cursor to multi record block.
    Block contain 5 items. I am populating data cursor to block for 4 items. User will enter one item value that is quantity field.
    If user enter negative values and decimal points in quantity filed i need to display message to user item level.
    Please do the needful how to do it.

    902434 wrote:
    Hi,
    I am populating data cursor to multi record block.
    Block contain 5 items. I am populating data cursor to block for 4 items. User will enter one item value that is quantity field.
    If user enter negative values and decimal points in quantity filed i need to display message to user item level.
    Please do the needful how to do it.If you want to validate at entry level then use When-Validate-Item trigger and check the input and show message. Like
    If :quentity <0 then
    message('do not enter negative value');
    message('do not enter negative value');
    raise form_trigger_failure;
    end if;Why u open same thread again ? not closing one.. check this one
    </a>
    How to validate the field when i am populating the data cursor to block
    Hopes this helps
    If someone's response is helpful or correct, please mark it accordingly.

  • How to validate the fields  and how to display the error messagein presenta

    Hi,
    I am new to OBPM 10g, pls tell me how to validate the fields in a presentation.
    for example if we take login presentation if user enters his user name and password wrongle and submit the form. Then we need to display error message right side of the each field i.e user name and passowrd is wrong and try again.
    Regards
    jaya
    Edited by: 12345 on Aug 12, 2010 10:38 PM

    Hi Jaya,
    You can initially set the validation for empty values.. that is when the user dint enters any value and clicks on submit.
    for these vadliations you need to write a method and call it on submit button click!!
    secondly, you can validate for the format if required.
    thirdly, you can validate against a database for the credentials. For this you need to fetch list of usernames from database and search for user entered value in that list.
    Optimal query would be : if user name not null, query for pwd of the entered user name from database or file storage. if you dont get any value for pwd of given username, its incorrect user name. if you get some pwd value for username, then check against the one user entered in pwd field..
    Write all this logic in a method and call on submit button click event of the login form!!
    HTH
    Sharma

  • How to check the current open period

    Hello ABAP Gurus,
    Could you help on how to check the current open period...
    Sample would be
    current date = may 1, 2009  but period for may is not yet open
    so open would be april period
    Thanks in advance....
    Edited by: nanz ruiz on May 27, 2009 3:34 AM

    Hi,
       Check the fieldas FRYE2,FRPE2,TOYE2,TOPE2 of table T001B for a given varient.
    Regards
    Vishnu Gupta

  • How to set the field non-editable in the classical report..

    Hi..
              How to set the field non-editable in the classical report..

    Hi experts,
    For the component 'ICCMP_EMP_SRCH' there is a view 'BUPAEMPSEARCH' , which has 2 context nodes 'CUSTOMER' AND 'SEARCHEMPLOYEE' , i need to add the field 'NICKNAME' which is part of the 'CUSTOMER' context node on the search screen. Currrently all the fields on the screen screen are from the 'SEARCHEMPLOYEE' context node. when i did the configuration , the 'NICKNAME' field is greyed out . I have already generated the Getter ,Setter , GET_I, GET_M methods for the 'NICKNAME' field and the context node and controller class and context class are all active .
    on debugging the GET_I method, i see that rv_disabled = 'TRUE' and the current = collection_wrapper->get_current( ) is returning empty value .
    for this rv_disabled to be set false , the code below is not triggered since there is no value in current.
    IF current->is_property_readonly(
    'NICKNAME' ) = abap_false. "#EC NOTEXT
    rv_disabled = 'FALSE'.
    ENDIF.
    when i check for other search fields of context node 'SEARCHEMPLOYEE' , all the fields are set to rv_disabled = 'FALSE'.
    can anyone suggest how to approch this. iam i missing any binding between context nodes or any activations ?
    The field properties are set as Input field and the display checkbox is not checked.

  • How to disable the field-input in xd01

    Hi Abappers,
                         I have created subscreen in xd01 using BADI: CUSTOMER_ADD_DATA_CS. After giving input to field, it has to go disable mode how is it possible.How to disable that field.
    Regards,
    simba.

    Hi,
       after u add some data to that field. Now check the field, if it is not initial then make that field in disable mode.
    for eg:
    loop at screen.
                 if itab-<fieldname> is not initial.
                 screen-input = 0.
                 modify screen.
                 endif.
              endloop.
    Regards,
    Kasuladevi Srinivas
    Edited by: Kasuladevi Srinivas on Sep 11, 2008 7:26 AM

  • Pls. explain me  u0093Split numberu0094 and how to check the created u0093Capacity IDu0094

    When I switching the network activity to TECO, the system throws an error “There are CATS records for the object to be deleted”. However we have transferred all the CATS records, but in CATSDB table found “Split number” as 1 and there is “Capacity ID” 10000426.
    Can anyone explain what is “Split number” and how to check the created “Capacity ID” 10000426
    Thanks in advance.
    Regards,
    Harisha

    Hai Lokesh,
    Here is help from my side.
    <b>Schedule the job so as to run the report for every 1 hour or what ever you want.</b>
    Before that:
    <b>Juat add the below logic:</b>
    Get the Text data into a ITAB1.
    LOOP AT THAT ITAB.
      SELECT SINGLE PRIMARY KEY FIELDS
          FROM DATABASE_TABLE
        WHERE f primary keys of text data EQ DATABASE_TABLE-PRMARY KEY FIELDS.
    IF SY-SUBRC EQ 0.
       SELECT SINGLE ORDER_NO
          FROM ORDER_TABLE
      WHERE ORDER_NO EQ ORDER_NO.
    IF SY-SUBRC NE  0."If Order already not created
       "* write the code to create Order
      "* Store this record into other ITAB2.
    ENDIF. 
    ENDIF.
    Finally,
    Get a new ITAB3 where it contans data in ITAB1 BUT NOT IN ITAB2.
    Delete itab1 from presen.Server
    Upload itab3 into presn.Server
    Hope this helps you.
    <b>Reward points if it helps you.</b>
    Regds,
    Rama chary.Pammi

Maybe you are looking for

  • ICal, MS Outlook, and Titles in published calendars

    I need to publish my calendar, and would like to use iCal to do it. However, I only need the equivalent of free/busy information to show (I don't want to show any other information about events). I thought that unchecking "Publish Titles and Notes" w

  • TSV_TNEW_PAGE_ALLOC_FAILED during extraction

    Hi Experts, during extraction I receive TSV_TNEW_PAGE_ALLOC_FAILED short dump. More information from ST22: The internal table "\PROGRAM=AQZZSYSTBWGENER0SY000000000022\DATA=%DTAB[]" could not be further extended. To enable error handling, the table ha

  • Logical column using data source from 2 generations of same hierarchy

    Hi experts, I'm using Essbase as my data source in CEIM physical layer, and I have a hierarchy called "Entity" which contains different level of companies, in Generation 2 I have only one member called "group totals" and in Generation 3 are 5 members

  • Link Line Items AUAS with ANEP

    Greeting, How to link line items of table AUAS with ANEP if there is more than one line for a document number in both tables with different amounts. The scenario is that I am reading lines of table AUAS and need to get the transaction type from table

  • Change report background

    Is there way to change the report background based on a condition via function when the report is opened? example pseudo code: If (a = "1") then Report.background = image1 else Report.background = image2 where the images would have to be saved on the