How to put the file name in notepad file
dear frank,
how to put the file name in notepad file via power shell. I mean i want to put the file name in that notepad file
for example,
my file name is ABL and in this file data is
02/06/2015,180.00,182.00,176.01,180.50,1575500
02/06/2015,4.20,4.20,4.20,4.20,500
02/06/2015,113.50,113.70,112.91,113.09,157800
02/06/2015,682.01,695.90,682.00,683.19,4250
02/06/2015,213.98,215.00,213.00,214.87,326200
02/06/2015,21.52,21.65,21.52,21.60,4000
02/06/2015,111.00,111.25,108.25,108.91,17100
02/06/2015,52.00,52.00,52.00,52.00,500
and i want to data in this form
ABL,02/06/2015,180.00,182.00,176.01,180.50,1575500
ABL,02/06/2015,4.20,4.20,4.20,4.20,500
ABL,02/06/2015,113.50,113.70,112.91,113.09,157800
ABL,02/06/2015,682.01,695.90,682.00,683.19,4250
ABL,02/06/2015,213.98,215.00,213.00,214.87,326200
ABL,02/06/2015,21.52,21.65,21.52,21.60,4000
ABL,02/06/2015,111.00,111.25,108.25,108.91,17100
ABL,02/06/2015,52.00,52.00,52.00,52.00,500
There are many file like this that i want to be edit
plese tell me how can i do it, i think it is possible via windows power shell.
thanks in advance.
Hi
Just for completeness, what version of VB.NET are you using?
Here is a complete project to copy all the files with the added "ABL," at the start of each line. You need to start a new Project with a BLANK default Form1, and replace all of Form1 code with the code below. When you run this project, you
need to use the 2 buttons to set up the ORIGINAL file folder and a folder to place the copies. You need to check if the file EXTENSION is correct (I assumed txt), and check the text to add to each line is correct. Once all is set up you should have a
big red button to start the operation.
NOTE: it is important that you try this out on a copy of some of the files to verify accuracy BEFORE trying on original files. Make sure you have a good back up of the original files before doing anything else.
' new project with default BLANK Form1
' replace all Form1 code with this code
' WARNING: make sure you have a backup of
' any files you use this application to
' operate on.
Option Strict On
Option Infer Off
Option Explicit On
Public Class Form1
Dim OrigFileFolderPath As String = Nothing
Dim CopyToFolderPath As String = Nothing
Dim lab1, lab2, lab3 As New Label
Dim tb1, tb2, tb3 As New TextBox
Dim b1, b2, b3, b4 As New Button
Dim fb As New FolderBrowserDialog
Dim bgw As New System.ComponentModel.BackgroundWorker
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
Me.Size = New Size(731, 300)
With lab1
.Text = "Original Files Folder Path"
.Location = New Point(15, 5)
End With
With tb1
.Width = 560
.Location = New Point(10, 30)
.BackColor = Color.Khaki
.ForeColor = Color.Maroon
.Font = New Font(Me.Font.FontFamily, 12)
.BorderStyle = BorderStyle.FixedSingle
.Anchor = AnchorStyles.Top Or AnchorStyles.Left Or AnchorStyles.Right
End With
With lab2
.Text = "Copy Files to Folder Path"
.Location = New Point(15, 125)
End With
With tb2
.Width = 665
.Location = New Point(10, 150)
.BackColor = Color.Khaki
.ForeColor = Color.Maroon
.Font = New Font(Me.Font.FontFamily, 12)
.BorderStyle = BorderStyle.FixedSingle
.Anchor = AnchorStyles.Top Or AnchorStyles.Left Or AnchorStyles.Right
End With
With lab3
.Text = "File Ext"
.Location = New Point(600, 5)
.Anchor = AnchorStyles.Top Or AnchorStyles.Right
End With
With tb3
.Text = ".txt"
.Width = 80
.Location = New Point(590, 30)
.BackColor = Color.Khaki
.ForeColor = Color.Maroon
.TextAlign = HorizontalAlignment.Center
.Font = New Font(Me.Font.FontFamily, 12)
.BorderStyle = BorderStyle.FixedSingle
.Anchor = AnchorStyles.Top Or AnchorStyles.Right
End With
With b1
.Text = "Choose Original Files Folder Path"
.AutoSize = True
.Location = New Point(10, 65)
End With
With b2
.Text = "Choose Copy Files to Folder Path"
.AutoSize = True
.Location = New Point(10, 185)
End With
With b3
.Text = "DO THE COPY"
.AutoSize = False
.Size = New Size(240, 50)
.BackColor = Color.Red
.ForeColor = Color.White
.Font = New Font(Me.Font.FontFamily, 20, FontStyle.Bold)
.Location = New Point(420, 80)
.Anchor = AnchorStyles.Top Or AnchorStyles.Right
.Visible = False
End With
With b4
.Text = "CANCEL JOB"
.AutoSize = False
.Size = New Size(240, 50)
.BackColor = Color.Red
.ForeColor = Color.White
.Font = New Font(Me.Font.FontFamily, 20, FontStyle.Bold)
.Location = New Point(420, 80)
.Anchor = AnchorStyles.Top Or AnchorStyles.Right
.Visible = False
End With
Me.Controls.AddRange({lab1, lab2, lab3, tb1, tb2, tb3, b1, b2, b3, b4})
With bgw
.WorkerReportsProgress = True
.WorkerSupportsCancellation = True
End With
AddHandler bgw.DoWork, AddressOf bgw_DoWork
AddHandler bgw.RunWorkerCompleted, AddressOf bgw_Completed
AddHandler b1.Click, AddressOf b1_Click
AddHandler b2.Click, AddressOf b2_Click
AddHandler b3.Click, AddressOf b3_Click
AddHandler b4.Click, AddressOf b4_Click
End Sub
Private Sub b1_Click(sender As Object, e As EventArgs)
fb.SelectedPath = My.Computer.FileSystem.SpecialDirectories.MyDocuments
fb.ShowNewFolderButton = False
Dim r As DialogResult = fb.ShowDialog
If r = Windows.Forms.DialogResult.OK Then
tb1.Text = fb.SelectedPath
If IO.Directory.Exists(tb1.Text) AndAlso IO.Directory.Exists(tb2.Text) AndAlso Not (tb1.Text = tb2.Text) Then
If tb3.Text = Nothing Then
redo: tb3.Text = InputBox("Enter the file extension that you want to copy/change", "FILE EXTENSION")
If tb3.Text = Nothing Then GoTo redo
End If
b3.Visible = True
Else
b3.Visible = False
End If
End If
End Sub
Private Sub b2_Click(sender As Object, e As EventArgs)
fb.SelectedPath = My.Computer.FileSystem.SpecialDirectories.MyDocuments
fb.ShowNewFolderButton = True
Dim r As DialogResult = fb.ShowDialog
If r = Windows.Forms.DialogResult.OK Then
tb2.Text = fb.SelectedPath
If IO.Directory.Exists(tb1.Text) AndAlso IO.Directory.Exists(tb2.Text) AndAlso Not (tb1.Text = tb2.Text) Then
If tb3.Text = Nothing Then
redo: tb3.Text = InputBox("Enter the file extension that you want to copy/change", "FILE EXTENSION")
If tb3.Text = Nothing Then GoTo redo
End If
b3.Visible = True
Else
b3.Visible = False
End If
End If
End Sub
Private Sub b3_Click(sender As Object, e As EventArgs)
b3.Visible = False
b4.Visible = True
If Not tb3.Text.StartsWith(".") Then tb3.Text = "." & tb3.Text
bgw.RunWorkerAsync()
End Sub
Private Sub b4_Click(sender As Object, e As EventArgs)
bgw.CancelAsync()
End Sub
Private Sub ReadPWFile(fn As String)
Dim filename As String = My.Computer.FileSystem.GetName(fn)
Dim barename As String = IO.Path.GetFileNameWithoutExtension(fn)
Dim copyto As String = tb2.Text & "\" & filename
Dim line As String = Nothing
Dim lines As New List(Of String)
Using sr As IO.StreamReader = New IO.StreamReader(fn)
Do
line = sr.ReadLine()
If Not line = Nothing Then
lines.Add(barename & "," & line)
End If
Loop Until line = Nothing
End Using
Using sw As IO.StreamWriter = New IO.StreamWriter(copyto)
For Each s As String In lines
sw.WriteLine(s)
Next
End Using
End Sub
Private Sub bgw_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs)
Dim ftc As Collections.ObjectModel.ReadOnlyCollection(Of String) = My.Computer.FileSystem.GetFiles(tb1.Text)
For Each f As String In ftc
If bgw.CancellationPending Then
e.Cancel = True
Exit For
End If
Dim ex As String = My.Computer.FileSystem.GetFileInfo(f).Extension.ToLower
If My.Computer.FileSystem.GetFileInfo(f).Extension.ToLower = tb3.Text.ToLower Then
ReadPWFile(f)
End If
Next
End Sub
Public Sub bgw_Completed(sender As Object, e As System.ComponentModel.RunWorkerCompletedEventArgs)
tb1.Text = Nothing
tb2.Text = Nothing
b3.Visible = False
b4.Visible = False
MessageBox.Show("Finished copying files", "Job Completed")
End Sub
End Class
Regards Les, Livingston, Scotland
Similar Messages
-
In Mac how to get the Full name of a file Programmatically?
Hi Friends,
I am doing one Mac application for displaying the contents of a file. I can able to get some information about the file by using this code below...
NSDictionary *dict=[fileManager attributesOfItemAtPath:myPath error:nil];
Now I want to get the some other informations also like Full Name, copyRight, version... So Please suggest me how to get the full name of a file Programmaticallly?Your question doesn't make sense.
First off, if you are going to get the attributes of a file, you need its full name before you can do anything. So that's part one taken care of.
This function returns a dictionary full of typical file information (type, size, mod dates, etc.) as well as some HFS data (creator code, type code) which, I strongly suspect, are not "pulled out of the file" but rather generated on the spot. (See NSFileManager for the full list of attribute keys.)
The other items you hoped of retrieving are not part of the regular file system. Sure, a Truetype font has a copyright string and a version, but what about an HTML file? A PNG? A text file you just created?
There simply are no standard functions to retrieve copyright and version. -
I loaded my ipad photos from camera and all the pictures sorted by date. I later sync my ipad with my computer and the photos were all reorganized into IMPRT folders an out of date sequence. Any idea how to put the photos back into date files other than reloading all of them from camera?
What version of iPhoto?
Select one and rotate it. Then rotate it back. Does that make it appear?
A much better work flow is the keep the photos after importing. Check the success the import, wait for at least one successful backup cycle then use you camera's format command to reformat the card
LN -
How to put the column name and variable value in the alert message.
Dear,
how can i put the column name and variable value in the alert message text. i want to display an alert which tell the user about the empty textboxes. that these textboxes must be filled.
Regards:
Muhammad Nadeem
CHIMERA PVT. LTD.
LAHORE
[email protected]Hello,
The name of the item that fires the current trigger is stored in the :SYSTEM.TRIGGER_ITEM system variable.
The value contained in this item can be retrived with the Name_In() built-in
value := Name_In( 'SYSTEM.TRIGGER_ITEM') ;
LC$Msg := 'The item ' || :SYSTEM.TRIGGER_ITEM || ' must be entered' ;
Set_Alert_Property('my_alert_box', ALERT_MESSAGE_TEXT, LC$Msg ) ;
Ok := Show_Alert( 'my_alert_box' ) ;
...Francois -
How to put the short movie clip(avi file) saved in CD to Ipod machine
I have some Japnese animation clips(10 of them).I like to transfer those clips saved with avi file in CD disk to my I pod...But it doesn't even bring files automaticlly to I tunes when I put CD in my lap tops...Is there somenone who can pls let me know how to put burnt movie clip to I pod?
Thank you in advanceGUIDES TO: Converting Video for iPod - Mac & Window
http://forums.ilounge.com/showthread.php?s=&threadid=123067
The Complete Guide to Converting Video to iPod Format (Mac)
http://www.ilounge.com/index.php/articles/comments/the-complete-guide-to-convert ing-video-to-ipod-format-mac/
See other tutorial articles over at iLounge...
http://www.ilounge.com/index.php/articles/tutorials/
Patrick -
How to put the sender name in the wf-system
Hi,
Can anybody pls tell me how to give the sender address in stead of WF-SYSTEM
When ever a mail is triggered the mail is send to the mail inbox.in the mail inbox it is showing in the sender option : WF-SYSTEM...
I want to put any name their .
can i put any name their.
please help me.....very urgent.
For any clarification pls revert back.
ThnksHi,
I've put the steps again here but this time I've put in Bold the lines that needs to be added in the different sources.
Copy the BO SOFM to ZSOFM
And add to the method Send an import parameter
SENDER like PA0105-USRID_LONG
Then change the method SEND
begin_method send changing container.
data: result_object type swc_object.
data: document_data like sodocchgi1,
document_type like sofolenti1-obj_type,
receivers like somlreci1 occurs 1 with header line,
object_para like soparai1 occurs 0 with header line,
object_parb like soparbi1 occurs 0 with header line,
object_header like solisti1 occurs 1 with header line,
object_content like solisti1 occurs 10 with header line.
data folder_id like soobjinfi1-object_id.
data new_object_id like soobjinfi1-object_id.
data document_id like sofolenti1-doc_id.
data low_len like sy-tabix.
data rcode like sonv-rcode.
<b>data : SENDER like pa0105-usrid_long.
DATA : packinglist LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE.
DATA: tab_lines TYPE sy-tabix.
DATA : sender_address like SOEXTRECI1-RECEIVER.
swc_get_element container 'SENDER' SENDER. </b>
* get receivers out of container
perform extract_receivers tables receivers
container.
if object-key = space.
* get document data out of the container
perform extract_document tables object_para
object_parb
object_header
object_content
container
using document_type
document_data.
<b>DESCRIBE TABLE object_content LINES tab_lines.
Packing List
CLEAR packinglist-transf_bin.
packinglist-head_start = 1.
packinglist-head_num = 0.
packinglist-body_start = 1.
packinglist-body_num = tab_lines.
packinglist-doc_type = 'RAW'.
APPEND packinglist.
move sender to sender_address.
* send document
call function 'SO_DOCUMENT_SEND_API1'
exporting
put_in_outbox = ''
document_data = document_data
sender_address = sender_address
sender_address_type = 'SMTP'
commit_work = ''
tables
packing_list = packinglist
receivers = receivers
contents_txt = object_content </b> exceptions
parameter_error = 23
too_many_receivers = 1
x_error = 1000
operation_no_authorization = 13
enqueue_error = 2
document_type_not_exist = 3
document_not_sent = 15.
if sy-subrc ne 0.
exit_return 1023 document_data-obj_descr space space space.
endif.
* create now SOFM object of sent document
if sy-subrc = 0.
perform insert_document_with_data using new_object_id "870566
document_data
changing folder_id
rcode.
else.
move sy-subrc to rcode.
exit_return 1900 'Document Insert' space space space. "#EC NOTEXT
endif.
* create result element with object key
if rcode = 0.
perform create_result tables container
using folder_id
new_object_id
result_object.
perform create_object using folder_id
new_object_id.
endif.
else.
move object-key to document_id.
call function 'SO_OLD_DOCUMENT_SEND_API1'
exporting
document_id = document_id
PUT_IN_OUTBOX =
IMPORTING
SENT_TO_ALL =
tables
receivers = receivers
exceptions
too_many_receiver = 1
document_not_sent = 2
document_not_exist = 14
operation_no_authorization = 13
parameter_error = 23
x_error = 6
enqueue_error = 7
others = 1000.
if sy-subrc ne 0.
exit_return 1023 document_id space space space.
endif.
endif.
end_method.
Copy the function SWW_SRV_MAIL_SEND to ZSWW_SRV_MAIL_SEND
And add as import parameter SENDER TYPE COMM_ID_LONG.
In this function it will create an object SOFM and call the method Send and link the container for this method. So now well create our copy of SOFM and add SENDER as container.
Set the object.
swc_create_object office_object 'ZSOFM' space.
swc_set_element local_container 'DocumentName' documentname.
swc_set_element local_container 'DocumentTitle' documenttitle.
swc_set_element local_container 'SENDER' SENDER.
swc_set_table local_container 'DocumentContent' documentcontent[].
swc_set_table local_container 'Receivers' t_receivers.
swc_set_element local_container 'Express' express.
IF NOT documentexpirydate IS INITIAL.
swc_set_element local_container 'DocumentExpiryDat'
documentexpirydate.
ENDIF.
Create a subtype for BO SELFITEM
Example : ZSELFWI
Create a method SendWithSender
Tab General : Check Synchronous & Result parameter
Tab Result type : Object type SOFM
Tab ABAP : SWO_INVOKE
Then youll have to copy all the parameter from the original function
SendTaskDescription and add a new one
SENDER(import like PA0105-USRID_LONG)
Then copy the method SendTaskDescription to the code of SendWithSender
Now youll have to do some modifications to call the copy of the function
SWW_SRV_MAIL_SEND and then delegate ZSELFWI  SELFITEM
And now in your task call the method SendWithSender of Selfitem and bind an address to Sender.
BEGIN_METHOD SENDWITHSENDER CHANGING CONTAINER.
<b>DATA: WORKITEMID LIKE SWWWIHEAD-WI_ID. </b>
DATA: receivers TYPE swc_object OCCURS 0.
DATA: BEGIN OF address_objects OCCURS 3,
a_object TYPE swc_object,
END OF address_objects.
DATA: return TYPE STANDARD TABLE OF swotreturn WITH HEADER LINE.
DATA: text_lines TYPE STANDARD TABLE OF tline WITH HEADER LINE.
DATA: document_content TYPE so_txttab.
DATA: ls_document_content TYPE LINE OF so_txttab.
DATA: workitem_task LIKE swwwihead-wi_rh_task,
workitem_language LIKE swwwihead-wi_lang,
workitem_short_text LIKE swwwihead-wi_text,
express LIKE sos04-l_***,
send_type LIKE sos04-l_art,
send_language LIKE sy-langu,
rc LIKE syst-subrc.
<b>DATA: SENDER like PA0105-USRID_LONG. </b>
DATA: BEGIN OF address_strings OCCURS 3,
a_string LIKE soxna-fullname,
END OF address_strings.
DATA: attachments TYPE swc_object OCCURS 0 WITH HEADER LINE.
DATA: line_width LIKE thead-tdlinesize.
DATA: wi_handle TYPE REF TO if_swf_run_wim_internal.
DATA: wi_container TYPE REF TO if_swf_cnt_container.
DATA: lv_excp TYPE REF TO cx_swf_run_wim.
DATA: l_subrc TYPE sysubrc.
DATA: l_expiry_date TYPE sydatum.
DATA: l_settings TYPE swp_admin.
~~ begin of trace specific coding ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PERFORM trc_init <b>in program SWWSI</b> .
~~ end of trace specific coding ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
swc_container addr_crea_container.
Get the input parameters.
swc_get_table container 'AddressStrings' address_strings.
swc_get_element container 'TypeId' send_type.
swc_get_table container 'Receivers' receivers.
swc_get_element container 'Express' express.
swc_get_element container 'Language' send_language.
swc_get_table container 'Attachments' attachments.
swc_get_element container 'LineWidth' line_width.
<b>SWC_GET_ELEMENT CONTAINER 'SENDER' SENDER.
SWC_GET_PROPERTY SELF 'WorkitemId' WORKITEMID. </b> ~~ begin of trace specific coding ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PERFORM trc_after_import_params <b>in program SWWSI</b>
TABLES container
address_strings
receivers
attachments
USING send_type
express
send_language
line_width.
~~ end of trace specific coding ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get some attributes of the object.
TRY.
CALL METHOD cl_swf_run_wim_factory=>find_by_wiid
EXPORTING
im_wiid = <b>WorkitemId</b>
RECEIVING
re_instance = wi_handle.
workitem_task = wi_handle->m_sww_wihead-wi_rh_task.
IF send_language IS INITIAL.
send_language = wi_handle->m_sww_wihead-wi_lang.
ENDIF.
wi_container = wi_handle->get_wi_container( ).
Perform variable substitution for task description.
CLEAR text_lines[].
IF line_width IS INITIAL.
line_width = 75.
line_width = 132.
ENDIF.
CALL FUNCTION 'SWU_GET_TASK_TEXTLINES'
EXPORTING
task = workitem_task
usage = 'W'
linewidth = line_width
language = send_language
container_handle = wi_container
TABLES
ascii_text_lines = text_lines
EXCEPTIONS
wrong_usage = 01
text_not_found = 02
text_system_error = 03.
IF sy-subrc NE 0.
exit_return 1004 space space space space.
ENDIF.
get work item text
CALL METHOD wi_handle->get_witext
EXPORTING
im_language = send_language
RECEIVING
re_witext = workitem_short_text.
~~ begin of trace specific coding ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PERFORM trc_after_text_generation <b>in program SWWSI</b>
TABLES
text_lines
USING
wi_handle->m_sww_wihead
workitem_short_text
send_language
line_width.
~~ end of trace specific coding ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fill the document content.
LOOP AT text_lines.
ls_document_content-line = text_lines-tdline. "note 510198
APPEND ls_document_content TO document_content.
ENDLOOP.
* note 881594 - determine default expiry date for office documents
CALL FUNCTION 'SWP_ADMIN_DATA_READ'
IMPORTING
wf_settings = l_settings.
IF NOT l_settings-doc_expiry IS INITIAL.
l_expiry_date = sy-datum + l_settings-doc_expiry.
ENDIF.
*- There problems with the implementation of persistence service
*- of objects. The symptom of this problems is that sendorders
*- (SCOT) are not saved if an object pool exists. Therefore we
*- create a new session in this environments.
DATA: t_receivers_por TYPE tswotobjid.
DATA: t_attachments_por TYPE tswotobjid.
DATA: receiver_object TYPE swc_object.
DATA: attachment_object TYPE swc_object.
DATA: por TYPE swotobjid.
DATA: result_por TYPE swotobjid.
DATA: rfcdest TYPE rfcdest.
DATA: documentname TYPE sodocchgi1-obj_name.
DATA: documenttitle TYPE sodocchgi1-obj_descr.
DATA: t_address_strings type swfstrtab.
LOOP AT receivers INTO receiver_object.
swc_object_to_persistent receiver_object por.
IF sy-subrc EQ 0.
swc_free_object receiver_object.
APPEND por TO t_receivers_por.
ENDIF.
ENDLOOP.
LOOP AT attachments INTO attachment_object.
swc_object_to_persistent attachment_object por.
IF sy-subrc EQ 0.
swc_free_object attachment_object.
APPEND por TO t_attachments_por.
ENDIF.
ENDLOOP.
LOOP AT address_strings.
append address_strings to t_address_strings.
endloop.
rfcdest = space.
IF cl_object_pool=>instance_exists( ) EQ 'X'.
rfcdest = 'NONE'.
ENDIF.
documentname = 'Notiz'(001).
documenttitle = workitem_short_text.
CALL FUNCTION <b>'ZSWW_SRV_MAIL_SEND' </b>
DESTINATION rfcdest
EXPORTING
send_type = send_type
send_language = send_language
documentname = documentname
documenttitle = documenttitle
documentcontent = document_content
receivers = t_receivers_por
express = express
documentexpirydate = l_expiry_date
attachments = t_attachments_por
address_strings = t_address_strings
<b>SENDER = SENDER </b>
IMPORTING
result_por = result_por
EXCEPTIONS
document_not_send = 1
not_specified = 2
error_during_send = 3
error_during_attachment = 4
OTHERS = 2.
l_subrc = sy-subrc.
*~~ begin of trace specific coding ~~~~~~~~~~~~~~~~~~~~~
PERFORM trc_after_send <b>in program SWWSI</b> USING l_subrc.
*~~ end of trace specific coding ~~~~~~~~~~~~~~~~~~~~~~~
Check the result of the method call.
CASE l_subrc.
WHEN 0.
Set the return element (the SOFM object).
swc_set_element container result result_por.
commit work.
WHEN 1.
exit_return 1001 sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WHEN 2.
exit_return 1002 sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WHEN 4.
exit_return 1005 sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WHEN OTHERS.
exit_return 1003 space space space space.
ENDCASE.
CATCH cx_swf_run_wim INTO lv_excp .
exit_return 1006 <b>workitemid</b> space space space.
ENDTRY.
END_METHOD. -
How to know the class name in .ser file?
Hi,
I have a .ser file, could any expert help me to find out all the classes in the .ser file? Thanks!If you have written them as Object, then you can just read them one by one with an ObjectInputStream and when you have the object, you can print out the class name:
Object o = in.readObject();
if (o != null)
System.out.println(o.getClass().getName());
else
System.out.println(null); -
I did not know how to get the profile name in photoshop file using javascript? Kindly help me.
var myDocProfile = app.activeDocument.colorProfileName;
-
Need help for how to putting arabic content in java properties file
Hi all,
we have to support arabic in Java application.
For that we are using java propeties file where key and value pair is used.
In the Microsoft excel sheet arabic content is coming properly from right to left direction.
When same thing is copied and paste in java properties file contents direction is reversed that is it is coming from left to right as in english.
Please help how to put the arabic contents in propeties file
Regards
VidyaSo in terms discussion.
First I would suggest that you get a hex editor and validate exactly what is in the properties file. It appears to me that you are using one or more editors that are adjusting the display for you and thus that makes it hard to determine where the problem is. A hex editor should not adjust the display. Although even then you might want to right a simple java app and have it read bytes and print them just to validate that the hex editor isn't doing something.
Only after you are exactly sure how the bytes appear in the file then proceed with other steps.
For the java GUI only test the following.
1. Properties file has it left to right then the java GUI displays it correctly right to left or not?
2. Properties file has it right to left then the java GUI displays it correctly right to left or not?
Myself I would expect that 2 should be the correct way to implement this. However that is dependent upon you correctly invoking the api as well. So if 2 is not working then you might want to look at the api. It might also have something to do with GUI display properties (of which I know even less.) -
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 -
How can i get the column names in CSV file.
Hi,
After execution of infospoke i can not see the column names in that file.How can i get column of respective infoprovider?
Thanks,
Gananadha LenkaHello Gana,
Actually while exporting the data using Info Spoke, we have the possibility to modify the data that we send. This is possible using transformations.
In your Info Spoke, you have a tab called Transformations.
Here you need to create an implementation and then use BADi to populate data.
Check if you can write a start routine sort of thing here and insert a new record into the internal table by hardcoding with your field headings.
Let me know if you dont know how to create transformations.
Kris... -
How to get the owner name for the file in ftp using abap ?
Hi folks ,
How to get the owner name for the file in ftp using abap ? please help me very ugernt . I tried with all standard FTP commands
but doest work out me . Helping in this regard highly appreciated ...
Thanks and regards,
Swarupa VanarchiHi
dont you have used the os user while calling the FTP_CONNECT FM?
Hope you are not talking about the user executing the FTP program.
Else If you are talking about the FTP file creator then its not related to abap as you can handle it by maintaining the user in file name itself.
May be i am going too far with if and elses here as your question possesses no clarity.
Plz elaborate your requirement before anybody can help.
Regards
sateesh -
How to find the dsn name from an *.rpd file provided?
How to find the dsn name from an *.rpd file provided? All the ODBC details which would require to run your dashboard.
Hi
DSN name is not a part of .rpd file. So There is no information about DSN name in .rpd file.
Thanks
Siddhartha P -
How to pass the table name dynamically in xml parsing
Hi All,
I have created one procedure for parsing xml file which is working perfectly.
FORALL i IN t_tab.first .. t_tab.last
INSERT INTO Test_AP VALUES t_tab(i);Now I want to put the table name dynamically+. For that I have added one query and modify above code as follow:-
I have already declare dml_str varchar2(800) in declaration part.
Query is as follows:-
select table_name into tab_name from VERSION_DETAILS where SUBVERSION_NO=abc; -- here abc is variable name which contains values.
FORALL i IN t_tab.first .. t_tab.last
dml_str := 'INSERT INTO ' || tab_name || ' values :vals';
EXECUTE IMMEDIATE dml_str USING t_tab(i);But it's not working. How I will resolve this or through which way I achieved the intended results. Anyone can guide me on this matter.
Thanks in advance for your help...Hi,
But it's not working.Don't you think it would help to give the error message?
Put the assignment before FORALL.
FORALL only accepts one subsequent DML statement (static or dynamic SQL) :
dml_str := 'INSERT INTO ' || tab_name || ' values :vals';
FORALL i IN t_tab.first .. t_tab.last
EXECUTE IMMEDIATE dml_str USING t_tab(i); -
How to apply input file name to output file in file adapter
Hi Friends
In my file to file scenario,i want to use input file name to output file by using adapter specific attributes,for this i have java code.Please suggest me how can i use this java code in mesg mapping and to which field i need to mapping this.
Thanks
pullaraoHi Pullarao,
I have two questions ...
1. Are u want the static file name in the target file?
if yes...then follow the Bhavesh instruction.
2.If u want a dynamic file name in the target file using UDF....then your UDF should mapped to the <b>root element</b> of target structure.
/**********UDF********/
Imports: com.sap.aii.mapping.api.*;
Parameter: String filename
String filename;
filename = fileName + ".DAT";
DynamicConfiguration conf = (DynamicConfiguration) container
.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/File", "FileName");
conf.put(key, filename);
return filename;
/*******END UDF*******/
Maybe you are looking for
-
LSMW Sales Order creation using Bapi method
Hi folks , iam doing Lsmw bapimethod ,sales order creation .In the step start idoc processing iam getting error "Has Not been Accepted for Processing ",why iam not getting plz let me know points will be awarded for all answers .
-
I get an activeX controls message at the top of the window and a message asking if I want to allow nonsecure items but whenever i click yes I get routet back to the main page and it starts all over again. im stuck in a loop. Can I do something in my
-
I'm testing some code that runs in Oracle 10 g enterprise edition. Put it on Oracle 10g express and code comes up with error. Begin tran Delete from employee where employeeID = 1000 Rollback tran orq-06550 line2, column4: PLS-00103; Encountered the "
-
Sound isn't working on my MBP and there is no red light
Ok, so today my sound suddenly stopped working and i have no idea why. I looked for a red light in the headphone hole and i see nothing. I tried turning the sound up (not all the way) and nothing happened. I also tried doing it in settings...nada. Wh
-
'No service' and wifi problems...
I have an iPhone 5 and when I am in certain places I find it difficult to gain signal from my carrier anywhere, especially in my house or even my street. I'm with EE and whenever I do get signal it's either one bar (or dot in the case of this iPhone)