‎2007 Sep 06 6:21 AM
Hii,
please tell me how to pass parameters to swx_get_manager.
We can use PERNR also to find next level manager na?
I was passing like this, But im not getting any result.
DATA: LT_ACTOR_TAB type TABLE OF SWHACTOR,
LW_ACTOR_TAB TYPE SWHACTOR,
LT_AC_CONTAINER type TABLE OF SWCONT,
LW_AC_CONTAINER TYPE SWCONT.
LW_AC_CONTAINER-element = 'ORG_OBJECT'.
LW_AC_CONTAINER-ELEMLENGTH = '025'.
LW_AC_CONTAINER-type = 'C'.
concatenate 'P' WA_PA0001-pernr into LW_AC_CONTAINER-value separated by space.
APPEND LW_AC_CONTAINER TO LT_AC_CONTAINER.
CALL FUNCTION 'SWX_GET_MANAGER'
TABLES
ACTOR_TAB = LT_ACTOR_TAB
AC_CONTAINER = LT_AC_CONTAINER
EXCEPTIONS
NOBODY_FOUND = 1.
IF SY-SUBRC <> 0.
‎2014 Feb 20 10:49 AM
Hi,
In case of this post is still up-to-date
I did it almost the same way, the only difference is that I concatenated 'P' and pernr in additional variable (lv_value) and than transfered this variable to appropriate field (lw_ac_containter-value). It works fine in our system.
Bellow is the example.
Best regards, Ana
DATA: LT_ACTOR_TAB type TABLE OF SWHACTOR,
LW_ACTOR_TAB TYPE SWHACTOR,
LT_AC_CONTAINER type TABLE OF SWCONT,
LW_AC_CONTAINER TYPE SWCONT,
lv_value type string.
clear: lv_value, LW_AC_CONTAINER, lw_actor_tab.
refresh: lt_actor_tab, Lt_AC_CONTAINER.
concatenate 'P' pernr into lv_value separated by space .
LW_AC_CONTAINER-element = 'ORG_OBJECT'.
LW_AC_CONTAINER-ELEMLENGTH = '025'.
LW_AC_CONTAINER-type = 'C'.
LW_AC_CONTAINER-value = lv_value.
APPEND LW_AC_CONTAINER TO LT_AC_CONTAINER.
CALL FUNCTION 'SWX_GET_MANAGER'
TABLES
actor_tab = lt_actor_tab
ac_container = lt_ac_container
EXCEPTIONS
NOBODY_FOUND = 1
OTHERS = 2
.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.