********** PROGRAM A. report z_busca_ampliaciones no standard page heading line-size 80 line-count 65 message-id zm. *----------------------------------------------------------------------* * Tables/Views * *----------------------------------------------------------------------* tables: modsap, "SAP Extensions doktl. "Documentation - text lines *----------------------------------------------------------------------* * Data Statements for Internal Tables * *----------------------------------------------------------------------* * Ampliaciones SAP data: itab_mod like modsap occurs 0 with header line. * Documentacion - Lineas de texto data: itab_doktl like doktl occurs 0 with header line. *----------------------------------------------------------------------* * Selection-screen * *----------------------------------------------------------------------* selection-screen begin of block blk1 with frame. * Ampliación select-options: s_name for modsap-name. * Componente select-options: s_member for modsap-member. parameters: p_downld as checkbox. selection-screen end of block blk1. *----------------------------------------------------------------------* * Initialization * *----------------------------------------------------------------------* initialization. refresh: itab_mod. *----------------------------------------------------------------------* * Start-of-selection * *----------------------------------------------------------------------* start-of-selection. * Select the modifications into the internal table select * into table itab_mod from modsap where name in s_name and member in s_member and ( typ = space or typ = 'E' ). * Sort the internal table sort itab_mod. * For each of the modifications, get the documentation loop at itab_mod. at new name. new-line. uline. write: 'Enhancement:' color 5 inverse, itab_mod-name color 5. write at 60 sy-pagno. uline. skip. doktl-object = itab_mod-name. perform 1000_get_documentation using doktl-object. endat. "AT NEW name. check itab_mod-member > space. skip. new-line. write: 'Enhancement:' color 5 inverse, itab_mod-name color 5. write: 'Component:' color 4 inverse, itab_mod-member color 4. skip. doktl-object = itab_mod-member. perform 1000_get_documentation using doktl-object. at end of name. skip 2. endat. "AT END OF name. endloop. "LOOP AT itab_mod. * Download the list if not p_downld is initial. call function 'LIST_DOWNLOAD' exporting list_index = 0 method = ' '. endif. "IF NOT p_downld IS INITIAL. *&---------------------------------------------------------------------* *& Form 1000_GET_DOCUMENTATION *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->P_DOKTL_OBJECT text *----------------------------------------------------------------------* form 1000_get_documentation using p_doktl_object. * Refresh the documentation table clear itab_doktl. refresh itab_doktl. * Select the data select * into table itab_doktl from doktl where id = 'MO' and object = p_doktl_object and langu = sy-langu. if sy-subrc = 0. loop at itab_doktl. new-line. write: itab_doktl-doktext. endloop. "LOOP AT itab_doktl. else. "IF sy-subrc = 0. new-line. write: 'No documentation exists' color 6 inverse. endif. "IF sy-subrc = 0. endform. " 1000_GET_DOCUMENTATION ********** PROGRAM B. *&---------------------------------------------------------------------* *& Report Z_VERIFICA_USER_EXIT * *& * *&---------------------------------------------------------------------* *& * *& * *&---------------------------------------------------------------------* report z_verifica_user_exit line-size 140 no standard page heading. *======================================================================* * PROGRAMADOR: Marcos Guerra *----------------------------------------------------------------------* * PROGRAMA...: Z_VERIFICA_USER_EXIT *----------------------------------------------------------------------* * DATA.......: 15/02/2001 *----------------------------------------------------------------------* * OBJETIVO...: REVISA USER-EXITS EN UNA DETERMINADA TRANSACCION O * PROGRAMA. * *----------------------------------------------------------------------* * PARAMETROS.: P_PROG = NOMBRE DE PROGRAMA A SER REVISADO * P_TCODE = NOMBRE DE TRANSACCION A SER REVISADA * OBS.: UM DOS DOIS PARÂMETROS ACIMA DEVE SER ESPECIFICADO * * P_INCL = DETERMINA SI LA REVISION DEBE TENER EN * CONSIDERACION LOS INCLUDES. * P_FUNC = DETERMINA SI LA REVISION DEBE TENER EN * CONSIDERACION LAS FUNCIONES. * P_SUBMIT= DETERMINA SI LA REVISION DEBE TENER EN * CONSIDERACION LOS DEMAS PROGRAMAS LLAMADOS * POR SUBMIT. * * P_NIVEL = DETERMINA EL NIVEL DE LA REVISION HECHA DENTRO * DE LOS INCLUDES, FUNCIONES Y DEMAS PROGRAMAS. * EN EL NIVEL 1 SOLAMENTE SERA TOMADOS EN * CONSIDERACION EN EL PROGRAMA RAIZ. EN EL NIVEL * 2 SE REVISARAN LOS INCLUDES, FUNCIONES DENTRO * LOS INCLUDES, FUNCIONES DEL NIVEL 1 Y ASI * SUCESIVAMENTE. * * OBS.: EN EL PARAMETRO P_NIVEL INFORMAR VALORES BAJOS, * YA QUE A MAYOR NUMERO, MAYOR CANTIDAD DE CODIGO * SERA ANALIZADO *----------------------------------------------------------------------* * *======================================================================* *----------------------------------------------------------------------* * CONSTANTS *----------------------------------------------------------------------* constants: c_user_exit(22) type c value 'USEREXIT', c_enhance(22) type c value 'CALL CUSTOMER-FUNCTION', c_funcao_1(13) type c value 'CALLFUNCTION''', c_funcao_2(13) type c value 'CALL FUNCTION', c_include(07) type c value 'INCLUDE', c_submit(06) type c value 'SUBMIT', c_comentario type c value '*', c_ponto type c value '.', c_aspa type c value '''', c_x type c value 'X'. *----------------------------------------------------------------------* * TABLAS INTERNAS *----------------------------------------------------------------------* data: begin of ti_programa occurs 0, * codigo_fonte like rssource-line, codigo_fonte(250) type c, end of ti_programa. data: begin of ti_includes occurs 0, nome like sy-repid, nivel(2) type n, end of ti_includes. data: begin of ti_user_exit occurs 0, programa like sy-repid, linha(10) type n, codigo_fonte like rssource-line, nivel(2) type n, end of ti_user_exit. *----------------------------------------------------------------------* * VARIABLE GLOBALES *----------------------------------------------------------------------* data: vg_caracter type c, vg_palavra(50) type c, vg_inicial like sy-index, vg_conta_aspa type n, vg_pname like tfdir-pname, vg_texto(50) type c, vg_contador like sy-tfill, vg_nivel(2) type n, vg_ini_contagem type c, " INDICA QUE DEVE SER INICIADA A CONTADOR vg_conta_espaco type n. " TOTAL DE ESPACIOS (
Fuente:
http://aprendeabap.com/documentos_ABAP/Z_BUSCA_AMPLIACIONES.txt
Comentarios
Publicar un comentario