‎2008 Jul 23 7:43 AM
Hi Guy's,
Presently requirement is like this: to convert the parameter as a select-options:
please help me where i did change the code. i worked to change this senario in 'changed document.
it is urgent to me.
Actual Development
SELECT-OPTIONS: sfictr FOR fmfctr-fictr NO INTERVALS NO-EXTENSION.------This is a parameter
IF NOT sfictr-low IS INITIAL.
IF sub = ' '. " No subordinates
i_fcsel-sign = 'I'.
i_fcsel-option = 'EQ'.
i_fcsel-low = sfictr-low.
APPEND i_fcsel.
ELSE.
CALL FUNCTION 'Z_HR_GET_FUND_CENTERS'
EXPORTING
z_fund_center = sfictr-low
TABLES
z_fundctrs = i_fcsel
EXCEPTIONS
fund_center_not_valid = 1
other_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
i_fcsel-sign = 'I'. i_fcsel-option = 'EQ'.
i_fcsel-low = sfictr-low.
APPEND i_fcsel.
ENDIF.
ENDIF.
ENDIF.
******* ******** Get all the fund centers
LOOP AT i_fcsel.
WRITE i_fcsel-low TO kostl_temp RIGHT-JUSTIFIED.
OVERLAY kostl_temp WITH '0000000000'.
i_fcsel-low = kostl_temp.
MODIFY i_fcsel.
ENDLOOP.
Changed Devlopment
Select-options : sfictr FOR fmfctr-fictr.
LOOP AT SFICTR.
IF SFICTR-low <> space.
select fictr
into table it_fc
from fmfctr
where fikrs = 'WBG1'
and fictr in SFICTR.
endif.
endloop.
loop at it_fc into it_fc.
CLEAR i_fcsel[] .
REFRESH i_fcsel[].
IF NOT SFICTR[] IS INITIAL .
IF sub = ' '.
i_fcsel-option = 'BT'.
i_fcsel-low = sfictr-low.
i_fcsel-high = sfictr-high.
APPEND i_fcsel.
ELSE.
CALL FUNCTION 'Z_HR_GET_FUND_CENTERS'
EXPORTING
z_fund_center = it_fc-fictr
TABLES
z_fundctrs = i_fcsel
EXCEPTIONS
fund_center_not_valid = 1
other_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
i_fcsel-sign = 'I'. i_fcsel-option = 'BT'.
i_fcsel-low = it_fc-fictr.
APPEND i_fcsel.
ENDIF.
ENDIF.
ENDIF.
endloop.
******* ******** Get all the fund centers
LOOP AT i_fcsel.
WRITE i_fcsel-low TO kostl_temp RIGHT-JUSTIFIED.
OVERLAY kostl_temp WITH '0000000000'.
i_fcsel-low = kostl_temp.
MODIFY i_fcsel.
ENDLOOP.
Thanks,
Sai.
‎2008 Jul 23 7:44 AM
hi,
Changed Devlopment
Select-options : sfictr FOR fmfctr-fictr.
LOOP AT SFICTR.
(changes ..)
IF not sfictr is initial .
select fictr
into table it_fc
from fmfctr
where fikrs = 'WBG1'
and fictr in SFICTR.
endif.
endloop.
loop at it_fc into it_fc.
CLEAR i_fcsel[] .
REFRESH i_fcsel[].
IF NOT SFICTR[] IS INITIAL .
IF sub = ' '.
i_fcsel-option = 'BT'.
i_fcsel-low = sfictr-low.
i_fcsel-high = sfictr-high.
APPEND i_fcsel.
ELSE.
CALL FUNCTION 'Z_HR_GET_FUND_CENTERS'
EXPORTING
z_fund_center = it_fc-fictr
TABLES
z_fundctrs = i_fcsel
EXCEPTIONS
fund_center_not_valid = 1
other_error = 2
OTHERS = 3.
IF sy-subrc 0.
i_fcsel-sign = 'I'. i_fcsel-option = 'BT'.
i_fcsel-low = it_fc-fictr.
APPEND i_fcsel.
ENDIF.
ENDIF.
ENDIF.
endloop.
******** Get all the fund centers
LOOP AT i_fcsel.
WRITE i_fcsel-low TO kostl_temp RIGHT-JUSTIFIED.
OVERLAY kostl_temp WITH '0000000000'.
i_fcsel-low = kostl_temp.
MODIFY i_fcsel.
ENDLOOP.
‎2008 Jul 23 7:44 AM
hi,
Changed Devlopment
Select-options : sfictr FOR fmfctr-fictr.
LOOP AT SFICTR.
(changes ..)
IF not sfictr is initial .
select fictr
into table it_fc
from fmfctr
where fikrs = 'WBG1'
and fictr in SFICTR.
endif.
endloop.
loop at it_fc into it_fc.
CLEAR i_fcsel[] .
REFRESH i_fcsel[].
IF NOT SFICTR[] IS INITIAL .
IF sub = ' '.
i_fcsel-option = 'BT'.
i_fcsel-low = sfictr-low.
i_fcsel-high = sfictr-high.
APPEND i_fcsel.
ELSE.
CALL FUNCTION 'Z_HR_GET_FUND_CENTERS'
EXPORTING
z_fund_center = it_fc-fictr
TABLES
z_fundctrs = i_fcsel
EXCEPTIONS
fund_center_not_valid = 1
other_error = 2
OTHERS = 3.
IF sy-subrc 0.
i_fcsel-sign = 'I'. i_fcsel-option = 'BT'.
i_fcsel-low = it_fc-fictr.
APPEND i_fcsel.
ENDIF.
ENDIF.
ENDIF.
endloop.
******** Get all the fund centers
LOOP AT i_fcsel.
WRITE i_fcsel-low TO kostl_temp RIGHT-JUSTIFIED.
OVERLAY kostl_temp WITH '0000000000'.
i_fcsel-low = kostl_temp.
MODIFY i_fcsel.
ENDLOOP.
‎2008 Jul 23 7:48 AM
hiiii
just remove no interval and no extension from your select-option...dont need to do any other changes in your program.
SELECT-OPTIONS: sfictr FOR fmfctr-fictr REMOVE THIS NO INTERVALS NO-EXTENSION.------This is a parameter
regards
twinkal
‎2008 Jul 23 7:50 AM
Hello,
Where is the parameter Sai ? I guess your requirement is to convert that SELECT-OPTION to PARAMETER. You have to use the PARAMETERS for that. Go to Transaction ABAPDOCU to read the documentation on PARAMETERS. Also u need to change your code accordingly if you use PARAMETERS. You can suppress that otherwise by removing the NO INTERVALS and EXTENSION.
Regards,
Sai-
Edited by: Sai Krishna Kowluri on Jul 23, 2008 8:50 AM
‎2008 Jul 23 8:46 AM
Hi Sai,
I removed NO INTERVALS NO-EXTENSION. after execution of this program gives the same output as in parameter. It is not considering the range values.
Please help me where i need to change the in report.
SELECT-OPTIONS: sfictr FOR fmfctr-fictr .
IF NOT sfictr-low IS INITIAL.
IF sub = ' '. " No subordinates
i_fcsel-sign = 'I'.
i_fcsel-option = 'EQ'.
i_fcsel-low = sfictr-low.
APPEND i_fcsel.
ELSE.
CALL FUNCTION 'Z_HR_GET_FUND_CENTERS'
EXPORTING
z_fund_center = sfictr-low
TABLES
z_fundctrs = i_fcsel
EXCEPTIONS
fund_center_not_valid = 1
other_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
i_fcsel-sign = 'I'. i_fcsel-option = 'EQ'.
i_fcsel-low = sfictr-low.
APPEND i_fcsel.
ENDIF.
ENDIF.
ENDIF.
******* ******** Get all the fund centers
LOOP AT i_fcsel.
WRITE i_fcsel-low TO kostl_temp RIGHT-JUSTIFIED.
OVERLAY kostl_temp WITH '0000000000'.
i_fcsel-low = kostl_temp.
MODIFY i_fcsel.
ENDLOOP.
Thanks,
Sai.