Sunteți pe pagina 1din 3

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

*& Report ZOAW_R02_030


*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZOAW_R02_030.
PARAMETERS:
P_FECHA TYPE DATum,
radio type boolean.
CONSTANTS:
c_01(12) type C value 'Enero',
c_02(12) type C value 'Febrero',
c_03(12) type C value 'Marzo',
c_04(12) type C value 'Abril',
c_05(12) type C value 'Mayo',
c_06(12) type C value 'Junio',
c_07(12) type C value 'Julio',
c_08(12) type C value 'Agosto',
c_09(12) type C value 'Septiembre',
c_010(12) type C value 'Octubre',
c_011(12) type C value 'Noviembre',
c_012(12) type C value 'Diciembre'.

DATA:
var1(3) type n value 0,
fechatxt type string.
if radio = 'X'.
IF P_FECHA IS INITIAL.
WRITE 'No se ha introducido ninguna fecha'.
ELSE.
concatenate P_FECHA+6(2) ' de ' into fechatxt.
move P_FECHA+4(2) to var1 .
CASE var1.
when 1.
concatenate fechatxt c_01 into fechatxt.
when 2.
concatenate fechatxt c_02 into fechatxt.
when 3.
concatenate fechatxt c_03 into fechatxt.
when 4.
concatenate fechatxt c_04 into fechatxt.
when 5.
concatenate fechatxt c_05 into fechatxt.
when 6.
concatenate fechatxt c_06 into fechatxt.
when 7.
concatenate fechatxt c_07 into fechatxt.
when 8.
concatenate fechatxt c_08 into fechatxt.
when 9.
concatenate fechatxt c_09 into fechatxt.
when 10.
concatenate fechatxt c_10 into fechatxt.
when 11.
concatenate fechatxt c_1 into fechatxt.
when 12.
concatenate fechatxt c_12 into fechatxt.
endcase.
concatenate ' de ' P_FECHA(4) into fechatxt.
WRITE: fechatxt.
WRITE: /,P_FECHA.
ENDIF.
else.

IF P_FECHA IS INITIAL.
WRITE 'No se ha introducido ninguna fecha'.
ELSE.
WRITE: P_FECHA+6(2),' de '.
move P_FECHA+4(2) to var1 .
CASE var1.
when 1.
write c_01.
when 2.
write c_02.
when 3.
write c_03.
when 4.
write c_04.
when 5.
write c_05.
when 6.
write c_06.
when 7.
write c_07.
when 8.
write c_08.
when 9.
write c_09.
when 10.
write c_010.
when 11.
write c_011.
when 12.
write c_012.
endcase.
WRITE: ' de ',P_FECHA(4).
WRITE: /,P_FECHA.
ENDIF.
endIF.

"SELECTION-SCREEN: BEGIN OF BLOCK Bloque1


" WITH FRAME TITLE Report.
"
" SELECTION-SCREEN: END OF BLOCK Bloque1.

S-ar putea să vă placă și