Skip to Content
0

UI API : Adding BP contact employee using user defined form

May 12, 2017 at 08:27 PM

120

avatar image

Hi,

I stumbled over an odd behaviour and was wondering if someone has an idea how to workaround :

I want to add a new business partner with a corresponding contact employee using regular UI features. So I added a form with ObjectType "2" and DBDataSources OCRD, CRD1 and OCPR. When I press "Add" everything works as expected ( BP is added with addressline ) apart the fact that no contact employee is created. I tried with a bound matrix aswell as with a from with ObjectType "11" - which doesn't seem to work at all.

So basically : does anybody know if and how it is possible to add a contact employee via UI API ?

( DI API is working, but filling dozens of fields and creating history entry doesn't feel right for such a straight forward task.. )

thanks,

maik

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

ANKIT CHAUHAN
May 15, 2017 at 01:23 PM
0

Hi Maik,

Can you please help to provide a runnable sample project code so that I can have a look and suggest you something?

Kind regards,

ANKIT CHAUHAN

SAP SME Support

Show 2 Share
10 |10000 characters needed characters left characters exceeded

poc-ocpr.txt

Hi Ankit,

attached you will find a base64 encoded zip of a proof of concept solution ( how else would you be able to upload a sample ? ).

I used the regular SBO template to show a form of ObjectType "2". I added the neede fields ( CardCode ) and bound everything to the coresponding DB fields.The form opens in add mode and after entering a CardCode all other fields are filled with sample data.

When you press add, the BP and address are added ( and DBDataSources emptied ) - but OCPR line.

You could even use a Matrix to create several lines ( CRD1 and OCPR ) - but for simplicity I left it out.

I would expect the creation of OCPR lines - maybe i am missing something here ?

thanks for your help and effort,

maik

poc-ocpr.txt (34.6 kB)
0

Hi,

Just to update:

Kindly keep looking SAP Note 2474577 which is describing the same issue.

Kind regards,

ANKIT CHAUHAN

SAP SME Support

0