SlideShare a Scribd company logo
1 of 16
   call function 'RHPA_APPRAISORS_APP_READ'  &quot; 직번을 가지고  BA 를 구함 . *   EXPORTING *     BEGDA               = '19000101' *     ENDDA               = SY-DATUM *     WITH_STEXT          = 'X' *     WITH_ADD_INFO       = 'X'     tables       appraisors          = p_appraisors       appraisals          = p_appraisals *   EXCEPTIONS *     NO_AUTHORITY        = 1 *     UNDEFINED           = 2 *     OTHERS              = 3             .   if sy-subrc <> 0. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.   endif.   data:         p_appraisors type table of hrsobid,         ls_appraisors type hrsobid,         p_appraisals type table of hrpe_profa,         ls_appraisals type hrpe_profa.   ls_appraisors-plvar = '01'.   ls_appraisors-otype = 'P'.   ls_appraisors-sobid = pernr.   append ls_appraisors to p_appraisors. 직번을 기준으로 자기가 평가자로 속하 모든  BA 문서를 가져온다 . Pernr <=  직번 Otype <= person
     ls_appraisals_1-plvar = ls_appraisors-plvar.     ls_appraisals_1-otype = 'BA'.     ls_appraisals_1-objid = ls_appraisals-tobid.     append ls_appraisals_1 to lt_appraisals_1. “BA 로 피평가자 정보 가져온다 .      call function 'RHPA_APP_APPRAISEES_READ' *   EXPORTING *     MAINTAIN           = ' '       tables         appraisals         = lt_appraisals_1         appraisees         = lt_appraisees *   EXCEPTIONS *     NO_AUTHORITY       = 1 *     UNDEFINED          = 2 *     OTHERS             = 3               .     if sy-subrc <> 0. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.     endif.  BA 로 피평가자 정보 가져온다 .  ls_appraisals_1-objid <=  피평가자 직번
* GET IFT 0000 DATA   call function 'HR_READ_INFOTYPE'        exporting            pernr           = pernr            infty           = c_ift0000            begda           = '19000101'            endda           = '99991231' *      IMPORTING *          SUBRC           = SUBRC        tables            infty_tab       = it_0000        exceptions            infty_not_found = 1            others          = 2.  직번을 기준으로  infotye 에 따른  HR  기본정보를 가져온다 . pernr <=  직번
   move : '01' to tmp_plvar,          item_object to tmp_objid.    &quot; 현재 정보 가져오기 .   call function 'RHPA_APPRAISAL_DISPLAY_READ'     exporting       plvar                = tmp_plvar       objid                = tmp_objid *   BEGDA                = *   ENDDA                = *   READ_DB              = ' ' *   MAINTAIN             = ' '  importing    app_attributes       = get_app_attributes  tables *   APPRAISORS           = *   APPRAISEES           =    appraisal            = lt_appraisal *   APPRAISALS           =  exceptions    no_authority         = 1    nothing_found        = 2    others               = 3             .   if sy-subrc <> 0. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.   endif. BA  문서 번호를 가지고 문서의 모든 정보를 가져온다 . Tmp_objid <=  문서 번호 .
     move : ls_zhrta01-otype to tmp_act_otype,             ls_zhrta01-objid to tmp_act_objid,             'A047' to tmp_act_wegid,             '01' to tmp_act_plvar.     call function 'RH_STRUC_GET'       exporting         act_otype              = tmp_act_otype         act_objid              = tmp_act_objid         act_wegid              = tmp_act_wegid *       ACT_INT_FLAG           =        act_plvar              = tmp_act_plvar *       ACT_BEGDA              = SY-DATUM *       ACT_ENDDA              = SY-DATUM *       ACT_TDEPTH             = 0        act_tflag              = 'X'        act_vflag              = 'X'        authority_check        = 'X' *       TEXT_BUFFER_FILL       = *       BUFFER_MODE            = *     IMPORTING *       ACT_PLVAR              =      tables *       RESULT_TAB             =        result_objec           = lt_result_objec *       RESULT_STRUC           =      exceptions        no_plvar_found         = 1        no_entry_found         = 2        others                 = 3               . BA  에 정의된  BK  항목들을 가져온다 .
   &quot;  평가 항목  READ.   data : ls_hrp1002         type hrp1002,          ls_hrt1002         type hrt1002,          lt_hrt1002         type table of hrt1002,          tmp_string         type string.   loop at lt_question into stru_question.     select single * into corresponding fields of ls_hrp1002       from hrp1002       where plvar eq '01'         and otype eq 'BK'         and objid eq stru_question-obj_id         and subty eq '0001'         and istat eq '1'         and langu eq '3'.     select * into corresponding fields of table lt_hrt1002       from hrt1002       where tabnr eq ls_hrp1002-tabnr.     loop at lt_hrt1002 into ls_hrt1002.       concatenate tmp_string ls_hrt1002-tline into tmp_string.     endloop.               . BK 번호  text 를 읽어 온다 .
   data:         tmp_rank                type pt1045-rank,         tmp_index               type sy-tabix,         flag                    type char01.    &quot;BG MODIFY     if ls_appraisal-app_otype eq 'BG'.       move ls_appraisal-rank to tmp_rank.       call function 'RHPA_CALC_VALUE_AVERAGE'         exporting           rank_base                = tmp_rank         importing           new_calculated           = flag         tables           app_pt1045               = set_appraisal         exceptions           error_during_calculation = 1           others                   = 2.     endif.      if ls_appraisal-app_otype eq 'BS'.       move ls_appraisal-rank to tmp_rank.       call function 'RHPA_CALC_VALUE_AVERAGE'         exporting           rank_base                = tmp_rank         importing           new_calculated           = flag         tables           app_pt1045               = set_appraisal         exceptions           error_during_calculation = 1           others                   = 2.     endif.  변경된   BK  값으로  bs bg 값 구합 .
   &quot; SAVE LOGIC   call function 'RHPA_APPRAISAL_MODIFY_ACTIVE'     exporting       app_attributes_db           = get_app_attributes       app_attributes_cur          = get_app_attributes      vtask                       = 'S'  tables *   appraisal_db                = lt_appraisal    appraisal_cur               = set_appraisal *   appraisal_cur                = lt_appraisal  exceptions    no_authority                = 1    nothing_found               = 2    invalid_date                = 3    appraisal_table_error       = 4    error_during_insert         = 5    historicized                = 6    others                      = 7 다면평가 결과 값 저장 VTASK = ‘S’  <=  저장 데이터 즉시반영  flag S Synchronous update in the update task V Asynchronous update in the update task D Update in dialog B Update in internal buffer No update via personnel planning update task
   &quot;  평가 문서 완료  .   move : '01' to tmp_planversion,         item_object to tmp_appraisal_id.   call function 'RHPA_APPRAISAL_HISTORICIZE'    exporting      i_planversion                  = tmp_planversion      i_appraisal_id                 = tmp_appraisal_id *   TABLES *     PROCESS_ERROR                  =    exceptions      no_authority                   = 1      nothing_found                  = 2      input_duty                     = 3      parts_not_historicized         = 4      error_during_update            = 5      processing_not_processed       = 6      wrong_status                   = 7      others                         = 8 다면평가 문서 완료 (closing)
     move : 'PA' to tmp_add_on_application,            '01' to tmp_plan_version,            ls_hrhap_appee-appraisal_id to tmp_appraisal_id.     call function 'HRHAP_DOCUMENT_GET_DETAIL'       exporting      add_on_application            =  tmp_add_on_application *   MODE                          = ' ' *   UI_MODE                       = ' '         plan_version                  = tmp_plan_version         s_appraisal_id                = tmp_appraisal_id *   ADMINISTRATOR                 = ' ' *   S_DISPLAY_UI                  = *   NO_ACTION_LOG                 = ' '    importing *   S_DOC_PROCESSING              = *   S_HEADER_TEXTS                =      t_header_appraiser            =  tmp_header_appraiser  &quot;  평가자       t_header_appraisee            =  tmp_header_appraisee  &quot; 피평가자    T_HEADER_PART_APPRAISER   =  tmp_header_part_appraisers  “ 부분 평가자 *   T_HEADER_OTHERS               =      s_header_status               =  tmp_header_status  &quot;  상태   2: 계획중 .      s_header_dates                =  tmp_header_dates &quot; 목표세팅일 검토일 .  &quot;  시작일 종료일 *   T_HEADER_ADD_DATA             = *   S_HEADER_DISPLAY              = *   T_BUTTONS                     = *   T_BODY_COLUMNS                =      t_body_elements               =  tmp_body_elements  &quot;va  문서 번호 *   T_BODY_ELEMENT_BUTTONS        = *   T_BODY_ELEMENT_DESCR          = *   T_BODY_CELLS                  = *   T_BODY_CELL_VAL_VALUES        = *   T_BODY_CELL_VAL_RANGES        = *   T_BODY_CELL_VAL_C_LIKE        = *   T_BODY_CELL_VAL_DESCR         = *   T_BODY_CELL_NOTES             = *   T_STATUS_NOTES                = *   S_RETURN                      = . * 직번으로 피평가자로 속한 모든  VA  문서번호 가져온다 .    select * into corresponding fields of table lt_hrhap_appee     from hrhap_appee     where plan_version eq '01'       and type eq 'P'       and id eq id.   * 평가자로 속한 모든 문서 가져온다 .   select * into corresponding fields of table lt_hrhap_apper     from hrhap_apper     where plan_version eq '01'       and type eq 'P'       and id eq id.  * 부분평가자가 속한 모든 문서 가져온다 .    select * into corresponding fields of table lt_hrhap_p_apper     from hrhap_p_apper     where plan_version eq '01'       and type eq 'P'       and id eq id.  평가 상태  : tmp_header_status-ap_status  1 In Preparation 2 In Planning 3 In Review 4 In Process 5 Completed 6 Approved 7 Closed Approved 8 Rejected 9 Closed Rejected
     move : 'PA' to tmp_add_on_application,            '01' to tmp_plan_version,            stru_sel_line-doc_no to ls_appraisal_id-appraisal_id,            '0000' to  ls_appraisal_id-part_ap_id.     .      &quot;  저장 로직 .     call function 'HRHAP_DOCUMENT_SAVE'       exporting         plan_version                   = tmp_plan_version         t_header_appraiser             = tmp_header_appraiser         t_header_appraisee             = tmp_header_appraisee         t_header_others                = tmp_header_others         s_header_texts                 = tmp_header_texts         s_header_dates                 = tmp_header_dates         s_header_status                = tmp_header_status         s_header_display               = tmp_header_display         t_body_columns                 = tmp_body_column         t_body_elements                = tmp_body_elements  &quot;va  문서번호          t_body_cells                   = tmp_body_cells  &quot; 가중치 *   NO_ACTION_LOG                  = *   VTASK                          = 'D‘  “       importing          s_return                       = tmp_return  &quot;  결과        changing         s_appraisal_id                 = ls_appraisal_id         s_doc_processing               = tmp_doc_processing         t_header_part_appraisers       = tmp_header_part_appraisers         t_body_cell_notes              = t_body_cell_notes  &quot;text         t_status_notes                 = tmp_status_note               .  ls_appraisal_id-part_ap_id  에 ‘ 0000’ 을 넣어야 저장된다 . 문서  read  할 때는 안넣어도 상관없다 . VTASK type S Synchronous update in the update task V Asynchronous update in the update task D Update in dialog B Update in internal buffer No update via personnel planning update task tmp_body_cells-no_value: flag check 를 초기화 시켜야 한다 . ( 초기값은 ‘ X’ 로 되어있다 )
     data : tmp_enqueue type hap_doc_enqueue.     move : 'C' to tmp_enqueue.  &quot;entire          call function 'HRHAP_DOCUMENT_DEQUEUE'         exporting           plan_version         =  tmp_plan_version           s_appraisal_id       =  ls_appraisal_id * IMPORTING *   S_RETURN             =   changing    doc_enqueue          = tmp_enqueue                .  평가 문서가  lock  잡힐때가 있다 . 그때는 강제로  dequeue 를 시켜 줘야 한다 .   tmp_enqueue : 상태 Appraisal Document Not Enqueued C Entire Appraisal Document Enqueued P Part Appraisal Enqueued F Entire Appraisal Document Enqueued (First Time)
   call function 'HRHAP_DOCUMENT_CHANGE_STATUS'     exporting       plan_version                 = tmp_plan_version       template_id                  = tmp_template_id       button_id                    = tmp_button_id *       ADMINISTRATOR                = ' '    importing *       T_UI_VAL_DET                 = *       T_VAL_DET_RETURN             = *       DOCUMENT_LEAVE               =      s_return                     = tmp_return     changing       s_appraisal_id               = ls_appraisal_id       s_header_status              = tmp_header_status       s_doc_processing             = tmp_doc_processing       s_header_display             = tmp_header_display       t_header_appraiser           = tmp_header_appraiser       t_header_appraisee           = tmp_header_appraisee       t_header_p_appraiser         = tmp_header_part_appraisers       t_header_others              = tmp_header_others *       T_HEADER_ADD_DATA            =       s_header_texts               = tmp_header_texts       s_header_dates               = tmp_header_dates *       T_BUTTONS                    =       t_body_elements              = tmp_body_elements *       T_BODY_ELEMENT_DESCR         = *       T_BODY_ELEMENT_BUTTONS       =       t_body_columns               = tmp_body_columns       t_body_cells                 = tmp_body_cells *       T_BODY_CELL_VAL_VALUES       = *       T_BODY_CELL_VAL_RANGES       = *       T_BODY_CELL_VAL_C_LIKE       = *       T_BODY_CELL_VAL_DESCR        =       t_body_cell_notes            = tmp_body_cell_notes *       T_STATUS_NOTES               = tmp_status_note           .     .  MBO 평가 문서의 상태 변경 계획중 => 검토중으로 .. ls_body_elements-element_id to tmp_template_id, ‘REVIEW' to tmp_button_id. “ 현재 상태를 그대로 두보 버튼  ID 만 변경”    read table tmp_body_elements with key element_type = 'VA'   into ls_body_elements.    &quot; 완료 로직 . &quot;    data :         tmp_template_id          type  hap_template_id,         tmp_button_id            type  ui_func.   move :          ls_body_elements-element_id to tmp_template_id,          'COMPLETE' to tmp_button_id. “ 현 단계에서  complete 하면 다음 단계로 넘어간다 . 검토중  =>  평가시작 ls_body_elements-element_id to tmp_template_id, 'START' to tmp_button_id. &quot; 부분 평가 . 'COMPL_P' to tmp_button_id. 
“ button_id  참조 . CONSTANTS: * APPRAISAL STATUS DEPENDENT  buttons c_button_perform  TYPE hap_button_id VALUE 'PERFORM',  &quot;Perform app. c_button_start  TYPE hap_button_id VALUE 'START',  &quot;Start App. Pr c_button_plan_obj  TYPE hap_button_id VALUE 'OBJECTIVE',&quot;Plan object. c_button_review  TYPE hap_button_id VALUE 'REVIEW',  &quot;Review c_button_next_rev  TYPE hap_button_id VALUE 'N_REVIEW', &quot;Next Review c_button_complete  TYPE hap_button_id VALUE 'COMPLETE', &quot;Complete app. c_button_compl_p  TYPE hap_button_id VALUE 'COMPL_P',  &quot;Compl.part ap c_button_approve  TYPE hap_button_id VALUE 'APPROVE',  &quot;Approve app. c_button_reject  TYPE hap_button_id VALUE 'REJECT',  &quot;Reject app. c_button_close_apr TYPE hap_button_id VALUE 'CLOSEAPR', &quot;CloseApprove c_button_close_rej TYPE hap_button_id VALUE 'CLOSEREJ', &quot;CloseRejected c_button_closeprep TYPE hap_button_id VALUE 'CLOSEPREP'.&quot;Close Prep. CONSTANTS: * STATUS DEPENDENT BUTTON CONTAINERS c_button_status_1  TYPE hap_button_id VALUE 'STATUS_1', c_button_status_2  TYPE hap_button_id VALUE 'STATUS_2', c_button_status_3  TYPE hap_button_id VALUE 'STATUS_3'. CONSTANTS: * ELEMENT buttons c_button_enhance TYPE hap_button_id VALUE 'ENHANCE', &quot;enhance template c_button_delete  TYPE hap_button_id VALUE 'DELETE'.  &quot;delete element            .     .
     call function 'HRHAP_DOCUMENT_GET_LIST_XXL'       exporting *       SEL_FILTER                  = ' '         add_on_application          = tmp_add_on_application        plan_version                =  tmp_plan_version *       T_CATEGORIES                =        t_templates                 =  tmp_templates *       T_TMPL_DETAIL               = *       T_APPRAISERS                =        s_and_or                    = tmp_s_sel_option_and_or *       T_APPRAISEES                =        t_part_appraisers           =  tmp_part_appraisers *       T_OTHERS                    = *       S_SEL_DATE                  = *       S_SEL_STATUS                =        t_sel_status_sub            = tmp_sel_status_sub        s_sel_with_or_without       =  tmp_s_sel_with_or_without *       S_DOCUMENT_FILL             = *       EXTRACT_M_N                 = ' ' *       NO_DIALOG                   =      importing        t_documents                 = tmp_documents *       S_RETURN                    =               .     read table tmp_documents with key appraisal_id = stru_main_list-doc_no     into ls_documents.       move : 'PA' to tmp_add_on_application,            '01' to tmp_plan_version.     move : '01' to ls_templates-plvar,            'VA' to ls_templates-otype,            stru_main_list-va_no to ls_templates-objid.     append ls_templates to tmp_templates.     move : '01' to ls_part_appraisers-plvar,            'P' to ls_part_appraisers-otype,            stru_main_list-appraisee to ls_part_appraisers-sobid.     append ls_part_appraisers to tmp_part_appraisers.     move : '4' to ls_sel_status_sub-ap_status,            stru_main_list-sub_status to ls_sel_status_sub-ap_status_sub.     append ls_sel_status_sub to tmp_sel_status_sub.     tmp_s_sel_option_and_or-apper_and_appee = 'X'.     tmp_s_sel_with_or_without-sel_display_existing = 'X'. “ 해당 도큐먼트 단계별 세부 단계 정보 가져온다 ..      read table tmp_documents with key appraisal_id = stru_main_list-doc_no  into ls_documents.
         ls_hri1001-infty = '1001'.         ls_hri1001-plvar = '01'.         ls_hri1001-otype = 'O'.         ls_hri1001-objid = stru_org-org_code.  &quot; 조직 코드          ls_hri1001-begda = item_sdate.  &quot; 시작지정일          ls_hri1001-endda = '99991231'.         ls_hri1001-rsign = 'A'.         ls_hri1001-relat = '031'.         ls_hri1001-sclas = 'Q'.         ls_hri1001-sobid = stru_all_list-q_id.  &quot;QK KEY *        ls_hri1001-priox = record-priox. &quot; PRIORITY *        ls_hri1001-prozt = record-prozt. &quot;WEIGHTINH PERCENTAGE         ls_hri1001-adata = '0003'.       call function 'RH_RELATION_WRITE' *         EXPORTING *           VTASK                      = 'D' *           KEEP_LUPD                  = ' '         tables           relation                   = lt_hri1001 *           ERR_RELATION               =        exceptions          no_authority               = 1          relation_not_allowed       = 2          object_not_found           = 3          wrong_date_format          = 4          time_not_valid             = 5          error_during_insert        = 6          undefined                  = 7          others                     = 8     into ls_documents.  성격지정 항목의 관계를 생성한다 . . ls_hri1001-adata <=  숙련도 정보  0001~0004

More Related Content

Viewers also liked

SAP IDM Material
SAP IDM MaterialSAP IDM Material
SAP IDM Materialsapgoldmine
 
Https _sapmats-de.sap-ag.de_download_download
Https  _sapmats-de.sap-ag.de_download_downloadHttps  _sapmats-de.sap-ag.de_download_download
Https _sapmats-de.sap-ag.de_download_downloadMichelle Crapo
 
SAP MM Training in Chennai Demo Part-5
SAP MM Training in Chennai Demo Part-5SAP MM Training in Chennai Demo Part-5
SAP MM Training in Chennai Demo Part-5Thecreating Experts
 
Scrum! but... SAP Inside Track Hamburg 2016
Scrum! but... SAP Inside Track Hamburg 2016Scrum! but... SAP Inside Track Hamburg 2016
Scrum! but... SAP Inside Track Hamburg 2016Martin Fischer
 
Suresh Kumar Abap 260615
Suresh Kumar Abap 260615Suresh Kumar Abap 260615
Suresh Kumar Abap 260615Suresh Kumar
 
SAP MOBILE INFRASTRUCTURE Material
SAP MOBILE INFRASTRUCTURE MaterialSAP MOBILE INFRASTRUCTURE Material
SAP MOBILE INFRASTRUCTURE Materialsapgoldmine
 
SAP Video Training Material
SAP Video Training MaterialSAP Video Training Material
SAP Video Training Materialsapgoldmine
 

Viewers also liked (11)

Learn sap mm
Learn sap mmLearn sap mm
Learn sap mm
 
SAP IDM Material
SAP IDM MaterialSAP IDM Material
SAP IDM Material
 
Https _sapmats-de.sap-ag.de_download_download
Https  _sapmats-de.sap-ag.de_download_downloadHttps  _sapmats-de.sap-ag.de_download_download
Https _sapmats-de.sap-ag.de_download_download
 
SAP MM Training in Chennai Demo Part-5
SAP MM Training in Chennai Demo Part-5SAP MM Training in Chennai Demo Part-5
SAP MM Training in Chennai Demo Part-5
 
Abap objects
Abap objectsAbap objects
Abap objects
 
Mule SAP connector
Mule SAP connectorMule SAP connector
Mule SAP connector
 
Sap hr curriculum
Sap hr curriculumSap hr curriculum
Sap hr curriculum
 
Scrum! but... SAP Inside Track Hamburg 2016
Scrum! but... SAP Inside Track Hamburg 2016Scrum! but... SAP Inside Track Hamburg 2016
Scrum! but... SAP Inside Track Hamburg 2016
 
Suresh Kumar Abap 260615
Suresh Kumar Abap 260615Suresh Kumar Abap 260615
Suresh Kumar Abap 260615
 
SAP MOBILE INFRASTRUCTURE Material
SAP MOBILE INFRASTRUCTURE MaterialSAP MOBILE INFRASTRUCTURE Material
SAP MOBILE INFRASTRUCTURE Material
 
SAP Video Training Material
SAP Video Training MaterialSAP Video Training Material
SAP Video Training Material
 

Similar to Abap HR Function

Xenogenetics for PL/SQL - infusing with Java best practices
Xenogenetics for PL/SQL - infusing with Java best practicesXenogenetics for PL/SQL - infusing with Java best practices
Xenogenetics for PL/SQL - infusing with Java best practicesLucas Jellema
 
The Story About The Migration
 The Story About The Migration The Story About The Migration
The Story About The MigrationEDB
 
High-level Web Testing
High-level Web TestingHigh-level Web Testing
High-level Web Testingpetersergeant
 
How to sas codes and tricks
How to sas codes and tricksHow to sas codes and tricks
How to sas codes and tricksعاطف رضا
 
I keep on get a redefinition error and an undefined error.Customer.pdf
I keep on get a redefinition error and an undefined error.Customer.pdfI keep on get a redefinition error and an undefined error.Customer.pdf
I keep on get a redefinition error and an undefined error.Customer.pdfherminaherman
 
Hacking parse.y (RubyKansai38)
Hacking parse.y (RubyKansai38)Hacking parse.y (RubyKansai38)
Hacking parse.y (RubyKansai38)ujihisa
 
Statistical computing project
Statistical computing projectStatistical computing project
Statistical computing projectRashmiSubrahmanya
 
Oracle - Program with PL/SQL - Lession 09
Oracle - Program with PL/SQL - Lession 09Oracle - Program with PL/SQL - Lession 09
Oracle - Program with PL/SQL - Lession 09Thuan Nguyen
 
Hacking Parse.y with ujihisa
Hacking Parse.y with ujihisaHacking Parse.y with ujihisa
Hacking Parse.y with ujihisaujihisa
 
Im having difficulty with the directives i figured out a duplicatio.pdf
Im having difficulty with the directives i figured out a duplicatio.pdfIm having difficulty with the directives i figured out a duplicatio.pdf
Im having difficulty with the directives i figured out a duplicatio.pdfmaheshkumar12354
 
Why You Should Use TAPIs
Why You Should Use TAPIsWhy You Should Use TAPIs
Why You Should Use TAPIsJeffrey Kemp
 
I got the codes written down below- Basically- I am trying to implemen.pdf
I got the codes written down below- Basically- I am trying to implemen.pdfI got the codes written down below- Basically- I am trying to implemen.pdf
I got the codes written down below- Basically- I am trying to implemen.pdfshreeaadithyaacellso
 
Php Crash Course
Php Crash CoursePhp Crash Course
Php Crash Coursemussawir20
 
Assignment c programming
Assignment c programmingAssignment c programming
Assignment c programmingIcaii Infotech
 

Similar to Abap HR Function (20)

Xenogenetics
XenogeneticsXenogenetics
Xenogenetics
 
Xenogenetics for PL/SQL - infusing with Java best practices
Xenogenetics for PL/SQL - infusing with Java best practicesXenogenetics for PL/SQL - infusing with Java best practices
Xenogenetics for PL/SQL - infusing with Java best practices
 
iit c prog.ppt
iit c prog.pptiit c prog.ppt
iit c prog.ppt
 
The Story About The Migration
 The Story About The Migration The Story About The Migration
The Story About The Migration
 
High-level Web Testing
High-level Web TestingHigh-level Web Testing
High-level Web Testing
 
How to sas codes and tricks
How to sas codes and tricksHow to sas codes and tricks
How to sas codes and tricks
 
I keep on get a redefinition error and an undefined error.Customer.pdf
I keep on get a redefinition error and an undefined error.Customer.pdfI keep on get a redefinition error and an undefined error.Customer.pdf
I keep on get a redefinition error and an undefined error.Customer.pdf
 
Hacking parse.y (RubyKansai38)
Hacking parse.y (RubyKansai38)Hacking parse.y (RubyKansai38)
Hacking parse.y (RubyKansai38)
 
Statistical computing project
Statistical computing projectStatistical computing project
Statistical computing project
 
Oracle - Program with PL/SQL - Lession 09
Oracle - Program with PL/SQL - Lession 09Oracle - Program with PL/SQL - Lession 09
Oracle - Program with PL/SQL - Lession 09
 
Hacking Parse.y with ujihisa
Hacking Parse.y with ujihisaHacking Parse.y with ujihisa
Hacking Parse.y with ujihisa
 
Alv grid
Alv gridAlv grid
Alv grid
 
Im having difficulty with the directives i figured out a duplicatio.pdf
Im having difficulty with the directives i figured out a duplicatio.pdfIm having difficulty with the directives i figured out a duplicatio.pdf
Im having difficulty with the directives i figured out a duplicatio.pdf
 
Why You Should Use TAPIs
Why You Should Use TAPIsWhy You Should Use TAPIs
Why You Should Use TAPIs
 
I got the codes written down below- Basically- I am trying to implemen.pdf
I got the codes written down below- Basically- I am trying to implemen.pdfI got the codes written down below- Basically- I am trying to implemen.pdf
I got the codes written down below- Basically- I am trying to implemen.pdf
 
What's New in ZF 1.10
What's New in ZF 1.10What's New in ZF 1.10
What's New in ZF 1.10
 
Gps c
Gps cGps c
Gps c
 
Php Crash Course
Php Crash CoursePhp Crash Course
Php Crash Course
 
CPP Homework Help
CPP Homework HelpCPP Homework Help
CPP Homework Help
 
Assignment c programming
Assignment c programmingAssignment c programming
Assignment c programming
 

More from jung_se_hun

고정자산 국조보조금 프로세스
고정자산 국조보조금 프로세스고정자산 국조보조금 프로세스
고정자산 국조보조금 프로세스jung_se_hun
 
Abap 에서 webdynpro Call
Abap 에서 webdynpro Call Abap 에서 webdynpro Call
Abap 에서 webdynpro Call jung_se_hun
 
Webdynpro Service Activate
Webdynpro Service ActivateWebdynpro Service Activate
Webdynpro Service Activatejung_se_hun
 
webdynpro Select Option Default Value Setting
webdynpro  Select Option Default Value Setting webdynpro  Select Option Default Value Setting
webdynpro Select Option Default Value Setting jung_se_hun
 
webdynpro Ovs Usage
webdynpro Ovs Usagewebdynpro Ovs Usage
webdynpro Ovs Usagejung_se_hun
 
webdynpro Wda Select Option Usage
webdynpro Wda Select Option Usagewebdynpro Wda Select Option Usage
webdynpro Wda Select Option Usagejung_se_hun
 
Webdynpro Alv Usage
Webdynpro Alv UsageWebdynpro Alv Usage
Webdynpro Alv Usagejung_se_hun
 
webdynpro Alv Leadselection
webdynpro Alv Leadselectionwebdynpro Alv Leadselection
webdynpro Alv Leadselectionjung_se_hun
 
webdynpro Table Popin
webdynpro Table Popin webdynpro Table Popin
webdynpro Table Popin jung_se_hun
 
sap Webdynpro File Up Down Load
sap Webdynpro File Up Down Load sap Webdynpro File Up Down Load
sap Webdynpro File Up Down Load jung_se_hun
 
SAP Abap File Save (Cl Gos Manager)
SAP Abap File Save (Cl Gos Manager)SAP Abap File Save (Cl Gos Manager)
SAP Abap File Save (Cl Gos Manager)jung_se_hun
 
sap Abap File Save (Cl Gos Manager)
sap Abap File Save (Cl Gos Manager)sap Abap File Save (Cl Gos Manager)
sap Abap File Save (Cl Gos Manager)jung_se_hun
 
webdynpro File Up Down Load
webdynpro File Up Down Load webdynpro File Up Down Load
webdynpro File Up Down Load jung_se_hun
 
webdynpro Popup Open
webdynpro Popup Openwebdynpro Popup Open
webdynpro Popup Openjung_se_hun
 
webdynpro exit plug use
webdynpro exit plug usewebdynpro exit plug use
webdynpro exit plug usejung_se_hun
 
webdynpro Dropdown List Value Set Setting
webdynpro Dropdown List Value Set Setting webdynpro Dropdown List Value Set Setting
webdynpro Dropdown List Value Set Setting jung_se_hun
 
webdynpro for abap Cell Color Setting
webdynpro for abap Cell Color Setting webdynpro for abap Cell Color Setting
webdynpro for abap Cell Color Setting jung_se_hun
 
webdynpro Column Grouping
webdynpro Column Groupingwebdynpro Column Grouping
webdynpro Column Groupingjung_se_hun
 
webdynpro Application role setting
webdynpro Application role settingwebdynpro Application role setting
webdynpro Application role settingjung_se_hun
 
Webdynpro Yes-No Popup
Webdynpro Yes-No Popup Webdynpro Yes-No Popup
Webdynpro Yes-No Popup jung_se_hun
 

More from jung_se_hun (20)

고정자산 국조보조금 프로세스
고정자산 국조보조금 프로세스고정자산 국조보조금 프로세스
고정자산 국조보조금 프로세스
 
Abap 에서 webdynpro Call
Abap 에서 webdynpro Call Abap 에서 webdynpro Call
Abap 에서 webdynpro Call
 
Webdynpro Service Activate
Webdynpro Service ActivateWebdynpro Service Activate
Webdynpro Service Activate
 
webdynpro Select Option Default Value Setting
webdynpro  Select Option Default Value Setting webdynpro  Select Option Default Value Setting
webdynpro Select Option Default Value Setting
 
webdynpro Ovs Usage
webdynpro Ovs Usagewebdynpro Ovs Usage
webdynpro Ovs Usage
 
webdynpro Wda Select Option Usage
webdynpro Wda Select Option Usagewebdynpro Wda Select Option Usage
webdynpro Wda Select Option Usage
 
Webdynpro Alv Usage
Webdynpro Alv UsageWebdynpro Alv Usage
Webdynpro Alv Usage
 
webdynpro Alv Leadselection
webdynpro Alv Leadselectionwebdynpro Alv Leadselection
webdynpro Alv Leadselection
 
webdynpro Table Popin
webdynpro Table Popin webdynpro Table Popin
webdynpro Table Popin
 
sap Webdynpro File Up Down Load
sap Webdynpro File Up Down Load sap Webdynpro File Up Down Load
sap Webdynpro File Up Down Load
 
SAP Abap File Save (Cl Gos Manager)
SAP Abap File Save (Cl Gos Manager)SAP Abap File Save (Cl Gos Manager)
SAP Abap File Save (Cl Gos Manager)
 
sap Abap File Save (Cl Gos Manager)
sap Abap File Save (Cl Gos Manager)sap Abap File Save (Cl Gos Manager)
sap Abap File Save (Cl Gos Manager)
 
webdynpro File Up Down Load
webdynpro File Up Down Load webdynpro File Up Down Load
webdynpro File Up Down Load
 
webdynpro Popup Open
webdynpro Popup Openwebdynpro Popup Open
webdynpro Popup Open
 
webdynpro exit plug use
webdynpro exit plug usewebdynpro exit plug use
webdynpro exit plug use
 
webdynpro Dropdown List Value Set Setting
webdynpro Dropdown List Value Set Setting webdynpro Dropdown List Value Set Setting
webdynpro Dropdown List Value Set Setting
 
webdynpro for abap Cell Color Setting
webdynpro for abap Cell Color Setting webdynpro for abap Cell Color Setting
webdynpro for abap Cell Color Setting
 
webdynpro Column Grouping
webdynpro Column Groupingwebdynpro Column Grouping
webdynpro Column Grouping
 
webdynpro Application role setting
webdynpro Application role settingwebdynpro Application role setting
webdynpro Application role setting
 
Webdynpro Yes-No Popup
Webdynpro Yes-No Popup Webdynpro Yes-No Popup
Webdynpro Yes-No Popup
 

Abap HR Function

  • 1.    call function 'RHPA_APPRAISORS_APP_READ'  &quot; 직번을 가지고  BA 를 구함 . *   EXPORTING *     BEGDA               = '19000101' *     ENDDA               = SY-DATUM *     WITH_STEXT          = 'X' *     WITH_ADD_INFO       = 'X'     tables       appraisors          = p_appraisors       appraisals          = p_appraisals *   EXCEPTIONS *     NO_AUTHORITY        = 1 *     UNDEFINED           = 2 *     OTHERS              = 3             .   if sy-subrc <> 0. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.   endif.   data:         p_appraisors type table of hrsobid,         ls_appraisors type hrsobid,         p_appraisals type table of hrpe_profa,         ls_appraisals type hrpe_profa.   ls_appraisors-plvar = '01'.   ls_appraisors-otype = 'P'.   ls_appraisors-sobid = pernr.  append ls_appraisors to p_appraisors. 직번을 기준으로 자기가 평가자로 속하 모든 BA 문서를 가져온다 . Pernr <= 직번 Otype <= person
  • 2.      ls_appraisals_1-plvar = ls_appraisors-plvar.     ls_appraisals_1-otype = 'BA'.     ls_appraisals_1-objid = ls_appraisals-tobid.     append ls_appraisals_1 to lt_appraisals_1. “BA 로 피평가자 정보 가져온다 .      call function 'RHPA_APP_APPRAISEES_READ' *   EXPORTING *     MAINTAIN           = ' '       tables         appraisals         = lt_appraisals_1         appraisees         = lt_appraisees *   EXCEPTIONS *     NO_AUTHORITY       = 1 *     UNDEFINED          = 2 *     OTHERS             = 3               .     if sy-subrc <> 0. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.     endif. BA 로 피평가자 정보 가져온다 . ls_appraisals_1-objid <= 피평가자 직번
  • 3. * GET IFT 0000 DATA   call function 'HR_READ_INFOTYPE'        exporting            pernr           = pernr            infty           = c_ift0000            begda           = '19000101'            endda           = '99991231' *      IMPORTING *          SUBRC           = SUBRC        tables            infty_tab       = it_0000        exceptions            infty_not_found = 1            others          = 2. 직번을 기준으로 infotye 에 따른 HR 기본정보를 가져온다 . pernr <= 직번
  • 4.    move : '01' to tmp_plvar,          item_object to tmp_objid.    &quot; 현재 정보 가져오기 .   call function 'RHPA_APPRAISAL_DISPLAY_READ'     exporting       plvar                = tmp_plvar       objid                = tmp_objid *   BEGDA                = *   ENDDA                = *   READ_DB              = ' ' *   MAINTAIN             = ' '  importing    app_attributes       = get_app_attributes  tables *   APPRAISORS           = *   APPRAISEES           =    appraisal            = lt_appraisal *   APPRAISALS           =  exceptions    no_authority         = 1    nothing_found        = 2    others               = 3             .   if sy-subrc <> 0. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.   endif. BA 문서 번호를 가지고 문서의 모든 정보를 가져온다 . Tmp_objid <= 문서 번호 .
  • 5.      move : ls_zhrta01-otype to tmp_act_otype,             ls_zhrta01-objid to tmp_act_objid,             'A047' to tmp_act_wegid,             '01' to tmp_act_plvar.     call function 'RH_STRUC_GET'       exporting         act_otype              = tmp_act_otype         act_objid              = tmp_act_objid         act_wegid              = tmp_act_wegid *       ACT_INT_FLAG           =        act_plvar              = tmp_act_plvar *       ACT_BEGDA              = SY-DATUM *       ACT_ENDDA              = SY-DATUM *       ACT_TDEPTH             = 0        act_tflag              = 'X'        act_vflag              = 'X'        authority_check        = 'X' *       TEXT_BUFFER_FILL       = *       BUFFER_MODE            = *     IMPORTING *       ACT_PLVAR              =      tables *       RESULT_TAB             =        result_objec           = lt_result_objec *       RESULT_STRUC           =      exceptions        no_plvar_found         = 1        no_entry_found         = 2        others                 = 3               . BA 에 정의된 BK 항목들을 가져온다 .
  • 6.    &quot;  평가 항목  READ.   data : ls_hrp1002         type hrp1002,          ls_hrt1002         type hrt1002,          lt_hrt1002         type table of hrt1002,          tmp_string         type string.   loop at lt_question into stru_question.     select single * into corresponding fields of ls_hrp1002       from hrp1002       where plvar eq '01'         and otype eq 'BK'         and objid eq stru_question-obj_id         and subty eq '0001'         and istat eq '1'         and langu eq '3'.     select * into corresponding fields of table lt_hrt1002       from hrt1002       where tabnr eq ls_hrp1002-tabnr.     loop at lt_hrt1002 into ls_hrt1002.       concatenate tmp_string ls_hrt1002-tline into tmp_string.     endloop.               . BK 번호 text 를 읽어 온다 .
  • 7.    data:         tmp_rank                type pt1045-rank,         tmp_index               type sy-tabix,         flag                    type char01.    &quot;BG MODIFY     if ls_appraisal-app_otype eq 'BG'.       move ls_appraisal-rank to tmp_rank.       call function 'RHPA_CALC_VALUE_AVERAGE'         exporting           rank_base                = tmp_rank         importing           new_calculated           = flag         tables           app_pt1045               = set_appraisal         exceptions           error_during_calculation = 1           others                   = 2.     endif.      if ls_appraisal-app_otype eq 'BS'.       move ls_appraisal-rank to tmp_rank.       call function 'RHPA_CALC_VALUE_AVERAGE'         exporting           rank_base                = tmp_rank         importing           new_calculated           = flag         tables           app_pt1045               = set_appraisal         exceptions           error_during_calculation = 1           others                   = 2.     endif. 변경된  BK 값으로  bs bg 값 구합 .
  • 8.    &quot; SAVE LOGIC   call function 'RHPA_APPRAISAL_MODIFY_ACTIVE'     exporting       app_attributes_db           = get_app_attributes       app_attributes_cur          = get_app_attributes     vtask                       = 'S'  tables *   appraisal_db                = lt_appraisal    appraisal_cur               = set_appraisal *   appraisal_cur                = lt_appraisal  exceptions    no_authority                = 1    nothing_found               = 2    invalid_date                = 3    appraisal_table_error       = 4    error_during_insert         = 5    historicized                = 6    others                      = 7 다면평가 결과 값 저장 VTASK = ‘S’ <= 저장 데이터 즉시반영 flag S Synchronous update in the update task V Asynchronous update in the update task D Update in dialog B Update in internal buffer No update via personnel planning update task
  • 9.    &quot;  평가 문서 완료  .   move : '01' to tmp_planversion,         item_object to tmp_appraisal_id.   call function 'RHPA_APPRAISAL_HISTORICIZE'    exporting      i_planversion                  = tmp_planversion      i_appraisal_id                 = tmp_appraisal_id *   TABLES *     PROCESS_ERROR                  =    exceptions      no_authority                   = 1      nothing_found                  = 2      input_duty                     = 3      parts_not_historicized         = 4      error_during_update            = 5      processing_not_processed       = 6      wrong_status                   = 7      others                         = 8 다면평가 문서 완료 (closing)
  • 10.      move : 'PA' to tmp_add_on_application,            '01' to tmp_plan_version,            ls_hrhap_appee-appraisal_id to tmp_appraisal_id.     call function 'HRHAP_DOCUMENT_GET_DETAIL'       exporting      add_on_application            =  tmp_add_on_application *   MODE                          = ' ' *   UI_MODE                       = ' '         plan_version                  = tmp_plan_version         s_appraisal_id                = tmp_appraisal_id *   ADMINISTRATOR                 = ' ' *   S_DISPLAY_UI                  = *   NO_ACTION_LOG                 = ' '    importing *   S_DOC_PROCESSING              = *   S_HEADER_TEXTS                =      t_header_appraiser            =  tmp_header_appraiser  &quot;  평가자       t_header_appraisee            =  tmp_header_appraisee  &quot; 피평가자    T_HEADER_PART_APPRAISER   = tmp_header_part_appraisers “ 부분 평가자 *   T_HEADER_OTHERS               =      s_header_status               =  tmp_header_status  &quot;  상태   2: 계획중 .      s_header_dates                =  tmp_header_dates &quot; 목표세팅일 검토일 .  &quot;  시작일 종료일 *   T_HEADER_ADD_DATA             = *   S_HEADER_DISPLAY              = *   T_BUTTONS                     = *   T_BODY_COLUMNS                =      t_body_elements               =  tmp_body_elements  &quot;va  문서 번호 *   T_BODY_ELEMENT_BUTTONS        = *   T_BODY_ELEMENT_DESCR          = *   T_BODY_CELLS                  = *   T_BODY_CELL_VAL_VALUES        = *   T_BODY_CELL_VAL_RANGES        = *   T_BODY_CELL_VAL_C_LIKE        = *   T_BODY_CELL_VAL_DESCR         = *   T_BODY_CELL_NOTES             = *   T_STATUS_NOTES                = *   S_RETURN                      = . * 직번으로 피평가자로 속한 모든 VA 문서번호 가져온다 .    select * into corresponding fields of table lt_hrhap_appee     from hrhap_appee     where plan_version eq '01'       and type eq 'P'       and id eq id. * 평가자로 속한 모든 문서 가져온다 .   select * into corresponding fields of table lt_hrhap_apper     from hrhap_apper     where plan_version eq '01'       and type eq 'P'       and id eq id. * 부분평가자가 속한 모든 문서 가져온다 .    select * into corresponding fields of table lt_hrhap_p_apper     from hrhap_p_apper     where plan_version eq '01'       and type eq 'P'       and id eq id. 평가 상태 : tmp_header_status-ap_status 1 In Preparation 2 In Planning 3 In Review 4 In Process 5 Completed 6 Approved 7 Closed Approved 8 Rejected 9 Closed Rejected
  • 11.      move : 'PA' to tmp_add_on_application,            '01' to tmp_plan_version,            stru_sel_line-doc_no to ls_appraisal_id-appraisal_id,            '0000' to  ls_appraisal_id-part_ap_id.     .      &quot;  저장 로직 .     call function 'HRHAP_DOCUMENT_SAVE'       exporting         plan_version                   = tmp_plan_version         t_header_appraiser             = tmp_header_appraiser         t_header_appraisee             = tmp_header_appraisee         t_header_others                = tmp_header_others         s_header_texts                 = tmp_header_texts         s_header_dates                 = tmp_header_dates         s_header_status                = tmp_header_status         s_header_display               = tmp_header_display         t_body_columns                 = tmp_body_column         t_body_elements                = tmp_body_elements  &quot;va  문서번호          t_body_cells                   = tmp_body_cells  &quot; 가중치 *   NO_ACTION_LOG                  = *   VTASK                          = 'D‘ “      importing          s_return                       = tmp_return  &quot;  결과        changing         s_appraisal_id                 = ls_appraisal_id         s_doc_processing               = tmp_doc_processing         t_header_part_appraisers       = tmp_header_part_appraisers         t_body_cell_notes              = t_body_cell_notes  &quot;text         t_status_notes                 = tmp_status_note               . ls_appraisal_id-part_ap_id 에 ‘ 0000’ 을 넣어야 저장된다 . 문서 read 할 때는 안넣어도 상관없다 . VTASK type S Synchronous update in the update task V Asynchronous update in the update task D Update in dialog B Update in internal buffer No update via personnel planning update task tmp_body_cells-no_value: flag check 를 초기화 시켜야 한다 . ( 초기값은 ‘ X’ 로 되어있다 )
  • 12.      data : tmp_enqueue type hap_doc_enqueue.     move : 'C' to tmp_enqueue.  &quot;entire        call function 'HRHAP_DOCUMENT_DEQUEUE'         exporting           plan_version         =  tmp_plan_version           s_appraisal_id       =  ls_appraisal_id * IMPORTING *   S_RETURN             =   changing    doc_enqueue          = tmp_enqueue               . 평가 문서가 lock 잡힐때가 있다 . 그때는 강제로 dequeue 를 시켜 줘야 한다 .   tmp_enqueue : 상태 Appraisal Document Not Enqueued C Entire Appraisal Document Enqueued P Part Appraisal Enqueued F Entire Appraisal Document Enqueued (First Time)
  • 13.    call function 'HRHAP_DOCUMENT_CHANGE_STATUS'     exporting       plan_version                 = tmp_plan_version       template_id                  = tmp_template_id       button_id                    = tmp_button_id *       ADMINISTRATOR                = ' '    importing *       T_UI_VAL_DET                 = *       T_VAL_DET_RETURN             = *       DOCUMENT_LEAVE               =      s_return                     = tmp_return     changing       s_appraisal_id               = ls_appraisal_id       s_header_status              = tmp_header_status       s_doc_processing             = tmp_doc_processing       s_header_display             = tmp_header_display       t_header_appraiser           = tmp_header_appraiser       t_header_appraisee           = tmp_header_appraisee       t_header_p_appraiser         = tmp_header_part_appraisers       t_header_others              = tmp_header_others *       T_HEADER_ADD_DATA            =       s_header_texts               = tmp_header_texts       s_header_dates               = tmp_header_dates *       T_BUTTONS                    =       t_body_elements              = tmp_body_elements *       T_BODY_ELEMENT_DESCR         = *       T_BODY_ELEMENT_BUTTONS       =       t_body_columns               = tmp_body_columns       t_body_cells                 = tmp_body_cells *       T_BODY_CELL_VAL_VALUES       = *       T_BODY_CELL_VAL_RANGES       = *       T_BODY_CELL_VAL_C_LIKE       = *       T_BODY_CELL_VAL_DESCR        =       t_body_cell_notes            = tmp_body_cell_notes *       T_STATUS_NOTES               = tmp_status_note           .     . MBO 평가 문서의 상태 변경 계획중 => 검토중으로 .. ls_body_elements-element_id to tmp_template_id, ‘REVIEW' to tmp_button_id. “ 현재 상태를 그대로 두보 버튼 ID 만 변경”    read table tmp_body_elements with key element_type = 'VA'   into ls_body_elements.    &quot; 완료 로직 . &quot;    data :         tmp_template_id          type  hap_template_id,         tmp_button_id            type  ui_func.   move :          ls_body_elements-element_id to tmp_template_id,          'COMPLETE' to tmp_button_id. “ 현 단계에서 complete 하면 다음 단계로 넘어간다 . 검토중 => 평가시작 ls_body_elements-element_id to tmp_template_id, 'START' to tmp_button_id. &quot; 부분 평가 . 'COMPL_P' to tmp_button_id. 
  • 14. “ button_id 참조 . CONSTANTS: * APPRAISAL STATUS DEPENDENT buttons c_button_perform TYPE hap_button_id VALUE 'PERFORM', &quot;Perform app. c_button_start TYPE hap_button_id VALUE 'START', &quot;Start App. Pr c_button_plan_obj TYPE hap_button_id VALUE 'OBJECTIVE',&quot;Plan object. c_button_review TYPE hap_button_id VALUE 'REVIEW', &quot;Review c_button_next_rev TYPE hap_button_id VALUE 'N_REVIEW', &quot;Next Review c_button_complete TYPE hap_button_id VALUE 'COMPLETE', &quot;Complete app. c_button_compl_p TYPE hap_button_id VALUE 'COMPL_P', &quot;Compl.part ap c_button_approve TYPE hap_button_id VALUE 'APPROVE', &quot;Approve app. c_button_reject TYPE hap_button_id VALUE 'REJECT', &quot;Reject app. c_button_close_apr TYPE hap_button_id VALUE 'CLOSEAPR', &quot;CloseApprove c_button_close_rej TYPE hap_button_id VALUE 'CLOSEREJ', &quot;CloseRejected c_button_closeprep TYPE hap_button_id VALUE 'CLOSEPREP'.&quot;Close Prep. CONSTANTS: * STATUS DEPENDENT BUTTON CONTAINERS c_button_status_1 TYPE hap_button_id VALUE 'STATUS_1', c_button_status_2 TYPE hap_button_id VALUE 'STATUS_2', c_button_status_3 TYPE hap_button_id VALUE 'STATUS_3'. CONSTANTS: * ELEMENT buttons c_button_enhance TYPE hap_button_id VALUE 'ENHANCE', &quot;enhance template c_button_delete TYPE hap_button_id VALUE 'DELETE'. &quot;delete element            .     .
  • 15.      call function 'HRHAP_DOCUMENT_GET_LIST_XXL'       exporting *       SEL_FILTER                  = ' '         add_on_application          = tmp_add_on_application        plan_version                =  tmp_plan_version *       T_CATEGORIES                =        t_templates                 =  tmp_templates *       T_TMPL_DETAIL               = *       T_APPRAISERS                =        s_and_or                    = tmp_s_sel_option_and_or *       T_APPRAISEES                =        t_part_appraisers           =  tmp_part_appraisers *       T_OTHERS                    = *       S_SEL_DATE                  = *       S_SEL_STATUS                =        t_sel_status_sub            = tmp_sel_status_sub        s_sel_with_or_without       =  tmp_s_sel_with_or_without *       S_DOCUMENT_FILL             = *       EXTRACT_M_N                 = ' ' *       NO_DIALOG                   =      importing        t_documents                 = tmp_documents *       S_RETURN                    =               .     read table tmp_documents with key appraisal_id = stru_main_list-doc_no     into ls_documents.      move : 'PA' to tmp_add_on_application,            '01' to tmp_plan_version.     move : '01' to ls_templates-plvar,            'VA' to ls_templates-otype,            stru_main_list-va_no to ls_templates-objid.     append ls_templates to tmp_templates.     move : '01' to ls_part_appraisers-plvar,            'P' to ls_part_appraisers-otype,            stru_main_list-appraisee to ls_part_appraisers-sobid.     append ls_part_appraisers to tmp_part_appraisers.     move : '4' to ls_sel_status_sub-ap_status,            stru_main_list-sub_status to ls_sel_status_sub-ap_status_sub.     append ls_sel_status_sub to tmp_sel_status_sub.     tmp_s_sel_option_and_or-apper_and_appee = 'X'.     tmp_s_sel_with_or_without-sel_display_existing = 'X'. “ 해당 도큐먼트 단계별 세부 단계 정보 가져온다 ..      read table tmp_documents with key appraisal_id = stru_main_list-doc_no  into ls_documents.
  • 16.          ls_hri1001-infty = '1001'.         ls_hri1001-plvar = '01'.         ls_hri1001-otype = 'O'.         ls_hri1001-objid = stru_org-org_code.  &quot; 조직 코드          ls_hri1001-begda = item_sdate.  &quot; 시작지정일          ls_hri1001-endda = '99991231'.         ls_hri1001-rsign = 'A'.         ls_hri1001-relat = '031'.         ls_hri1001-sclas = 'Q'.         ls_hri1001-sobid = stru_all_list-q_id.  &quot;QK KEY *        ls_hri1001-priox = record-priox. &quot; PRIORITY *        ls_hri1001-prozt = record-prozt. &quot;WEIGHTINH PERCENTAGE         ls_hri1001-adata = '0003'.       call function 'RH_RELATION_WRITE' *         EXPORTING *           VTASK                      = 'D' *           KEEP_LUPD                  = ' '         tables           relation                   = lt_hri1001 *           ERR_RELATION               =        exceptions          no_authority               = 1          relation_not_allowed       = 2          object_not_found           = 3          wrong_date_format          = 4          time_not_valid             = 5          error_during_insert        = 6          undefined                  = 7          others                     = 8     into ls_documents. 성격지정 항목의 관계를 생성한다 . . ls_hri1001-adata <= 숙련도 정보 0001~0004