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: 

BAPI to flag customer as deleted?

MartinMaruskin
Active Contributor
0 Kudos

Hi,

I'm looking for BAPI which I can use to set KNA1-LOEVM "Central Deletion Flag for Master Record" for particular customer.

Is there such a BAPI available? If not how to handle such a requirement? Basically I need to mark customer for deletion.

Also is there a BAPI to delete customer directly?

thanks

m./

1 ACCEPTED SOLUTION

Jarosław
Active Participant
0 Kudos

You can use class CMD_EI_API. You can find some document about in ind SDN.

Generaly, first call:

CMD_EI_API=>INITIALIZE( ).

Then call method MAINTAIN_BAPI, field to chenge put in parameter IS_MASTER_DATA (few levels of structure).

If You need update customer from external system, You need to write your "Z" remote-enabled function which fills parameters and calls methods.

Regards,

6 REPLIES 6

Mohamed_Mukhtar
Active Contributor
0 Kudos

Hello Martin,

I  searched se37 with BAPI*CUST*DEL and found BAPI_CUSTOMER_DELETE.

Can you quickly try with this FM and check if it can set KNA1-LOEVM as 'X'

Thanks

0 Kudos

Hi Learner,

I did the same as you - I went through SE37... However BAPI_CUSTOMER_DELETE is using just a call transaction XD06 to update the customer with that flag. As my scenario is involving external system from which I need to update customer this BAPI doesn't help.

Is there someone who did this with help of either BAPI or something other?

thanks,

m./

0 Kudos

Hello Martin,

This is BAPI can be used from external system since it is a BAPI. May I knw your requirement to help you.

Thanks

0 Kudos

Well, yes you can use any FM from external system as long as it is RFC enabled. However if there is a CALL TRANSACTION used which run in dialog you need to be connected into that SAP system via GUI to use such an BAPI. SAP calls such a BAPI as Dialog. Means dialog with a user is required and it cannot be executed in the background.

My case is that I need to will call this BAPI from external system without connection to SAP GUI or SAP user.

thanks

m./

Jarosław
Active Participant
0 Kudos

You can use class CMD_EI_API. You can find some document about in ind SDN.

Generaly, first call:

CMD_EI_API=>INITIALIZE( ).

Then call method MAINTAIN_BAPI, field to chenge put in parameter IS_MASTER_DATA (few levels of structure).

If You need update customer from external system, You need to write your "Z" remote-enabled function which fills parameters and calls methods.

Regards,

0 Kudos

Thanks Jaroslaw. I think there is no out of box functionality for this (standard BAPI providing this). So I end up with custom solution as you described.