‎2008 Jan 09 9:20 AM
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.
‎2008 Jan 09 9:24 AM
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
‎2008 Jan 09 9:33 AM
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
‎2008 Jan 09 10:17 AM
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
‎2008 Jan 09 9:25 AM
what u want exactly i am not under standing
for import parameters u can say optional / mandatory
Madhavi
‎2008 Jan 09 9:26 AM
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
‎2008 Jan 09 9:27 AM
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^