cancel
Showing results for 
Search instead for 
Did you mean: 

How to link ui element to 2 bapis (wd4Abap)

Former Member
0 Kudos

Hi All,

I need to display user data on the screen using BAPI_USER_GET_DETAIL

After the user make some changes I would like to update ECC6 using BAPI_USER_CHANGE.

I've linked the ui elements with the first bapi but i don't know how to link them to the second one ,

Any help would be greatly appriciated.

Thanks

Ziv.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

I assume you would be displaying BAPI_USER_GET_DETAIL data with help of UI element.

You should not bind the UI to BAPI_USER_CHANGE model. Just copy the fields which you would like to change to input parameter structure of the BAPI_USER_CHANGE. And when user clicks on Save button execute the BAPI_USER_Change with input parameter structure.

Thanks & Regards,

Shrikant Kamble

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

While setting the elements to the BAPI, we need to do some dynamic programming for binding,

find a bit of code for binding

Model model = new Model();

Request_Node obj = new Request_Node(model);

Node addobj = new Node(model);

int i = wdContext.currentNodeElement().getValueAttribute();

int j = wdContext.currentNodeElement().getValueAttribute();

addobj.setValueAttribute(i);

addobj.setValueAttributeB(j);

obj.setNode(addobj);

wdContext.nodeRequest_Node().bind(obj);

try{

wdContext.currentRequest_NodeElement().modelObject().execute();

wdContext.nodeNodeResponse().invalidate();

}catch(CMIException e){

e.printStackTrace();

}

Thanks,

Sreeni.