Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Flat file name

Former Member
0 Likes
973

Hi Experts,

I am working with BDC

I want to get the flat file name also .

how to get that

Regards,

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
946

try this function module

/SAPDMC/LSM_PATH_FILE_SPLIT

12 REPLIES 12
Read only

Former Member
0 Likes
946

use FM 'F4_FILENAME' to accept file name.

Regards,

Aparna Gaikwad

Read only

0 Likes
946

Hi Aparna,

suppose if the file name is like this

C:\Documents and Settings\pri\Desktop\intput.xls

my req is to get the name only 'input' to display in the report

if i upload no of flat files all the names i want to maintain in one Ztable

Read only

Former Member
0 Likes
946

Hi Buddy,

Use this selection screen event.

PARAMETERS: p_fname LIKE rlgrap-filename.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.

CALL FUNCTION 'F4_FILENAME'

EXPORTING

program_name = syst-cprog

IMPORTING

file_name = p_fname.

You can get the flat file name in the selection screen.

Regards,

Suresh.S

Read only

0 Likes
946

Hi Buddy,

Use this selection screen event.

PARAMETERS: p_fname LIKE rlgrap-filename DEFAULT 'C:\TEMP\materialupload.TXT'.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.

CALL FUNCTION 'F4_FILENAME'

EXPORTING

program_name = syst-cprog

IMPORTING

file_name = p_fname.

You can get the flat file name in the selection screen.

Regards,

Suresh.S

Read only

Former Member
0 Likes
946

If you are working with Presentation server

class CL_GUI_FRONTEND_SERVICES

Method FILE_OPEN_DIALOG

or

use the FUnction

TMP_GUI_FILE_OPEN_DIALOG

Read only

Former Member
0 Likes
946

Hi ,

Please check this link

http://help.sap.com/saphelp_nw70/helpdata/en/79/34a246d9b511d1950e0000e8353423/content.htm

Also check thsi function module

EPS_GET_DIRECTORY_LISTING

Best regards,

raam

Read only

0 Likes
946

Hi above all

Thanks for your reply,

I want only flat file name .

for ex:If i am working with this file

C:\Documents and Settings\pri\Desktop\INPUT.xls

i have to populate only The name of Flat file(INPUT) In Ztable

like that how many flat files i work with my program

all the names should be populated in ztable

I am successfully populating the data of flat file into ztable

I need only the FLAT FILE NAME

Regards,

Edited by: abap learner on Jul 8, 2008 11:35 AM

Read only

Former Member
0 Likes
946

hi use function module 'F4_FILENAME' . its works as Browse button in window

Thanks & Regards.

Raju Mummidi.

Read only

0 Likes
946

Hi raju,

Thats not my req

Pls see clearly my requirement once

Read only

Former Member
0 Likes
946

Hi ,

1 Use f4_filename function module you will get c:/temp/file.txt into the

selection screen variable .

2 then use string_reverse function module then the txt.elif/pmep/:c will

come so from that read the variable upto '/' that will become the reverse of your file name .

3.then again use string_reverse your filename come to one variable then append that to internal table

reward if useful

Read only

Former Member
0 Likes
946

thank u ramesh

i will try

Read only

Former Member
0 Likes
947

try this function module

/SAPDMC/LSM_PATH_FILE_SPLIT