on 2005 Aug 04 8:17 AM
I wrote the following user defined function in java for message mapping and mapped vendor with this. The aim of this function is to write a error file at defined path when i send empty Vendor value from File to RFC-Function module BAPI_PO_CREATE. The "err.txt" error file is not written when i execute in TEST but the value "ERROR" is returned to destination Vendor Field.
public String validation(String a, Container container) {
//write your code here
if (a.equals("")) {
try {
String source = "Vendor cannot be empty";
char buffer[] = new char[source.length()];
source.getChars(0, source.length(), buffer, 0);
for (int i = 0; i < buffer.length; i +=2)
{
f0.write(buffer<i>);
}
f0.close();
FileWriter f1 = new FileWriter("/10.10.0.55/sapmnt/trans/edixiin/err.txt");
f1.write(buffer);
f1.close();
}
catch (IOException e) {}
}
}
return "ERROR";
Hi Senthil,
Check these things :
1) Whether you have permission to create a file in that directory.
2) try giving this
10.10.0.55
sapmnt
trans
edixiin
err.txt
3) Also check for permissions.
Hope this will help you.
Regards
Suraj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
69 | |
13 | |
10 | |
9 | |
9 | |
8 | |
6 | |
6 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.