We are using the qualification part of SAP HR and
would like to know if there is a report where you can see the description
per qualification, e.g. a qualification overview report. All the ones we've
found called "qualification overview" only gives you the name of the qualification
and who has it, but not the description of it.
In-house Abap Program:
Here is an ABAP program that
might help you. Feel free to modify the hardcodes in there.
By: Jason
REPORT ZRH_LISTE_COMPETENCE
line-count 65
line-size 165
message-id zh01.
*/ TABLES
tables: PERNR, HRP1000, HRP1001, HRPAD31.
type-pools: slis. "type-spool pour ALV
*/ INFOTYPES
infotypes: 0000, 0001, 0002, 0004.
types: begin of typ_competence,
objid like hrp1000-objid, " ID d'objet
otype like hrp1000-otype, " Type d'objet
begda like hrp1000-begda, " Date de début
endda like hrp1000-endda, " Date de fin
sclas like hrp1001-sclas, " Type d'objet relié
short like hrp1000-short, " Description d'objet court
stext like hrp1000-stext, " Description d'objet long
sobid like hrp1001-sobid,
istat like hrp1000-istat,
adatanr like hrpad31-adatanr,
chara like hrpad31-chara,
end of typ_competence.
types: begin of typ_scalequal,
objid like hrp1000-objid, " ID d'objet
otype like hrp1000-otype, " Type d'objet
begda like hrp1000-begda, " Date de début
endda like hrp1000-endda, " Date de fin
sobid like hrp1001-sobid,
short like hrp1000-short, " Description d'objet court
stext like hrp1000-stext, " Description d'objet long
scale like hrp1033-scale, " Scale Id
stextid like t77ts-stext, " Description Scale Id
end of typ_scalequal.
types: begin of typ_expqual,
objid like hrp1000-objid, " ID d'objet
otype like hrp1000-otype, " Type d'objet
begda like hrp1000-begda, " Date de début
endda like hrp1000-endda, " Date de fin
nyears like hrp1025-nyears, " Nombre annee
nmonths like hrp1025-nmonths, " Nombre mois
n_type like hrp1025-n_type, " Scale Id
end of typ_expqual.
types: begin of typ_valqual,
scale_id like t77tp-scale_id, " ID echelle
rating like t77tp-rating, " Chara
pstext like t77tp-pstext, " Designation valeur compétence
end of typ_valqual.
types: begin of typ_employe,
pernr like pa0001-pernr, " Matricule
fname like pa0001-ename, " Nom édité du
salarié ou du candidat
nachn like pa0002-nachn, " Nom de famille
vorna like pa0002-vorna, " Prénom
postd like hrp1000-stext, " Titre de fonction
depid like hrp1000-stext, " Service
persg like pa0001-persg, " Catégorie salariés
begda like pa0001-begda, " Date de début
endda like pa0001-endda, " Date de fin
werks like pa0001-werks, " Domaine du peronnel
btrtl like pa0001-btrtl, " Sous-domaine du personnel
vdsk1 like pa0001-vdsk1, " Clé d'organisation
end of typ_employe.
types: begin of typ_alv_resultat,
pernr like p0001-pernr, " Matricule
fname like pa0001-ename, " Nom édité du
salarié ou du candidat
nachn like pa0002-nachn, " Nom de famille
vorna like pa0002-vorna, " Prénom
postd like hrp1000-stext, " Titre de fonction
depid like hrp1000-stext, " Service
begda like hrp1000-begda, " Date de début
endda like hrp1000-endda, " Date de fin
werks like pa0001-werks, " Domaine du personnel
persg like pa0001-persg, " Catégorie salariés
btrtl like pa0001-btrtl, " Sous-domaine du personnel
vdsk1 like pa0001-vdsk1, " Clé d'organisation
sobid like hrp1001-sobid, " Code de l'objet
istat like hrp1000-istat, " statut planif.
short like hrp1000-short, " Description d'objet court
stext like hrp1000-stext, " Description d'objet long
* Ajout pour adatanr
adatanr like hrpad31-adatanr,
chara like hrpad31-chara,
pstext like t77tp-pstext, " Désignation d'une
valeur
objid like hrp1001-objid, " Code de group Qualification
shortqk like hrp1000-short, " Description QK d'objet
court
stextqk like hrp1000-stext, " Description QK d'objet
long
scale like hrp1033-scale, " Scale Id.
stextid like t77ts-stext, " Description Scale Id.
end of typ_alv_resultat.
data: t_competence type typ_competence occurs 0 with header
line,
t_scalequal type typ_scalequal occurs 0 with header line,
t_valqual type typ_valqual occurs 0 with header line,
t_expqual type typ_expqual occurs 0 with header line,
t_hrp1000 type hrp1000 occurs 0 with header line,
t_employe type typ_employe occurs 0 with header line,
t_alv_resultat type typ_alv_resultat occurs 0 with header
line,
t_fieldcat type slis_t_fieldcat_alv with header line,
t_alv_resultat1 type typ_alv_resultat.
data: v_begda like sy-datum,
v_endda like sy-datum,
v_layout type slis_layout_alv,
v_variant like disvariant.
*/ CONSTANTS
constants: c_p(1) value 'P',
c_q(1) value 'Q',
c_s(1) value 'S',
c_f(1) value 'F',
c_o(1) value 'O'.
*/ Écran de sélection
*select-options: s_werks for p0001-werks,
* s_btrtl for p0001-btrtl,
* s_persg for p0001-persg,
* s_vdsk1 for p0001-vdsk1.
selection-screen begin of block 1 with frame title text-016.
selection-screen begin of line.
parameters: p_rapnex radiobutton group 1 default 'X'.
selection-screen comment 4(29) text-017 for field p_rapnex.
selection-screen end of line.
selection-screen begin of line.
parameters: p_rapex radiobutton group 1 .
selection-screen comment 4(29) text-018 for field p_rapex.
selection-screen end of line.
select-options: s_format for hrp1000-short no intervals.
selection-screen end of block 1.
*/ Initialization
Initialization.
* Initialisation des dates
perform f_date_init.
*/ sélectionner les compétences des tables
HRP1000 rt HRP1001
perform f_select_competence.
at selection-screen on value-request for s_format-low.
perform f_show_competence.
*/ START-OF-SELECTION
start-of-selection.
perform f_table_init.
perform f_chercher_description.
if p_rapex eq 'X'.
* Selection les qualification expires
select objid otype begda endda nyears nmonths n_type
into corresponding fields of table t_expqual
from hrp1025
where plvar eq '01' and
otype = c_q.
endif.
get pernr.
clear t_employe.
rp-provide-from-last p0000 space pn-begda pn-endda.
rp-provide-from-last p0001 space pn-begda pn-endda.
rp-provide-from-last p0002 space pn-begda pn-endda.
* if p0001-btrtl in s_btrtl
* and p0001-werks in s_werks
* and p0001-persg in s_persg.
t_employe-pernr = p0001-pernr.
t_employe-werks = p0001-werks.
t_employe-btrtl = p0001-btrtl.
t_employe-vdsk1 = p0001-vdsk1.
* t_employe-ename = p0001-ename.
t_employe-nachn = p0002-nachn.
t_employe-vorna = p0002-vorna.
t_employe-persg = p0001-persg.
t_employe-begda = p0001-begda.
t_employe-endda = p0001-endda.
* Concaténation du nom de famille avec le prénom
séparé par une virgule suivi d'un espace.
Concatenate p0002-nachn p0002-vorna into t_employe-fname
separated by ', '.
rp-provide-from-last p0002 space pn-begda pn-endda.
rp-provide-from-last p0004 space pn-begda pn-endda.
v_begda = pn-begda.
v_endda = pn-endda.
perform f_chercher_description.
if not t_employe-pernr is initial.
append t_employe.
endif.
* endif. " if p0001-btrtl in s_btrtl
end-of-selection.
*/ Prendre toutes les compétences
perform f_traiter_competence.
*/ Gérer la grille ALV
perform f_display_grid_list.
*&---------------------------------------------------------------------*
*& Form f_date_init
*&---------------------------------------------------------------------*
* Initialiser les dates
*----------------------------------------------------------------------*
form f_date_init.
v_begda = sy-datum.
v_endda = sy-datum.
endform. " f_date_init
*&---------------------------------------------------------------------*
*& Form f_table_init
*&---------------------------------------------------------------------*
* Initialiser les tables de description.
*----------------------------------------------------------------------*
form f_table_init.
* Description poste et unité struc.
select otype objid stext into corresponding fields of
table t_hrp1000
from hrp1000
where plvar = '01'
and ( otype = c_o or otype = c_s )
and istat = '1'
* and begda <= pn-begda
* and endda >= pn-begda
and begda <= v_begda
and endda >= v_endda
and langu = sy-langu.
endform. " f_table_init.
*&---------------------------------------------------------------------*
*& Form f_chercher_description
*&---------------------------------------------------------------------*
* Trouver la description des postes, unités structurelles,
statuts.
*----------------------------------------------------------------------*
form f_chercher_description.
* Aller chercher description poste
clear t_hrp1000.
loop at t_hrp1000 where otype = c_s and objid = p0001-plans.
t_employe-postd = t_hrp1000-stext.
endloop.
* Aller chercher description unité structurelle
clear t_hrp1000.
loop at t_hrp1000 where otype = c_o and objid = p0001-orgeh.
t_employe-depid = t_hrp1000-stext.
endloop.
endform. " f_chercher_description
*&---------------------------------------------------------------------*
*& Form f_selection_competence
*&---------------------------------------------------------------------*
* Selection des compétences pour les employés
des tables
* HRP1000 et HRP1001
*----------------------------------------------------------------------*
form f_select_competence.
select a~objid a~otype a~begda a~endda a~sclas a~sobid
b~short b~stext b~istat
c~adatanr c~chara
into corresponding fields of table t_competence
from hrp1001 as a
inner join hrp1000 as b
on a~sobid = b~objid
and a~sclas = b~otype
inner join hrpad31 as c
on a~adatanr = c~adatanr
where a~otype = c_p
and b~otype = c_q
and b~langu = c_f.
* Les valeurs peuvent être différent de
1
* and c~chara = '1'.
* Selection le ID d'échelle et description pour
chaque group Qualification
select a~objid a~otype a~begda a~endda a~sobid
d~short
d~stext
b~scale
c~stext
into table t_scalequal
from hrp1001 as a
inner join hrp1033 as b
on a~sobid = b~objid
and a~sclas = b~otype
inner join hrp1000 as d
on a~sobid = d~objid
and a~sclas = d~otype
inner join t77ts as c
on b~scale = c~scale_id
where a~otype = c_q
and b~otype = 'QK'
and c~langu = c_f.
sort t_scalequal by objid.
* Selction désignation valeur compétence
select scale_id rating pstext
into corresponding fields of table t_valqual
from t77tp
where langu = c_f.
endform. " f_selection
*&---------------------------------------------------------------------*
*& Form f_traiter_competence
*&---------------------------------------------------------------------*
* Préparer la table des compétences associés
aux employés.
*----------------------------------------------------------------------*
form f_traiter_competence.
loop at t_competence.
check t_competence-short in s_format.
read table t_employe with key pernr = t_competence-objid.
if sy-subrc = 0.
check ( t_competence-endda >= pn-begda and t_competence-begda
<= pn-endda ).
t_alv_resultat-pernr = t_employe-pernr.
t_alv_resultat-fname = t_employe-fname.
t_alv_resultat-nachn = t_employe-nachn.
t_alv_resultat-vorna = t_employe-vorna.
t_alv_resultat-postd = t_employe-postd.
t_alv_resultat-depid = t_employe-depid.
t_alv_resultat-begda = t_competence-begda.
t_alv_resultat-endda = t_competence-endda.
t_alv_resultat-short = t_competence-short.
t_alv_resultat-stext = t_competence-stext.
t_alv_resultat-werks = t_employe-werks.
t_alv_resultat-persg = t_employe-persg.
t_alv_resultat-btrtl = t_employe-btrtl.
t_alv_resultat-vdsk1 = t_employe-vdsk1.
t_alv_resultat-sobid = t_competence-sobid.
t_alv_resultat-istat = t_competence-istat.
t_alv_resultat-adatanr = t_competence-adatanr.
t_alv_resultat-chara = t_competence-chara.
* Read scale id table
read table t_scalequal with key objid = t_competence-sobid.
if sy-subrc eq 0.
t_alv_resultat-objid = t_scalequal-sobid.
t_alv_resultat-stextqk = t_scalequal-stext.
t_alv_resultat-shortqk = t_scalequal-short.
t_alv_resultat-scale = t_scalequal-scale.
t_alv_resultat-stextid = t_scalequal-stextid.
* Read valeur compétence text
read table t_valqual with key scale_id = t_scalequal-scale
rating = t_competence-chara.
if sy-subrc eq 0.
t_alv_resultat-pstext = t_valqual-pstext.
endif.
endif.
if p_rapex eq 'X'.
* Read competences expires
read table t_expqual with key objid = t_competence-sobid
binary search.
if sy-subrc eq 0.
* Calcultate validity date
t_expqual-endda = t_competence-begda.
if t_expqual-nyears > 0.
t_expqual-endda(4) = t_competence-begda(4) + t_expqual-nyears.
endif.
if t_expqual-nmonths > 0.
t_expqual-endda+4(2) = t_competence-begda+4(2) + t_expqual-nmonths.
endif.
check ( t_expqual-endda >= pn-begda and t_expqual-endda
<= pn-endda ).
append t_alv_resultat.
endif.
else.
append t_alv_resultat.
endif.
endif.
endloop.
endform. " f_traiter_competence
*&---------------------------------------------------------------------*
*& Form f_display_grid_list
*&---------------------------------------------------------------------*
* Préparation pour le rapport ALV.
*----------------------------------------------------------------------*
form f_display_grid_list.
sort t_alv_resultat by depid pernr short begda descending.
delete adjacent duplicates from t_alv_resultat comparing
pernr short.
* Variante d'affichage pour fonction ALV
PERFORM f_alv_variant.
* LAYOUT pour fonction ALV
PERFORM f_alv_layout.
* FIELDCATALOG pour ALV Function
PERFORM f_alv_fieldcatalog.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-cprog
i_callback_user_command = 'F_USER_COMMAND'
is_layout = v_layout
it_fieldcat = t_fieldcat[]
i_save = 'A'
is_variant = v_variant
TABLES
t_outtab = t_alv_resultat
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. " f_display_grid_list
*&---------------------------------------------------------------------
*& Form f_alv_variant
*&---------------------------------------------------------------------
* Variantes pour ALV.
*----------------------------------------------------------------------
form f_alv_variant.
v_variant-report = sy-cprog. "sy-repid.
v_variant-username = sy-uname.
endform. "f_alv_variant
*&---------------------------------------------------------------------
*& Form f_alv_layout
*&---------------------------------------------------------------------
*
* Optimiser l'allure du ALV.
*----------------------------------------------------------------------
form f_alv_layout.
v_layout-colwidth_optimize = 'X'. "Optimiser Largeur
Colonne
v_layout-key_hotspot = 'X'. "HotSPot Les Champs Clés
v_layout-detail_initial_lines = 'X'. "Aff.Détail
Ligne avec valeur à 0
v_layout-zebra = 'X'. "Flip/Flop couleur des Lignes
endform. "f_alv_layout
*&---------------------------------------------------------------------
*& Form f_alv_fieldcatalog
*&---------------------------------------------------------------------
* Champ pour le rapport ALV.
*----------------------------------------------------------------------
form f_alv_fieldcatalog.
* CLEAR t_fieldcat.
* t_fieldcat-fieldname = 'PERNR'. " Matricule
* t_fieldcat-seltext_l = text-001.
* APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'FNAME'. " Nom + Prénom
t_fieldcat-seltext_l = text-002.
APPEND t_fieldcat.
* CLEAR t_fieldcat.
* t_fieldcat-fieldname = 'NACHN'. " Nom
* t_fieldcat-seltext_l = text-024.
* APPEND t_fieldcat.
* CLEAR t_fieldcat.
* t_fieldcat-fieldname = 'VORNA'. " Prénom
* t_fieldcat-seltext_l = text-025.
* APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'POSTD'. " Titre de fonction
t_fieldcat-seltext_l = text-026.
APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'DEPID'. " Service
t_fieldcat-seltext_l = text-027.
APPEND t_fieldcat.
* CLEAR t_fieldcat.
* t_fieldcat-fieldname = 'WERKS'. " Domaine du personnel
* t_fieldcat-seltext_l = text-005.
* APPEND t_fieldcat.
* CLEAR t_fieldcat.
* t_fieldcat-fieldname = 'PERSG'. " Catégories
salariés
* t_fieldcat-seltext_l = text-006.
* APPEND t_fieldcat.
* CLEAR t_fieldcat.
* t_fieldcat-fieldname = 'BTRTL'. " Sous-domaine du personnel
* t_fieldcat-seltext_l = text-007.
* APPEND t_fieldcat.
* CLEAR t_fieldcat.
* t_fieldcat-fieldname = 'VDSK1'. "Clé d'organisation
* t_fieldcat-seltext_l = text-010.
* APPEND t_fieldcat.
* CLEAR t_fieldcat.
* t_fieldcat-fieldname = 'SOBID'. " Code de l'objet
* t_fieldcat-seltext_l = text-008.
* APPEND t_fieldcat.
* CLEAR t_fieldcat.
* t_fieldcat-fieldname = 'ISTAT'. " Statut planif.
* t_fieldcat-seltext_l = text-009.
* APPEND t_fieldcat.
* CLEAR t_fieldcat.
* t_fieldcat-fieldname = 'SHORT'. " compétence
court
* t_fieldcat-seltext_l = text-003.
* APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'STEXT'. " Compétence long
t_fieldcat-seltext_l = text-004.
APPEND t_fieldcat.
* CLEAR t_fieldcat.
* t_fieldcat-fieldname = 'BEGDA'. " Date de début
* t_fieldcat-seltext_l = text-022.
* APPEND t_fieldcat.
CLEAR t_fieldcat.
t_fieldcat-fieldname = 'ENDDA'. " Date de fin
t_fieldcat-seltext_l = text-023.
APPEND t_fieldcat.
* CLEAR t_fieldcat.
* t_fieldcat-fieldname = 'ADATANR'. " Numéro ADATA
* t_fieldcat-seltext_l = text-011.
* APPEND t_fieldcat.
* CLEAR t_fieldcat.
* t_fieldcat-fieldname = 'CHARA'. " Valeur d'une compétence
* t_fieldcat-seltext_l = text-012.
* APPEND t_fieldcat.
* CLEAR t_fieldcat.
* t_fieldcat-fieldname = 'PSTEXT'. " Désignation
d'une valeur
* t_fieldcat-seltext_l = text-019.
* APPEND t_fieldcat.
* CLEAR t_fieldcat.
* t_fieldcat-fieldname = 'OBJID'. " Group Compétence
* t_fieldcat-seltext_l = text-013.
* APPEND t_fieldcat.
* CLEAR t_fieldcat.
* t_fieldcat-fieldname = 'SHORTQK'. " Group compétence
court
* t_fieldcat-seltext_l = text-020.
* APPEND t_fieldcat.
* CLEAR t_fieldcat.
* t_fieldcat-fieldname = 'STEXTQK'. " Group compétence
long
* t_fieldcat-seltext_l = text-021.
* APPEND t_fieldcat.
* CLEAR t_fieldcat.
* t_fieldcat-fieldname = 'SCALE'. "ID d'échelle
* t_fieldcat-seltext_l = text-014.
* APPEND t_fieldcat.
* CLEAR t_fieldcat.
* t_fieldcat-fieldname = 'STEXTID'. "Description ID d'échelle
* t_fieldcat-seltext_l = text-015.
* APPEND t_fieldcat.
endform. "f_alv_fieldcatalog
*&---------------------------------------------------------------------
*& Form f_user_command
*&---------------------------------------------------------------------
* Champ pour le rapport ALV.
*----------------------------------------------------------------------
form f_user_command using r_ucomm_2 like sy-ucomm rs_selfield_2
type slis_selfield.
case r_ucomm_2.
* &IC1 = doubleclick
when '&IC1'.
read table t_alv_resultat into t_alv_resultat index rs_selfield_2-tabindex.
set parameter id 'PER' field t_alv_resultat-pernr.
call transaction 'PA20'
and skip first screen.
endcase.
endform. " f_user_command
*&---------------------------------------------------------------------*
*& Form f_show_competence
*&---------------------------------------------------------------------*
* Bâtir toutes les valeurs possible pour permettre
une aide à la
* recherche pour les compétences.
*----------------------------------------------------------------------*
form f_show_competence.
DATA: begin of l_t_F4_competence occurs 0,
stext like hrp1000-stext,
short like hrp1000-short,
end of l_t_F4_competence.
* Ajout competence
loop at t_competence.
* where otype = c_q.
l_t_F4_competence-stext = t_competence-stext.
l_t_F4_competence-short = t_competence-short.
append l_t_F4_competence.
endloop.
* Détruire les doublons sur l'écran d'aide
à la recherche.
sort l_t_F4_competence by short stext.
delete adjacent duplicates from l_t_F4_competence comparing
short stext.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'TEXT'
dynpprog = sy-cprog
dynpnr = sy-dynnr
dynprofield = 's_formation-low'
value_org = c_s
TABLES
value_tab = l_t_F4_competence[]
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc NE 0.
MESSAGE ID 'ZH01' TYPE 'E' NUMBER '000'
WITH sy-subrc 'F4IF_INT_TABLE_VALUE_REQUEST' ' '.
ENDIF. |