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: 

validating import parameters in Functin module

Former Member
0 Kudos

Hi Eveyone,

Anybody let me know how to validate import parameters to Function module,

if the sy-subrc not equal to 0, what i have to do.

6 REPLIES 6

Former Member
0 Kudos

Hi Madhavi,

When you pass some parameters to any Function Module , i.e. Import Parameters, First thing we do is validation.

Check for the respective data lements and validate them, If sy-subrc fails, then throw an exception, or raise an error message, by using standard procedure of structure type BAPIRET2 (For RFC's) or throw any respective error message.

Hope this will resolve your Query.

Reward alll the helpful answers.

Regards

Nagaraj T

0 Kudos

Hi , I am checking on the material (MATNR),

this is FM is calling from Other program, after validating if sy-subrc eq 0,

then how to handle it means how to declare in exceptions .

will you send coding please

0 Kudos

Hi Madhavi,

I understood that you are using that FM in another program. Depending on your requirement, you should raise an error or handle that error using an Error internal table. but if sy-subrc is equal to 0, then no need to handle the exceptions part. If validation is correct, then proceed to further processing of the logic.

Hope this will resolve your Query.

Reward alll the helpful answers.

Regards

Nagaraj T

Former Member
0 Kudos

what u want exactly i am not under standing

for import parameters u can say optional / mandatory

Madhavi

Former Member
0 Kudos

Hi,

Try the following...

For example your import parameters is ITAB means,

before calling the function module...

If not itab is initial.

Call FM.

endif.

Regards,

Billa

Former Member
0 Kudos

hi

good

Import & Export Parameters.

Import parameters correspond to the formal input parameters of subroutines. They pass data from the calling program to the function module.

Export parameters correspond to the formal input parameters of subroutines. They pass data from the function module back to the calling program.

through you have not mentioned the function module name neither you have giving the error that you r facing its bit tough to give you the exact reply.

thanks

mrutyun^