Skip to Content
author's profile photo Former Member
Former Member

file name

Hi

i have the text file but in the selection screen i hav to pass the file name and file address.

How can i declare it on the selection scrren

very very urgent

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 12, 2007 at 11:05 AM

    parameter: file_nm type localfile.

    AND IF U WANT A VALUE REQUEST FOR SELECTION SCREEN FEILD

    USE THIS

    at selection-screen on value-request for file_nm.

    CALL FUNCTION 'KD_GET_FILENAME_ON_F4'

    EXPORTING

    • PROGRAM_NAME = SYST-REPID

    • DYNPRO_NUMBER = SYST-DYNNR

    • FIELD_NAME = ' '

    STATIC = 'X'

    • MASK = ' '

    CHANGING

    file_name = file_nm

    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.

    IF IT IS A APPLICATION FILE

    THEN USE THIS

    data : p_file TYPE rlgrap-filename value 'TEST3.txt'.

    REGARDS

    NARESH

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 12, 2007 at 11:01 AM

    use p_file like rlgrap-filename in parameter

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 12, 2007 at 11:02 AM

    Hi,

    To declare the File name

    Parameters: P_FILE like rlgrap-filename .

    Regards

    Sudheer

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 12, 2007 at 11:02 AM

    Hi,

    Give like this,

    <b>PARAMETERS: p_file LIKE ibipparms-path.</b> " Filename

    (or)

    <b>parameters: p_file type localfile</b>

    Regards,

    Padmam.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 12, 2007 at 11:07 AM

    First declre the parameter as

    Parameters: P_FILE like rlgrap-filename .

    and use the following fm below the at selection screen on p_file statement

    FILE_NAME_GET

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 12, 2007 at 12:17 PM

    Hi,

    DATA: wf_ext(4) VALUE '.txt'.

    PARAMETERS :p_ufnam LIKE rlgrap-filename MODIF ID unx.

    INITIALIZATION.

    CASE sy-sysid.

    WHEN 'DV1'.

    wf_unix = '/ABAP/DV1/'. "DV1 env path

    WHEN 'TS1'.

    wf_unix = '/ABAP/TS1/'. "TS1 env path

    WHEN 'PP1'.

    wf_unix = '/ABAP/PP1/'. "PP1 env path

    WHEN 'BH1'.

    wf_unix = '/ABAP/TRANS/'. "PRD env path

    ENDCASE.

    CONCATENATE wf_unix p_ufnam wf_ext INTO wf_unix.

    AT SELECTION-SCREEN OUTPUT.

    LOOP AT SCREEN .

    IF screen-name = 'P_UFNAM' .

    p_ufnam = wf_unix.

    ENDIF.

    ENDLOOP.

    Hope this helps.

    Reward if helpful.

    Regards,

    Sipra

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.