sábado, 18 de enero de 2014

Read structures and get the sales manager (leer la estructura y obtener el jefe de ventas)

For example, i need to get my sales manager of the organizational structure. The function is this
  CALL FUNCTION 'RH_STRUC_GET'
    EXPORTING
      act_otype      = 'BP'
      act_objid      = partner_no #enter de Partner number
      act_wegid      = 'BP-CP-O'  #we indicate that we want to get
      act_tdepth     = 0
    TABLES
      result_tab     = lt_result #here the result
    EXCEPTIONS
      no_plvar_found = 1
      no_entry_found = 2
      OTHERS         = 3.