Application Development 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: 

Slection screen of BDC

Former Member
0 Kudos

hi folks,

For my BDC program, on the selection screen..there will be two radio buttons...one for uplaoding local file..and other for application server file..and there will be a parameter which holds the path file. if i click local file radio button and click the path file a pop up window should apper for browsing the file in PC...My problem is if i default the first radio button to 'x', then the window is opened for both the radio buttons. if i wont default it, the pop up window not appearing itself...here am giving my peice of code..pls suggest me..

PARAMETERS :R_Local radiobutton group rad1 default 'X' ,

R_Apps radiobutton group rad1 .

PARAMETERS :filename TYPE rlgrap-filename .

AT SELECTION-SCREEN ON VALUE-REQUEST FOR filename.

REFRESH: it_tab.

IF R_Local = 'X'.

CALL METHOD cl_gui_frontend_services=>file_open_dialog

EXPORTING

window_title = 'UPLOAD_FILE'

default_filename = ' '

multiselection = ' '

CHANGING

file_table = it_tab

rc = gd_subrc.

ELSEIF R_Apps = 'X'.

xxxx.

ENDIF.

Thanks.

Edited by: Ram K on Jun 27, 2008 10:38 AM

3 REPLIES 3

Former Member
0 Kudos

Refer this code:

*Radiobuttons for selecting application/presentation server
SELECTION-SCREEN:BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETER :  rb_ap RADIOBUTTON GROUP g1 USER-COMMAND cli1, "radiobutton for application server
             rb_pr RADIOBUTTON GROUP g1  DEFAULT 'X'.      "radiobutton for presentation server
SELECTION-SCREEN END OF BLOCK b1.

*create subscreen area on selection screen.

SELECTION-SCREEN: BEGIN OF TABBED BLOCK tab1 FOR 10 LINES,
                  END OF BLOCK tab1.
*subscreen which appears after selecting application server
SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
*Enter dataset name on application server
SELECTION-SCREEN BEGIN OF BLOCK sub1 WITH FRAME TITLE text-002.
PARAMETERS: p_file1(132) LOWER CASE OBLIGATORY .
SELECTION-SCREEN END OF BLOCK sub1.
SELECTION-SCREEN END OF SCREEN 100.

*subscreen which appears after selecting application server
SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK sub2 WITH FRAME TITLE text-005.
*Enter file name on presentation server
PARAMETERS:  p_file TYPE rlgrap-filename OBLIGATORY.
SELECTION-SCREEN END OF BLOCK sub2.
SELECTION-SCREEN END OF SCREEN 200.

INITIALIZATION.
  tab1-prog = sy-repid.
  tab1-dynnr = 200.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
*Function which enables the user to browse the files on hard disk
  CALL FUNCTION 'KD_GET_FILENAME_ON_F4'                  "#EC NO_INCOMP
    EXPORTING
      program_name  = syst-repid
      static        = 'X'
    CHANGING
      file_name     = p_file
    EXCEPTIONS
      mask_too_long = 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.
AT SELECTION-SCREEN ON RADIOBUTTON GROUP g1.
*pass the subscreen number
  IF rb_ap = 'X'.
    tab1-dynnr = 100.
  ELSEIF rb_pr = 'X'.
    tab1-dynnr = 200.
  ENDIF.

Former Member
0 Kudos

Hi,

Write USER-COMMAND Rad1 after Default 'X'

In Radiobutton Declaration.

Regards,

Sujit

Former Member
0 Kudos

hi...

In ur selection-screen on value request even call the function module DYNP_VALUES_READ..

this function module is used to read the values from the selection screen at the runtime... and based on that processing of f4 help has to be done.

hope this would solve ur issue

regards

padma