Skip to Content
0
Former Member
Nov 23, 2011 at 09:46 AM

Issue in using radio button in module pool

90 Views

For same field I need 2 different search help. Based on radio button on screen I need company codeu2019s from different table. Issue is, at execution radio button remains blank. Radio button works only when I use them in PAI under CASE SY-UCOMM. WHEN u2018DONEu2019. IF Normal_Run = u2018Xu2019u2026u2026

Can I use radio button with the below code. Please refer the below code.

PROCESS ON VALUE-REQUEST.
FIELD COMP_CODE MODULE POPULATE_COMP_CODE.

MODULE POPULATE_COMP_CODE INPUT.
IF REPEAT_RUN = 'X'.
PERFORM COMP_CODE_POPULATE.
ELSEIF NORMAL_RUN = 'X'.
PERFORM COMP_CODE_POPULATE_N.
ENDIF.
ENDMODULE.   

FORM COMP_CODE_POPULATE .
    SELECT COMP_CODE
      FROM  ZIFRS_D_PROCESS
      INTO  CORRESPONDING FIELDS OF TABLE VALUES_TAB_CC
      WHERE PROC_NAME = 'DEPRECIATION RUN'.
  READ TABLE VALUES_TAB INDEX 1.
  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      RETFIELD    = 'COMP_CODE'
      DYNPPROG    = PROGNAME
      DYNPNR      = DYNNUM
      DYNPROFIELD = 'COMP_CODE'
      VALUE_ORG   = 'S'
    TABLES
      VALUE_TAB   = VALUES_TAB_CC.
ENDFORM.                    " COMP_CODE_POPULATION

FORM COMP_CODE_POPULATE_N .
  CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    EXPORTING
      TABNAME     = '/BI0/SCOMP_CODE'
      FIELDNAME   = 'COMP_CODE'
      DYNPPROG    = PROGNAME
      DYNPNR      = DYNNUM
      DYNPROFIELD = 'COMP_CODE'.
ENDFORM.                    " COMP_CODE_POPULATE_N

Moderator Message: Please use "code" tags to format the code snippet.

Edited by: Suhas Saha on Nov 23, 2011 5:13 PM