09-14-2021 9:44 AM
I want to add custom fields in output S_AHR_61016503 HR report - Staff assignments,
Does anyone know the right place to do this(User exit, Enhancement,...)?
Thanks if anyone has any information to help
09-14-2021 12:36 PM
Hi slizadeh
We can achieve this by creating an implicit enhancement point, but as always this is not the best practice suggested by SAP. If you do implicit enhancements during the time of the EHP upgrade this enhancement will not be supported.
You can follow the below steps to achieve this. Refer to the bold alphabets where you need to write your requirement coding.
* structure for detail modus
DATA: BEGIN OF LIST_TAB,
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1) Struct. LIST_TAB, End S
*$*$-Start: (1)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 1 ZFIELDS. "active version
DATA:gsber type gsber.
ENDENHANCEMENT.
*$*$-End: (1)---------------------------------------------------------------------------------$*$*
END OF LIST_TAB.
FORM GET_TAB_INFORMATION TABLES DETAIL_TAB STRUCTURE DETAIL_LIST
LIST_OUT STRUCTURE LIST_TAB
ORG_TAB STRUCTURE ORG_TAB
POS_STRUC STRUCTURE POS_STRUC
PER_STRUC STRUCTURE PER_STRUC
USING VALUE(TAB_INDEX) LIKE SY-TABIX
SUBRC LIKE SY-SUBRC
P_ORGUNIT LIKE ORG_TAB-ORG_OBJID
P_ORGTEXT LIKE ORG_TAB-STEXT
VALUE(PERCK_TEXT) LIKE T77MT-MTEXT.
*****MODIFY YOUR LIST_OUT Internal Table with the data you want by creating implicit enhancement
ENDORM.
FORM FILL_SEQU_FIELDCAT USING LIST_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV
D_COL_QUEUE TYPE COL_QUEUE.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1) Form FILL_SEQU_FIELDCAT, End A
*$*$-Start: (1)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 2 ZFIELDS. "active version
BREAK-POINT.
PERFORM FILL_seq_FIELDCAT_LINE TABLES LIST_FIELDCAT D_COL_QUEUE
USING ACT_COL "col_pos
' ' "row_pos
'GSBER' "fieldname
20 "outputlen
'Business Area'"seltext_l
'LIST_OUT' "tabname
' ' "icon
' ' "no_out
'C' "sp_group
' ' "do_sum
'C' "just
' ' "emphasize
'CHAR' "datatype
'C' "inttype
'X' "lowercase
' '
' '.
ENDENHANCEMENT.
*$*$-End: (1)---------------------------------------------------------------------------------$*$*
ENDFORM.
09-14-2021 10:57 AM
Just look at the program, you will see that there's no user exit.
09-14-2021 12:36 PM
Hi slizadeh
We can achieve this by creating an implicit enhancement point, but as always this is not the best practice suggested by SAP. If you do implicit enhancements during the time of the EHP upgrade this enhancement will not be supported.
You can follow the below steps to achieve this. Refer to the bold alphabets where you need to write your requirement coding.
* structure for detail modus
DATA: BEGIN OF LIST_TAB,
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1) Struct. LIST_TAB, End S
*$*$-Start: (1)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 1 ZFIELDS. "active version
DATA:gsber type gsber.
ENDENHANCEMENT.
*$*$-End: (1)---------------------------------------------------------------------------------$*$*
END OF LIST_TAB.
FORM GET_TAB_INFORMATION TABLES DETAIL_TAB STRUCTURE DETAIL_LIST
LIST_OUT STRUCTURE LIST_TAB
ORG_TAB STRUCTURE ORG_TAB
POS_STRUC STRUCTURE POS_STRUC
PER_STRUC STRUCTURE PER_STRUC
USING VALUE(TAB_INDEX) LIKE SY-TABIX
SUBRC LIKE SY-SUBRC
P_ORGUNIT LIKE ORG_TAB-ORG_OBJID
P_ORGTEXT LIKE ORG_TAB-STEXT
VALUE(PERCK_TEXT) LIKE T77MT-MTEXT.
*****MODIFY YOUR LIST_OUT Internal Table with the data you want by creating implicit enhancement
ENDORM.
FORM FILL_SEQU_FIELDCAT USING LIST_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV
D_COL_QUEUE TYPE COL_QUEUE.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1) Form FILL_SEQU_FIELDCAT, End A
*$*$-Start: (1)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 2 ZFIELDS. "active version
BREAK-POINT.
PERFORM FILL_seq_FIELDCAT_LINE TABLES LIST_FIELDCAT D_COL_QUEUE
USING ACT_COL "col_pos
' ' "row_pos
'GSBER' "fieldname
20 "outputlen
'Business Area'"seltext_l
'LIST_OUT' "tabname
' ' "icon
' ' "no_out
'C' "sp_group
' ' "do_sum
'C' "just
' ' "emphasize
'CHAR' "datatype
'C' "inttype
'X' "lowercase
' '
' '.
ENDENHANCEMENT.
*$*$-End: (1)---------------------------------------------------------------------------------$*$*
ENDFORM.
09-14-2021 1:01 PM
vipin_saraika When you say "If you do implicit enhancements during the time of the EHP upgrade this enhancement will not be supported", I guess you mean not supported like any other custom development.
09-15-2021 4:16 AM
Hi dear vipin_saraika
Thank you very much.
I tested your answer and it is work, your solution is correct.
Please write your comment in "Answer" place so I can accept and vote and set "Best Answer" for you
09-15-2021 7:33 AM