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

BAPI_MATERIAL_SAVEDATA Fill extention structure uncode confirm?

Former Member
0 Likes
821

Hi

We use an extion of the mara. Therfore if we save own data with BAPI_MATRIAL_SAVEDATA we have to fill the EXTENSIONIN struktur like the code example 1.

This will not longer be supported

After a structure enhancement, assignment or comparison may no longer be permitted. syntactically incorrect.

How could we fill the exteionstructure unicode cofirm ?

Best Regards

Gerhard

Code-example 1:

DATA:

wa_zmara TYPE bapi_te_mara,

wa_zmarax TYPE bapi_te_marax,

t_ext TYPE STANDARD TABLE OF bapiparex,

t_extx TYPE STANDARD TABLE OF bapiparexx,

value(960),

valuex(960).

value = wa_zmara.

wa_ext-structure = 'BAPI_TE_MARA'.

wa_ext-valuepart1 = value(240).

wa_ext-valuepart2 = value+240(240).

wa_ext-valuepart3 = value+480(240).

wa_ext-valuepart4 = value+720(240).

APPEND wa_ext TO t_ext.

valuex = wa_zmarax.

wa_extx-structure = 'BAPI_TE_MARAX'.

wa_extx-valuepart1 = valuex(240).

wa_extx-valuepart2 = valuex+240(240).

wa_extx-valuepart3 = valuex+480(240).

wa_extx-valuepart4 = valuex+720(240).

APPEND wa_extx TO t_extx.

3 REPLIES 3
Read only

former_member194669
Active Contributor
0 Likes
655

Hi,

Try this way


class cl_abap_container_utilities definition load.
data: wa_ BAPIPAREX type BAPIPAREX.

  call method cl_abap_container_utilities=>read_container_c
    exporting
      im_container           = value
    importing
      ex_value               = wa_BAPIPAREX
    exceptions
      illegal_parameter_type = 1
      others                 = 2.

   APPEND wa_BAPIPAREX TO t_ext.

a®

Read only

0 Likes
655

Thank you, your anser was very helpful

Read only

0 Likes
655

This answer is perfect. Kindly mark this thread as answered, so that it will be helpful for others.