Work centers by pernr

Can anyone suggest a function module that returns all work centers assigned to a pernr (via the organization model).
I have tried function modules RH_STRUC_GET and BAPI_ORGUNITEXT_DATA_GET with various evaluation paths (including ALLASSGN) but can not get the work centers.
Many thanks.
Ian

Hi Ian,
try fm COI2_PERSON_OF_WORKCENTER
Example:
IN_OBJECT
OBJTY "P"
OBJID  "4711"
Best regards
Stephan

Similar Messages

  • Restrict creation of inspection lot for certain work centers

    Hi
    My client needs to restrict the creation of inspection lot at certain work centers although QM is active for all material processed in these work centers.
    I am using the  function module 'EXIT_SAPLQAAT_002' of QAAT0001 for this purpose. Z04 inspection type ( with Post to insp stock) is maintained for all these material.
    A different Z table is there , where material-work center combination is maintained for which no inspection lot is required.
    Logic provided so that system searches Material-Work center from production order then compares it with the Material-Work center combination with the maintained Z Table.If both found same then no inspection lot will be generated.
    But an error message (Change the inspection stock of material XXXXXX in QM only) appears for all those material while doing confirmation in CO11N . Hence system does not allow to complete confirmation for those material where QM is active.
    Please suggest if i am using the correct Exit or any further improvement is required.
    Thanks and regards
    D Mohanty

    Hi
    Actually the issue is resolved now.The problem was with coding where we were using Table-AFRU for reading prod order details.But AFRU does not consider fresh orders for which it was replaced with AFKO.
    Also the Z table must be maintained as Plant-Material-Work center combination prior to go for any order confirmation.
    Thank you all who have gone through the post , hope this will help those who have to map the same scenario at their end.
    Regards
    D Mohanty

  • Systems are not visible in SM Work Centers

    Hi,
    I am facing strange problems in the Solution Manager Work Centers.
    I have connected some managed systems to the Solution Manager, their data can be displayed normally in SMSY, SLD, solution_manager, ccmsping availabilty in RZ20....
    But when I go to the workcenters, there are no systems listed (tabs like System Landscape Management, System Monitoring). What is strange
    - I can see CCMSPING statuses in the top of the screen (red/green/gray icons with numbers of systems) but I cannot see the list of systems.
    - RCA tab is correct, but this is special configuration in my opinion, so not related to my issue.
    I suppose this is somehow related to the queries but I haven't been able to find a solution.
    I checked filters, but with no success.
    I have full authorizations (sap_all, SMWORK roles).
    Version of system: SM 7.01 / SPS 28, managed systems ERP6 or NW7.3
    Thanks a lot for advice!
    Vasek

    Hi Jansi,
    I have checked solman_setup, everything seems to be fine. I assigned to my user sap_all and all SMWORK roles, so there shouldn't be any authorization issue.
    What is strange, I can see the list of systems in some filters, when I open Favourites management popup windows or for example on the Downtime management tab. But System Management shows only availability icons with correct numbers, all other data are empty (All Systems (0) ABAP Systems (0)Java Systems (0)Favorites (0))...
    Why?
    Vasek

  • How to have Dynamic Columns based on Work centers in CRHD table?

    i need to create dynamic internal table......based on the number of entries(work centers ) in CRHD table....this is number of work centers...like how many manufac unit....How to have the work center names at heading and how to fill values at rows...as the number of workcenters may differ dynamic.....how to fill the values...for a dynamic internal table

    Hi Meena,
    For Dynamic display  ,go through it
    REPORT  yusmm_text1  NO STANDARD PAGE HEADING
                         LINE-SIZE 199.
    T A B L E S
    TABLES: MARA,
            MAKT,
            THEAD.
    GLOBAL TYPE-POOLS
    TYPE-POOLS : SLIS.
       GLOBAL TYPES
    TYPES : BEGIN OF TP_FINAL,
           MATNR TYPE MARA-MATNR,
           BEGRU TYPE MARA-BEGRU,
           MTART TYPE MARA-MTART,
           MAKTX TYPE MAKT-MAKTX,
           SPRAS TYPE MAKT-SPRAS,
           LTXT(2000)  TYPE C ,
           SRNO TYPE N ,
          END OF TP_FINAL.
    TYPES : BEGIN OF TP_T002,
            SPRAS TYPE T002-SPRAS,
            LAISO TYPE T002-LAISO,
            SRNO TYPE N ,
            END OF TP_T002.
    TYPES : BEGIN OF TP_MARA_MAKT,
            MATNR TYPE MARA-MATNR,
            BEGRU TYPE MARA-BEGRU,
            MTART TYPE MARA-MTART,
            SPRAS TYPE MAKT-SPRAS,
            MAKTX TYPE MAKT-MAKTX,
           END OF TP_MARA_MAKT.
    Types: BEGIN OF tp_matnr,
           matnr TYPE mara-matnr,
           END OF tp_matnr.
       GLOBAL ELEMENTARY VARIABLES
    DATA : gv_date TYPE sy-datum.
    DATA : gv_repid TYPE sy-repid.
    DATA : g_var1(10) TYPE C.
    DATA : gv_index TYPE sy-tabix.
    DATA: gv_strg TYPE string,
          gv_strg1(2000) TYPE C.
    DATA : gv_lang TYPE sy-langu.
    DATA : g_v(3) TYPE N .
    DATA : gv_lines(3) TYPE N .
    DATA : gv_var(3) TYPE N .
    DATA : gv_var1(3) TYPE N.
    DATA: gv_str TYPE STRING.
    DATA: gv_str1 TYPE STRING.
    DATA : gv_li TYPE I,
           gv_lit TYPE I,
           gv_lin TYPE I.
    DATA: g_var11(3) TYPE N,
          gv_li1(3) TYPE N,
          g_var2(3) TYPE N.
    DATA : gv_i1 TYPE I.
    DATA : gv_i TYPE I.
    DATA: gl_lenght TYPE I.
       GLOBAL STRUCTURES
    DATA:   T_NEWTABLE TYPE REF TO DATA,
            T_NEWLINE  TYPE REF TO DATA,
            T_FLDCAT1   TYPE SLIS_T_FIELDCAT_ALV,
            T_FLDCAT   TYPE LVC_T_FCAT,
            WA_IT_FLDCAT TYPE LVC_S_FCAT,
            WA_IT_FLDCAT1 TYPE SLIS_FIELDCAT_ALV,
            WA_COLNO(2) TYPE N,
            WA_FLNAME(5) TYPE C,
            L_LT TYPE SLIS_LAYOUT_ALV.
       GLOBAL INTERNAL TABLES (WITH INCLUDE STRUCTURE)
    DATA : IG_MARA_MAKT TYPE STANDARD TABLE OF TP_MARA_MAKT,
           WG_MARA_MAKT TYPE TP_MARA_MAKT.
    DATA : IG_T002 TYPE STANDARD TABLE OF TP_T002,
           WG_T002 TYPE TP_T002.
    DATA : IG_FINAL TYPE STANDARD TABLE OF TP_FINAL,
           WG_FINAL TYPE TP_FINAL.
    data : IG_MATNR TYPE STANDARD TABLE OF TP_MATNR WITH HEADER  LINE,
           WG_MATNR TYPE TP_MATNR.
    DATA:BEGIN OF IG_THEAD OCCURS 0.
            INCLUDE STRUCTURE THEAD .
    DATA: END OF IG_THEAD.
    DATA:BEGIN OF IG_TLINE OCCURS 0.
            INCLUDE STRUCTURE TLINE  .
    DATA:END OF IG_TLINE.
    FIELD-SYMBOLS
    FIELD-SYMBOLS: <T_DYNTABLE> TYPE STANDARD TABLE,"Dynamic internal
                                                            "tablename
                   <FS_DYNTABLE>,  "Field symbol to create work area
                  <FS_FLDVAL> TYPE ANY.   " Field symbol to assign values
    COMPULSORY
    FIELD-SYMBOLS: <FS_DATA> TYPE REF TO DATA,
                   <FS_DATA1> TYPE REF TO DATA,
                   <FS_2>    TYPE STANDARD TABLE,
                   <FS_22>   TYPE STANDARD TABLE,
                   <FS_1>,
                   <FS_11>,
                   <F>,
                   <FA>,
                   <LWA_LINE_WA>,
                   <LWA_LINE_WA1>.
    ------- Create Dyn Table From FC
    DATA: LT_DATA        TYPE   REF TO DATA,
          LT_DATA1        TYPE   REF TO DATA,
          LWA_LINE       TYPE   REF TO  DATA,
          LWA_LINE1       TYPE   REF TO  DATA,
          LI_FIELD_CAT   TYPE   LVC_T_FCAT,
          LWA_FIELD_CAT  TYPE   LVC_S_FCAT.
       PARAMETERS & SELECT-OPTIONS
    SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS : S_SPRAS FOR MAKT-SPRAS NO INTERVALS  DEFAULT 'EN'
                                                            OBLIGATORY ,
                     S_MATNR FOR MARA-MATNR,
                     S_MTART FOR MARA-MTART.
    PARAMETERS: GP_SIZE TYPE I DEFAULT '200'.
    SELECTION-SCREEN : END OF BLOCK B1.
       INITIALIZATION
    INITIALIZATION.
      gv_repid = sy-repid.
      gv_date = sy-datum.
    AT SELECTION-SCREEN
    AT SELECTION-SCREEN.
      IF GP_SIZE < 0.
       MESSAGE E002(00).
      ENDIF.
      IF GP_SIZE > 50000.
       MESSAGE W130(26) WITH TEXT-004.
        SET CURSOR FIELD 'gp_size'.
      ENDIF.
    START-OF-SELECTION
    START-OF-SELECTION.
      PERFORM FIELDCAT.
      PERFORM LAYOUT.
      PERFORM DATA_FETCH.
      PERFORM READ_DATA_TO_FINAL.
      SORT ig_final BY matnr spras.
      gv_lin = gv_li.
      gv_li = gv_li - 2.
      LOOP AT ig_final INTO wg_final.
        ASSIGN COMPONENT 1 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
        <FA> = 'Material Number'.
        ASSIGN COMPONENT 2 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
        <FA> = 'Authorization Group'.
        g_VAR11 = wg_final-srno + 2.
        gv_li1 = gv_li1 + 2.
        MOVE : g_var11 TO gv_i1.
        ASSIGN COMPONENT g_var11 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
        <FA> = 'MatDesc'.
        g_var2 = g_var11 + gv_lines.
        ASSIGN COMPONENT g_var2 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
        <FA> = 'BasicData'.
        APPEND <LWA_LINE_WA1> TO <FS_22>.
        EXIT.
       ENDLOOP.
      LOOP AT ig_final INTO wg_final.
        AT NEW matnr.
          gv_index = sy-tabix.
          ASSIGN COMPONENT 1 OF STRUCTURE <LWA_LINE_WA> TO <F>.
          <F> = wg_final-matnr.
          ENDAT.
        AT NEW MATNR.
        GV_INDEX = SY-TABIX.
        ASSIGN COMPONENT 1 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
        <FA> = wg_final-matnr.
         ENDAT.
        ASSIGN COMPONENT 2 OF STRUCTURE <LWA_LINE_WA> TO <F>.
        <F> = wg_final-begru.
        ASSIGN COMPONENT 2 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
        <FA> = wg_final-begru.
        gv_var = wg_final-srno + 2.
        gv_li = gv_li + 2.
        MOVE : gv_var TO gv_i.
        ASSIGN COMPONENT gv_var OF STRUCTURE <LWA_LINE_WA> TO <F>.
        <F> = wg_final-maktx.
        ASSIGN COMPONENT gv_var OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
        <FA> = wg_final-maktx.
        gv_var1 = gv_var + gv_lines  .
        ASSIGN COMPONENT gv_var1 OF STRUCTURE <LWA_LINE_WA> TO <F>.
       <F> = wg_final-ltxt.
        ASSIGN COMPONENT gv_var1 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
        <FA> = wg_final-ltxt.
        AT END OF matnr.
          APPEND <LWA_LINE_WA> TO <FS_2>.
          CLEAR <LWA_LINE_WA>.
        ENDAT.
        AT END OF matnr.
         APPEND <LWA_LINE_WA1> TO <FS_22>.
         CLEAR <LWA_LINE_WA1>.
        ENDAT.
      ENDLOOP.
      PERFORM display..
    *&      Form  data_fetch
          text
    -->  p1        text
    <--  p2        text
    FORM DATA_FETCH .
      SELECT matnr
              from mara up to gp_size rows
             appending corresponding fields of table ig_matnr
             where matnr in s_matnr
             and mtart in s_mtart.
    loop at ig_matnr.
      SELECT  MARA~MATNR
              MARA~BEGRU
              MARA~MTART
              MAKT~SPRAS
              MAKT~MAKTX FROM MARA INNER JOIN MAKT
        ON MARAMATNR = MAKTMATNR
       appending corresponding fields of TABLE ig_mara_makt  UP TO GP_SIZE
    ROWS
        WHERE makt~spras IN s_spras
        AND   mara~matnr IN s_matnr
        AND   mara~mtart IN s_mtart
        AND   mara~matnr EQ ig_matnr-matnr.
        endloop.
      IF sy-subrc = 0.
        SORT ig_mara_makt.
      ENDIF.
    ENDFORM.                    " data_fetch
    *&      Form  read_data_to_final
          text
    -->  p1        text
    <--  p2        text
    FORM READ_DATA_TO_FINAL .
      LOOP AT ig_mara_makt INTO wg_mara_makt .
        wg_final-MATNR = wg_mara_makt-MATNR.
        wg_final-BEGRU = wg_mara_makt-BEGRU.
        wg_final-MTART = wg_mara_makt-MTART.
        wg_final-SPRAS = wg_mara_makt-SPRAS.
        wg_final-MAKTX = wg_mara_makt-MAKTX.
        READ TABLE ig_t002 INTO wg_t002 WITH KEY spras = wg_final-spras.
        IF sy-subrc = 0.
          wg_final-srno = wg_t002-srno.
        ENDIF.
        CLEAR ig_thead[].
        ig_thead-TDOBJECT = 'MATERIAL'.
        ig_thead-TDNAME   = wg_final-matnr.
        ig_thead-TDID     = 'GRUN'.
        ig_thead-TDSPRAS  = wg_final-spras.
        CALL FUNCTION 'TEXT_READ'
          EXPORTING
            I_HEADER   = IG_THEAD
            I_READONLY = 'X'
          IMPORTING
            E_HEADER   = IG_THEAD
          TABLES
            T_LINES    = IG_TLINE[]
          EXCEPTIONS
            NOTFOUND   = 1.
        IF sy-subrc  EQ 0.
          LOOP AT  ig_tline.
            gv_strg = ig_tline-tdline.
            IF gv_strg1 <> ' '.
              CONCATENATE gv_strg1 ';' gv_strg INTO gv_strg1.
            ELSE.
              gv_strg1 = gv_strg.
            ENDIF.
          ENDLOOP.
          wg_final-ltxt = gv_strg1.
          APPEND wg_final TO ig_final.
          CLEAR wg_final.
          gv_strg1 = ' '.
        ELSE.
          APPEND wg_final TO  ig_final.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " read_data_to_final
    " read_data_to_final
    *&      Form  layout
          text
    -->  p1        text
    <--  p2        text
    FORM LAYOUT .
      CLEAR L_LT.
      L_LT-ZEBRA = 'X'.
      L_LT-COLWIDTH_OPTIMIZE = 'X'.
      L_LT-WINDOW_TITLEBAR = 'MATERIAL DETAILS'.
    ENDFORM.                    " layout
    *&      Form  fieldcat
          text
    -->  p1        text
    <--  p2        text
    FORM FIELDCAT .
      SELECT SPRAS
               LAISO FROM t002 INTO  CORRESPONDING FIELDS OF TABLE ig_t002
          WHERE spras IN s_spras.
      DESCRIBE TABLE ig_t002 LINES gv_lines.
      LOOP AT ig_t002 INTO wg_t002.
        g_v = g_v + 1.
        Wg_t002-srno = g_v.
        MODIFY ig_t002 FROM wg_t002 TRANSPORTING SRNO.
      ENDLOOP.
      LOOP AT ig_t002 INTO wg_t002.
        CLEAR WA_IT_FLDCAT.
        MOVE SY-INDEX TO WA_COLNO.
        CONCATENATE 'MD-' wg_t002-LAISO
                          WA_COLNO
                         INTO WA_FLNAME.
        WA_IT_FLDCAT-FIELDNAME = WA_FLNAME.
        WA_IT_FLDCAT-DATATYPE = 'CHAR'.
        WA_IT_FLDCAT-SELTEXT = WA_FLNAME.
        WA_IT_FLDCAT-INTLEN = 250.
        WA_IT_FLDCAT-TABNAME = '<FS_2>'.
        APPEND WA_IT_FLDCAT TO T_FLDCAT.
        CLEAR wg_t002.
        ENDLOOP.
      LOOP AT ig_t002 INTO wg_t002.
        CLEAR WA_IT_FLDCAT.
        MOVE SY-INDEX TO WA_COLNO.
        CONCATENATE 'BD-' wg_t002-LAISO
                           WA_COLNO
                        INTO WA_FLNAME.
        WA_IT_FLDCAT-FIELDNAME = WA_FLNAME.
        WA_IT_FLDCAT-DATATYPE = 'CHAR'.
        WA_IT_FLDCAT-SELTEXT = WA_FLNAME.
        WA_IT_FLDCAT-INTLEN = 250.
        WA_IT_FLDCAT-TABNAME = '<FS_2>'.
        APPEND WA_IT_FLDCAT TO T_FLDCAT.
        CLEAR wg_t002.
        ENDLOOP.
      MOVE 'MATNR' TO WA_FLNAME.
      WA_IT_FLDCAT-FIELDNAME = WA_FLNAME.
      WA_IT_FLDCAT-DATATYPE = 'CHAR'.
      WA_IT_FLDCAT-SELTEXT = 'Material No'.
      WA_IT_FLDCAT-INTLEN = 18.
      WA_IT_FLDCAT-TABNAME = '<FS_2>'.
      INSERT WA_IT_FLDCAT INTO T_FLDCAT INDEX 1.
      MOVE 'BEGRU' TO WA_FLNAME.
      WA_IT_FLDCAT-FIELDNAME = WA_FLNAME.
      WA_IT_FLDCAT-DATATYPE = 'CHAR'.
      WA_IT_FLDCAT-SELTEXT = 'Authorization Group'.
      WA_IT_FLDCAT-INTLEN = 4.
      WA_IT_FLDCAT-TABNAME = '<FS_2>'.
      INSERT WA_IT_FLDCAT INTO T_FLDCAT INDEX 2.
      DESCRIBE TABLE T_FLDCAT LINES gv_li.
      ASSIGN LT_DATA TO <FS_DATA>.
    Creating the Dynamic Internal Table
      CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
        EXPORTING
          IT_FIELDCATALOG           = T_FLDCAT         " Fieldcatalogue
        IMPORTING
          EP_TABLE                  = <FS_DATA>   " Dynamic Internal Table
        EXCEPTIONS
          GENERATE_SUBPOOL_DIR_FULL = 1
          OTHERS                    = 2.
    Assign Dyn Table To Field Sumbol
      ASSIGN <FS_DATA>->* TO <FS_1>.
    Assigning the Internal Table TYPE ANY to Standard internal Table
      ASSIGN <FS_1> TO <FS_2>.
    Creating a Workarea
      CREATE DATA LWA_LINE LIKE LINE OF <FS_2> .
    Assigning the Content to the workares as a Pointer
      ASSIGN LWA_LINE->* TO <LWA_LINE_WA>.
      LOOP AT T_FLDCAT INTO WA_IT_FLDCAT.
        WA_IT_FLDCAT1-FIELDNAME = WA_IT_FLDCAT-FIELDNAME.
        WA_IT_FLDCAT1-TABNAME =  WA_IT_FLDCAT-TABNAME.
        WA_IT_FLDCAT1-SELTEXT_L = WA_IT_FLDCAT-SELTEXT.
       WA_IT_FLDCAT1-REF_TABNAME = 'MARC'.
        APPEND WA_IT_FLDCAT1 TO T_FLDCAT1.
        CLEAR : WA_IT_FLDCAT,WA_IT_FLDCAT1.
      ENDLOOP.
      ASSIGN LT_DATA1 TO <FS_DATA1>.
      CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
        EXPORTING
          IT_FIELDCATALOG           = T_FLDCAT         " Fieldcatalogue
        IMPORTING
          EP_TABLE                  = <FS_DATA1>  " Dynamic Internal table
        EXCEPTIONS
          GENERATE_SUBPOOL_DIR_FULL = 1
          OTHERS                    = 2.
    Assign Dyn Table To Field Sumbol
      ASSIGN <FS_DATA1>->* TO <FS_11>.
    Assigning the Internal Table TYPE ANY to Standard internal Table
      ASSIGN <FS_11> TO <FS_22>.
    Creating a Workarea
      CREATE DATA LWA_LINE1 LIKE LINE OF <FS_22> .
    Assigning the Content to the workares as a Pointer
      ASSIGN LWA_LINE1->* TO <LWA_LINE_WA1>.
    ENDFORM.                    " fieldcat
    *&      Form  show
          text
    -->  p1        text
    <--  p2        text
    FORM Display .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
       I_INTERFACE_CHECK                 = ' '
       I_BYPASSING_BUFFER                = ' '
       I_BUFFER_ACTIVE                   = ' '
         I_CALLBACK_PROGRAM                = GV_REPID
        I_CALLBACK_PF_STATUS_SET          = 'PF_STATUS_SET'
        I_CALLBACK_USER_COMMAND           = 'USER_COMMAND'
       I_CALLBACK_TOP_OF_PAGE            = ' '
       I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
       I_CALLBACK_HTML_END_OF_LIST       = ' '
       I_STRUCTURE_NAME                  =
       I_BACKGROUND_ID                   = ' '
       I_GRID_TITLE                      =
       I_GRID_SETTINGS                   =
        IS_LAYOUT                         = L_LT
         IT_FIELDCAT                       = T_FLDCAT1[]
       IT_EXCLUDING                      =
       IT_SPECIAL_GROUPS                 =
       IT_SORT                           =
       IT_FILTER                         =
       IS_SEL_HIDE                       =
       I_DEFAULT                         = 'X'
       I_SAVE                            = ' '
       IS_VARIANT                        =
       IT_EVENTS                         =
       IT_EVENT_EXIT                     =
       IS_PRINT                          =
       IS_REPREP_ID                      =
       I_SCREEN_START_COLUMN             = 0
       I_SCREEN_START_LINE               = 0
       I_SCREEN_END_COLUMN               = 0
       I_SCREEN_END_LINE                 = 0
       I_HTML_HEIGHT_TOP                 = 0
       I_HTML_HEIGHT_END                 = 0
       IT_ALV_GRAPHICS                   =
       IT_HYPERLINK                      =
       IT_ADD_FIELDCAT                   =
       IT_EXCEPT_QINFO                   =
       IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
       E_EXIT_CAUSED_BY_CALLER           =
       ES_EXIT_CAUSED_BY_USER            =
        TABLES
          T_OUTTAB                          = <FS_2>
    EXCEPTIONS
       PROGRAM_ERROR                     = 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.
    ENDFORM.                    " display
    FORM PF_STATUS_SET USING RS_EXTAB TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'DISPLAY' .
    ENDFORM. "PF_STATUS_SET
    *& Form Name: user_command *
    *& Form Desc: For Handling USER_COMMAND *
    FORM USER_COMMAND USING IF_UCOMM TYPE SY-UCOMM
                         IS_SELFIELD TYPE SLIS_SELFIELD.
      CASE IF_UCOMM.
        WHEN 'DOWNLOAD'.
          CALL FUNCTION 'POPUP_TO_CONFIRM'
            EXPORTING
      TITLEBAR                    = ' '
      DIAGNOSE_OBJECT             = ' '
              TEXT_QUESTION               = 'Data download to excel'
      TEXT_BUTTON_1               = 'Ja'(001)
      ICON_BUTTON_1               = ' '
      TEXT_BUTTON_2               = 'Nein'(002)
      ICON_BUTTON_2               = ' '
      DEFAULT_BUTTON              = '1'
      DISPLAY_CANCEL_BUTTON       = 'X'
      USERDEFINED_F1_HELP         = ' '
      START_COLUMN                = 25
      START_ROW                   = 6
      POPUP_TYPE                  =
    IMPORTING
      ANSWER                      =
    TABLES
      PARAMETER                   =
    EXCEPTIONS
      TEXT_NOT_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.
          CALL FUNCTION 'GUI_DOWNLOAD'
            EXPORTING
        BIN_FILESIZE                  =
              FILENAME                     = 'C:\Material-Text.xls'
             FILETYPE                      = 'ASC'
        APPEND                        = ' '
         WRITE_FIELD_SEPARATOR         = 'X'
        HEADER                        = '00'
         TRUNC_TRAILING_BLANKS         = 'X'
        WRITE_LF                      = 'X'
        COL_SELECT                    = ' '
        COL_SELECT_MASK               = ' '
         DAT_MODE                      = 'X'
       IMPORTING
         FILELENGTH                    = GL_LENGHT
            TABLES
              DATA_TAB                      = <FS_22>
      EXCEPTIONS
        FILE_WRITE_ERROR              = 1
        NO_BATCH                      = 2
        GUI_REFUSE_FILETRANSFER       = 3
        INVALID_TYPE                  = 4
        NO_AUTHORITY                  = 5
        UNKNOWN_ERROR                 = 6
        HEADER_NOT_ALLOWED            = 7
        SEPARATOR_NOT_ALLOWED         = 8
        FILESIZE_NOT_ALLOWED          = 9
        HEADER_TOO_LONG               = 10
        DP_ERROR_CREATE               = 11
        DP_ERROR_SEND                 = 12
        DP_ERROR_WRITE                = 13
        UNKNOWN_DP_ERROR              = 14
        ACCESS_DENIED                 = 15
        DP_OUT_OF_MEMORY              = 16
        DISK_FULL                     = 17
        DP_TIMEOUT                    = 18
        FILE_NOT_FOUND                = 19
        DATAPROVIDER_EXCEPTION        = 20
        CONTROL_FLUSH_ERROR           = 21
        OTHERS                        = 22
          IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
          IF GL_LENGHT NE 0.
            MESSAGE S398(00) WITH 'DATA downloaded to EXCEL'.
          ENDIF.
      ENDCASE.
    ENDFORM.                    "user_command
    Thanks
    Ankur SHarma

  • Custom work centers are not visible in the production tenant UI after solution is deployed

    Hi Experts,
    We have deployed the solution into the production tenant. The solution is deployed successfully. But the custom business option(BAC) element which we have created is not part of proejct scoping.
    We have created a new change project in production and added the custom business option to the project.
    Under this custom business option we have fine tuning activity which is having all the custom configurable code lists.
    All these configurable code list are not visible as views. these are already assigned to WCF of one of our custom BO under asssinged objects.
    These configurable code lists are displaying like below.
    Because of this i am not able to close this fine tuning activity and i am not able merge the change project into Main project.
    Once after merging the change project into main project, I came to know the all the custom work centers will be visible. I am correct here?
    Can anybody know how to resolve this issue. Please let us know..!
    Thanks,
    Mani

    Hi Mani,
    this issue sometimes occurs. Please create an incident as soon as possible. Sometimes the BCSets / BCViews need to be regenerated in the backend. Support can correct this. Mention that you did this using the SAP Cloud Applications Studio.
    In general please ask such question here: SAP Cloud Applications Studio
    Cheers,
    Jens

  • HR assignment for work centers using IR02

    Hello everybody,
           Need some technical help from all regarding issue mentioned below:
    I need to do HR assignments to work centers.
    Is there any function module available which does HR assignments to work centers.
    There's one which I found : COI2_WORKCENTER_HR_ASSIGNMENT, but I'm not able to understand the parameters we need to pass on to this FM.
    Please help me if anybody has used this FM.
    Also alternatively if any other FM is available plz. let me know.
    Help will be highly appreciated.
    Regards,
    Kavita

    Hi kavita,
    plz check the FM   "COI2_PERSON_RANKING".it uses the FM "COI2_WORKCENTER_HR_ASSIGNMENT" inside it..check the same.
    Regards,
    Nagaraj

  • COOIS report: not able to select operations based on work centers

    Hi All,
    When accessing the COOIS report using operation listv& selecting the std profile.I need to get the operation perfomred on specific work center.
    I enter the work center & plant code in the selection fields available in the "select at operarion level" & i get the all the work center.
    Need to get list of operation performed at the entered work center.
    The requirement is due to the reason that a order is performed in two or three production facilities & production guys needs to look at operation list for given work centers.
    Regards
    Vineet

    Hi,
    This one of the options we had explored, but it would be better if we can get  the report by work center. The focus is to reduce the effort to get the report as there is need to get the same report for atleasr 8to 10 different group of work centers ( which are not in serial nos).
    We would then need to put the work centers in the filters & save the layout.
    Regards
    Vineet

  • Shift patterns for work centers

    Hi,
    I have question regarding shift patterns for work centers. We are actually utilizing the work centres in a aftermarket setup (service jobs). What we would like to do is to add shift patters to the work centers which look similar to this:
    Mo-Su 07:00-19:00, Mo-Su 19:00-07:00     4days on/4 days off/4 days on/4days off. As you see we would like it to be a rolling schedule so the first 4 working days the day shift, then 4 days off, then the next working days the night shift and so on.
    Is there a way of simplyfying this setup? The length of the cycle can only be set to a maximum of 7 days meaning I can not create a rolling schedule in a simple way. I do know that I can manually add intervals with say a seven day cycle and defining the working hours and additional create shift for holding predefined working hours and breaks.
    I have looked at shift sequences but that doesn't seem to be helpful in this scenario? The sequence seems only to be used as a sequence on a daily basis. 
    If anyone has solution for this or if you have any thought on how to process I would be very thankful if you shared these.
    Thanks in advance
    Edited by: Karimi on Aug 12, 2008 1:13 PM

    In T.code : SHR0 (zero) Shift Report overview.
    Enter Report Type and Usage as workcentre, please do the this customazation then you find workcentres in F4.
    http://help.sap.com/erp2005_ehp_03/helpdata/en/45/c9ba093c512e96e10000000a155369/frameset.htm
    Please read the information from above link this should help.
    Jim

  • Know hows about work centers

    Hello PS-, and hopefully HR-specialists
    I have to setup a complex capacity/resource-planning scenario. And I hope I can get some answers from this forum.
    As I'm responsible for groups of persons which belong to more than one plant, I have to setup one work center for every plant. As I want to manage every single person of such groups I have to assign the person, setup in a mini-HR-master data, to the according work center. So far so good.
    Here my to requests.
    1. As I have to manage external resources too, I want to setup them also in the system. So I create a master data for such resources. But they can't be plant specific, as I have to assign them to projects of different plants. How can I setup such a scenario?
    1.1 - and if I want to plan them as a work center, how can I make the project controlling? As I have to create a purchase order once we assigned them to a activity. And how does it work once we have them assigned but not created a PO yet? (How would the hour rate be calculated?)
    2. Does exist a possibility in SAP to have an overview of all these work centers (for internal persons and every plant; hopefully one WC for external persons) on a person level?
    Many thanks for every answer
    Jim

    Hi Jimson,
    Since you have mentioned external resource i assume that the resource is not on the payrolls of your organization. In this case firstly you may have to maintain an HR master for this resource so that you will be able to assign him to work centers etc. in your organization. Once this is done you can then assign this resource to any work center.
    So this external resource has always to invoice to one plant?
    Not necessary. Depends which plant is utilising his services. I would suggest you to refer Resource Related Billing. There are scenarios in Resource related billing wherein you can use the services of external resources, resources form other companies etc and bill them accordingly.
    And how will I be able to post the hours to the project of the external resources? With CAT2?
    Yes. If you wish to use timesheet to capture the efforts of the external resources you have to use CAT2. Again for this you need to have certain things in place from the HR perspective. Discuss with your HR consultant regarding this.
    All in all i would suggest you to try and use Resource Related Billing to meet this requirement. I recently did a project wherein i used Resource related billing to manage external resources.
    Regards,
    Gokul

  • Table name for work centers with production or planned orders

    dear gurus,
    can you please help me on what table names have the work centers with planned or production order

    For production Order
    1.AUFNR ---> AFKO ---> AFKO-PLAF
    2.AFKO-PLAF --> AFVC -
    >  for respective VORNR get AFVC-ARBID
    3.AFVC-ARBID --> pass as  OBJID into ---> CRHD --->ARBPL (Work Center)
    For planned orders
    1.PLNUM ---> PLAF ---> PLAF-BEDID
    2.PLAF-BEDID -
    > KBKO ---> PLAF-PLNNR, PLAF-PLNAL
    3.PLAF-PLNNR, PLAF-PLNAL -
    > PLPO -
    > for corresponding VORNR (Operation number) get ARBID pass as OBJID ---> CRHD --> ARBPL (Work Center).
    Regards
    soundar
    Edited by: Soundar on May 29, 2008 9:18 AM

  • Defining CS Work Centers - HR module is not in scope.

    Hi Guys,
    My client is not using HR module so Technician's personal number assignment to work center is not possible.
    So what I have suggested as a work around solution is to create work center with the Technicians Name in the work center description field itself so they know by work center's description which technician is being assigned to a service order.
    Say for example Work Center = ZPTech1 = Allan Miller. What do you guy's think of this solution?
    Another issue is the client have one service department and this department provides different types of services. For example Inhouse repair, Onsite Service etc.
    So they have teams of technicians. One team for Inhouse Repair and another team of technicians for Onsite services. However, there are cases where the technician who belongs to Inhouse repair can also sometimes perform onsite service.
    So, since HR module is not in scope and technician's personnel numbers cannot be used to assign to work centers... hence my suggestion was to create work centers as technicians using their names in description field.
    However, the problem comes when defining hierarchy.
    Say If I create one main work center ZServ = Service Department
    Then under ZPServ, if I create two team work centers as Team1 (for Inhouse Repair Team) and Team2 (Onsite Service Team). Then I assign 3 technician work centers viz., TechA, TechB and TechC to team work center Team1 and work centers TechD, TechE and TechF to Team work center Team2 using heirarchy relationship. I think so far it will be fine.
    However, say TechA works both in Inhouse repairs and also in Onsite Service. Then I need to assign this technician under both team work centers Team1 and Team2 right? But as far as I know, you cannot have two superior work centers for a particular work center.
    So, in this case, what is the best solution?
    Instead of creating team workcenters as Team1 and Team2, shall I just create one main work center for Service Department as ZServ then create individual workcenters for each technician? without having a heirarchy structure?
    Or say for example if Team1 has cost center 1000 and team2 has cost center 2000, then shall I create two workcenters for the same technician TechA with description as TechA-1000 and TechA-2000. (Then if I have two different workcenters for same technician, with his name and costcenter in the description field then i can assign each workcenter under team1 and team2.
    Sorry for the lengthy message... However, I needed to explain the scenario and limitations properly in order to give you a full picture so as to get correct and best suggestions and advice.
    Thank you very much for your time and I would really appreciate your inputs.
    Best regards,
    AR

    Hi Suresh,
    Answer to first part of your question is: Yes, we are considering employees as vendors and configuring it under Employees (ZEMP) Vendor Account Group.
    As you have suggested about Internal Order for employees, somebody else had suggested me with the same.
    But I was not convinced why I should go ahead and define internal order for each employees under the Internal Order Type: Employees.
    Now could you help me in understanding as to why Internal Orders for each employee, I mean could you tell me the logic behind this, so that I would be in a position to answer if someone asks me.
    If there is anymore information / documentation, could you plz forward the same to my mail id, which is: [email protected]
    Thank you for your time in replying.
    Regards
    Sandhya kiran.

  • To split an operation quantity in a single production order into different work centers.

    Detailed Process:
       Our client have 17 factories. Inside each factory there are 15-20 Sewing lines (Work Centers). In each line 15-20 machines (individual capacities) are there. The standard manufacturing scenario practiced here is MTO. Merchandisers create sales order and allot it to a particular plant. Now line level planning happens inside the factory. Based on the order delivery date to meet the requirements they split the production order and allot it to several sewing lines (work centers).  In SAP we can have work around solution to partially convert planned order to production order and allot it to particular line. The challenge here is to have same production order number which can be allotted to several sewing lines with a mandatory option to enter the quantity for each sewing line
    We have proposed alternative and multiple routing for converting planned order into number of production orders but the solution was not meeting their requirements.
    Please provide your valuable opinions on this issue.

    Hi,
    Please explore the option of using the concept called Parallel sequence in routing...
    Check the below thread...
    parallel sequence in Routing
    Routing - Parallel Sequence
    Hope this helps
    Thanks
    Kumar

  • Altenate work centers in production order

    Hi, we have 2 different work cneters and any one work center can be selected in the prod order when we process. please advise how to create a routing that will allow to enter 2 work centers for one operation (alternate to each other) so that when we craete order any one can be selected by the opeartor. please advise.

    Hi,
    In CA02 branch to the sequence view and create an alternative sequence, attach the sequence to the main sequence strating and ending at the operation you mentioned.  Enter one work center to the operation in main sequence, second work center in the alternative sequence. Users may confirm based on the situation by entering the sequence number and operation in confirmation.
    Regards.

  • Work centers in SAP Solution Manager

    Hi!
    I have patched my SOLMAN 4.0 to SP 15 and have configured the Work Center functionality.
    I have assigned the first Work Center Z_SAP_SMWORK_SETUP, it works.
    Now I would like to use the System Monitoring functionality and use this Work Center.
    The appropriate role therefor is SAP_SMWORK_SYS_MON.
    Unfortunately this role does not contain any profile or objects.
    Can some one tell me which objects do I need to add to this role in order to use the Work Center System Monitoring?
    Thank you very much!
    regards
    Thom

    Hi Thom,
    Most Work Center Roles are delivered without assigned roles.
    The Work Centers are using the standard roles of SAP Solution Manager
    Please see the updated [Security Guide SAP Solution Manager 4.0|http://service.sap.com/~form/sapnet?_SHORTKEY=01100035870000673252&_SCENARIO=01100035870000000112&_OBJECT=011000358700007187872005E] on page 24 for an overview of relevant roles on Solution Monitoring.
    Best regards,
    Ruediger

  • How can I use capacity splits in Machines "001" using PS work centers ?

    Hello Experts
    I want to manage capacity splits for machines in PS using work centers.
    I create work center CNR1 "Capacity Category 001 <Machine>", maintain the capacity header and maintain the rest of the work center as usual.
    If I create a pooled capacity CR11, I can only assign one pooled capacity for a work center. however I added 3 individual capacities in the capacity header.
    when I create an internal activity and assign the work center, work, activity type and number of individual capacities, I go to "Personnel Assignment" tab. I find the capacity category "001" Machine, and the fields down there are capacities not persons.
    I try to open the possible values for the field "Capacity" and no values found.
    Even the pooled capacity I assigned does not appear in F4.
    How can I assign multiple capacities to a work center so that I can choose between them in the capacity split tab "Person assignment" in an internal activity in PS???
    FYI: everything else in the internal activity is working perfectly fine, even personnel assignment. But we haven't activated personnel availability management in HR module.
    Please help
    Regards
    A.Kholy

    Hi Ahmed,
    You can achieve this by using creating individual capacity for category type.
    Steps:-
    1.Go to Cr02 define capacity category 001 .
    2.Now double click on capacity category it will open its header details.
    3.Now assign individual capacity this will appear in project. as shown
    5.In project u can assign same in capacity.
    Reward if helpfull.
    Thanks
    Suraj Prakash

Maybe you are looking for

  • Installing Adobe Photoshop Elements 11 from DVD on iMac

    Hi, When I put the installation DVD into the DVD slot of my Mac it is doing something for a while, and then the DVD is coming out again without any installation. DVD drive is OK, checked with other DVDs. Operating system is OS X 10.9.5 (Mavericks). A

  • I have a MSI K9A2 Platinum Motherboard. Bios version 1.8 overclocking

    I have a MSI K9A2 Platinum Motherboard. Bios version 1.8 AMD Phenom II X4 940 3.0 GHZ that I have over clocked to (17.5) 3.4Ghz However anytime I go over that to say multiplyer set to 18 (3.5 ghz) it still runs but crashes when running high end games

  • BIOS L755-Beware of Toshiba Fix

    I received an automatic update (below) from Toshiba, and when I accepted it, it killed my computer.  Now, when turned on, it whirs and whirs, but nothing comes up on the screen.  Spoke to Tech Support, and was told the laptop will have to be sent in

  • Regarding encryption help

    Hi all, In 10g database below encryption is working but i need to implement the same logic in oracle 9i database. Can anybody help me on this. declare userstr varchar2 (100) := 'date=' || to_char(sysdate,'YYYYMMDD') ||'&'|| 'userid='||'ppacobqi%5e%5e

  • Project system extractors in BI

    hi, We are trying to generate reports in BI, based on 'Statistical Key-Figures' in Project Systems. These Stat KF's are coming from Network activity level from PS in ERP. (CJ20N, KB33N) The fields are : StatKF (STAGR) SKF Rate (SKFRATE) Doc. Date (BL