0% found this document useful (0 votes)
76 views5 pages

Zbusca Exit

1) O documento descreve um relatório que pesquisa ampliações e funções SAP de acordo com uma transação fornecida. 2) É construída uma árvore hierárquica listando as ampliações e funções encontradas. 3) O usuário pode selecionar ampliações ou funções na árvore para abrir suas definições ou documentações.

Uploaded by

fjaimesilva
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
76 views5 pages

Zbusca Exit

1) O documento descreve um relatório que pesquisa ampliações e funções SAP de acordo com uma transação fornecida. 2) É construída uma árvore hierárquica listando as ampliações e funções encontradas. 3) O usuário pode selecionar ampliações ou funções na árvore para abrir suas definições ou documentações.

Uploaded by

fjaimesilva
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 5

*&---------------------------------------------------------------------*

*& Report ZGERALDO002


*
*&
*
*&---------------------------------------------------------------------*
*&
*
*&
*
*&---------------------------------------------------------------------*
report zgeraldo002 no standard page heading.
*------------------------------------------------------------------*
*
*
* Autor: jos Ricardo Pinto Ribeiro - Consultor ABAP/4 SAP R/3
*
* Local: Goinia - 25/07/2003
*
*
*
* Este programa pesquisa todas as ampliaes e suas respectivas
*
* funes para modificaes de acordo com sua necessidade.
*
* Eventualmente, poder haver funes dentro destas ampliaes
*
* que no atenda o interessado, pois a pesquisa ser efetuada
*
* levando-se em conta a classe de desenvolvimento. Sabe-se, *
* entretanto, que o R3 prima por considerar cada processo dentro *
* uma unica classe de desenvolvimento.
*
*
*
*------------------------------------------------------------------*
tables :
tstc,
tstct,
tadir,
trdir,
tfdir,
modsapt,
modsap,
tftit,
enlfdir.

"
"
"
"
"
"

Cdigos transao SAP


Textos das transaes
Catlogo de objetos repository
Programas com seus atributos
Mdulos de funes
Textos breves ampliaes SAP

" Atributos adicionais das funes

data: begin of mylist occurs 50.


include structure snodetext.
data: end of mylist.

" Internal table hierarchy

data:
begin of tp occurs 10,
id,
nr(8),
text(255),
len
like textpool-length,
end of tp.
data: txt_report like dokhl-object.

"Report name for documentation

data: f15 type c, w_campo(30).


data :
t_objetos like tadir occurs 0 with header line,
v_classe like tadir-devclass,
cursor(30).
selection-screen begin of block b0 with frame.
selection-screen begin of block b1 with frame.
selection-screen begin of block b2 with frame.

selection-screen begin of block b3 with frame.


parameters :
p_tcode like tstc-tcode obligatory default 'VA01',
p_langu like sy-langu obligatory default 'PT'.
selection-screen end of block b3.
selection-screen end of block b2.
selection-screen end of block b1.
selection-screen end of block b0.
select single * from tstc where tcode eq p_tcode.
start-of-selection.
set pf-status 'TELA'.
get cursor field cursor.
read textpool sy-repid into tp language sy-langu.
loop at tp where id = 'R'.
set titlebar '001' with tp-text.
exit.
endloop.
perform monta_tabela.
perform build_tree.
perform draw_tree.
top-of-page.
format color col_positive intensified off.
write:/(19) 'Codigo Transao - ',
20(20) p_tcode,
45(50) tstct-ttext.
skip.
at line-selection.
check cursor(9) eq 'T_OBJETOS'.
set parameter id 'MON' field sy-lisel+1(10).
call transaction 'SMOD' and skip first screen.
*---------------------------------------------------------------------*
*
FORM build_tree
*
*---------------------------------------------------------------------*
*
........
*
*---------------------------------------------------------------------*
form build_tree.
call function 'RS_TREE_CONSTRUCT'
tables
nodetab
= mylist
exceptions
tree_failure = 1.
endform.

"build_tree

*---------------------------------------------------------------------*
*
FORM draw_tree
*
*---------------------------------------------------------------------*
*
........
*
*---------------------------------------------------------------------*
form draw_tree.
sy-lsind = 0.

call function 'RS_TREE_LIST_DISPLAY'


exporting
callback_program
= 'ZGERALDO002'
callback_user_command = 'USER_COMMAND' "'NODE_SELECT'
importing
f15
= f15.
endform.

"draw_tree

*&---------------------------------------------------------------------*
*&
Form monta_tabela
*&---------------------------------------------------------------------*
*
text
*----------------------------------------------------------------------*
* --> p1
text
* <-- p2
text
*----------------------------------------------------------------------*
form monta_tabela.
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_classe.
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 = enlfdir-area.
move : tadir-devclass to v_classe.
endif.
endif.
select * from tadir into table t_objetos
where pgmid = 'R3TR'
and object = 'SMOD'
and devclass = v_classe.
select single *
from tstct
where sprsl = p_langu
and tcode = p_tcode.
if not t_objetos[] is initial.
mylist-name = 'Ampliaes'.
mylist-color = 6.
mylist-intensiv = '1'.
mylist-text = 'Raiz'.

mylist-tlength = 10.
mylist-tlevel = 1.
mylist-tcolor = 6.
mylist-tintensiv = '1'.
mylist-text1 = 'Ampliaes'.
mylist-tlength1 = 30.
mylist-tcolor1 = 6.
mylist-tintensiv1 = '2'.
append mylist.
loop at t_objetos.
select single * from modsapt
where sprsl = p_langu
and name = t_objetos-obj_name.
mylist-name = 'Ampliaes'.
mylist-color = 4.
mylist-intensiv = '1'.
mylist-text = t_objetos-obj_name.
mylist-tlength = 10.
mylist-tlevel = 2.
mylist-tcolor = 4.
mylist-tintensiv = '1'.
mylist-text1 = modsapt-modtext.
mylist-tlength1 = 50.
mylist-tcolor1 = 4.
mylist-tintensiv1 = '2'.
append mylist.
select * from modsap
where name = t_objetos-obj_name
and typ = 'E'.
select single * from tftit
where spras
= 'PT'
and
funcname = modsap-member.
if sy-subrc ne 0.
tftit-stext = space.
endif.
mylist-name = 'Funes'.
mylist-color = 7.
mylist-intensiv = '1'.
mylist-text = modsap-member.
mylist-tlength = 30.
mylist-tlevel = 3.
mylist-tcolor = 7.
mylist-tintensiv = '1'.
mylist-text1 = tftit-stext.
mylist-tlength1 = 50.
mylist-tcolor1 = 7.
mylist-tintensiv1 = '2'.
append mylist.
endselect.
endloop.
else.
format color col_negative intensified on.
write:/(95) 'No existe ampliaes para esta transao'.
endif.
else.

format color col_negative intensified on.


write:/(95) 'Transao no existe'.
endif.
endform.

" monta_tabela

*---------------------------------------------------------------------*
*
FORM node_select
*
*---------------------------------------------------------------------*
form user_command tables knoten structure seucomm
using command
changing exit
list_refresh.
case command.
when 'TRSL'.
"F2 wurde gedrckt
if knoten-name = 'Ampliaes'.
set parameter id 'MON' field knoten-text.
call transaction 'SMOD' and skip first screen.
exit = ' '.
endif.
if knoten-name = 'Funes'.
set parameter id 'LIB' field knoten-text.
call transaction 'SE37'.
exit = ' '.
endif.
endcase.
list_refresh = 'X'.
endform.

"user_command

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy