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: 

Getting Error while deleting a filed and activating from a Bapi structure

former_member498821
Participant
0 Kudos

Hello,

I have added two fields(Tprog and Tagty) in a custom  Bapi (Z_BAPI_INSERT_IT2003) Structure (ZBAPI_INSERT_EMPLOYEES)  and when i tried to remove its getting removed but on activating the structure i am getting the following error;

BAPI-structure: invalid change: field TAGTY should be deleted

BAPI-structure: invalid change: field TPROG should be deleted

Can you tell me what i should do in order to remove this error ? I tried by cancelling the release of Bapi but still its not working.

13 REPLIES 13

Former Member
0 Kudos

Hi Venkata,

First of all deleting a field from a structure normally doesn't results to errors unless the structure is used in any of the programs or BAPI (which you say are using) so here is what you should do. First in the Bapi remove this structure from its parameter and then try activating this structure and then again declare you structure/table in the BAPI itself. I am pritty sure that this should work.

Cheers!

Best regards,

Robindra Jain

FredericGirod
Active Contributor
0 Kudos

Hi,

have you tried to go in the version management and get back to a previous version ?

regards

Fred

0 Kudos

Hi Venkata.

Try this steps:

1.- Remove the structure from the bapi.

2.- Remove the fields from the structure and activate it.

3.- Insert the structure again in the bapi.

Regards,

David.

former_member498821
Participant
0 Kudos

Hi Robindra / David ,

I tried this. but still i am getting the same error.

can you tell me if this Bapi is used in some other program then because of this the error is coming ?

0 Kudos

This message was moderated.

0 Kudos

As it is a custom bapi, it's only in your system where you could know if the bapi is used in other program.
You can do it going to SE38 transaction. Once there, insert the bapi name and click on the button 'Where-used list' beside to 'Execute' button.

Let me know if it worked.

Regards,

David.

0 Kudos

Hi Venkata,

go to the structure and the click on the where used list and then remove its usage from all the places and then try it. I don't think there is any other way that can be wrong. Also u tried version management which means now when try to recover your table from earlier version it is still throwing some error is a bit strange . Please revert it back to original structure when it was working fine, if that is activating then I am sure that if you follow our procedure it will work. Just use where used list.

Cheers!

Best regards,

Robindra Jain

former_member498821
Participant
0 Kudos

Hi Girod,

I tried the version management also. but still i am getting the error.

0 Kudos

I think SAP won't change your structure because you use the two field in the Import / Export parameter in the Function module.

Could you check this parameters ? (trans. SE37)

regards

Fred

0 Kudos

That's why I told to delete the structure from the bapi... 😉

former_member498821
Participant
0 Kudos

Hi All,

Thanks a lot for your reply.

This issue is resolved.

0 Kudos

Hi,

How did u resolved your problem?

Also after explaining Please close the thread as assumed answer OR marking the correction answer from the list or helpful answer.  This is because it will help further users to solve this issue.

Cheers!

Best regards,

Robindra Jain

Rekha_DR
Developer Advocate
Developer Advocate
0 Kudos

Hello,

It is allowed only to ADD new field to the BAPI structure . You cannot delete / change the field once it is added and activated . An authority check and consistency check is done and this prevents from activating the changed BAPI structure .  Unfreezing the BOR objects methods in swo1 , adding a new field to the BAPI structure is possible , but not changing / deleting field .

If you still activating bypassing the checks , then its against the normal SAP rule to activate an object as it may lead to some problems during transports .

Regards,

Rekha