Txt File Need to send to Bank
Hi,
I need to send text file to bank( in Mexico) for direct deposit to vendor accounts in Mexico ( from Mexico company code ) . Could you please let me know what are steps need to be done for F110.
Thanks
Chandu,
First of all, you have to get from your Bank the format of the txt file that they expect. This format should explain in detail all the records (rows) in the file, and each field (data) in each of those records - what is the format of each (numeric / alphanumeric), the length, whether it has decimals or not, etc. - basically the way you see tables / structures defined in txn. SE11.
Second, you have to configure the Payment Medium Workbench (PMW), which is a tool used to configure and create payment media sent by organizations to their house banks. The payment medium in your case is the txt file.
You can go through the [Online documentation here|http://help.sap.com/saphelp_erp60_sp/helpdata/en/cb/4104aadf2b11d3a550444553540000/frameset.htm]. Note that you might have to create a custom program to generate the file in the format you / your bank desire. You can use the Data Medium Exchange Engine (DMEE) to define file formats that meet the requirements as specified by your Bank. By doing so, you model an externally defined bank format in the SAP system, which then allows you to send or receive data in the form of DME files in this format.
Trust this will help you proceed in the right direction.
Regards
Gulshan
Similar Messages
-
How to skip all files other than .txt file in Mail Sender Attachemnt ?
Hi Friends ,
I am reading an Mail attachement and sending to R3 using PaloadSwapBean and MessageTransformBean .
I used to get attachement as .txt file , name like Ex10185.txt in one mail . In another mail Ex10186.txt like that.
If only thoses file comes then no problem .
<b> IF some times along with .txt file some .html files are coming by that time my Mail Adapter incorretly reading the .html file.</b>
<b> Please tell me how to skip those kind of attachements and read only .txt file</b>
Expecting your answers asap.
Best Regards.,
V.RangarajanHi Michal,
Thanks for your reply , Sorry! I am aware of how to write adapter module. Can you please tell me how to write adapter module ?
Is there any links available or Blogs ?
I am expecting your reply asap .
Best Regards.,
V.Rangarajan -
.csv file Vs .txt file Content conversion sender file channel
Hi Experts,
I have a file with filename say input.csv.I want to do content conversion for these .CSV file.Is it same like we have to do for .txt file say input.txt.
when i open my .csv file in notepad, i get multiple rows with each field separated by ';'.what are the content conversion parameters we have to define for .csv file and can we mention input.csv as the file name as a source file name.
Thanks
DeepakHi,
Use the following parameters for Sender file channel in case of reading .csv file
Recordset Structure.fieldSeparator -
Recordset Structure.endSeparator -
'nl'
Recordset Structure.fieldNames -
provide field names separated with ,
Regards
Seshagiri -
Hi frds,
I have fetched the TXT files through FTP from different location.All the file got loaded in my Local drive into single folder
And in that Folders i will have these kind of Files
ACTEST00001_20141028_0405_INV.TXT
ACTEST00001_20141029_0405_SL.TXT
ACTEST00001_20141028_0405_SV.TXT
ACTEST00001_20141029_0405_SV_APPT.
And i need to load these only ''20141029'' files only.
How can i do this in SSIS packege i need to skip rest all the files.
I have attached the Structure of my SSIS packege.
Please go through it and suggest me the solution please.
Arunraj KumarSee
this and
this.
Andy Tauber
Data Architect
The Vancouver Clinic
Website | LinkedIn
This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click
"Mark as Answer" and "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread. -
Opening .txt file - Need another set of eyes
Hi folks - The attached file opens in Notepad and MS Excel as 9999 rows x 3 columns (X,Y,Z values, respectively). I have tried different delimiters using 'Read From Spreadsheet File.vi' to bring in all the data but only successful bringing in the first column of 9999 values. Can someone take a look at this and give me the trickto get it open using LabVIEW? I expect it is something very simple but it is a Monday, isn't it?
Thanks in advance.
Don
Solved!
Go to Solution.
Attachments:
XYZ.txt 292 KBIf you've ever been burned by this before, please kudo altenbach's Idea Exchange submission...
Indicate the display format of Strings
Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.
"You are what you don't automate"
Inplaceness is synonymous with insidiousness -
Send email with txt file as attachment
Hi ,
can any one help me in download as txt file using the function module SO_OBJECT_SEND along with email .
a sample code using this function module would be helpfull.
Thanks,
vinay .Hi vinay,
Not only TXT file, u can send any
other file like word,excel,pdf,exe, etc.
1. There is some trick involved
in the binary files.
2. I have made a program (and it works fantastic)
ONLY 6 LINES FOR EMAILING
BELIEVE ME
ITS A FANTASTIC PROGRAM.
IT WILL WORK LIKE OUTLOOK EXPRESS !
3. The user is provided with
a) file name
b) email address to send mail
and it sends ANY FILE (.xls,.pdf .xyz..)
Instantaneously !
4. Make two things first :
1. Include with the name : ZAMI_INCLFOR_MAIL
2. Report with the name : ZAM_TEMP147 (any name will do)
3. Activate both and execute (2)
4. After providing filename, email adress
5. Code for Include :
10.08.2005 Amit M - Created
Include For Mail (First Req F16)
Modification Log
Data
DATA: docdata LIKE sodocchgi1,
objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE,
objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE,
objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objhex LIKE solix OCCURS 10 WITH HEADER LINE,
reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
DATA: tab_lines TYPE i,
doc_size TYPE i,
att_type LIKE soodk-objtp.
DATA: listobject LIKE abaplist OCCURS 1 WITH HEADER LINE.
FORM
FORM ml_customize USING objname objdesc.
Clear Variables
CLEAR docdata.
REFRESH objpack.
CLEAR objpack.
REFRESH objhead.
REFRESH objtxt.
CLEAR objtxt.
REFRESH objbin.
CLEAR objbin.
REFRESH objhex.
CLEAR objhex.
REFRESH reclist.
CLEAR reclist.
REFRESH listobject.
CLEAR listobject.
CLEAR tab_lines.
CLEAR doc_size.
CLEAR att_type.
Set Variables
docdata-obj_name = objname.
docdata-obj_descr = objdesc.
ENDFORM. "ml_customize
FORM
FORM ml_addrecp USING preceiver prec_type.
CLEAR reclist.
reclist-receiver = preceiver.
reclist-rec_type = prec_type.
APPEND reclist.
ENDFORM. "ml_customize
FORM
FORM ml_addtxt USING ptxt.
CLEAR objtxt.
objtxt = ptxt.
APPEND objtxt.
ENDFORM. "ml_customize
FORM
FORM ml_prepare USING bypassmemory whatatt_type whatname.
IF bypassmemory = ''.
Fetch List From Memory
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = listobject
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
MESSAGE ID '61' TYPE 'E' NUMBER '731'
WITH 'LIST_FROM_MEMORY'.
ENDIF.
CALL FUNCTION 'TABLE_COMPRESS'
IMPORTING
COMPRESSED_SIZE =
TABLES
in = listobject
out = objbin
EXCEPTIONS
OTHERS = 1
IF sy-subrc <> 0.
MESSAGE ID '61' TYPE 'E' NUMBER '731'
WITH 'TABLE_COMPRESS'.
ENDIF.
ENDIF.
Header Data
Already Done Thru FM
Main Text
Already Done Thru FM
Packing Info For Text Data
DESCRIBE TABLE objtxt LINES tab_lines.
READ TABLE objtxt INDEX tab_lines.
docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
CLEAR objpack-transf_bin.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'TXT'.
APPEND objpack.
Packing Info Attachment
att_type = whatatt_type..
DESCRIBE TABLE objbin LINES tab_lines.
READ TABLE objbin INDEX tab_lines.
objpack-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objbin ).
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = att_type.
objpack-obj_name = 'ATTACHMENT'.
objpack-obj_descr = whatname.
APPEND objpack.
Receiver List
Already done thru fm
ENDFORM. "ml_prepare
FORM
FORM ml_dosend.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = docdata
put_in_outbox = 'X'
commit_work = 'X' "used from rel. 6.10
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
TABLES
packing_list = objpack
object_header = objhead
contents_bin = objbin
contents_txt = objtxt
CONTENTS_HEX = objhex
OBJECT_PARA =
object_parb =
receivers = reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8
IF sy-subrc <> 0.
MESSAGE ID 'SO' TYPE 'S' NUMBER '023'
WITH docdata-obj_name.
ENDIF.
ENDFORM. "ml_customize
FORM
FORM ml_spooltopdf USING whatspoolid.
DATA : pdf LIKE tline OCCURS 0 WITH HEADER LINE.
Call Function
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = whatspoolid
TABLES
pdf = pdf
EXCEPTIONS
err_no_otf_spooljob = 1
OTHERS = 12.
Convert
PERFORM doconv TABLES pdf objbin.
ENDFORM. "ml_spooltopdf
FORM
FORM doconv TABLES
mypdf STRUCTURE tline
outbin STRUCTURE solisti1.
Data
DATA : pos TYPE i.
DATA : len TYPE i.
Loop And Put Data
LOOP AT mypdf.
pos = 255 - len.
IF pos > 134. "length of pdf_table
pos = 134.
ENDIF.
outbin+len = mypdf(pos).
len = len + pos.
IF len = 255. "length of out (contents_bin)
APPEND outbin.
CLEAR: outbin, len.
IF pos < 134.
outbin = mypdf+pos.
len = 134 - pos.
ENDIF.
ENDIF.
ENDLOOP.
IF len > 0.
APPEND outbin.
ENDIF.
ENDFORM. "doconv
CODE FOR PROGRAM
5.
REPORT zam_temp147 .
INCLUDE zami_inclfor_mail.
DATA
DATA : itab LIKE tline OCCURS 0 WITH HEADER LINE.
DATA : file_name TYPE string.
data : path like PCFILE-PATH.
data : extension(5) type c.
data : name(100) type c.
SELECTION SCREEN
PARAMETERS : receiver TYPE somlreci1-receiver lower case.
PARAMETERS : p_file LIKE rlgrap-filename
OBLIGATORY.
AT SELECTION SCREEN
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CLEAR p_file.
CALL FUNCTION 'F4_FILENAME'
IMPORTING
file_name = p_file.
START-OF-SELECTION
START-OF-SELECTION.
PERFORM ml_customize USING 'Tst' 'Testing'.
PERFORM ml_addrecp USING receiver 'U'.
PERFORM upl.
PERFORM doconv TABLES itab objbin.
PERFORM ml_prepare USING 'X' extension name.
PERFORM ml_dosend.
SUBMIT rsconn01
WITH mode EQ 'INT'
AND RETURN.
FORM
FORM upl.
file_name = p_file.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = file_name
filetype = 'BIN'
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.
path = file_name.
CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
EXPORTING
complete_filename = path
CHECK_DOS_FORMAT =
IMPORTING
DRIVE =
EXTENSION = extension
NAME = name
NAME_WITH_EXT =
PATH =
EXCEPTIONS
INVALID_DRIVE = 1
INVALID_EXTENSION = 2
INVALID_NAME = 3
INVALID_PATH = 4
OTHERS = 5
ENDFORM. "upl
regards,
amit m. -
How to encypt a .txt file and how to decrypt a same .txt file when i need
My requirement is i want to encrypt a .txt file and
keep it in some folder. In that file we put database connection
information. when ever we need that file we have to access it and decrypt
it. with that decrypted values we have make connection with database.
i am sending a code in which i wrote both encyption and decrytion in same file, but i want to do it separately.
Please help me regarding this.
package com.businessobjects;
import java.io.*;
import java.security.*;
import javax.crypto.*;
public class EncryptDecrypt
public static void EncodeIt()
try
// generate Cipher objects for encoding and decoding
Cipher itsocipher1 = Cipher.getInstance("DES");
Cipher itsocipher2 = Cipher.getInstance("DES");
// generate a KeyGenerator object
KeyGenerator KG = KeyGenerator.getInstance("DES");
System.out.println("Using algorithm " + KG.getAlgorithm());
// generate a DES key
Key mykey = KG.generateKey();
// initialize the Cipher objects
System.out.println("Initializing ciphers...");
itsocipher1.init(Cipher.ENCRYPT_MODE, mykey);
itsocipher2.init(Cipher.DECRYPT_MODE, mykey);
// creating the encrypting cipher stream
//System.out.println("Creating the encrypting cipher stream...");
/*FileInputStream fis = new FileInputStream("Original.txt");
FileOutputStream fos = new FileOutputStream("Encypt.txt");
CipherInputStream cis1 = new CipherInputStream(fis, itsocipher1);
// creating the decrypting cipher stream
//System.out.println("Creating the decrypting cipher stream...");
byte[] b1 = new byte[8];
int i1 = cis1.read(b1);
while (i1 != -1)
fos.write(b1, 0, i1);
i1 = cis1.read(b1);
fis.close();
fos.close();*/
// writing the decrypted data to output file
FileInputStream fis1 = new FileInputStream("Encypt.txt");
FileOutputStream fos1 = new FileOutputStream(Decypt.txt");
CipherInputStream cis2 = new CipherInputStream(fis1, itsocipher2);
byte[] b2 = new byte[8];
int i2 = cis2.read(b2);
while (i2 != -1)
fos1.write(b2, 0, i2);
i2 = cis2.read(b2);
fis1.close();
fos1.close();
//cis1.close();
cis2.close();
catch (Exception e)
System.out.println("Caught exception: " + e);
With regards
Pavankumar.here is the solution you wanted it
uses password based encryption
but your requirements are for very badly
designed code
This is the encryption part
it converts the inputfile original.txt
into the outputfile encrypt.txt which
contains the original encrypted
import java.io.FileInputStream;
import java.io.FileOutputStream;
import javax.crypto.Cipher;
import javax.crypto.spec.PBEKeySpec;
import javax.crypto.spec.PBEParameterSpec;
import javax.crypto.SecretKey;
import javax.crypto.SecretKeyFactory;
public class PWBEncryption {
// Salt
static byte[] salt = {
(byte)0xc7, (byte)0x73, (byte)0x21, (byte)0x8c,
(byte)0x7e, (byte)0xc8, (byte)0xee, (byte)0x99
// Iteration count
static int count = 20;
public PWBEncryption() {
// params:
// password -> the pasword used to create the key
// inputfile -> the file containing the stuff to be encrypted
// i.e. original.txt
// outputfile -> the file that will contain the encrypted stuff
// i.e. encrypt.txt
public static boolean doIt(char[] password,String inputfile,String outputfile){
try{
// Create PBE parameter set
PBEParameterSpec pbeParamSpec = new PBEParameterSpec(salt, count);
PBEKeySpec pbeKeySpec = new PBEKeySpec(password);
// create secretkey
SecretKeyFactory keyFac = SecretKeyFactory.getInstance("PBEWithMD5AndDES");
SecretKey pbeKey = keyFac.generateSecret(pbeKeySpec);
// create cipher
Cipher pbeCipher = Cipher.getInstance("PBEWithMD5AndDES");
pbeCipher.init(Cipher.ENCRYPT_MODE, pbeKey, pbeParamSpec);
// read input
FileInputStream fis = new FileInputStream(inputfile);
byte[] input = new byte[fis.available()];
fis.read(input);
// encrypt
byte[] output = pbeCipher.doFinal(input);
// write encrypted output
FileOutputStream fos = new FileOutputStream(outputfile);
fos.write(output);
return true;
catch(Exception e){
System.out.println(e.toString());
return false;
}This is the decrypt part
import java.io.FileInputStream;
import java.io.FileOutputStream;
import javax.crypto.Cipher;
import javax.crypto.spec.PBEKeySpec;
import javax.crypto.spec.PBEParameterSpec;
import javax.crypto.SecretKey;
import javax.crypto.SecretKeyFactory;
public class PWBDecryption {
// Salt
static byte[] salt = {
(byte)0xc7, (byte)0x73, (byte)0x21, (byte)0x8c,
(byte)0x7e, (byte)0xc8, (byte)0xee, (byte)0x99
// Iteration count
static int count = 20;
public PWBDecryption() {
// params:
// password -> the pasword used to create the key
// inputfile -> the file containing the decrypted data
// i.e. encrypt.txt
// outputfile -> the file that will contain the decrypted data
// i.e. decrypt.txt
public static boolean doIt(char[] password,String inputfile,String outputfile){
try{
// Create PBE parameter set
PBEParameterSpec pbeParamSpec = new PBEParameterSpec(salt, count);
PBEKeySpec pbeKeySpec = new PBEKeySpec(password);
// create secretkey
SecretKeyFactory keyFac = SecretKeyFactory.getInstance("PBEWithMD5AndDES");
SecretKey pbeKey = keyFac.generateSecret(pbeKeySpec);
// create cipher
Cipher pbeCipher = Cipher.getInstance("PBEWithMD5AndDES");
pbeCipher.init(Cipher.DECRYPT_MODE, pbeKey, pbeParamSpec);
// read input
FileInputStream fis = new FileInputStream(inputfile);
byte[] input = new byte[fis.available()];
fis.read(input);
// encrypt
byte[] output = pbeCipher.doFinal(input);
// write encrypted output
FileOutputStream fos = new FileOutputStream(outputfile);
fos.write(output);
return true;
catch(Exception e){
return false;
}runner
public class RunRun {
public RunRun() {
public static void main(String args[]){
char password[] = {'q','w','e','r','t','y'};
boolean enc = PWBEncryption.doIt(password,"C:\\original.txt","c:\\encrypt.txt");
System.out.println("Encryption status == "+enc);
boolean dec = PWBDecryption.doIt(password,"c:\\encrypt.txt","c:\\decrypt.txt");
System.out.println("Decryption status == "+dec);
} -
How can i read only .txt file and skip other files in Mail Sender Adapter ?
Hi Friends ,
<b> I am working on scenario like , I have to read an mail attachement and send the data to R3.</b>
It is working fine if only the .txt file comes.
<b>Some times ,html files also coming along with that .txt files. That time my Mail adapter fails to read the .txt file.</b>
I am using PayLoadSwap Bean and MessageTransformBean to swap and send the attachment as payload .
<b>Michal as told to write the Adapter module to skip the files .But i am not ware of the adapter moduel . If any blogs is there for this kind of scenarios please give me the link.</b>
Otherwise , please tell me how to write adapter module for Mail Sender Adapter?
How to download the following
newest patch of XI ADAPTER FRAMEWORK CORE 3.0
from SAP Service Marketplace. Open the file with WinZip and extract the following
SDAs:
aii_af_lib.sda, aii_af_svc.sda
aii_af_cpa_svc.sda
I have searche in servive market place .But i couldn't find that . Can you please provide me the link to download the above .
If any other suggestions other than this please let me know.
Regards.,
V.Rangarajan=P
Dude, netiquette. Messages like "i need this now! Do it!" are really offensive and no one here is being payed to answer anyone's questions. We're here because we like to contribute to the community.
Anyway, in your case, just perform some search on how you could filter the files that are attached to the message. The sample module is just an example, you'll have to implement your own. Tips would be to query the filename of the attachments (or maybe content type) and for the ones which are not text, remove them.
Regards,
Henrique. -
Need to send the zip file to mail as an attachment
i want to pick the zip file which consists some 2,3 files inside it. and send as it is to mail as an attachment.what i did is
i have taken one zip file,,, "testing.zip" inside it i have "test1.txt" & "test2.csv"
i created sender CC ,,in that i used module payloadzipbean and unzipped and called the file adapter.. created reciever CC as mail ..used same payload module now here i zipped all the payloads.
Result..i see the attachment coming as "test1.txt.zip" ..here i can see inside this zipfile my original file names as "test1.txt"&"test2.csv" as i enabled ASMA in both CC.
issues:i am unable to get the original file name like "testing.zip" ,,
can anyone help me in this.
Regards,
LoordhHi all,
as i posted last time my requirement ,i am going with java mapping for my scenario. i am using this code .
http://wiki.sdn.sap.com/wiki/display/XI/Dynamicfilenameforpass-through+scenario
this is working perfect for zip file (file to file) scenario. but my scenario is file to mail ..as i need to send this to mail package there it is throwing error.i am getting "zip file name as attachment properly but when i try to open it is giving error in zip file." this is what i modied code ..i am able to see my messge in sender CC and reciever CC..any java experts please help on this.
try {
// create XML structure of mail package
String output = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
+ "<ns:Mail xmlns:ns=\"http://sap.com/xi/XI/Mail/30\">"
+ "<Subject>" + mailSubject + "</Subject>"
+ "<From>" + mailSender + "</From>"
+ "<To>" + mailReceiver + "</To>"
+ "<Content_Type>multipart/mixed; boundary=\"" + boundary + "\"</Content_Type>"
+ "<Content>";
out.write(output.getBytes());
// create the declaration of the MIME parts
//First part
output = "--" + boundary + CRLF
+ "Content-Type: text/plain; charset=UTF-8" + CRLF
//+ "Content-Transfer-Encoding: 8bit" + CRLF
+ "Content-Disposition: inline" + CRLF + CRLF
+ mailContent + CRLF
//Second part
+ "--" + boundary + CRLF
+ "Content-Type: Application/zip; name=" + attachmentName + CRLF
//+ "Content-Transfer-Encoding: base64" + CRLF
+ "Content-Disposition: attachment; filename=" + attachmentName + CRLF + CRLF;
out.write(output.getBytes());
//Source is taken as attachment
copySource(in, out);
out.write("</Content></ns:Mail>".getBytes());
} catch (IOException e) {
throw new StreamTransformationException(e.getMessage());
protected static void copySource(InputStream in, OutputStream out)
throws IOException {
byte[] bbuf = new bytehttp://in.available();
int bblen = in.read(bbuf);
if (!(bblen < 0)) {
//String sbuf = new String(bbuf);
//String encoded = Base64.encode(sbuf);
// replace all control characters with escape sequences
//sbuf = sbuf.replaceAll("&", "&");
//sbuf = sbuf.replaceAll("\"", """);
//sbuf = sbuf.replaceAll("'", "'");
//sbuf = sbuf.replaceAll("<"<");
//sbuf = sbuf.replaceAll(">", ">");
out.write(bbuf);}} -
How to Send a .txt file through FTPTARGET connector of Integration Broker
Hi,
Is it possible to send a .txt file(infact anyfile other than xml format) to a host server using FTP Target connector of Integration Broker. If so can someone explain the steps to achieve it.
Regards,
UdayYes, you can do that. I've done exactly that couple years ago.
If I remember currently, below is a high level of how I did it.
Read the file you want to send into the buffer using GetString function like:
+/*A single string containing the entire contents of the file including line terminator.+
+ After this method completes successfully, the temp file is deleted.*/+
+&FileData = &FiletoRead.GetString();+
The function deletes the file so I had to create a temp copy of what i want to send and read that copy instead of the original file. Also, IB will have issues if you are trying to send an empty file. so i did a basic check, if the file is empty then put something in it.
rem -- IB message will fail if we are trying to send an empty file;
If None(&FileData) Or
+&FileData = "" Or+
+&FileData = " " Then+
MessageBox(0, "", 0, 0, ("File " | &sTargetFileName | " is empty."));
+&FileData = "No Data Found!";+
End-If;
Next, you need to load the file data that are now in &FileData to IB:
+&MSG = CreateMessage(@&sServiceOperation);+
+/* Generate the XML doc. */+
+&dFtp = CreateXmlDoc("");+
rem -- &bReturn = &dFtp.LoadIBContent("Some text inside of a file to send through IB!");
+&bReturn = &dFtp.LoadIBContent(&FileData);+
Then put XML into the message and publish it:
+/*put the XML in the message*/+
+&MSG.SetXmlDoc(&dFtp);+
+%IntBroker.Publish(&MSG);+
You might need to load some IBConnectorInfo and override them using your PC. I had to do that to get the password for the FTP transmission encrypted:
/* Encrypt the password */
&pscipher = CreateJavaObject("com.peoplesoft.pt.integrationgateway.common.EncryptPassword");
&encPassword = &pscipher.encryptPassword(&sPassword);
&pscipher = Null;
Good luck and hope this helps. -
CREATE BANK STATEMENT UPLOAD TXT FILE SAPBYD
Hi,
I implemented bank statement upload TXT FILE and loading the file format MT940 UK, load the file with status CONFIRMED but does not perform any bank statement in the list of BANK STATEMENT just seems like INBOUND FILES with status FINISHED but not as financial status.
Anyone have a UK model MT940, and knows that the next step has to be performed after loading INBOUND FILE
Email: [email protected]
PD: Attached my MT940 UK inbound file to review in case .
Regardsgoto to the user exit where u will find import & export parameters...Now create a project and implement this enhancement...Inside the FM u will find Zprogram which needs to be created. Now write ur code in this by importing data and check routinues and export back to variables....When u run actual transaction, this user exit automatically triggers...
-
Is there any way to send output in BlueJ to a .txt file?
I want to send the output of my BlueJ program to a .txt file. Is there any command to do it? If yes, then please tell me the syntax of that command along with an example using it?
Again, you're just misunderstanding the tools you're using. Java should do that, not BlueJ. You have to research this from the perspective of writing Java code to do it. If you search how to make BlueJ do it, you won't find it because BlueJ has nothing to do with it.
So you know your basic requirements.
- you use System.out
- you want that to go to a file in stead of to the command prompt / BlueJ console
Do you know how to work with files yet? If not, that would be something you need to learn right now. And after that, try a Google for "java System.out file" and see what you get. -
Archiving TXT files in Sender File Adapter--Unformatted Way
Hello,
I am Archiving TXT files thru Sender file adapter, files are getting archived to specified directory.No issues in that.,
When i open the archived files, those are not in the correct format way that i placed before file pickup.
Header & lines got messed up side by side.
RegardsHi,
If the file that it being archived is not transformed, it should exactly be the same as the original file.
Please make sure that you are not transforming the archive file by any means(unix script, mapping logics etc).
As suggested above, it is advisable to open the file in the editors like textpad, ultraedit etc. The difference in the alignment could be because of the notepad editor.
Try to open the original and archived files in any of those(textpad,ultraedit etc) editors and check.
Please let us know if you are still able to find the difference in the alignment.
Regards,
Subbu -
Need to copy .txt file from FTP server and downloaded on local server directory.
I need to figure out a way to copy .txt file from ftp server in local server directory using sql jobs.
Below links will help achieving it:
https://www.virtualobjectives.com.au/sqlserver/ftp_scripts.htm
http://www.mssqltips.com/sqlservertip/2884/sql-server-integration-services-ssis-ftp-task-for-data-exchange/ -
HR: Need to Send the Paysilp as a PDF file through Mail to Employees
Dear All ,
Need to Send the Paysilp as a PDF file through Mail to Employees.
can anyone please suggest any Standard Function Modules which takes the Payslip Form as input and convert it into PDF and can send it through mail to the concern employees.
Can anyone please explain the procedure in detail.
Thanks in Advance,
Regards.venu,
below is code which helps to generate pdf ,,,,hope u know how to use the mail sending function
data:
fm_name TYPE RS38L_FNAM, "Smart Forms: FM Name
sf_name TYPE TDSFNAME
value 'YOUR_FORM_NAME', "Smart Forms: Form Name
P_OUTPUT_OPTIONS TYPE SSFCOMPOP,
P_JOB_OUTPUT_INFO TYPE SSFCRESCL,
P_CONTROL_PARAMETERS TYPE SSFCTRLOP,
P_LANGUAGE TYPE SFLANGU value 'E',
P_E_DEVTYPE TYPE RSPOPTYPE.
data:
P_BIN_FILESIZE TYPE I,
P_BIN_FILE TYPE XSTRING,
P_OTF type table of ITCOO,
P_DOCS type table of DOCS,
P_LINES type table of TLINE,
name type string,
path type string,
fullpath type string,
filter type string,
guiobj type ref to cl_gui_frontend_services,
uact type i,
filename(128).
GET SMARTFORM FUNCTION MODULE NAME ---
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = sf_name
IMPORTING
FM_NAME = fm_name
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
EXPORTING
I_LANGUAGE = P_LANGUAGE
I_APPLICATION = 'SAPDEFAULT'
IMPORTING
E_DEVTYPE = P_E_DEVTYPE.
P_OUTPUT_OPTIONS-XSFCMODE = 'X'.
P_OUTPUT_OPTIONS-XSF = SPACE.
P_OUTPUT_OPTIONS-XDFCMODE = 'X'.
P_OUTPUT_OPTIONS-XDF = SPACE.
P_OUTPUT_OPTIONS-TDPRINTER = P_E_DEVTYPE.
P_CONTROL_PARAMETERS-NO_DIALOG = 'X'.
P_CONTROL_PARAMETERS-GETOTF = 'X'.
****...................................PRINTING.........................
CALL FUNCTION fm_name
EXPORTING
CONTROL_PARAMETERS = P_CONTROL_PARAMETERS
OUTPUT_OPTIONS = P_OUTPUT_OPTIONS
(....) <--- your form import parameters
IMPORTING
JOB_OUTPUT_INFO = P_JOB_OUTPUT_INFO.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
P_OTF[] = P_JOB_OUTPUT_INFO-OTFDATA.
****...................................CONVERT TO PDF...............
CALL FUNCTION 'CONVERT_OTF_2_PDF'
IMPORTING
BIN_FILESIZE = P_BIN_FILESIZE
TABLES
OTF = P_OTF
DOCTAB_ARCHIVE = P_DOCS
LINES = P_LINES
EXCEPTIONS
ERR_CONV_NOT_POSSIBLE = 1
ERR_OTF_MC_NOENDMARKER = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
now you can mail the pdf.
Reward points if helpful
Regards,
jinesh
Maybe you are looking for
-
ITunes 6.02 Not Opening "WHAT'S GOING ON APPLE"!!!
Sorry about the headline. Just like iTunes 6.01, iTunes 6.02 still doesnt open. Im getting tired of this, having to reinstall whenever I want to use it. I would have thought that Apple would have a fix by releasing iTunes 6.02, but I still see iTunes
-
HI: Can someone tell some good document about all the functions which can be used during mapping like boolean,string etc. Can a query like : IF name =bird then DO --- Else DO - be created? If so how? I want to know how to use them . Thnx
-
Regarding update data in database
Hi Abap Gurus, i have selection screen such that one list box in that 7 tables are there. one field for upload the excel file from desktop. my requirement is that when the user click on the field and after upload a Excel f
-
How to I configure Tax functionality in SAP CRM 2007?
Dear Expert, Kindly give me the idea of how to configure the Taxation functionality for India. This will be used to calculate the taxes applicable for Service Business. Kindly give me some inputs to proceed further. Awaiting your reply. Thanks, GJ
-
Why my iphone 5 auto-lock sreen doesn't work?
I have update software to 7.0.6(11B651) I got problems now is my auto-lock sreen doesn't work, Anyone please help me how to fix this problems. Thanks Fly