Application Development 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: 

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

former_member202771
Contributor
0 Kudos

Hi Experts,

I have a requirement where I need to update custom fields of a PO using BAPI extensions. I am filling BAPI_TE_MEPOHEADER and passing it to extensions structure of BAPI_PO_CHANGE. My code works but throws ATC error as "After a structure enhancement, the assignment or comparison may no longer be permitted. syntactically incorrect."

Below are the 3 approaches I am going with, but both gave me same atc error.

code 1 :

  MOVE 'BAPI_TE_MEPOHEADER'    TO gs_extensionin-structure.

  MOVE  gs_bapi_te_mepoheader  TO gs_extensionin-valuepart1.    --> Error here

  APPEND gs_extensionin TO gt_extensionin.

Code 2 :

data : lv_value(960).

  MOVE 'BAPI_TE_MEPOHEADER'    TO gs_extensionin-structure.

  MOVE gs_bapi_te_mepoheader TO lv_value.                                    --> Error here

   class cl_abap_container_utilities definition load.

  call method cl_abap_container_utilities=>read_container_c

    exporting

      im_container           = lv_value

    importing

      ex_value               = gs_extensionin

    exceptions

      illegal_parameter_type = 1

      others                 = 2.

  APPEND gs_extensionin TO gt_extensionin.

Code 3 :

  MOVE 'BAPI_TE_MEPOHEADER'    TO gs_extensionin-structure.

  MOVE gs_bapi_te_mepoheader TO lv_value.                                    --> Error Here

*   gs_extensionin-valuepart1 = lv_value+0(240).

*   gs_extensionin-valuepart2 = lv_value+240(240).

APPEND gs_extensionin TO gt_extensionin.

Can you please share your experience and expertise if you have faced a similar issue ?

Thanks and Regards,

Anil Supraj

8 REPLIES 8

pranay570708
Active Contributor
0 Kudos

Try using Move-corresponding instead of Move.

0 Kudos

Didn't work Pranay.

Thanks,

Anil

0 Kudos

Hi Anil,

It should be a warning. Check the enhancement category of the structure used. If it is 'can be enhanced' then it gives warning that in future if you enhance the structure it might effect the other dependencies and it is not a problem. Else you can make the enhancement category as 'canto be enhanced' and  you will not get this warning.

0 Kudos

Hi Pranay,

Thanks for making me understand the warning.

a small query, when we set the enhancement category as "cannot be enhanced", we will not be able to add new fields I believe(please correct if I am wrong). If that is the case, will the custom fields added to the structure gets deleted after we change the enh category ?

Thanks,

Anil

0 Kudos

Hi Anil,

The structure 'cannot be enhanced' means you can not add include/append structure to it. However, You can add custom fields to it. and Existing custom fields does not gets deleted after changing enhancement category.

mohit_dev
Contributor
0 Kudos

Instead of MOVE statement or assignment operator, CONCATENATE the contents of the structure into the corresponding field as required.

raymond_giuseppi
Active Contributor

Use UNICODE compatible syntax

    gs_extensionin-structure = 'BAPI_TE_MEPOHEADER'.
    cl_abap_container_utilities=>fill_container_c(
      EXPORTING
        im_value               = gs_bapi_te_mepoheader
      IMPORTING
        ex_container           = gs_extensionin+30 ).

karthi-75
Discoverer
0 Kudos

i am facing this issue while create sale order using BAPI Function module. CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'.

if your are going to enhance the BAPE_VBAK or BAPE_VBAP structure. Like adding append structure.

Use the Enhancement category .



And try the ATC check .

Now Warning or error message will be removed .