PAI event

Hello,
                R there any subevents in PAI.
                  plzz help.
regards,
satish

Hi
   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. that means atleast one field input is not correct means all fields which r in chain-endchain r in edit mode on the screen.
And also modules which get proper data from tables for the given input are exist in this PAI event.
Thanks,
Suma.

Similar Messages

  • Accessing the bean in JSPDynPage of PAI event

    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 the input in the first page.and storing this value in bean.accessing the value stored in bean to display it in the second page.but its giving error while requesting the second page.can anybody please help me?
    with regards
    sireesha.

    Hi
    dynpagebean myNameContainer=(dynpagebean)myProfile.getValue("MyNameBean");
    Here the string to be passed in getValue method shoild be the id of the bean that you see in jsp:useBean tag.
    you can set the attributes of the bean using its setter methods:
    e.g.I have a setter method which sets the attribute Name in my bean with type as string.
    myNameContainer.setName("ABC");
    now I put the bean in profile as follows:
    myProfile.putValue("myBean",myNameContainer);
    Now you can access the bean in both the JSPs by using jsp:useBean tag.
    Here you will have to remove
    <property name="ComponentType" value="jspnative"/>
    <property name="JSP" value="pagelet/<jspname>.jsp"/>
    properties in component config in order to be able to access both the JSPs.
    You can also use IPortalComponentContext instead of IPortalComponentProfile since the getValue and putValue methods of IPortalComponentProfile are depricated.
    Regards,
    Ajay

  • 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

  • The PAI Event Code to search for a record in Table Control

    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 positioning.
    3. I enter the search (key) field in text field & Click the position button.
    4. The PAI event of button click (Module user_command) of that screen is as under.
    Case sy_ucomm.
    When 'PBUT'.
    What will be the code to bring the row as selected in table control, that I have to write here, for this case-value.
    Endcase.
    Regards,

    Hi Alok,
    Excuse me, couldn`t catch u yesterday. Ok i`ve the code which will set the cursor on the selected entry.
    Reward points if convinced.
    *& Report  Y131_TC_TEST                                                *
    REPORT  y131_tc_test NO STANDARD PAGE HEADING.
    TABLES: vbak.
    DATA : BEGIN OF str_tc,
           vbeln LIKE vbak-vbeln,
           erdat LIKE vbak-erdat,
           END OF str_tc,
           it_tc LIKE TABLE OF str_tc WITH HEADER LINE,
           loopc LIKE sy-loopc,
           flag,
           lin TYPE i.
    CONTROLS : my_tc TYPE TABLEVIEW USING SCREEN 9000.
    CALL SCREEN 9000.
    *&      Module  STATUS_9000  OUTPUT
    *       text
    MODULE status_9000 OUTPUT.
    *  SET PF-STATUS 'xxxxxxxx'.
    *  SET TITLEBAR 'xxx'.
      IF it_tc[] IS INITIAL.
        SELECT vbeln erdat INTO TABLE it_tc UP TO 10
        ROWS FROM vbak.
        DESCRIBE TABLE it_tc LINES lin.
        my_tc-top_line = loopc.
      ENDIF.
    ENDMODULE.                 " STATUS_9000  OUTPUT
    *&      Module  USER_COMMAND_9000  INPUT
    *       text
    MODULE user_command_9000 INPUT.
      CASE sy-ucomm.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
       <b> WHEN 'PBUT'.</b>
    **** Now this event is triggerred when the user uses the ****Position Push button to locate the field value.
          CALL SCREEN 9001 STARTING AT 10 15.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_9000  INPUT
    *&      Module  USER_COMMAND_9001  INPUT
    *       text
    MODULE user_command_9001 INPUT.
      CASE sy-ucomm.
        WHEN 'OKAY' OR ' ' or 'EXIT'.
    <b>**** When the user selects values from the search help on **** position button, the itab is read and index is *****assigned</b>
          READ TABLE it_tc WITH KEY vbeln = vbak-vbeln.
          IF sy-subrc = 0.
            loopc = sy-tabix.
            flag = 'X'.
    **** the cursor is set here
           <b> my_tc-top_line = loopc.</b>
             SET SCREEN 0.
          LEAVE SCREEN.
          ENDIF.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_9001  INPUT
    *&      Module  STATUS_9001  OUTPUT
    *       text
    MODULE status_9001 OUTPUT.
      SET PF-STATUS 'MODAL'.
    *  SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_9001  OUTPUT
    Regards

  • 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 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.

  • How to use PAI event for subscreen

    Hi Gurus,
    I have created one main screen(1000). In that screen dynamically i need to display two subscreens(1001 and 1002).
    In first subscreen I have created some input/output box. for example i have created A, B and C parameters in first subscreen.
    I need to do the operation of C = A * B.
    I can use pushbutton. When i press push button, I need to display the output in C.
    Push button user command event is triggering in Main screen PAI only.
    Please anyone explain me about that process.
    regards
    lakshmanan dev.

    Hi,
    you just go to this link
    call subscreen from main screen
    hope ths will help you a lot
    Regards,
    Anand

  • Use of loops in pbo and pai events when a table control is on the screen

    asap.

    Hi Feroz,
              What is the very purpose of using table controls and tab strips in module pool programming.
    Rgds,
    kha

  • Regarding PAI event display of data in table control

    Hi all,
    I have a drop down list in my module pool screen and based on my selection the value in not getting captured as i have to display table control data (or item level data ) based on the delivery that is selected from the drop down.
    The first level of items are getting displayed in the table control for the first time but after i select the delivery for the next time no delivery is getting captured in the screen field and so on no items are getting changed in the table control.
    Pls let me know how to capture the delivery number selected from the drop down list box and so on i can write the code for displaying the new set of items in the table control for the new delivery number selected.
    Thankyou for your help.
    Amar.

    Hi All,
    I have solved my problum of getting the values in the drop down list using the function module vrm_set_values.
    Earlier it dint capture the values in the list because i am not aware of the key field its having apart from the text field.
    I have passed some numberic value to the key field earlier and the actual text to be displayed in the TEXT field.
    Anyways i came to know that we need to pass the same field values in both key field and text field only then the values wud be captured. So my problum is solved.
    I have another question on the same now
    My requirement is on selecting a value in the dropdown list the delivery items shud come in the dropdown list which is coming.
    I have another drop down in the item level so i wrote the vrm set values in the item level for one field based on that value the other fields in the table control needs to get data.
    I have provided the drop down item level field also but the problum is let us say we have 3 items and in the table control has 15 items that can be displayed. The dropdown for that field shud come only upto 3 records but it is coming for the entire column as the screen field name is same for the entire column.
    example
    f1   f2  f3 are the fields
    and the table control can accomodate 10 records
    Let us say we have 3 line items
    now the drop down is appearing for all the 15 records for field f2 where it shud appear for only  3 records.
    pls let me know if there any option in such a way that we can restrict upto 3 records.
    Thanks in advance.
    Amar.

  • Events in CL_GUI_ALV_GRID - PAI

    Hi All,
    I designed the screen like below
    I am using doc container with split one is for small ALV grid and next is for text editor. - Upper Portion of screen (Upper portion is splited vertically for alv grid and text editor)
    in the bottom of screen i have tabstrip in each tab it display the detailed ALV grid. - Bottom of screen
    When you click on upper portion of alv grid, the data is displayed in below tabs of ALV and long text in text editor.
    Tabstrip data is based on the upper portion of alv, it is like itemdata and header data.
    i used hotspot event in upper portion of alv to select the row and based on the row selected, bottom portion of data should display in the alv grids.
    But when i select the row it is not triggering the PAI event and it is triggering the PERFORM handle_hotspot_click USING e_row_id e_column_id es_row_no .
    how to trigger the PAI event when we click the double click or hot spot in alv grid.
    in alv tree we have set_registered_events but not alv grid.
    Please help me.
    Thanks,
    Srinivas Manai.

    Hi ,
    I guess the follwing code will be useful to you.
    Define a class. In that define a method for event hotspot_click of cl_gui_alv_grid like below.
    CLASS-METHODS:
          handle_hotspot_click
            FOR EVENT hotspot_click OF cl_gui_alv_grid
                IMPORTING e_row_id e_column_id es_row_no.
    In the method implementation write the desired code.
    Reward if useful
    Regards,
    Sravanthi.

  • What is the diffrence between sap events and application events

    Hi all,
    what is the diffrence between sap events and application events.Can any one tell me with examples.
    regards,

    Hi,
    Look at this,
    <b>System Events (Default)</b>
    The event is passed to the application server, but does not trigger the PAI. If you have registered an event handler method in your ABAP program for the event (using the SET HANDLER statement), this method is executed on the application server.
    Within the event handler method, you can use the static method SET_NEW_OK_CODE of the global class CL_GUI_CFW to set a function code and trigger the PAI event yourself. After the PAI has been processed, the PBO event of the next screen is triggered.
    The advantage of using this technique is that the event handler method is executed automatically and there are no conflicts with the automatic input checks associated with the screen. The disadvantage is that the contents of the screen fields are not transported to the program, which means that obsolete values could appear on the next screen. You can work around this by using the SET_NEW_OK_CODE method to trigger field transport and the PAI event after the event handler has finished.
    <b>Application Events</b>
    The event is passed to the application server, and triggers the PAI. The function code that you pass contains an internal identifier. You do not have to evaluate this in your ABAP program. Instead, if you want to handle the event, you must include a method call in a PAI dialog module for the static method DISPATCH of the global class CL_GUI_CFW. If you have defined an event handler method in your ABAP program for the event (using the SET HANDLER statement), the DISPATCH method calls it. After the event handler has been processed, control returns to the PAI event after the DISPATCH statement and PAI processing continues.
    The advantage of this is that you can specify yourself the point at which the event is handled, and the contents of the screen fields are transported to the application server beforehand. The disadvantage is that this kind of event handling can lead to conflicts with the automatic input checks on the screen, causing events to be lost.
    Hope u understood.
    Thanks&Regards,
    Ruthra.R

  • Issue with ALV Grid and events

    Hi,
    I am creating an ALV Grid with fields Matnr,Charg,Labst,Meins. The first three fields are editable and the last (MEINS) is read only.
    Now I am trying to fill the MEINS field programmaticly after entering the MATNR and confirm with enter/return.
    I think that I have to "overload" the enter event of the alv grid to fill the MEINS everytime when a MATNR was entered. But I don't know how I could implementing this. Could you give me a hint how I could solve this problem?
    (The behavior should look like in transaction MIGO)
    Thanks

    Hi Alex
    When you press enter an event is triggerd and function code is filled in sy-ucoom or you can say in ok_code. At that time PAI event occurs. In PAI of that screen you need to check ok_code and load new data in table which you passed to ALV and also refresh the ALV.
    data: ok_code like sy-ucomm.
    PAI----screen 100
    case ok_code.
    when 'ENTER'.
    select data
    and refresh ALV
    then again call
    funtion to display ALV
    Regards
    Aditya

  • Trigger PAI after pressing enter key

    Hi all,
    How to trigger the PAI event after pressing the enter key on the keyboard. i have a input field and a button on the screen. after entering the value into the field and pressing buttot will take to next screen. But if I press enter key the value is getting cleared. How to trigger the PAI event after pressing the enter key?
    Thanks in advance,
    Dev.

    Hi,
    The keyboard event 'Enter' does not have a default sy-ucomm or a Function code associated with it.
    So, whenever you press Enter, it triggers the PAI (sy-ucomm would be blank) and somewhere in your code the value is being refreshed. You can debug thoroughly to find where the problem is.
    You can assign a Function code for Enter. Go to the GUI Status of the Screen -> Function Keys -> You will find a icon Enter (the one with the tick mark in a green circular background) -> Assign Function code like 'ENTER'.
    Now in your PAI, restrict your code saying
    if sy-ucomm = 'ENTER'.
    "Logic
    endif.

  • Make invisible a field in PAI

    Hi guys,
    my problem is, that i need to make invisible some fields after the user clicks on one button, i know how to make invisible a field, but is not working because i put my code in the PAI event, any ideas? (is in the same dynpro)
    tks in advance
    Message was edited by:
            javier  santana

    Hi ,
    THINK THIS WAY,
    IF YOU ARE IN PAI OF SCREEN 101 AND YOU HAVE A BACK BUTTON THAT TAKES YOU TO SCREEN TO 100 AND IN 100 YOU WANT THE FIELDS TO DISABLE.
    THEN YOU CAN WRITE THE CODE IN PAI OF 100 OR PAI OF 101
    YOU ARE IN PAI OF 101 THAT'S MEANT FOR SCEEN 101 AND  IF YOU WRITE CODE IN HERE ITS FO SCREEN AND IF YOU WRITE THE SAME CODE IN PAI OF 100 THEN ALSO IT DOESN'T WORK BECOZ WHEN YOU PRESS ITS DIRECTLY GOES TO PBO OF SCREEN 100
    Thats the reason fo writing the code in PBO
    LET ME KNOW IF YOU NEED ANYTHING ELSE
    THANKS
    VENKI

Maybe you are looking for