Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

how to read the work center details

Former Member
0 Kudos

hai gurus can any one tell me is there any funciton module to read the work center details , or any bapi's or from whcih tables we can fetch the data for a work center

thanx in advance

afzal

1 ACCEPTED SOLUTION

Former Member
0 Kudos

refer to table <b>CRHD</b>, u ll get all the details of a Work Center in this table.

4 REPLIES 4

former_member404244
Active Contributor
0 Kudos

Hi,

ceheck the code...

REPORT ZPPWORKCENTER

LINE-SIZE 120 NO STANDARD PAGE HEADING LINE-COUNT 058(001).

TABLES: CRHD, "Work Center Header

CRTX, "Text for the Work Center or Production Resource/Tool

CRCO. "Assignment of Work Center to Cost Center

SELECT-OPTIONS: S_WERKS FOR CRHD-WERKS DEFAULT 'XX',

S_LVORM FOR CRHD-LVORM.

SELECT * FROM CRHD WHERE LVORM IN S_LVORM

AND WERKS IN S_WERKS.

CLEAR CRCO.

SELECT SINGLE * FROM CRCO WHERE OBJTY = 'A'

AND OBJID = CRHD-OBJID

AND ENDDA => SY-DATUM.

CLEAR CRTX.

SELECT SINGLE * FROM CRTX WHERE OBJTY = 'A'

AND OBJID = CRHD-OBJID

AND SPRAS = 'E'.

WRITE: / CRHD-LVORM,

CRHD-WERKS UNDER 'Plnt',

CRHD-ARBPL UNDER 'Work Center',

CRCO-KOSTL UNDER 'Cost Center',

CRTX-KTEXT UNDER 'Description'.

ENDSELECT.

TOP-OF-PAGE.

WRITE: / SY-DATUM, SY-UZEIT, SY-REPID, SY-UNAME,

SY-PAGNO.

SKIP.

WRITE:/3 'Plnt',

8 'Work Center',

20 'Cost Center',

33 'Description'.

*-- End of Program

Reward points if u find useful.

Regards,

Nagaraj

Former Member
0 Kudos

Hi,

Try FM JIT09_READ_SINGLE_CRHD for work center header or CF_DB_CRTX_READ for the text; or you can select the data from table CRHD and CRTX respectively.

Former Member
0 Kudos

refer to table <b>CRHD</b>, u ll get all the details of a Work Center in this table.

0 Kudos

This code will dump all WorkCenter/Plant/WorkCenter Descriptions for you.

  • TABLES: "crhd,"Work Center Header

  • "crtx."Text for the Work Center or Production Resource/Tool

*

select crhdarbpl crhdwerks crtx~ktext

from crhd

inner join crtx

on crhdobjty = crtxobjty

and crhdobjid = crtxobjid

into table workcenterlist

where crhd~objty = 'A'

and crtx~spras = sy-langu.

if sy-subrc ne 0.

raise workcenter_plant_not_found.

endif.

delete adjacent duplicates from workcenterlist.