Automatic filling of field in sel screen where match code obj is used

Dear all.
Suppose you have a selection screen with two fields:
pa_usid  and  pa_name,
both fields are obligatory.
The user wants - as soon as field pa_usid is filled  from the list opened through the matchcode obj,
default value  gets filled in  pa_name(based on the value he actually filled in
pa_usid).
How can i do that this.
Below is my code ;
parameters: pa_usid LIKE gs_leave-userid  MATCHCODE OBJECT zname_lp2 OBLIGATORY DEFAULT sy-uname,,
                    pa_name LIKE gs_leave-name   OBLIGATORY,
Thank you all very much in advance.

Please go through below links
How to fill another parameter automatically on selection screen?
http://www.sap-img.com/abap/value-request-for-parameter.htm

Similar Messages

  • Automatically fill in field based on data from table rows

    hello,
    Users in our organization currently have to complete a number of different forms when an accident occurs. I am creating a .pdf that combines these fomrs into one, with the first portion being a data input section where the user inputs the data and then this populates other sections (pages of the form) that can later be saved and printed.
    The data input section contains subforms with tables. The tables have a row that has "add new item" and "delete this item" buttons.  The rows have dropdown list fields.
    I would like to create a field that will be automatically filled in with the values from the dropdown lists, including the values from the new rows that are added using the 'add new item' button.
    Any assistance in this regard would be most appreciated.  This is my first time on a forum, so I apologize if I have not been clear.
    Thank you.

    This is pretty complicated. You'll have to use scripting for this and I'll tell you how I'd approach this with JavaScript.
    First of all you need to decide at what point you want to populate this field with the drop down selections. I think you have two options.
    Option 1 - Automatically calculate this field each time a user makes a drop-down selection. It's possible that a user will enter data and then change a drop down value so you'll have to account for this.
    Option 2 - Create an update button that users click to calculate this field. There is still a risk that users will change the value in the drop down after clicking update, so you would want to use scripting to lock those fields (e.g. make them protected) when the update button is clicked. You could then change the caption of this same button or have a second button that when clicked would unlock those drop down fields.
    The other thing you need to do is figure out how to calculate this field. It seems to me you would probably build a string together that mixes text with the drop-down values. So your JavaScript would look something like this:
    calculatedField.rawValue = "The accident occurred on " + table.row1.date.rawValue + ". It was witnessed by " + table.row1.witness1.rawValue +
                                                      " and " + table.row1.witness2.rawValue + ".";
    When you're in the LC Designer JavaScript editor, hold control for the relative path to those fields and control + shift for the absolute path and then click on the fields whose values you want to access.
    I hope this points you in the right direction!

  • Automatically fill in field from first letter of another field

    Hi,
    I have a situation where i would like to fill in a field automatically, dependant on the first letter entered in another field.
    Here's some examples:
    1. Field one - A6805B  Field two - 'UHF' (As A = UHF)
    2. Field one - E1234C  Feild two - 'VHF' (As E = VHF)
    3. Field one - S5673D  Field two - 'Error - No Frequency' (As S doesn't have an equivalent)
    Can anyone help?
    Cheers
    Rob

    Hi Rob,
    You can do this by assigning the first letter to a variable and then testing that variable.
    A sample is here: https://acrobat.com/#d=OoLUPLu1Qy1*8Uxz7*hG6Q
    Hope that helps,
    Niall

  • LIS: How to put an additional selection-field into sel-screen

    Hi LIS-Gurus,
    I have a self-defined information structure with a method for list enhancement. In this method I want to calculate values. So far so good.
    The problem is: for the calculation I need a date. The user should be able to enter this date in the selection-screen of the standard-analysis (MCSI).
    Is there any chance to define a parameter or select-option, that can be readout in the method? The field should only be used to allow the user to enter a date. There must be now selection in any kind for that field...
    Thanks in advance for your hints!
    Nicole

    please modify the layout of screen 1s00 of programm SAPMF05A in SE80 accordingly.
    Regards,
    Attila

  • Automatically fill input fields based on selection from dynamic drop down

    Hi All,
    I tried to search before posting, but i cannot find appropriate thread (maybe wrong keyword).
    My scenario:
    1. In my offline interactive form, I have:
        a.  Material Number --> drop down field with "Allow Custom Text Entry" ticked
        b.  1 execution button to call web service
        c.  Material Group - Input Field (Read Only)
    2. User will enter material number with wild card character (eg: ABC*).
        User will then click the execution button.
        Web Service in result will return all materials that match the entered material number.
        Dynamic binding will do the magic to generate the drop down list.
    3. Beside material number, web service will also return material description and material group.
        Below is the illustration:
         Material        Description       Material Group
         ABC              Material ABC               GRP01
         ABCDE        Material ABCDE          GRP02
    --- so far so good ---
    My requirement:
    Every time user select material from the drop down list, i want to auto-populate field "Material Group" (which value is also returned by web service).
    I know i need to put the script on event change of the drop down field.
    But i don't know how to read internal table returned by web service.
    Hope someone can enlighten me.
    Thanks in Advance !!!

    Solved after reading:
    1. /people/juergen.hauser2/blog/2007/09/03/accessing-data-nodes-in-sap-interactive-forms
    2. Chapter 7 of Live Cycle Designer Scripting Basics
    (http://help.adobe.com/en_US/livecycle/9.0/LiveCycle_Designer_Scripting_Basics.pdf)
    Thanks.

  • How to have a field automatically fill in another field when checked

    Does anyone know if there is a way to have a field automatically fill in another field with a specific dollar amount when a field is checked.
    I am doing a registration sheet for a charity event where we have to pay for each person that attends. I would like it set up so that when someone checks in the person at the registration table would just click the check box (E2) and then have it fill in the field next to it a dollar amount of $15.00 (F2) which would be owed to the place hosting the event.
    Attached is a picture of the spreadsheet: example: persons checks off E2 and the amount $15.00 would automatically fill in field F2. I would then do this for each line and have the F column total the amount owed to the place.
    I am VERY new to numbers and writing formulas so if you can be specfic with how to do the code would be greatly appreciated. THANK YOU!

    please remember to post the actual solution (equation in this case) so others that are searching for similar items see the solution, not just
    Got it, replaced 0 with '''.
    Thanks
    Jason

  • How to attach search help in a particular field in se80 screen

    Hi All,
    Can any one tell me how to attach a search help in a particular field in a screen.
    Wat search help is used to display material no and description
    Thanks in Advance
    Regards,
    Priya

    Hi Priya,
    In the Screen Layout, Double click on the field on which you wish to attach the search help.
    In the properties window you can specify the search help for that field.
    Search help for Material No. is MAT1.
    You can find it in the Table structure (SE11) , "Entry help/check" tab.
    Regards,
    Himanshu

  • To create apple US account i followed all the steps including none in the payment option. i dont have US address how should i fill the fields.

    to create apple US account i followed all the steps including none in the payment option. i dont have US address how should i fill the fields.

    You need to be in a country to use its store - if you are not in the US with a US billing address then you cannot use the US store.
    From the US store's terms of use :
    The iTunes Service is available to you only in the United States, its territories, and possessions. You agree not to use or attempt to use the iTunes Service from outside these locations. Apple may use technologies to verify your compliance.

  • Query regarding F4 help on a field in Selection Screen.

    Hi all,
    I am trying to attach a F4 help on a field in Selection Screen.
    The code fragment I wrote for this purpose is:
      AT SELECTION-SCREEN ON VALUE-REQUEST FOR m_cbu.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
      EXPORTING
      DDIC_STRUCTURE         = ' '
        retfield               = 'CBU_MANAGER'
      PVALKEY                = ' '
       DYNPPROG               = sy-cprog
       DYNPNR                 = sy-dynnr
       DYNPROFIELD            = 'M_CBU'
      STEPL                  = 0
      WINDOW_TITLE           =
      VALUE                  = ' '
       VALUE_ORG              = 'S'
      MULTIPLE_CHOICE        = ' '
       DISPLAY                = 'F'
      CALLBACK_PROGRAM       = ' '
      CALLBACK_FORM          = ' '
      MARK_TAB               =
    IMPORTING
      USER_RESET             =
      tables
        value_tab              = tb_cbu_m
      FIELD_TAB              =
        RETURN_TAB             = t_return
      DYNPFLD_MAPPING        =
    EXCEPTIONS
      PARAMETER_ERROR        = 1
      NO_VALUES_FOUND        = 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.
    Still, I am unable to get any F4 help?
    Please point out the mistake..
    Thanks in advance.

    Hi Thien,
    My entire code is as follows-
    TYPES:
          BEGIN OF cbu_m,
          cbu_manager TYPE uname,
          END OF cbu_m.
    DATA:
    tb_cbu_m            TYPE TABLE OF cbu_m,
    wa_cbu_m             TYPE cbu_m.
    wa_cbu_m-cbu_manager = '123'.
      APPEND wa_cbu_m TO tb_cbu_m.
      wa_cbu_m-cbu_manager = '234'.
      APPEND wa_cbu_m TO tb_cbu_m.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR m_cbu.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
      DDIC_STRUCTURE         = ' '
          retfield               = 'CBU_MANAGER'
      PVALKEY                = ' '
         dynpprog               = sy-repid
         dynpnr                 = sy-dynnr
         dynprofield            = 'M_CBU'
      STEPL                  = 0
       WINDOW_TITLE           = 'ABC'
      VALUE                  = ' '
         value_org              = 'S'
      MULTIPLE_CHOICE        = ' '
        display                = 'F'
      CALLBACK_PROGRAM       = ' '
      CALLBACK_FORM          = ' '
      MARK_TAB               =
    IMPORTING
      USER_RESET             =
        TABLES
          value_tab              = tb_cbu_m
      FIELD_TAB              =
         return_tab             = t_return
      DYNPFLD_MAPPING        =
    EXCEPTIONS
       parameter_error        = 1
       no_values_found        = 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.
    Here I am getting the same message "No Values Found"..
    Please point out the mistake in my code.

  • Adding the field in selection screen

    Hi Guru's,
    how can i add the field in selection screen of t code qa33.
    can any one help me pls.
    Thanks & Best Regards,
    Rakhi.

    You can enhance the standard program RQEEAL10 using implicit enhancement points.
    Click the spiral (Enhance) button (Shift + F4)
    Go to Edit -> Enhancement operations -> Show Implicit Enhancement Poitns
    Create an Enhancement Implementation and include your code there.
    See the following link -> Source Code Enhancements - Part 5 of the Series on the New Enhancement Framework
    Hope it helps
    Neeraj

  • Field References, Field Selection Group & Screen Sequence

    Dear Experts,
      Please whare are the importance of field References,  Field Selection group  & Screen Sequence? How do i use them?

    Hi,
    These are Object based (Like Material master, BOM, Routing etc..), so depending on how you want the screen layout and how you want the mandatory/optional field defination you can define it here.
    Regards,
    Prasobh

  • The screen where you type in a code to log onto Yahoo games no longer displays fully, so I can't see all of the characters.

    Before you can play Yahoo games, you must type in a 4 letter/number code. Suddenly (a few days ago) only about 1/3 of the right-hand side of the screen, where the code appears, is visible and I can't enlarge the screen to see it. So I'm unable to log on to Yahoo games. I haven't done anything different that I'm aware of. Is anyone else having this problem?

    mouse over to the bottom right of the screen, click/hold ad drag to the right.. you will see the rest of the characters and be able to enter them. BTW... Which Yahoo game?

  • CUP - custom field and match code

    Hi,
    is it possible to have a custom field in CUP with a match code to help searching ?
    the only two way that i found are dropdown lists for a table from a backend system and free field ( varchar, date, numeric)
    thanks
    Regards
    Aurelien

    Hi Aurelien,
    You can create custom fields in CUP for the following types.
    1  Text type
    2 Numeric type
    3 Date type
    4 Drop down
       a) drop down data define in CUP
       b) Drop down data coming from backend table.
    If you want a request to be associated with a match code that helps you seaching the request later.
    Than create an text type custom field and use in a workflow.
    While a creating the request define the value of custom field.
    Now you can serch request on the basis of the value define in the custom field.
    Kind Regards,
    Srinivasan

  • Call transaction skip first screen and fill a field

    Hi,
    I have got a requirement where need to call transaction VA01 by filling the fields on the first screen like order type, sales area using set parameter IDs and need to skip first screen. There is additional requirement apart from this where I need to fill the field 'Proforma' with some value 'X' in the header 'Additional data A' while calling transaction VA01.
    Is there any shortway to do this without using BDCdata?
    Thanks
    SD

    Hi,
    I had this kind of requirement earlier. But in my case I need to pre populate several values and then show the screen for user input. Here is my suggestion for you. Follow below code for filling BDC DATA internal table and call transaction in "E" error mode. This should show the screen finally for user input. In this code find for "?" and replace it with your field name and field value.  Remember to check validity of screen # and names with you system.
    Thanks,
    Amara.
    Moderator message - Please respect the 5,000 character maximum when posting. Post only the relevant portions of code. Do not use code tags to format text
    Edited by: Rob Burbank on Dec 22, 2010 6:08 PM

  • Fill transaction fields automatically through code

    Hi Gurus,
    Every time we create a material we have to extend it in all plants and in all storage location of every plant.
    The steps that we are using are: We first create the material to a plant and a storage location using transaction
    MM01. Then we use transaction mm17 and we extend the materials in all plants automatically.
    Then we use transaction MMSC to extend material to every storage location. We enter the material code, the plant code and after hitting enter we fill the fields with the storage locations of the plant where we want to extend material to. We have 9 plants and 3 storage location on every plant, so we do this procedure (mmsc) 9 x 3 = 27 times.
    Is there a way to write code to fill automatically the fields in MMSC transcaction from a file so that can automate the procedure? Any Ideas how to start?
    Thank you in advance

    Hi!
    Here's an example of this stuff, 100% working, but of course you have to change the BDC part for your code...
    REFRESH: gt_bdcdata.
          PERFORM bdc_dynpro      USING 'ZMFI_AA_KTGH' '9502'.
          PERFORM bdc_field       USING 'BDC_OKCODE' '=ENTER'.
          PERFORM bdc_field       USING 'ANLZ-KOSTL' gs_change_asset-kostl.
          PERFORM bdc_field       USING 'ANLZ-ADATU' gs_change_asset-bdatu.
          PERFORM bdc_field       USING 'ANLZ-PERNR' gs_change_asset-pernr.
          PERFORM bdc_field       USING 'ANLZ-STADT' gs_change_asset-stadt.
          PERFORM bdc_field       USING 'ANLZ-XSTIL' gs_change_asset-xstil.
          PERFORM bdc_field       USING 'ANLZ-RAUMN' gs_change_asset-raumn.
          PERFORM bdc_dynpro      USING 'ZMFI_AA_KTGH' '9502'.
          PERFORM bdc_field       USING 'BDC_OKCODE' 'DUMMY_OK_CODE'.
          MOVE 'E' TO lv_mode.
          CALL TRANSACTION 'ZMFIAA_MOD' USING gt_bdcdata
                                             MODE lv_mode.
    It is very important to give a 'DUMMY_OK_CODE' where you wanted to stop the processing. It is because the dummy ok code will cause a BDC error and the process will stop there and you'll get back the control.
    Regards
    Tamá

Maybe you are looking for