Application Development and Automation 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: 
Read only

Customer Segment in BAPI_SALESORDER_CREATEFROMDAT2

Former Member
0 Likes
1,302

Hi,

I am using the bapi BAPI_SALESORDER_CREATEFROMDAT2 to create sales order. Its working fine. Now, I need to pass the "<b>customer segment</b>" value to the order. But I am unable to figure out the field that should be used for this.

I tried BAPISDHD1-CUST_GRP1 (Short Description: Customer Segment) but the order is not going through when I use this field. What is the right field to be used?

Thanks and Regards,

Reena

1 ACCEPTED SOLUTION
Read only

former_member378318
Contributor
0 Likes
993

Hi,

What do you mean by "customer segment"? Do you mean customer defined Z fields? If yes then these are passed via the EXTENSIONIN parameter. Check the BAPI documentation for this parameter as its very helpful.

9 REPLIES 9
Read only

former_member378318
Contributor
0 Likes
994

Hi,

What do you mean by "customer segment"? Do you mean customer defined Z fields? If yes then these are passed via the EXTENSIONIN parameter. Check the BAPI documentation for this parameter as its very helpful.

Read only

0 Likes
993

Hi Surbjeet,

Actually I'm not an SD person.. so not sure what these customer segments really are/mean. However I can tell you where its found on the VA01 transaction.

In VA01, at the bottom of the standard order screen, there is a button called "Item Details: Configuration". When I click on this button, I am taken to the screen "Characteristic value assignment". In this screen under "Charactersistic Description" there is a row for "Customer Segment" and the corresponding "Characteristic Value" input field. This is the field I am talking about.

Hope you got it. Is your solution applicable for this?

Thanks and Regards,

Reena

Read only

0 Likes
993

Hello Reena

Since you are dealing with configurable items have a look at the TABLES parameter <b>ORDER_CFGS_VALUE</b>.

Other parameters related with configuration are named ORDER_CFGS_...

Regards

Uwe

Read only

0 Likes
993

Hi,

Thanks for you input.

I did take a look at the the tables parameter ORDER_CFGS_VALUE. Also, as you have indicated, I realised that we not only need to pass the values to the table ORDER_CFGS_VALUE, but also to many others - ORDER_CFGS_REF, ORDER_CFGS_INST, ORDER_CFGS_PART_OF etc.

But I am not sure what values to pass to these tables. For instance, there are these fields listed below for which I have no clue what has to be passed:

Config_id

root_id

inst_id

obj_type

class_type

obj_key

etc.

Which is the field that is mapped to the value for "Customer Segment" on VA01? How are the rest of the fields related to this?

Thanks and Regards,

Reena

Read only

uwe_schieferstein
Active Contributor
0 Likes
993

Hello Reena

The order header fields CUST_GRPx and CSTCNDGRPx belong the the sales order (VA03) tabstrip "Additional Data A".

If these customer groups correspond to your "customer segments" then you have filled the correct header field (BAPISDHD1-CUST_GRP1).

If order creation still fails check the returned messages and the customizing (table TVV1 - TVV5) to verify that the customer groups do exist indeed.

Regards

Uwe

Read only

0 Likes
993

Hi Uwe,

Ok.

I tried again, picking values from TVV1 and the order went through! And yes, it was reflected in the "Additional Data A" tab.

But I am wondering if this field (in Additional Data A) is the same as the field I have mentioned to Surbjeet (above post). Because, the value in this field is not changing at all, no matter what I give in the BAPISDHD1-CUST_GRP1 field (in spite of the order being saved successfully).

Thanks and Regards,

Reena

null

Read only

Former Member
0 Likes
993

Hi Reena,

This is Dinesh,i also face problem in Sales order creation using BAPI if you can send me the code it would be great help to me.

Regards,

Dinesh

Read only

0 Likes
993

Hi Reena and Dinesh,

Were you able to solve the problem please? I have the same problem as well when trying to pass data using ORDER_CFGS_VALUE segment. Characteristics are not transfered.

Reena, in your previous post you are mentionning that other segments have to be populated as well. Is that related to characteristic posting?

Thanks a lot,

Franck

Read only

0 Likes
993

Hello,

Unfortunately, I have not been able to solve this. If someone could throw some light on how to go about this, it would be really helpful.

Thanks and Regards,

Reena