on 08-02-2010 10:11 AM
Hi Friends
I using NWDS7.2 and call ARFC2 is zppf2001. ( not using ARFC1 )
I need to pass the the data from the input table of the webdynpro to IMPORT parameter of the RFC.
This ARFC2 Table is ITAB. ( ITAB-MATNR, ITAB-WERKS ).
I want input 2 Matnr "100-100"、"100-120" and Werks "1000" "1200"
Can any body seuggest/send me the code??
public void wdDoInit()
{
//@@begin wdDoInit()
zppf2001RFC1Model = new Zppf2001RFC1Model();
zppf2001 = new Zppf2001_Input(zppf2001RFC1Model);
wdContext.nodeZppf2001_Input().bind(zppf2001);
//@@end
}
//@@begin call_ZPPF2001()
try {
this.zppf2001.execute();
}
catch(ARFC2ModelExecuteException ex) {
msgMgr.reportException(ex.getNestedLocalizedMessage());
ogger.catching(ex);
}
//@@end
//@@begin others
Zppf2001RFC1Model zppf2001RFC1Model;
Zppf2001_Input zppf2001;
//@@end
Hi,
Try with the following code for ARFC2 model:
//This code will be generated when u apply template for service controller
FlightModel flightModelModel = createAndMapModelInstance("<model package>");
Bapi_Flight_Getlist_Input bapi_Flight_Getlist_Input_1 = wdContext.nodeBapi_Flight_Getlist_Input_1().createAndAddBapi_Flight_Getlist_Input_1Element().modelObject();
//Creating the model node to add entries
Bapisfldst destination_From_1 = new Bapisfldst(flightModelModel);
Bapisfldst destination_To_1 = new Bapisfldst(flightModelModel);
if(wdContext.nodeDestination_Fr() != null)
{
//setting the values of the input node
destination_From_1.setAirportid(wdContext.currentDestination_FrElement().getAirportid());
destination_From_1.setCity(wdContext.currentDestination_FrElement().getCity());
destination_From_1.setCountr(wdContext.currentDestination_FrElement().getCountr());
destination_From_1.setCountr_Iso("");
}
if(wdContext.nodeDestination_ToList() != null)
{
//setting the values of the input node
destination_To_1.setAirportid(wdContext.currentDestination_ToListElement().getAirportid());
destination_To_1.setCity(wdContext.currentDestination_ToListElement().getCity());
destination_To_1.setCountr(wdContext.currentDestination_ToListElement().getCountr());
destination_To_1.setCountr_Iso("");
}
bapi_Flight_Getlist_Input_1.setDestination_From(destination_From_1);
bapi_Flight_Getlist_Input_1.setDestination_To(destination_To_1);
wdContext.currentBapi_Flight_Getlist_Input_1Element().setAirline(wdContext.currentContextElement().getAirline());
wdContext.currentBapi_Flight_Getlist_Input_1Element().setMax_Rows(wdContext.currentContextElement().getMax_Rows());
wdContext.currentBapi_Flight_Getlist_Input_1Element().modelObject().execute();
Hope this helps you.
Regards,
Poojith MV
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ben,
Please refer to :
Regards,
Himanshu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.