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: 

Testing custom function modules

Former Member
0 Kudos
529

Hi Friends ....

As I am new to ABAP testing , I need help in knowing how to test custom function modules .

Below is how I am trying :

Step : 1 -- > Open Tcode SE37

Step : 2 --> Display the function module

Step : 3 --> Do its syntax check.....activate it..... execute it

What if no test data is available???

I am trying to execute directly where it gives a return parameter for some function modules saying No Entry \ No data available for this ID etc.,

I am in a confusion whether its correct or not

I want some ideas regarding this

- Swapna

7 REPLIES 7

Former Member
0 Kudos
266

hi,

check the execptions if you mentioned any. if there is a syntax error then it will not allow you to active.

and to test you have to take the test data. it would be useful to you if you post your code.

thanks,

anupama.

0 Kudos
266

Hi Anupama...

Thank u a ton for the quick reply...but I have another doubt..if I execute without giving any selection parameter data...it says

No data stored for in the selected period

-Swapna

0 Kudos
266

>

> Hi Anupama...

>

> Thank u a ton for the quick reply...but I have another doubt..if I execute without giving any selection parameter data...it says

>

> No data stored for in the selected period

>

> -Swapna

Ok, so that is what it does if you don't pass it any selection parameter data - I doubt very much if that is how it will be used in Production. Any function module is just a bit of code that does what it has been programmed to do; to test it you just need to find out what it is supposed to do from whoever has asked for it to be built and then check that it does it. If there is no test data set up, then you'll need to find out from your functional consultant how to set some up or get them to set it up for you.

0 Kudos
266

Hi,

How did you given the import and export parameters, if you checked as mandatory you need to give the corresponding values in the selection criteria. and once you given the values. u can save the test values as normal variants. and when you execute you can check this value and execute..

Regards,

Praveen.

0 Kudos
266

Dear All,

I thanku for all ur responses. I will definitely test the Fms as u all suggested.

-Swapna

Former Member
0 Kudos
266

Swapna,

First know the functionality of the FM.

Then , check wheather suitable data is available or not and try to execute the steps, which the FM is meant to do by yourself.

if the process gives some output, then chek the same input to test ur FM.

or else create test data if possible or ask ur functional peer to do it for you.

Also, if your FM has any exception condition then check for them and see proper message is triggered or not.

Reagards,

Anirban

Former Member
0 Kudos
266

Hi,

Please check this link will hep you

http://help.sap.com/saphelp_nw04/helpdata/en/26/64f623fa8911d386e70000e82011b8/content.htm

and also pass the required parameter what you have asked for. then goto the debug mode and then find the data which has been there in the internal table or not.