Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Issue with Create BAPI - Please help

I need to do a Create BAPI the structure is as follows:


-Operations_create (Afvgd - BAPI table structure)

On a click of a InsertOperation button, I should be able to insert the line Items to the Operations_create node and then set them finally to the Model node. Then do the order create(Insert BAPI as a whole).

The problem is there is an already existing element (framework created). So if I do the following code in onActionInsertOperation. I am getting an extra duplicate record.

Is there a easy fix to this . I am not sure Supplyfunction will help here. If so, How?

Or Can I tweak the code here?

Thank you ... Any help is appreciated

View Controller:


IOperations_CreateElement oprEle = wdContext.createOperations_CreateElement();

oprEle .setGLAccount(wdContext.currentOperations_CreateElement().getGLAccount());

oprEle .setVendorNo(wdContext.currentOperations_CreateElement().getVendorNo());







Custom Controller:


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

Afvgd item = new Afvgd();



inputCreateOrder.addOperations(item) ;


// Executing the Model

// Invalidating ...


Former Member replied

Hi Vivek,

In your eventHandler check if your context node has a value for the first time?

Just do something like

      IWDNode yourNode = wdContext.node<your node name>;
      if(yourNode.size != 0 && yourNode.size == 1){
      //Add now, but make sure you add some elements.

Hope this helps.



0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question