calssical events:
*&---------------------------------------------------------------------*
*& Report ZPRI_CLAS_EVENTS
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZPRI_CLAS_EVENTS.
TABLES: vbak, mara.
DATA: GV_DAYS TYPE T5A4A-DLYDY,
gv_mon TYPE T5A4A-DLYMO ,
gv_year TYPE T5A4A-DLYYR .
data gv_date TYPE sy-datum.
data: it_vbak TYPE TABLE OF vbak.
data wa_vbak TYPE vbak.
SELECT-OPTIONS: s_vbeln for vbak-vbeln MODIF ID ABC,
s_erdat for vbak-erdat MODIF ID ABC.
SELECT-OPTIONS: s_matnr for mara-matnr MODIF ID XYZ.
PARAMETERS: p_var(20) TYPE c MODIF ID XYZ.
PARAMETERS : p_rad1 RADIOBUTTON GROUP gr1 USER-COMMAND out,
p_rad2 RADIOBUTTON GROUP gr1.
INITIALIZATION.
GV_DAYS = 7.
CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
EXPORTING
DATE = SY-DATUM
DAYS = GV_DAYS
MONTHS = gv_mon
SIGNUM = '-'
YEARS = gv_year
IMPORTING
CALC_DATE = gv_date.
s_erdat-sign = 'I'.
s_erdat-option = 'BT'.
s_erdat-low = gv_date.
s_erdat-high = sy-datum.
APPEND s_erdat.
AT SELECTION-SCREEN.
select * from vbak into table it_vbak
where vbeln in s_vbeln.
if it_vbak is initial.
message 'Invalid sales order number' TYPE 'E'.
endif.
AT SELECTION-SCREEN OUTPUT.
loop AT SCREEN.
if p_rad2 eq 'X'.
if screen-group1 = 'ABC'.
screen-invisible = 1.
screen-input = 0.
MODIFY SCREEN.
endif.
else.
if screen-group1 = 'XYZ'.
screen-invisible = 1.
screen-input = 0.
MODIFY SCREEN.
endif.
endif.
endloop.
AT SELECTION-SCREEN on VALUE-REQUEST FOR p_var.
START-OF-SELECTION.
select * from vbak into TABLE it_vbak where vbeln in s_vbeln
and erdat in s_erdat.
end-of-SELECTION.
loop at it_vbak into wa_vbak.
WRITE: / wa_vbak-vbeln, wa_vbak-erdat, wa_vbak-ernam.
ENDLOOP.
TOP-OF-page.
WRITE: ‘INDIA’.
*& Report ZPRI_CLAS_EVENTS
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZPRI_CLAS_EVENTS.
TABLES: vbak, mara.
DATA: GV_DAYS TYPE T5A4A-DLYDY,
gv_mon TYPE T5A4A-DLYMO ,
gv_year TYPE T5A4A-DLYYR .
data gv_date TYPE sy-datum.
data: it_vbak TYPE TABLE OF vbak.
data wa_vbak TYPE vbak.
SELECT-OPTIONS: s_vbeln for vbak-vbeln MODIF ID ABC,
s_erdat for vbak-erdat MODIF ID ABC.
SELECT-OPTIONS: s_matnr for mara-matnr MODIF ID XYZ.
PARAMETERS: p_var(20) TYPE c MODIF ID XYZ.
PARAMETERS : p_rad1 RADIOBUTTON GROUP gr1 USER-COMMAND out,
p_rad2 RADIOBUTTON GROUP gr1.
INITIALIZATION.
GV_DAYS = 7.
CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
EXPORTING
DATE = SY-DATUM
DAYS = GV_DAYS
MONTHS = gv_mon
SIGNUM = '-'
YEARS = gv_year
IMPORTING
CALC_DATE = gv_date.
s_erdat-sign = 'I'.
s_erdat-option = 'BT'.
s_erdat-low = gv_date.
s_erdat-high = sy-datum.
APPEND s_erdat.
AT SELECTION-SCREEN.
select * from vbak into table it_vbak
where vbeln in s_vbeln.
if it_vbak is initial.
message 'Invalid sales order number' TYPE 'E'.
endif.
AT SELECTION-SCREEN OUTPUT.
loop AT SCREEN.
if p_rad2 eq 'X'.
if screen-group1 = 'ABC'.
screen-invisible = 1.
screen-input = 0.
MODIFY SCREEN.
endif.
else.
if screen-group1 = 'XYZ'.
screen-invisible = 1.
screen-input = 0.
MODIFY SCREEN.
endif.
endif.
endloop.
AT SELECTION-SCREEN on VALUE-REQUEST FOR p_var.
START-OF-SELECTION.
select * from vbak into TABLE it_vbak where vbeln in s_vbeln
and erdat in s_erdat.
end-of-SELECTION.
loop at it_vbak into wa_vbak.
WRITE: / wa_vbak-vbeln, wa_vbak-erdat, wa_vbak-ernam.
ENDLOOP.
TOP-OF-page.
WRITE: ‘INDIA’.
0 comments:
Post a Comment