Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Select-option

Former Member
0 Likes
580

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
515

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.

4 REPLIES 4
Read only

Former Member
0 Likes
516

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.

Read only

Former Member
0 Likes
515

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

Read only

Former Member
0 Likes
515

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

Read only

0 Likes
515

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.