How to Rename the file in the application server?
Hi friends.
How to Rename the file in the application server? via abap program so pls kindly let me know thr any function module is there.
Thanks
With Regards
I.Muthukumar.
Dont think there is any quick fix way of doin this, however you can use the following sequence of dataset ops to get what you need:
READ DATASET - retrieve contents of current AS file
TRANSFER DATASET - create a new file on AS with the contents read in READ
DELETE DATASET - delete the original file on AS (if TRANSFER above is successful)
Hope this approach helps.
Cheers,
Aditya
Similar Messages
-
How to give the application server file path in the module pool programming
Hi,
Could somebody help me how to provide the application server file path in module pool programming once the logo is uploaded to sap system.
For eg I have imported a logo name owens into sap system by using transaction se78; now I need to call the path in the below url,
if container2 is initial.
CREATE OBJECT CONTAINER2
EXPORTING
CONTAINER_NAME = 'PICTURE_CONTAINER2'.
CREATE OBJECT PICTURE2
EXPORTING
PARENT = CONTAINER2.
CALL METHOD PICTURE2->SET_DISPLAY_MODE
EXPORTING
DISPLAY_MODE = CL_GUI_PICTURE=>display_mode_fit_center
EXCEPTIONS
ERROR = 1.
CALL METHOD PICTURE2->LOAD_PICTURE_FROM_URL
EXPORTING
URL = " ? "
EXCEPTIONS
ERROR = 1
Others = 2.
endif.
Thanks in advance
Deepuhi Deepu,
Use FM '/SAPDMC/LSM_F4_FRONTEND_FILE' for fetching the data from the application server path/presentation server path
Regards,
Santosh -
How to run ear file in java application server
i want how to run .ear file in java application server
1. i m created ear file
2. i m created jar file (bean,home,remote)
3.i m created war file(in the form of jsp)
but till now i couldnt run ear file
how to run
please hel meYou must create :
1.Jar file
2.War file
And then put them into an ear file
Exemple : myapp.ear contains
myappEJB.jar
myappWEB.war
META-INF/application.xml
and application.xml looks like this :
<application xmlns="http://java.sun.com/xml/ns/j2ee" version="1.4"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com /xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
<display-name>myapp</display-name>
<description>Demo application</description>
<module>
<ejb>myappEJB.jar</ejb>
</module>
<module>
<web>
<web-uri>myappWAR.war</web-uri>
<context-root>/myapp</context-root>
</web>
</module>
</application>Good luck -
How to change the application server paramters in 9ias
I want to change the change the heap size that JVM can use at runtime instead of changing it manually. The paramters are Command Line Options, for OC4j(Multiple VM configuration), the parameter is -Xmx in Java Options.
So I wanted to know if it is possible to change these Command Line Options at run time through Java code inside the application.Hi,
I think you didn't get what I intended to say. you said "what i find is :Problem:
RZ21->Technical Infrastructure->Availability Monitoring->CCMSPING instance for XB1 -Under Monitored systems".
Now, find your saplogon.ini file . It should have the correct information about your system with the application server. Try 'Load System' from your saplogon.ini file. You should be able to the correct information then.
Hope it will help you.
Rajeev -
How to populate the application server data on screen
Hi..
In my present requirement...
I need to give the vehicle no field on my custom screen...then i will press the capture weight button....
then it needs to fetch the weight from app server file (columns in file...1.date 2.time 3.weight...4.key.)and need to populate on my screen...
Could anybody suggest me the solution for this...hi,
Move the file data internal table. at runtime capture the required data from this internal table for the given vehicle reg.number and u can display the same data one the screen.
regards,
Raghu -
Convert file path in application server as link
How can we convert file path in application server as link to send email.
Thanks
SureshYour app server folders have a mappable location on your network, e.g,
server\path\filename. Use an HTML anchor tag and build the link with code. You'd be better off storing files on a file server (write to a mapped location from the app server) and link to there (same process). -
How to delete the record in the file present in the application server?
Hi,
I have two questions.
i) How can I delete a record based on some condition in the recordx in the file that is present in the application server?
ii) How can I lock the users whiel one user is accessing the file on the application server?
Thanks in advance.
SuvanHi,
If u want a frequent deletion this approach to delete a record from a file will havee unnecesary copy of records from one file to another and deletion of one file and renaming activities.
Instead what u can do is Add and field del_flag to ur record structure.
If u want to delete the record from a file just mark this del_flag as 'X'.
While processing u can have a loop like
loop at it_XXX where del_flag <> 'X'.
endloop.
This will logically delete the record.
When u r to finish the application at that time only perform this copying / deleting / and renaing activity
Hope this helps.
Cheers,
Nitin -
How to RENAME the file in UNIX-Appl. server, after READING it?
Hi Experts,
Following is my requirement,
What we are wanting here is the functionality added to this program that once the UNIX file is processed, that it can be closed and then renamed on the Application server with the yyyymmdd extension. For example, the program reads and processes the My_file.csv file today. Once it's finished, it then closes the file and renames it as My_file20080610.csv. By doing this, it will prevent the same file from being run the next day in case the new file is not sent.
So, pls. let me know that, How to RENAME is file in the UNIX - Appl. server, after reading it? obviuosly I closes it at the end.
thanqHi Srinivas,
You can create a My_file20080610.csv. Write the content from My_file.csv into My_file20080610.csv. Then using DELETE DATASET delete the file My_file.csv.
Thanks
Romit -
How to delete File from the Application Server,ABAP
Hi Gurus,
I'm using DELETE DATASET Statement ,
Based on Date how can i delete files with in the period in the Application server
Any BAPI/FM for this Delete file based on some Date Period
Thanks in Advance.DATA: BEGIN OF file,
dirname(75) TYPE c, " name of directory. (possibly truncated.)
name(75) TYPE c, " name of entry. (possibly truncated.)
type(10) TYPE c, " type of entry.
len(8) TYPE p, " length in bytes.
owner(8) TYPE c, " owner of the entry.
mtime(6) TYPE p, " last modification date, seconds since 1970
mode(9) TYPE c, " like "rwx-r-x--x": protection mode.
useable(1) TYPE c,
subrc(4) TYPE c,
errno(3) TYPE c,
errmsg(40) TYPE c,
mod_date TYPE d,
mod_time(8) TYPE c, " hh:mm:ss
seen(1) TYPE c,
changed(1) TYPE c,
END OF file.
DATA: BEGIN OF file_list OCCURS 100,
dirname(75) TYPE c, " name of directory. (possibly truncated.)
name(75) TYPE c, " name of entry. (possibly truncated.)
type(10) TYPE c, " type of entry.
len(8) TYPE p, " length in bytes.
owner(8) TYPE c, " owner of the entry.
mtime(6) TYPE p, " last modification date, seconds since 1970
mode(9) TYPE c, " like "rwx-r-x--x": protection mode.
useable(1) TYPE c,
subrc(4) TYPE c,
errno(3) TYPE c,
errmsg(40) TYPE c,
mod_date TYPE d,
mod_time(8) TYPE c, " hh:mm:ss
seen(1) TYPE c,
changed(1) TYPE c,
END OF file_list.
DO.
CLEAR file.
CALL 'C_DIR_READ_NEXT'
ID 'TYPE' FIELD file-type
ID 'NAME' FIELD file-name
ID 'LEN' FIELD file-len
ID 'OWNER' FIELD file-owner
ID 'MTIME' FIELD file-mtime
ID 'MODE' FIELD file-mode
ID 'ERRNO' FIELD file-errno
ID 'ERRMSG' FIELD file-errmsg.
if sy-subrc eq 0.
MOVE-CORRESPONDING file TO file_list.
APPEND file_list.
else.
exit.
endif.
enddo.
sort file_list based on date and time ie, MOD_DATE and MOD_TIME fields
and delete the entries -
How to load data from a flat file which is there in the application server
HI All,
how to load data from a flat file which is there in the application server..Hi,
Firstly you will need to place the file(s) in the AL11 path. Then in your infopackage in "Extraction" tab you need to select "Application Server" option. Then you need to specify the path as well as the exact file you want to load by using the browsing button.
If your file name keeps changing on a daily basis i.e. name_ddmmyyyy.csv, then in the Extraction tab you have the option to write an ABAP routine that generates the file name. Here you will need to append sy-datum to "name" and then append ".csv" to generate complete filename.
Please let me know if this is helpful or if you need any more inputs.
Thanks & Regards,
Nishant Tatkar. -
How to rename the SharePoint Document Library existing file name using Web service
Hi,
How to rename the SharePoint Document Library existing file name using SharePoint Web service.
Is it possible. How could i do it?
Thanks & Regards
Poomani SankaranHi,
Lists.UpdateListItems Method
would be helpful for your requirement.
Here is a blog with code demo for your reference:
http://blogs.msdn.com/b/knowledgecast/archive/2009/05/20/moss-using-the-list-web-service-to-rename-a-file.aspx
Best regards,
Patrick
Patrick Liang
TechNet Community Support -
Renaming a file on the application server
Hi all,
I create a file on the Application server which I want to rename means a program.
I would like to add the system stamptime at the time the program is running.
sample:
original name:
file.csv
final name:
file_20060626123000.csv
does somebody have an ABAP program to do that ? other ideas?
Thanks in advance,
FedeXThanks for the answers,
I do not what I doing wrong in my sample....
I am using this logical path and logical file in an InfoSpoke..
and I get the error:
"could not open file on application server"
My definitions are:
Logical PATH : Z_PATH_TEST
Syntax Group ->UNIX
<P=DIR_HOME>/<FILENAME>
( I am sure DIR_HOME is set correcty on SAP Directories)
Logical FILE NAME : Z_NAME_TEST
Physical Name :File1_<DATE>.csv
Data Format : ASC
Logical Path: Z_PATH_TEST
What could be wrong here?... Thanks again
FedeX -
How to download the application file to local file by back ground job?
hi:
can any one tell me how to download the application file to local file by back ground job? thanks in advance..
MonsonHi,
In order to download a file from application layer to a local file in background,
first write a report(ZREPORT1) in which do the following steps:
OPEN DATASET g_file_1 FOR INPUT IN TEXT MODE ENCODING DEFAULT.
loop the g_file and append all the data into another internal table.
end of this report you shd have all the data in the application layer file into your internal table.
Now create another report(ZREPORT2) and submit this report in background.
that is,
JOB_OPEN
JOB_SUBMIT and
JOB_CLOSE
and in job_submit submit ZREPORT1 which downloads the file in application layer.
Please reward points if helpful.
Regards,
Arul. -
How to send the report output to the application server in a excel file
Hello,
how to send the report output to the application server in a excel file.
and the report runs in background.
Thanks in advance.
SundeepDear Sundeep.
I'm providing you with the following piece of code ... Its working fine for me ... hopefully it suits your requirement ...
D A T A D E C L A R A T I O N *
TYPES: BEGIN OF TY_EXCEL,
CELL_01(80) TYPE C,
CELL_02(80) TYPE C,
CELL_03(80) TYPE C,
CELL_04(80) TYPE C,
CELL_05(80) TYPE C,
CELL_06(80) TYPE C,
CELL_07(80) TYPE C,
CELL_08(80) TYPE C,
CELL_09(80) TYPE C,
CELL_10(80) TYPE C,
END OF TY_EXCEL.
DATA: IT_EXCEL TYPE STANDARD TABLE OF TY_EXCEL,
WA_EXCEL TYPE TY_EXCEL..
E V E N T : S T A R T - O F - S E L E C T I O N *
START-OF-SELECTION.
Here you populate the Internal Table.
Display - Top of the Page.
PERFORM DISPLAY_TOP_OF_PAGE.
E V E N T : E N D - O F - S E L E C T I O N *
END-OF-SELECTION.
SET PF-STATUS 'GUI_STATUS'.
E V E N T : A T U S E R - C O M M AN D *
AT USER-COMMAND.
CASE SY-UCOMM.
WHEN 'EXPORT'.
Exporting the report data to Excel.
PERFORM EXPORT_TO_EXCEL.
ENDCASE.
*& Form DISPLAY_TOP_OF_PAGE
text
--> p1 text
<-- p2 text
FORM DISPLAY_TOP_OF_PAGE .
SKIP.
WRITE: /05(128) SY-ULINE,
/05 SY-VLINE,
06(127) 'O R I C A'
CENTERED COLOR 1,
132 SY-VLINE.
WRITE: /05(128) SY-ULINE,
/05 SY-VLINE,
06(127) 'Shift Asset Depreciation - Period/Year-wise Report.'
CENTERED COLOR 4 INTENSIFIED OFF,
132 SY-VLINE.
WRITE: /05(128) SY-ULINE.
E X C E L O P E R A T I O N
CLEAR: IT_EXCEL[],
WA_EXCEL.
PERFORM APPEND_BLANK_LINE USING 1.
WA_EXCEL-cell_02 = ' XYZ Ltd. '.
APPEND WA_EXCEL TO IT_EXCEL.
CLEAR: WA_EXCEL.
WA_EXCEL-cell_02 = 'Shift Asset Depreciation - Period/Year-wise Report.'.
APPEND WA_EXCEL TO IT_EXCEL.
PERFORM APPEND_BLANK_LINE USING 1.
ENDFORM. " DISPLAY_TOP_OF_PAGE
*& Form APPEND_BLANK_LINE
text
-->P_1 text
FORM APPEND_BLANK_LINE USING P_LINE TYPE I.
DO P_LINE TIMES.
CLEAR: WA_EXCEL.
APPEND WA_EXCEL TO IT_EXCEL.
enddo.
ENDFORM.
*& Form EXPORT_TO_EXCEL
text
--> p1 text
<-- p2 text
FORM EXPORT_TO_EXCEL .
DATA: L_FILE_NAME(60) TYPE C.
Create a file name
CONCATENATE 'C:\' 'Shift_Depn_' SY-DATUM6(2) '.' SY-DATUM4(2)
'.' SY-DATUM+0(4) INTO L_FILE_NAME.
Pass the internal table (it_excel which is already populated )
to the function module for excel download.
CALL FUNCTION 'WS_EXCEL'
exporting
filename = L_FILE_NAME
tables
data = IT_EXCEL
exceptions
unknown_error = 1
others = 2.
if sy-subrc <> 0.
message e001(ymm) with 'Error in exporting to Excel.'.
endif.
ENDFORM. " EXPORT_TO_EXCEL
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When you click the button - Export to Excel ( GUI-Status) you'll be able to export the content of the Internal Table to an Excel file .......
Regards,
Abir
Don't forget to award Points * -
How can i display a image file which is placed in the applications server
Hi all,
Can any one help me how can I display a image file which is present in the application server.
With regards,
M.Ramana Murthyhi,
*& Form TOP_OF_PAGE
* text
FORM F_TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = IT_LISTHEADER
i_logo = Logo name
* I_END_OF_LIST_GRID =
ENDFORM. "TOP_OF_PAGE
rgds
Anver
Maybe you are looking for
-
I've had the phone for a couple of weeks now and am gradually getting to grips with it. Missed Call notification: Initially, had a bug I believe as whenever I had a missed call, I would get a notification but no matter what I tried, it would not disa
-
The title more or less says it all. I have Elements 13 & am Using the Panasonic HC 750V. I shot in AVCHD 1080/60p & instead of surround sound choose the directed feature to focus on the voices in front of me. The audio works in preview but not on the
-
After reinstall, Premiere CS4 will not open
To solve an Encore problem, I had to uninstall the Production Premium suite, run the cleaner, reboot, and reinstall the suite. This did not solve my Encore problem, and also created a new one for Premiere. When I launch Premiere, it starts to open,
-
Won't go to sleep with sleep timer set
After upgrading to Snow Leopard have been having the following problem: When I go to bed, I set my mac to play an iTunes internet stream. I set the Dashboard widget "Minutes" to sleep my computer after one hour or more. I did this procedure all of th
-
With recent iphoto update, i am having problems opening individual photos. The photos are there when i scroll through, but when i select one to work with, nothing opens. Any suggestions?