Current Position:Home > How to populate dropdown without triggering PAI event ?

How to populate dropdown without triggering PAI event ?

Update:11-30Source: network consolidation
Advertisement
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 .

The Best Answer

Advertisement
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
  • How to populate dropdown without triggering PAI event ? Update:11-30

    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 en

  • Triggering PAI event for Radio button Update:11-30

    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

  • The PAI Event Code to search for a record in Table Control Update:11-30

    Logic 1. I have a position button and entry text field (search content) for a table control in my screen. Position button has the function code 'PBUT'. 2. Content of table control will be in an internal table. The entry text field  is to be used for

  • How do I the Force F8 / PAI event to execute Update:11-30

    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 tabl

  • Accessing the bean in JSPDynPage of PAI event Update:10-11

    Hi friends,    In the PAI event of JSPDynpage component iam accessing the bean thru the following stmt.   dynpagebean myNameContainer=(dynpagebean)myProfile.getValue("MyNameBean"); What string have to pass in the getValue() method? Iam giving th

  • Info Package Group Management? and Triggering of Event Chains ? Update:10-11

    Hi GURU's Info Package Group Management? and Triggering of Event Chains ? Thanks Bhima Chandra Sekhar GHi Bhima! IP GROUP: http://help.sap.com/saphelp_nw04/helpdata/en/80/1a65b5e07211d2acb80000e829fbfe/content.htm About chains and triggering events:

  • Triggering an event when the new  AIR application installation has done for first time in machine Update:11-30

    I am installing AIR application from web page by using a badge.Is it possible to call a function once the installation of AIR app was finished[once we click finish button in the installer] to update the AIR application version dynamically inside our

  • Checking who triggered an event Update:11-30

    We have a process chain that runs by event, but somehow today it was triggered and the start event is still set to run by event.  Is there a way to find out who triggered the event in SM64?  Or who last raised a job to trigger the process chain? mark

  • How create mail alert without triggering the event. Update:11-30

    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 trigger

  • PAI event Update:11-30

    Hello,                 R there any subevents in PAI.                   plzz help. regards, satishHi    In PAI we will use chain -endchain which in clude modules of some fields. Mostly this chain-endchain is used for fields validation by combindely. t