cancel
Showing results for 
Search instead for 
Did you mean: 

PARTNER_GUID from CRMD_PARTNER question

matteo_montalto
Contributor
0 Kudos

HI all,

in my requirement I have to implement the following behaviour:

if the PLANT is changed in a service line, then all the service lines that refer to the same service position must be changed.

This is a scenario:

service pos

service line 1 plant A

service line 2 plant A

service line 3 plant A

if I change one the the service line's plant to B, then all the service lines must swap the plant to B.

The problem is that sometimes there's no plant entry for certain service line.

Here's a sketch in pseudocode of my CHANGE BADI:

if the plant is changed for a pos.

LOOP at service lines which refer to the same service pos.

IF an entry with P_GUID = service's line GUID and PARTNER_FCT = 00000075 (which is the plant) exists.

change it.

ELSE. "which means, this service line doesn't have a plant entry in t_partner

create it.

.......

Here comes the trouble. I need an information in order to create an entry for the partner table, which is the PARTNER_GUID as stored in CRMD_PARTNER. I see that field is primary key in the dictionary table and also, each position, even if they refer to the same plant, has it's own unique PARTNER_GUID.

How does the system determine it? Is there a function module? it's specific for a single position in a specific document, I should create it in the same way the system does to prevent subsequent problems.

Thanks in advance.

EDIT: I forgot to tell that this scenario should be applied to the edit process of a contract in SRM

Edited by: Matteo Montalto on Oct 9, 2009 6:32 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

matteo_montalto
Contributor
0 Kudos

Solved. PARTNER_GUID is simply obtained calling a GUID_CREATE fm.