F4 on selection screen in BDC

can you tell me how to get a file from desktop to selection screen.
iam using the KD_GET_FILENAME_ON_F4 function module .
F4 functionality is not getting.
regards
RAj.

Check out this
CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG which has export parameters like:
INITIAL_DIRECTORY etc
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
    EXPORTING
       DEFAULT_FILENAME        = '
corp-abc\sap-abap\'
    CHANGING
       FILE_TABLE              = ITAB_FILE1_TABLE
       RC                      = RC_FILE
     EXCEPTIONS
       FILE_OPEN_DIALOG_FAILED = 1
       CNTL_ERROR              = 2
       ERROR_NO_GUI            = 3
       NOT_SUPPORTED_BY_GUI    = 4
       others                  = 5.
  IF SY-SUBRC <> 0.
  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

Similar Messages

  • Hide selection screen  in BDC

    Hi Experts,
    i created a bdc for VA01 transaction. i use include bdcrecx1 in my code every time while i run the prog it shows a selection screen to select generate session or call transaction methode, but i want to hide that screen for user by automatically selecting call transaction radio button with processing mode 'N' and update mode 'A'
    can anyone explain with sample code...

    Hi arun ,
    please close this duplicate entry.
    Regards
    prabhu

  • Selection screen texts missing

    Hi friends,
    I am working on a BDC program and when I execute my program, I see that the texts are missing in the selection screen. Can anyone tell me what should be done in order to display the texts in the selection screen in BDC.
    Thanks,
    RAJ.

    Hi Raj,
    1. i suppose u are using
      include bdcrecx1.
    2. Due to this,
       u will have to MANUALLY
       type them / enter them
       thru the menu GOTO-->TEXT ELEMENTS
    3. Since its an include,
       the system does not automaticlly recognise it.
    4. However, u can check FROM DICT Option.
    5. Those which are manual,
      u will have to write them / enter them.
    regards,
    amit m.

  • Skip the selection screen using BDCTAB call transaction

    Hi experts,
    I am using BDCTAB for call transaction SWI1 I need to skip the selection screen. Can you please tell me how to skip the selection screen using BDC call transaction?
    Thank you in advance.....

    hi,
    the first step is to pass some values to the selection screen, at least Date From and Date To; otherwise, it´ll take a long time. The second step is to emulate the Execute button, which is done with '/08'.
    PERFORM fields USING 'BDC_OKCODE'   '/08'.
    Third step is to catch the programme and screen number.

  • Filename disappears on selection screen -BDC

    Hi all,
    I have an issue with my BDC,the seleection screen for picking up the file using parameters doesnt comes up in my parameter box. following is the code i'm using :
    DATA: g_filename TYPE string.
    **************FILE UPLOADING/DOWNLOADING**************************************
    SELECTION-SCREEN BEGIN OF  BLOCK block WITH FRAME TITLE text-001.
    PARAMETERS : in_file LIKE rlgrap-filename OBLIGATORY.
                SUC_FILE LIKE RLGRAP-FILENAME OBLIGATORY,
                SUCI_FIL LIKE RLGRAP-FILENAME OBLIGATORY,
                ERR_FILE LIKE RLGRAP-FILENAME OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK block.
    For Browsing the Input File Name on the Presentation Server         *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR in_file.
    CALL FUNCTION 'C13G0_GET_FILENAME_F4'
        CHANGING
          x_filename    = in_file
        EXCEPTIONS
          mask_too_long = 1.
    PERFORM get_filename USING in_file.
    Using call function for uploading a file                             *
    START-OF-SELECTION.
    g_filename = in_file.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename            = g_filename
          filetype            = 'ASC'
          has_field_separator = 'X'
        TABLES
          data_tab            = it_bdc.
    END-OF-SELECTION.
    NEED HELP GURUS !
    EAGERLY WAITIN FOR REPLIES,
    SACHIN

    i guess the FM u had used should contain one more exporting parameter,
    but use his
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR in_file.
      CALL FUNCTION 'F4_FILENAME'
           EXPORTING
                program_name  = v_repid
                dynpro_number = syst-dynnr
                field_name    = 'IN_FILE'
           IMPORTING
                file_name     = in_file.

  • Issue with MB25 BDC for Dynamic Selection Screen

    Hi Experts,
    I recorded one BDC for MB25 Tcode regarding to determine Open Reservation(s) in E Mode (Display Mode). I am passing 3 parameters.
    1. Plant,
    2. Requirement Date
    3. Multiple Reservation Numbers i.e. RSNUM from Dynamic Selection i.e. 2nd Button -> Header Data for Reservation -> Reservation -> Multiple Selection Icon.
    But while executing that BDC, I need to manually click every time on 'Header Data for Reservation' Tree and then Multiple Selection for Reservation Icon.
    I want below steps automatically while executing:
    - Open 'Header Data for Reservation' Tree
    - Click Reservation
    - Open Popup for 'Multiple Selection'.
    So no need to click every time on Dynamic Selection Screen i.e. Header Data for Reservation -> Reservation -> Multiple Selection Icon.
    Please find attached screen shot for your reference.
    Please guide.
    Thanks and Regards,
    Emon Master

    Hello Jainam,
    submit (sy-repid) with selection-table v_sp
                             with free selections EXPRESSIONS
                             via selection-screen.
    Without going through the details, dont you think this will cause an inifinite loop as the calling & the called programs are the same.
    Please enlighten me !!
    BR,
    Suhas

  • I have mapped the fields on the selection-screen  to the BDC on transaction

    I have mapped the fields on the selection-screen  to the BDC on transaction F110.
    When I am selecting a particular any value in select-option on the selection screen, it is giving some default value and the value given by me,for example:
    Payment methods:C
    but in BDC recording for F110 Payment methods:IEQC when the programs is running in foreground mode.
    how can I rectify it?

    This is because payment methods may be a table and what you see IEQC is actually, I for include, EQ for equal and C as your payment method. This is standard structure for ranges or select-options. You can use variable-low which will give you only C.

  • BDC on Selection Screen report

    Hi Experts,
    Is there any norm of NOT using BDC for selection screen reports? Please share your experience if someone had used it and faced issues later.
    Thanks,
    Chirantan

    Hi Chirantan ,
    I would advice you to use submit report option instead of BDC.
    First capture your selection screen parameters into a selection_table and fill it with suitable data .
    Use submit report and there you go......... report is executed.
    ALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
                EXPORTING
                  CURR_REPORT               = 'ZREPORT'
    *         IMPORTING
    *           SP                        =
                TABLES
                  SELECTION_TABLE           = LT_SELSCREEN
    *           SELECTION_TABLE_255       =
    *         EXCEPTIONS
    *           NOT_FOUND                 = 1
    *           NO_REPORT                 = 2
    *           OTHERS                    = 3
              IF SY-SUBRC <> 0.
    * Implement suitable error handling here
              ENDIF.
    * Fill LT_SELSCREEN
              LOOP AT LT_SELSCREEN INTO LW_SELSCREEN.
                CASE LW_SELSCREEN-SELNAME.
    *           WHEN OTHERS.
                ENDCASE.
              ENDLOOP.
                SUBMIT ZREPORT
                      USING SELECTION-SCREEN 1000
                WITH SELECTION-TABLE LT_SELSCREEN
                AND RETURN .
    Regards ,
    Yogendra Bhaskar

  • Bdc: selection screen error

    HI,
    In the bdc program, after uploading a file in the selection screen using parameter selection, the screen gets refrehed and returns to the selection screen with no further action. How do I solve this error?

    *& Report  ZSALES2
    REPORT  ZSALES2.
    tables:VBAK,
           vbkd,
           kuagv,
           rv45a,
           vbap.
    types :begin of t_records,
           AUART type VBAK-AUART,
           BSTKD type VBKD-BSTKD,
           BSTDK type VBKD-BSTDK,
           KUNNR type KUAGV-KUNNR,
           KETDAT type RV45A-KETDAT,
           KPRGBZ type RV45A-KPRGBZ,
           PRSDT type VBKD-PRSDT,
           ZTERM type VBKD-ZTERM,
           MABNR type RV45A-MABNR,
           KWMENG type RV45A-KWMENG,
           POSNR type VBAP-POSNR,
           end of t_records.
    data: it_records type table of t_records,
            wa_records type t_records.
    DATA : BDCDATA TYPE TABLE OF BDCDATA WITH HEADER LINE.
    PARAMETERS : P_FILE LIKE RLGRAP-FILENAME.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
    PERFORM GET_FILE.
    start-of-selection.
    PERFORM GET_DATA.
    PERFORM BDCDATA.
    *&      Form  GET_FILE
          text
    form GET_FILE .
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
    PROGRAM_NAME        = SYST-CPROG
    DYNPRO_NUMBER       = SYST-DYNNR
                            FIELD_NAME          = ' '
    IMPORTING
    FILE_NAME           = P_FILE.
    endform.                    " GET_FILE
    form GET_DATA.
    DATA:V_FILE TYPE STRING.
    V_FILE = P_FILE.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                      = V_FILE
       FILETYPE                      = 'DAT'
       HAS_FIELD_SEPARATOR           = 'X'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
      VIRUS_SCAN_PROFILE            =
      NO_AUTH_CHECK                 = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
      tables
        data_tab                      = it_records
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_READ_ERROR               = 2
      NO_BATCH                      = 3
      GUI_REFUSE_FILETRANSFER       = 4
      INVALID_TYPE                  = 5
      NO_AUTHORITY                  = 6
      UNKNOWN_ERROR                 = 7
      BAD_DATA_FORMAT               = 8
      HEADER_NOT_ALLOWED            = 9
      SEPARATOR_NOT_ALLOWED         = 10
      HEADER_TOO_LONG               = 11
      UNKNOWN_DP_ERROR              = 12
      ACCESS_DENIED                 = 13
      DP_OUT_OF_MEMORY              = 14
      DISK_FULL                     = 15
      DP_TIMEOUT                    = 16
      OTHERS                        = 17
    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.    " GET_DATA.
    form BDCDATA.
    loop at it_records into wa_records.
    *CALL TRANSCATION  "VA01" USING BDCDATA.
    perform bdc_dynpro      using 'SAPMV45A' '0101'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBAK-SPART'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'VBAK-AUART'
                                  'OR'.
    perform bdc_field       using 'VBAK-VKORG'
    perform bdc_field       using 'VBAK-VTWEG'
    perform bdc_field       using 'VBAK-SPART'
    perform bdc_dynpro      using 'SAPMSSY0' '0120'.
    perform bdc_field       using 'BDC_CURSOR'
                                  '07/12'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=PICK'.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'VBKD-BSTKD'.
    perform bdc_field       using 'VBKD-BSTKD'
                                  '123'.
    perform bdc_field       using 'VBKD-BSTDK'
                                  '08.10.2008'.
    perform bdc_field       using 'KUAGV-KUNNR'
                                  '31970063'.
    perform bdc_dynpro      using 'SAPMSSY0' '0120'.
    perform bdc_field       using 'BDC_CURSOR'
                                  '04/21'.
    perform bdc_field       using 'BDC_OKCODE'
                                  'PICK'.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'RV45A-KETDAT'
                                  '08.10.2008'.
    perform bdc_field       using 'RV45A-KPRGBZ'
                                  'D'.
    perform bdc_field       using 'VBKD-PRSDT'
                                  '08.10.2008'.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'VBKD-ZTERM'
                                  '0001'.
    perform bdc_dynpro      using 'SAPMSSY0' '0120'.
    perform bdc_field       using 'BDC_CURSOR'
                                  '06/11'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=PICK'.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'VBKD-BSTKD'
                                  '123'.
    perform bdc_field       using 'VBKD-BSTDK'
                                  '08.10.2008'.
    perform bdc_field       using 'KUAGV-KUNNR'
                                  '31970063'.
    perform bdc_field       using 'KUWEV-KUNNR'
                                  '31970063'.
    perform bdc_field       using 'RV45A-KETDAT'
                                  '08.10.2008'.
    perform bdc_field       using 'RV45A-KPRGBZ'
                                  'D'.
    perform bdc_field       using 'VBKD-PRSDT'
                                  '08.10.2008'.
    perform bdc_field       using 'VBKD-ZTERM'
                                  '0001'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RV45A-KWMENG(01)'.
    perform bdc_field       using 'RV45A-MABNR(01)'
                                  '102'.
    perform bdc_field       using 'RV45A-KWMENG(01)'
                                  '                  5'.
    perform bdc_dynpro      using 'SAPMSSY0' '0120'.
    perform bdc_field       using 'BDC_CURSOR'
                                  '05/08'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=PICK'.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'RV45A-MABNR(01)'
                                  '83'.
    perform bdc_dynpro      using 'SAPMSSY0' '0120'.
    perform bdc_field       using 'BDC_CURSOR'
                                  '16/04'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=PICK'.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'RV45A-MABNR(01)'
                                  '121'.
    perform bdc_field       using 'VBAP-POSNR(01)'
                                  '     1'.
    perform bdc_dynpro      using 'SAPMV45A' '4001'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/EBAC1'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RV45A-MABNR(01)'.
    perform bdc_transaction using 'VA01' .
    CALL TRANSCATION 'VA01' USING BDCDATA.
    ENDLOOP.
    endform.   "BDCDATA
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR BDCDATA.
      BDCDATA-PROGRAM  = PROGRAM.
      BDCDATA-DYNPRO   = DYNPRO.
      BDCDATA-DYNBEGIN = 'X'.
      APPEND BDCDATA.
    ENDFORM.
           Insert field                                                  *
    FORM BDC_FIELD USING FNAM FVAL.
    IF FVAL <> NODATA.
        CLEAR BDCDATA.
        BDCDATA-FNAM = FNAM.
        BDCDATA-FVAL = FVAL.
        APPEND BDCDATA.
    ENDIF.
    ENDFORM.
    *&      Form  BDC_TRANSACTION
          text
         -->P_0428   text
    form BDC_TRANSACTION  using    value(p_0428).
    endform.                    " BDC_TRANSACTION

  • Selecting fields in BDC screens

    Hai,
       Can we select fields(check boxes) from BDC screen if so, tell me how can we select fields in BDC programming.
                                               Thank you in advance

    Hai,
        as u said that we can select check boxes while recording, but my problem is i'm using this procedure in creating STO delivery in VL10B, here we enter ship-to party and date as input and in second screen we click on show/hide documents button and after that we check the STO document no. which was created for our suppl. plant on given date and press background button, so here my problem is STO document no. place is getting changed every time.
                          Thank you can you once verify recording for VL10b.

  • Is it possible to skip the screen in BDC using IF statement.

    Hi Friends,
    I have written a report using BDC for tcode CO11 thru recording using CALL TRANSACTION.
    Case 1:
    If I go to transaction CO11 (screen number 100) and give the  order number which has more than 1 operations to be partially confirmed and press ENTER a pop-up screen (screen number 140) appears where in I need to select the operation number and after selecting the required operation number it automatically takes me to another screen (screen number 150).
    Case 2:
    If I go to transaction CO11 (screen number 100) and give the  order number which has only 1 operation to be partially confirmed and press ENTER it directly takes me to screen 150 skiping screen 140.
    When I enter the order number which has more than 1 operations to be partially confirmed on my selection screen, my code is working fine as needed.
    But, when I enter the order number which has 1 operation to be partially confirmed on my selection screen, it is giving me error in my BDCMSGCOLL saying that the screen 140 doesn't exist.
    Is there any way, Can I skip screen 140 using IF statement?
    My thoughts:
    1. calling screen 100.
          After calling screen 100, I have put the pop-up operation numbers in an ITAB.
          DESCRIBE table lines ITAB <variable>.
          At NEW <order-field>.
          IF <variable> = 1.
    2. calling screen 140. "I need some help here to skip the screen 140
                                        " Will this logic work?
          ENDIF.
          ENDAT.
    3. calling screen 150.
    Rest everything is working fine.
    Will my above logic works correctly? I would appreciate if someone could help me with this.
    Thanks in Advance.

    Hi,
    Try something like this:
    1. Call Screen 100.
    Check if screen 140 needs to be called depending on your custom logic. Lets say you populate a variable as 'X' if it needs to be called.
    Then write:
    if valiable = 'X'.
      Call screen 140.
      Enter Screen 140 details.
    endif.
    Call screen 150.
    Here the 'Call Screen' is nothing but the code you extracted after BDC recording.
    Thanks.
    Ravi'

  • How to create a report with selection screen that can run in background

    Sorry to ask these basic questions but I am knew to ABAP Programming.
    To keep it simply, I am attempting to create a report that has a simple parameter driven selections screen with one field.  That field takes in a folder path from the user.  The user executes the report.  The report creates a simply BDC that goes into SE16, gathers data from a table, and exports the results to a text file using the folder path provided.  I created a variant for the folder path field in the selection screen hoping to use it while executing the report in the background.  The report is not exporting the file as it did when run in the foreground for some reason.
    I am wondering what event is triggered when a report is executed in the background.  In the foreground (or when I execute the program via SE38->Execute->With Variant) the user needs to execute the program by hitting the execute button once the variant has populated the folder path field.  It works then, so I am trying to get the same to work in the background.  I am thinking I didn't put the program together correctly to accommodate the running in the background.  How can you create a report that can accept user input via variant into a selection screen and then run in the background?
    Please, any information would be greatly appreciated.
    Thanks you all for reading this!!!

    Ok, finally I understand what you're doing. Initially you lost me with the SE16 reference...
    Not sure what you're trying to achieve overall, but apart from the fact that you cannot export/download a file to a user's PC via background job (unless you have a mapped network share on the server or something like an FTP server on the user's PC, but both are pretty hypothetical scenarios and unlikely to occur).
    Also, the BDC approach to get data via SE16 is pretty awkward. Note that SE16 is guarded by some authorization checks and often users won't have access in production (which might not matter if you intend to always run your program in background via dedicated batch user). However, I have no clue why you wouldn't want to use [open SQL|http://help.sap.com/abapdocu_70/en/ABENOPEN_SQL_READING.htm] to read the data. You could then save it on the application server or if you really have to get it to the user you can consider e-mailing the file (extracts should be compressed before sending). For the latter you'll find plenty of references here, basically it's the [business communication services|http://help.sap.com/saphelp_nw2004s/helpdata/en/2d/1c5d3aebba4c38e10000000a114084/frameset.htm] that you'd need to look at.

  • Problem with checkbox in the selection screen

    Hi guys,
    I have a problem with the check box in the selection screen.When i select a check box then a field in the selection screen should be enabled for entering a value.Again if i unselect the checkbox then the field should be disabled for entering a value.I have written the code in at selection-screen output.
    The problem is when i select the check box ,the field is not enabled.But when i press enter after selecting the checkbox then the field is enabled for input.It is the same when i unselect the checkbox,after i press enter only the field is getting disabled.What could be the problem.Any suggestions please?
    Thanks.

    Hi d p
                 Please try this code . I think this code have some way that you would like.
    REPORT  zdownload_to_application_server.
    TABLES : caufvd, jest.
    I N C L U D E  P R O G R A M                                        *
    *INCLUDE znrpstnd.
    Selection Screen                                                    *
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-t03.
    PARAMETERS: p_outb RADIOBUTTON GROUP g1 USER-COMMAND outb DEFAULT 'X' ,
                p_inb RADIOBUTTON GROUP g1.
    SELECTION-SCREEN END OF BLOCK b3.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
    PARAMETERS : p_werks LIKE caufvd-werks MODIF ID a.        " Plant   "OBLIGATORY
    SELECT-OPTIONS  :  s_auart FOR caufvd-auart MODIF ID a,       " Order Type
                       s_aufnr FOR caufvd-aufnr MODIF ID a.       " Order number
    PARAMETERS: p_path TYPE string DEFAULT 'C:\SchedulerInterface-OutboundTextFile\' MODIF ID a,
                p_actual AS CHECKBOX MODIF ID a.                  " Transfer Actual
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t02.
    PARAMETERS : p_werks2 LIKE caufvd-werks MODIF ID b,   " Plant   "OBLIGATORY
                 p_path2 TYPE string DEFAULT 'C:\SchedulerInterface-InboundTextFile\' MODIF ID b,
                 p_path3 TYPE string DEFAULT 'C:\SchedulerInterface-InboundTextFile\' MODIF ID b,
                 p_sessio TYPE apqi-groupid MODIF ID b.   " BDC Session
    SELECTION-SCREEN END OF BLOCK b2.
    AT SELECTION-SCREEN OUTPUT.
      IF p_outb EQ 'X'.   " Outbound --> Hide inbound
        LOOP AT SCREEN.
          "IF screen-name = '%BT02011_BLOCK_1000'.
          IF screen-group2 = 'BLK'.
            screen-active = 1.
            MODIFY SCREEN.
          ENDIF.
          IF screen-group1 = 'A'.
            screen-active = 1.
            MODIFY SCREEN.
          ENDIF.
          IF screen-group1 = 'B'.
            screen-active = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ELSE.
        LOOP AT SCREEN.
          "IF screen-name = '%BT01004_BLOCK_1000'.
          IF screen-group3 = 'BLK'.
            screen-active = 1.
            MODIFY SCREEN.
          ENDIF.
          IF screen-group1 = 'A'.
            screen-active = 0.
            MODIFY SCREEN.
          ENDIF.
          IF screen-group1 = 'B'.
            screen-active = 1.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_path2.
      CALL FUNCTION 'WS_FILENAME_GET'
        EXPORTING
          def_path         = 'C:\SchedulerInterface-InboundTextFile\'
          mask             = ',Text Files,.txt,All files,.*.'
        IMPORTING
          filename         = p_path2
        EXCEPTIONS
          inv_winsys       = 1
          no_batch         = 2
          selection_cancel = 3
          selection_error  = 4
          OTHERS           = 5.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_path3.
      CALL FUNCTION 'WS_FILENAME_GET'
        EXPORTING
          def_path         = 'C:\SchedulerInterface-InboundTextFile\'
          mask             = ',Text Files,.txt,All files,.*.'
        IMPORTING
          filename         = p_path3
        EXCEPTIONS
          inv_winsys       = 1
          no_batch         = 2
          selection_cancel = 3
          selection_error  = 4
          OTHERS           = 5.
    TOP-OF-PAGE.
    START-OF-SELECTION.
    Regards
    Wiboon

  • Download and upload selection screen texts

    hello,
           My requirement is to upoad and download selection screen texts from one system to another..
           How do download  the selection screen texts from program to the application server and then upload them on another system. I am writing a bdc to carry out this process...
          Please help me out with this..
    Thank you,

    Hi,
      Why don't you just transport it? If it is linked you can asked basis to set the transport part and link it. If it is not you can download the transport and import it on another system.
      If you still need a program to do that. You can use SAPlink on [http://wiki.sdn.sap.com/wiki/display/ABAP/SAPlink]. SDN provided such code already just download it and implement it on both of your system then you can copy a program with selection screen.
    Cheers,
    Chaiphon

  • Report without a selection-screen, just a dynpro

    Hi experts,
    I wrote a small report, which reads out a file. After this I want to display it in a tablecontrol of my dynpro. In the dynpro there is a button to push the data of the tablecontrol in the R/3 via BDC.
    Now I have the problem of a automatic generated Selection-Screen. Which has some fields of my used variables (e.g. file-name, file-typ) and even maybe 10 fields (input-fields and checkboxes) from the BDC program.
    The fact is that it is not possible to use this code, simply without any "START-OF-SELECTION" statement:
    REPORT ZMM_REPORT01.
    TABLES: mseg.
    TYPES:  BEGIN of input_struk,
              matnr TYPE mseg-matnr,
              erfmg TYPE mseg-erfmg,
            END   of input_struk,
           tt_input TYPE TABLE OF input_struk.
    DATA: it_input TYPE tt_input.
    DATA: wa_input LIKE LINE OF it_input.
    CALL SCREEN 100.
    The error is: "Statement 'CALL SCREEN 100' couldnt be reached."
    If I use the program-type M for PROGRAM and not type 1 for REPORT. Then fails with the necessary INCLUDE statement of the BDC program.
    Regards,
    Steffen

    ok, if I decode your big letters, I have to put the CALL SCREEN at the end of my program.
    so I do that but I didn't work . error: the call-statement could be reached.
    REPORT ZMM_REPORT01.
    TABLES: mseg.
    TYPES:  BEGIN of input_struk,
              matnr TYPE mseg-matnr,
              erfmg TYPE mseg-erfmg,
            END   of input_struk,
           tt_input TYPE TABLE OF input_struk.
    DATA: it_input TYPE tt_input.
    DATA: wa_input LIKE LINE OF it_input.
    PARAMETERS: fname TYPE rlgrap-filename DEFAULT 'c:lagerver.dat',
                ftype TYPE rlgrap-filetype DEFAULT 'ASC',
                bwart TYPE MSEG-BWART DEFAULT 201,
                werks TYPE MSEG-WERKS DEFAULT 2000,
                lgort TYPE MSEG-LGORT DEFAULT 2500,
                kostl TYPE COBL-KOSTL DEFAULT 201300.
    START-OF-SELECTION.
    * PBO Module
    MODULE pbo_0100 OUTPUT.
      SET TITLEBAR 'TITLE_100'.
      SET PF-STATUS 'SCREEN_100'.
      PERFORM z_daten_input.
      PERFORM z_convert_dummy.
    ENDMODULE.
    * PAI Module
    MODULE pai_0100 INPUT.
      IF sy-ucomm = 'BACK' OR
         sy-ucomm = 'EXIT' OR
         sy-ucomm = 'CANCEL'.
         LEAVE PROGRAM.
      ELSE.
      DATA: l_date TYPE sy-datum.
      >THE BDC PROGRAM statements<
      ENDIF.
    ENDMODULE.
    FORM z_daten_input.
    DATA: filename TYPE string,   " UNICODE
          result   TYPE boolean.
          filename = fname.
    REFRESH: it_input.
    CALL METHOD cl_gui_frontend_services=>file_exist
      EXPORTING    file       = filename
      RECEIVING    RESULT     = result.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD
    EXPORTING
       filename                      = filename
       filetype                      = 'ASC'
       READ_BY_LINE                  = 'X'
       REPLACEMENT                   = '#'
    CHANGING
       data_tab                      = t_dummy[].
    ENDFORM.
    FORM z_convert_dummy.
      LOOP AT T_DUMMY.
        wa_input-matnr = T_DUMMY-VAR+0(11).
        wa_input-erfmg = T_DUMMY-VAR+33(5).
        APPEND wa_input TO it_input.
      ENDLOOP.
    ENDFORM.
    *&spwizard: declaration of tablecontrol 'TC_FILE' itself
    controls: TC_FILE type tableview using screen 0100.
    *&spwizard: output module for tc 'TC_FILE'. do not change this line!
    *&spwizard: update lines for equivalent scrollbar
    module TC_FILE_change_tc_attr output.
      describe table IT_INPUT lines TC_FILE-lines.
    endmodule.
    CALL SCREEN 100.

Maybe you are looking for