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: 

Parameters for BAPI_CASE_CREATE

Former Member
0 Kudos

Hi all,

I need to call BAPI_CASE_CREATE to create a new case in Case Management. I have been able to create a simple case, but I need to create a case that has a Business Partner as part of the case record.

I'm guessing I must do this with the four ELEMENT_* table parameters, but there's very little documentation.

Has anyone done the same before? If so, help would be greatly appreciated.

Thanks and regards

Walter

5 REPLIES 5

Former Member
0 Kudos

Very interesting.

It sounds like there might be some customising entries maintained to be able to get the right element number to pass into these tables. On some research, I was able to get to this help.sap.com document:

http://help.sap.com/saphelp_nw04/helpdata/en/bd/3a853df3e60968e10000000a114084/frameset.htm

Which tells you about 'service providers', which, in turn, control 'elements'. Maybe the documentation could help?

Also, the SPRO link specified in the BAPI documentation should give some clues abt maintaining profile IDs and the like.

Do post back on the forum if you find a solution to this problem - it sounds quite interesting.

Good luck!

Sudha

Former Member
0 Kudos

I'm trying to use this function to create cases too. The basic fields can be populated through the CASE_ATTRIBUTES structure. The best way to see how this is used is to create a case yourself in transaction SCASE, look in table SCMG_T_CASE_ATTR for the GUID and plug this into function BAPI_CASE_GETATTRIBUTES. This will return all the fields you have populated in the header section of SCASE; NAME = name of the field; VALUE = its value.

I need to be able to link cases to service tickets and interaction records in SAP CRM. I can do this OK through SCASE but I can't work out how to do it using BAPI_CASE_CREATE. The terminology in the limited documentation available is esoteric at best. Maybe it's not possible! Can anyone help?

Many thanks,

Peter

0 Kudos

Hi Peter,

BAPI_CASE_GETATTRIBUTES returns field names how get their labels.

IF name is 'CASE_TITLE' i would like to have its label 'Heading'.

Thanking you in advance.

Former Member
0 Kudos

Hi Walter,

I had to raise an OSS note with SAP to find this one out! You're right, it does involve the 4 ELEMENT_* table parameters:

<b>ELEMENT_IDENTIFICATION</b>

ELEM_NO = an incremental counter starting from 1. Every BP should have a different ELEM_NO.

NAME and VALUE take the names and values of object-specific fields. To link to a business partner, use the following:

NAME/VALUE

%SPS_ID% CRM_BUSINESS_PARTNER

BOR_OBJECT_TYPE BUS1006

BOR_OBJECT_ID [the number of the BP in table BUT000)

<b>ELEMENT_INSERTION</b>

ELEM_NO = the same number for the BP as in ELEMENT_IDENTIFICATION

ANCHOR = C1 (this is the same for all linked BPs)]

DESCRIPTION [Optional field]

MODEL_ID [You don't need to use this as we are using ANCHOR]

<b>ELEMENT_ATTRIBUTES</b>

ELEM_NO = the same number for the BP as in ELEMENT_IDENTIFICATION

NAME and VALUE can be used to be more specific about the type of link e.g. the following values will specify a partner function and check the main partner flag:

NAME/VALUE

CRM_PARTNER_FCT [a valid partner function e.g. 00000001]

CRM_MAIN_PARTNER 'X'

You don't need to use the parameter ELEMENT_RELATIONS.

PS You can link many other business objects to cases. You can find the value for %SPS_ID% by browsing the SAP Registry for the appropriate Service Provider ID. The values on the SP POID Parameter tab for each Service Provider ID can be used on the ELEMENT_IDENTIFICATION parameter.

Order-type objects need to be linked using the GUID and the appropriate anchor value e.g. CS for a service ticket and CB for an internaction record ...

The function BAPI_CASE_ADDELEMENTS works in the same way.

Hope this makes sense - sorry I've forgotten the transaction code for the registry!

Peter

madhav_man
Newcomer
0 Kudos

Hello, need help on this topic... can pls share more info esp. the %SPS% and other trciky parameters..