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

Run time error due to custom function module in a program

Former Member
0 Likes
1,931

Hi,

I have created one program using custom function module ZIN_COMEV_CUSTDETAILNOTIF_OUT .The program is showing runtime error

"Incorrect parameter with CALL FUNCTION."

I have tested the FM using same set of parameter as in program it is working.It is throwing error while executing in program help.

Regards

Datta

12 REPLIES 12
Read only

Former Member
0 Likes
1,457

Hi,

check the Import parameters type and passing parameters type in Program are of same type.

Other wise it will dump Incorrect parameter with CALL FUNCTION

Prabhudas

Read only

PeterJonker
Active Contributor
0 Likes
1,457

Declare the parameters in your program which you use to call the FM EXACTLY the same as the parameters as defined in your functionmodule.

Read only

Former Member
0 Likes
1,457

Hi DLK

When you test the FM from SE37, system will automaticaly check for the type.

But when you try it through the program, system will not be able to intrpret it till the runtime.

That is the reason why ur getting a runtime error.

Defnitly it will be the issue of the parameter type that you are passing to the FM.

So check it once.

Regards

Hareesh Menon

Read only

Former Member
0 Likes
1,457

Hi,

Probably the problem is due to conversion failures. Make sure you pass the same types to the function module which are declared in it . If you still face the problem try using conversion routines like CONVERSION_EXIT_ALPHA_INPUT before passing it to the function module.

This may help.

Read only

0 Likes
1,457

Hello Nagraj or harish

I think you may be right.There is date field in my function module ,when I am testing function module I am giving it as

Y_DATE = 01.01.2011,but in program the field is DATS type and I have to give 20110101.If this is the problem how I can solve it.

CALL FUNCTION 'ZIN_COMEV_CUSTDETAILNOTIF_OUT'

EXPORTING

Y_SENDER = gv_g_sender

Y_RECEIVER = gv_g_reciever

Y_PARTNER = GV_V_PARTNER

Y_BASIC_PROCESS = GC_BASIC_PROCESS

  • Y_SWITCHNUM =

  • Y_SEN_LOAD =

Y_INTUI = GV_V_INTUI

  • Y_TRANSACTIONID =

Y_DATE = GV_V_DATE

Read only

0 Likes
1,457

>

>...I am giving it as

> Y_DATE = 01.01.2011,but in program the field is DATS type and I have to give 20110101.If this is the problem how I can solve it.

You' have got to be kidding right?

Read only

0 Likes
1,457

hi

I am not joking , I am not able to understand what is the exact error ,I just wanted to know whether date conversion may be one of the error.

Read only

0 Likes
1,457

>

> hi

>

> I am not joking , I am not able to understand what is the exact error ,I just wanted to know whether date conversion may be one of the error.

Was afraid for that...

What's holding you back to experiment a bit to find the solution yourself? it really isn't difficult since you figured out the problem.

Read only

0 Likes
1,457

Hi,

Please check the value in the field : GV_V_DATE.

Value should be in 'yyyymmdd' format. (Don't compare with the date while executing FM from se37)

Regards,

Srini.

Read only

0 Likes
1,457

Please invest some own effort and analysis into solving problems before asking for help.

Thread locked.

Thomas

[Rules of engagement|http://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]

Read only

Former Member
0 Likes
1,457

Hi,

If in your calling program , the date field you are passing is of type sy-datum and you are capturing value from a screen to this field then there is no need for conversion. Otherwise u can either use string functions and put the date value in the format the system recognises ot you can use date conversion functions available.

Check the useful FMs at this link : http://wiki.sdn.sap.com/wiki/display/ABAP/UsefulABAPFunction+Modules

Thanks,

Read only

former_member194797
Active Contributor
0 Likes
1,457

Hi,

Use SE38 for displaying the main program (the program calling the function).

Choose "Program" menu, "Check", "Extended program check".

Then choose "CALL FUNCTION interfaces" only and execute.

You will get statistics.

Dubble-click on the "CALL FUNCTION interfaces" row for viewing the errors.