2015 Mar 03 9:48 AM
Hi,
I want add the extra fields in the output of IH11 tcode in sap abap.Is there any user exit or need find the any implicity enhancement.
Please let me know .
Regards,
Shilpa Reddy.
Hi,
I want add the extra fields in the output of IH11 tcode in sap abap.Is there any user exit or need find the any implicity enhancement.
Please let me know .
Regards,
Shilpa Reddy.
2015 Mar 03 10:07 AM
Use this report to find user exit for any tcode.
REPORT ZUSEREXIT.
tables : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.
tables : tstct.
data : jtab like tadir occurs 0 with header line.
data : field1(30).
data : v_devclass like tadir-devclass.
parameters : p_tcode like tstc-tcode obligatory.
select single * from tstc where tcode eq p_tcode.
if sy-subrc eq 0.
select single * from tadir where pgmid = 'R3TR'
and object = 'PROG'
and obj_name = tstc-pgmna.
move : tadir-devclass to v_devclass.
if sy-subrc ne 0.
select single * from trdir where name = tstc-pgmna.
if trdir-subc eq 'F'.
select single * from tfdir where pname = tstc-pgmna.
select single * from enlfdir where funcname =
tfdir-funcname.
select single * from tadir where pgmid = 'R3TR'
and object = 'FUGR'
and obj_name eq enlfdir-area.
move : tadir-devclass to v_devclass.
endif.
endif.
select * from tadir into table jtab
where pgmid = 'R3TR'
and object = 'SMOD'
and devclass = v_devclass.
select single * from tstct where sprsl eq sy-langu and
tcode eq p_tcode.
format color col_positive intensified off.
write:/(19) 'Transaction Code - ',
20(20) p_tcode,
45(50) tstct-ttext.
skip.
if not jtab[] is initial.
write:/(95) sy-uline.
format color col_heading intensified on.
write:/1 sy-vline,
2 'Exit Name',
21 sy-vline ,
22 'Description',
95 sy-vline.
write:/(95) sy-uline.
loop at jtab.
select single * from modsapt
where sprsl = sy-langu and
name = jtab-obj_name.
format color col_normal intensified off.
write:/1 sy-vline,
2 jtab-obj_name hotspot on,
21 sy-vline ,
22 modsapt-modtext,
95 sy-vline.
endloop.
write:/(95) sy-uline.
describe table jtab.
skip.
format color col_total intensified on.
write:/ 'No of Exits:' , sy-tfill.
else.
format color col_negative intensified on.
write:/(95) 'No User Exit exists'.
endif.
else.
format color col_negative intensified on.
write:/(95) 'Transaction Code Does Not Exist'.
endif.
at line-selection.
get cursor field field1.
check field1(4) eq 'JTAB'.
set parameter id 'MON' field sy-lisel+1(10).
call transaction 'SMOD' and skip first screen.
2015 Mar 03 1:27 PM
Hi Shilpa,
If you want to add new fields to ALV output, you have to make sure the following things
The final table points to structure OBJECT_TAB. Add the new fields in the structure OBJECT_TAB using implicit enhancement as shown below.
Final Internal Table is printing using REUSE_ALV_GRID_DISPLAY/REUSE_ALV_LIST_DISPLAY
Structure at where implicit enhancement is possible to add new fields
IH11 is a report program, using implicit enhancement concept, we can fill the field catalog; also assign the values to the newly added fields in final internal table OBJECT_TAB.
Then you can find the new fields with value in ALV Output. Hope it works.
Regards
Rajkumar Narasimman
2015 Mar 03 2:08 PM
Thanks for your reply Rajkumar.
I can add the fields here. Then where i need to fill the added fields.
Means in which loop statement i need to fill these fields.
Regards,
Shilpa.
2015 Mar 03 2:17 PM
Hi Shilpa,
Find any enhancements points are possible before append statement. But in most of the case in standard, we won't get like this.
Before calling REUSE_ALV_GRID_DISPLAY, we need to fill the values for the newly added columns. The Function REUSE_ALV_GRID_DISPLAY/REUSE_ALV_LIST_DISPLAY is written in some subroutine, at the beginning you may find some enhancement points in there, we can modify the values of final internal table using field symbol concept.
LOOP AT OBJECT_TAB ASSIGING <FS_OBJECT>.
<FS_OBJECT>-FIELD1 = 'NEW_VALUE'.
ENDLOOP.
Regards
Rajkumar Narasimman
2015 Mar 03 2:32 PM
And Where i need to maintain the fieldcatalog.?
Regards,
Shilpa
2015 Mar 03 3:48 PM
Hi..
In the same place, at where you are changing the internal table value, you can maintain the field catalog too..
Regards
Rajkumar Narasimman
2015 Mar 03 6:20 PM
Thanks Rajkumar.
And last question is where i need to write select query and in which loop i need to call the read statement.Please mention the screenshots if possible.It is very help to me ...
Regards,
Shilpa Reddy.
2015 Mar 03 8:16 PM
Hi Shilpa,
Normally in Customize code, the following sections
all the above will maintain separately, we write codes separately.
But the difference in standard program, we are using inside implicit enhancement , we are going to write all the above section code in the same place.
Please find the enhancement point in Program RIIFL020 in Subroutine SELECTION_L. Consider the bottom enhancement point which is at the end of subroutine SELECTION_L as shown in the screenshot.
Write the Select, Read and fill the field catalog inside the implicit enhancement itself.
Hope it will work.
Regards
Rajkumar Narasimman
2015 Mar 06 7:00 AM
Hi Rajkumar,
If done the changes, these changes will effect any other functionality?
Means i am going to change standard program,so that's why i am asking?
Please let me know.
Regards,
Shilpa
2015 Mar 06 9:52 AM
Hi Shilpa,
Most of the standard programs are written for reusability. So the standard code may call from any program using the following
So, during enhancement, we use to mention the condition based on which T-code the code should execute like below.
IF sy-tcode = 'IH11'.
"Enhancement code.
ENDIF.
Regards
Rajkumar Narasimman
2015 Mar 06 10:21 AM
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |