How to populate dropdown without triggering PAI event ?

Hi,
I have a screen with two fields- One input field and one drop down list field which has to be populated based on the value given in the first field. 
How can I populate the drop down list dynamically based on first input field without pressing enter ( i.e with out triggering PAI event ) .  I tried using DYNP_VALUES_READ in value request event.
Please give me your suggestions .

Hhhhmm, I thought initially it should work, but I must admit I couldn't get it to work with a listbox. I just tried a simple report with selection screen, see below. Just enter something for the first parameter and then choose the value help for the second field. You will see that it will pick up the value from the first field, if we don't use a listbox.
Once you comment in the coding the LISTBOX and replace it with the normal field, you can see that the value help works as one would hope. It seems that the problem is that the values for the dropdown list get populated too early (i.e. start-up of the report). I don't have the time at the moment to check this out further, but I'm assuming others must have tried this before. Any comments?
REPORT zvaluehelp.
PARAMETERS:
  p_statva TYPE stacust-statva,
  p_status TYPE stacust-status AS LISTBOX VISIBLE LENGTH 3. " Doesn't work
*  p_status TYPE char1. " Value-help works for this
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_status.
  PERFORM value_help.
FORM value_help.
  DATA:
    dynpread TYPE dynpread,
    dynpread_tab TYPE STANDARD TABLE OF dynpread,
    stacust TYPE stacust,
    stacust_tab TYPE STANDARD TABLE OF stacust.
  dynpread-fieldname = 'P_STATVA'.
  APPEND dynpread TO dynpread_tab.
  CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
      dyname                   = sy-repid
      dynumb                   = sy-dynnr
      perform_conversion_exits = 'X'
    TABLES
      dynpfields               = dynpread_tab
    EXCEPTIONS
      OTHERS                   = 1.
  CHECK sy-subrc = 0.
  READ TABLE dynpread_tab INTO dynpread INDEX 1.
  CHECK dynpread-fieldvalue IS NOT INITIAL.
  SELECT * FROM stacust INTO TABLE stacust_tab
           WHERE statva = dynpread-fieldvalue.
  CHECK sy-subrc = 0.
  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      ddic_structure = 'STACUST'
      retfield       = 'STATUS'
      dynpprog       = sy-repid
      dynpnr         = sy-dynnr
      dynprofield    = 'P_STATUS'
      value_org      = 'S'
    TABLES
      value_tab      = stacust_tab
    EXCEPTIONS
      OTHERS         = 0.
ENDFORM.
The coding above was just intended as a quick test - so I know it's not proper (i.e. check of return codes, etc.).
Cheers, harald

Similar Messages

  • How create mail alert without triggering the event.

    1.     SR 3-4924626351: How create mail alert without triggering the event.
    We wanted to send alert mail every 10 days or 15 days or 1 month to a reporting manager of Opportunity Owner with details of that Opportunity. I don’t want to use any triggering of event like the Following. When new opportunity is created When modified Opportunity is saved etc.

    Raju,
    If you don't want to use the triggering event, you will have to do this manually.
    Manually:
    - Create a Web Link on the SR with and embed the mailto: function with the receivers email and subject and body embedded in the url (you can find this link on Google)
    - When this link is clicked, an email window will open with all the details you provide, and you can click the send button to send the email.
    - You will have to do this manually every 10-15 days or whatever is the duration
    Auto:
    - Create a time based workflow on a new Opportunity Created event
    - create a action to send an email notification to the concerned person (details in the workflow properties)
    - This workflow will auto send an email every 10-15 days to the opportunity Manager.
    The time based workflow is the best option I see. Do you see any issue/ concerns with auto generated emails?
    Hope this helps!
    Royston

  • How do I the Force F8 / PAI event to execute

    Hi,
    I have a screen that I enter a criteria on; next it brings up another screen with a table grid.  I select from the list the items that I am interested in then I hit the F8 key (execute) to bring up the selected data on another screen.
    If the table grid only has one record, I want to selected the one record and hit the F8 key via code instead of having the user have to do it.  I think I have figured out how to get the one item selected via code (at least while I am in debug mode) but I do not know how to have the F8 executed via code so that the PAI event will trigger allowing all the rest of the necessary code to execute.
    I appreciate your help.
    Tom

    Hi All,
    Below is the final code that I used to occomplish my task.  I want to thank everyone of you for your help.  All of you triggered thought in this solution.  I had to use a memory parm id to help prevent a looping effect that I was getting when I went back to the transaction.  In addition, I reset the parm id to spaces in the 'BACK' button part of code so that I can get into the IF statement.
    MODULE check_for_single_row OUTPUT.
      CONCATENATE 'SingleRowFlag' sy-uname sy-modno INTO g_parm_single_row_flag.
      GET PARAMETER ID g_parm_single_row_flag FIELD g_single_row_flag.
      IF sy-subrc <> 0.
        MESSAGE 'Parameter not found' TYPE 'I'.
      ENDIF.
      IF g_single_row_flag = '1'.
        EXIT.
      ENDIF.
      IF g_zrt_cnt = 1.
        temp_zrt = wa_zrt.
        temp_zrt-chkbx = 'X'.
        MODIFY i_zrt
          FROM temp_zrt
          INDEX 1
          TRANSPORTING chkbx.
        SET PARAMETER ID g_parm_Single_Row_Flag FIELD '1'.
        PERFORM zcart_transaction_art.
      ENDIF.
    ENDMODULE.                 " check_for_single_row  OUTPUT
    P.S.
    I could not get this code to work but it helped get to what I have above.
    Thanks again.
    Tom
    READ TABLE i_zrt INDEX 1.
    i_zrt-chkbx = 'X'.
    MODIFY i_zrt INDEX 1 TRANSPORTING chkbx.

  • Triggering PAI event for Radio button

    Hi Experts,
      In module pool programming, I create 2 radio buttons, namely fileins and tableins, and they have been grouped. But while running, change of radio button doesn't trigger PAI event. Is there any possiblity to trigger PAI without ENTER key pressing.
    Thanks and regards,
    Venkat

    Hi
    U need to assign an ok_code to the radiobutton, in this way it'll be like a pushbutton and the pai will be triggerd as soon as it'll press it.
    Max

  • How to access screen field in pai event

    Hi All,
    I have created a custom screen it has the field say matnr selected from the dictionay.NOw  how will I should access this field in PAI event module?
    Thanks in advance
    Mahesh

    just declare the same variable in your abap editor as per your layout field name.
    suppose in your layout input field name is matnr just declare
    data : matnr like mara-matnr.
    in pai module if you are using matnr it will give you the screen data.
    like
    module pai input.
    if matnr ne '1000'.
    message 'Error matnr is not 1000' type 'E'.
    endif.
    endmodule.
    reagards
    shiba dutta

  • How to catch cursor changes without triggering an event

    Hi all,
    I have issue and I wasn't able to find my solution in Forums.
    I have a screen 1000, and on this screen I have text fields.
    One of them is matnr and when a user enters a entry in matnr field I have to catch the number so I can fill the other fields on screen. While doing that, I shouldn't trigger an event, for example pressing enter.
    User just enters matnr and and changes the cursor.
    I will be waiting for your response..

    Hi,
    I think this is not possible. Because the other fields related to a MATNR are not available in application layer ( front end). So you will fetch the details using a code running in presentation layer( back end ). So any way you have to trigger PAI.
    Thanks,
    Renjith.

  • How do get attachment without triggering flag chaging from unread to read?

    Hi all,
    In IMAP, is there anyway to get the attachment without flipping the flag from unread to read?
    here's my code:
    store = session.getStore(IMAP);
    store.connect("someHost", somePort, "someLoginName", "somePwd");
    folder = (IMAPFolder)store.getFolder(INBOX);
    folder.open(Folder.READ_WRITE);
    javax.mail.Message message = folder.getMessageByUID(someUID);          
    if (message.isMimeType("audio/wav")) {
        InputStream is = message.getInputStream();
             while (nBytesRead != -1) {
                nBytesRead = is.read(buffer); // read the attachment from stream
    ...here's the bodystructure of the email:
    comand:
    A6 FETCH 3 (BODYSTRUCTURE)
    response:
    * 3 FETCH (BODYSTRUCTURE ("AUDIO" "WAV" ("NAME" "AUDIO.WAV" "TYPE" "Unknown") NIL NIL "BASE64" 7874 NIL NIL NIL))
    command:
    A7 FETCH 3 (BODY[TEXT]<0.7874>)
    response:
    * 3 FETCH (FLAGS (\Seen VOICE) BODY[TEXT]<0> {7874}
    [binary data...]
    As you see, the server sets the message to Seen (which is read state). How do I not set the flag to Seen?
    Thanks.
    Grace

    Why not just set it back to Not Seen after you do that?

  • How to populate JComboBox on a button event

    Hello
    I am trying to populate a combobox when the user enters a text in the textfield and clicks a button. On clicking the button the program looks for matching string and if found adds it the combobox.However I cannot get it to work. Here is what my code looks like :
        private void jButton1_actionPerformed(ActionEvent e) {
        String [][] s =new String[2][3];
        s[0][0]="abh123";
        s[0][1]="abh123";
        s[0][2]="abh125";
        s[1][0]="abh125";
        s[1][1]="abh127";
        s[1][2]="abh127";
        String string = jTextField1.getText();
        for(int i=0;i<2;i++){
            for(int j=0;j<3;j++){
                if(string==s[i][j])
                jComboBox1.addItem(string);
                jComboBox1.setSelectedItem(string);
        }Thanks
    Abhishek

    I figured out the problem but could not understand the reason. Promlem is in if statement. I put in the print command to see the result
              if(s[i][j] != string){   
                System.out.println(string + "  "+ s[i][j]);
                jComboBox1.addItem(s[i][j]);
                jComboBox1.setSelectedItem(s[i][j]);
                }In this case it displays a result which is :
    abh123  abh123
    abh123  abh123
    abh123  abh125
    abh123  abh125
    abh123  abh127
    abh123  abh127but if I change the if statement to
      if(s[i][j] == string){   
                System.out.println(string + "  "+ s[i][j]);
                jComboBox1.addItem(s[i][j]);
                jComboBox1.setSelectedItem(s[i][j]);
                }It does not do anything. It just skips the if statement. Any suggestions
    Thanks
    Abhishek

  • How to Populate the Dropdown from the xml file ?

    Hi,
    According to my requirement, Drop down has to be populated in a form, on selecting an element in the first drop down list, corresponding second drop down values has to be loaded dynamically.
    I am using the ReferenceData file, which consists of the Dropdown list values in the form of Key,Value pair. I can able to populate one drop down,but I don't know how to populate the second dropdown dynamically.
    can any one please help me to finish this task.

    Thanxs john.
    My requirement is onChange of a value from the first drop down, particular values needs to load in the second drop down. Values that needs to pull are designed in XML Object as Map entries Key,Pair Values.
    I already did all the things, what you have told.But,I don't know How to populate the second drop down, and where to write the condition.
    If u don't mind can u send me the sample code to check the condition.

  • HOW CAN INVITE PEOPLE IN A GROU EVENT ON ICAL WITHOUT THEM SEE EACH OTHER EMAIL ADDRESS

    HOW CAN INVITE PEOPLE IN A GROU EVENT ON ICAL WITHOUT THEM SEE EACH OTHER EMAIL ADDRESS ?

    Hi, I never use any of these, but according to this it uses eMal, so I'd think moving the adressees to the BCC: field should do it.
    Not the To: or CC: feild.

  • How to detect the key enter with a numerical control without using loop event?

    I want to accept a numerical value only when the key enter is pressed, but without using the event. How to detect the char "enter" with a numerical control?
    Thanks!

    When the user edits a numeric control with a keyboard, its property "key focus" is true. When the user hits enter, key focus becomes false. Poll the property to latch the control valuse at the true-false transition. That won't work if the user modify the control using up and down arrows.
    LabVIEW, C'est LabVIEW

  • How do I sync my iPhone calendar without getting duplicate events posted?

    How do I sync my iPhone calendar without getting duplicate events posted?

    This is ridiculous!  I bought an Ipad 2 to help keep up with my appointments etc and now it wont sync my Yahoo calendar appointments that i made from my iphone.  I have tried all the suggestions I can find and nothing is working.  I don't have time to go back and add it all by hand a second time.  Please fix!!!

  • In Office for Mac 2011 After creating a Button how do I change its shape without triggering its assigned macro?

    In Office for Mac 2011, after creating a button how do I change its shape without triggering its assigned macro?

    For questions about Microsoft's tools, it would be best to ask in the Microsoft Support Forums. They would likely have more experience than people here.

  • How to populate the dropdown key values as shown in the below screen shot

    Hi
    i am trying to populate the drop down by key value for trader , for Trader we  have few values i need to populate the Those values in values columns . as shown in the below screen shot .

    Hi,
    Follow below steps
    Step 1 - Create basic wdp table
    Step 2 - Create context to store dropdown values Within your web dynpro application table
    Now you need to create a context node to store the dropdown values, but this needs to be within the context node of your table.
    For this example I will use fields CARRID and CARRNAME from structure SCARR to create the dropdown list within the table context.
    Choose the attributes to represent the id and the text values
    The finished context should now look like this
    Step 3 - Update context mapping within VIEW
    Within the Context tab of your view update the context node you have just modified (CARRIERS) right click and select 'Update Mapping'. Alternatively if this is a new context drag it from the right hand window and drop it onto the context node in the left window,
    Step 4 - Update table field
    Within the layout tab of the view, field the table field you want to replace with with a dropdown and remove the UI element associated with it
    Now insert new dropdownbyindex UI cell element
    Step 5 - Assign Dropdown Ui element to Context
    Click on your UI element within the Layout tab, you will now see all the properties for this element which can be changed. You now need to assign the field within the context which you want to be displayed in the drop down i.e. it will be the CARRNAME field within context element DROPDOWN_CARR. To do this simply click on the button at the end of the 'texts' property (the one with a yellow square and circle on it) and select the correct context field.
    Step 6 - ABAP code to populate dropdown list and set correct initial value
    Insert the following ABAP code into the appropriate place. For this example it will go within the WDDOMODIFYVIEW method of the view.
      Data: it_scarr type standard table of scarr, wa_scarr like line of it_scarr, context_node type ref to if_wd_context_node.  Data: it_ddcarr type STANDARD TABLE OF if_main=>element_DROPDOWN_CARR, wa_ddcarr like line of it_ddcarr, lr_element TYPE REF TO if_wd_context_element, ld_tabix type sy-tabix, ld_index type sy-index, it_carriers type STANDARD TABLE OF if_main=>element_CARRIERS, wa_carriers like line of it_ddcarr.  select * from scarr into table it_scarr. sort it_scarr by carrid.  * select * from scarr into table it_scarr. context_node = wd_context->get_child_node( name = 'CARRIERS' ).  * Get all rows of table and values stored in each cell currently displayed to user context_node->get_static_attributes_table( importing table = it_carriers ).  if sy-subrc eq 0. loop at it_carriers into wa_carriers. free lr_element. ld_tabix = ld_tabix + 1.  *     assign context_node to table context context_node = wd_context->get_child_node( name = 'CARRIERS').  *     assign lr_element to row of table lr_element = context_node->get_element( ld_tabix ).  *     assign data to dropdown of the row  context_node = lr_element->get_child_node( name = 'DROPDOWN_CARR'). context_node->BIND_TABLE( it_scarr ).  *     Set correct initial value read table it_scarr into wa_scarr with key carrid = wa_carriers-carrid. ld_index = sy-tabix. context_node->set_lead_selection_index( index = ld_index ).  endloop. endif.
    Step 6 - Save, Activate and Run
    Save and activate your abap web dynpro, now when you execute it you should see a drop down object similar to the following:

  • How can I restore deleted iCal events without removing current events?

    I have just discovered that iCal on my Laptop has been deleting events older than 30 days (as per the default), even though it's supposed to be syncing via MobileMe with my iMac which has this disabled.
    I have made backups and exports from iCal in the past. The former, iCal backup files, will apparently overwrite the whole calendar and restore it back to that point in time, which is surely rather useless? If there's a way to use one of these files without deleting new events, then please let me know.
    I did import a previous export taken in August 2007, but that still leaves a large gap.
    I have also been backing my iMac up in TimeMachine for the past year - is there a way to restore my Calendar this way without reverting new events?

    Hi crcamp1,
    If you have multiple backups, your previous backup may still be available.  Details are found in this article.
    Create and delete iPhone, iPad, and iPod touch backups in iTunes - Apple Support
    Where your backups are stored
    The folder where your backup data is stored depends on your computer's operating system. Make sure the backup folder is included in your data-backup routine. iTunes places the backup files in these places:
    Mac: ~/Library/Application Support/MobileSync/Backup/
    The "~" represents your Home folder. If you don't see Library in your Home folder, hold Option and click the Go menu.
    Windows Vista, Windows 7, and Windows 8: \Users\(username)\AppData\Roaming\Apple Computer\MobileSync\Backup\
    To quickly access the AppData folder, click Start. In the search bar, type %appdata%, then press Return.
    Windows XP: \Documents and Settings\(username)\Application Data\Apple Computer\MobileSync\Backup\
    To quickly access the Application Data folder, click Start, then choose Run. In the search bar, type %appdata%, then click OK.
    Restoring is further discussed at the bottom of this article.
    Back up and restore your iPhone, iPad, or iPod touch using iCloud or iTunes - Apple Support
    Best regards,
    Nubz

Maybe you are looking for

  • ADS Global Catalogue Usage and SAP Transaction iViews

    Hi all, I connected our ADS to UME. I have several subdomains in the ADS which are accessed via global catalog. To configure the ume for global catalog I changed the j_user attribute from samaccountname to userprincipalname and the uniquename attribu

  • Hotmail via Active Sync on iOS 5.1

    Hi I've just set up a hand-me-down 3GS for my wife. I have set up a work email account for her successfully through Microsoft Exchange and then tried to set up Hotmail through the predefined setting - which I believe means through Exchange or Active

  • N97 Music Player - faulty icons

    Hi everyone. Thought I would post here with this little problem, as I seem to have exhausted the internet in looking for a solution. Basically the music player short cut icon on the desktop(?) AND the 'last played' icon in the player do not work. Wha

  • How to Render A Page From beginning(even if it was rendered)?

    Hi there, our problem is like... we use popup windows in our jsf ERP application to fill some fields of opener window, like when we open the popup window, there are a few query fields and sorting part and datatable, selection fills the opener window'

  • Cannot Erase Macbook HDD (Resource problem)

    Going to switch on my Macbook this evening, I found it hanging at the Apple Logo. This being familiar from my recent iMac problems I booted from the Leopard install disc, ran Disk Utility and discovered "node errors" Not to worry, I'd just backed up,