‎2018 Nov 23 5:51 AM
Hi Everyone,
I know this is a repeated question but i dont know somehow i am facing the problem in updating the custom fields created in VBAP. Below is the code. Could you please help. Is there any structure i need to update.
CONSTANTS : c_struct TYPE char9 VALUE 'BAPE_VBAP',
c_struct1 TYPE char10 VALUE 'BAPE_VBAPX',
ls_item_in-itm_number = <lv_posnr>.
ls_item_inx-itm_number = <lv_posnr>.
ls_item_inx-updateflag = 'U'.
APPEND : ls_item_in TO lt_item_in,
ls_item_inx TO lt_item_inx.
CLEAR : ls_item_in,ls_item_inx.
ls_vbap-vbeln = p_vbeln.
ls_vbap-posnr = <lv_posnr>.
ls_vbapx-vbeln = p_vbeln.
ls_vbapx-posnr = <lv_posnr>.
and i am moving custom fields also
ls_extensionin-structure = c_struct.
CALL METHOD cl_abap_container_utilities=>fill_container_c
EXPORTING
im_value = ls_vbap
IMPORTING
ex_container = ls_extensionin-valuepart1.
APPEND ls_extensionin TO lt_extensionin.
CLEAR : ls_extensionin,ls_vbap.
ls_extensionin-structure = c_struct1.
CALL METHOD cl_abap_container_utilities=>fill_container_c
EXPORTING
im_value = ls_vbapx
IMPORTING
ex_container = ls_extensionin-valuepart1.
APPEND ls_extensionin TO lt_extensionin.
CLEAR : ls_extensionin,ls_vbapx.
‎2018 Nov 23 8:56 AM
Which problem are you facing?
Did you enhance VBAPKOM and VBAPKOMX structures with your custom fields?
‎2018 Nov 23 9:40 AM
Hi Simone,
I think i found the issue, the custom fields in structures BAPE_VBAPX and VBAPKOMX are not declared with 1. They are taken different lengths. I have changed in both the structures but after that i am getting dumps.
‎2018 Nov 23 2:22 PM
‎2018 Nov 26 5:00 AM
Dumps got resolved after i maintained it as char01. Thanks for the response.