cancel
Showing results for 
Search instead for 
Did you mean: 

Passing values to RFC/BAPI Table

Former Member
0 Kudos

Hi,

I am having a very strange problem. While passing the values to RFC/BAPI table using add method the values are not passed to backend SAP. Below is the code which I am using just to pass some data in RFC/BAPI table.

The same code was working few days back. Is there any configuration in JCO or any other problems other than the code?

Your l help is greatly appreciated.

public void executeZtest_Function_Input( )

{

// //@@begin executeZtest_Function_Input()

// //$$begin Service Controller(943377124)

IWDMessageManager manager = wdComponentAPI.getMessageManager();

try{

Ztest_Function_Input input = new Ztest_Function_Input();

for (int i=0; i<5;i++){

Zhr_Ear_Cclist cc =new Zhr_Ear_Cclist();

cc.setFi_User("test@sap.com");

input.addIcc_List(cc);

}

wdContext.nodeZtest_Function_Input().bind(input);

wdContext.currentZtest_Function_InputElement().modelObject().execute();

wdContext.nodeOutput().invalidate();

} catch(WDDynamicRFCExecuteException ce) {

manager.reportException(ce.getMessage(), false);

}

//$$end

//@@end

}

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Rakesh,

Remove the code after execute

wdContext.nodeOutput().invalidate();

or call it before execution

Kind Regards

Mukesh

Former Member
0 Kudos

Rakesh

Request you to paste the RFC code also on the forum just to see whether that is looking ok

Former Member
0 Kudos

Rakesh

Do try binding before filling the table. In some instances in my case I have found that after binding the table data gets passed to the backend.

Former Member
0 Kudos

I tried that also Girish. Still no luck.

Thanks,

Rakesh

Former Member
0 Kudos

Hi Raksh,

I also got the same problem. Please check the following ways then you will solve problem.

1. First check the appropriate BAPI in SAP GUI Software. You have to determine where is the problem?. Is it in Dynpro or BAPI itself?.

2. Suppose the BAPI structure change you will wont't run. If BAPI strusture change you have to reimport BAPI.

3. Please check the JCo connectio using test Button. Then redeploy your project.

4. Rebuild your project then redeploy.

Check the above ways you may get answer.

Kind Regards,

S.Saravanan

Former Member
0 Kudos

Hi Saravanan,

I have done this all. Actually I used same code for other project which is working fine. That is the reason I have jus created a test program to check will this work and update in to SAP using simple table.

Thanks for replying. Still I have to investigate where the problem is. The same program is working if I pass the values to import parameters. Even if I use structure it is working in import parameter. I feel there is no problem at SAP backend.

Thanks,

Rakesh