Ir al contenido principal

Z_BUSCA_AMPLIACIONES

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

Entradas más populares de este blog

A to Z of OLE Excel in ABAP 7.4

  SAP users, both business and end users always need to download the output of a report to spreadsheet and do their analytics.   The standard excel output from a report is very simple process but it is old fashioned and the spreadsheet looks quite boring.  There is no default formatting and the users have to do all the hard work of changing the fonts, coloring the texts, marking the borders etc. Updated 16th Aug 2019  –  If you are working in non-ABAP 7.4 (below), there is complete reference program for you too. Go to the end of this article.  Thank you  Legxis  ( LeonievonK ) for the share. I acknowledge, whatever I mentioned above can be achieved in many ways programmatically. We can do it in the old traditional ABAP way but  providing multiple tabs in the spreadsheet and formatting is quite tricky with non  OLE  method. OLE = Object Linking and Embedding The high level agenda of this article is to be the  G.O.A.T.  (please google it if you do not know the full form)  of OLE Excel Gu
How to add custom field in Additional B Tab for SAP Sales Order In this article we want to explain step by step how to add custom field in SAP Sales Order transaction VA01/VA02/VA03. This time Mr ABAPGurus will give the tutorial of enhancement to add custom field in SAP Sales order. In this sample we will add new custom field for comments and customer satisfaction, this data will save into separate table from SAP Standard table ( VBAK / VBAP ). SAP provided us with ADDITIONAL TAB in the sales order transaction ( VA01/VA02/VA03 ) which allow customer to add custom fields.  T he different between ADDITIONAL A and ADDITIONAL B is the ADDITIONAL A for field which already predefine in Sales Order Header ( VBAK ) fields and ADDITIONAL B is for field that freely define. This sample we will use ADDITIONAL B because we will store data from customer satisfaction into Z database table. 1. Create one Z table using SE11 SAP Transaction code. 2.Using SE38 Transaction code and ope

VOFM

Creating VOFM custom routine, functionality same as SAP standard routine 103 with Additional Functionality 1.    Introduction 1.1   Document Purpose 1.2    This is the document helps you to create custom routine for sales order for below specific requirement: Functional description: In case of sale order with the SD document category ‘K’ or ‘L’ or ‘H’ related to an invoice, we need to fill the fixed value date (VBKD_VALDT) with the billing reference date (VBRK_FKDAT). For example: Invoice 90001111, the billing date is 22.07.2013 If we create a sale order related to this invoice, we want the fixed value date equal to the billing reference date. As per the requirement: Sap standard routine ‘103’ triggers whenever sales order is being created with reference. Sap standard routine is configured in VOFM transaction as: Sap standard routine ‘103’ has the functionality of copying the billing document header data and billing document line item data into the