Skip to Content
author's profile photo Former Member
Former Member

Select-option

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 23, 2008 at 06: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.

                Add a comment
                10|10000 characters needed characters exceeded

              • author's profile photo Former Member
                Former Member
                Posted on Jul 23, 2008 at 06: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

                Add a comment
                10|10000 characters needed characters exceeded

              • author's profile photo Former Member
                Former Member
                Posted on Jul 23, 2008 at 06: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

                Add a comment
                10|10000 characters needed characters exceeded

                • Former Member

                  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.

              Before answering

              You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
              You must be Logged in to submit an answer.

              Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.