cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_SALESORDER_CREATEFROMDAT2 with configurable material

Former Member
0 Kudos

Hello everybody.

I have been looking for information and I can't find how to do it. I can create the sales order, but without any configuration value.

Please, Can anyone tell me who I have to call BAPI_SALESORDER_CREATEFROMDAT2 with configurable material?

lv_configid = ld_itm_number1."item position

lv_inst_id = lv_inst_id + 1.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = lv_inst_id

IMPORTING

output = lv_inst_id.

lv_root_id = lv_root_id + 1.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = lv_root_id

IMPORTING

output = lv_root_id.

li_order_cfgs_ref-posex = ld_itm_number1.

li_order_cfgs_ref-config_id = lv_configid.

li_order_cfgs_ref-root_id = lv_root_id.

APPEND li_order_cfgs_ref.

li_order_cfgs_part_of-config_id = lv_configid.

li_order_cfgs_part_of-parent_id = lv_inst_id.

li_order_cfgs_part_of-inst_id = lv_inst_id.

li_order_cfgs_part_of-obj_type = 'MARA'.

li_order_cfgs_part_of-class_type = '300'.

li_order_cfgs_part_of-obj_key = it_pedidos_pos-matnr.

APPEND li_order_cfgs_part_of.

li_order_cfgs_refinst-posex = ld_itm_number1.

li_order_cfgs_refinst-config_id = lv_configid.

li_order_cfgs_refinst-inst_id = lv_inst_id.

APPEND li_order_cfgs_refinst.

li_order_cfgs_inst-config_id = lv_configid.

li_order_cfgs_inst-inst_id = lv_inst_id.

li_order_cfgs_inst-obj_type = 'MARA'.

li_order_cfgs_inst-class_type = '300'.

li_order_cfgs_inst-obj_key = it_pedidos_pos-matnr.

li_order_cfgs_inst-quantity = 1.

CONDENSE li_order_cfgs_inst-quantity.

li_order_cfgs_inst-complete = 'T'.

li_order_cfgs_inst-consistent = 'T'.

  • li_order_cfgs_inst-persist_id_type = 'G'.

  • li_order_cfgs_inst-quantity_unit = 'ST'.

APPEND li_order_cfgs_inst.

li_order_cfgs_value-config_id = lv_configid.

li_order_cfgs_value-inst_id = lv_inst_id.

li_order_cfgs_value-charc = 'Z_MC_NOMBRE'.

li_order_cfgs_value-value = it_pedidos_pos-nombre_serigr.

APPEND li_order_cfgs_value.

li_order_cfgs_value-inst_id = lv_inst_id.

li_order_cfgs_value-charc = 'Z_MC_LETRA'.

li_order_cfgs_value-value = it_pedidos_pos-tipo_letra.

APPEND li_order_cfgs_value.

Thank you in advance.

Regards.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi REIS did you get any answer to your pb I have exactly the same request .

these internal id for instance and configuration are confusing .

Thanks for your return if your pb has been solved since .

Rgards

Yvon