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: 

Copy standard bapi to Zbapi in the same standard package

Former Member
0 Kudos

Dear SAP,

I wanted to copy a standard bapi into Zbapi. As soon as i do this it is asking for access key.

Is it ok to use the access key and create??

Is there any exit to do this ?

Please help me in this regard.

The Bapi name  /AFS/BAPI_SALESORD_CREATEFDATA

from this Bapi, i want to create the ZBAPI.

Regards,

Arati

12 REPLIES 12

VenkatRamesh_V
Active Contributor
0 Kudos

Hi Arati,

Hope it help ful.

Goto SE 37 -> Copy icon. Enter the zbapi and standard bapi.

For Function Group.

goto se 80 enter the group name     right  click the function group name below object name -> Copy.

Regards,

Venkat.

aarif_baig
Active Participant
0 Kudos

Hi Arati,

             I would recommend you to create your own function group via SE80 and then copy standard FM and put the new FM in your new function group.

Thanks.

0 Kudos

Dear Aarif,

Will it not be good to put it in Standard package. If yes, how can we do that.

Regards,

Arati

0 Kudos

Hi Arati,

             Any specific reason you want to use standard package?

Thanks.

matt
Active Contributor
0 Kudos

If you put it in the same function group as the original, when new function modules are added to that function group, your BAPI will be affected - possibly disappear (depending on settings). it will certainly be an upgrade issue.

If you put it in a SAP package, you are violating the principle of separating custom developments from SAP standard, but it's unlikely to cause issues.

However, copying a BAPI (indeed any cloning of SAP standard code) is a bad idea. The reason is that the copy won't benefit from any notes or upgrades. If there's an error in the standard fixed by note application, you won't get it applied in the copy. Your copy will gradually become out of date. At some point it will probably break, and then you'll have to reclone the original, which can be quite difficult if it has changed radically.

You should first try to find user exits (CMOD, BADI, explicit enhancement points), and implicit enhancement points, and finally direct modification of the original bapi.

I repeat, cloning a SAP standard object is 99.9999% of the time the worst things to do. Far worse than a customer modification. Ignorant project managers, team leads etc. prefer clones because they don't need an object key. Don't be stupid. Do the right thing.

0 Kudos

Dear Mathew,

I know the importance of not modifying the SAP Standard.

We have ECC system, in which some other Abaper has created a Zbapi based on Standard BAPI

/AFS/BAPI_SALESORD_CREATEFDATA.

Now, we have upgraded the system to EHP6, Now we are unable to execute the programs related to that ZBAPI.

So, only i have asked this Query.

Please suggest how to resolve this issue.

Regards,

Arati

0 Kudos

As Matthew suggested, explore the original requirements WHY a ZBAPI was created in the first place and investigate if there are alternative ways to solve that problem (documentation, specifications of the ZBAPI are still there I presume).

If you decide to recreate the ZBAPI then create it in your own (Z) function group. That way you won't have to go through this ordeal again after the next upgrade.

matt
Active Contributor
0 Kudos

Arati Deshpande wrote:

...Please suggest how to resolve this issue.

Regards,

Arati!

Do what Peter Jonker says - at least the first part. I strongly recommend not cloning the function group!

buddhika_krishantha
Active Participant
0 Kudos

Create a function group(SE80).

Go to SE37.

Give the BAPI Name.

Click copy icon.

give the target BAPI name and function group name.

Press Copy.

ayaz1
Explorer
0 Kudos

Hi Arati,

You can not copy the standard BAPI to the ZBAPI in the standard Function Group without the Access Key.

Else if you want to copy the Standard BAPI to ZBAPI, you have to create a Z-Function Group and place the ZBAPI in that function group.

Thanks

A N

Former Member
0 Kudos

Dear All,

Thanks for your suggestion. I will try to find out why it was created first.Because unfortunately there is no document available for that.

Regards,

Arati

matt
Active Contributor
0 Kudos

And that's why you shouldn't clone programs - if the original changes enough, it can be impossible to work out what the original requirement was!

Good luck!