on 01-30-2006 9:01 PM
Hi,
Need to write to a file from SAP business connector.The file is a unix script file and therefore must have LF after each line. I have my data in a string and was thinking to have a separator-character where I want my linebreaks, I would then replace with UNIX LF hex value '0A'. But how to get the hexvalue '0A' into the 'replaceString' parameter of the 'replace transformer' without doing copypaste of the value... in other words how to work with hexvalues in SAPBC?
Thanks in advance
closing this one down
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi all, have you ever used the function module DX_WRITE_FILE yet? I use it to write data from an internal table to a file, but it did not work. The error is: the Type conflict.
Do you have some experience about using this function, pls help me, i have to finish this program in a few next days.
Thanks in advance.
Thien Duong.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bowie,
I don't rememeber if replaceString has a parameter "regular expression". LF in regular expression is \n.
Another way is create a function similar like this :
// * begin
IDataCursor idcPipeline = pipeline.getCursor();
String vData[] = IDataUtil.getStringArray(idcPipeline,"Data"); //Where Data means input parameter
if(vData == null) {
idcPipeline.insertAfter("message","Data is empty");
return;
} // It is not necessary
String sBuf = vData[0]; // alert, could have more than one vData (0,1,2,3...), it depends on the pipeline
String sBufSai = sBuf.replaceAll(";","\n"); // Where ";" means lines separater and "\n" LF
idcPipeline.insertAfter("Data",vBufSai); // Return in the same pipeline
idcPipeline.destroy()
//End
[]s
Renato.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.