Application Development 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: 

CUOBJ field is getting populated in VBAP Table using SD_SALESDOCUMENT_CREATE function module while creating sales order

former_member393841
Participant
0 Kudos

Hello All,

We have an issue .....

CUOBJ field is getting populated in VBAP Table using SD_SALESDOCUMENT_CREATE  function module while creating sales order.

Could any one help me out how to resolve this.

My code for Configurations :

  w_sales_items_in-itm_number = w_items-itm_number.
     w_sales_items_in-target_qty = w_items-target_qty.
     w_sales_items_in-ref_1      = w_items-ref_1.
     w_sales_items_in-hg_lv_item = w_items-hg_lv_item.
     APPEND w_sales_items_in TO t_sales_items_in.

*---Filling Schedule Line Items
     w_sales_schedules_in-itm_number = w_items-itm_number.
     w_sales_schedules_in-req_qty    = w_items-target_qty.
     APPEND w_sales_schedules_in TO t_sales_schedules_in.

*---Item Data Checkboxes
     w_sales_items_inx-itm_number = w_items-itm_number.
     w_sales_items_inx-po_itm_no  = 'X'.
     w_sales_items_inx-material   = 'U'.
     APPEND w_sales_items_inx TO t_sales_items_inx.

*---Filling Header Text Data
     LOOP AT header_text INTO w_header_text.
       w_sales_text-text_id    = w_header_text-text_id.
       w_sales_text-langu      = w_header_text-langu.
       w_sales_text-text_line  = w_header_text-text_line.
       w_sales_text-format_col = v_col.
       APPEND w_sales_text TO t_sales_text.
       CLEAR w_sales_text.
       v_col = v_col + 1.
     ENDLOOP.



*---Filling Configuration data

*---Filling Configuration Reference Data SALES_CFGS_REF Table
     w_sales_cfgs_ref-posex      = w_items-itm_number.
     w_sales_cfgs_ref-config_id  = '000001'.
     w_sales_cfgs_ref-sce        = '1'.
     w_sales_cfgs_ref-root_id    = '00000001'.
     w_sales_cfgs_ref-complete   = 'T'.
     w_sales_cfgs_ref-consistent = 'T'.
     APPEND w_sales_cfgs_ref TO t_sales_cfgs_ref.
     CLEAR w_sales_cfgs_ref.

*---Filling Configuration Instances SALES_CFGS_INST Table
     w_sales_cfgs_inst-config_id       = '000001'.
     w_sales_cfgs_inst-inst_id         = '00000001'.
     w_sales_cfgs_inst-obj_type        = 'MARA'.
     w_sales_cfgs_inst-class_type      = '300'.
     w_sales_cfgs_inst-obj_key         = w_sales_items_in-material.
     w_sales_cfgs_inst-quantity        = w_items-target_qty.
     w_sales_cfgs_inst-quantity_unit   = 'EA'.
     w_sales_cfgs_inst-complete        = 'T'.
     w_sales_cfgs_inst-consistent      = 'T'.
     w_sales_cfgs_inst-OBJECT_GUID     = 'T'.
     w_sales_cfgs_inst-PERSIST_ID_TYPE = w_sales_items_in-material.
     APPEND w_sales_cfgs_inst TO t_sales_cfgs_inst.
     CLEAR w_sales_cfgs_inst.

*---Filling Configuration Characteristic Values SALES_CFGS_VALUE Table
     LOOP AT w_items-itm_config INTO wa_itm_config.
       w_sales_cfgs_value_in-config_id = '000001'.
       w_sales_cfgs_value_in-inst_id   = '00000001'.
       w_sales_cfgs_value_in-charc     = wa_itm_config-charc_name.
       w_sales_cfgs_value_in-value     = wa_itm_config-charc_value.
       APPEND w_sales_cfgs_value_in TO t_sales_cfgs_value.

*---Filling Configuration Variant Condition Key SALES_CFGS_VK
       w_sales_cfgs_vk-config_id = '000001'.
       w_sales_cfgs_vk-inst_id   = '00000001'.
       w_sales_cfgs_vk-vkey      = wa_itm_config-charc_name.
       APPEND w_sales_cfgs_vk TO t_sales_cfgs_vk.
       CLEAR : w_sales_cfgs_value_in,w_sales_cfgs_vk.
     ENDLOOP.

Thanks in advance..

Regards,

Harsha

1 ACCEPTED SOLUTION

former_member393841
Participant
0 Kudos

Hello All,

My issue is resolved ....

Regards,

Harsha

8 REPLIES 8

andrea_brusarestelletti
Active Contributor
0 Kudos

Hello,

  and what is the issue, please? CUOBJ is the internal number identifying the configured object, so it'ìs correct that is created.

Best regards,

Andrea

0 Kudos

Hello Andrea,

Thank you very much for your quick response.

CUOBJ field is empty in VBAP table for that particular sales order line items.

But i can see the configuration for the items in VA03 transaction to the sales order.Could you please let us know how to fill the CUOBJ field in VBAP.

Regards,

Harsha

0 Kudos

Hi Harsha,

Use Function Module VC_I_GET_CONFIGURATION to read the configuration of VBAP-CUOBJ.


Regards,

Shatrughan Singh

0 Kudos

Hello Shatrughan Singh,

My issue:

We are creating sales order successfully using function module SD_SALESDOCUMENT_CREATE and

Configurations for items also updating correctly.

But when i see the sales order in VBAP table the CUOBJ field for line items is empty.

Can you please let me know how to fill the CUOBJ field in VBAP.

Regards,

Harsha P

0 Kudos

Hi Harsha,

Please confirm that selected material in SO is configurable material or not.


Check in MARC-CUOBJ field also that Int. object number is updated or not.


Regards,

Shatrughan Singh

0 Kudos

Hi Shatrughan Singh,

How to check whether the material in SO is configurable material or not.

MARC-CUOBJ field Int. object number is not updated for the material i am using.


Thanks in Advance.


Regards,

Harsha P

0 Kudos

Hi Harsha,

Check in Material Master classification and MRP3 tab. This is releted to variant configuration of material variant.

Take help from MM consultant also.

Regards,

Shatrughan Singh

former_member393841
Participant
0 Kudos

Hello All,

My issue is resolved ....

Regards,

Harsha