Skip to Content
avatar image
Former Member

How to link ui element to 2 bapis (wd4Abap)

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Jun 30, 2010 at 04:27 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 30, 2010 at 03:54 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded