‎2009 Aug 05 8:39 PM
I am executing the program which has to create a file
however I am getting sy-subrc as 8 after executing the below code.
OPEN DATASET v_file_name FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
So is it authorization issue or what is the issue exactly.
How can I explain to my functional consultant about the issue.
she is asking what is the problem ?
Thanks in advance.
‎2009 Aug 11 5:50 PM
Max I double clicked and I found Z_I0571_OUTBOUND_PATH against logical path.
What I need to insert in my case If I need to ?
‎2009 Aug 05 8:50 PM
If your application server is on Unix the directory name will be case sensistive. First make sure that the output directory you are writing this file exists and matches the case that you are giving in the open dataset statement. If it is not a directory issue then it is most probabaly authorization issue(Normaly gives a dump). You should contact the Unix team in that case.
‎2009 Aug 05 9:40 PM
have break point at the open dataset statment and have a look at the variable... v_file_name it need to be exactly the same as the path appears when u see in AL11 like sap\Temp\Dev.... T and D is caps and and rest are lower case....
parameter : p_filepathe type ....... lower case. " is the addition you might have to use if you are getting it from a parameter selection element.
‎2009 Aug 11 5:11 PM
Hi Experts,
The problem here I found is file path does not exist in the application server.
When I checked the transaction code : al11 for the below directory,
/data/interface/CTLOG/I057.10000009941.T it does not exists.
However in debugging the program, I removed u201CCTLOGu201D folder in the abovefile path, the program executed well with /data/interface/I057.10000009941.T .
I wrote the above explanation to my functional consultant, she replied me like below
"What do I have to do in order to get this to successfully execute in the system.
Where do I remove the CTLOG from"
HOW TO EXPLAIN HER THIS SOLUTION or WHAT I NEED TO CONVEY HER ?
-
Below is the code where file path is derivated :
IF p_prvmod NE c_marked.
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
nr_range_nr = '01'
object = 'ZNR_571'
quantity = '1'
subobject = space
toyear = '2008'
ignore_buffer = space
IMPORTING
number = v_file_num
EXCEPTIONS
interval_not_found = 1
number_range_not_intern = 2
object_not_found = 3
quantity_is_0 = 4
quantity_is_not_1 = 5
interval_overflow = 6
buffer_overflow = 7
OTHERS = 8.
IF sy-subrc NE 0.
CLEAR v_file_num.
ENDIF.
CALL FUNCTION 'FILE_GET_NAME'
EXPORTING
client = sy-mandt
logical_filename = p_lgfnam
operating_system = sy-opsys
parameter_1 = p_phyfna
parameter_2 = v_file_num
IMPORTING
file_name = v_file_name
EXCEPTIONS
file_not_found = 1
OTHERS = 2.
‎2009 Aug 11 5:28 PM
Hi
I think the problem is how the path to be used is defined.
If a logical path is being used, it need to runs the trx FILE and change the path of the logical file there.
Probably here a path like this is set:
/data/interface/CTLOG/<PARAM>
So it should be /data/interface/<PARAM>
Max
‎2009 Aug 11 5:33 PM
What I need to do here Max?
I am not taht export of logical and phiysical file paths...
Could you please explain me bit clearly ,what I need to do or what I need to suggest ?
THANKS IN ADVANCE FOR YOUR REPLY
‎2009 Aug 11 5:36 PM
Hi
Find out the value of P_LGFNAM (probably it's a parameter of selection screen, isn't it?)
Then run the trx FILE and try to check that it in the node Logical File Path definition and/or Logical file name definitiion, cross-client
What can you see there?
Max
‎2009 Aug 11 5:38 PM
when you are debugging check whcih logical file name it is using here at this sttaement
CALL FUNCTION 'FILE_GET_NAME'
EXPORTING
client = sy-mandt
logical_filename = p_lgfnam
operating_system = sy-opsys
parameter_1 = p_phyfna
parameter_2 = v_file_num
IMPORTING
file_name = v_file_name
EXCEPTIONS
file_not_found = 1
OTHERS = 2.
then go to transaction FILE, and use that logical file name to change the physical path
‎2009 Aug 11 5:41 PM
I have here
Z_521_LOGICAL_PATH_US50 Logical File for RICEF 1521 for US50
Z_521_LOGICAL_PATH_US51 Logical File for RICEF 1521 for US51
Z_521_LOGICAL_PATH_US52 Logical File for RICEF 1521 for US52
Z_521_LOGICAL_PATH_US53 Logical File for RICEF 1521 for US53
Z_521_LOGICAL_PATH_US54 Logical File for RICEF 1521 for US54
Z_521_LOGICAL_PATH_US60 Logical File for RICEF 1521 for US60
Z_521_LOGICAL_PATH_US84 Logical File for RICEF 1521 for US84
Z_I0571_OUTBOUND_FILE Logical filename for interface 571
Z_I1841_OUTBOUND_PATH SAP GL to FE System Interface FD 1841
\DATA\R5_VEND_CHAR_OP.LSMW.CONV LSM Workbench: MERCURY RTP_RELEASE5 VEND_CHAR_OP
What can I do ?
‎2009 Aug 11 5:43 PM
Hi
Do a double click on one of those hits and check the attributes
For example, in my system I've defined the logica path Z_FILE_CAMBI where I've inserted this path:
/usr/sap/trans.<SYSID>/BTCI/ftp/<FILENAME>
That means in my production system the file will be stored in path /usr/sap/trans.PRD/BTCI/ftp
So in your system u should see a path like /data/interface/CTLOG/, can u see it?
Max
‎2009 Aug 11 5:50 PM
Max I double clicked and I found Z_I0571_OUTBOUND_PATH against logical path.
What I need to insert in my case If I need to ?
‎2009 Aug 11 5:53 PM
That's ok
Now go to the first node (Logical File PAth Definition) and search the hit Z_I0571_OUTBOUND_PATH: what can u see here?
Max
‎2009 Aug 11 5:56 PM
I can seee
Z_521_LOGICAL_PATH_US51 Logical file path for Outb Priority Report for US51
Z_521_LOGICAL_PATH_US52 Logical file path for Outb Priority Report for US52
Z_521_LOGICAL_PATH_US53 Logical file path for Outb Priority Report for US53
Z_521_LOGICAL_PATH_US54 Logical file path for Outb Priority Report for US54
Z_521_LOGICAL_PATH_US60 Logical file path for Outb Priority Report for US60
Z_521_LOGICAL_PATH_US84 Logical file path for Outb Priority Report for US84
Z_I0571_OUTBOUND_PATH Interface I0571 outbound file path
Z_I1841_OUTBOUND_PATH Interface I1841 outbound file path SAPGL2FE
last but one is there...
Now what have to do ?
‎2009 Aug 11 5:59 PM
Hi
Please, Mark the hit Z_I0571_OUTBOUND_PATH: and do a double click on node Assignment of Pyisical Path...., it's a child of node Logical Path Definition
Max
‎2009 Aug 11 6:07 PM
(Actually this is quality system ) I navigated inside as you suggested ....
I have a Physical file path of
/data/interface/<SYSID>CLNT<CLIENT>/OUT/CTLOG/<FILENAME>
I tried to change file path , however I got a popup saying :
"Changes to Repository or cross-client Customizing are not permitted" in quality system
However looks like I have acces to change the above path in Development system .
What can I do now ?
‎2009 Aug 11 6:25 PM
HI
BANG
You're in the right point.
/data/interface/<SYSID>CLNT<CLIENT>/OUT/CTLOG/<FILENAME>
<SYSID> is the System ID
<CLIENT> is the client
So u should check in your dev system in the path above exists, u need to replace <SYSID> with the system ID and <CLIENT> with the client of your login.
For example: if system id of development system is DEV and the client is 100, u should see (by AL11) the path
/data/interface/DEVCLNT100/OUT/CTLOG
If the path exists, you've a problem, because it means a similar path in production system is not created yet; u can change the path in development system in according to production path, but then your report can't work in development or quality system.
So before changing the path u should ask which right logical path has to be inserted there:
if it's /data/interface/<SYSID>CLNT<CLIENT>/OUT/CTLOG/, it means u need to ask your basis to create the path in production system and u don't need to change any data by FILE transaction.
Max
‎2009 Aug 11 7:51 PM