Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Module Pool - Pop-Up Input Screen

Former Member
0 Likes
1,850

Hi Experts,

I have this scenario:

I have a table control and two radio buttons say R1 and R2.

R1 -> Single

First Requirement-> When R2 is clicked, a button to its adjacent position should become visible and activated.

Second Requirement-> When the above button is clicked, a new table control should get displayed as a pop-up window type, and user can enter more data or more rows.

Please share code

Thanks

Chandan

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,132

Hi Chandan,



double click on the radoi button and create a function code for the radio button.

In rhe PBO write the code for function code..

case sy-ucomm.
when 'Function for radio button1'.
        table-control-1-invisible = 'X'.   "table control1 invisible is set to 'X" then the table control is not cisible on the screen.
 table-control-2-invisible = ' '.   "Table control 2 is visible on the screen.
when 'Function for radio button2'.
       table-control-2-invisible = 'X'.   "table control2 invisible 
        table-control-1-invisible = ' '.   "Table control 1 is visible on the screen.
endcase.

if you need pop with alv format to diaply data use this fm ..but iw will allow you to selct and not to edit..


CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
    EXPORTING
      i_title               = 'Batch Number Selection'
      i_selection           = 'X'
      i_screen_start_column = 5
      i_screen_start_line   = 5
      i_screen_end_column   = 70
      i_screen_end_line     = 20
      i_tabname             = 'T_BATCH'
      it_fieldcat           = gt_fieldcat_drd[]                  "field catalog for internal table
    IMPORTING
      es_selfield           = gc_selfield            "if you select field on the pop-up the selcted field and index is captured
    TABLES
      t_outtab              = t_batch                 "internal Table values want to show on the POP-Up
    EXCEPTIONS
      program_error         = 1
      OTHERS                = 2.
  IF sy-subrc <> 0.
  ENDIF.

Regards,

Prabhudas

2 REPLIES 2
Read only

Former Member
0 Likes
1,133

Hi Chandan,



double click on the radoi button and create a function code for the radio button.

In rhe PBO write the code for function code..

case sy-ucomm.
when 'Function for radio button1'.
        table-control-1-invisible = 'X'.   "table control1 invisible is set to 'X" then the table control is not cisible on the screen.
 table-control-2-invisible = ' '.   "Table control 2 is visible on the screen.
when 'Function for radio button2'.
       table-control-2-invisible = 'X'.   "table control2 invisible 
        table-control-1-invisible = ' '.   "Table control 1 is visible on the screen.
endcase.

if you need pop with alv format to diaply data use this fm ..but iw will allow you to selct and not to edit..


CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
    EXPORTING
      i_title               = 'Batch Number Selection'
      i_selection           = 'X'
      i_screen_start_column = 5
      i_screen_start_line   = 5
      i_screen_end_column   = 70
      i_screen_end_line     = 20
      i_tabname             = 'T_BATCH'
      it_fieldcat           = gt_fieldcat_drd[]                  "field catalog for internal table
    IMPORTING
      es_selfield           = gc_selfield            "if you select field on the pop-up the selcted field and index is captured
    TABLES
      t_outtab              = t_batch                 "internal Table values want to show on the POP-Up
    EXCEPTIONS
      program_error         = 1
      OTHERS                = 2.
  IF sy-subrc <> 0.
  ENDIF.

Regards,

Prabhudas

Read only

Former Member
0 Likes
1,132
In PAI.
Case Sy-ucomm.
 When 'Botton CLicked'.     " Any Button is clicked
FL_FLAG = 'X'.
ENDCASE.



PBO:
If Fl_FLAG = 'X'.
Clear Fl_flag.
IF R2 = 'X'.
Loop at Screen.
IF Screen-name Cs 'Push Button'
Screen-Active = 1.
ENDIF.
Modify Screen.
ENDLOOP.

ELSEIF R1 = 'X'.
Call a Modal Dialog Box with Table Control.
ENDIF.
ENDIF.

Regards,

Gurpreet