Skip to Content

SD_SALES_ITEM_MAINTAIN VBAP-CUOBJ

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

Add comment
10|10000 characters needed 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.

  • Get RSS Feed

4 Answers

  • Best Answer
    Apr 05, 2017 at 07:24 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 06, 2017 at 08:47 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 12, 2017 at 03:28 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 11, 2017 at 12:50 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • 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