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

Parameters used for file input

Hi,

PARAMETERS : P_FNAME LIKE RLGRAP-FILENAME OBLIGATORY

PARAMETERS : P_FNAME LIKE IBIPPARMS-PATH OBLIGATORY

PARAMETERS : P_HFILE LIKE FILENAME-FILEINTERN OBLIGATORY

PARAMETERS : P_NAME TYPE APQI-GROUPID.

The above are the various ways of decalring the parameters for file input... can u tell me what is the difference between them & the situations or condition when, which one has to be used ??

Regards,

- Hello SAP

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Feb 16, 2005 at 03:40 PM

    Not sure that there is a big difference between them, other than maybe field length(i haven't checked).

    I usually use the following

    
    report zrich_0001.
    
    PARAMETERS: P_FILE1 TYPE LOCALFILE DEFAULT
             'C:Test.txt'.
    
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE1.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
           EXPORTING
                STATIC    = 'X'
           CHANGING
                FILE_NAME = P_FILE1.
    
    

    Regards,

    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 16, 2005 at 03:55 PM

    Hi ,

    RLGRAP-FILENAME ,IBIPPARMS-PATH

    Both are of same component type LOCALFILE (length 128)

    so actually therez no difference between them

    The other two are of smaller length..

    FILENAME-FILEINTERN uses a check table...

    Thats it I suppose..!!

    Regards

    Immanuel

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 16, 2005 at 07:19 PM

    Hi,

    I am assuming you are using the parameters to upload/download a file.

    Here is what they will do for you. Let us see the following file name parameter.

    <i>PARAMETERS : P_FNAME LIKE RLGRAP-FILENAME OBLIGATORY</i>

    Defining the parameter this way will help you in using the obsolete function modules of WS_DOWNLOAD, WS_UPLOAD as their interface requires the filename to be defined this way. But the new replacement for them GUI_DOWNLOAD and GUI_DOWNLOAD defined the filename as a string. Also F4 function modules used for browsing through desktop directories for a file like KD_GET_FILENAME_ON_F4 also use the parameter of this type.

    So, if you are using a function module like the ones above, then you are better of with this parameter.

    Let us see this definition.

    <i>PARAMETERS : P_FNAME LIKE IBIPPARMS-PATH OBLIGATORY</i>

    This is no different from the one above, so it makes no difference.

    Next.

    <i>PARAMETERS : P_HFILE LIKE FILENAME-FILEINTERN OBLIGATORY</i>

    This is typically used for a logical file name, not a physical filename and path. What a logical filename does is that it allows you to define logically define filenames and use them in your programs at the same time giving you(or your network team) the flexibility to change the directory structure. When they change the directory structure, all you have to do is to change your logical path definition, rather than changing every single program that uses the path. FILE is the tcode for this area. Length of this is just 60 and so it may not be sufficient for the filename and path. But if you are using it as a logical file name, then it is useful when using function modules like FILE_GET_NAME which will read in a logical file name and give you the string containing the physical path and file name.

    Now the last one.

    <i>PARAMETERS : P_NAME TYPE APQI-GROUPID.</i>

    This is not at relevant for files. This is used in batch input and this is the name of the batch input session. It is 12 characters long.

    Hope this helps, if not please let us know.

    Srinivas

    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.