Function calling only the last Javascript API

All,
I have a function in my page header:
function DisableANo(){
//1
$f_DisableOnValue('P20_B','AAAA','P20_A');
//2
$f_DisableOnValue('P20_B','BBBB','P20_A');
//3
$f_DisableOnValue('P20_B','CCCC','P20_A');
I am calling this function on Item B's onChange event.
When I do this, only the last //3 API is being called. If i remove //3 and have only //1 and //2, then I get //2 to work and if I remove //2 and have only //1, then I can get //1 to work.
Can you please tell me where i am going wrong?
Thanks!

spriya wrote:
Hi,
I am trying to disable the item P20_A if the value of item P20_B is in 'AAAA' or 'BBBB' or 'CCCC'.Review the documentation:
>
$f_DisableOnValue(pThis, pValue, pThat)
Checks the value (pValue) of an item (pThis). If it matches, this function disables the item or array of items (pThat). If it does not match, then the item is enabled.
>
So in this code (and code should always be posted using <tt>\...\</tt> tags):
function DisableANo(){
//1
$f_DisableOnValue('P20_B','AAAA','P20_A');
//2
$f_DisableOnValue('P20_B','BBBB','P20_A');
//3
$f_DisableOnValue('P20_B','CCCC','P20_A');
}If <tt>P20_B == 'AAAA'</tt> //1 will disable <tt>P20_A</tt>, then because <tt>P20_B == 'AAAA'</tt>, //2 will enable <tt>P20_A</tt> because <tt>P20_B != 'BBBB'</tt>, and so on etc...
Try <tt>$x_disableItem</tt>:
$x_disableItem('P20_A', (($v('P20_B') === 'AAAA') || ($v('P20_B') === 'BBBB') || ($v('P20_B') === 'CCCC')))

Similar Messages

  • Is it possible with iphone4 to delete only the last tel number called?

    is it possible with iphone4 to delete only the last tel number called?

    At the present, no...it's all or nothing.

  • Only the last line item is shown in main window...

    Hello Experts,
    I created a custom form for the standard checque program RFFOUS_C. Now, in my MAIN window, I
    called a subroutine in a custom program which loops through the line items but the problem is
    only the last line item is being shown. I tried using CONTROL_FORM to create a new line
    but it does not work. Note that I did not customize RFFOUS_C since it is being used by
    multiple companies. Below is my code:
    SAPSCRIPT:
    510-C
    Begin of insertion DEVK940799 11/10/2008 DEL_HIDALGO
    DEFINE &LTYC_XBLNR& = ''
    DEFINE &LTYC_BLDAT& = ''
    DEFINE &LTYC_SGTXT& = ''
    DEFINE &LTYC_DMBTR& = ''
    PERFORM WRITE_LINE_ITEMS IN PROGRAM Z9999RFI_Z2574FFI_RA
    USING &REGUH-LAUFD&
    USING &REGUH-LAUFI&
    USING &REGUH-XVORL&
    USING &REGUH-ZBUKR&
    USING &REGUH-LIFNR&
    USING &REGUH-VBLNR&
    CHANGING &LTYC_XBLNR&
    CHANGING &LTYC_BLDAT&
    CHANGING &LTYC_SGTXT&
    CHANGING &LTYC_DMBTR&
    ENDPERFORM
    PROTECT
         &LTYC_XBLNR&     &LTYC_BLDAT&     &LTYC_SGTXT&     &LTYC_DMBTR&
    ENDPROTECT
    End of insertion DEVK940799 11/10/2008 DEL_HIDALGO
    PROGRAM:
    IF gt_regup[] IS NOT INITIAL.
        CALL FUNCTION 'OPEN_FORM'
           EXPORTING
    *         APPLICATION                       = 'TX'
    *         ARCHIVE_INDEX                     =
    *         ARCHIVE_PARAMS                    =
    *         DEVICE                            = 'PRINTER'
    *         DIALOG                            = 'X'
             form                              = lcc_z2574ffi_ra
    *         LANGUAGE                          = SY-LANGU
    *         OPTIONS                           =
    *         MAIL_SENDER                       =
    *         MAIL_RECIPIENT                    =
    *         MAIL_APPL_OBJECT                  =
    *         RAW_DATA_INTERFACE                = '*'
    *         SPONUMIV                          =
    *       IMPORTING
    *         LANGUAGE                          =
    *         NEW_ARCHIVE_PARAMS                =
    *         RESULT                            =
           EXCEPTIONS
             canceled                          = 1
             device                            = 2
             form                              = 3
             OPTIONS                           = 4
             unclosed                          = 5
             mail_options                      = 6
             archive_error                     = 7
             invalid_fax_number                = 8
             more_params_needed_in_batch       = 9
             spool_error                       = 10
             codepage                          = 11
             OTHERS                            = 12.
        IF sy-subrc <> 0.
    *        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    *                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
        LOOP AT gt_regup INTO lw_regup.
          m_line_items 'LTYC_XBLNR' lw_regup-xblnr.
          m_line_items 'LTYC_BLDAT' lw_regup-bldat.
          m_line_items 'LTYC_SGTXT' lw_regup-sgtxt.
          m_line_items 'LTYC_DMBTR' lw_regup-dmbtr.
          DELETE ex_output WHERE value IS INITIAL.
          CALL FUNCTION 'WRITE_FORM'
           EXPORTING
             element                        = '510-C'
             function                       = 'APPEND'
    *         TYPE                           = 'BODY'
             window                         = 'MAIN'
    *       IMPORTING
    *         PENDING_LINES                  =
           EXCEPTIONS
             element                        = 1
             function                       = 2
             type                           = 3
             unopened                       = 4
             unstarted                      = 5
             window                         = 6
             bad_pageformat_for_print       = 7
             spool_error                    = 8
             codepage                       = 9
             OTHERS                         = 10.
          IF sy-subrc <> 0.
    *        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    *                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
          CALL FUNCTION 'CONTROL_FORM'
            EXPORTING
              command   = 'NEW-LINE'
            EXCEPTIONS
              unopened  = 1
              unstarted = 2
              OTHERS    = 3.
          IF sy-subrc <> 0.
    *        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    *                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
        ENDLOOP.
        CALL FUNCTION 'CLOSE_FORM'
    *       IMPORTING
    *         RESULT                         =
    *         RDI_RESULT                     =
    *       TABLES
    *         OTFDATA                        =
           EXCEPTIONS
             unopened                       = 1
             bad_pageformat_for_print       = 2
             send_error                     = 3
             spool_error                    = 4
             codepage                       = 5
             OTHERS                         = 6.
        IF sy-subrc <> 0.
    *        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    *                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      ENDIF.

    Hi,
    Write the at last event in the program and check if it works
      At last.
           CALL FUNCTION 'CONTROL_FORM'
            EXPORTING
              command   = 'NEW-LINE'
            EXCEPTIONS
              unopened  = 1
              unstarted = 2
              OTHERS    = 3.
          IF sy-subrc  0.
           MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
    Regards,
    Sravanthi

  • RFC - XI - JDBC(mapping only the last row of a record)

    Hello all,
    in a mapping response from an oracle base after a RFC call with a select statement, i have the following response :
    <StatementSelect_response>(cardinality 0..1)
    <row1>(cardinality 0..unbounded)
    <field1>1</field1>
    <field2>2</field2>
    </row1>
    <row2>
    <field1>3</field1>
    <field2>4</field2>
    </row2>
    </statement>
    i have to map those fields in a RFC_response like :
    <RFC_response>(0..1)
    <field1>
    <field2>
    </rfc _response>
    Problem : I only need to send back to the rfc_response the last records of my StatementSelect_response in order to have the following message :
    <RFC_response>
    <field1>3
    <field2>4
    </rfc _response>
    How can i select only the last row of my records plz ?
    Thanks by advance

    VJ wrote:>
    > Hi,
    >
    > public void LastRow(String[] a,ResultList result,Container container){
    >
    > int len = a.length();
    > Result.addValue(a\[len-1\]);
    >
    > }
    VJ,
    Please don't confuse him. If you want to update the thread, let me leave it aside.Coz it shouldn't cause him trouble. Can u check a.length() is correct? it has to be a.length, isn't it?
    We all here to help others, not under any motivation of compete..
    Sorry, if I hurt you..
    raj.

  • How to remove only the last element of spreadsheet string

    I use path to string option to store image path into database and while retrieving the string is again converted into path but it gives out an error as the output of array to spreadsheet string gives out a tab at the end which is unable for the IMAQ read file to recognise.but when i use the path of the image directly into IMAQ readfile the image is opened . so how to remove the tab only at the end of output of the spreadsheet string(whose length can vary)? I have also attached my program with this.
    Attachments:
    retrieve_images_from_DB.vi ‏65 KB
    file_path_to_db_(images).vi ‏40 KB
    create_table_for_images.vi ‏45 KB

    indhu wrote:
    > Thanks for your reply!
    > But my problem is to remove only the last element(which is a tab or an
    > alphabet) from a spreadsheet string of any length.
    If you just want to remove the last character of a string just use the
    String Size function reduce the result by one and wire it together with
    the string to the Split String function.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Keep only the last date in a tablix whith formula using previous

    Hi,
    I am using this formula in a tablix
    =iif(Previous(Fields!Extract_Date.Value)="", "", (
    (Fields!Percent_IPCoverage.Value-Previous(Fields!Percent_IPCoverage.Value))*1
    +(Fields!Percent_DVerCoverage.Value-Previous(Fields!Percent_DVerCoverage.Value))*2
    +(Fields!Percent_Formalized.Value-Previous(Fields!Percent_Formalized.Value))*2
    +(Fields!Percent_Traced.Value-Previous(Fields!Percent_Traced.Value))*3
    +(Fields!Percent_StakeholderValidation.Value-Previous(Fields!Percent_StakeholderValidation.Value))*3
    +(Fields!Percent_Compliant.Value-Previous(Fields!Percent_Compliant.Value))*3
    /(1+2+2+3+3+3)
    I would only display the last Extract Date in my tablix and corresponding value.
    How is it possible ?
    Thanks in advance.

    Hi fiacre6631,
    According to your description, you want to display the last Extract Date in your report. Right?
    In Reporting Services, we have last() function to display the last value in a specified scope. In this scenario, please refer to the expression below:
    =last(Fields!Extract_Date.Value,"DataSet")
    Reference:
    Last Function (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou
    Thanks!!
    It works :)

  • Call up the last screen of the layout builder

    Hello BPS Experts,
    there is a infobject object addition to the level and package. therefore when i open the layout in change mode it gives a message of infobject insertion.  Its fine till here. i go from first screen ( list of objects ) > second screen ( sequence ) > third screen ( display in excel ) > now i try to save or exit i get the message displayed as 'call up the last screen of the layout'
    please could me to understand the error. is there any other screen after the excel display ? am i missing anything in here. moreover i did not find the check button on the excel screen. is there something wrong from what i am doing.
    Suggestions appreciated.
    Thanks,
    BWer

    i think there is a problem with use of fiscal year in the lead columns. i get this message only when i have the fiscal year in the lead column. it does not show any rows with data. i changed the lead column to other infobject now it shows the rows and no message of 'call up last screen' do you guys know why there is a problem with the fiscal year. it does not display any data when fiscal year period is in the lead column.
    Suggestions appreciated.
    Thanks,
    BWer

  • How can I get only the last 2 rows?

    How can I narrow down a query to get only the last two rows in a table ?
    Thanks,
    Mohan

    Thanks a lot Ram for your suggestion but already I have a query which returns a set of rows, of which I would like to further filter and get the last two rows
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Ramanuj Bangad ([email protected]):
    try out something like this if it helps.
    Example:
    select * from users
    where rownum <= (select count(*) from users)
    minus
    select * from users
    where rownum <= (select count(*) -2 from users )
    <HR></BLOCKQUOTE>
    null

  • I have upgrade to IOS 8 and all Fotos are ereased and on my Computer is only the last Backup and there a no Photos now what can i do?

    I have upgrade to IOS 8 and all Fotos are ereased on my Iphone and on my Computer is only the last Backup and there a no Photos now what can i do?

    You really need to try this on a computer, not on the iPad.
    Seeing how what is in the cloud is also on the iPad, if the content is not on the iPad, there is a good chance that the content is lost. But you can try logging into www.icloud.com in a web browser on a computer and log into your account and see if you can get into the Pages app. You may have to sign up for iCloud drive if you didn't do so already. Make SURE you that you read the blurb that will pop up in that window in iCloud for more information.

  • How to get the only the last raw of the table

    Hello All,
    While fetching a table into internal table, how to get only the last record of the table.?
    Thanks and Regards, Pradeep

    I hope following code will solve your problem.
    DATA : it_bseg TYPE TABLE OF bseg,
           x_bseg TYPE bseg,
           v_index TYPE i.
    SELECT COUNT(*)
      FROM bseg
      INTO v_index.
    SELECT *
      FROM bseg
      INTO TABLE it_bseg.
    READ TABLE it_bseg INTO x_bseg INDEX V_INDEX.
    First SELECT will give you the number of rows in a table in v_index. Second SELECT will fetch all table data and then READ will give you the last record of the table in a structure x_bseg.
    Reward points if the answer is helpful.

  • Urgent: Gif animation shows only the last frame when reloaded

    I use ImageIcon to show gif animations on screen. I want to use only non-looping gif animation files.
    Always when I show a gif animation for the first time it runs correctly through all the frames.
    However when reloading later the same gif animation only the last frame appears. I want to see all the frames of the animation, not only the last frame.
    So for the first showing of the animation this works well:
         icon = new ImageIcon("first_animation.gif");
           label = new JLabel();
           label.setIcon(icon);Then I show another animation and also it works well:
           icon2 = new ImageIcon("second_animation.gif");
           label.setIcon(icon2);Now I would like to show the first animation again but only the last frame of that first animation appears on screen:
    label.setIcon(icon);And even this alternative way to refresh does not work:
           icon = new ImageIcon("first_animation.gif");
           label.setIcon(icon);
    How can I reload the first animation again so that it shows all the frames not only the last frame???
    I have tried for ex. commands updateUI(); and setImageObserver but they don't seem to help.
    I am only a novice so...
    Please I would really appreciate your detailed advice what lines I should rewrite in my code and how?
    Thank you very much!!

    By flagging your question "urgent", you are implying that either your question is more important than other people's questions, or your time is more valuable than mine (or someone else's answering questions here). Both are not true.

  • I brought a cd and only the last 3 songs downloaded and cant download the rest without buying it again

    I brought a cd and only the last 3 song's downloaded if I download it again will I be charged again for it as it is saying the payment will come from my account

    Store>Check for Available Downloads
    If this fails:
    How to report an issue with Your iTunes Store purchase

  • Index an array of images only the last image shows

    Hi everyone,
    I try to index an array of images and all but the last element give me the error: "not an image."
    Here is a picture of the vi. The first for loop loads the images and stores them in an auto indexed tunnel. Every diagnostic I ran on this loop showed everything is fine. The second for loop should display the sequence of image stored in the auto indexed tunnel, but it does not. Instead I have the error message that elements 0 to n-1 are not images, and only the last image is displayed.
    What am I doing wrong?
    Thanks for your help.
    and the vi: 
    Solved!
    Go to Solution.
    Attachments:
    PulsedImageDisp1.vi ‏31 KB

    Speed of what? The second loop can't run until the first loop is done, and all the operations are linear. I'm guessing you're referring to the perceived speed of displaying the images one after the other so you don't have to wait for the next image to be read which is why you pre-load all the images. Otherwise, the overall speed should be the same whether you use one loop or two. Actually, to be technically accurate, the two loop version will likely be a little slower overall since LabVIEW has to allocate more memory to store all the images, while in the one loop version it is only ever dealing with one image. If the images are large then you might actually run into a memory issue with the two-loop version (arrays need contiguous memory). Just something to keep in mind and to be careful about.

  • Display only the last record per material in SAP query

    Hi,
    I have created a SAP Query using the quickviewer that is a join between 2 tables (MSEG and MKPF) that consist of material document information and date of posting.
    The results are fine however I would like only the last record per material to be displayed.
    Can anyone tell what do I need to add so for only the last record per material be displayed in the output.
    Thanks,
    Mark

    Hi Mark,
    May be if you use Control Level processing .........I think you will be able to get the result you want. Try displaying as Below,
    LOOP AT XXXXX.
    AT FIRST material.
    ENDAT.
    AT LAST material.
    *...Display what ever you want here. It will display at end of every material.
    ENDAT.
    ENDLOOP.
    Before using sort the table with key material in ascending.
    Hope what I had to say is helpful to you.
    Cheers,
    Raga Suman.

  • Function to get the last day of the current month

    Hi friends
    Now I need to know a function to get the last day of a month. I had between my notes that function but I do not find it and I think you can give the answer faster.
    Thanks
    Joel Pérez
    DBA Oracle

    I know emoticons are a bit naff but in the absence of a UBB markup to indicate humourous intent they do serve to indicate a joke. This is useful in a purely verbal domain like these forums, especially given that many participants don't have English as their first lanaguage and so often miss the wordplay.
    Cheers, APC

Maybe you are looking for

  • How do you get your top 25 plays back?

    my old laptop broke, so i got a new one, still got the old hard drive i switched all the music off that way to the new one but is there anyway to get your top 25 playlist back, i got the playlist but i mean like how many times my old songs were playe

  • Eclipselink producing incorrect sql - ORA-00918: column ambiguously defined

    We have a table with many columns .A1 .A2 .A3.... .A125 .N1 .N2 .N3... .N95 and with a simple jpql join it comes up with 2 columns that are ...AS N1150 and causing an ambiguous column error ... Does any one know of a valid workround or if this is a k

  • Can't open files via

    Hi all, Hi all, I'm no longer able to open files in the ways I've always used, either: - Dragging a photo on to the icon in my Dock; or - Right click on file > Open With > Photoshop The only way I can open files now is via File > Open, which (given t

  • I need to Cancel my Refund Request form

    Hi, I need to cancel my refund request form that I just filled. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx​xxxxx Please help me.

  • Problem With Referenced Array Loading

    Hi. I'm working on the final lab for my java class at the moment, and I'm to create a program which reads a file containing transaction records, stores each record as an array element, and then prints various types of reports using the array of trans