cancel
Showing results for 
Search instead for 
Did you mean: 

How to assign Sales Org Data to product via Coding/FM?

Former Member
0 Kudos

Hi Experts,

I have developed an upload program using the SAP Note- Note 810153 - Sample report for maintaining products in API/CRM 3.X,4.0.

I am able to successfully create products in CRM. Now my issue is-how to assign Sales Org Data to this newly created product via API/FM?

Thanks and Regards,

Rohit

Accepted Solutions (1)

Accepted Solutions (1)

former_member200342
Active Contributor
0 Kudos

Hi,

Use the FM:CRMXIF_PRODUCT_SERVICE_SAVE to add the sales org data to the product.

Pass the data in SALES_ORG and DISTR_CHAN fields of the structure DISTR_CHAIN in the program.

Regards,

PePe

Former Member
0 Kudos

Hi PePe,

Thanks for the response. When I am trying to use this function module, its trying to change the product type from Material to Service which is not allowed. Hence an error message is coming-Product Type can not be changed. I am not able to figure out why is it changing the product type. Can you please guide me on this?

Thanks and Regards,

Rohit

Former Member
0 Kudos

Hi PePe,

The message is not coming now. I was using the wrong FM. I should be using-CRMXIF_PRODUCT_MATERIAL_SAVE.

But this Function Module is not working. Sales Org and Distribution Channel is not assigned to the Material product by using this FM.

Is there any other FM available for this?

Thanks and Regards,

Rohit

former_member200342
Active Contributor
0 Kudos

Hi,

If you want to use for product type "material" then use the FM:CRMXIF_PRODUCT_MATERIAL_SAVE

Regards,

PePe

Former Member
0 Kudos

Hi PePe,

This FM is not working for me. I am passing 4 values- Product Guid, Product ID, Sales Org and Distribution Channel. Smooth execution, no error message. But in the end, sales org data is not updated in the product.

Am i missing something over here?

Thanks and Regards,

Rohit

Former Member
0 Kudos

Hi PePe,

One more doubt-Do I need to do some kind of commit also after calling this FM? I am just testing this standalone FM right now and product data is not being updated.

Thanks and Regards,

Rohit

former_member200342
Active Contributor
0 Kudos

HI,

Yes, you have to commit using FM:BAPI_TRANSACTION_COMMIT

Regards,

PePe

Answers (0)