data: g_t_dynp LIKE dynpread OCCURS 0 WITH HEADER LINE, g_t_tlogo type rs_t_tlogo, t_return type DDSHRETVAL occurs 0 with header line, w_cprog type syst-cprog, w_dynnr type syst-dynnr. data: begin of i_cube occurs 0, infocube type rsinfocube, end of i_cube. data: begin of i_cubetxt occurs 0, infocube type rsinfocube, txtsh type RSTXTSH, end of i_cubetxt. initialization. select infocube from rsdcube into table i_cube where objvers = 'A' and cubetype = 'B' and transact = 'X'. select infocube txtsh from rsdcubet into table i_cubetxt for all entries in i_cube where langu = sy-langu and infocube = i_cube-infocube and objvers = 'A'. parameters: p_cube type rsdcube-infocube obligatory. selection-screen begin of block b1 with frame title text-001. parameters: p_batch radiobutton group r1, p_plan radiobutton group r1. selection-screen end of block b1. AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_cube. clear t_return. w_cprog = sy-cprog. w_dynnr = sy-dynnr. CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' EXPORTING * DDIC_STRUCTURE = 'RSDCUBE' RETFIELD = 'INFOCUBE' * PVALKEY = ' ' DYNPPROG = w_cprog DYNPNR = w_dynnr DYNPROFIELD = 'P_CUBE' * STEPL = 0 * WINDOW_TITLE = * VALUE = ' ' VALUE_ORG = 'S' MULTIPLE_CHOICE = ' ' DISPLAY = 'F' * CALLBACK_PROGRAM = ' ' * CALLBACK_FORM = ' ' TABLES VALUE_TAB = i_cubetxt * FIELD_TAB = t_field RETURN_TAB = t_return * DYNPFLD_MAPPING = EXCEPTIONS PARAMETER_ERROR = 1 NO_VALUES_FOUND = 2 OTHERS = 3. IF SY-SUBRC <> 0. MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF. READ TABLE t_return INDEX 1. p_cube = t_return-fieldval. start-of-selection. case 'X'. when p_plan. CALL FUNCTION 'RSAPO_SWITCH_BATCH_TO_TRANS' EXPORTING I_INFOCUBE = p_cube EXCEPTIONS CUBE_NOT_TRANSACTIONAL = 1 INHERITED_ERROR = 2 OTHERS = 3. IF SY-SUBRC <> 0. MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. else. message i024(ZBPS) with p_cube. ENDIF. when p_batch. CALL FUNCTION 'RSAPO_SWITCH_TRANS_TO_BATCH' EXPORTING I_INFOCUBE = p_cube EXCEPTIONS CUBE_NOT_TRANSACTIONAL = 1 SWITCH_NOT_POSSIBLE = 2 INHERITED_ERROR = 3 OTHERS = 4. IF SY-SUBRC <> 0. MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. else. message i023(ZBPS) with p_cube. ENDIF. endcase.