How to capture the user change in an input field on a selection screen?

I am coding a selection screen in which there are two input fields. The first field takes a Unix directory from the user input. Based on the input value, the second field will be populated with a the name of a file under the corresponding directory.
My question is how I can make the program capture the user input without having to make the user press ENTER after they enter the value in the first field?
Any help will be greatly appreciated.

Venkat,
Actually you led me to the real solution! It's the function module DYNP_VALUES_READ that does the trick for me. This function enables the program to capture dynamic user changes without recourse to PAI. Please refer to the code below:
REPORT   zreiabsintf MESSAGE-ID zreiabsintfmc.
*<HGDC------------------------------------------------------------------
*  Selection screen for the conversion program
*HGDC>------------------------------------------------------------------
SELECTION-SCREEN BEGIN OF BLOCK input WITH FRAME TITLE text-001.
PARAMETERS: p_indir   LIKE epsf-epsdirnam OBLIGATORY,                   " Inbound file directory
            p_infile  LIKE epsf-epsfilnam DEFAULT gc_infile OBLIGATORY, " Inbound file name
SELECTION-SCREEN END OF BLOCK input.
*<HGDC------------------------------------------------------------------
*   Displays a file-open dialog when the user clicks the search
*   help button next to the inbound file text field. The user
*   can select the inbound file visually.
*HGDC>------------------------------------------------------------------
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_infile.
* Capture any user change to the directory.
  PERFORM check_dir_change.
* Display the file open dialog
  PERFORM file_open_dialog CHANGING p_infile.
*<HGDC------------------------------------------------------------------
* Global constants
*HGDC>------------------------------------------------------------------
CONSTANTS:
    gc_indir  LIKE epsf-epsdirnam
              VALUE '/interfaces/<SID>/inbound/',      " Default inbound directory template
    gc_infile LIKE epsf-epsfilnam VALUE 'input'.       " Default inbound file name
*<HGDC------------------------------------------------------------------
* Global data
*HGDC>------------------------------------------------------------------
DATA:
    gs_dynpfields   TYPE dynpread,                        " Fields of the current screen
     gt_dynpfields   LIKE STANDARD TABLE OF gs_dynpfields. " Table of the screen fields
*&      Form  file_open_dialog
*       Opens a dialog window for the user to choose a file in
*       the specified Unix directory.
*      <--P_FILE is the file to be selected.
FORM file_open_dialog  CHANGING p_file.
* Validate the directory.
  OPEN DATASET p_indir FOR INPUT IN BINARY MODE.
  IF sy-subrc NE 0.
    MESSAGE i001(zreiabsintfmc) WITH p_indir.    " Unable to open the given directory
    EXIT.
  ENDIF.
  CLOSE DATASET p_indir.
* Call the dialog window to open a file in the directory.
  CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
    EXPORTING
      directory        = p_indir
    IMPORTING
      serverfile       = p_file
    EXCEPTIONS
      canceled_by_user = 1
      OTHERS           = 2.
  IF sy-subrc NE 0.
    MESSAGE i002(zreiabsintfmc).                 " Failed to open the file.
    EXIT.
  ENDIF.
ENDFORM.                    " file_open_dialog
*&      Form  check_dir_change
*       text
*  -->  p1        text
*  <--  p2        text
FORM check_dir_change .
  CLEAR gs_dynpfields.
  CLEAR gt_dynpfields.
  gs_dynpfields-fieldname = 'P_INDIR'.
  gs_dynpfields-fieldvalue = p_indir.
  APPEND gs_dynpfields TO gt_dynpfields.
  CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
      dyname               = sy-repid
      dynumb               = sy-dynnr
    TABLES
      dynpfields           = gt_dynpfields
    EXCEPTIONS
      invalid_abapworkarea = 1
      invalid_dynprofield  = 2
      invalid_dynproname   = 3
      invalid_dynpronummer = 4
      invalid_request      = 5
      no_fielddescription  = 6
      invalid_parameter    = 7
      undefind_error       = 8
      double_conversion    = 9
      stepl_not_found      = 10
      OTHERS               = 11.
  IF sy-subrc  NE 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  READ TABLE gt_dynpfields INTO gs_dynpfields INDEX 1.
  p_indir = gs_dynpfields-fieldvalue.
ENDFORM.                    " check_dir_change
Thanks for all your answers! The problem is now solved.
Edited by: Ning Hu on Apr 9, 2008 11:32 AM
Edited by: Ning Hu on Apr 9, 2008 11:34 AM

Similar Messages

  • Question on how to Hide the User Name, Password, and Domain fields in the MDT Wizard

    MDT 2012 U1
    Deploying Windows 7 via Offline Media (ISO) to MS Virtual PC's
    I am looking on how to Hide the User Name, Password, and Domain fields which are prepopulated in the MDT wizard via the CS.ini (Not so concerned about the Domain field as I am User Name and Password)
    We do need the Computer Name and OU fields to be seen, so skipping the wizard is not a option
    The client just does not want these fields to be seen by the end users, they dont want them to even know the account name used for adding the machine to the domain, of course the password is not displayed but it must not be displayed either.
    But since we use the fields they must still  be fuctional just not seen.
    Thanks.....
    If this post is helpful please click "Mark for answer", thanks! Kind regards

    You shouldn't have to edit DeployWiz_Definition_ENU.xml. You should only need to add "SkipAdminPassword=YES" to the CS.ini file and your authentication information.
    Example:
    [Settings]
    Priority=Default
    Properties=MyCustomProperty
    [Default]
    OSInstall=Y
    SkipCapture=NO
    SkipAdminPassword=YES
    UserID=<MyUserID>
    UserPassword=<MyPassword>
    UserDomain=<MyDomain.com>
    SkipProductKey=NO
    SkipComputerBackup=YES
    SkipBitLocker=NO
    -Nick O.
    Nick,
    SkipAdminPassword=YES is for:
    You can skip the Administrator Password wizard page by using this property in the
    customsettings.ini.
    I am hidding the Username/Password/and domain field in the computer name Wizard pane which is read from the cs.iniDomainAdmin=xxxxx
    DomainAdminPassword=xxxxx
    DomainAdminDomain=xxxxxx
    JoinDomain=xxxxxx
    If this post is helpful please click "Mark for answer", thanks! Kind regards

  • How to capture the user who has logged into the portal.

    Hi,
    How do I capture the user who has logged into the portal.
    HOw do I retrieve the first name and last name of the logged in username.
    Could someone provide me a related link or PDF to work on this.
    Thanks,
    Suvarna

    Hi suvarna,
    Check the following code
    ISearchResult rst = UMFactory.getUserFactory().getUniqueIDs();
                      IUserFactory usf = UMFactory.getUserFactory();
                      IUser iuser = null;
                      IUserListElement userElement = null;
                      int i = 0;
                      while (rst.hasNext()) {
                            iuser =
                                  UMFactory.getUserFactory().getUser(rst.next().toString());
                            String email = iuser.getEmail();
                            String fname = iuser.getFirstName();
                            String lname = iuser.getLastName();
    regards
    Anil Dichpally

  • How to capture the user name who is running concurrent program

    Hi Everyone
    In oracle apps when i want to store the user name who is running a concurrent program in specific responsibility.
    For that I created a table as USER_INFO which has a column called USERNAME.
    T o capture the user name i created a before report trigger and wrote the following code which will store the username into USER_INFO
    function insert_trg return boolean is
    begin
      insert into USER_INFO(USERNAME) values
    (select fnd_profile.value('USERNAME') from dual);
    COMMIT;
      return (TRUE);
    end;In the above code i used fnd_profile.value('USERNAME') to store the username but after running the concurrent program when i am query the table it returns no rows .
    It means the fnd_profile.value('USERNAME') is not storing the value.
    Please tell me what to do?
    Regards
    Sabyasachi

    In order to fetch any FND_PROFILE or FND_GLOBAL values you need to initialize apps
    fnd_global.apps_initialize(user, resp_id,resp_application_id)
    begin
    fnd_global.apps_initialize(0,20420,1);
    dbms_output.PUT_LINE (FND_PROFILE.VALUE('ORG_ID'));
    dbms_output.PUT_LINE (FND_PROFILE.VALUE('USER_ID'));
    dbms_output.PUT_LINE (FND_PROFILE.VALUE('USERNAME'));
    end; Check the following MOS note
    How To Set the Applications Context (FND_GLOBAL.APPS_INITIALIZE) [ID 209185.1]
    Cheers,
    ND
    Use the "helpful" or "correct" buttons to award points to replies / Mark the thread as answered, if your question is answered.

  • How to Capture the user command value instead of ucomm and pfkey from syst

    Hi,
    How to capture the value of enter key in the enhancements.
    Iam getting the sy-ucomm value as space. Please let me know the better solution ASAP.
    regards
    Nagendra

    Hello,
    If is a module pool program, take a look to the variable defined to receive the user-command (you can see this in the screen painter).
    Regards.

  • How to capture the product change on the item level in CRM GUI.

    Dear All:
    There is a line item in the sales order. Now I change the product of the line item. I want to capture the change in CRM GUI.
    PS:
    There is a reference thread, in which I know we can capture the change in WebUI with the component T115IT_SLSO.
    Can the old product be captured after I changed the product in order item?
    But I want to know how to capture the change in GUI. Anybody can help me? Thanks in advance.

    Hi,
    when you create an item in GUI tcode CRMD_ORDER, badi CRM_ORDERADM_I_BADI will be triggered.
    Method CRM_ORDERADM_I_PRODUCT_DETERM will have the Header and item guid and newly entered product in parameter IV_ORDERED_PRODUCT.
    Regards,
    Arun

  • How to capture the user activities in Project Server 2010

    Hi
    I want  to capture the user activities from Project Server 2010 like when a user has saved and published etc.
    Is there any possibility that we can get the user activities data from sql server.
    Please throw some light on the same.
    Thanks
    Geeth If you feel that the answer which i gave you is Helpful please select it as Answer/helpful.

    Hi Geetha,
    As far as I know, there is no such information stored in Project Server DB.
    You can have this kind of information by project, such as the ProjectModifiedDate in the Reporting DB (MSP_EPMProject_userView). I also know that there is a PROJ_LAST_SAVED date in the Draft DB. But be aware that querying in the Draft DB is not supported
    by MS.
    Another way would be doing some custom code, storing in a separate DB each save and publish operation per user.
    Hope this helps.
    Guillaume Rouyre - MBA, MCP, MCTS

  • How to capture the User input value to user exist function module.

    Hi,
    How can i capture user input value.Here i am using User exist in BPS variable.
    Calculating days using user exist functin module and my input is another variable i.e user defined value.
    How can i capture user defined vaule into my function module.
    This is very urgent can you help me..
    Thanks....

    Hi!
    You can get the instance using the method get_instance of the class cl_sem_variable, and call the method get_value with the return. Check the example:
          CALL METHOD cl_sem_variable=>get_instance
            EXPORTING
              i_area       = (planning area)
              i_variable   = (variable name)
            RECEIVING
              rr_variable  = lr_var
            EXCEPTIONS
              not_existing = 1
              OTHERS       = 2.
          CHECK sy-subrc IS INITIAL.
          CALL METHOD lr_var->get_value
            RECEIVING
              rto_value = et_value
            EXCEPTIONS
              error     = 1.
    After this, read the first line of the table et_value (it should be the value that the user choose on the screen).
    seeya!
    Robson

  • How to fill the dropdown list in a input field

    Hi all,
    I have three input fields, Month, Material type and material.
    My requirement is to search material based on material type.  So if i select one material type from the dropdown list, corresponding material should be populate in the material dropdown.
    Pls suggest to this requirement i have
    Regards
    Jeswin

    Hi,
    Refer Below Blog Step By Step For fill data in dropdownlist Getting Data From SAP BI Systems.
    Visual Composer :Get drop down list values  from BI InfoObject master data
    The Below Link is the For getting data from SAP ECC Systems For Both Value Help And DropDown list.
    Visual Composer: Value Help Data Service
    Go Through Above Links
    Points Are Welcome
    tahnks
    SubbaRao Chinta

  • How to decrease the gap between label and input field.. pls respnd

    hi friends,
    I am facing this problem since long time and couldnt get any solution...
    pls respnd,
    i need to decrease the gap between my input field and label.. its very much gap there..
    thanks in very advacne,
    niraja

    Hi WD ABAP,
    i am doing the same, created tcontainer, and just binded my node. i given matrix layout. But i dont know why it is coming like that.
    Also WDABAP, could you pls reply me to the other thread,
    about when im trying to read the dropdown value of subnode, the get_static_attribute or create_element method is going into my supplyfunction.
    supplyfunction - my code is to fill the dropdown. and due to this supply function triggering,
    my get_static_att or create_element is not reruting currenct row dropdown value.
    what am i doing wrong.. can u pls pls.. its kicking me. i have spent my whole weekend on this, but couldnt solve this.
    plsfnds :(((((
    Niraja

  • How to restrict the users to make sorting on Field in query analyzer(Excel)

    i want to know that is it possible to put restiction for user to make sorting for posting date or any other Field in Query analyzer(Ms Excel )  after excuting the queryy ? i want restiction on sorting option of Ms excel . pls reply me soon.

    viral
    it depend upon different companies and how they are maintianing securities in that...
    for e.g.
    after discussing iwth ur senior member u will decide to publish a new folder in ur production system...
    let say name of folder is BW Financial Accounting
    Now u will publish ur report in this folder.
    go to query designer
    hit Query in menu
    hit publish and select the BW FINANCIAL ACCOUNTING
    now u interact with Security administrator at ur firm
    he will create proper Authorization object for this Folder BW FINANCIAL ACCOUNTING
    once he/she does that then he will add this authorization object to ur user id
    this way u can test that
    u can acess that folder and query link in that folder.....
    similarly they will add the newly created authorization objects to ur specific user ids and they will then have acess to this .....
    if u want to check authorization objects currently assigned to ur user id
    enter t code /su01
    enter ur user id
    and u can see several authorization objects

  • Capturing the User Id from the Password change screen after Login

    Hi,
    I need to capture the User Id from the Password Change screen and Pass it to the Custom  Portal application that is triggered on the change password screen.That User Id will be passed on to the Portal application to retrieve the details of the User.
    I have triggered the Custom Portal application from the OnClick of CHANGE button.
    It can be probably done by appending the User Id captured from the Change Password screen to the Url of the Portal application.
    But am not clear how to capture the User ID.
    Pls help!!
    Thanks & Regards,
    Amarys.

    Hello
    Why do you want to capture user id? You can access it from portal application.

  • How to capture an address change for a sale order in user exit MV45AFZZ?

    Hi ,
    My requirement is to capture the address change in sale order .
    I have to write the code in my own z-include in MV45AFZZ of SAPMV45A.
    Here I have to use VBAP-KUNNR for PARVW = ‘AG’ or ‘WE’. And  ADDR1_DATA.
    Could you please give me idea , how to capture the address change?
    Thanks ,
    Suresh.

    Farshid,
    As I understand it it is the RCS software that replaces the $Revision$ with $Revision: 1.2$. Is that correct?
    There are two things that you need to be aware of if this is the case.
    First, the length of the text fields are saved as part of the SystemBuild model file. This means that when the revision control software replaces the tag the length is no longer correct, and SystemBuild will not be able to load the file correctly. You can still change the text as long as you make sure the the length of the tag stays the same. For example if the version number is a single digit decimal then single digit, then when you create the file you could store the revision as $Revision: x.x$. When the tag gets replaced by the revision control software you would get
    $Revision: 1.2$ which is the same length.
    Next you need to be aware of potential line breaks. When the SystemBuild model is saved as ASCII then line breaks are added at regular intervals, so the tag might be broken up on two lines. This could prevent the revision control software from recognizing the tag. To prevent this save the file as binary.
    In short make sure that the text the revision control software adds is the same length as the text that it replaced and save the files as binary files.
    Carl L
    National Instruments
    www.ni.com/matrixx

  • Capturing the user

    I have a 'n' users with write back privileges. for those users they have the privileges to edit a column. Now i need how to capture the user information & last updated or modified the column.
    Can anyone let me know in detail.
    Thanks

    Hi mma,
    i was not clear the first posted by you. instead of reply to that post i posted a new one.
    I came to know with the usage of Variables we can capture the user. But i dont know how to use the variable.
    Thanks

  • How to capture the changes in ppoma_crm transaction

    Hello All,
    We have a requirement that if we add either a BP or an User to a positon in ppoma_crm transaction then we should be able to update these entries in our z table.
    If it is a BP then we should look for the User mapped to it and update the z table else we should directly update the z tables with user name.
    But we are facing an issue in capturing the values that have been updated.
    Can anyone tell me how to capture the new values in the BADI for the ppoma_crm transaction ?
    Regards
    Sohit

    Did any guys here face the requirement? If replicating all the columns some of which may change frequently but are not important to the other sites, then i wouldn't replicate these changes in order to improve the performance. Thanks for your help!

Maybe you are looking for

  • How do i transfer files from external hd to new hd in macbook pro

    Hi Totally new to upgrading Mac.  I Backed up my hd to a an external hd. Upgraded my hd to 1tb. How do I make the transfer? The new hd does show in disk utility. Do I have to format this hd? Really not sure what to do next. Thanks

  • Fix a few "lost" master files from accidental hard disk disconnect?

    By gross stupidity, I disconnected the firewire cable to my external hard disk on which reside all my masters in the middle of a 'relocate masters' execution. I normally load new images into the aperture library, cull and edit them, and then relocate

  • 24pA - Captured timecode and DV Start/Stop

    Hello - I've got what I hope will be an easy one - though I haven't found the answers lurking around here. I'm capturing footage shot on my DVX-100A in 24p Advanced mode. I'm capturing it from my DSR-11 deck using the Advanced Pulldown Removal in FCP

  • PowerPivot Configuration Tool

    I have 3 SharePoint SP1 Servers installed on Hyper-V 2012.  Each host have Windows 2012 R2 I am trying to run SharePoint Configuration on my farm server and each time, it gives me an error occurred while configuring the server. I rebooted the servers

  • Final Cut 7 Audio playback problems

    All of a sudden I can't hear my music play.  I can see the music in the audio tool, so I know it's there, but I can't hear it in the source window or the timeline.  I also can not hear tracks A9 and below.