Skip to Content

{CODE}

*———————————————————————————–*

*

*Selection-screen with radio buttons and parameters.

*

*———————————————————————————–*

*—————————————————————————————

*

* REGULAR RUN RADIO BUTTON

*—————————————————————————————-

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 01.

PARAMETERS: p_reg RADIOBUTTON GROUP gp1 USER-COMMAND one MODIF ID rd1 . “#EC *

SELECTION-SCREEN COMMENT 04(11) text-001.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN SKIP.

*——————————————————————————————-

* SELECYION-SCREEN BEGIN OF BLOCK B1

*

*——————————————————————————————-

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-018.

SELECTION-SCREEN SKIP.

*——————————————————————————————-

*

*Create New Starters

*——————————————————————————————-

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 08.

PARAMETERS: p_new RADIOBUTTON GROUP gp2 USER-COMMAND two MODIF ID rd2 . “#EC *

SELECTION-SCREEN COMMENT 10(30) text-002.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 30.

PARAMETERS: p_last TYPE d MODIF ID g21.                     “#EC *

SELECTION-SCREEN COMMENT 10(19) text-003.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN SKIP.

*——————————————————————————————-

*

*Create leavers

*——————————————————————————————-

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 08.

PARAMETERS: p_leave   RADIOBUTTON GROUP gp2 MODIF ID rd2.   “#EC *

SELECTION-SCREEN COMMENT 10(13) text-004.

SELECTION-SCREEN END   OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 30.

PARAMETERS: p_last1 TYPE d MODIF ID g22.                    “#EC *

SELECTION-SCREEN COMMENT 10(19) text-003.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN SKIP.

*——————————————————————————————

*

*Create changes

*——————————————————————————————-

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 08.

PARAMETERS: p_chnge   RADIOBUTTON GROUP gp2 MODIF ID rd2.   “#EC *

SELECTION-SCREEN COMMENT 10(30) text-005.

SELECTION-SCREEN END   OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 30.

PARAMETERS: p_last2 TYPE d MODIF ID g23.                    “#EC *

SELECTION-SCREEN COMMENT 10(19) text-003.

SELECTION-SCREEN END OF LINE.

*——————————————————————————————-

* SELECYION-SCREEN END OF BLOCK B1

*

*——————————————————————————————-

SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN SKIP.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 01.

PARAMETERS: p_adhoc    RADIOBUTTON GROUP gp1.               “#EC *

SELECTION-SCREEN COMMENT 04(11) text-009.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN SKIP.

*——————————————————————————————-

* SELECYION-SCREEN BEGIN OF BLOCK B2

*

*——————————————————————————————-

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-019.

*——————————————————————————————-

*ADHOC RUN

*Create new

*——————————————————————————————-

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 08.

PARAMETERS: a_new    RADIOBUTTON GROUP gp3 USER-COMMAND three MODIF ID rd3. “#EC *

SELECTION-SCREEN COMMENT 10(30) text-002.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 22.

SELECT-OPTIONS s_date FOR sy-datum MODIF ID g31.

SELECTION-SCREEN COMMENT 10(05) text-006.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN SKIP.

*——————————————————————————————-

*ADHOC RUN

*Create leavers

**——————————————————————————————

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 08.

PARAMETERS: a_leave  RADIOBUTTON GROUP gp3 MODIF ID rd3.    “#EC *

SELECTION-SCREEN COMMENT 10(30) text-004.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 22.

SELECT-OPTIONS s_date1 FOR sy-datum MODIF ID g32.           “#EC *

SELECTION-SCREEN COMMENT 10(05) text-006.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 25.

PARAMETERS: p_ldate TYPE sy-datum MODIF ID g32.             “#EC *

SELECTION-SCREEN COMMENT 10(12) text-010.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN SKIP.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 28.

PARAMETERS: a_estim  RADIOBUTTON GROUP gp4 USER-COMMAND four MODIF ID rd4.

SELECTION-SCREEN COMMENT 30(30) text-011.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN SKIP.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 28.

PARAMETERS: a_final  RADIOBUTTON GROUP gp4 MODIF ID rd4.

SELECTION-SCREEN COMMENT 30(30) text-012.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN SKIP.

*——————————————————————————————-

*ADHOC RUN

*Create changes

*——————————————————————————————–

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 08.

PARAMETERS: a_change RADIOBUTTON GROUP gp3 MODIF ID rd3.    “#EC *

SELECTION-SCREEN COMMENT 10(30) text-005.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 22.

SELECT-OPTIONS s_date2 FOR sy-datum MODIF ID g33.           “#EC *

SELECTION-SCREEN COMMENT 10(05) text-006.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN SKIP.

*——————————————————————————————-

*ADHOC RUN

*Create Monthly Contributions.

*——————————————————————————————-

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 08.

PARAMETERS: a_month  RADIOBUTTON GROUP gp3 MODIF ID rd3.    “#EC *

SELECTION-SCREEN COMMENT 10(30) text-007.

SELECTION-SCREEN END OF LINE.

*——————————————————————————————-

* SELECYION-SCREEN BEGIN OF BLOCK B3

*

*——————————————————————————————-

SELECTION-SCREEN BEGIN OF BLOCK b3.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 25.

PARAMETERS: p_period(2) TYPE c MODIF ID g34.                “#EC *

SELECTION-SCREEN COMMENT 10(06) text-013.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 25.

PARAMETERS: p_year(4) TYPE c MODIF ID g34.                  “#EC *

SELECTION-SCREEN COMMENT 10(05) text-014.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK b3.

*——————————————————————————————-

* SELECYION-SCREEN END OF BLOCK B3

*

*——————————————————————————————-

DATA : day31(2) TYPE c VALUE 31,

      lmnth(2) TYPE c VALUE 12,

      sdate type d,

      edate type d.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 25.

PARAMETERS: p_sdate TYPE d MODIF ID g34.                    “#EC *

SELECTION-SCREEN COMMENT 10(10) text-015.

SELECTION-SCREEN POSITION 50.

PARAMETERS: p_edate TYPE d MODIF ID g34.                    “#EC *

SELECTION-SCREEN COMMENT 40(08) text-016.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN SKIP.

*——————————————————————————————-

*ADHOC RUN

*Create Annual File

*——————————————————————————————-

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 08.

PARAMETERS: a_ann    RADIOBUTTON GROUP gp3 MODIF ID rd3.    “#EC *

SELECTION-SCREEN COMMENT 10(30) text-008.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN POSITION 33.

PARAMETERS: f_year TYPE sy-datum MODIF ID g35.              “#EC *

SELECTION-SCREEN COMMENT 10(21) text-017.

SELECTION-SCREEN END OF LINE.

*——————————————————————————————-

* SELECYION-SCREEN BEGIN OF BLOCK B2

*

*——————————————————————————————-

SELECTION-SCREEN END OF BLOCK b2.

SELECTION-SCREEN SKIP.

*——————————————————————————————-

* AT SELECTION-SCREEN OUTPUT

*

*——————————————————————————————-

AT SELECTION-SCREEN OUTPUT.

*——————————————————————————————-

* START OF IF.

*

*——————————————————————————————-

  IF p_reg = ‘X’.

*——————————————————————————————-

* IF REGULAR RADIO BUTTON IS ACTIVE

*AND OTHER RADIO BUTTONS IN THE BLOCK B1.

*——————————————————————————————-

    PERFORM regular USING ‘RD2’.

    IF p_new = ‘X’.

      p_last = sy-datum.

      PERFORM input USING ‘G21’.

      PERFORM output USING ‘G22’.

      PERFORM output USING ‘G23’.

    ENDIF.

    IF p_leave = ‘X’.

      p_last1 = sy-datum.

      PERFORM input USING ‘G22’.

      PERFORM output USING ‘G21’.

      PERFORM output USING ‘G23’.

    ENDIF.

    IF p_chnge = ‘X’.

      p_last2 = sy-datum.

      PERFORM input USING ‘G23’.

      PERFORM output USING ‘G22’.

      PERFORM output USING ‘G21’.

    ENDIF.

    PERFORM output USING ‘G31’.

    PERFORM output USING ‘G32’.

    PERFORM output USING ‘G33’.

    PERFORM output USING ‘G34’.

    PERFORM output USING ‘G35’.

    PERFORM adhoc USING ‘RD3’.

    PERFORM adhoc USING ‘RD4’.

*——————————————————————————————-

* IF ADHOC RADIO BUTTON IS ACTIVE

*AND OTHER RADIO BUTTONS IN THE BLOCK B2

*——————————————————————————————-

  ELSEIF p_adhoc = ‘X’.

    PERFORM regular USING ‘RD3’.

    IF a_new = ‘X’.

      PERFORM input1 USING ‘G31’.

      PERFORM output USING ‘G32’.

      PERFORM output USING ‘G33’.

      PERFORM output USING ‘G34’.

      PERFORM output USING ‘G35’.

      PERFORM adhoc USING ‘RD4’.

    ENDIF.

    IF a_leave = ‘X’.

      PERFORM input1 USING ‘G32’.

      PERFORM output USING ‘G31’.

      PERFORM output USING ‘G33’.

      PERFORM output USING ‘G34’.

      PERFORM output USING ‘G35’.

    ENDIF.

    IF a_change = ‘X’.

      PERFORM input1  USING ‘G33’.

      PERFORM output USING ‘G32’.

      PERFORM output USING ‘G31’.

      PERFORM output USING ‘G34’.

      PERFORM output USING ‘G35’.

      PERFORM adhoc USING ‘RD4’.

    ENDIF.

    IF a_month = ‘X’.

*    IF p_period IS INITIAL or p_year IS INITIAL.

*    message ‘Please Enter the Period and Year’ type ‘W’.

*    endif.

      PERFORM input1  USING ‘G34’.

      PERFORM output USING ‘G32’.

      PERFORM output USING ‘G33’.

      PERFORM output USING ‘G31’.

      PERFORM output USING ‘G35’.

      PERFORM adhoc USING ‘RD4’.

    ENDIF.

    IF a_ann = ‘X’.

      PERFORM input1 USING ‘G35’.

      PERFORM output USING ‘G31’.

      PERFORM output USING ‘G32’.

      PERFORM output USING ‘G33’.

      PERFORM output USING ‘G34’.

      PERFORM adhoc USING ‘RD4’.

    ENDIF.

    PERFORM output USING ‘G21’.

    PERFORM output USING ‘G22’.

    PERFORM output USING ‘G23’.

    PERFORM adhoc USING ‘RD2’.

  ENDIF.

*——————————————————————————————-

* END OF IF

*

*——————————————————————————————-

*——————————————————————————————-

* AT SELECYION-SCREEN ON BLOCK B3

*

*——————————————————————————————-

AT SELECTION-SCREEN ON BLOCK b3.

  IF p_period IS NOT INITIAL AND p_year IS NOT INITIAL.

    IF p_period  <= 12 AND p_period >= 1.

      CONCATENATE: p_year lmnth day31 INTO p_edate,

                   p_year p_period ’01’ INTO p_sdate.

    ELSE.

      MESSAGE ‘Please Enter a valid month!'(020) TYPE ‘W’.

    ENDIF.

  ELSEIF a_month = ‘X’.

    IF  p_period IS INITIAL OR p_year IS INITIAL.

      MESSAGE ‘Kindly Enter the Period AND Year'(021) type ‘W’.

    ENDIF.

  ENDIF.

*&———————————————————————*

*&      Form  REGULAR

*&———————————————————————*

*       text

*———————————————————————-*

*      –>P_0600   text

*      –>P_PERFORM  text

*      –>P_ENDIF  text

*———————————————————————-*

FORM regular  USING    value(p_modifid) LIKE screen-group1.

  LOOP AT SCREEN.

    CHECK screen-group1  =  p_modifid.

    screen-active     =  1.

    screen-output     =  1.

    MODIFY SCREEN.

  ENDLOOP.

ENDFORM.                    ” REGULAR

*&———————————————————————*

*&      Form  ADHOC

*&———————————————————————*

*       text

*———————————————————————-*

*      –>P_0604   text

*———————————————————————-*

FORM adhoc  USING    value(p_modifid) LIKE screen-group1.

  LOOP AT SCREEN.

    CHECK screen-group1  =  p_modifid.

    screen-active     =  1.

    screen-output     =  0.

    MODIFY SCREEN.

  ENDLOOP.

ENDFORM.                    ” ADHOC

*&———————————————————————*

*&      Form  INPUT

*&———————————————————————*

*       text

*———————————————————————-*

*      –>P_0600   text

*———————————————————————-*

FORM input  USING    value(p_input) LIKE screen-group1.

  LOOP AT SCREEN.

    CHECK screen-group1 = p_input.

    screen-active = 1.

    screen-output = 1.

    screen-input = 0.

    MODIFY SCREEN.

  ENDLOOP.

ENDFORM.                    ” INPUT

*&———————————————————————*

*&      Form  OUTPUT

*&———————————————————————*

*       text

*———————————————————————-*

*      –>P_0604   text

*———————————————————————-*

FORM output  USING    value(p_output) LIKE screen-group1.

  LOOP AT SCREEN.

    CHECK screen-group1 = p_output.

    screen-active = 1.

    screen-output = 0.

    screen-input = 0.

    MODIFY SCREEN.

  ENDLOOP.

ENDFORM.                    ” OUTPUT

*&———————————————————————*

*&      Form  INPUT1

*&———————————————————————*

*       text

*———————————————————————-*

*      –>P_0727   text

*———————————————————————-*

FORM input1  USING    value(p_input1) LIKE screen-group1.

  LOOP AT SCREEN.

    CHECK screen-group1 = p_input1.

    screen-active = 1.

    screen-output = 1.

    screen-input = 1.

    MODIFY SCREEN.

  ENDLOOP.

ENDFORM.                                                    ” INPUT1

{CODE}

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply