‎2005 Feb 16 3:29 PM
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
‎2005 Feb 16 3: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
‎2005 Feb 16 3: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
‎2005 Feb 16 5:20 PM
Hi,
That was a good insight for the query. Can u tell me the decision criteria for which one to use when ??
Regards,
-Hello SAP
‎2005 Feb 16 5:43 PM
‎2005 Feb 16 7: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
‎2005 Feb 16 8:46 PM
Hi Srinivas,
What a perfect way of technically quoting point by point.
Thanx a lot for sharing your information.
Ragards,
Hello SAP.