Skip to Content
0
Former Member
Jan 10, 2012 at 11:48 PM

Problem in displaying table all work center users

28 Views

Hi all,

I need to make some changes in FM.To determine the users in a work center and add them to the list of approvers.

I am able to see all Workcenter userid during debugging.Something I am doing wrong,not getting displayed while running the application.

Here is my code:

TYPES: BEGIN OF T_DATA,

OTYPE TYPE PLOG-OTYPE,

OBJID TYPE PLOG-OBJID,

END OF T_DATA.

DATA: LT_DATA TYPE TABLE OF T_DATA,

LS_DATA TYPE T_DATA.

DATA:LT_WDAT TYPE TABLE OF WPLOG,

LS_WDAT TYPE WPLOG.

************

WHEN 'A'.

select OTYPE OBJID from HRP1001 into table lt_data

where OTYPE = 'A'.

LOOP AT lt_data into ls_data.

CALL FUNCTION 'RH_FETCH_DATA'

EXPORTING

  • AEDTM = '00000000'

BEGDA = '19000101'

ENDDA = '99991231'

  • HISTO = '%'

INFTY = '1001'

ISTAT = '1'

OBJID = LS_DATA-OBJID

OTYPE = 'A'

PLVAR = '01'

TABLES

DATA = LT_WDAT

EXCEPTIONS

NOT_FOUND = 1

OTHERS = 2

.

ENDLOOP.

IF SY-SUBRC <> 0.

APPEND ls_data TO lt_wdat.

ENDIF.

Thanks

Kiran

*