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 function module from an ABAP program

Former Member
0 Likes
2,247

Hi All,

I wated to know is it possible to create a function module from an abap program.  The requirement is that I wanted to create a function module from third party software. Hence, I cant use the usual way of the SE37 dialog steps.

So, please let me know if any of you have got ideas on this...

Thanks & regards,

Guru

1 ACCEPTED SOLUTION
Read only

Paulo_Vantini
Participant
0 Likes
1,514

Hi Guru,

it is also possible to achieve that through an SHDB record from SE37 with all your required steps.

Then you can use that Z record inside your ABAP program with the BDCDATA internal table adjusting the parameters for your specific needs, and finally make a call transaction for SE37.

That is the easiest and reliable way of creating FMs from ABAP programs.

Regards.

5 REPLIES 5
Read only

Phillip_Morgan
Contributor
0 Likes
1,514

As far as I know, there is nothing automatic.

The simplest answer is that all your selection screen becomes the function modules interface and the resulting list is returned in a table.

But some analysis may be necessary, study of technical constraints, who will use this function, is it RFC, etc...

Read only

0 Likes
1,514

1.) Create FM with selection screen inputs as interface.

2.) Use Submit program inside your FM to call your report directly.

But this is basic question, there is no technical input require in this question only manual effort is require.

BR,

Prakash

Read only

Former Member
0 Likes
1,514

Hi Guru,

You can have a look at the code share SAPLinks.

They use XML based interface to create almost all SAP Objects including Function groups.

You can use the same to achieve.. it is a long shot but you can give a try.

Downloads - saplink - SAPlink is an open source project that aims to make it easier to share ABAP de...

Regards

Read only

Paulo_Vantini
Participant
0 Likes
1,515

Hi Guru,

it is also possible to achieve that through an SHDB record from SE37 with all your required steps.

Then you can use that Z record inside your ABAP program with the BDCDATA internal table adjusting the parameters for your specific needs, and finally make a call transaction for SE37.

That is the easiest and reliable way of creating FMs from ABAP programs.

Regards.

Read only

0 Likes
1,514

Hi All,

Thanks for the answers....I resolved the issue myself. We can use the API "RS_FUNCTIONMODULE_INSERT" to create a FM from third party software. It works fine. You can specify, the Function group, Source code line, importables etc. I am really happy to see such FM existing in SAP...

Also, there are plenty of other FMs like FM to create function group or to activate FM or rename a FM etc... Please check...

Thanks

~ Guru