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

How to create a kernel method in abap

Former Member
0 Likes
5,009

hello guys,

if you check the class cl_abap_classdescr

you will see that there are some methods which is called by the kernel.

get_class_name is one of them!!

method GET_CLASS_NAME by kernel module abKm_RTTI_GetClassName fail.

endmethod.

Check the report named

RSKMETH

it lists the methods that are calle dby kernel

so how do you create a kernel method guys, any one of you tried it....?

15 REPLIES 15
Read only

Former Member
0 Likes
3,164

These are the C-methods right? they used to be executed differently as I recall.

Why do you want to call a kernel method?

I think you can create your own C/C++ stuff and use the in abap using a connector of some sorts.

Read only

Former Member
0 Likes
3,164

type CTRL+F8 in the abap editor, then type METHOD, double click METHOD - Abap statement.

then scroll down and click kernel method for more information about this subject.

Kind regards, Rob Dielemans

Read only

0 Likes
3,164

Hello Rob,

yes these are the external C functions that needs to be written in C and gets registered.

I went thru the help but dont know where to start.

for example: ,it states i need to place the c code in //src//include/abkhmeth.h

i dont have server directory level access, so i cant go and see

how can i simply create a basic kernel method?

cheers Rob

Read only

0 Likes
3,164

how can i simply create a basic kernel method?

I think the answer to that question is: no.

You can create kernel methods, but not simply. And you will need server access.

I did a short search on just 'using C-methods in SAP Abap' and for that you need a connector maybe this is achieved a lot easier. also searcht the blogs here, maybe you're fortunate in that someone decided to blog about it.

Good luck in your endeavors

Read only

0 Likes
3,164

Rob,

You are the only person that responded my questions mate.

Thanks, appreciate it.

For taking your time, i will mark you as helpful answer:)

I will find out and blog it about Rob!!

Let you know

Solen

Read only

Former Member
0 Likes
3,164

A friend of mine blogged abour kernel calls n a brazilian ABAP blog. This is the link.

You can use google-translate to read the post, and if you have any issues you can contact him using this form. If you do, drop me a line and I'll tell him where did you come from

Regards!

Read only

0 Likes
3,164

Hi mauricio

Thanks alot for the help, i will look at it.

İts great!!

Read only

0 Likes
3,164

Mauricio

I looked at the blog, its good but not helping me much

As its talking more about doing the old way

call function is covered!!

Read only

former_member209120
Active Contributor
0 Likes
3,164
Read only

0 Likes
3,164

Hi ramesh

Thanks for your reply!!

Not many people replied which made me surprise.

I have been looking at the document you sent

Its helpful but still hard to start creating one from scratch.

Even registering an exisitng kernel method ?

instead of creating one i thought i register one and call it

i couldnt register

i dont have server level access

i dont think basis guys allow me

thanks my friend

Read only

0 Likes
3,164

Hi Solen,

Without server level acces I don't believe you could do this.

If your requirement is simply: Can I call my own C-module from SAP (ABAP) then you should search for connectors with which you can achieve this.

Good luck!

rob.

Read only

0 Likes
3,164

Hi Rob

yes you are right for sure,

i went and talked with the basis guy and we looked at the server path

According to documentatin the files

shoulld live at

//src/include/abkmeth.h

and we couldnot find any folder like that!!

nor the singature file

abkhmeth.sig

what you think of that?

Read only

EddyGuo
Product and Topic Expert
Product and Topic Expert
0 Likes
3,164

Solen, I have same needs to implement my own C function to be consumed by ABAP code.  Tried to follow the "Kernel Methods" page on the help.sap.com but the information are limited.  I particular need an example copy of abkmeth.h file but couldn't find it on internet nor at service.sap.com. 

Read only

0 Likes
3,164

Hi Eddy

Yes I tried too but no success yet

The documentation doesnt give an example and some parts doesnt match

It will be great to have Kernel methods.

You can write in C then register with the tool and there you go

It is like a native code which is quite powerful

Read only

Former Member
0 Likes
3,164

This message was moderated.