Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Setting work center in BAPI_ALM_NOTIF_CREATE

Former Member
0 Kudos

Hi,

I'm investigating a change in a plant maintenance portal application, and one of the things that is required is to change the default work center when creating a notification. Currently the notification is created from the portal using BAPI_ALM_NOTIF_CREATE, and it's called via RFC. The particular field in question in this bapi is PM_WKCTR, which appears to be of NUMC type, with 8 digits. This is quite different from the field displayed when creating a notification manually through the SAP gui, as that field is GEWRK, which is a character string. I am not able to set the field in the bapi using the work center IDs obtained from the M_CRAMA table, as these return an ID and a description, neither of which are 8 digits.

I'm just wondering if you have any idea if there is a conversion routine that SAP uses that converts the work center ID into an internal number, or vice versa? Or maybe you have some insight into something that happens in the background which might affect how this bapi works. Basically I need to know how the two fields correspond to each other, and what values I need to the PM_WKCTR field. Any help would be greatly appreciated.

2 REPLIES 2

Former Member
0 Kudos

Just some additional detail..I did some more investigation and I realised that what I really need is a way to get the object ID of a work center using the work center abbreviation. I need a way to retrieve this information via RFC.

Former Member
0 Kudos

What you are looking for is CRHD-OBJID, a simple select statement comparing the work center, plant and work center category should get the correct record returned.