Using NAST info for selection screen design

Hi
I am doing customization for RFQ printing ( TCODE ME9A)
I want to know can I get the same selection screen as of ME9A using NAST info for my z driver program.
Which function module can be used?
Kindly provide sample code
Regards
Harshada

Hi Piyush,
Add the below code in your program.
*Note: you have to take two parameters for files.
If you select check box then p_pc parameter is visible.
if you dont select check box then p_app parameter is visible.
PARAMETERS: p_chk1 AS CHECKBOX USER-COMMAND rusr.
SELECTION-SCREEN: BEGIN OF BLOCK blk1 WITH FRAME.
PARAMETERS: p_pc  LIKE rlgrap-filename MODIF ID abc.
PARAMETERS: p_app LIKE rlgrap-filename MODIF ID def.
SELECTION-SCREEN: END OF BLOCK blk1.
AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF screen-group1 = 'ABC'.
      CLEAR: p_pc, p_app.
      IF p_chk1 = 'X'.
        screen-active = 1.
      ELSE.
        screen-active = 0.
      ENDIF.
      MODIFY SCREEN.
    ENDIF.
    IF screen-group1 = 'DEF'.
      CLEAR: p_pc, p_app.
      IF p_chk1 <> 'X'.
        screen-active = 1.
      ELSE.
        screen-active = 0.
      ENDIF.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_app.
  PERFORM get_fname_app.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_pc.
  CALL FUNCTION 'F4_FILENAME'
    IMPORTING
      file_name = p_pc.
*&      Form  get_fname_app
      text
FORM get_fname_app.
  DATA: c_fnh_mask TYPE dxfields-filemask VALUE '.',
  search_dir TYPE dxfields-longpath VALUE '/sapglobal/users',
  file_path LIKE dxfields-longpath.
  CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
    EXPORTING
      i_location_flag = 'A'
      i_server        = ' '
      i_path          = search_dir
      filemask        = c_fnh_mask
      fileoperation   = 'R'
    IMPORTING
      o_path          = file_path
    EXCEPTIONS
      rfc_error       = 1
      OTHERS          = 2.
  IF sy-subrc EQ 0.
    p_app = file_path.
  ENDIF.
ENDFORM.                    "get_fname_app

Similar Messages

  • Code for selection screen,  urgent

    Hi Everyone,
      I need code for selection screen.
      I have four radio buttons, p1, p2,p3,p4(assume)
    If I select second radiobutton, remaining three radiobuttons should be in disable mode and also the information under them should be in disable mode. Give the coding details. Thanks in advance. U will be rewarded.
    Regards,
    Nagaraju

    Hi,
    REPORT ZTEST222 .
    PARAMETERS : p_add  RADIOBUTTON GROUP radi
                             USER-COMMAND radio MODIF ID MOD,
      p_disp RADIOBUTTON GROUP radi DEFAULT 'X'  MODIF ID pod,
      p_chng RADIOBUTTON GROUP radi MODIF ID rad,
      p_er_log RADIOBUTTON GROUP radi MODIF ID cod.
    SELECT-OPTIONS : s_idn    FOR  vendor   MODIF ID mod,
                                   s_pcode  FOR ws_c_pcode MODIF ID pod.
    PARAMETERS:  p_plant    LIKE  zaw_pol_plan-plant   MODIF ID rad,
                 p_zzvend   LIKE  zaw_pol_plan-zzvendor   MODIF ID cod.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    IF p_add EQ 'X'.
          IF screen-group1 EQ 'MOD'.
            screen-active = 1.
            MODIFY SCREEN.
    ELSE.
             screen-active = 0.
            MODIFY SCREEN.
    ENDIF.
    IF p_disp EQ 'X'.
          IF screen-group1 EQ 'POD'.
            screen-active = 1.
            MODIFY SCREEN.
    ELSE.
             screen-active = 0.
            MODIFY SCREEN.
    ENDIF.
    IF p_chng EQ 'X'.
          IF screen-group1 EQ 'RAD'.
            screen-active = 1.
            MODIFY SCREEN.
    ELSE.
             screen-active = 0.
            MODIFY SCREEN.
    ENDIF.
    IF p_er_log EQ 'X'.
          IF screen-group1 EQ 'COD'.
            screen-active = 1.
            MODIFY SCREEN.
    ELSE.
             screen-active = 0.
            MODIFY SCREEN.
    ENDIF.
    Pls. reward if useful
        ENDLOOP.
    Pls. reward if useful

  • How to write HTML code in Web Template for selection screen

    Hello All,
    Is it possible to write a html code in the web template html tag so that the output of the html is displayed in the selection screen, i.e before the execution of query.
    I know that we can write html, which will be displayed once the query has been executed, but can it be done for selection screen.
    if so, how.
    My exact requirement is : to display a 2-3 lines of text in the selection criteria screen - sort of, various options available to user for entering values in the selection screen.  I was thinking of putting this text using HTML code in the selection screen.
    Regards,
    Nagendra.

    Hi Erick,
    No, unfortunately nobody replied to this thread. So i assumed it is not possible to modify the selection screen thru html code.
    Btw, as my requirement was to provide user with multiple answers on the selection screen. I did the validations on customer exit and popped an errror dialog when applicable.
    Regards,
    Nagendra.

  • Change default value (200) of Max No of Hits for selection screen in WAD

    How do i change the default value of Maximum Number of Hits from 200 to 1000 for selection screen's find box in Web Application Designer .
    Thanks in Advance
    Points will be surely Rewarded

    Dear Hammad,
    Please refer to the wiki created by me,
    http://wiki.sdn.sap.com/wiki/display/BI/Information+on+the+user+setting+for+the+selector+dialog
    Regards,
    Arvind

  • How to set default variant for selection screen

    Hi,
    I want to make one variant as default for selection screen for one user.
    For eg., take COOIS. For the selection screen, i have 3 variants. But i want one variant to be default. Thsi is not for all users. Thsi is for particular user.
    I am not seeing any way to do this. please help me..
    Thanks
    Srini

    Hi,
    If you are using Z program then you can ask your developer to get Variant name Runtime from Parameter ID.
    This means you decide a Parameter ID name : ZVAR in your Z program and ask your developer to load variant each time your Z program loads.
    Now, second step will be using SU01 transaction you can set value of ZVAR in Parameters tab for the user. This value will be the variant which you created for this user.
    This will solve your problem and you can make n number of variants and assign it to different users.
    Regards,
    Arpit

  • Dinamic variant for selection screen

    Hi,
    I got a requirement where i need  a Dynamic variant for selection screen .There is a date field in the selection screen i want to create  a variant such that when i choose it,it should give the current day date in selection screen.can anyone help me.
    Regards,
    Ravi

    Hi,
    Using Customer Exit code you can give it.
    Create a Customer Exit Variable and write simple code in CMOD. See the usefull Exit code for reports in the following url.
    https://wiki.sdn.sap.com/wiki/display/profile/Surendra+Reddy
    WHEN 'ZV_DAT'.
        IF i_step = 1 .
          CLEAR l_s_range.
          l_s_range-low = sy-datum.
          l_s_range-opt = 'EQ'.
          l_s_range-sign = 'I'.
          APPEND l_s_range TO e_t_range.
        ENDIF.
    Thanks
    Reddy

  • Transaction Variant for Selection Screen

    Hi, experts!
    A question regarding transaction variants: Is it possible to create screen variants and transaction variants via SHD0 for selection screens? I' ve created a customer report with one selection screen including parameters and select options and would like to provide the users with a variant transaction for this.
    Utilizing the "Save as variant" option from the selection screen itself works out perfectly, but this variant cannot be transported. And trying to create a transaction variant via SHD0 fails because values entered in the selection screen parameters and select options help screens are not saved and presented.
    Any hints are more than welcome!
    Regards,
    Thomas

    You wrote
    Utilizing the "Save as variant" option from the selection screen itself works out perfectly, but this variant cannot be transported.
    But, give the variant a name beginning with "CUS&" and this variant will be transported. Variant beginning with "CUS&" or "SAP&" are so-called "system variant" and are  transported automatically. You can then copy the transaction code and use this new variant in the new transaction.
    Regards,
    Raymond

  • Global Variable for selection screen variable

    Hi All,
    We need to create a report where calendar day has to be included in the selection screen.Later after executing the report we should be able to retrieve the selection screen input for calendar day and modify it and use the modified one for other calculations.Can somebody help me out in finding the global variable in the variable exit where we find all the inputs for selection screen variables....
    Regards,
    Shravani

    shravani,
    I_vnam will store the varaible names...if you have varaible in the query...
    please use this code for ur help...
    DATA: ww_der_date LIKE sy-datum,
            wzdate LIKE sy-datum,
            wzact_gi_dte TYPE /bi0/oiact_gi_dte.
      wzact_gi_dte = sy-datum.
      IF i_step = 2.
        READ TABLE i_t_var_range INTO wa_i_t_var_range WITH KEY vnam =
        'ZNODAYS'.
        ww_der_date = sy-datum - wa_i_t_var_range-low.
            CLEAR wa_i_t_var_range.
        IF i_vnam = 'ZVAGIDCUSTEXIT'.
          CLEAR l_s_range.
          l_s_range-low    =  ww_der_date .
          l_s_range-high   =  wzact_gi_dte.
          l_s_range-sign   = 'I'.
          l_s_range-opt    = 'BT'.
          APPEND l_s_range TO e_t_range.
          CLEAR l_s_range.
        ENDIF.
      ENDIF.
    in this case user will enter no.of days in ZNODAYS and that being is used in calculation and used in the next varaible....

  • Default value for selection screen field

    Hi all,
      I am using LDB PNPCE. I want to give default value for field Personnel area on selection screen.
    How can I do it?
    Thanks
    Rahul

    Hi Rahul,
    In the INITIALIZATION event we can set the default values for selection screen fields.
    INITIALIZATION.
    loop at screen.
    if screen-name = 'S_MATNR-LOW'.
    CLEAR S_MATNR.
    s_matnr-low = '1234'.
    s_matnr-option = 'EQ'.
    s_matnr-sign = 'I'.
    append s_matnr.
    CLEAR S_MATNR.
    s_matnr-high = '5678'.
    s_matnr-option = 'EQ'.
    s_matnr-sign = 'I'.
    append s_matnr
    clear s_matnr.
    endif.
    endloop.
    Hope it helps.
    Mark if useful
    Regards,
    Saumya

  • How can we use list box on selection screen

    hi, howe can we use list box on selection screen and how can we populate the dat ainto the list box and how can we retrive data based on list box from ther database.
    thanks in advance
    raju

    Use the VRM_SET_VALUES function module.
    DATA: list              TYPE vrm_values,
          value             LIKE LINE OF list.
               AT SELECTION SCREEN OUTPUT
    AT SELECTION-SCREEN OUTPUT.
      name = 'P_OBJECT'.
      CLEAR list.
      REFRESH list.
      CLEAR value.
      value-key = '1'.
      value-text = 'Development Class'.
      APPEND value TO list.
      CLEAR value.
      value-key = '2'.
      value-text = 'Program'.
      APPEND value TO list.
      CLEAR value.
      value-key = '3'.
      value-text = 'Function Module'.
      APPEND value TO list.
      CLEAR value.
      value-key = '4'.
      value-text = 'Database Table'.
      APPEND value TO list.
      CLEAR value.
      value-key = '5'.
      value-text = 'Structure'.
      APPEND value TO list.
      CLEAR value.
      value-key = '6'.
      value-text = 'View'.
      APPEND value TO list.
      CLEAR value.
      value-key = '7'.
      value-text = 'Data Element'.
      APPEND value TO list.
      CLEAR value.
      value-key = '8'.
      value-text = 'Table Type'.
      APPEND value TO list.
      CLEAR value.
      value-key = '9'.
      value-text = 'Class / Interface'.
      APPEND value TO list.
      CLEAR value.
      value-key = '10'.
      value-text = 'Type Group'.
      APPEND value TO list.
      CLEAR value.
      value-key = '11'.
      value-text = 'Domain'.
      APPEND value TO list.
      CLEAR value.
      value-key = '12'.
      value-text = 'Search Help'.
      APPEND value TO list.
      CLEAR value.
      value-key = '13'.
      value-text = 'Lock Object'.
      APPEND value TO list.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = name
          values          = list
        EXCEPTIONS
          id_illegal_name = 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.

  • Folder Chooser reference (which uses a tree for selection)

    is there a recommendation for a folder chooser which uses a tree for selection? all i've found so far are either:
    * 3rd party folder choosers
    * the file open dialog box of java where you use setFileSelectionMode( JFileChooser.DIRECTORIES_ONLY);
    i can't believe there is currently no folder chooser which uses a tree for selection in standard java. so probably i didn't find it. before i write my own, i thought i'd ask.
    thanks for the help!

    No, it doesn't exist in the standard Java API. What's wrong with third party solutions, especially when some of them are open source? Google found quite a few.
    db

  • How to create variant for selection screen which is in subscreen

    Hi,
    How to create variant for selection screen which is in subscreen in a module pool program?
    it is very urgent.
    Thanks in advance.

    Hi,
    You can create the 'Parameter Transaction' so that whenever you run the particular transaction it will run with the initial value given when the Tcode was created and hence you can skip the initial screen of the module pool program.
    To create Parameter transaction from SE93 you have to choose the last option i.e Parameter Transaction.
    Regards
    Sudheer

  • Help Needed for selection screen

    Hi Experts
    I'm doing one report of pm module using one standard program called me RIQMEL10
                 my query is if u execute this stand.prog u'll get one selection screen ,and having three selction-screen blocks.  first sel-scr block name is Notification status this selection screen is calling dynamically by using sap stand.prog SAPDBQMI
                    SCR NO : 1000
    can any one send me the default code of this selection screen block ( Notification status ) which sap is providing .

    INCLUDE DBQMISEL
    It will be automatically included into the database program.
    If the source code is automatically generated,
    please perform the following steps:
    1. Replace ? by suitable names (at most 8 characters).
    2. Activate SELECT-OPTIONS and PARAMTERS (delete stars).
    3. Save source code.
    4. Edit database program
    Hint: Syntax-Check is not possible within this Include!
    It will be checked during syntax-check of database program.
    SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-011.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS dy_ofn LIKE rihea-dy_ofn FOR TABLE diqmel.
    SELECTION-SCREEN COMMENT 3(11) text-001
                                          FOR FIELD dy_ofn ID 001.
    PARAMETERS dy_rst LIKE rihea-dy_rst FOR TABLE diqmel.
    SELECTION-SCREEN COMMENT 16(10) text-002
                                           FOR FIELD dy_rst ID 002.
    PARAMETERS dy_iar LIKE rihea-dy_iar FOR TABLE diqmel.
    SELECTION-SCREEN COMMENT 29(10) text-003
                                           FOR FIELD dy_iar ID 003.
    PARAMETERS dy_mab LIKE rihea-dy_mab FOR TABLE diqmel.
    SELECTION-SCREEN COMMENT 42(10) text-004
                                           FOR FIELD dy_mab ID 004.
    SELECTION-SCREEN COMMENT 52(10) text-005
                                           FOR FIELD selschem ID 005.
    PARAMETERS: selschem LIKE tj48t-selid FOR TABLE diqmel.
    SELECTION-SCREEN PUSHBUTTON 73(5) p_addr USER-COMMAND addr
    FOR TABLE diqmel ID 006.
    PARAMETERS dy_adrfl NO-DISPLAY FOR TABLE diqmel.
    SELECTION-SCREEN COMMENT 79(30) ad_icon FOR TABLE diqmel ID ic1.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK block1.
    SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME TITLE text-012.
    SELECT-OPTIONS:
      qmnum                  FOR diqmel-qmnum MATCHCODE OBJECT qmeg,
      qmart                  FOR diqmel-qmart,
      tplnr                  FOR diqmel-tplnr NO-DISPLAY,
      strno                  FOR diqmel-strno MATCHCODE OBJECT iflm,
      equnr                  FOR diqmel-equnr MATCHCODE OBJECT equi,
      matnr                  FOR diqmel-matnr MATCHCODE OBJECT mat1,
      serialnr               FOR diqmel-serialnr,
      deviceid               FOR diqmel-deviceid,
      aufnr                  FOR diqmel-aufnr MATCHCODE OBJECT orde.
    *--- date from - until
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(28) text-009 FOR FIELD datuv.
    SELECTION-SCREEN POSITION 33 FOR TABLE diqmel.
    PARAMETERS datuv LIKE rihea-termab FOR TABLE diqmel DEFAULT sy-datum.
    SELECTION-SCREEN COMMENT 51(6) text-010 FOR FIELD datub.
    PARAMETERS datub LIKE rihea-termbi FOR TABLE diqmel DEFAULT sy-datum.
    SELECTION-SCREEN END OF LINE.
    *--- partner function, partner
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(9) text-006 FOR FIELD dy_parvw.
    SELECTION-SCREEN POSITION 10 FOR TABLE diqmel.
    PARAMETERS  dy_parvw LIKE ihpa-parvw FOR TABLE diqmel
                AS LISTBOX VISIBLE LENGTH 22.
    SELECTION-SCREEN POSITION 33 FOR TABLE diqmel.
    PARAMETERS  dy_parnr LIKE ihpa-parnr FOR TABLE diqmel VALUE-REQUEST.
    *--- button classification
    SELECTION-SCREEN PUSHBUTTON 73(5) text-013 USER-COMMAND clse
    FOR TABLE diqmel.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK block2.
    *--- freie Abgrenzungen für log.Datenbankselektion -
    SELECTION-SCREEN DYNAMIC SELECTIONS FOR TABLE diqmel ID 010.
    SELECTION-SCREEN BEGIN OF VERSION 001 text-v01.
    SELECTION-SCREEN EXCLUDE PARAMETERS: dy_mab, dy_ofn, dy_rst, dy_iar,
                                         selschem, dy_adrfl.
    SELECTION-SCREEN EXCLUDE IDS: 001, 002, 003, 004, 005, 006, 010, ic1.
    SELECTION-SCREEN END   OF VERSION 001.
    SELECTION-SCREEN BEGIN OF VERSION 002 text-v02.
    SELECTION-SCREEN EXCLUDE IDS: 010.
    SELECTION-SCREEN END   OF VERSION 002.
    *--- Parameter für Selektionssteuerung -> es sollen nicht     -
    *--- automatisch alle Segmente der log.DB selektiert werden   -
    *--- neu mit P30K047900                                       -
    PARAMETERS: ldb_ihpa NO-DISPLAY DEFAULT 'X' FOR TABLE diihpa,
                ldb_iflo NO-DISPLAY DEFAULT 'X' FOR TABLE diiflo,
                ldb_equi NO-DISPLAY DEFAULT 'X' FOR TABLE diequi,
                ldb_qmfe NO-DISPLAY DEFAULT 'X' FOR TABLE diqmfe,
                ldb_qmma NO-DISPLAY DEFAULT 'X' FOR TABLE diqmma,
                ldb_qmmx NO-DISPLAY DEFAULT 'X' FOR TABLE diqmmax,
                ldb_clas NO-DISPLAY DEFAULT 'X' FOR TABLE diclass,
                ldb_clda NO-DISPLAY DEFAULT 'X' FOR TABLE dicldat,
                ldb_qmsm NO-DISPLAY DEFAULT 'X' FOR TABLE diqmsm,
                ldb_qmsx NO-DISPLAY DEFAULT 'X' FOR TABLE diqmsmx,
                ldb_aufk NO-DISPLAY DEFAULT 'X' FOR TABLE diaufk.
    regards
    vinod

  • Creating Transaction code for selection screen of one ztable

    Hi ,
        i have one Ztable in order see the data in it , he wants one new transaction . by executing tht transaction he wants to view the data inside the table.
    i have created one transaction code by taking the transaction type as report transaction and program name i gave the selection screen program of tht table.
    when i executed tht t code  selection screen of table contents should come and on executing it i have to get  data.
    but im not getting data on executing tht selection screen .
    why? for this scenario which tcode type i have to select.

    Hi Pavan,
    Check this,
    Step 1
    Create parameter transaction (i.e. via SE93)
    Select the fourth options
    Step 2
    Enter transaction details. Within the Proposed values section there are a number of value which
    can be setup, simply use drop down menu to view the list. The 2 values assigned in the following
    example are as follows:
                   VIEWNAME:        Set table name to maintained
                   UPDATE:               Open table for update
    Mohinder

  • Selection-screen design

    Hi everyone,
    I am working on a project for which I have to design a selection-screen.
    The requirement is such that there are 3 obligatory fields to be filled by the user, which are as follows:
    P_LAUFD(parameter,obligatory-date),
    P_LAUFI(parameter,obligatory-id),
    P_FILENM(parameter,obligatory-filename),
    P_LOKAAL(checkbox).
    The requirement is such that when the user does not check the checkbox the search help for P_FILENM should show the files from the application server,and when it is checked the files from the presentation server should be shown.
    The code that I have written is listed below, but there is  a problem with it.
    When I don't enter  anything in the first 2 fields, the search field for the 3rd field functions as required, but if I first enter something in the first 2 fields and then click on the checkbox, the search help for P_FILENM does not function as reaquired.
    Please advise.
    Also if possible could you'll  kindly   explain the sequence of events that is getting triggered?
    *&  Include           Z6890_PROJINCLUDE_SEL_SCREEN                     *
    TABLES : SSCRFIELDS.
    DATA: FILE LIKE DXFIELDS-LONGPATH.
    DATA V_FILENAME LIKE IBIPPARMS-PATH.
    DATA: TMP TYPE SSCRFIELDS-UCOMM.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS: P_LAUFD TYPE  D OBLIGATORY,
                P_LAUFI(6) TYPE C OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
    PARAMETERS: P_FILENM(128) TYPE C OBLIGATORY.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN POSITION 33.
    PARAMETER: P_LOKAAL AS CHECKBOX USER-COMMAND SRC.
    SELECTION-SCREEN COMMENT 35(6) TEXT-003.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK B2.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-004.
    PARAMETERS: P_DEL(2) TYPE C .
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(12) TEXT-005 FOR FIELD P_APPL.
    SELECTION-SCREEN POSITION 33.
    PARAMETERS:  P_APPL(3) TYPE C.
    SELECTION-SCREEN POSITION 37.
    PARAMETERS: P_APDESC(40) TYPE C.
    SELECTION-SCREEN END OF LINE.
    PARAMETERS: P_MKDT(8) TYPE N,
                P_NOINV(6) TYPE N.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(12) TEXT-006 FOR FIELD P_TOAMNT.
    SELECTION-SCREEN POSITION 33.
    PARAMETERS: P_TOAMNT(13) TYPE N.
    SELECTION-SCREEN POSITION 47.
    PARAMETERS: P_TEKEN(1) TYPE C.
    SELECTION-SCREEN END OF LINE.
    PARAMETERS: P_DESC(60) TYPE C.
    SELECTION-SCREEN END OF BLOCK B3.
    ***********************************************************************************************REPORT  Z6890_PROJ_REPORT_DRAFT                 .
    DATA: BEGIN OF GW_LINE,
          TEXT(700) TYPE C,
          END OF GW_LINE.
    DATA: GIN_FILE LIKE TABLE OF GW_LINE.
    INCLUDE Z6890_PROJINCLUDE_SEL_SCREEN.
    AT SELECTION-SCREEN.
      CASE SY-UCOMM.
        WHEN  'EXEC'.
          IF P_LOKAAL = 'X'.
            PERFORM MV_DATA_FRM_PRES_INT .
          ELSE.
            PERFORM OPEN_FILE_ONAPP_SERVER.
          ENDIF.
          LOOP AT SCREEN.
            IF SCREEN-NAME = 'P_DEL'.
              SCREEN-INPUT = 0.
              SCREEN-OUTPUT = 1.
              P_DEL = 'HI'.
            ENDIF.
            IF SCREEN-NAME = 'P_APPL'.
              SCREEN-INPUT = 0.
              SCREEN-OUTPUT = 1.
              P_APPL = 'CHF'.
            ENDIF.
            MODIFY SCREEN.
          ENDLOOP.
        WHEN 'BACK'.
          LEAVE PROGRAM.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
        WHEN 'CANCEL'.
          LEAVE PROGRAM.
      ENDCASE.
    AT SELECTION-SCREEN  OUTPUT.
      SET PF-STATUS 'PROJ'.
      LOOP AT SCREEN.
        IF SCREEN-NAME = 'P_DEL'.
          SCREEN-INPUT = 0.
          SCREEN-OUTPUT = 1.
        ENDIF.
        IF SCREEN-NAME = 'P_APPL'.
          SCREEN-INPUT = 0.
          SCREEN-OUTPUT = 1.
        ENDIF.
        IF SCREEN-NAME = 'P_APDESC'.
          SCREEN-INPUT = 0.
          SCREEN-OUTPUT = 1.
        ENDIF.
        IF SCREEN-NAME = 'P_MKDT'.
          SCREEN-INPUT = 0.
          SCREEN-OUTPUT = 1.
        ENDIF.
        IF SCREEN-NAME = 'P_NOINV'.
          SCREEN-INPUT = 0.
          SCREEN-OUTPUT = 1.
        ENDIF.
        IF SCREEN-NAME = 'P_TOAMNT'.
          SCREEN-INPUT = 0.
          SCREEN-OUTPUT = 1.
        ENDIF.
        IF SCREEN-NAME = 'P_TEKEN'.
          SCREEN-INPUT = 0.
          SCREEN-OUTPUT = 1.
        ENDIF.
        IF SCREEN-NAME = 'P_DESC'.
          SCREEN-INPUT = 0.
          SCREEN-OUTPUT = 1.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_LAUFD.
      CALL FUNCTION 'F4_DATE'
       EXPORTING
         DATE_FOR_FIRST_MONTH               = SY-DATUM
         DISPLAY                            = ' '
        FACTORY_CALENDAR_ID                = ' '
        GREGORIAN_CALENDAR_FLAG            = ' '
        HOLIDAY_CALENDAR_ID                = ' '
        PROGNAME_FOR_FIRST_MONTH           = ' '
       IMPORTING
         SELECT_DATE                        = P_LAUFD
        SELECT_WEEK                        =
        SELECT_WEEK_BEGIN                  =
        SELECT_WEEK_END                    =
      EXCEPTIONS
        CALENDAR_BUFFER_NOT_LOADABLE       = 1
        DATE_AFTER_RANGE                   = 2
        DATE_BEFORE_RANGE                  = 3
        DATE_INVALID                       = 4
        FACTORY_CALENDAR_NOT_FOUND         = 5
        HOLIDAY_CALENDAR_NOT_FOUND         = 6
        PARAMETER_CONFLICT                 = 7
        OTHERS                             = 8
      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 VALUE-REQUEST FOR P_FILENM.
      IF TMP = SSCRFIELDS-UCOMM.
        CLEAR SSCRFIELDS-UCOMM.
        CLEAR TMP.
      ELSE.
        SSCRFIELDS-UCOMM = 'SRC'.
      ENDIF.
      CASE SSCRFIELDS-UCOMM.
        WHEN 'SRC'.
          TMP = SSCRFIELDS-UCOMM.
          CALL FUNCTION '/SAPDMC/LSM_F4_FRONTEND_FILE'
    EXPORTING
       PATHNAME               =
               CHANGING
                 PATHFILE               = V_FILENAME
             EXCEPTIONS
               CANCELED_BY_USER       = 1
       SYSTEM_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.
            IF SY-SUBRC = 1.
              MESSAGE I000(Z6890_PROJ) .
            ENDIF.
          ENDIF.
          P_FILENM = V_FILENAME.
          CLEAR SSCRFIELDS-UCOMM.
        WHEN OTHERS.
          CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
               EXPORTING
                 I_LOCATION_FLAG       = 'A'
                 I_SERVER              = 'ides47_i47_00'
                 I_PATH                = 'D:\usr\sap\'
                 FILEMASK              = '.'
                 FILEOPERATION         = 'R'
               IMPORTING
          O_LOCATION_FLAG       =
          O_SERVER              =
                 O_PATH                = FILE
          ABEND_FLAG            =
        EXCEPTIONS
          RFC_ERROR             = 1
          ERROR_WITH_GUI        = 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.
          P_FILENM = FILE.
         CLEAR SSCRFIELDS-UCOMM.
      ENDCASE.
    *&      Form  MV_DATA_FRM_PRES_INT
          text
    -->  p1        text
    <--  p2        text
    FORM MV_DATA_FRM_PRES_INT .
      DATA: F_NAME TYPE STRING.
      F_NAME = P_FILENM.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME                      = F_NAME
         FILETYPE                      = 'ASC'
      HAS_FIELD_SEPARATOR           = ' '
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
        TABLES
          DATA_TAB                      = GIN_FILE
    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.
      IF SY-SUBRC = 1.
       LEAVE TO LIST-PROCESSING.
       WRITE: / 'Error: File could not be opened!'.
        MESSAGE I001(Z6890_PROJ) WITH P_FILENM.
      ENDIF.
      BREAK-POINT.
    ENDFORM.                    " MV_DATA_FRM_PRES_INT
    *&      Form  OPEN_FILE_ONAPP_SERVER
          text
    -->  p1        text
    <--  p2        text
    FORM OPEN_FILE_ONAPP_SERVER  .
    ENDFORM.

    Hi Piyush,
    Add the below code in your program.
    *Note: you have to take two parameters for files.
    If you select check box then p_pc parameter is visible.
    if you dont select check box then p_app parameter is visible.
    PARAMETERS: p_chk1 AS CHECKBOX USER-COMMAND rusr.
    SELECTION-SCREEN: BEGIN OF BLOCK blk1 WITH FRAME.
    PARAMETERS: p_pc  LIKE rlgrap-filename MODIF ID abc.
    PARAMETERS: p_app LIKE rlgrap-filename MODIF ID def.
    SELECTION-SCREEN: END OF BLOCK blk1.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF screen-group1 = 'ABC'.
          CLEAR: p_pc, p_app.
          IF p_chk1 = 'X'.
            screen-active = 1.
          ELSE.
            screen-active = 0.
          ENDIF.
          MODIFY SCREEN.
        ENDIF.
        IF screen-group1 = 'DEF'.
          CLEAR: p_pc, p_app.
          IF p_chk1 <> 'X'.
            screen-active = 1.
          ELSE.
            screen-active = 0.
          ENDIF.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_app.
      PERFORM get_fname_app.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_pc.
      CALL FUNCTION 'F4_FILENAME'
        IMPORTING
          file_name = p_pc.
    *&      Form  get_fname_app
          text
    FORM get_fname_app.
      DATA: c_fnh_mask TYPE dxfields-filemask VALUE '.',
      search_dir TYPE dxfields-longpath VALUE '/sapglobal/users',
      file_path LIKE dxfields-longpath.
      CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
        EXPORTING
          i_location_flag = 'A'
          i_server        = ' '
          i_path          = search_dir
          filemask        = c_fnh_mask
          fileoperation   = 'R'
        IMPORTING
          o_path          = file_path
        EXCEPTIONS
          rfc_error       = 1
          OTHERS          = 2.
      IF sy-subrc EQ 0.
        p_app = file_path.
      ENDIF.
    ENDFORM.                    "get_fname_app

Maybe you are looking for

  • MacBook Air and problems with Time Capsule in 5GHz Radio Mode

    We have our Time Capsule configured to 802.11n only (5 GHz). We've done this to work more efficiently in a particularly noisy wireless area. The problem is that the MacBook Air can't maintain a connection to it and when it loses the connection, the w

  • Runtime error for webdynpro

    Hi All, i am getting "java.lang.UnsupportedClassVersionError: Bad version number in .class file " error in 7.1 server which is using jre 1.5 when i compiled a webdynpro application in nwds7.1 using jdk1.5 version. webdynpro not using any external lib

  • XQuery syntax to evaluate math formula

    I want to evaluate a math formula inside of a function, so I can't use dynamic SQL. I found that the query on an XML-variable with a literal works well.  DECLARE @sParsedFormula varchar(200);  DECLARE @xFormula xml;  SET @xFormula = '';  SET @sParsed

  • Error During Cancelling an incoming payment

    Hi All! kindly find below the error we got during cancelling an in coming payment. "Reconciliation date must be on or after the last posting date for transactions error 3821" Kindly help with it to help us cancelling the doc. Thks R@j..

  • FCE HD - Keeps freezing up

    i've been posting this issue in the wrong forum like a *******. so i'm sending up a flare to the FCExperts out there... Here's the deal: i just installed HD so i could take advantage of LiveType. i've captured clips onto an 300GB external that's bein