Skip to Content
0
Former Member
Feb 26, 2010 at 07:28 AM

Func module fields to Work Area Fields - different data types

14 Views

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 .???