Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Creating new position

Hello All,

Is there a function module available that creates a new position in an organization?

I would appreciate your responses.

~Mark

Tags:
replied

just couldn't give up Mark.. pl use the following..

report  zinc1.

data: w_objid type hrobjid,
      w_sobid type sobid value '01002533'.

call function 'RH_OBJECT_CREATE'
  exporting
    plvar               = '01'
    otype               = 'S'
    stext               = 'TEST'
    begda               = sy-datum
    endda               = '99991231'
  importing
    objid               = w_objid
  exceptions
    text_required       = 1
    invalid_otype       = 2
    invalid_date        = 3
    error_during_insert = 4
    error_ext_number    = 5
    undefined           = 6
    others              = 7.
if sy-subrc eq 0.
  call function 'RH_RELATION_MAINTAIN'
    exporting
      act_fcode           = 'INSE'
      act_plvar           = '01'
      act_otype           = 'S'
      act_objid           = w_objid
      act_rsign           = 'A'
      act_relat           = '003'
      act_sclas           = 'O'  "Obj Type of Orgn Unit
      act_sobid           = w_sobid
    exceptions
      maintainance_failed = 01.

  if sy-subrc = 0.
* relationship mainatined
    write:/ 'Position:', w_objid, 'was created under Org Unit:', w_sobid.
  else.
* relationship wasn't created.
  endif.
else.
* position not created
endif.

Regards,

Suresh Datti

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question