How to create a secondary list of alv grid inside the function module

Hi All,
My requirement is to create a RFC function module to display the alv grid of one table.
i have created that.
while clicking on the records of the alv it should open the secondary list of another table.
My problem is it is not fetching the records of the internal table of the primary list since it is created inside the function module(FUNCTION...ENDFUNCTION).
pls help me on this.
Thanks in Advance.

hi,
READ TABLE sel_sheet INTO wa_sheet INDEX rs_selfield-tabindex.
here sel_sheet is the internal table for the primary list..
i called the function module "reuse_lav_grid_display" inside Function...Endfunction.
so when i am using  READ TABLE sel_sheet INTO wa_sheet INDEX rs_selfield-tabindex.
inside the user command perform therecords in this internal table is not populating..
pls help me on this.
thanks in advance.

Similar Messages

  • How to create a Sales order with ref to Contract using Function Module

    How to create a Sales order with ref to Contract using Function Module BAPI_SALESDOCU_CREATEFROMDATA ?

    We have a unique situation where we like change the sold-to customer of the sales order
    once order has been created. These orders have been created using either by function module
    BAPI_SALESDOCUMENT_COPY or using BDC (VA01, Copy with reference).
    These two processes work abosolutely fine except someone might have change the sold-to
    customer of the ship-to customer of the original sales order. If this the case then the new
    sales order will be created with the old sold-to and with not the new sold-to.
    We tried using BAPI_SALESDOCUMENT_CHANGE and commit afterwards. We checked
    the returned parameteres of the BAPIs and they are all successful but sold-to remains the
    same old one.
    Any help would be much more appreciated.

  • How do we trap exception inside the function module?

    How do we trap exception inside the function module?

    Use ABAP Help - CATCH, RAISE for starters. Or take a look at an existing function module, for example.

  • How to create Inbound Idocs in a ABAP program? Any function Module?

    Hello Experts,
    My requirement is : I have sales order data which I extracted from third party system in my internal tables. In the same box I need to create inbound Idocs and then consequently create sales orders.
    I have used the function module IDOC_INBOUND_WRITE_TO_DB to create inbound Idocs from Sales Orders data in internal tables. I have populated all the data records with correct PSGNUM and HLEVEL values. My plan is to create inbound idocs with this function module and send those to IDOC_INPUT_ORDERS function module which creates Sales Orders.
    If a sales order in the internal table in ABAP program contains only one item, then I am getting correct idocs. But if more than one item exists for a sales order then the line item segments which got repeated in Idoc are having PSGNUM and HLEVEL values as zero when I checked in WE02. As a result the hierarchy from the second item segment is getting disturbed and getting the status 60.
    I populated T_EDIDD with data records from  IDOC_INBOUND_WRITE_TO_DB.
    To the function module IDOC_INPUT_ORDERS,  T_EDIDC and T_EDIDD are the input. I observed that in T_EDIDD also the PSGNUM and HLEVEL values are blank.
    I am getting Status 60 with message 'EDI: Syntax error in IDoc (segment cannot be identified)' for idocs which have more than one item.
    I need to extract sales data from third party and create inbound idocs and create sales orders in one ABAP program only. I need to display corresponding Idoc numbers for the corresponding third party sales order number in a listoutput.
    Can anybody please provide inputs?
    Regards.

    Hi Anjali,
    Thanks for the response.
    I have passed the PSGNUM and HLEVEL values while populating the data records. Then I sent the data records and control record information to the function module IDOC_INBOUND_WRITE_TO_DB. Inside this function module there is code to clear the PSGNUM values and HLEVEL values.
    for compatibility: clear administration data of data records
               perform data_records_wipe
                                      tables
                                          t_data_records.
    FORM DATA_RECORDS_WIPE
                      TABLES
                          T_DATA_RECORDS_IN  STRUCTURE EDIDD.
      LOOP AT  T_DATA_RECORDS_IN.
        CLEAR: T_DATA_RECORDS_IN-MANDT,
               T_DATA_RECORDS_IN-DOCNUM,
               T_DATA_RECORDS_IN-SEGNUM,
               T_DATA_RECORDS_IN-PSGNUM,
               T_DATA_RECORDS_IN-HLEVEL.
        modify t_data_records_in.
      ENDLOOP.
    ENDFORM.                               " DATA_RECORDS_WIPE
    This is the code which is clearing all the PSGNUM and HLEVEL values. After coming out of this function module we are getting the error idocs created with disturbed hierarchy.
    I need to create INBOUND Idocs with the data in ABAP program.
    Please let me know if any inputs? Is there any function module existing to create Inbound Idocs inside an ABAP program?
    Regards

  • Adding button in the secondary list and alv grid

    Hi all ,
                i have devloped an alv grid interactive report as below, my problem is i want to add some button in the secondary list and do some interactions. but i dont know how to do that. i m sending u my code below ,,, plzz suggest what can be done do add that.
    <code>
    *& Report  Z_demo_SALESDOC
    REPORT  z_demo_salesdoc.
    TABLES: vbak, vbap.
    TYPE-POOLS:slis.
    DATA: BEGIN OF it_vbak OCCURS 0,
           vbeln TYPE vbak-vbeln,
           ernam TYPE vbak-ernam,
           erdat TYPE vbak-erdat,
           auart TYPE vbak-auart,
           END OF it_vbak.
    DATA: BEGIN OF it_vbap OCCURS 0,
           vbeln TYPE vbap-vbeln,
           posnr TYPE vbap-vbeln,
           matnr TYPE vbap-matnr,
           zmeng TYPE vbap-zmeng,
           netwr TYPE vbap-netwr,
           END OF it_vbap.
    DATA:it_event TYPE slis_t_event.
    DATA: t_field TYPE slis_t_fieldcat_alv,
          w_field TYPE slis_fieldcat_alv,
          t_field1 TYPE slis_t_fieldcat_alv,
          w_field1 TYPE slis_fieldcat_alv,
          w_layout TYPE slis_layout_alv,
          t_sort TYPE slis_t_sortinfo_alv,
          w_sort TYPE slis_sortinfo_alv.
    CONSTANTS: c_top_of_page  TYPE slis_formname VALUE 'TOP_OF_PAGE',
               c_usercommand  TYPE slis_formname VALUE 'USER_COMMAND'.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS: s_vbeln FOR vbak-vbeln MODIF ID m1,
                    s_erdat FOR vbak-erdat MODIF ID m2.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-001.
    PARAMETERS:rb1 RADIOBUTTON GROUP g1 USER-COMMAND us1,
               rb2 RADIOBUTTON GROUP g1 DEFAULT 'X'.
    SELECTION-SCREEN END OF BLOCK B2.
    AT SELECTION-SCREEN OUTPUT.
      IF rb1 = 'X'.
        LOOP AT SCREEN.
          IF screen-group1    = 'M1'.
         IF screen-name    CS 'S_VBELN'.
            screen-active    = '0'.
           screen-input     = '0'.
          screen-output    = '0'.
          screen-invisible = '1'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
      IF rb2 = 'X'.
        LOOP AT SCREEN.
          IF screen-group1    = 'M2'.
            screen-active    = '0'.
           screen-input     = '0'.
          screen-output    = '0'.
          screen-invisible = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    AT SELECTION-SCREEN.
      DATA: v_vbeln LIKE vbak-vbeln.
      SELECT SINGLE vbeln
                      FROM vbak
                      INTO (v_vbeln)
                      WHERE vbeln IN s_vbeln .
      IF sy-subrc <> 0.
        MESSAGE e001(q) WITH 'Invalid Sales document'.
      ENDIF.
      DATA: v_erdat LIKE vbak-erdat.
      SELECT SINGLE erdat
                      FROM vbak
                      INTO (v_erdat)
                      WHERE erdat IN s_erdat.
      IF sy-subrc <> 0.
        MESSAGE e001(q) WITH 'No document available with given date'.
      ENDIF.
    START-OF-SELECTION.
      PERFORM get_data_vbak.
      PERFORM build_field_catalog.
    PERFORM fill_event.
      PERFORM print_data_vbak.
    END-OF-SELECTION.
    *&      Form  get_data_vbak
          text
    -->  p1        text
    <--  p2        text
    FORM get_data_vbak .
      SELECT vbeln ernam erdat auart
                                FROM vbak
                                INTO TABLE it_vbak
                                WHERE vbeln IN s_vbeln AND erdat IN s_erdat.
    ENDFORM.                    " get_data_vbak
    *&      Form  build_field_catalog
          text
    -->  p1        text
    <--  p2        text
    FORM build_field_catalog .
      w_field-col_pos = 1.
      w_field-fieldname = 'VBELN'.
      w_field-tabname = 'IT_VBAK'.
      w_field-seltext_m = 'Sales Order'.
      w_field-emphasize = 'C710'.
      APPEND w_field TO t_field.
      CLEAR w_field.
      w_field-col_pos = 2.
      w_field-fieldname = 'ERNAM'.
      w_field-tabname = 'IT_VBAK'.
      w_field-seltext_m = 'Created by'.
      w_field-emphasize = 'C710'.
      APPEND w_field TO t_field.
      CLEAR w_field.
      w_field-col_pos = 3.
      w_field-fieldname = 'ERDAT'.
      w_field-tabname = 'IT_VBAK'.
      w_field-seltext_m = 'Created Date'.
      w_field-emphasize = 'C710'.
      APPEND w_field TO t_field.
      CLEAR w_field.
      w_field-col_pos = 4.
      w_field-fieldname = 'AUART'.
      w_field-tabname = 'IT_VBAK'.
      w_field-seltext_m = 'Order type'.
      w_field-emphasize = 'C710'.
      APPEND w_field TO t_field.
      CLEAR w_field.
      w_sort-spos = 1.
      w_sort-fieldname = 'VBELN'.
      w_sort-up = 'X'.
      APPEND w_sort TO t_sort.
      w_layout-colwidth_optimize = 'X'.
    ENDFORM.                    " build_field_catalog
    *&      Form  user_command
          text
         -->RF_UCOMM     text
         -->RS_SELFIELD  text
    FORM user_command USING rf_ucomm    TYPE sy-ucomm
                            rs_selfield TYPE slis_selfield.
      CASE rf_ucomm.
        WHEN '&IC1'.
          IF rs_selfield-fieldname = 'VBELN'.
            READ TABLE it_vbak INDEX rs_selfield-tabindex.
            IF sy-subrc = 0.
              PERFORM get_data_vbap.
              PERFORM build_field_catalog2.
              PERFORM print_field_data.
            ENDIF.
          ENDIF.
      ENDCASE.
    ENDFORM.                    "user_command
    *&      Form  print_data_vbak
          text
    -->  p1        text
    <--  p2        text
    FORM print_data_vbak .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
         i_callback_program                = sy-repid
      I_CALLBACK_PF_STATUS_SET          = ' '
       i_callback_user_command           = 'USER_COMMAND'
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  = I_STRUCTURE_NAME
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      = I_GRID_TITLE
      I_GRID_SETTINGS                   = I_GRID_SETTINGS
         is_layout                         = w_layout
       it_fieldcat                       = t_field[]
      IT_EXCLUDING                      = IT_EXCLUDING
      IT_SPECIAL_GROUPS                 = IT_SPECIAL_GROUPS
       it_sort                           = t_sort
      IT_FILTER                         = IT_FILTER
      IS_SEL_HIDE                       = IS_SEL_HIDE
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        = IS_VARIANT
      it_events                         = it_event[]
      IT_EVENT_EXIT                     = IT_EVENT_EXIT
      IS_PRINT                          = IS_PRINT
      IS_REPREP_ID                      = IS_REPREP_ID
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   = IT_ALV_GRAPHICS
      IT_HYPERLINK                      = IT_HYPERLINK
      IT_ADD_FIELDCAT                   = IT_ADD_FIELDCAT
      IT_EXCEPT_QINFO                   = IT_EXCEPT_QINFO
      IR_SALV_FULLSCREEN_ADAPTER        = IR_SALV_FULLSCREEN_ADAPTER
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           = E_EXIT_CAUSED_BY_CALLER
      ES_EXIT_CAUSED_BY_USER            = ES_EXIT_CAUSED_BY_USER
        TABLES
          t_outtab                          = it_vbak
    EXCEPTIONS
       program_error                     = 1
       OTHERS                            = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " print_data_vbak
    *&      Form  fill_event
          text
    FORM fill_event .
      DATA : st_event TYPE slis_alv_event.
    *- Clear.
      CLEAR : st_event, it_event[].
    *- Local variable
      DATA : l_tabix TYPE sy-tabix.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type     = 0
        IMPORTING
          et_events       = it_event
        EXCEPTIONS
          list_type_wrong = 1
          OTHERS          = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    *- Read event table
      READ TABLE it_event WITH KEY name = slis_ev_user_command
                           INTO st_event.
    *- Clear
      CLEAR l_tabix.
      l_tabix = sy-tabix.
    *- Check subrc
      IF sy-subrc = 0.
        st_event-form = c_usercommand.
    *- Modify
        MODIFY it_event FROM st_event INDEX l_tabix.
    *- Clear
        CLEAR st_event.
      ENDIF.
    ENDFORM.                    " fill_event
    *&      Form  get_data_vbap
          text
    FORM get_data_vbap .
      IF NOT it_vbak[] IS INITIAL.
        SELECT vbeln
               posnr
               matnr
               zmeng
               netwr
            FROM vbap
            INTO TABLE it_vbap
            WHERE vbeln = it_vbak-vbeln.
        IF sy-subrc = 0.
          SORT it_vbap BY vbeln.
        ENDIF.
      ENDIF.
    ENDFORM.                    " get_data_vbap
    *&      Form  build_field_catalog2
          text
    FORM build_field_catalog2 .
      CLEAR:t_field1,w_field1.
      w_field1-col_pos = 1.
      w_field1-fieldname = 'VBELN'.
      w_field1-tabname = 'IT_VBAP'.
      w_field1-seltext_m = 'Sales Order'.
      w_field1-emphasize = 'C710'.
      APPEND w_field1 TO t_field1.
      CLEAR w_field1.
      w_field1-col_pos = 2.
      w_field1-fieldname = 'POSNR'.
      w_field1-tabname = 'IT_VBAP'.
      w_field1-seltext_m = 'Sales Doc Item'.
      w_field1-emphasize = 'C710'.
      APPEND w_field1 TO t_field1.
      CLEAR w_field1.
      w_field1-col_pos = 3.
      w_field1-fieldname = 'MATNR'.
      w_field1-tabname = 'IT_VBAP'.
      w_field1-seltext_m = 'Material No'.
      w_field1-emphasize = 'C710'.
      APPEND w_field1 TO t_field1.
      CLEAR w_field1.
      w_field1-col_pos = 4.
      w_field1-fieldname = 'ZMENG'.
      w_field1-tabname = 'IT_VBAP'.
      w_field1-seltext_m = 'Target quan units'.
      w_field1-emphasize = 'C710'.
      APPEND w_field1 TO t_field1.
      CLEAR w_field1.
      w_field1-col_pos = 5.
      w_field1-fieldname = 'NETWR'.
      w_field1-tabname = 'IT_VBAP'.
      w_field1-seltext_m = 'Net value dc cu'.
      w_field1-emphasize = 'C710'.
      APPEND w_field1 TO t_field1.
      CLEAR w_field1.
    ENDFORM.                    " build_field_catalog2
    *&      Form  print_field_data
          text
    FORM print_field_data .
    SET PF-STATUS 'VBAP'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
         i_callback_program                = sy-repid
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  = I_STRUCTURE_NAME
      I_BACKGROUND_ID                   = ' '
         i_grid_title                      = 'VBAP DETAILS'
      I_GRID_SETTINGS                   = I_GRID_SETTINGS
      IS_LAYOUT                         = IS_LAYOUT
         it_fieldcat                       = t_field1[]
      IT_EXCLUDING                      = IT_EXCLUDING
      IT_SPECIAL_GROUPS                 = IT_SPECIAL_GROUPS
      IT_SORT                           = IT_SORT
      IT_FILTER                         = IT_FILTER
      IS_SEL_HIDE                       = IS_SEL_HIDE
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        = IS_VARIANT
      IT_EVENTS                         = IT_EVENTS
      IT_EVENT_EXIT                     = IT_EVENT_EXIT
      IS_PRINT                          = IS_PRINT
      IS_REPREP_ID                      = IS_REPREP_ID
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   = IT_ALV_GRAPHICS
      IT_HYPERLINK                      = IT_HYPERLINK
      IT_ADD_FIELDCAT                   = IT_ADD_FIELDCAT
      IT_EXCEPT_QINFO                   = IT_EXCEPT_QINFO
      IR_SALV_FULLSCREEN_ADAPTER        = IR_SALV_FULLSCREEN_ADAPTER
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           = E_EXIT_CAUSED_BY_CALLER
      ES_EXIT_CAUSED_BY_USER            = ES_EXIT_CAUSED_BY_USER
        TABLES
          t_outtab                          = it_vbap
       EXCEPTIONS
         program_error                     = 1
         OTHERS                            = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " print_field_data
    </code>

    Hi Satya..
    This is the Sample code...
    DATA : V_FORM_GUI TYPE SLIS_FORMNAME VALUE 'F_GUI'.  "Form name
    **Secondary List
    FORM print_field_data .
    SET PF-STATUS 'VBAP'.  "This statement will not work for ALV
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_INTERFACE_CHECK = ' '
    I_BYPASSING_BUFFER = ' '
    I_BUFFER_ACTIVE = ' '
    i_callback_program = sy-repid
    <b> I_CALLBACK_PF_STATUS_SET = V_FORM_GUI  
                                                      "Subroutine in which GUI status is called</b>
    I_CALLBACK_USER_COMMAND = 'F_USER_COMMAND'   "To handle GUI
    I_CALLBACK_TOP_OF_PAGE = ' '
    I_CALLBACK_HTML_TOP_OF_PAGE = ' '
    I_CALLBACK_HTML_END_OF_LIST = ' '
    I_STRUCTURE_NAME = I_STRUCTURE_NAME
    I_BACKGROUND_ID = ' '
    i_grid_title = 'VBAP DETAILS'
    I_GRID_SETTINGS = I_GRID_SETTINGS
    IS_LAYOUT = IS_LAYOUT
    it_fieldcat = t_field1[]
    IT_EXCLUDING = IT_EXCLUDING
    IT_SPECIAL_GROUPS = IT_SPECIAL_GROUPS
    IT_SORT = IT_SORT
    IT_FILTER = IT_FILTER
    IS_SEL_HIDE = IS_SEL_HIDE
    I_DEFAULT = 'X'
    I_SAVE = ' '
    IS_VARIANT = IS_VARIANT
    IT_EVENTS = IT_EVENTS
    IT_EVENT_EXIT = IT_EVENT_EXIT
    IS_PRINT = IS_PRINT
    IS_REPREP_ID = IS_REPREP_ID
    I_SCREEN_START_COLUMN = 0
    I_SCREEN_START_LINE = 0
    I_SCREEN_END_COLUMN = 0
    I_SCREEN_END_LINE = 0
    I_HTML_HEIGHT_TOP = 0
    I_HTML_HEIGHT_END = 0
    IT_ALV_GRAPHICS = IT_ALV_GRAPHICS
    IT_HYPERLINK = IT_HYPERLINK
    IT_ADD_FIELDCAT = IT_ADD_FIELDCAT
    IT_EXCEPT_QINFO = IT_EXCEPT_QINFO
    IR_SALV_FULLSCREEN_ADAPTER = IR_SALV_FULLSCREEN_ADAPTER
    IMPORTING
    E_EXIT_CAUSED_BY_CALLER = E_EXIT_CAUSED_BY_CALLER
    ES_EXIT_CAUSED_BY_USER = ES_EXIT_CAUSED_BY_USER
    TABLES
    t_outtab = it_vbap
    EXCEPTIONS
    program_error = 1
    OTHERS = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM. " print_field_data
    FORM F_GUI USING rt_extab TYPE slis_t_extab.
    SET PF-STATUS 'GUI_1'.  "Double click and Create this GUI status and add buttons
    ENDFORM.
    <b><REMOVED BY MODERATOR></b>
    Message was edited by:
            Alvaro Tejada Galindo

  • How to create a sharepoint list to add/change/delete the data in SQL server Table based on users inputs

    I have a table in sql with employee_num and I need to create a list and link that list to this table to make changes to table based on values user enter or selects.

    Hi,
    In addition, you could refer to one similar thread for related information:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/8ee8a7b2-ddfc-4654-b84e-b062aeb527ae/how-to-create-exernal-list-in-sharepoint-which-fetch-data-from-multiple-sql-table?forum=sharepointgeneral
    Regards,
    Rebecca Tu
    TechNet Community Support

  • How to create a working  Gateway service utilizing an Existing ECC Function Module?

    Hello All,
    Our ECC (Back end) has a Function module which is to be used by creating a Gateway service .Can you suggest the step by step procedure with which i can continue to expose the service?
    Any help on this is much appreciated!
    Thanks,
    Usha

    Hi Usha,
    the flag 'Local app' indicates where the implementation of the service is done because it can be done on the Hub or on the backend. (see my blog about deployment options SAP Gateway deployment options in a nutshell).
    If you choose 'Local App' the BEP API will be called on your hub while otherwise it will be called on the backend system to which the RFC destination points to which has been maintained in your system alias definition.
    Best Regards,
    Andre
    This is explanation offered by SAP Help:
    Indicates that the System Alias is to be used by BEP
    SAP NetWeaver Gateway applications can be developed either on a SAP Business
    Suite backend system or on a SAP NetWeaver Gateway hub system. To access the
    business logic from an SAP Business Suite backend system the software component
    IW_BEP (Backend Enablement and Event Provisioning) has to be deployed in your
    system landscape. IW_BEP can be deployed on the backend system or locally on the
    SAP NetWeaver Gateway hub system. Communication is handled via system aliases
    (RFC destinations).
    Use
    Set this flag if you use this system alias for an OData Channel application
    that has been developed on the BEP add-on which is deployed on the SAP NetWeaver
    Gateway hub system.
    In this case the system alias information (such as RFC destiation, Web
    service group, software version) is not used by SAP NetWeaver Gateway to
    call the BEP API (it is called locally). Instead the system alias information is
    passed through to the OData Channel application, so that it could then itself
    make a call to the corresponding backend system.

  • Create generic component to handle errors after using the function modules

    Hi,
    Please provide steps to create a generic component to handle the BAPI Return structure meesages after the function calls..
    Please let me know how to pass the structure or internal table from one component to other.
    Thanks in Advance,
    SV
    Moderator Message: No Step-by-steps will be provided here. Either take a classroom course or search for SAP Documentation
    Edited by: kishan P on Dec 10, 2010 3:14 PM

    Hi Hari,
    Plz give me ur mail id.. i will forward some documents regarding Generic Extraction using FM  and query...
    For function module means.. you have to  create function module. in RSAX..in R/3 side
    and you want to extract data using Query means...you have to create Infoset query in (SQ01,SQ02,SQO3) IN r/3 Side
      you can refer this blog also..
    to Function module "RSAX_BIW_GET_DATA_SIMPLE" and there is very good weblog . Search "generic extraction" for weblog. /people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
    thanks
    @jay

  • F4 help in ALV grid by using function module?

    Hi,
    I need to get f4 search help in ALV grid for a certain fields by using function module method.
    Please guide me.
    Thank You.

    Hi
    F4IF_INT_TABLE_VALUE_REQUEST  use this fm to get f4 search help for a certain fields .
    Regards
    Divya

  • Printing ALV Report output through Function Modules

    Hi All,
    I want to print my ALV Grid output through function modules/statement (not through print option in menu).
    This is because, i am generating a PDF from spool when user clicks on a button. If any changes happened in the ALV output layout, they will be captured in spool through printing it.
    So can you please tell me how to print the ALV Output through FMs or sending the ALV output to spool.
    Thanks & Regards,
    Senthil.
    Edited by: senthil nathan on May 17, 2010 2:49 PM

    Hi Dev,
    Thanks for the reply.
    I want to print the ALV when the user clicks on a button in toolbar. Lets say the user has made some changes to the layout, (E.g hiding a field) and when i print that output it should use the changed layout, If i use the FM suggested by you, i cant acheive this.
    If you try to print this manually, the system uses the changed layout and not the original. Thats why i want to know FMs/statement to print.
    Regards,
    Senthil.

  • How to create secondary lists in ALV

    Hi all,
    Can u plz explain me how to create Secondary lists usingl ALV and how many secondary lists we can create.
    Thanks in advance
    Venkat

    this is the very very simple program in HR module to demonstrate interactive ALV report.
    If u have HR module implemented...just copy and paste this code and debug it...you will easily get the flow of the report...this is the simplest program..
    i hope it helps...here u go......
    REPORT ztej_alv_interactive.
    TABLES: pa0000, pa0001.
    DATA : BEGIN OF it0001 OCCURS 0,
              pernr LIKE pa0001-pernr,
              ename LIKE pa0001-ename,
           END OF it0001.
    DATA : BEGIN OF it0000 OCCURS 0,
              pernr LIKE pa0000-pernr,
              begda LIKE pa0000-begda,
              endda LIKE pa0000-endda,
              massn LIKE pa0000-massn,
              massg LIKE pa0000-massg,
              aedtm LIKE pa0000-aedtm,
           END OF it0000.
    TYPE-POOLS: slis.
    DATA: v_repid LIKE sy-repid .
    DATA: i_fieldcat TYPE slis_t_fieldcat_alv.
    DATA: i_fieldcat1 TYPE slis_t_fieldcat_alv.
    DATA: it_listheader TYPE slis_t_listheader.
    DATA: it_listheader1 TYPE slis_t_listheader.
    DATA: v_events TYPE slis_t_event,
          wa_event TYPE slis_alv_event.
    DATA: alv_layout TYPE slis_layout_alv.
    DATA:  i_title_0001 TYPE lvc_title VALUE 'FIRST LIST DISPLAYED'.
    DATA:  i_title_0000 TYPE lvc_title.
    DATA : temp_pernr LIKE pa0001-pernr.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-000.
    SELECTION-SCREEN SKIP.
    SELECT-OPTIONS : s_pernr FOR pa0000-pernr DEFAULT '16240147'.
    SELECTION-SCREEN END OF BLOCK b1.
    INITIALIZATION.
      v_repid = sy-repid.
      PERFORM build_fieldcatlog USING i_fieldcat.
      PERFORM event_call.
      PERFORM populate_event.
    START-OF-SELECTION.
      PERFORM data_retrieval.
      PERFORM build_listheader USING it_listheader.
      PERFORM display_alv_report.
    *&      Form  BUILD_FIELDCATLOG
          text
    -->  p1        text
    <--  p2        text
    FORM build_fieldcatlog USING temp_fieldcat TYPE slis_t_fieldcat_alv.
      DATA : wa_temp_fieldcat TYPE slis_fieldcat_alv.
      wa_temp_fieldcat-tabname = 'IT0001'.
      wa_temp_fieldcat-fieldname = 'PERNR'.
      wa_temp_fieldcat-seltext_m = 'Personnel Number'.
      APPEND wa_temp_fieldcat TO temp_fieldcat.
      CLEAR wa_temp_fieldcat.
      wa_temp_fieldcat-tabname = 'IT0001'.
      wa_temp_fieldcat-fieldname = 'ENAME'.
      wa_temp_fieldcat-seltext_m = 'Name'.
      APPEND wa_temp_fieldcat TO temp_fieldcat.
      CLEAR wa_temp_fieldcat.
    ENDFORM.                    " BUILD_FIELDCATLOG
    *&      Form  EVENT_CALL
          text
    -->  p1        text
    <--  p2        text
    FORM event_call.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
            EXPORTING
               i_list_type     = 0
            IMPORTING
               et_events       = v_events
           EXCEPTIONS
                LIST_TYPE_WRONG = 1
                OTHERS          = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " EVENT_CALL
    *&      Form  POPULATE_EVENT
          text
    -->  p1        text
    <--  p2        text
    FORM populate_event.
      READ TABLE v_events INTO wa_event WITH KEY name = 'TOP_OF_PAGE'.
      IF sy-subrc EQ 0.
        wa_event-form = 'TOP_OF_PAGE'.
        MODIFY v_events FROM wa_event TRANSPORTING form WHERE name =
    wa_event-form.
      ENDIF.
      READ TABLE v_events INTO wa_event WITH KEY name = 'USER_COMMAND'.
      IF sy-subrc EQ 0.
        wa_event-form = 'USER_COMMAND'.
        MODIFY v_events FROM wa_event TRANSPORTING form WHERE name =
    wa_event-name.
      ENDIF.
    ENDFORM.                    " POPULATE_EVENT
    *&      Form  DATA_RETRIEVAL
          text
    -->  p1        text
    <--  p2        text
    FORM data_retrieval.
      SELECT pernr ename
             FROM pa0001
             INTO TABLE it0001
             WHERE pernr IN s_pernr.
      DELETE ADJACENT DUPLICATES FROM it0001.
    ENDFORM.                    " DATA_RETRIEVAL
    *&      Form  BUILD_LISTHEADER
          text
         -->P_IT_LISTHEADER  text
    FORM build_listheader USING i_listheader TYPE slis_t_listheader.
      DATA hline TYPE slis_listheader.
      hline-info = 'This is Interactive ALV Program.'.
      hline-typ = 'H'.
      APPEND hline TO i_listheader.
    ENDFORM.                    " BUILD_LISTHEADER
    *&      Form  DISPLAY_ALV_REPORT
          text
    -->  p1        text
    <--  p2        text
    FORM display_alv_report.
      v_repid = sy-repid.
      alv_layout-colwidth_optimize = 'X'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         i_callback_program                = v_repid
      I_CALLBACK_PF_STATUS_SET          = ' '
         i_callback_user_command           = 'USER_COMMAND'
         i_callback_top_of_page            = 'TOP_OF_PAGE'
         i_grid_title                      = i_title_0001
      I_GRID_SETTINGS                   =
       is_layout                         = alv_layout
         it_fieldcat                       = i_fieldcat[]
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
        i_default                         = 'ZLAY1'
         i_save                            = 'A'
        is_variant                        = i_variant
         it_events                         = v_events
        TABLES
          t_outtab                          = it0001
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      REFRESH i_fieldcat.
      CLEAR i_fieldcat.
      REFRESH it_listheader.
      CLEAR it_listheader.
    ENDFORM.                    " DISPLAY_ALV_REPORT
    *&      Form  TOP_OF_PAGE
          text
    FORM top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary       = it_listheader
       i_logo                   =
       I_END_OF_LIST_GRID       =
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  USER_COMMAND
          text
         -->R_UCOMM    text
         -->,          text
         -->RS_SLEFIELDtext
    FORM user_command USING r_ucomm LIKE sy-ucomm
    rs_selfield TYPE slis_selfield.
      REFRESH i_fieldcat1.
      REFRESH it_listheader1.
      CASE r_ucomm.
        WHEN '&IC1'.
          READ TABLE it0001 INDEX rs_selfield-tabindex.
          IF sy-subrc = 0.
            temp_pernr = it0001-pernr.
            PERFORM build_fieldcatlog_0000 USING i_fieldcat1.
            PERFORM event_call_0000.
            PERFORM populate_event_0000.
            PERFORM data_retrieval_0000.
            PERFORM build_listheader_0000 USING it_listheader1.
            PERFORM display_alv_0000.
          ENDIF.
      ENDCASE.
    ENDFORM.                    "user_command
    *&      Form  BUILD_FIELDCATLOG_0000
          text
    -->  p1        text
    <--  p2        text
    FORM build_fieldcatlog_0000 USING temp_fieldcat TYPE slis_t_fieldcat_alv
      DATA : wa_temp_fieldcat TYPE slis_fieldcat_alv.
      wa_temp_fieldcat-tabname = 'IT0000'.
      wa_temp_fieldcat-fieldname = 'BEGDA'.
      wa_temp_fieldcat-seltext_m = 'From Date'.
      APPEND wa_temp_fieldcat TO temp_fieldcat.
      CLEAR wa_temp_fieldcat.
      wa_temp_fieldcat-tabname = 'IT0000'.
      wa_temp_fieldcat-fieldname = 'ENDDA'.
      wa_temp_fieldcat-seltext_m = 'To Date'.
      APPEND wa_temp_fieldcat TO temp_fieldcat.
      CLEAR wa_temp_fieldcat.
      wa_temp_fieldcat-tabname = 'IT0000'.
      wa_temp_fieldcat-fieldname = 'MASSN'.
      wa_temp_fieldcat-seltext_m = 'Action'.
      APPEND wa_temp_fieldcat TO temp_fieldcat.
      CLEAR wa_temp_fieldcat.
      wa_temp_fieldcat-tabname = 'IT0000'.
      wa_temp_fieldcat-fieldname = 'MASSG'.
      wa_temp_fieldcat-seltext_m = 'Reason'.
      APPEND wa_temp_fieldcat TO temp_fieldcat.
      CLEAR wa_temp_fieldcat.
      wa_temp_fieldcat-tabname = 'IT0000'.
      wa_temp_fieldcat-fieldname = 'AEDTM'.
      wa_temp_fieldcat-seltext_m = 'Action Run On'.
      APPEND wa_temp_fieldcat TO temp_fieldcat.
      CLEAR wa_temp_fieldcat.
    ENDFORM.                    " BUILD_FIELDCATLOG
    *&      Form  EVENT_CALL_0000
          text
    -->  p1        text
    <--  p2        text
    FORM event_call_0000.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       EXPORTING
         i_list_type           = 0
       IMPORTING
         et_events             = v_events
    EXCEPTIONS
      LIST_TYPE_WRONG       = 1
      OTHERS                = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " EVENT_CALL_0000
    *&      Form  POPULATE_EVENT_0000
          text
    -->  p1        text
    <--  p2        text
    FORM populate_event_0000.
      READ TABLE v_events INTO wa_event WITH KEY name = 'TOP_OF_PAGE'.
      IF sy-subrc EQ 0.
        wa_event-form = 'F_TOP_OF_PAGE'.
        MODIFY v_events FROM wa_event TRANSPORTING form WHERE name =
    wa_event-form.
      ENDIF.
    ENDFORM.                    " POPULATE_EVENT_0000
    *&      Form  TOP_OF_PAGE
          text
    FORM f_top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary       = it_listheader1
       i_logo                   =
       I_END_OF_LIST_GRID       =
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  USER_COMMAND
          text
         -->R_UCOMM    text
         -->,          text
         -->RS_SLEFIELDtext
    *retreiving values from the database table ekko
    FORM data_retrieval_0000.
      SELECT pernr begda endda massn massg aedtm
             FROM pa0000
             INTO TABLE it0000
             WHERE pernr = temp_pernr.
    ENDFORM.
    *&      Form  BUILD_LISTHEADER_0000
          text
         -->P_IT_LISTHEADER  text
    FORM build_listheader_0000 USING i_listheader1 TYPE slis_t_listheader.
      DATA: hline1 TYPE slis_listheader.
      hline1-typ = 'H'.
      hline1-info = 'Actions Detail List'.
      APPEND hline1 TO i_listheader1.
    ENDFORM.                    " BUILD_LISTHEADER_0000
    *&      Form  DISPLAY_ALV_0000
          text
    -->  p1        text
    <--  p2        text
    FORM display_alv_0000.
      CONCATENATE 'Actions For Personnel Number ' temp_pernr
                   INTO i_title_0000 SEPARATED BY ' '.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
         i_callback_program                = v_repid
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = 'F_USER_COMMAND'
         i_callback_top_of_page            = 'F_TOP_OF_PAGE'
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
         i_grid_title                      = i_title_0000
      I_GRID_SETTINGS                   =
       is_layout                          = alv_layout
         it_fieldcat                      = i_fieldcat1[]
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         =
         i_save                            = 'A'
      IS_VARIANT                        =
         it_events                         = v_events
        TABLES
          t_outtab                          = it0000
       EXCEPTIONS
         program_error                     = 1
         OTHERS                            = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " DISPLAY_ALV_0000
    Regards,
    Tejas

  • How to create a Custom List without the column "Title" ?

    Maybe this one is easy as it sounds, I just want to know how to create a little list for my SharePoint application featuring 3 columns:
    1 - User Name (this should be Person type - UNIQUE + Required)  
    2 - Report (Memo - Required)
    3 - Status (Choice + Required)
    The list will be used to allow the users to submit a weekly report and I don't want to include the title because there is no use to me, I know I can hide the column by customizing the list but this sounds very amateur even for a newbie like me (yeah... sounds
    so cheap!), since I've been reading a lot about custom content types and I still didn't get the chance to use this properly I was wondering how I could put them to use and I guess the example here would be the best right?  
    I really spent some time trying but I always end getting the Title even when I try to use custom content types so I'm really giving up and asking for some help at this point.
    Thanks a lot for the help!!!

    Yes, you can do that. If you need a different content type with your custom fields. Following are the steps : http://www.dotnetcurry.com/ShowArticle.aspx?ID=620 
    After creating your custom Content Type, Click on the 'Title' filed in your custom content type. 
    In the 'Column Settings' make it 'Hidden (Will not appear in forms)' and click ok.
    Now add this content type to your list/library. 
    In the list/Library go to setting and 'Advance settings' and make the 'Allow management of Content Type?' as 'yes' and click ok.
    Now make default content type not visible from 'Change new button order and default content type' link in the settings page of list/library, and your contet type as 'Default'.
    Create a new view, remove the 'Title' field and make that view as 'dafault' view, you can delete the 'All Items' view also if required.
    Now whenever user come to that list/Library they will not see the title column and also will not appear in the 'New Item'.
    Note : The 'Title' field is mandatory in all the list/library and by default added to the 'All Item' view. So, by doing above steps you are creating a new content type where 'Title' is not mandatory and also not added in default view.
    get2pallav
    Please click "Propose As Answer" if this post solves your problem or "Vote As Helpful" if this post has been useful to you.

  • How to create user defined button in alv report

    how to create user defined button in alv report
    thnks in advance.

    Hi,
    U can define it the the PF-STATUS ( Menu for ALV ).
    For that u have to define it in the EVENTCAT.
    form z_eventcat  using    p_i_eventcat type slis_t_event.
      data: i_event type slis_alv_event.
      call function 'REUSE_ALV_EVENTS_GET'
        exporting
          i_list_type     = 0
        importing
          et_events       = p_i_eventcat
        exceptions
          list_type_wrong = 1
          others          = 2.
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
      clear i_event.
      read table p_i_eventcat with key name = slis_ev_top_of_page into
      i_event.
      if sy-subrc = 0.
        move 'TOP_OF_PAGE' to i_event-form.
        append i_event to p_i_eventcat.
      endif.
      read table p_i_eventcat with key name = slis_ev_pf_status_set into i_event.
      if sy-subrc = 0.
        move 'SET_PF_STATUS' to i_event-form.
        append i_event to p_i_eventcat.
      endif.
      clear i_event.
      read table p_i_eventcat into i_event with key name = slis_ev_user_command .
      if sy-subrc = 0.
        move 'USER_COMMAND' to i_event-form.
        append i_event to p_i_eventcat.
      endif.
    And in the DISPLAY
    call function 'REUSE_ALV_GRID_DISPLAY'
       exporting
         i_callback_program                = v_progname
         i_callback_pf_status_set          = 'SET_PF_STATUS'
         i_callback_user_command           = 'USER_COMMAND'
         i_callback_top_of_page            = 'TOP_OF_PAGE'
         i_grid_title                      = v_gridtitle
         i_save                            = 'A'
         is_layout                         = i_layout
         it_fieldcat                       = i_fieldcat[]
         it_sort                           = i_sortinfo
         it_events                         = i_eventcat
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        tables
          t_outtab                          = it_final
       exceptions
         program_error                     = 1
         others                            = 2
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    *MENU SETTINGS.
    form set_pf_status using rt_extab type slis_t_extab.
      set pf-status 'ALV_MENU'.
    endform.                    "SET_PF_STATUS
    endform.                    " Z_EVENTCAT
    Now double click on ALV MENU nad u can create a button in the application bar.
    Regards,
    Pritha.

  • How to create a pulldown list in numbers

    how to create a pulldown list in numbers

    Here is it:
    Open Applescript editor
    Copy the entire script and paste it into Applescript Editor
    Compile it
    Read the instructions at the top of the script
    Run the script, following the instructions.
    You can save the script and it will be available in the Scripts menu (on the right side of the menu bar where Time Machine , Airport, and all those icons are).
    Copy and paste all of what is below:
    -- Script to populate a Numbers pop-up list.
    -- Instructions:
    --                    GUI scripting must be on in System Preferences
    --                    Create a list of items. Must be a contiguous range of cells in a table.
    --                    Select the range of cells to use as items in the popup.
    --                    Run the script. 
    --                    A dialog box will appear asking you to select which cells you want to turn into pop-ups
    --                    Select the cells then click OK on the dialog box
    set tValues to my doThis(1) -- get values of the selection
    if tValues is not "" then
      activate
              display dialog "Select the cells where you want to create the PopUp." & return & "After that, click on the 'OK' button."
              my doThis(tValues) -- set the cell format of the new selection to "PopUp Menu" and set the values of the each menu item
              tell application "Numbers" to display dialog "Done"
    else
              tell application "Numbers" to display dialog "You must select the cells in a table before running this script."
    end if
    on doThis(n)
              tell application "Numbers"
                        set tTables to (tables of sheets of front document whose its selection range is not missing value)
                        repeat with t in tTables -- t is a list of tables of a sheet
                                  if contents of t is not {} then -- this list is not empty, it's the selected sheet
                                            set activeTable to (get item 1 of t)
                                            if n = 1 then return value of cells of selection range of activeTable -- return values of the selection
                                            set format of (cells of selection range of activeTable) to pop up menu -- set the format to pop up menu
                                            return my setValuePopUp(n) -- set value of each menu item
                                  end if
                        end repeat
              end tell
              return ""
    end doThis
    on setValuePopUp(L)
              tell application "System Events"
                        tell process "Numbers"
                                  set frontmost to true
                                  delay 0.3
                                  set inspectorWindow to missing value
                                  set tWindows to windows whose subrole is "AXFloatingWindow"
                                  repeat with i in tWindows
                                            if exists radio group 1 of i then
                                                      set inspectorWindow to i
                                                      exit repeat
                                            end if
                                  end repeat
                                  if inspectorWindow is missing value then
      keystroke "i" using {option down, command down} -- Show Inspector
                                  else
      perform action "AXRaise" of inspectorWindow -- raise the Inspector window to the front
                                  end if
                                  delay 0.3
                                  tell window 1
      click radio button 4 of radio group 1 -- the "cell format" tab
                                            delay 0.3
                                            tell group 2 of group 1
                                                      set tTable to table 1 of scroll area 1
                                                      set tc to count rows of tTable
                                                      set lenL to (count L)
                                                      if tc < lenL then -- ** add menu items **
                                                                repeat until (count rows of tTable) = lenL
      click button 1 -- button [+]
                                                                end repeat
      keystroke return -- validate the default name of the last menu item
                                                      else if tc > lenL then -- ** remove menu items **
                                                                repeat while exists row (lenL + 1) of tTable
                                                                          select row (lenL + 1) of tTable
      click button 2 --  button [-]
                                                                end repeat
                                                      end if
                                                      tell tTable to repeat with i from 1 to lenL -- ** change value of each menu item **
                                                                set value of text field 1 of row i to item i of L
                                                      end repeat
                                            end tell
                                  end tell
                        end tell
              end tell
    end setValuePopUp

  • How to create a radio button in ALV Reports

    Hi all,
    Best wishes to all..
    Kindly reply me to this question... that is "How to create a radio button in ALV Report"
    Thanks and Regards
    Anjali

    HI
    here is an example :
    PROGRAM ZUS_SDN_BCALV_GRID_DEMO_2.
    Based on: BCALV_GRID_DEMO.
    TYPE-POOLS: icon.
    TYPES: BEGIN OF ty_s_sflight.
    INCLUDE TYPE sflight.
    TYPES: button1    TYPE lvc_emphsz.
    TYPES: button2    TYPE lvc_emphsz.
    TYPES: button3    TYPE lvc_emphsz.
    TYPES: button4    TYPE lvc_emphsz.
    TYPES: END OF ty_s_sflight.
    DATA:
      gt_sflight    TYPE STANDARD TABLE OF ty_s_sflight,
      gt_fcat       TYPE lvc_t_fcat.
    DATA: ok_code LIKE sy-ucomm,
         gt_sflight TYPE TABLE OF sflight,
          g_container TYPE scrfname VALUE 'BCALV_GRID_DEMO_0100_CONT1',
          grid1  TYPE REF TO cl_gui_alv_grid,
          g_custom_container TYPE REF TO cl_gui_custom_container.
          CLASS lcl_eventhandler DEFINITION
    CLASS lcl_eventhandler DEFINITION.
      PUBLIC SECTION.
        CLASS-DATA:
          md_cnt    TYPE i.
        CLASS-METHODS:
          handle_hotspot_click FOR EVENT hotspot_click OF cl_gui_alv_grid
            IMPORTING
              e_row_id
              e_column_id
              es_row_no
              sender.
    ENDCLASS.                    "lcl_eventhandler DEFINITION
          CLASS lcl_eventhandler IMPLEMENTATION
    CLASS lcl_eventhandler IMPLEMENTATION.
      METHOD handle_hotspot_click.
    define local data
        FIELD-SYMBOLS:
          <ls_entry>    TYPE ty_s_sflight,
          <ld_fld>      TYPE ANY.
        READ TABLE gt_sflight ASSIGNING <ls_entry> INDEX es_row_no-row_id.
        CHECK ( <ls_entry> IS ASSIGNED ).
      Set all radio buttons "unselected"
        <ls_entry>-button1 =  icon_wd_radio_button_empty.
        <ls_entry>-button2 =  icon_wd_radio_button_empty.
        <ls_entry>-button3 =  icon_wd_radio_button_empty.
        <ls_entry>-button4 =  icon_wd_radio_button_empty.
        ASSIGN COMPONENT e_column_id-fieldname OF STRUCTURE <ls_entry>
                                                  TO <ld_fld>.
        IF ( <ld_fld> IS ASSIGNED ).
        Set selected radio button "selected".
          <ld_fld> = icon_wd_radio_button.
        ENDIF.
      Force PAI followed by refresh of table display in PBO
        CALL METHOD cl_gui_cfw=>set_new_ok_code
          EXPORTING
            new_code = 'DUMMY'
         IMPORTING
           RC       =
      ENDMETHOD.                    "handle_hotspot_click
    ENDCLASS.                    "lcl_eventhandler IMPLEMENTATION
    START-OF-SELECTION.
          MAIN                                                          *
      PERFORM select_data.
      CALL SCREEN 100.
          MODULE PBO OUTPUT                                             *
    MODULE pbo OUTPUT.
      SET PF-STATUS 'MAIN100'.
      IF g_custom_container IS INITIAL.
        CREATE OBJECT g_custom_container
               EXPORTING container_name = g_container.
        CREATE OBJECT grid1
               EXPORTING i_parent = g_custom_container.
        PERFORM build_fieldcatalog.
        CALL METHOD grid1->set_table_for_first_display
         EXPORTING
           i_structure_name = 'SFLIGHT'
          CHANGING
            it_fieldcatalog  = gt_fcat
            it_outtab        = gt_sflight.
      Set event handler for event TOOLBAR
        SET HANDLER:
          lcl_eventhandler=>handle_hotspot_click FOR grid1.
      else.
        CALL METHOD grid1->refresh_table_display
         EXPORTING
           IS_STABLE      =
           I_SOFT_REFRESH =
          EXCEPTIONS
            FINISHED       = 1
            others         = 2.
        IF sy-subrc <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                   WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
    ENDMODULE.                    "PBO OUTPUT
          MODULE PAI INPUT                                              *
    MODULE pai INPUT.
      to react on oi_custom_events:
      CALL METHOD cl_gui_cfw=>dispatch.
      CASE ok_code.
        WHEN 'EXIT'.
          PERFORM exit_program.
        WHEN OTHERS.
        do nothing
      ENDCASE.
      CLEAR ok_code.
    ENDMODULE.                    "PAI INPUT
          FORM EXIT_PROGRAM                                             *
    FORM exit_program.
    CALL METHOD G_CUSTOM_CONTAINER->FREE.
    CALL METHOD CL_GUI_CFW=>FLUSH.
      LEAVE PROGRAM.
    ENDFORM.                    "EXIT_PROGRAM
    *&      Form  BUILD_FIELDCATALOG
          text
    -->  p1        text
    <--  p2        text
    FORM build_fieldcatalog .
    define local data
      DATA:
        ls_fcat        TYPE lvc_s_fcat,
        ls_hype        TYPE lvc_s_hype.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
        I_BUFFER_ACTIVE              =
          i_structure_name             = 'LVC_S_FCAT'
        I_CLIENT_NEVER_DISPLAY       = 'X'
        I_BYPASSING_BUFFER           =
        I_INTERNAL_TABNAME           =
        CHANGING
          ct_fieldcat                  = gt_fcat
        EXCEPTIONS
          inconsistent_interface       = 1
          program_error                = 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.
      DELETE gt_fcat WHERE ( fieldname <> 'EMPHASIZE' ).
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
        I_BUFFER_ACTIVE              =
          i_structure_name             = 'SFLIGHT'
        I_CLIENT_NEVER_DISPLAY       = 'X'
        I_BYPASSING_BUFFER           =
        I_INTERNAL_TABNAME           =
        CHANGING
          ct_fieldcat                  = gt_fcat
        EXCEPTIONS
          inconsistent_interface       = 1
          program_error                = 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.
      READ TABLE gt_fcat INTO ls_fcat
           WITH KEY fieldname = 'EMPHASIZE'.
      IF ( syst-subrc = 0 ).
        DELETE gt_fcat INDEX syst-tabix.
      ENDIF.
      ls_fcat-fieldname = 'BUTTON4'.
      ls_fcat-icon    = 'X'.
      ls_fcat-hotspot = 'X'.
      INSERT ls_fcat INTO gt_fcat INDEX 4.
      ls_fcat-fieldname = 'BUTTON3'.
      INSERT ls_fcat INTO gt_fcat INDEX 4.
      ls_fcat-fieldname = 'BUTTON2'.
      INSERT ls_fcat INTO gt_fcat INDEX 4.
      ls_fcat-fieldname = 'BUTTON1'.
      INSERT ls_fcat INTO gt_fcat INDEX 4.
      LOOP AT gt_fcat INTO ls_fcat.
        ls_fcat-col_pos = syst-tabix.
        MODIFY gt_fcat FROM ls_fcat INDEX syst-tabix.
      ENDLOOP.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  SELECT_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM select_data .
    define local data
      DATA:
        ls_sflight    TYPE ty_s_sflight.
      SELECT * FROM sflight INTO CORRESPONDING FIELDS OF TABLE gt_sflight.
      ls_sflight-button1 = icon_wd_radio_button.
      ls_sflight-button2 = icon_wd_radio_button_empty.
      ls_sflight-button3 = icon_wd_radio_button_empty.
      ls_sflight-button4 = icon_wd_radio_button_empty.
      MODIFY gt_sflight FROM ls_sflight
          TRANSPORTING button1 button2 button3 button4
        WHERE ( carrid IS NOT INITIAL ).
    ENDFORM.                    " SELECT_DATA
    Regards,
    Prasanth
    Reward all helpful answers

Maybe you are looking for

  • What's wrong with my Button?

    Hello everyone, I been trying to get my Button working, but I don't understand what's wrong. I've tried a bunch of stuff, each with failure. Can any of you guys help me out here? I know that it's a little bit of a mess, but for some reason, it gives

  • Stuck on the second page.

    Post Author: alex757 CA Forum: Crystal Reports I am having a problem with a couple of crystal reports that I have recently developed. The reports were created using CR 9.5 and are posted on Crystal Enterprise 9.0 server. When the either of the two re

  • Importing stereo tracks, simple and silly

    So I've stepped away from the sound portion of my work and am now getting back to the grind. I have FCP suite 5. When I export from FCP to STP as a multitrack project I unlink the stereo pair of my field recordings, and they appear as separate tracks

  • Can i print a card i make in iPhoto '11, can i print a card i make in iPhoto '11

    the title says it can i print at home a card i make in iphoto '11 rather than paying Apple to do it? thx Deb

  • Viewing and modifying deployed ess appls in NWDS

    Hi All, we successfully installed and configured NWDI and created tracks and imported the relevant sca files in the Development system. At this point of time, we want to open up one of the ess applications in NWDS to be able to understand the structu