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

SXPG_CALL_SYSTEM'

Former Member
0 Likes
937

Hi All,

My requirement is to read all files using the FM : SXPG_CALL_SYSTEM'

except a particular format from a directory and then process it .

Now,can we get files depending on our condition OR do we get all the files specified in the directory???

Regards,

Faiz

Hi All,

My requirement is to read all files using the FM : SXPG_CALL_SYSTEM'

except a particular format from a directory and then process it .

Now,can we get files depending on our condition OR do we get all the files specified in the directory???

Regards,

Faiz

3 REPLIES 3
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
825

My requirement is to read all files using the FM : SXPG_CALL_SYSTEM

I assume you want to list all the files in a particular AS folder of a particular format viz., *.txt, *.xls.

If you have a Windows server you can create an OS command:

cmd /c dir

And pass the following to the ADDITIONAL_PARAMETERS param:

<dirname>\*.<fileformat>

e.g., E:\usr\sap\ABAP\*.xls

BR,

Suhas

Read only

Former Member
0 Likes
825

Hi Suhas,

My shared folder consists of 3 files out of which 1 file is .SNC format. I want to exclude that file and read the other two.

But the problem is that the FM SXPG_CALL_SYSTEM reads all the files in the directory.

How do I resolve this issue.

Thanks,

Faiz

Read only

0 Likes
825

Hi,

You can:

(a) create a fancy OS command that filters .SNC files (I'm sure unix can do it)

or

(b) let SXPG* read in all the file names, and filter out .SNC later, in ABAP.

cheers

Paul