‎2007 Apr 19 2:27 PM
hi,
i just want to know how i match input value in function module with the self created ztable first name and last name as a parameter in function module(import).
regards
Ankur
‎2007 Apr 19 2:30 PM
hi,
if your ztable contains two fields namely first name and lastname.
then in the function module import param declare two param and give like ztable-fieldname.
regards,
Navneeth.K
‎2007 Apr 19 2:36 PM
actually in my ztable has three field fname lname or age and in function module i import two parameter first_name and last_name and export in one parameter fullname so i just want to know when i execute the function module i give the input as like wise ram in firstname and kumar is lastname but it is not matching my ztable if ram kumar is does not in table then it should showing error but its showing which i give a and b it showing ab.that's my question?????????
‎2007 Apr 19 2:39 PM
hi Ankur,
can you be clear with your query if possible provide an example.
regards,
Navneeth.K
‎2007 Apr 19 2:43 PM
hi,
can you show the source code of the FM.
regards,
Navneeth.K
‎2007 Apr 19 2:48 PM
thanks for your help actually i am concatename first_name last_name into full_name
import parameter
FIRST_NAME like ZANKUR-FNAME first name
LAST_NAME like ZANKUR-LNAME last name
export parameter
full_name like zankur full name
excaption
error if name not matched
source code
concatename first_name last_name into full_name
‎2007 Apr 19 2:51 PM
Hi Ankur,
I dont see any select query in your FM souce code wat you can do is first check the ztable in case there is any record with the provided firstname and last name.
then concatenate else come out without giving a value or raise exception.
regards,
Navneeth.K
‎2007 Apr 19 2:53 PM
hi Ankur,
u can write in this way
select single firstname
lastname
into ( var1, var2 )
from ztable
where firstname = param_firstname
and lastname = param_lastname.
if sy-subrc eq 0.
--then write concatenate stnmnt.
endif.
regards,
Navneeth.K
‎2007 Apr 19 2:54 PM
please give me code that how can i match in ztable with function module parameter.
thanks
ankur
‎2007 Apr 19 3:07 PM
‎2007 Apr 20 5:09 AM
‎2007 Apr 19 2:30 PM
Hi Ankur,
Declare your importing parameters referring to the type as ZTABLE-FIRST_NAME and ZTABLE-LAST_NAME.
Regards,
Ravi
‎2007 Apr 19 2:32 PM
hi,
in addition to my above post in the import parameter column give like this:
parameter name type associated type
firstname like ztable-firstname
lastname like ztable-lastname
hope it solves your query
regards,
Navneeth.K
‎2007 Apr 19 2:36 PM
‎2007 Apr 19 2:40 PM