on 08-03-2015 11:35 PM
Hello
i have to map Partner data vom an IDoc to a flat file structure.
i designed the following mapping for the field AG_Nr.
the next fields are street, county, postal code, ...
Is it possilbe to bild one UDF that contains
equalS
if ... then
removeContexts?
or is it possible to build a functiongroup with those functions?
or is it possible to copy this functions from one target field to another (eg. AG_street)
Kind regards,
1.Just right click from remove context > Copy
2. select other target field, paste and map.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Christian,
UDF suggestion, i used this UDF extensively and repeatedly in Partner_Q/Qualifier pattern to get desired value.
UDF1, in your example will be...
input1 = PARTNER_Q
input2 = "Const" or "Const;AnotherConst"
input3 = PARTNER_ID
UDF2, to get rid of the SUPPRESS and only the desired value, map to this UDF then output will be the one you want.
Reference:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kintali,
I am using multi queues, I am facing two error which was shown earlier, below is code:
String[] db_connect_string;
String[] db_user_id;
String[] db_password;
String[] storedproc_name;
String[] Value;
ResultList[] result;
try {
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
Connection con = DriverManager.getConnection(db_connect_string[0],db_user_id[0],db_password[0]);
String SQL = "EXECUTE dbo."+storedproc_name[0];
Statement stmt = con.createStatement();
boolean results = stmt.execute(SQL);
do {
if(results) {
ResultSet rs = stmt.getResultSet();
ResultSetMetaData rsmd = rs.getMetaData();
int numberOfColumns = rsmd.getColumnCount();
while (rs.next()) {
for (int k=1;k<=numberOfColumns;k++)
{
String Value = rs.getString(k);
result.addValue(Value);
}
}
result.addContextChange();
rs.close();
}
results = stmt.getMoreResults();
} while(results);
stmt.close();
}
catch (SQLException e)
{
}
catch (Exception e) {
}
Thanks guy's Copy and Paste scenario solved my problem
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Christian,
you can also use a single UDF to handle this scenario -
in the UDF you need to provide two inputs - the source field from IDoc and the possible value.
inside the udf you will check the value and then produce your output. at the end you can use removecontext.
Thanks
Sugata Bagchi Majumder
Hi Christian,
If your idea is to reuse the mapping in other message mappings, may be to use a mapping template, to wrap all the map, can be helpful for you: http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50171256-1ee2-2a10-3f84-ddecf098f...
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.