Skip to Content
avatar image
Former Member

POPUP_GET_SELECTION_FROM_LIST : How to get selected record

Hi All,

I have used POPUP_GET_SELECTION_FROM_LIST to display POP UP.

But there is only cancel button coming on the POP UP.

Please how can I select a record in pop up and get into my program.

Thanks & Regards,

Gaurav Mittal

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Sep 12, 2008 at 01:57 AM

    Hi,

    that table has to have filed "CHECKBOX" with type XFELD (CHAR1). SO user will be able to select records from the table using this checkbox field. This FM is used for example in the include LSZA1I01 so you can check it there.

    There are also other FM which displays pop up with some table. You can try for example POPUP_GET_VALUES.

    Cheers

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 12, 2008 at 03:12 AM

    i hope you are using the checkbox field in your internal table , if you don't use that the function will not work, it will raise the exception.

    you need select the record in the popup using the Box in the beginning of the row, then the checkbox fieldvalue will be 'X' for the selected record. just select the record and click the cancel button, the record will be selected and the information will be transferred to itab.

    Check this example..

    DATA: BEGIN OF it_list OCCURS 0,
            checkbox TYPE c,
            carrid TYPE sflight-carrid,
          END OF it_list.
    
    SELECT carrid FROM sflight
    INTO CORRESPONDING FIELDS OF TABLE it_list
    UP TO 20 ROWS.
    CALL FUNCTION 'POPUP_GET_SELECTION_FROM_LIST'
      EXPORTING
        table_name                   = 'SFLIGHT'
        title_bar                    = 'test title'
      TABLES
        list                         = it_list
        functions                    = functions
      EXCEPTIONS
        no_tablefields_in_dictionary = 1
        no_table_structure           = 2
        no_title_bar                 = 3
        parameter_error              = 4
        internal_error               = 5.
    BREAK-POINT.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      But I Dont want cross button..and let me know how to fill function structure,,..

      Thanks,

      Gaurav