Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Add new fields in tcode S_AHR_61016503 HR

SaeedGholizadeh
Participant
0 Kudos

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

1 ACCEPTED SOLUTION

vipinsaraika
Participant

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.

  1. Include RHSBETOP2
  • Line 244

* 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.

  1. Include RHSBES00
  • Line 2925

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.

  • Line 3949

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.

5 REPLIES 5

Sandra_Rossi
Active Contributor

Just look at the program, you will see that there's no user exit.

vipinsaraika
Participant

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.

  1. Include RHSBETOP2
  • Line 244

* 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.

  1. Include RHSBES00
  • Line 2925

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.

  • Line 3949

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.

Sandra_Rossi
Active Contributor

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.

SaeedGholizadeh
Participant

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

vipinsaraika
Participant

Done, Cheers!