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

If checkbox is checked, put values in select-options and parameter...

aris_hidalgo
Contributor
0 Likes
3,147

Hello Experts, 

Based on my selection-screen below, How do I fill p_eindt and p_monat with values if
the user clicked on the checkbox p_end? Below is my selection-screen:

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-003.
SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE text-001.
PARAMETER: p_bukrs TYPE bukrs OBLIGATORY.
SELECT-OPTIONS: p_werks FOR wa_ekpo-werks OBLIGATORY NO INTERVALS,
                p_bsart FOR ekko-bsart OBLIGATORY NO INTERVALS,
                p_eindt FOR eket-eindt OBLIGATORY,
                p_ebeln FOR ekko-ebeln.
PARAMETER: p_monat TYPE monat OBLIGATORY,
           p_gjahr TYPE gjahr OBLIGATORY.
SELECTION-SCREEN END OF BLOCK 1.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-002.
PARAMETER: p_end AS CHECKBOX.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN END OF BLOCK b2.

Hope you can help me guys.Thank you and take care!
1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,327

hi,can you describe your problem in more detail?

as you used the 'obligatory' in your selection screen .you must fill the value p_eindt and p_monat if you want to run the program.

what do you want to do?


Hello Experts, 

Based on my selection-screen below, How do I fill p_eindt and p_monat with values if
the user clicked on the checkbox p_end? Below is my selection-screen:

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-003.
SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE text-001.
PARAMETER: p_bukrs TYPE bukrs OBLIGATORY.
SELECT-OPTIONS: p_werks FOR wa_ekpo-werks OBLIGATORY NO INTERVALS,
                p_bsart FOR ekko-bsart OBLIGATORY NO INTERVALS,
                p_eindt FOR eket-eindt OBLIGATORY,
                p_ebeln FOR ekko-ebeln.
PARAMETER: p_monat TYPE monat OBLIGATORY,
           p_gjahr TYPE gjahr OBLIGATORY.
SELECTION-SCREEN END OF BLOCK 1.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-002.
PARAMETER: p_end AS CHECKBOX.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN END OF BLOCK b2.

Hope you can help me guys.Thank you and take care!
5 REPLIES 5
Read only

Former Member
0 Likes
1,328

hi,can you describe your problem in more detail?

as you used the 'obligatory' in your selection screen .you must fill the value p_eindt and p_monat if you want to run the program.

what do you want to do?

Read only

0 Likes
1,327

Hi ,

what values u want to pass as a default values ?

Read only

0 Likes
1,327

Hi Guys,

I want to fill up p_eindt from December 1 up to 31 and p_monat with 12 when user clicked on

p_end checkbox.

So p_eindt will have a value of lets say:

12/01/2007 - 12/31/2007

and p_monat with

12.

Read only

Former Member
0 Likes
1,327

Hi,

Use:

AT SELECTION-SCREEN ON P_END.

IF P_END = 'X' AND ( P_EINDT = ' ' ) AND (P_MONAT = ' ').

mESSAGE.

ENDIF.

But since you have given both the parameters as obligatory , you need to give some input values.

As per my understanding of ur query, i have coded as if p_end checkbox is checked and p_eindt and p_monat is empty, it would show some messge as to fill the values.

Reward points if useful,

Regards,

Vani.

Read only

Former Member
0 Likes
1,327

Hi,

For F4 help for any input value in selection screen u can use:

Ex:

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_eidnt-LOW.

SELECT DISTINCT edint INTO TABLE IT_ab FROM <tablename>..

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

    • DDIC_STRUCTURE =

RETFIELD = 'eindt'

    • PVALKEY = ' '

DYNPPROG = W_REPID

DYNPNR = W_DYNNR

DYNPROFIELD = 'p_eindt-LOW'

    • STEPL = 0

WINDOW_TITLE = 'Plant'

    • VALUE = ' '

VALUE_ORG = 'S'

    • MULTIPLE_CHOICE = 'X'

    • DISPLAY = ' '

    • CALLBACK_PROGRAM = ' '

    • CALLBACK_FORM = ' '

    • MARK_TAB = 'X'

    • IMPORTING

    • USER_RESET =

TABLES

  • VALUE_TAB = it_abc

    • FIELD_TAB =

    • RETURN_TAB = IT_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.

Try this.

Regards,

Vani.