on 09-14-2005 9:05 AM
Hello
I want to do the followig mapping
File - > IDOC
field1 ->field_idoc1
field2 ->field_idoc2
field3 ->field_idoc3
field4 -> (based on an dictionary table in the R/3)
For the first 3 fields I will use message-mapping.
For field4 I heard about ABAP Mapping. Select with the value of field4 in an ABAP Table and response the new value to the mapping back.
Would both mappings in one Interface-Mapping work?
Regards
Christoph
Hi Christoph,
usually it would be a task for BPM but indeed, u can solve that with a ABAP mapping. Inside that mapping u call a function modul at R/3 (call function 'MyFunction' destination 'MyDest'...).
In one Interface Mapping u can refer as much Mapping Programs as u like. The result of one will be used as source 4 the next.
Regards,
Udo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Christoph , You can call them in sequence within an interface mapping, but cannot call one within another.
To make a lookup, you can write an RFC(which will make the lookup and return the result), call it in the message mapping using a JCO call(inside a user-defined function in message mapping) avoiding two mapping programs
If ur in SP13 , you can call an RFC commn channel from a message mapping to help make the lookup.
Regds
Saravana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Christoph, There was an article previously available in articles section, now i dont find the link.
I have given a sample code below. You can find lot of sample JCO code provided along with the JCO library that can be downloaded from service.sap.com.
*************************************************
JCO.Repository mRepository;
JCO.Client mConnection = JCO.createClient(
sapClient,
userName,
password,
language,
hostName,
systemNumber );
// connect to SAP
mConnection.connect();
// create repository
mRepository = new JCO.Repository( "sample", mConnection );
// Create function
JCO.Function function = null;
IFunctionTemplate ft = mRepository.getFunctionTemplate("Z_TEST");
function = ft.getFunction();
// Obtain parameter list for function
JCO.ParameterList input = function.getImportParameterList();
// Pass function parameters
input.setValue( param1_value , "P_PARM1");
input.setValue( param2_value , "P_PARM2");
JCO.ParameterList tabInput = function.getTableParameterList();
JCO.Table inputTable = tabInput.getTable("T_PARM3");
inputTable.appendRow();
inputTable.setValue("test" , "IDOC");
}
mConnection.execute( function );
String ret = function.getExportParameterList().getString( "P_GEN_NUM" );
mConnection.disconnect();
return ret ;
***********************************************
Regds
Saravana
Hello Saravana ,
thanks for your help, but i guess i got lost.
I created a custumer function "rfc_test01"
public void rfc_test01(String[] a, ResultList result, Container container){
JCO.Repository mRepository;
JCO.Client mConnection = JCO.createClient(
300,
chch,
pas0111,
de,
sapm10a.aa.cust.de,
00 );
....
And added you coding into the body.
1. question:
Do I need to place "JCO.Repository mRepository;" into the field IMPORTS?
2. question:
Is this connection ok?
JCO.Client mConnection = JCO.createClient(
300,
chch,
pas0111,
de,
sapm10a.aa.cust.de,
00 );
3. question:
my function Z_CHA_TEST01 looks like:
import: im_field
export: ex_field
Regards
Christoph
Hi XI SDN Folks,
i have a doubt.
Using JCO , i will export P_GEN_NUM1.
i need to export remaining parameters also.
i need P_GEN_NUM1,P_GEN_NUM2,P_GEN_NUM3,P_GEN_NUM4,P_GEN_NUM5.
i don't like to call BAPI again and again for each field.
String ret = function.getExportParameterList().getString( "P_GEN_NUM1" );
is it possible to do this single Look up?
Please Help. Thanks in Advance
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.