Transaction to find unix files in SAP
Hi Experts,
In my interface i need to send files to Unix but the file path specified is not there in AL11. Is there any other Transaction where i can find the Unix Files.
Hi Raghav,
The below code lists all unix directories. try it may be it will be useful.
REPORT ZTESTUNIX line-size 400
no standard page heading.
selection-screen begin of block ucmd with frame title text-001.
parameters: unixcom like rlgrap-filename. " ...SAP Interface file
selection-screen end of block ucmd.
data: begin of tabl occurs 500,
line(400),
end of tabl.
data: lines type i.
start-of-selection.
refresh tabl.
call 'SYSTEM' id 'COMMAND' field unixcom
id 'TAB' field tabl[].
describe table tabl lines lines.
loop at tabl.
write:/01 tabl-line.
endloop.
skip 2.
if lines = 0.
write:/ 'NO Occurances were found'.
else.
write:/ 'Command was successfully executed' color col_total.
write:/ 'Number of entries in Search' color col_total,
lines color 6.
endif.
after running the above program in the selection screen give the command as ls -al
this will list all directories.
<b>Reward Points if Useful</b>
Regards
Gokul
Similar Messages
-
Hi friends,
My server Intelligence Agent (SIA) can not start because the database service "SQLAnywhereForBI" can't start also. I got the following error :
"I . 08/09 20:35:06. A read failed with error code: (1392), Le fichier ou le répertoire est endommagé et illisible.
E. 08/09 20:35:06. Fatal error: cannot write to transaction log "C:\Program Files (x86)\SAP BusinessObjects\sqlanywhere\database\BI4_Audit.log"
E. 08/09 20:35:06. unable to start database "C:\Program Files (x86)\SAP BusinessObjects\sqlanywhere\database\BI4_CMS.db"
E. 08/09 20:35:06. Error writing to transaction log file
I. 08/09 20:35:06. Database server shutdown due to startup error "
inside the database log file.
Please, can you help meI found the solution by following the advice given on the following forum:
http://evtechnologies.com/transaction-logs-on-sybase-sql-anywhere-and-sap-businessobjects-bi-4-1
In fact, I crushed the BI4_Audit.db and BI4_Audit.log files and I replaced with others that I got from another machine where I installed BO again and where the files are not corrupted . After I logged in to the CMS database by executing the command in the command line:
dbisql -c "UID = DBA; PWD = mypassword; BI4 Server =; DBF = C: \ Program Files (x86) \ SAP BusinessObjects \ sqlanywhere \ database \ BI4_CMS.db."
Once connected, I start the command:
alter database 'C: \ Program Files (x86) \ SAP BusinessObjects \ sqlanywhere \ database \ BI4_Audit.db' alter log off;
The query runs successfully.
And that's good, I can be connected to BO smoothly.
Thank you again Eric -
Redirect SM50 output on unix file
Hello,
how can we execute daily SM50 daily and redirect html output on unix file?
I Tried SE38, execute SM50 succefully, but no way to redirect output of this transaction on a unix file ?
Thanks in advance.Hi majda,
Hope you are doing good.
Maybe check /nSM49 and create a OS command using ">>" operator Divyanshu mentioned:
Restrict Authorizations for Executing External Commands - SAP NetWeaver Application Server ABAP Security Guide - SAP Lib…
Thank you!
Kind Regards,
Hemanth
SAP AGS -
T-code to upload mutliple files into SAP directories ?
Hi,
Is there any other transaction to upload multiple files into SAP directories ( ALL11) other than CG3Z ? Any other procedures at the operating system level ? Please advise.
Regards
ShivaI dont think so. But you can :
-- Ask your developer to create a BDC for this transaction to upload multiple files.
-- Use LSMW to record this transaction to upload multiple files.
Regards,
Jazz -
Uploading File into SAP Transaction using BSP
Hi Everybody,
I would like to know how to save the file into SAP Transaction thro BSP. I have one requirement,For example,the captured file from the web should be attached into the Equipment master (Transaction Code IE02).Its possible via SAP GUI.But i would like to know how it can be done from BSP.The same example applicable to sales order also..
Also i wondering where these files get stored.
Anybody could help me out of this issue please?...
Naga BokkisamYou can do that using BDS..But you need to find the Business object to store it under Equipment Master or Sales order.
Here is the example where i stored the document under Warranty process, ie sub set of Equipment master:
Here BUS2222 is business object for Warranty Process:
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
BUFFER = STR_FILE_CONTENT
TABLES
BINARY_TAB = I_FILE_CONTENT.
CALL FUNCTION 'BDS_BUSINESSDOCUMENT_CREA_TAB'
EXPORTING
CLASSNAME = 'BUS2222' "classname_select
CLASSTYPE = 'BO'" classtype_select
CLIENT = SY-MANDT
OBJECT_KEY = OBJECT_KEY
BINARY_FLAG = 'X'
TABLES
SIGNATURE = I_SIGNATURE
COMPONENTS = I_COMPONENTS
CONTENT = I_FILE_CONTENT
EXCEPTIONS
NOTHING_FOUND = 1
PARAMETER_ERROR = 2
NOT_ALLOWED = 3
ERROR_KPRO = 4
INTERNAL_ERROR = 5
NOT_AUTHORIZED = 6
OTHERS = 7 .
Let me know if you need any detail..
<i>*Reward each useful answer</i>
Raja T -
How to Find the file in UNIX?
Hello Team,
I Have below list files and i have to find the file with latest date and time
CHECK_300914_200747_xxaa_account_name_20140930195924.txt
CHECK_300914_203213_xxaa_account_name_20140930203055.txt
CHECK_300914_205625_xxaa_account_name_20140930200219.txt
CHECK_300914_211345_xxaa_account_name_20140930200446.txt
CHECK_300914_213836_xxaa_account_name_20140930200718.txt
CHECK_300914_215928_xxaa_account_name_20140930201143.txt
In a list of files "CHECK_300914_215928_xxaa_account_name_20140930201143.txt" is the latest file i.e. ddmmyy:300914 and hhmmss:215928
Can you please help me to find the file in UNIX
Thanks in Advance,touch CHECK_300914_215928_xxaa_account_name_20140930201143.txt
touch CHECK_300914_211345_xxaa_account_name_20140930200446.txt
touch CHECK_300914_205625_xxaa_account_name_20140930200219.txt
touch CHECK_300914_203213_xxaa_account_name_20140930203055.txt
touch CHECK_300914_200747_xxaa_account_name_20140930195924.txt
ll
total 0
-rw-r--r-- 1 oracle oinstall 0 Oct 7 11:27 CHECK_300914_200747_xxaa_account_name_20140930195924.txt
-rw-r--r-- 1 oracle oinstall 0 Oct 7 11:27 CHECK_300914_203213_xxaa_account_name_20140930203055.txt
-rw-r--r-- 1 oracle oinstall 0 Oct 7 11:27 CHECK_300914_205625_xxaa_account_name_20140930200219.txt
-rw-r--r-- 1 oracle oinstall 0 Oct 7 11:26 CHECK_300914_211345_xxaa_account_name_20140930200446.txt
-rw-r--r-- 1 oracle oinstall 0 Oct 7 11:25 CHECK_300914_213836_xxaa_account_name_20140930200718.txt
-rw-r--r-- 1 oracle oinstall 0 Oct 7 11:25 CHECK_300914_215928_xxaa_account_name_20140930201143.txt
We are interesting in file with maximal values in "field" 2 and 3 assuming that fields are parts of filename separated with "_". I especially created (the file we are interested in) CHECK_300914_215928_xxaa_account_name_20140930201143.txt file to be the first created/modified file.
find . -name CHECK_300914_215928_xxaa_account_name_20140930201143.txt
./CHECK_300914_215928_xxaa_account_name_20140930201143.txt
will definitely work. But we should know the file name. As for topicstarter note it is not the case.
ls -tr . | tail -1
CHECK_300914_200747_xxaa_account_name_20140930195924.txt
gave incorrect file.
ls -l . | cut -d" " -f10 | sed 's/\(^CHECK_\)\([0-9]\{2\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)\(.*\)/\1\4\3\2\5/' | sort -r | head -1 | sed 's/\(^CHECK_\)\([0-9]\{2\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)\(.*\)/\1\4\3\2\5/'
CHECK_300914_215928_xxaa_account_name_20140930201143.txt
P.S.
I much apologize for an error in back filename transformation. Correct is marked in bold red. -
Unix command to find certain files
hello,
i have a powerbook g4 running leopard... i want to find all files related to a certain program or app. What would the unix command be to find all files related to a certain program or app.
Also... is there unix commands to find all related preferences or cached items?
Any help would be great.find / -name "*.doc"
where "*.doc" would find all files ending in .doc
and / is the root (top most) directory. You may specify a different starting point
find $HOME -name "*.pdf"
or even multiple starting directories
find ~username1 ~username2 ~username3 -name "*.zip"
You may specify more than one type of file to locate
find $HOME \( -name "*.dmg" -or -name "*.plist" \)
You may also want to look at the xargs command, as well as find's "-print0" option and xargs' "-0" option
find $HOME -name "*.txt" -print0 | xargs -0 grep "magic" -
Please help me 2 find a Document for this jar file com.sap.workflow_api
HI,
I want to create a task in UWL using web dynpro application. For this I need to import the specified com.sap.workflow_api.jar jar file.
This jar file is in our WEB AS Server
path=
server\c\usr\sap\W01\JC00\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\portal\portalapps\com.sap.workflow.apps\lib
I have browsed all over for a good document , i got just one link :
http://help.sap.com/saphelp_nw70/helpdata/EN/46/94b9b2b321581ce10000000a1553f7/frameset.htm
Could you help me out with a better document for This task and I want the complete document for this particular jar file com.sap.workflow_api.jar.
It wolud be very helpful if I could get it at the earliest.
Regards,
Boopathi MHI Ayyapparaj,
I have converted my project to javadoc,but i don't get any document for specific class. only I got what ever method is avilable in our controller that corssponding method come over in the java doc.
How can i get the document for specified IWorkflow interface ? this com.sap.workflow_api jar file has IWorkflow interface. I need to know how to use this IWorkflow interface.
How to use javadoc tool ?
Regards,
Boopathi M -
How to get the Attributes of the UNIX file Directories ?
Hi Guru,
How to find of the Attributes of the UNIX file Directories in sap TC :- u2018 *ZZWT*u2019 .
The file attribute details need to show in the report.
I try on FM : EPS_GET_FILE_ATTRIBUTES
/SDF/GET_FILE_INFO
But not getting the attributes details.
If any idea plz. Help me.
Regards,
SubashWhich basis release do you use?
From 7.0 you have [GET DATASET|http://help.sap.com/abapdocu_70/en/ABAPGET_DATASET.htm] statement
Before, you may only get what you see in AL11 : mimic what is in program RSWATCH0
Or you may register and use [UNIX commands (SM69 transaction / SXPG|http://help.sap.com/saphelp_nw70/helpdata/en/fa/0971e1543b11d1898e0000e8322d00/frameset.htm]) and get the results
Edited by: Sandra Rossi on Aug 2, 2009 12:39 AM -
How to store multiple files from SAp in to Application server?
Hi Guys,
Can anybody tell me how to store multiple files from SAP into Application server.in my application i have to get the data from SAP tables BSEG , BKPF , BSAK and BSIK that to daily i have to do.
Any Logic or Code for how to do is welcomed.
plz help me urgently.
Thanks,
GopiHi,
directories creates basis. If you have task to store data in application server you already should have information into which folder you have to do it. If you don't have this information because it is just for example training for next task then you can use your personal folder into which you have access. To get list of all available folders please look at attached code and form get_directories (you get the list of folders you see in transaction AL11). But don't forget: If you are using open dataset you have to have rights to access application folder!
Here you are code which I use to upload text files from local disc into application folder
Regards,
Karol
*& Report FILE_PC_TO_SAP
REPORT FILE_PC_TO_SAP.
DATA: BEGIN OF searchpoints OCCURS 100,
DIRNAME(200) TYPE c, " name of directory.
sp_name(100) TYPE c," name of entry. (may end with *)
END OF searchpoints.
DATA: BEGIN OF isearchpoints OCCURS 10,
dirname(75) TYPE c, " name of directory.
aliass(75) TYPE c, " alias for directory.
svrname(75) TYPE c, " svr where directory is availabl
sp_name(75) TYPE c, " name of entry. (may end with *)
sp_cs(10) TYPE c, " ContainsString pattern for name
END OF isearchpoints.
data: l_file type filetable.
data: l_rc type i.
data: itab type TABLE OF string.
data: g_tmp_file_path type rlgrap-filename.
data: wa_itab type string.
data: h_destin(100) type c.
data: dat type string.
INITIALIZATION.
perform get_directories.
START-OF-SELECTION.
parameters: in_file type string OBLIGATORY LOWER CASE.
parameters: destin(100) type c OBLIGATORY LOWER CASE.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = in_file
"FILETYPE = 'BIN'
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = ' '
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
TABLES
DATA_TAB = itab
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17.
IF sy-SUBRC <> 0.
write: / 'Error during loading input file!'.
ENDIF.
if h_destin is INITIAL.
h_destin = in_file.
endif.
CONCATENATE destin h_destin into dat SEPARATED BY '/'.
*TRANSLATE dat TO UPPER CASE.
OPEN DATASET dat FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-SUBRC = 0.
loop at itab into wa_itab.
TRANSFER: wa_itab TO dat.
endloop.
CLOSE DATASET dat.
write: / 'File uploaded!'.
ELSE.
write: / 'Not possible to open dataset'.
ENDIF.
at selection-screen on value-request for in_file.
perform select_input_file_name.
loop at l_file into g_tmp_file_path.
move g_tmp_file_path to in_file.
h_destin = ''.
SPLIT g_tmp_file_path at '\' into table itab.
loop at itab into g_tmp_file_path.
h_destin = g_tmp_file_path.
endloop.
endloop.
at selection-screen on value-request for destin.
DATA: lt_dfies TYPE TABLE OF dfies.
DATA: lwa_dfies TYPE dfies.
CALL FUNCTION 'DDIF_FIELDINFO_GET'
EXPORTING
tabname = '/BI0/PCO_AREA'
lfieldname = 'CO_AREA'
IMPORTING
dfies_wa = lwa_dfies.
lwa_dfies-tabname = 'searchpoints'.
lwa_dfies-REPTEXT = 'Destination directory'.
lwa_dfies-LENG = 100.
lwa_dfies-INTLEN = 100.
lwa_dfies-OUTPUTLEN = 100.
lwa_dfies-fieldname = 'SP_NAME'.
APPEND lwa_dfies TO lt_dfies.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'SP_NAME'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'destin'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = searchpoints
FIELD_TAB = lt_dfies
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
*& Form select_input_file_name
* text
form select_input_file_name.
* call function 'F4_FILENAME'
* exporting
* program_name = sy-repid
* dynpro_number = sy-dynnr
* field_name = 'PATH'
* importing
* file_name = g_tmp_file_path.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
EXPORTING
WINDOW_TITLE = 'Please choose a file'
"default_extension = '*.TXT'
"default_filename = 'C:\*.txt'
initial_directory = 'C:\'
file_filter = '*.*'
CHANGING
FILE_TABLE = l_file
RC = l_RC
EXCEPTIONS
FILE_OPEN_DIALOG_FAILED = 1
CNTL_ERROR = 2
ERROR_NO_GUI = 3
NOT_SUPPORTED_BY_GUI = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endform. "select_input_file_name
*& Form WRITE_DB_HOME
* Write DB home directory
* no parameters
FORM write_db_home.
CASE sy-dbsys(3).
WHEN 'ORA'.
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_ORAHOME'
ID 'VALUE' FIELD searchpoints-dirname.
*--- C5056155 Start of ALV -------------------------------*
* PERFORM flip_flop(rsora000) USING cflag.
* WRITE: / 'DIR_ORAHOME', 30 searchpoints-dirname.
MOVE: 'DIR_ORAHOME' TO searchpoints-sp_name.
APPEND searchpoints.
*--- C5056155 End of ALV -------------------------------*
WHEN 'ADA'.
CALL 'C_GETENV' ID 'NAME' FIELD 'DBROOT'
ID 'VALUE' FIELD searchpoints-dirname.
*--- C5056155 Start of ALV -------------------------------*
* PERFORM flip_flop(rsora000) USING cflag.
* WRITE: / 'DIR_ADA_DBROOT', 30 searchpoints-dirname.
MOVE: 'DIR_ADA_DBROOT' TO searchpoints-sp_name.
APPEND searchpoints.
*--- C5056155 End of ALV -------------------------------*
WHEN 'INF'.
CALL 'C_GETENV' ID 'NAME' FIELD 'INFORMIXDIR'
ID 'VALUE' FIELD searchpoints-dirname.
*--- C5056155 Start of ALV -------------------------------*
* PERFORM flip_flop(rsora000) USING cflag.
* WRITE: / 'DIR_INF_INFORMIXDIR', 30 searchpoints-dirname.
MOVE: 'DIR_INF_INFORMIXDIR' TO searchpoints-sp_name.
APPEND searchpoints..
*--- C5056155 End of ALV -------------------------------*
WHEN 'DB6'.
CALL 'C_GETENV' ID 'NAME' FIELD 'INSTHOME'
ID 'VALUE' FIELD searchpoints-dirname.
IF sy-subrc = 0.
*--- C5056155 Start of ALV -------------------------------*
* PERFORM flip_flop(rsora000) USING cflag.
* WRITE: / 'DIR_DB2_HOME', 30 searchpoints-dirname.
MOVE: 'DIR_DB2_HOME' TO searchpoints-sp_name.
APPEND searchpoints.
*--- C5056155 End of ALV -------------------------------*
ELSE.
EXIT.
ENDIF.
WHEN OTHERS.
EXIT.
ENDCASE.
ENDFORM. " WRITE_DB_HOME
FORM get_directories.
* get the name and aliases of ALL userdefined directories
SELECT * FROM user_dir INTO isearchpoints
WHERE svrname = sy-uname.
MOVE isearchpoints-dirname to searchpoints-dirname.
MOVE isearchpoints-aliass to searchpoints-sp_name.
APPEND searchpoints.
ENDSELECT.
SELECT * FROM user_dir INTO isearchpoints
WHERE svrname = 'all'.
MOVE isearchpoints-dirname to searchpoints-dirname.
MOVE isearchpoints-aliass to searchpoints-sp_name.
APPEND searchpoints.
ENDSELECT.
* Get DB home
IF sy-dbsys(3) = 'ADA'.
PERFORM write_db_home.
ENDIF.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_ATRA'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_ATRA' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_BINARY'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_BINARY' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory $DIR_CCMS
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_CCMS'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_CCMS' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_CT_LOGGING'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_CT_LOGGING' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_CT_RUN'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_CT_RUN' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_DATA'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_DATA' TO searchpoints-sp_name.
APPEND searchpoints.
* Get DB home
IF sy-dbsys(3) = 'DB6'.
PERFORM write_db_home.
ENDIF.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_DBMS'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_DBMS' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_EXECUTABLE'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_EXECUTABLE' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_EXE_ROOT'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_EXE_ROOT' TO searchpoints-sp_name.
APPEND searchpoints.
*get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_GEN'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_GEN' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_GEN_ROOT'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_GEN_ROOT' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_GLOBAL'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_GLOBAL' TO searchpoints-sp_name.
APPEND searchpoints.
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_GRAPH_EXE'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_GRAPH_EXE' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_GRAPH_LIB'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_GRAPH_LIB' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_HOME'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_HOME' TO searchpoints-sp_name.
APPEND searchpoints.
* Get DB home
IF sy-dbsys(3) = 'INF'.
PERFORM write_db_home.
ENDIF.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_INSTALL'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_INSTALL' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_INSTANCE'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_INSTANCE' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_LIBRARY'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_LIBRARY' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_LOGGING'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_LOGGING' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the files written by the memory inspector
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_MEMORY_INSPECTOR'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_MEMORY_INSPECTOR' TO searchpoints-sp_name.
APPEND searchpoints.
* Get DB home
IF sy-dbsys(3) = 'ORA'.
PERFORM write_db_home.
ENDIF.
*get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_PAGING'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_PAGING' TO searchpoints-sp_name.
APPEND searchpoints.
*get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_PUT'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_PUT' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_PERF'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_PERF' TO searchpoints-sp_name.
APPEND searchpoints.
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_PROFILE'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_PROFILE' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_PROTOKOLLS'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_PROTOKOLLS' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_REORG'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_REORG' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_ROLL'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_ROLL' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_RSYN'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_RSYN' TO searchpoints-sp_name.
APPEND searchpoints.
* calculate directory for saphostagent (no sapparam available...)
IF ( sy-opsys(3) = 'WIN' ) OR ( sy-opsys(3) = 'Win' ).
DATA: windir_path(64), programfiles_path(64).
* hoping that ProgramFiles is set in service user environment
CALL 'C_GETENV' ID 'NAME' FIELD 'ProgramFiles'
ID 'VALUE' FIELD programfiles_path.
IF programfiles_path IS INITIAL.
* %ProgramFiles% not available. guess from windir
CALL 'C_GETENV' ID 'NAME' FIELD 'windir'
ID 'VALUE' FIELD windir_path.
* e.g. S:\WINDOWS ==> S:\Program Files
CONCATENATE windir_path(3) 'Program Files' INTO programfiles_path.
ENDIF.
CONCATENATE programfiles_path '\SAP\hostctrl'
INTO searchpoints-dirname.
ELSE.
* on UNIX, the path is hard coded
searchpoints-dirname = '/usr/sap/hostctrl'.
ENDIF.
MOVE: 'DIR_SAPHOSTAGENT' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_SAPUSERS'
ID 'VALUE' FIELD searchpoints-dirname.
IF searchpoints-dirname = '.'.
IF sy-opsys = 'Windows NT'.
searchpoints-dirname = '.\'.
ELSE.
searchpoints-dirname = './'.
ENDIF.
ENDIF.
MOVE: 'DIR_SAPUSERS' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_SETUPS'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_SETUPS' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_SORTTMP'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_SORTTMP' TO searchpoints-sp_name.
APPEND searchpoints.
*get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_SOURCE'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_SOURCE' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_TEMP'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_TEMP' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_TRANS'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_TRANS' TO searchpoints-sp_name.
APPEND searchpoints.
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_TRFILES'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_TRFILES' TO searchpoints-sp_name.
APPEND searchpoints.
* get name of directory with the error files
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'DIR_TRSUB'
ID 'VALUE' FIELD searchpoints-dirname.
MOVE: 'DIR_TRSUB' TO searchpoints-sp_name.
APPEND searchpoints.
* get the name of the current server.
CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'rdisp/myname'
ID 'VALUE' FIELD searchpoints-dirname.
data: h_ind type i.
LOOP AT searchpoints.
h_ind = sy-tabix.
IF searchpoints-sp_name IS INITIAL.
DELETE searchpoints INDEX h_ind.
ENDIF.
ENDLOOP.
ENDFORM. -
Data Services XI3.1 function module files for SAP R/3 is not working
Hi guys,
Thank you for the quick response so far. I am very grateful to you all.
I got an issue and will try to explain as detail as I could and
hope ur guys won't mind. :P
I pass the functions module to SAP tech guy to install to SAP using CTS
method, and using 900086.R63 file type because my chinese client is
running SAP on unicode environment.
My DS installed on my laptop client; job server plus db2 is on HP
unix. SAP is on another HP Unix server. The function module I used is
supplied from Data Services XI3.1.
Anyway, the installation is successfully done with GUI wizard windows of
SAP Workbench instead of tp command line method.
1)However, I checked the ZAW0 function group, I opened and can't see any functions
listed under it, although the table structures ZACTA, ZTAB2048 and other items
were created.
2)So I tried to create SAP Datastore, Transport Target, etc and tried to
extract file. It failed and log said "can't open file ---
/db2/temp/curcode.txt". I checked and SAP working directory /db2/temp didn't have
curcode.txt, because the result file supposed to be extracted and stored there.
The SAP tech guy checked SAP and cant find generated ABAP program of
ZCURCD is running anyway, although my local CURCD ABAP program is
created.
3)Is it the 900086.R63 not complete? Is my function installation correct? I could view data
on datastore, but just cant run job to extract. Another non-unidcode 900200.S08 group
has larger file sizes. Should I try to install also this 900200.S08 files? Will it corrupt SAP
and cause system errors?
4)After that, I had tried to install the functions manually into ZAW0
one by one using cut and paste, however after that, I cant view the data view anymore with
error. Besides, I tried to run Check on the functions and they all returned
syntax errors, so I cant Activate any of them with SAP. Maybe dependency is missing??
Then, I deleted the manually installed functions and can view data again, but just cant extract
data by job.
5)Another side issue is all these SAP datastore creation and viewing is
through DI 11.5 old installation. The new Data Services X3.1 unable to
create datastore with database error, although the function module
installed is came from Data Services. Does anyone know the issue?
Thank you very much to read it patiently. :PHi,
Thank you for the informative link. It did help a lot in solving the problem.
(1) to (4) --- The Sap tech guy didnt install the function programs correctly, and he redo the transport again using CTS. Now I can see all the functions inside the function group ZAW0. While for the problem of cannot generate extracted file to SAP working directory for downloading, it is due to unix directory access permission setting. And also have to include the ftp username into SAPSYS user group as the help link suggested.
(5) For this problem, I reinstalled again the DS with all required components like Server Manager. The network technical guy helped me with the first installation, and the installation was not complete. So now the issue is solved, I can create R/3 Datastore with DS. -
How to find Archive data In SAP
Hi experts ,
How to find Archive data in SAP throught the following tcodes FTWL & AS_afb.
Thnx
VenkyHello,
Transaction FTWL is for the DART files (not actually archived data) that are stored in your archive server. In order to run a query, or browse the DART file, you would need to "Import from archive" from within FTWL and then browse the file.
I am not sure what you mean by AS_afb. Please provide more information.
Regards,
Karin Tillotson -
Storing PDF file in SAP?
Hello Friends,
I have one requirement. I need to display the PDF file as soon as user click on the push button. For that I need to store this PDF file in SAP.
I have that PDF file in my PC .
Could you pls let me know is there any ways to store the PDF file in SAP.
Thanks in adavcne.
Regards
RaghuSunil,
FYI: I have upload pdf file to application server using transaction CG3Z with transferable format BIN.
File has created successfully. I checked in AL11 transaction.
like that is showing..
X 11/07/2008 14:48:54 devadm 10,278 TEST.PDF
pls find the code below
=====
DATA EXE_PDF TYPE STRING
VALUE 'C:\Program Files\Adobe\Acrobat 8.0\Acrobat\acrobat.exe'.
DATA : PDFPATH TYPE STRING VALUE '/usr/sap/tmp/TEST.PDF'.
======
WHEN 'DISP'.
CALL FUNCTION 'WS_EXECUTE'
EXPORTING
COMMANDLINE = PDFPATH
PROGRAM = EXE_PDF
EXCEPTIONS
FRONTEND_ERROR = 1
NO_BATCH = 2
PROG_NOT_FOUND = 3
ILLEGAL_OPTION = 4
GUI_REFUSE_EXECUTE = 5
OTHERS = 6.
====
pls help me .
Thanks
Raghu -
Special characters in UTF-8 UNIX file
We have a program which downloads data from certain info-types in to the UNIX file, Fields are written to the specific position in the UNIX file. Some of the fields contains "Special Characters" in them.
When we download the file in UTF-8 mode (encoding default) then the file display special characters correctly but the all the characters in that record gets shifted to left.
When we download the file in ANSI mode then the file display doesn't special characters correctly but the all the characters in that record do not get shifted from their place.
How can i find the special character in the field and accordingly i will shift the field right so that in the final UNIX file field won't shift their positions.Hi Ramnivas.
Have you tried to read the characters with class: CL_ABAP_CHAR_UTILITIES (transaction SE24, label Attributes)
For example you can see # in ABAP but in the file will be a new line or a carriage return, you can detect that an adapt it with:
CL_ABAP_CHAR_UTILITIES=>NEWLINE or CL_ABAP_CHAR_UTILITIES=>CR_LF
Other hand, if you are using OPEN DATASET to download the file, look at the options of encoding
See F1 of OPEN DATASET and then encoding..
OPEN DATASET - encoding
Syntax
... ENCODING { DEFAULT
| {UTF-8 [SKIPPING|WITH BYTE-ORDER MARK]}
| NON-UNICODE } ... .
Hope it helps
Regards.
Alfonso. -
Download PDF spool to unix file system
Does anyone know how to programatically download a PDF document spool to the unix file system?
I am trying to find a method to send PDF documents that have gone to spool to a unix file system. If anyone had any ideas on how to do this, please let me know.
Thanks.Hi,
For this define a logical file while using transaction FILE.
In your code you will get the complete path of the file while using FM FILE_GET_NAME.
Then download your PDF while using instruction
OPEN DATASET...
TRANSFERT ...
Hope this help you .
Best regards
Maybe you are looking for
-
How can i upload more than one single file into a folder in the creative cloud?
how can i upload e.g. 10 files out of a folder on my desktop in one step into a folder in my creative cloud?
-
F110 DME payment file: add a number of lead days to posting and value date
Hello, For an Italian company, the DME payment file (F110) needs to be checked and approved by an accountant after it is created. This takes 3 to 4 days after which the file is sent to the bank. The bank will reject the file if the value date is thr
-
How to make [Search Mozilla Support] honor specification of a phrase?
Many search facilities will honor a phrase. If I specify "tab character" [including the quote marks!], they will search for the phrase "tab character" and only return links to documents with that phrase. As I discovered when trying to answer a questi
-
How to save controls value in labview
hi i want to know how to save the controls value in PC. means if i assign 5 digital value to a control it should remain there even i restarts my PC. Solved! Go to Solution.
-
Which one is the best way in migration from sap bpc ms 5.1 to nw7.5
Hi, I am doing Migration project from SAP BPC MS to NW. In this which one is the best way migrating By manually or By using SAP Migration tool. What are the merits and demarits migrating by manually. The data is moving from MS to NW as it is by using