How to populate 2 screen-fields with one [ON VALUE-REQUEST FOR input] evnt?

I have a selection screen with 2 text inputs - input1, input2.
For the first one I have an "AT SELECTION-SCREEN ON VALUE-REQUEST FOR input1" event.
I successfully get a value there and that is set to the screen field. But I also want input2 to be automatically populated with a value corresponding to the selected input1 (eg. input1=ID, input2=Name).
I'm able to set input2 ABAP variable but not the screen-element.
(I guess that ON VALUE-REQUEST doesn't fire any events for screen fields update, because if I press ENTER after using my search-help, then input2 is set with the right value)
How to solve the problem?

Hi Ramchander,
Actually I used FM F4IF_FIELD_VALUE_REQUEST which doesn't have mapping parameters.
But after your advice I looked through F4IF_INT_TABLE_VALUES_REQUEST and found that it's
DYNP_VALUES_UPDATE FM that solves my task.
Thanks!

Similar Messages

  • How to know if implementation with a filter value exist for a BAdI in code?

    Hi all,
    Scenario:
    I created a BAdI. There will be a button on the UI to call its implementation(s); while if there is no implementation with specified filter value, this button needs to be hidden. Thus I need to know if the implementation exist before calling it.
    Question:
    In the ABAP code, how to get whether implementation with specified filter value exists for a BAdI?
    If it's possible, please help provide code.
    Thanks and regards,
    Said

    Problem solved:
    data: r_badi type ref to YOUR_BADI,
              badi_impl_num type i.
      get badi r_badi
        filters
          flt_name = fit_val.
      badi_impl_num = cl_badi_query=>number_of_implementations( badi = r_badi ).
      if badi_impl_num > 0.
        "there are badi implementation(s)
      endif.

  • How to populate text fields with data present in a table

    Hi,
    The page i'm building has got a select list for the primary key column and text fields corresponding to rest of the columns in the table.
    upon selecting some value from the list, the data corresponding to that row should get populated in the respective items. I don't want to add source in each item. can't i create a process or something else where this is done for each item.
    for eg there's a table with columns A(primary key) and B.
    there is a text fields on this page.
    this textfield should populate the data from the table whenever i submit the page such that teh value in B is select B from tablename where A = the selected value.
    Thanks
    Dhirendra

    So I assume page was not built using a wizard. Why on earth you would want to I dont know, but you could create an "After Header" pl/sql process to populate the relevant fields, assuming the id was know on entry to the page. If you want to select the id on the page and then populate the fields, guess you will need to use a "Text Field (always submits page when Enter pressed)" and then use an "On Submit" process to populate the items.
    If you are using an Automated Row Fetch, remember to select "Set memory Cache on Fetch" in that process.
    Hope this helps.

  • How to count ONLY fields with a specific value

    I modified the code below from the API reference to count combobox fields with a value of "MT" so I could total the number of a specific choice the form user input.
    var count = 0;
    for (var i=0; i<this.numFields; i++)
    var fname = this.getNthFieldName(i);
    if ( this.getField(fname).type == "combobox" && this.getField(fname).value == "MT" ) count++;
    this.getField("mTurb").value = count.value;
    Here's the problem: I tried to use a similar script, modified only slightly from this form, in another total field to tally a different choice made with comboboxes and the script continues to tally the first choice. An example of one of the modified versions of the script is below.
    var gcount = 0;
    for (var i=0; i<this.numFields; i++)
    var gname = this.getNthFieldName(i);
    if ( this.getField(gname).type == "combobox" && this.getField(gname).value == "MT" ) gcount++;
    this.getField("gPack").value = gcount.value;
    I suspect I'm just missing something painfully obvious to seasoned scripters, but I can't seem to figure it out and I need this script to be able to count the number of 9 different options in the comboboxes.

    OK, you can use a script like the following as the custom calculate script for the text fields that perform the counts:
    // Custom calculate script for text field
    (function () {
        // Declare and initialize variables
        var fn, s = "MT", count = 0;
        // Loop through the combo boxes
        for (var i = 1; i < 25; i++) {
            // Determine the current field name
            fn = "M" + util.printf("%02d", i));
            // See if the field value matches
            if (getField(fn).valueAsString === s) count++
        // Set this field value to the count
        event.value = count;
    Change the value of the "s" variable to match the item that you want to count. The first and last lines prevent the unnecessary creatio of global variables, which is good. It also makes it easy to transfer to a more general document-level routine, which would be event better, something like:
    // Custom calculate script for text field
    function getCBCount(s) {
        var fn, count = 0;
        // Loop through the combo boxes
        for (var i = 1; i < 25; i++) {
            // Determine the current field name
            fn = "M" + util.printf("%02d", i));
            // See if the field value matches
            if (getField(fn).valueAsString === s) count++
        // Set this field value to the count
        event.value = count;
    You would then call this function from the individual text boxes with the following custom calculate script:
    getCBCount("MT");
    and replace "MT" with the vlaue you want to count.

  • How to switch two fields with one of them OBLIGATORY

    Hi everyone,
    i have two radio button on the screen: RD_A  and RD_B, while there are two fields corresponding to them: P_A and P_B, P_A is OBLIGATORY.
    i want to implment: when i click RD_A, field P_A is enable and field p_B is disable. when i click RD_B, field P_B is enable and field P_A is disable.
    i tried using LOOP AT SCREEN ...screen-input = '0' and screen-required = '0' ....MODIFY SCREEN...statements, but it cannot work fine. when i switch from A to B, it always popup error message 'Fill in all required entry fields'.
    can anyone help me? thanks in advance!

    you can try this approach, instead of using Obligatory Addition.
    REPORT  ztest_radio.
    TABLES: sflight.
    SELECT-OPTIONS: carrid FOR sflight-carrid,
                    connid FOR sflight-connid.
    PARAMETERS: r1 RADIOBUTTON GROUP g1 USER-COMMAND abc DEFAULT 'X',
                r2 RADIOBUTTON GROUP g1.
    AT SELECTION-SCREEN OUTPUT.
      IF r1 = 'X'.
        LOOP AT SCREEN.
          IF screen-name CS 'CONNID'.
            screen-input = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ELSE.
        LOOP AT SCREEN.
          IF screen-name CS 'CARRID'.
            screen-input = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    AT SELECTION-SCREEN.
      IF sy-ucomm = 'ONLI'.   "This triggers only when you press execute button
        IF r1 = 'X'.
          IF carrid IS INITIAL.
            MESSAGE 'Enter Carrid' TYPE 'E'.
          ENDIF.
        ELSE.
          IF connid IS INITIAL.
            MESSAGE 'Enter Connid' TYPE 'E'.
          ENDIF.
        ENDIF.
      ENDIF.

  • How To BLank A Field With A Numeric Value

    I am trying to write a formula as follows:
    IF {CRD1.U_PriceOnPick} = "N" THEN
    ELSE
    {ODLN.DiscPrcnt}
    My problem is I need for the field not to display if = "N" else I will print the numeric field of {ODLN.DiscPrcnt} . I am not sure how to code a formula that will meet my objective. When I try to save the formula, I receive an error of , "A String Is Expected Here". Any help would be appreciated it.
    Thanks Jim Dyer

    Cardinal rule of CR, the result of both the IF and ELSE parts must be of the same data type.
    Try changing your formula to:
    IF {CRD1.U_PriceOnPick} = "N" THEN
    ELSE
    totext({ODLN.DiscPrcnt});

  • How can I have a checkbox that a user checks and populates a field with read only text, then if another checkbox is checked it will allow user text input

    Hi
    How can I have a check box that a user checks and populates a field with read only text, then if another check box is checked it will allow user text input into that same field, her is my javascript
    var a ="Not Applicable"
    if (this.getField("Do").value == "Yes")
    a=""
    if (this.getField("DoNot").value =="Yes")
    a=a + ""
    event.value=a
    say if the "Do" cb is checked, Not Applicable would populate the text field, and if the "DoNot" cb is checked it would allow user input into the same text field, the javascript I have will not allow user input,
    thanks for any help I am new to javascript

    Are these fields mutually exclusive?

  • Hello guys!! I have a problem! My old mac book today when I am switch one appears and after seconds white screen continue with one interrogation mark?? Someone Knows whats happen?? How can I solve this trobleshooting?? Sorry, my english is poor!!

    Hello guys!! I have a problem with my old mac book. Today when I am switch on one white screen appears and after seconds this white screen continue with one interrogation mark!! Someone knows whats happen?? It does not starts !! I have a feel of work inside and I am afraid!! someone may help me??

    your English was quite good enough to tell us that you saw this
    Niel has advised you well.
    If you have a more complicated problem, you can write in your language. Most all of us can translate with Google very easily... see
    Español
    Si usted tiene un problema más complicado, se puede escribir en su idioma. La mayoría de todos nosotros puede traducir con Google muy fácilmente ... ver
    Português
    Se você tem um problema mais complicado, você pode escrever no seu idioma. A maioria de todos nós pode traduzir com Google com muita facilidade ... ver
    buenos tardes
    ÇÇÇ

  • How to populate the field Discount Percent (DIS) in the outbound S1ORDEXC?

    Hello all,
    I am working with the Spec2000 to send out the IDOC S1ORDEXC.
    Does anyone know how to populate the field Discount Percent (DIS)?
    This field length of Discount Percent is 2 characters, but our customer discount in the Princing Conditions (Sales Order) is longer than 2 characters (ex:  7.500-%)
    Thank you

    Hello Thuan
    I guess you are working with IS- ADEC and SPEC 2000. I am not an expert on this but leave you some hints from OSS notes I came across.
    It appears like Discount Percent - DIS and Procurement Discount Percent -PDP are complementary and mutually exclusive. If one exists, the other need not.
    Looks like DIS is computed as (100-PDP)/100 and it is just a 2- integer data (as in 20 Percent). It is a kind of multiplier (Factor), example if  PDP discount is 10 percent, then DIS (Factor) is 0.9 and so  final (net) price after discount = Price*0.9.
    " If the discount comes in the S1BOOKED inbound into SD in the field DIS, then the discount has to be sent back in the DIS field .. if it came in the PDP field then it has to be sent back in the PDP field. If there was no discount in the incoming IDoc, then the discount has to be filled in the PDP if there was a change in the discount".
    KDATE in SPEC 2000 file maps to DIS and KPERC to PDP.
    PDP has 4 characters and per OSS note 440380, the point is ignored meaning you can work with 1225 instead of 12.25.
    So may be you can work with PDP?
    OSS notes: Apply to older releases but may still be applicable conceptually speaking.
    456153 - S1ORDEXC does not send out Discount
    440380 - PDP has only 4 characters in the SPEC IDoc instead of 5
    596042 - Discount percent DIS not considered e processing S1ORDEXC
    698668 - Incorrect calculation of unit price for PO item by S1ORDEXC
    Let me know you final findings.

  • How to populate this fields in ce_bank_accounts?

    Hey there, first, i want to apologize for my bad english.
    i'm working with Cash management and i'm using this API ce_bank_pub because the bank are internals. i have the load from banks and branch, and kinda the bank accounts, but i can´t find how to populate this fields, that are mandatory for my requeriment:
    AUTORECON_AP_MATCHING_ORDER
    AUTORECON_AR_MATCHING_ORDER  
    RECON_ENABLE_OI_FLAG
    RECON_OI_FLOAT_STATUS
    RECON_OI_CLEARED_STATUS
    RECON_OI_MATCHING_CODE
    AUTORECON_AP_MATCHING_ORDER2
    this is my "flow of work", first, i load the data with SQL*Loader in a custom/personal table, after this, i have a cursor that select all the records of this table and do some validations, after this (and if all the records are ok) i use the API ce_bank_pub.
    i don't know if that API support those fields, I've read the documentation but can not find what I require.
    any help will be appreciate.
    thanks a lot.
    [SPANISH]
    Estoy trabajando con una carga de bancos, sucursales, cuentas bancarias y usos de cuentas, hasta ahorita todo bien, solo tengo problemas al poblar los campos que se muestran en la parte de arriba en la tabla ce_bank_accounts, estoy utilizando el API ce_bank_pub ya que los bancos son internos.
    mi procedimiento, o la manera que lo hago es ésta:
    cargo los datos con SQL*Loader a una tabla intermedia/temporal por decirlo así, posteriormente un cursor selecciona los datos para realizar las validaciones y las reglas de negocio y si los datos son correctos utilizo el API, eso es en general para las 4 cosas, pero los campos de arriba no se como cargarlo, modificarlos o si hay alguna otra manera para agregarselos.
    cualquier ayuda es apreciada.
    Muchas gracias.

    Hi Miguel,
    hope this helps ...
    AUTORECON_AP_MATCHING_ORDER - Order of matching statement lines to AP transactions, by transactions first or by batch first, lookup type BATCH_OR_TRX
    AUTORECON_AR_MATCHING_ORDER - Order of matching statement lines to AR transactions, by transactions first or by batch first, lookup type BATCH_OR_TRX
    AUTORECON_AP_MATCHING_ORDER2 - Order of matching statement lines to AP transactions, by transactions first or by batch first, lookup type BATCH_OR_TRX_OR_GROUP
    For all the above three fields, navigate to Lookups from Cash Management responsibility and find the lookup type BATCH_OR_TRX, this will have 3 values, B for Batch, G for Group and T for Transaction ..... pass any one of the three value as per your requirement ..
    RECON_OI_MATCHING_CODE - Open interface transactions matching code, T for matching by transaction number, D for matching by date and amount. Lookup type: OI_MATCHING_CRITERIA
    For the above field, navigate to Lookups from Cash Management responsibility and find the lookup type OI_MATCHING_CRITERIA, this will have 2 values D for Date and Amount, T for Transaction Number .... Pass any one of the two values as per your requirement ...
    RECON_ENABLE_OI_FLAG -  Flag to indicate whether to allow reconciliation of statement lines to open interface transactions, Y or N
    As per your requirement indicate Y or N ....
    RECON_OI_FLOAT_STATUS - Code to specify the float status for open interface transactions
    RECON_OI_CLEARED_STATUS  - Code to specify cleared status for open interface transactions
    I am not sure about the above two ...i.e. the values that needs to be passed ...
    Regards,
    Ivruksha

  • How to create value request for screen field text box tt1

    How to create value request for screen field text box tt1
    i have a text box name tt1,
    i want f4 help for that .
    remember i am asking for screen i.e done from screen layout not selectio-screen.
    Thank you,
    Regards,
    Jagrut Bharatkumar Shukla,

    Hi,
    Create one Search Help in the SE11 for the particular Field that u want to display. In the Screen(Transaction SE51),For that Text Box in the Attributes,in Dict Tab ->Search Help Field give that Search Help Name.
    For Eg,
    If u want Purchase Order Numbers in that F4 Help.Create one <b>Search Help</b> by giving Table Name as <b>EKKO</b> & <b>Search Help Parameter</b> as <b>EBELN</b> with Lpos & Rpos as 0 & 1.Save & Activate it.
    Give this Search Help Name in Dict Tab ->Search Help Field of that Screen Attributes.
    Regards,
    Padmam.

  • How to populate a page with images in across/down direction?

    Hi,
    Does anyone know how to populate a page with images in across and down direction (for example 6 X 6 )? It seems that I cannot use data table because records are only running downward and each row can have one record.
    Any suggestion would be appreciated. thanks.

    Alex,
    You can create your own tabular form using APEX_ITEM API's
    Create report and you can put similar code to following
    SELECT APEX_ITEM.TEXT(1,col1) pk1, APEX_ITEM.TEXT(2,col2) pk2 FROM your_tableSo data will be displayed in TEXT boxes as if it's a tabular form. Now you need to handle INSERT/UPDATE/DELETE processes manually. You can easily handle INSERT and DELETE. But handling UPDATE can be a nightmare. What if user has updated both the column values?
    Updated details
    One way out would be to use ROWID as Primary key to handle DELETE and UPDATE
    SELECT APEX_ITEM.CHECKBOX(1,ROWID) tick, APEX_ITEM.TEXT(2,col1) pk1, APEX_ITEM.TEXT(3,col2) pk2 FROM your_tablebut yet I suggest to go for proper primary key..
    Regards,
    Hari
    Edited by: Hari_639 on Dec 3, 2009 6:52 PM

  • How to create a field with  1200 chars length

    Hi,
    Will anybody let me know how to create a field with length 1200 in a table.
    Regards,
    Madhavi

    Hi Madhvi,
    Other thing what you can do is
    1. First create a Table type.
         Goto SE11-> Dataelements ->Table type
         There on the next screen select Predefine radio button & there provide data type & size.
    2. Create a structure having a field typa of Table type created before. say that field is quant.
    Now in your program refer that structure to create an internal table & work area.
    Now if u append ur text to the field quant.
    try creating line type of size more that 255 if it works then fine other wise reduce it.
    Note:: This will be a deep structure.
    so first append value to the field quant,  the at the end of first record append valu to ur internal table.
    thanks
    Satyam

  • How to delete all mails with one klick?

    It's annoying to delete every single mail.
    How to delete all mails with one klick, like in the paperbasket?
    Thanks

    If the emails have been previously deleted (I.e. in the trash folder), tap Edit at the top of the list. You should see a delete all button at the bottom. If the messages are in a standard folder, they need to be handled one at a time.

  • How to sync two IPhone with one PC , but with different applications

    How to sync two IPhone with one PC , but with different applications ?
    We have two IPhones , but one PC , we want to sync separately , is that possible ?

    Absolutely, connect each phone, select what content you want on each phone, then hit the sync button. iTunes will keep everything straight, by device, upon subsequent syncs, including separate backups.

Maybe you are looking for