Application Development and Automation 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: 
Read only

Problem updating VBAP custom fields

former_member594288
Participant
0 Likes
1,861

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.

Dumps got resolved after i maintained it as char01. Thanks for the response.

4 REPLIES 4
Read only

SimoneMilesi
Active Contributor
0 Likes
1,608

Which problem are you facing?
Did you enhance VBAPKOM and VBAPKOMX structures with your custom fields?

Read only

0 Likes
1,608

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.

Read only

0 Likes
1,608

ravi_sdn

Which dumps?

Read only

0 Likes
1,608

Dumps got resolved after i maintained it as char01. Thanks for the response.