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: 

The file " is not open, error in source sysem

ashokshirish1
Explorer
0 Kudos
305

 

Dear Sir/Madam,

The below code is working when executing infopackage manaully, where as in executing process chain

getting error in source system, THE FILE " IS NOT OPEN. I HAVE BEEN SEARCHING THE SOLUTION SINCE FROM 10 DAYS, i am not able to solve.seeking your help to load sucCessfull with process chain,

 

 

DATA: V_DIR TYPE EPS2FILNAM
VALUE 'path is hardcoded',

* V_MASK TYPE EPSF-EPSFILNAM VALUE 'I009_DFDVFPSL_*',
IT_DIR_LIST TYPE STANDARD TABLE OF EPS2FILI,
WA_DIR_LIST TYPE EPS2FILI,
P_FLNAME TYPE rsfilenm,
P_FILENAM TYPE rsfilenm.

CALL FUNCTION 'EPS2_GET_DIRECTORY_LISTING'
EXPORTING
IV_DIR_NAME = V_DIR
* FILE_MASK = V_MASK
* IMPORTING
* DIR_NAME =
* FILE_COUNTER =
* ERROR_COUNTER =
TABLES
DIR_LIST = IT_DIR_LIST
EXCEPTIONS
INVALID_EPS_SUBDIR = 1
SAPGPARAM_FAILED = 2
BUILD_DIRECTORY_FAILED = 3
NO_AUTHORIZATION = 4
READ_DIRECTORY_FAILED = 5
TOO_MANY_READ_ERRORS = 6
EMPTY_DIRECTORY_LIST = 7
OTHERS = 8.

IF SY-SUBRC IS INITIAL AND IT_DIR_LIST IS NOT INITIAL.
CLEAR: P_FLNAME ,P_FILENAME.
* Get filename and file Details
SORT IT_DIR_LIST by name.
LOOP AT IT_DIR_LIST INTO WA_DIR_LIST.
if WA_DIR_LIST-name CS 'ZABC'.

P_FLNAME = WA_DIR_LIST-name.
CONCATENATE V_DIR '/' P_FLNAME INTO P_FILENAM.
EXIT.
ENDIF.
ENDLOOP.
ENDIF.
p_filename = P_FILENAM.
p_filename = p_filenam.
p_subrc = 0.

 

 

 

 

7 REPLIES 7

yogeswara_adapa
Explorer
213

When you run manually it's working and with PC not working means, you could try changing the process chain execution user from system user to your ID and try. Here is how you can change user for execution in PC. Open PC in RSPC, goto menu options Process Chain -> Attributes -> Execution User -> Special User (give your ID) and activate.

0 Kudos
133

Dear Yogeswar.

you made me stress free, with your answer, thankyou so much, it worked with my id.

issues might be BWALREMOTE

yogeswara_adapa
Explorer
0 Kudos
207

If the above solution does not work, please provide error screenshot.

0 Kudos
182

i have checked the path to execute my id, its hidden , i cant give my user id

0 Kudos
165

You can add it in edit mode. Looks like you are checking in display mode.

roland_szajko
Product and Topic Expert
Product and Topic Expert
0 Kudos
173

Set a debug loop in the chain for the infopackage step and run the chain. Then jump into the debugger and debug your code to see why the standard background user gets different result. 

Maybe it lacks some authorization.