Skip to Content
0

SD_SALES_ITEM_MAINTAIN VBAP-CUOBJ

Apr 05, 2017 at 04:17 PM

180

avatar image

Hi experts!

I have a problem with my Z program. It calls to BAPI_SALESORDER_CREATEFROMDAT2 and everything seems okay. However, if I review in debug mode RETURN table, It has an error saying that VABP-CUOBJ is empty.

I've reviewed the program for hours and I haven't found the problem.

Thanks for all.

Regards,

David

10 |10000 characters needed characters left characters exceeded

Which is the actual error message ID, which you see in the return table?

I am not a developer, but it is strange that you are creating documents despite of errors in the bapi return table.

Assuming that in your system you are using the field as originally intended, it appears that you are working with configurable materials. Is this correct? If yes, maybe you can review a few notes, like 1453002, 900869, 549563, 900380.

It would be a good idea to tag the question also with ABAP Development. The SD tag is mainly reviewed by functional consultants and most likely only a few active forum members, who follow the tag, have experimented with BAPI_SALESORDER_CREATEFROMDAT2 and configurable materials.

It would be easier for people to try helping you, if you post exactly what you are populating in the bapi.

1
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Best Answer
Jelena Perfiljeva
Apr 05, 2017 at 07:24 PM
0

If you're getting an error then something is not OK obviously. VBAP-CUOBJ is for the VC items, so have you also passed all the VC data for that item to BAPI? Sorry but with such limited details it's hard to answer intelligently.

Also if this is an ABAP and not SD question then tag it with ABAP.

Share
10 |10000 characters needed characters left characters exceeded
Pablo Casamayor Apr 06, 2017 at 08:47 AM
1

Hi,

it would be nice to know the message id and message number as stated by Veselina Peikova in her comment above.

From there in SE91 you could try to do a "where used" search of the message in order to identify the exact place where the message is raised.

Best regards,

Pablo

Share
10 |10000 characters needed characters left characters exceeded
David Sánchez Apr 12, 2017 at 03:28 PM
1

Hi,

At last, I've resolved the issue.

The solution was to pass the correct values in conifguration parameters to the bapi. I've filled order_cfgs_ref, order_cfgs_inst and order_cfgs_refinst properly, and now It works okay.

This is my code, where I fill config parameters, maybe somebody could find it useful.

LOOP AT lt_posiciones ASSIGNING <fs_pos>.
    CLEAR: ls_cfgs_ref, ls_cfgs_inst, ls_cfgs_refinst.
    lv_root_id = lv_root_id + 1.
    <fs_pos>-po_itm_no = <fs_pos>-itm_number.
    ls_cfgs_ref-posex = <fs_pos>-itm_number.
    ls_cfgs_ref-config_id = <fs_pos>-itm_number.
    ls_cfgs_ref-root_id = lv_root_id.
    ls_cfgs_ref-complete = 'T'.
    ls_cfgs_ref-consistent = 'T'.
    APPEND ls_cfgs_ref TO lt_cfgs_ref.
    ls_cfgs_inst-config_id = ls_cfgs_ref-config_id.
    ls_cfgs_inst-inst_id = lv_root_id.
    ls_cfgs_inst-obj_type = 'MARA'.
    ls_cfgs_inst-class_type = '300'.
    ls_cfgs_inst-obj_key = <fs_pos>-material.
    ls_cfgs_inst-quantity = <fs_pos>-target_qty.
    ls_cfgs_inst-quantity_unit = <fs_pos>-target_qu.
    ls_cfgs_inst-author = '8'.
    APPEND ls_cfgs_inst TO lt_cfgs_inst.
    ls_cfgs_refinst-posex = ls_cfgs_ref-posex.
    ls_cfgs_refinst-config_id = ls_cfgs_ref-config_id.
    ls_cfgs_refinst-inst_id = lv_root_id.
    APPEND ls_cfgs_refinst TO lt_cfgs_refinst.
  ENDLOOP.

Thanks for your suggestions.

Share
10 |10000 characters needed characters left characters exceeded
David Sánchez Apr 11, 2017 at 12:50 PM
0

Hi,

I've seen that the problem is in incomplete procedure definition. It seems that there are some definition about this field, however, when I try to find incomplete procedure difinition which message says, in transaction OVA2, I can't, it doesn't appear. Error message says there are a named 'MP' incompletion procedure wich I can't find.

Thanks for all.

Regards,

David

Show 2 Share
10 |10000 characters needed characters left characters exceeded

If you are still wondering why you don't see MP incompletion procedure in OVA2, read 2046900 - Incompletion log due to variant configuration.

1

Hi Veselina,

First of all, thanks for your help.

Reading this note, I understand that is not possible to avoid this behavior, so , how could I proceed if I need to execute the mentioned bapi without passing configuration parameters?

Thanks for all.

Regards,

David

0