cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to clear return structure in BAPI_ALM_ORDER_MAINTAIN

Former Member
0 Kudos

Hi,

I'm having a problem with the return structure in BAPI_ALM_ORDER_MAINTAIN where it's keeping all the records and I can't seem to clear the structure. I've tried sending in a blank return table from webdynpro, but the bapi still remembers any messages from the same session and returns them back. Does anyone know how to clear this structure so that it only returns the messages for the current call? Thanks.

Joanna

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Joanna,

When you us BAPI its normally unidirectional as far as return is concerned. You have to ge the return values from R/3. When you map the BAPI to context in the component controller the data from the BAPI is transferred to the controller context on the invalidate method of the node. If you want the controller context node to consist some other value then you can write into that node manually and the value will remain there till you invalidate the node. Remember if you want new values in Return then you need to run the BAPI again.

I hope this answers your question.

Regards,

Anand

Former Member
0 Kudos

Hi Anand,

I'm actually running the BAPI again and again, and it accumulates the return values. I am actually getting the return values from the R/3, and I've checked that the accumulates values are coming from the R/3. I've tried completely flushing the return table before I call the BAPI, but it somehow retains the values and I get the accumulated list again.

Former Member
0 Kudos

Hi

find the size of your output node second time nullify the out put node after call the onceagain.

for(int i = (wdContext.nodeTable1_WorkList().size()-1);i>0; i--){ wdContext.nodeTable1_WorkList().removeElement( wdContext.nodeTable1_WorkList().getElementAt(i));}

Thanks

Lohi.

Former Member
0 Kudos

I've actually fixed the problem. It had to do with the model object keeping the connection open, so to R/3 this was keeping the session alive and it would hold all the return messages. After I manually disconnected the model object on the webdynpro side, this cleared all the tables and only showed the current values.

wdContext.currentBapi_Alm_Order_Maintain_InputElement().modelObject().modelInstance().disconnectIfAlive();