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

Configuartion data is not populated using BAPI_SALESORDER_CREATEFROMDAT2

sangeetha_sk
Participant
0 Likes
607

Hi All,

I am using BAPI_SALESORDER_CREATEFROMDAT2 to create the sales order and to add the characteristics for my material in the configuration.

my code for configuration to BaPI

w_order_cfgs_ref-posex = '000010'.

w_order_cfgs_ref-config_id = '1'.

w_order_cfgs_ref-root_id = '00000001'.

w_order_cfgs_ref-complete = 'T'.

w_order_cfgs_ref-consistent = 'T'.

w_order_cfgs_ref-sce = '1'.

w_order_cfgs_ref-kbname = w_sdsales_sap-matnr.

w_order_cfgs_ref-kbversion = '1'.

append w_order_cfgs_ref to i_order_cfgs_ref.

  • INSTANCE

w_order_cfgs_inst-config_id = '1'.

w_order_cfgs_inst-inst_id = '00000001' .

w_order_cfgs_inst-obj_type = 'MARA'.

w_order_cfgs_inst-class_type = '300'.

w_order_cfgs_inst-complete = 'T'.

w_order_cfgs_inst-consistent = 'T'.

  • w_order_cfgs_inst-OBJ_TYPE = .

w_order_cfgs_inst-obj_key = w_sdsales_sap-matnr.

append w_order_cfgs_inst to i_order_cfgs_inst.

w_order_cfgs_part_of-config_id = '1'.

w_order_cfgs_part_of-inst_id = '00000001' ..

w_order_cfgs_part_of-obj_type = 'MARA'.

w_order_cfgs_part_of-class_type = '300' .

w_order_cfgs_part_of-obj_key = w_sdsales_sap-matnr .

append w_order_cfgs_part_of to i_order_cfgs_part_of.

*characteristics value

w_order_cfgs_value-config_id = '2'.

w_order_cfgs_value-inst_id = '00000001'.

w_order_cfgs_value-charc = 'VC_MODEL'(025).

w_order_cfgs_value-value = w_sdsales_sap-model.

w_order_cfgs_value-valcode = '1'.

append w_order_cfgs_value to i_order_cfgs_value.

It is creating sales order but configuration data is not getting populated in the sales order item.

Please advise me

Thanks in adv

sangeetha

1 ACCEPTED SOLUTION
Read only

former_member203501
Active Contributor
567

hi see this

SAP Note number 774346

Hi All,

I am using BAPI_SALESORDER_CREATEFROMDAT2 to create the sales order and to add the characteristics for my material in the configuration.

my code for configuration to BaPI

w_order_cfgs_ref-posex = '000010'.

w_order_cfgs_ref-config_id = '1'.

w_order_cfgs_ref-root_id = '00000001'.

w_order_cfgs_ref-complete = 'T'.

w_order_cfgs_ref-consistent = 'T'.

w_order_cfgs_ref-sce = '1'.

w_order_cfgs_ref-kbname = w_sdsales_sap-matnr.

w_order_cfgs_ref-kbversion = '1'.

append w_order_cfgs_ref to i_order_cfgs_ref.

  • INSTANCE

w_order_cfgs_inst-config_id = '1'.

w_order_cfgs_inst-inst_id = '00000001' .

w_order_cfgs_inst-obj_type = 'MARA'.

w_order_cfgs_inst-class_type = '300'.

w_order_cfgs_inst-complete = 'T'.

w_order_cfgs_inst-consistent = 'T'.

  • w_order_cfgs_inst-OBJ_TYPE = .

w_order_cfgs_inst-obj_key = w_sdsales_sap-matnr.

append w_order_cfgs_inst to i_order_cfgs_inst.

w_order_cfgs_part_of-config_id = '1'.

w_order_cfgs_part_of-inst_id = '00000001' ..

w_order_cfgs_part_of-obj_type = 'MARA'.

w_order_cfgs_part_of-class_type = '300' .

w_order_cfgs_part_of-obj_key = w_sdsales_sap-matnr .

append w_order_cfgs_part_of to i_order_cfgs_part_of.

*characteristics value

w_order_cfgs_value-config_id = '2'.

w_order_cfgs_value-inst_id = '00000001'.

w_order_cfgs_value-charc = 'VC_MODEL'(025).

w_order_cfgs_value-value = w_sdsales_sap-model.

w_order_cfgs_value-valcode = '1'.

append w_order_cfgs_value to i_order_cfgs_value.

It is creating sales order but configuration data is not getting populated in the sales order item.

Please advise me

Thanks in adv

sangeetha

2 REPLIES 2
Read only

former_member203501
Active Contributor
568

hi see this

SAP Note number 774346

Read only

0 Likes
567

Thanks a lot for your reply.....