report Z_BUSCA_BADI no standard page heading. *------------------------------------------------------------------* * * * Este programa pesquisa todas as ampliações e suas respectivas * * funções para modificações de acordo com sua necessidade. * * Eventualmente, poderá haver funções dentro destas ampliações * * que não 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, desta forma ficará fácil * * localizar aquela que melhor o atenderá. * * * * Para acessar as transações de modificações, basta apenas clicar * * sobre o nome do objeto. * * * *------------------------------------------------------------------* tables : tstc, " Códigos transação SAP tstct, " Textos das transações tadir, " Catálogo de objetos repository trdir, " Programas com seus atributos tfdir, " Módulos de funções sxs_attrt, " Textos breves BADIções SAP modact, " Vínculo entre Ampliações e Projetos modtext, " Textos de projetos modsap, " Vínculo entre Funções e Projetos tftit, " Textos de funções enlfdir. " Atributos adicionais das funções data: begin of mylist occurs 50. " Internal table hierarchy include structure snodetext. data: end of mylist. data: * begin of tp occurs 10, * id, * nr(8), * text(255),"lenght * end of tp, tp type table of textpool with header line, t_objetos like tadir occurs 0 with header line, f15 type c, v_cursor(30), v_classe like tadir-devclass. parameters : p_tcode like tstc-tcode obligatory modif id abc. parameters : p_langu like sy-langu obligatory default sy-langu. at selection-screen output. loop at screen. if screen-group1 = 'ABC'. screen-intensified = '1'. modify screen. endif. endloop. start-of-selection. set pf-status 'TELA'. set pf-status 'TELA2'. read textpool sy-repid into tp language sy-langu. loop at tp where id = 'R'. set titlebar '001' with tp-length. exit. endloop. perform monta_tabela. check not t_objetos[] is initial. perform monta_arvore. perform lista_arvore. at user-command. case sy-ucomm. when 'BACK' or 'EXIT' or 'CANC'. set screen 0. leave program. when others. endcase. top-of-page. format color col_positive intensified off. write:/(19) 'Codigo Transação - ', 20(20) p_tcode, 45(50) tstct-ttext. skip. *---------------------------------------------------------------------* * FORM Monta_arvore * *---------------------------------------------------------------------* * ........ * *---------------------------------------------------------------------* form monta_arvore. call function 'RS_TREE_CONSTRUCT' tables nodetab = mylist exceptions tree_failure = 1. endform. *---------------------------------------------------------------------* * FORM Lista_arvore * *---------------------------------------------------------------------* * ........ * *---------------------------------------------------------------------* form lista_arvore. sy-lsind = 0. call function 'RS_TREE_LIST_DISPLAY' exporting callback_program = sy-cprog callback_user_command = 'USER_COMMAND' importing f15 = f15. endform. *&---------------------------------------------------------------------* *& Form monta_tabela *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-- p2 text *----------------------------------------------------------------------* form monta_tabela. 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_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. * Seleciona as BADIS vinculadas à transação select * from tadir into table t_objetos where pgmid = 'R3TR' and object = 'SXSD' and devclass = v_classe. select single * from tstct where sprsl = p_langu and tcode = p_tcode. if not t_objetos[] is initial. mylist-name = tstct-ttext. mylist-color = 3. mylist-intensiv = '1'. mylist-text = p_tcode. mylist-tlength = 10. mylist-tlevel = 1. mylist-tcolor = 3. mylist-tintensiv = '1'. mylist-text1 = tstct-ttext. "TEXTO DA TRANSAÇÃO mylist-tlength1 = 67. mylist-tcolor1 = 3. mylist-tintensiv1 = '2'. ** mylist-text3 = 'Projetos'. mylist-tlength3 = 15. append mylist. clear mylist-text3. loop at t_objetos. * Obtém descrição da BADI select single text into sxs_attrt-text from sxs_attrt where exit_name = t_objetos-obj_name and sprsl = sy-langu. ** select single * from modsapt ** where sprsl = p_langu ** and name = t_objetos-obj_name. * Verifica se há algum projeto vinculado select name into modact-name from modact up to 1 rows where member = t_objetos-obj_name and name ne space. endselect. if sy-subrc = 0. * Localiza a descrição do projeto select single modtext into modtext-modtext from modtext * where sprsl = p_langu ****** A descrição do projeto neste ambiente não foi traduzida para ****** outro idioma, portanto mostro o primeiro que encontrar. JRR where name = modact-name. if sy-subrc = 0. mylist-text3 = modtext-modtext. mylist-tlength3 = 25. mylist-tcolor3 = 2. mylist-tintensiv3 = '2'. else. clear: mylist-text3. endif. else. modact-name = '_______________'. endif. mylist-name = 'BADIs'. mylist-color = 4. mylist-intensiv = '1'. mylist-text = t_objetos-obj_name. mylist-tlength = 75. mylist-tlevel = 2. mylist-tcolor = 4. mylist-tintensiv = '1'. mylist-text1 = sxs_attrt-text. "Descrição da BADI mylist-tlength1 = 60. mylist-tcolor1 = 4. mylist-tintensiv1 = '2'. mylist-text2 = modact-name. mylist-tlength2 = 10. mylist-tcolor2 = 6. mylist-tintensiv2 = '2'. append mylist. clear: mylist-text3. * Seleciona as FUNÇÕES vinculadas às BADIs 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 = 'Funções'. 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 = 60. mylist-tcolor1 = 7. mylist-tintensiv1 = '2'. clear: mylist-text2, mylist-tlength2. append mylist. endselect. endloop. else. format color col_negative intensified on. write:/(95) 'Não existe BADI para esta transação'. endif. else. format color col_negative intensified on. write:/(95) 'Transação não existe'. endif. endform. " monta_tabela *---------------------------------------------------------------------* * FORM user_command * *---------------------------------------------------------------------* form user_command tables knoten structure seucomm using command changing exit list_refresh. check knoten-text ne p_tcode. case command. when 'TRSL'. get cursor field v_cursor. if knoten-name = 'BADIs'. if v_cursor = 'NODELIST-TEXT2' and knoten-text2 ne '________'. set parameter id 'MON_KUN' field knoten-text2. call transaction 'CMOD'. else. set parameter id 'EXN' field knoten-text. call transaction 'SE18' and skip first screen. endif. exit = ' '. endif. if knoten-name = 'Funções'. set parameter id 'LIB' field knoten-text. call transaction 'SE37'. exit = ' '. endif. endcase. list_refresh = 'X'. endform.