MUNDOSAP

Regresar   MUNDOSAP > DESARROLLO > Programación ABAP IV
Nombre de Usuario
Contraseña
Home Descargas Registrar FAQ Miembros Calendario Buscar Temas de Hoy Marcar Foros Como Leídos




 
Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Viejo 26/12/16, 15:55:47
amam2605 amam2605 is offline
Senior Member
 
Fecha de Ingreso: ene 2009
Mensajes: 150
No muestra cabecero en ALV

Hola !!!! Modifique el programa para que muestre un cabecero en la saldia del ALV, pero abre la caja mas no despliega la info (titulos y campos) dentro de ella, que puedo revisar.

Muchas Garcias de antemano.

Saludos

AMAM
Responder Con Cita
  #2  
Viejo 26/12/16, 20:28:55
sconoredhot sconoredhot is offline
Senior Member
 
Fecha de Ingreso: feb 2008
Localización: Argentina, Rosario
Mensajes: 341
Hola

Podrias pasarnos el codigo fuente para revisarlo ?
__________________
Sebas

Desarrollador ABAP.
Responder Con Cita
  #3  
Viejo 27/12/16, 18:53:15
amam2605 amam2605 is offline
Senior Member
 
Fecha de Ingreso: ene 2009
Mensajes: 150
Cabecero en ALV reporte HR


Hola es este:
* FELL6BK051310 14.11.2003 performance improvement with trimmings as
* side effect
* FELL6BK050334 30.10.2003 new comboboxes: current period / other period
* 46C FELL9CK137604 23.06.2003 new version with period comparison,
* archived data, programme log, various bugfixes.
* 46C FELL9CK132959 28.04.2003 improved compatibility w process manager
* 4.0C new development C.Frey: wage type reporter (successor of
* wage type statement/distribution RPCLGA00/09 RPCLGV00/09

report hxxcwtr0 no standard page heading.

include zzh99cwtr0_scr_def.
include zzh99cwtr0_data_def.

initialization.
rp-set-name-format.
perform initialise changing field_directory.

at selection-screen on value-request for p_extemp.
perform get_xlt_file changing p_extemp excel_template.

at selection-screen on value-request for p_lvtemp.
perform get_alv_variant changing alv_template p_lvtemp.

at selection-screen on value-request for p_grtemp.
perform get_alv_variant changing grid_template p_grtemp.

at selection-screen.
*983979 - UNNI To change the object selection string of old variants
perform replace_objselstrg changing p_h_strg.
perform selection_screen_input
using field_directory pyty_cal pyid_cal pyid_ref
yoc abkr_cal pcurperc pcurperr
changing ypernodt ycompper p_h_strg abkr_ref
begd_cal endd_cal abrp_cal abrj_cal bond_cal
begd_ref endd_ref abrp_ref abrj_ref bond_ref pyty_ref
begcalsh endcalsh begrefsh endrefsh
alv_template p_lvtemp
grid_template p_grtemp
excel_template p_extemp.

at selection-screen output.
perform convert_old_variants changing ypernodt begd_cal endd_cal
abkr_cal abrp_cal abrj_cal.
perform selection_screen_output using ypernodt hide_oc yoc
begcalsh begrefsh.

start-of-selection.
perform start_of_selection using ypernodt p_h_strg
changing field_directory ycompper driver
ip_beg ip_end fp_beg fp_end
ip_beg_ref ip_end_ref fp_beg_ref fp_end_ref.

get pernr.
perform core_proc
using ip_beg ip_end fp_beg fp_end
pyty_cal pyid_cal bond_cal s_pyty_c[]
ycompper arc_read false yoc ypernodt for_view.
if ycompper eq true.
perform core_proc
using ip_beg_ref ip_end_ref fp_beg_ref fp_end_ref
pyty_ref pyid_ref bond_ref s_pyty_c[]
ycompper arc_read true yoc ypernodt for_view.
perform filter_diffs in program (driver) using
s_absnum[] s_absamo[] s_relnum[] s_relamo[].
endif.
* if nullrecs eq false.
* perform delete_null_fields in program (driver).
* endif.

end-of-selection.

* Print report with sap script
perform print_form tables pers_table. " Donde la llena

if nullrecs eq false.
perform delete_null_fields in program (driver).
endif.

perform end_of_selection using driver excel_template alv_template
grid_template excel lv grid.

include zzh99cwtr0_forms.
include zzh99cwtr0_screen_2000.



*---------------------------------------------------------------------*
* PRINT THE INFORMATION OF THE REPORT *
*---------------------------------------------------------------------*
* --> P_FORM FORM TO PRINT *
*---------------------------------------------------------------------*
form print_form tables p_pers_table structure pers_table.
* p_int_sen STRUCTURE int_sen
* p_int_int STRUCTURE int_int
* p_sal_int STRUCTURE sal_int.
*
* DATA: text_element_tab TYPE pvesc_text_element_tab,
* current_text_element LIKE LINE OF text_element_tab,
* subrc LIKE sy-subrc.
*
* CHECK sy-ucomm NE c_cancel.
*
** sort p_int_int and p_int_sen results tables
* SORT p_int_sen BY pers_code fecha trans_code.
* SORT p_int_int BY pers_code fecha_int cntr1.
sort p_pers_table by pers_code. " AA

* Print the report. Loop at pers_table
loop at p_pers_table.

alv_out-pernr = p_pers_table-pers_code.
alv_out-cname = p_pers_table-cname.
alv_out-nombre = p_pers_table-nombre.

* READ TABLE p_sal_int WITH KEY p_pers_table-pers_code.
**
** alv_out-begda = p_sal_int-fecha_ing.
** alv_out-anos = p_sal_int-anos.
** alv_out-amt01 = p_sal_int-monto_sal.
** alv_out-amt03 = p_sal_int-monto_prt.

** Print seniority table
* PERFORM print_sen TABLES p_int_sen
* USING p_pers_table-pers_code.
*
* alv_out-amt02 = saldo_without_adv_pay.
* alv_out-amt04 = alv_out-amt03 - alv_out-amt02.
*
* IF alv_out-amt04 < 0.
* alv_out-amt04 = 0.
* ENDIF.

append alv_out.

endloop.

perform print_alv.

*
*
endform. " PRINT_FORM


*&---------------------------------------------------------------------*
*& Form PRINT_ALV
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
form print_alv .
* Carga de Campos para ALV
perform init_fieldcat.
* Atributos de ALV
perform init_layout.
* Ordenar ALV
perform init_sort.
* Carga de Eventos
perform eventtab_build_01 changing gt_events.
* Cabecera de ALV
perform comment_build_01 using gt_list_top_of_page.
* ALV
perform mostrar_alv_01.

endform. " PRINT_ALV


*&---------------------------------------------------------------------*
*& Form COMMENT_BUILD_01
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_GT_LIST_TOP_OF_PAGE text
*----------------------------------------------------------------------*
form comment_build_01 using lt_top_of_page type slis_t_listheader.

data: ls_line type slis_listheader,
datum_tx(10).

refresh: lt_top_of_page.

* Title
* LIST HEADING LINE: TYPE H
clear ls_line.
ls_line-typ = 'H'.
ls_line-info = 'Reporte INCE'.
append ls_line to lt_top_of_page.


write: 'hola'.

clear ls_line.
ls_line-typ = 'S'.
write sy-uzeit
to sy-uzeit
using edit mask '__:__'.

write sy-datum
to datum_tx
using edit mask '__/__/____'.

concatenate 'Ejecutado el día: '
datum_tx
' A las: '
sy-uzeit
into ls_line-info
separated by space.
append ls_line to lt_top_of_page.

clear ls_line.
ls_line-typ = 'S'.
concatenate 'Ejecutado por : '
sy-uname
into ls_line-info
separated by space.
append ls_line to lt_top_of_page.

clear ls_line.
ls_line-typ = 'S'.
append ls_line to lt_top_of_page.

endform. " COMMENT_BUILD_01

*&---------------------------------------------------------------------*
*& Form EVENTTAB_BUILD_01
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* <--P_GT_EVENTS text
*----------------------------------------------------------------------*
form eventtab_build_01 changing pgt_events type slis_t_event.

constants:
gc_formname_top_of_page type slis_formname value 'TOP_OF_PAGE_01'.

data: ls_event type slis_alv_event.

call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = pgt_events.

read table pgt_events with key name = slis_ev_top_of_page
into ls_event.

if sy-subrc = 0.
move gc_formname_top_of_page to ls_event-form.
append ls_event to pgt_events.
endif.

endform. " EVENTTAB_BUILD_01


*&---------------------------------------------------------------------*
*& Form INIT_FIELDCAT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
form init_fieldcat .

refresh: gt_fieldcat.
clear w_posi.

* nombre del Programa
g_repid = sy-repid.

w_posi = w_posi + 1.
gt_fieldcat-tabname = 'ALV_OUT'.
gt_fieldcat-fieldname = 'PERNR'.
gt_fieldcat-outputlen = 15.
gt_fieldcat-reptext_ddic = 'Nro personal'.
gt_fieldcat-seltext_l = 'Nro personal'.
gt_fieldcat-ddictxt = 'L'.
gt_fieldcat-col_pos = w_posi.
append gt_fieldcat. clear gt_fieldcat.

w_posi = w_posi + 1.
gt_fieldcat-tabname = 'ALV_OUT'.
gt_fieldcat-fieldname = 'CNAME'.
gt_fieldcat-outputlen = 40.
gt_fieldcat-reptext_ddic = 'Compañia'.
gt_fieldcat-seltext_l = 'Compañia'.
gt_fieldcat-ddictxt = 'L'.
gt_fieldcat-col_pos = w_posi.
append gt_fieldcat. clear gt_fieldcat.

w_posi = w_posi + 1.
gt_fieldcat-tabname = 'ALV_OUT'.
gt_fieldcat-fieldname = 'NOMBRE'.
gt_fieldcat-outputlen = 40.
gt_fieldcat-reptext_ddic = 'Nombre'.
gt_fieldcat-seltext_l = 'Nombre'.
gt_fieldcat-ddictxt = 'L'.
gt_fieldcat-col_pos = w_posi.
append gt_fieldcat. clear gt_fieldcat.


endform. " INIT_FIELDCAT

*&---------------------------------------------------------------------*
*& Form INIT_LAYOUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
form init_layout .
gs_layout-colwidth_optimize = 'X'.
gs_layout-zebra = 'X'.
gs_layout-no_input = ' '.
endform. " INIT_LAYOUT

*&---------------------------------------------------------------------*
*& Form INIT_SORT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
form init_sort .
refresh: gt_sort.clear gt_sort.
clear w_posi.

* Sortear por Código de Sociedad
w_posi = w_posi + 1.
gt_sort-spos = w_posi.
gt_sort-tabname = 'ALV_OUT'.
gt_sort-fieldname = 'PERNR'.
append gt_sort. clear gt_sort.

endform. " INIT_SORT


*&---------------------------------------------------------------------*
*& Form MOSTRAR_ALV_01
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
form mostrar_alv_01 .
* Inicialización de Variante de Trabajo
ls_vari-report = sy-repid.
ls_vari-handle = space.
ls_vari-log_group = space.
ls_vari-username = space.
ls_vari-variant = space.
ls_vari-text = space.
ls_vari-dependvars = space.

call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = g_repid
is_layout = gs_layout
it_fieldcat = gt_fieldcat[]
it_sort = gt_sort[]
it_excluding = gt_exclude[]
is_variant = ls_vari
it_events = gt_events[]
tables
t_outtab = alv_out
exceptions
program_error = 1
others = 2.

if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.

endform. " MOSTRAR_ALV_01
Responder Con Cita
Respuesta


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Reglas de Mensajes
no puedes crear nuevos temas
no puedes responder temas
no puedes adjuntar archivos
no puedes editar tus mensajes

El código vB está On
Las caritas están On
Código [IMG] está On
Código HTML está Off
Saltar a Foro


Husos Horarios son GMT. La hora en este momento es 08:23:23.


www.mundosap.com 2006 - Spain
software crm, crm on demand, software call center, crm act, crm solutions, crm gratis, crm web