Skip to Content
author's profile photo Former Member
Former Member

Execute Adaptive RFC 2 Model Issue

I follow this guide: Using an Adaptive RFC 2 Model in Web Dynpro for Java(Using an Adaptive RFC 2 Model in Web Dynpro for... | SCN) to excute ARFC2



public void wdDoInit() {

//@@begin wdDoInit()

// Set the class wide reference to the component's message manager

msgMgr = wdComponentAPI.getMessageManager();

// Create a new model

flightModel = new FlightModel();

// Using the model, create an executable model object for the BAPI

bapiGetFlightList = new Bapi_Flight_Getlist_Input(flightModel);



public void call_BAPI_FLIGHT_GETLIST( ) {

//@@begin call_BAPI_FLIGHT_GETLIST()

// Call BAPI_FLIGHT_GETLIST by using the class wide reference to the

// model object. This style of coding makes the coding easier to

// understand, and bypasses the need to traverse the context to locate

// the node to which the model object is bound, and then finally call

// execute() method. It is much simpler to invoke the execute() method

// directly on the model object

try {


// In ARFC2, it is no longer necessary to call the invalidate()

// method of the context node that corresponds to the output side of

// the BAPI's interface



catch(ARFC2ModelExecuteException ex) {

// If the call to the ABAP system goes pear-shaped, then the most

// meaningful message to show the user is usually found by calling the

// exception object's getNestedLocalizedMessage() method


// Also write the exception to the system log

// Please make it a habit to add this simple line of code because it

// makes solving CSN messages *so* much easier!






public void checkBapiReturn( java.util.List returnStruct ) {

//@@begin checkBapiReturn()

// Check that we've actually got a return value here

if (!returnStruct.isEmpty()) {

Bapiret2 returnMsg;

// Process all the messages found in the return structure

for (int i = 0; i < returnStruct.size(); i++) {

returnMsg = (Bapiret2)returnStruct.get(i);

// What king of message was returned?

switch(returnMsg.getType().toCharArray()[0]) {

// Error

case 'E':



// Warning

case 'W':



// Success or Information

case 'S':

case 'I':

// msgMgr.reportSuccess(returnMsg.getMessage());


// Something else...



reportSuccess("Received message type " + returnMsg.getType() +

" with text " + returnMsg.getMessage());





msgMgr.reportWarning("Empty return structure after BAPI call");




//@@begin others

IWDMessageManager msgMgr;

FlightModel flightModel;

Bapi_Flight_Getlist_Input bapiGetFlightList;



when I execute rfc output-Flight_List is null in table UI

but When I set external breakpoint to debug in ecc I find output-Flight_List is not null

I know about it in netweaver 7.0 but 7.3 or 7.4 is different

can anybody help me to solve this issue..


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Oct 03, 2014 at 08:58 AM


    The model binding is missing.

    bapiGetFlightList = new Bapi_Flight_Getlist_Input(flightModel);


    Kind regards,


    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 03, 2014 at 03:15 PM

    use wizard to generate code for calling rfc, don't write by your own.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.