cancel
Showing results for 
Search instead for 
Did you mean: 

Item Linkage with header in sap crm

Former Member
0 Kudos


Hello Experts,

Can you please suggest how to link two different line item with existing header through prgoramme.

Actualy i have developed a programme to create Service confirmation(order) from crm_order_mantain for a particular BP.It is creating order and storing header and item details in their respective tables(crmd_orderadm_h and crmd_orderaadm_i) for particular BP.

But whenever I am changing any parameter for that particular BP it is again creating a new service confirmation(order) with new line item.

What i want is whenever i change any parameter  for that same BP it should create a new line item and get linked with that existing header which has been created earlier for that same BP.

Thanks!!

Regards,

Vicky

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello All,

Thanks All for replying this post.

Solution:

Whenever we want to link as many number of items to the header(order) from backend just use the reference guid of the header which is nothing but a header guid and pass to all the structures of importing parameters of the crm_order_maintain and then pass the header guid to crm_order_save. It will get reflected in the table crmd_orderadm_i.

Thanks!!

Regards,

Vicky.

Answers (1)

Answers (1)

krishnendu_laha
Active Contributor
0 Kudos

Hello Vicky,

In CRM Service area for service plan we have similar kind of configuration where sub-item is assigned with higher level item number in higher level field.

So for example:

Item                        Higher Level

Main item 1

Sub Item 1              Main Item 1

Sub Item 2              Main Item 1

You can use higher level item field with proper Main Item number for Sub Item

Hope it helps.

Thanks,

Krish

Former Member
0 Kudos

Hello,

While passing CRM_ORDER_MAINTAIN exporting parameters, you should maintain ref_guid of every table with respect to your order_guid.

In Item Table CT_ORDERADM_I, maintain HEADER value same as order GUID.

Create an order manually, from se37 crm_order_maintain and debug it, and see which one you are missing

Regards,

Raghavendra Hegde

Former Member
0 Kudos

Hi Raghavendra,

I tried as you suggested but it is not linking the line item with the existing header created earlier

can you elaborate it more ,may be i am missing something or suggest me other alternative

Thanks!!

Vicky

Former Member
0 Kudos

Hello,

Have you checked by debugging, is every field is connected as in similar to how standard is doing..??

Former Member
0 Kudos

Hi,

Yes Raghavendra,I checked in debugging .

I am able to create a order by programmatically via crm_order_maintain but issue is each time it is creating a separate order even when i am changing data of item level.

so i want whenever i change at item level it should create a item and store in same header created earlier.

Thanks!!

Vicky

Former Member
0 Kudos

If you are using crm_order_maintain to update the order with new line item, then there should be some guid or reference guid missing or mismatching which is the reason to create new order for updated item. So try to debug again with an Existing Order and update line Item. Now see and compare the parameters you are passing and system is passing while debugging.