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

Selection-options

Former Member
0 Likes
865

Hi Guy's,

please help me, want to change the parameter into select-options (fund center-fictr). actual code is like this:

whrere i need to change the development.

fundcenter contain table is FMFCTR.

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.

Thanks,

Sai.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
839

Hi Sai

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.

You already used select-options for fundcenter i.e. sfictr.

If I am wrong then please explain your question with the sample code.

Regards,

CoolDeep.

6 REPLIES 6
Read only

former_member125931
Active Participant
0 Likes
839

I think in this code u used select-options only.

Read only

Former Member
0 Likes
839

Hi,

covert your parameter into select-option as bellow

declare type.

select-options:

(Varname) for (typename)

check the link for example code

http://sap.niraj.tripod.com/id33.html

regards,

Anirban

Read only

Former Member
0 Likes
840

Hi Sai

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.

You already used select-options for fundcenter i.e. sfictr.

If I am wrong then please explain your question with the sample code.

Regards,

CoolDeep.

Read only

0 Likes
839

Hi kuldeep,

Sfictr is the parameter, want to change that one as select-options.

whrere i need to change the development.

fundcenter contain table is FMFCTR.

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.

Thanks,

Sai.

Read only

Former Member
0 Likes
839

Hi,

IF NOT sfictr-low IS INITIAL.

IF sub = ' '. " No subordinates

select-options i_fcsel for 'specify type'.

w_temp = i_fcsel-low .

ELSE.

CALL FUNCTION 'Z_HR_GET_FUND_CENTERS'

EXPORTING

z_fund_center = w_temp

TABLES

z_fundctrs = i_fcsel

EXCEPTIONS

fund_center_not_valid = 1

other_error = 2

OTHERS = 3.

IF sy-subrc 0.

select-options i_fcsel for 'specify type'.

ENDIF.

ENDIF.

ENDIF.

Regard,

Sandeep

Read only

Former Member
0 Likes
839

u need to change the fm Z_HR_GET_FUND_CENTERS with table parameter sfictr as select options or range table as output.

Amitava