Нашел в архивах свой опус. Можно добавить колонку в PPOME/PPOSE с выводом разряда, оклада/тарифной ставки.
Создаем свою колонку, и сюда прописываем этот ФМ T77COL-CB_CONTENT.
Под катом исходник на страничку.
FUNCTION Z_HR_PLANNED_COMPENSATION_FILL.
*"----------------------------------------------------------------------
*"*"Локальный интерфейс:
*" IMPORTING
*" VALUE(COL_KEY) TYPE TV_ITMNAME
*" VALUE(TREE_HANDLE)
*" VALUE(KEY_DATE) LIKE OBJEC-BEGDA
*" VALUE(BEGDA) LIKE OBJEC-BEGDA
*" VALUE(ENDDA) LIKE OBJEC-ENDDA
*" TABLES
*" TREE_OBJECTS STRUCTURE TREE_OBJEC
*" TREE_STRUCTURE STRUCTURE TREE_STRUC
*" COLUMN_CONTENT STRUCTURE ORGNODECON
*" LEGEND_ICON_TEXT STRUCTURE TREELEGEND OPTIONAL
*"----------------------------------------------------------------------
DATA: lt_p1005 TYPE STANDARD TABLE OF p1005 WITH HEADER LINE.
data: l_betrg1 type betrg.
data: l_betrg2 type betrg.
data: s_cpmin type string,
s_cpmax type string.
data: s_betrg1 type string,
s_betrg2 type string.
LOOP AT tree_objects.
IF tree_objects-otype = ‘S’.
CALL FUNCTION ‘HR_READ_PLANNED_COMPENSATION’
EXPORTING
p_molga = ’33’
* P_TRFAR =
* P_TRFGB =
P_INDDA = KEY_DATE
p_position = tree_objects-objid
* P_JOB =
IMPORTING
P_P1005 = lt_p1005
EXCEPTIONS
NO_ACTIVE_PLANVERSION_FOUND = 1
MORE_THAN_ONE_RECORD_FOUND = 2
NO_RECORD_FOUND = 3
OTHERS = 4
.
check sy-subrc EQ 0.
MOVE-CORRESPONDING tree_objects TO column_content.
case lt_p1005-cpind.
when ‘T’. » Указана вилка тарифов
if lt_p1005-TRFS1 <> lt_p1005-TRFS2.
select single betrg from t510 into l_betrg1
where
molga = ’33’ and
TRFAR = lt_p1005-trfar and
TRFGB = lt_p1005-trfgb and
TRFKZ = lt_p1005-trfkz and
TRFGR = lt_p1005-trfg1 and
TRFST = lt_p1005-trfs1 and
begda le key_date and
endda ge key_date.
select single betrg from t510 into l_betrg2
where
molga = ’33’ and
TRFAR = lt_p1005-trfar and
TRFGB = lt_p1005-trfgb and
TRFKZ = lt_p1005-trfkz and
TRFGR = lt_p1005-trfg2 and
TRFST = lt_p1005-trfs2 and
begda le key_date and
endda ge key_date.
if l_betrg1 is initial or l_betrg2 is initial.
column_content-content = ‘Ошибка чтения данных’.
else.
s_betrg1 = l_betrg1.
s_betrg2 = l_betrg2.
CONCATENATE lt_p1005-TRFS1 ‘-‘ lt_p1005-TRFS2 ‘(‘ s_betrg1 ‘-‘ s_betrg2 ‘)’ into column_content-content.
endif.
else. » Указан один тариф, а не вилка
select single betrg from t510 into l_betrg1
where
molga = ’33’ and
TRFAR = lt_p1005-trfar and
TRFGB = lt_p1005-trfgb and
TRFKZ = lt_p1005-trfkz and
TRFGR = lt_p1005-trfg1 and
TRFST = lt_p1005-trfs1 and
begda le key_date and
endda ge key_date.
if sy-subrc <> 0.
column_content-content = lt_p1005-TRFS1.
else.
s_betrg1 = l_betrg1.
CONCATENATE lt_p1005-TRFS1 ‘(‘ s_betrg1 ‘)’ into column_content-content.
endif.
endif.
when ‘S’.
column_content-content = ‘Не настроено’.
when ‘D’.
s_cpmin = lt_p1005-cpmin.
s_cpmax = lt_p1005-cpmax.
if lt_p1005-cpmin = lt_p1005-cpmax.
concatenate ‘(‘ s_cpmin ‘)’ into column_content-content.
else.
concatenate ‘(‘ s_cpmin ‘-‘ s_cpmax ‘)’ into column_content-content.
endif.
endcase.
CONDENSE column_content-content NO-GAPS.
APPEND column_content.
endif.
ENDLOOP.
ENDFUNCTION.
Добавить комментарий
Для отправки комментария вам необходимо авторизоваться.