02-26-2010 7:28 AM
func module will give DIVISIONID and DIVISION_TEXT values which are to be populated to Work Area
where Func modules fields and Work area fields are of NUMC and CHAR types ..
i want to pass the func module field values to Work Area.
How can i do tht ??
CALL FUNCTION 'Z_GET_DIVISION'
EXPORTING
PERNUM = t_pernr
BEGDA = e_begda
ENDDA = e_endda
IMPORTING
BASEORGUNIT_ID =
BASEORGUNIT_TEXT =
BASEORGUNIT_ABBR =
DIVISION_ID = wa_divs-division
DIVISION_TEXT = wa_divs-division_text.
DIVISION_ABBR =
CP_POSITION =
CP_PERNR =
TABLES
IT_0002 =
EXCEPTIONS
NOPERNRFOUND = 1
NOCPDATA = 2
OTHERS = 3
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
clear: wa_divs-division,wa_divs-division_text.
ENDIF.
CALL METHOD zcl_tem_int=>get_employee_division
EXPORTING
i_pernr = t_pernr
i_begda = e_begda
i_endda = e_endda
RECEIVING
r_division = wa_divs.
it_data-auth_org_id = wa_divs-division.
it_data-auth_org_name = wa_divs-division_text.
ENDIF.
Here
Wa_divs- Division is Char- 17 and DIVISIONID in Function Module is NUMC 8
and i have pass the value of DIVISIONID (NUMC) From Functionmodule to a Work Area defined as CHAR.
Wa_divs-Division_text is Char 40 and DIVISION_TEXT in FM is CHAR 25
and i have to pass the value of DIVISION_TEXT- Char(40) from Func module to a Work Area defined as CHAR (25)
so please let me know how can i convert the func module output to Work Area input which are in NUMC and Char formats respectively...?????
So how to match the above two fields .???
02-26-2010 8:09 AM
Hi,
Are you getting data type mismatch error in this?
If yes, then try using temporary variables which will be of type work area. Take values from your function module into these variables and then assign these variable to your work area.
Try out this and let me know if it works.
Thanks,
Archana
02-26-2010 8:09 AM
Hi,
Are you getting data type mismatch error in this?
If yes, then try using temporary variables which will be of type work area. Take values from your function module into these variables and then assign these variable to your work area.
Try out this and let me know if it works.
Thanks,
Archana
02-26-2010 8:15 AM
Are you sure to use the "good" FM to get data, the types mismatch, so simple MOVE between the fields of your work area and temporary field passed to the FM may not be able to map the data coorrectly.
Actually NUMC 8 -> CHAR 17 looks like the result of a conversion exit, check in ddic, if there is a conversion-exit or a like-relation to convert field values between you work area and the FM parameters.
Regards,
Raymond
02-26-2010 8:37 AM
There is no corresponding Func Module...to convert from NUM to CHAR ..
asi have searched in DDIC ...
02-26-2010 9:41 AM
as v have create the Temp variables of Func modules Field types or LIKE
then catch the Variables values to Work area..
thus solved the prob.