Skip to Content
0
Former Member
Apr 24, 2007 at 05:17 AM

radio

15 Views

Hi ,

Please check this program, For this program i have to maintain two radio buttons,

Which i am maintaining,

But my requirement is for one radion button i have to select this complete program logic. i.e., i have to maintian this complete program logic in one radio button.

Later i have to select another radio button , with that i have to select this complete program logic again(which i am going to chage ).

Please help me in this.

********************************************

TABLES : /ivl/zmb_behdr,

/ivl/zmb_bndmas,

/ivl/zmb_bedut,

knvv.

----


  • Internal Tables *

----


DATA : BEGIN OF it_itab OCCURS 0,

kvgr3 LIKE knvv-kvgr3,

zztono LIKE /ivl/zmb_behdr-zztono,

boedate LIKE /ivl/zmb_behdr-boedate,

impdpsno LIKE /ivl/zmb_behdr-impdpsno,

totdtyval LIKE /ivl/zmb_behdr-totdtyval,

zzintrst LIKE /ivl/zmb_behdr-zzintrst,

zzdtyval LIKE /ivl/zmb_behdr-zzdtyval,

zzkunnr LIKE /ivl/zmb_behdr-zzkunnr,

bondregnno LIKE /ivl/zmb_bndmas-bondregnno,

bondno LIKE /ivl/zmb_behdr-bondno,

docno LIKE /ivl/zmb_behdr-docno,

*Begin of modification for change $01

ZZPLASLNO like /ivl/zmb_behdr-ZZPLASLNO,

*End of modification for change $01

docyear LIKE /ivl/zmb_behdr-docyear, "$02

dutcode LIKE /ivl/zmb_bedut-dutcode,

impdpdat LIKE /ivl/zmb_behdr-impdpdat,

zzpladate LIKE /ivl/zmb_behdr-zzpladate,

actvalu LIKE /ivl/zmb_bedut-actvalu,

BCD LIKE /ivl/zmb_bedut-dutcode,

CVD LIKE /ivl/zmb_bedut-dutcode,

ZCES LIKE /ivl/zmb_bedut-dutcode,

ZHCS LIKE /ivl/zmb_bedut-dutcode,

ZEDC LIKE /ivl/zmb_bedut-dutcode,

ZHDC LIKE /ivl/zmb_bedut-dutcode,

SAD LIKE /ivl/zmb_bedut-dutcode, "$02

END OF it_itab.

----


  • Global Workfields *

----


DATA : w_hdline TYPE i,

w_clrfmt TYPE i VALUE 1,

w_duty LIKE /ivl/zmb_behdr-zzdtyval,

w_int LIKE /ivl/zmb_behdr-zzintrst,

w_tot LIKE /ivl/zmb_behdr-totdtyval,

w_dtyval LIKE t001r_bf-amount..

----


  • Selection screen *

----


SELECTION-SCREEN : BEGIN OF BLOCK b001 WITH FRAME TITLE text-001.

SELECT-OPTIONS : s_boedt FOR /ivl/zmb_behdr-boedate OBLIGATORY,

s_kvgr3 FOR knvv-kvgr3 OBLIGATORY.

PARAMETERS : DUTY RADIOBUTTON GROUP RAD1, "$02

DUTS RADIOBUTTON GROUP RAD1 DEFAULT 'X'. "$02

SELECTION-SCREEN END OF BLOCK b001.

----


  • Screen Validation *

----


AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_boedt-low.

PERFORM boedate_listing CHANGING s_boedt-low.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_boedt-high.

PERFORM boedate_listing1 CHANGING s_boedt-high.

AT SELECTION-SCREEN .

PERFORM check_kvgr3.

----


  • Start of selection *

----


START-OF-SELECTION.

PERFORM fetch_data.

----


  • End of selection *

----


END-OF-SELECTION.

IF w_hdline = 0.

WRITE : ''(135).

ELSE.

PERFORM write_data.

ENDIF.

----


  • Top of page *

----


TOP-OF-PAGE.

PERFORM header.

&----


*& Form check_kvgr3

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM check_kvgr3.

LOOP AT s_kvgr3.

CHECK s_kvgr3-option = 'EQ'.

SELECT SINGLE * FROM knvv

CLIENT SPECIFIED WHERE

mandt = sy-mandt AND

kvgr3 = s_kvgr3-low.

IF sy-subrc NE 0.

MESSAGE e000(38) WITH 'Select proper customer gp'.

ENDIF.

ENDLOOP.

LOOP AT s_kvgr3.

CHECK s_kvgr3-option = 'BT'.

SELECT SINGLE * FROM knvv

CLIENT SPECIFIED WHERE

mandt = sy-mandt AND

kvgr3 = s_kvgr3-low.

IF sy-subrc NE 0.

MESSAGE e000(38) WITH 'Select proper customer gp'.

ENDIF.

ENDLOOP.

LOOP AT s_kvgr3.

CHECK s_kvgr3-option = 'BT'.

SELECT SINGLE * FROM knvv

CLIENT SPECIFIED WHERE

mandt = sy-mandt AND

kvgr3 = s_kvgr3-low.

IF sy-subrc NE 0.

MESSAGE e000(38) WITH 'Select proper customer gp'.

ENDIF.

ENDLOOP.

ENDFORM. " check_kvgr3

&----


*& Form boedate_listing

&----


  • text

----


  • <--P_s_boedt_LOW text

----


FORM boedate_listing CHANGING p_s_boedt_low.

DATA : BEGIN OF it_boedate OCCURS 0,

boedate LIKE /ivl/zmb_behdr-boedate,

END OF it_boedate.

CLEAR it_boedate.

REFRESH it_boedate.

SELECT boedate INTO TABLE it_boedate

FROM /ivl/zmb_behdr.

SORT it_boedate BY boedate.

LOOP AT it_boedate.

IF it_boedate-boedate = ' '.

DELETE it_boedate.

ENDIF.

ENDLOOP.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'CPONO'

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = 'sapcpono'

window_title = 'BOE Date Listing'

value_org = 'S'

display = ' '

TABLES

value_tab = it_boedate

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

ENDFORM. " boedate_listing

&----


*& Form boedate_listing1

&----


  • text

----


  • <--P_s_boedt_HIGH text

----


FORM boedate_listing1 CHANGING p_s_boedt_high.

DATA : BEGIN OF it_boedate OCCURS 0,

boedate LIKE /ivl/zmb_behdr-boedate,

END OF it_boedate.

CLEAR it_boedate.

REFRESH it_boedate.

SELECT boedate INTO TABLE it_boedate

FROM /ivl/zmb_behdr.

SORT it_boedate BY boedate.

LOOP AT it_boedate.

IF it_boedate-boedate = ' '.

DELETE it_boedate.

ENDIF.

ENDLOOP.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'CPONO'

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = 'sapcpono'

window_title = 'BOE Date Listing'

value_org = 'S'

display = ' '

TABLES

value_tab = it_boedate

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

ENDFORM. " boedate_listing1

&----


*& Form fetch_data

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM fetch_data.

SELECT zztono boedate impdpsno impdpdat zzpladate totdtyval "$02

*Begin of modification for change $01

  • zzintrst zzdtyval zzkunnr bondno docno

zzintrst zzdtyval zzkunnr bondno docno ZZPLASLNO

*End of modification for change $01

INTO CORRESPONDING FIELDS OF TABLE it_itab

FROM /ivl/zmb_behdr

WHERE doctype EQ 'GBOE'

AND boedate IN s_boedt

AND boestat NE 'X'. " Mahesh / 29.08.2003

LOOP AT it_itab.

call function 'CONVERSION_EXIT_ALPHA_OUTPUT'

exporting

input = it_itab-ZZPLASLNO

IMPORTING

OUTPUT = it_itab-ZZPLASLNO.

.

w_dtyval = it_itab-zzdtyval.

CALL FUNCTION 'FI_ROUND_AMOUNT'

EXPORTING

amount_in = w_dtyval

company = '1970'

currency = 'INR'

IMPORTING

amount_out = w_dtyval

  • DIFFERENCE =

  • ROUNDING_UNIT =

.

it_itab-zzdtyval = w_dtyval.

MODIFY it_itab.

SELECT SINGLE bondregnno

INTO it_itab-bondregnno

FROM /ivl/zmb_bndmas

WHERE bondno = it_itab-bondno.

SELECT SINGLE kvgr3 INTO it_itab-kvgr3

FROM knvv

WHERE kunnr = it_itab-zzkunnr

AND kvgr3 IN s_kvgr3.

IF sy-subrc = 0 .

MODIFY it_itab TRANSPORTING bondregnno kvgr3.

w_duty = w_duty + it_itab-zzdtyval.

w_int = w_int + it_itab-zzintrst.

w_tot = w_tot + it_itab-totdtyval.

ELSE.

DELETE it_itab.

CONTINUE.

ENDIF.

SELECT SINGLE actvalu dutcode FROM /ivl/zmb_bedut "$02

INTO it_itab

WHERE doctype EQ 'GBOE'

AND docyear = /ivl/zmb_behdr-docyear

AND docno = /ivl/zmb_behdr-docno .

IF it_itab-dutcode ='BCD'.

MOVE it_itab-actvalu to it_itab-bcd.

ENDIF.

IF it_itab-dutcode ='CVD'.

MOVE it_itab-actvalu to it_itab-cvd.

ENDIF.

IF it_itab-dutcode ='ZCES'.

MOVE it_itab-actvalu to it_itab-zces.

ENDIF.

IF it_itab-dutcode ='ZHCS'.

MOVE it_itab-actvalu to it_itab-zhcs.

ENDIF.

IF it_itab-dutcode ='ZEDC'.

MOVE it_itab-actvalu to it_itab-zedc.

ENDIF.

IF it_itab-dutcode ='ZHDC'.

MOVE it_itab-actvalu to it_itab-zhdc.

ENDIF.

IF it_itab-dutcode ='SAD'.

MOVE it_itab-actvalu to it_itab-sad.

ENDIF.

ENDLOOP.

DESCRIBE TABLE it_itab LINES w_hdline.

ENDFORM. " fetch_data

&----


*& Form write_data

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM write_data.

FORMAT COLOR OFF.

LOOP AT it_itab.

IF w_clrfmt = 1.

FORMAT COLOR COL_KEY INTENSIFIED OFF.

w_clrfmt = 2.

ELSE.

FORMAT COLOR COL_NORMAL.

w_clrfmt = 1.

ENDIF.

IF DUTY = 'X'.

WRITE :/(1) sy-vline,

(10) it_itab-zztono,

(1) sy-vline,

(10) it_itab-docno,

(1) sy-vline,

(10) it_itab-boedate,

(1) sy-vline,

(25) it_itab-impdpsno,

(1) sy-vline,

(12) it_itab-ZZPLASLNO,

(1) sy-vline,

(10) it_itab-bondregnno,

(1) sy-vline,

(13) it_itab-totdtyval,

(1) sy-vline,

(13) it_itab-zzintrst,

(1) sy-vline,

(13) it_itab-zzdtyval,

(1) sy-vline.

AT LAST.

FORMAT COLOR OFF.

WRITE :/(144) sy-uline.

WRITE :(1) sy-vline,

(6) ''(150) COLOR COL_NEGATIVE,

(85) ' ',

(1) sy-vline,

(13) w_tot,

(1) sy-vline,

(13) w_int,

(1) sy-vline,

(13) w_duty,

(1) sy-vline.

WRITE :/(144) sy-uline.

ENDAT.

ELSE.

WRITE :/(1) sy-vline,

(10) it_itab-zztono,

(1) sy-vline,

(10) it_itab-docno,

(1) sy-vline,

(10) it_itab-boedate,

(1) sy-vline,

(10) it_itab-bondregnno,

(1) sy-vline,

(25) it_itab-impdpsno,

(1) sy-vline, "$02

(10) it_itab-impdpdat,

(1) sy-vline,

(12) it_itab-ZZPLASLNO,

(1) sy-vline,

(10) it_itab-zzpladate,

(1) sy-vline,

(8) it_itab-BCD,

(1) sy-vline,

(8) it_itab-CVD,

(1) sy-vline,

(8) it_itab-ZCES,

(1) sy-vline,

(8) it_itab-ZHCS,

(1) sy-vline,

(8) it_itab-ZEDC,

(1) sy-vline,

(8) it_itab-ZHDC,

(1) sy-vline,

(8) it_itab-SAD, "$02

(1) sy-vline,

(13) it_itab-totdtyval,

(1) sy-vline,

(13) it_itab-zzintrst,

(1) sy-vline,

(13) it_itab-zzdtyval,

(1) sy-vline.

AT LAST.

FORMAT COLOR OFF.

WRITE :/(144) sy-uline.

WRITE :(1) sy-vline,

(6) ''(150) COLOR COL_NEGATIVE,

(85) ' ',

(1) sy-vline,

(13) w_tot,

(1) sy-vline,

(13) w_int,

(1) sy-vline,

(13) w_duty,

(1) sy-vline.

WRITE :/(144) sy-uline.

ENDAT.

ENDIF.

ENDLOOP.

ENDFORM. " write_data

&----


*& Form header

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM header.

NEW-LINE NO-SCROLLING.

WRITE : (50) '',

(24) ''(201) COLOR COL_NEGATIVE INTENSIFIED OFF.

SKIP 1.

FORMAT COLOR COL_TOTAL INTENSIFIED OFF.

IF DUTY = 'X'.

WRITE : (144) sy-uline.

WRITE :/(1) sy-vline,

(10) ''(100),

(1) sy-vline,

(10) ''(200),

(1) sy-vline,

(10) ''(101),

(1) sy-vline,

(25) ''(102),

(1) sy-vline,

(12) ''(202),

(1) sy-vline,

(10) ''(103),

(1) sy-vline,

(13) ''(104),

(1) sy-vline,

(13) ''(105),

(1) sy-vline,

(13) ''(106),

(1) sy-vline.

WRITE :/(144) sy-uline.

ELSE.

WRITE : (247) sy-uline.

WRITE :/(1) sy-vline,

(10) ''(100),

(1) sy-vline,

(10) ''(200),

(1) sy-vline,

(10) ''(101),

(1) sy-vline,

(10) ''(103),

(1) sy-vline,

(25) ''(102),

(1) sy-vline,

(10) ''(107),

(1) sy-vline,

(12) ''(202),

(1) sy-vline,

(10) ''(107),

(1) sy-vline,

(8) ''(108),

(1) sy-vline,

(8) ''(109),

(1) sy-vline,

(8) ''(110),

(1) sy-vline,

(8) ''(111),

(1) sy-vline,

(8) ''(112),

(1) sy-vline,

(8) ''(113),

(1) sy-vline,

(8) ''(114),

(1) sy-vline,

(13) ''(104),

(1) sy-vline,

(13) ''(105),

(1) sy-vline,

(13) ''(106),

(1) sy-vline.

WRITE :/(247) sy-uline.

FORMAT COLOR OFF.

ENDIF.

*****************************

Thanks