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

Application Directory

Former Member
0 Likes
496

How can we loop through the Application Directory?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
448

Check the below code,

Data: parcom (250),

Wdnr(80),

Begin of tab1 occurs 0,

Line (200),

End of tab1.

Parcom = ‘’.

Move ‘/name/oms/mm/boms/xml/’ to w_dnr.

Concatenate ‘ls’ ‘*’ w_dnr into parcom.

Replace ‘*’ with ‘’ into parcom.

Call ‘system’ id ‘command’ field parcom

Id ‘tab’ field labl-sys.

Hope That Helps,

Satish.

2 REPLIES 2
Read only

Former Member
0 Likes
448

Hi Chakradar,

Are you talking about the reading data from the application server?

If it is so then you can use the following FM

CALL FUNCTION 'RZL_READ_DIR_LOCAL'

EXPORTING

NAME = PA_AFILE " Directory Path

TABLES

FILE_TBL = T_AFILES " All files...

EXCEPTIONS

ARGUMENT_ERROR = 1

NOT_FOUND = 2

OTHERS = 3.

IF SY-SUBRC 0.

Also check the link below

http://www.sapdevelopment.co.uk/file/file_updown.htm

Read only

Former Member
0 Likes
449

Check the below code,

Data: parcom (250),

Wdnr(80),

Begin of tab1 occurs 0,

Line (200),

End of tab1.

Parcom = ‘’.

Move ‘/name/oms/mm/boms/xml/’ to w_dnr.

Concatenate ‘ls’ ‘*’ w_dnr into parcom.

Replace ‘*’ with ‘’ into parcom.

Call ‘system’ id ‘command’ field parcom

Id ‘tab’ field labl-sys.

Hope That Helps,

Satish.