2010 May 04 7:25 AM
Hi
I have select option to be defined in dialog screen 9000.
I have created Input/output field low and high.
How to call select options in the screen and where in PBO or PAI need to defined.
Thanks,
ERP
Hi
I have select option to be defined in dialog screen 9000.
I have created Input/output field low and high.
How to call select options in the screen and where in PBO or PAI need to defined.
Thanks,
ERP
2010 May 04 7:31 AM
HI,
Select-options cannot be defined like that.
Just check this
http://wiki.sdn.sap.com/wiki/display/ABAP/Select-OptionsinModulePoolProgramming
http://sample-code-abap.blogspot.com/2008/06/select-option-in-module-pool-screen.html
Regards and Best wishes.
2010 May 04 7:32 AM
hi,
this is wat u want.
http://sample-code-abap.blogspot.com/2008/06/select-option-in-module-pool-screen.html
Edited by: gaurav.singh on May 4, 2010 8:33 AM
2010 May 04 7:50 AM
Hi,
<< Cut and paste without attribution from removed >>
Edited by: Rob Burbank on May 5, 2010 4:50 PM
2010 May 14 8:52 PM
USe the FM 'COMPLEX_SELECTIONS_DIALOG' and also create two I/O field on the screen and pushbutton beside the to field
when use the options call theFM.
The user command : 'TEST' "Push button selected
gv_tln_tab-fieldname = 'MATNR'.
gv_tln_tab-tablename = '/SAPAPO/MATKEY'.
CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
EXPORTING
TITLE = ' '
TEXT = TEXT
SIGNED = 'X'
LOWER_CASE = ' '
NO_INTERVAL_CHECK = ' '
JUST_DISPLAY = ' '
JUST_INCL = ' '
EXCLUDED_OPTIONS = EXCLUDED_OPTIONS
DESCRIPTION = DESCRIPTION
HELP_FIELD = HELP_FIELD
SEARCH_HELP = SEARCH_HELP
tab_and_field = gv_tln_tab
TABLES
range = r_tln_matnr
EXCEPTIONS
no_range_tab = 1
cancelled = 2
internal_error = 3
invalid_fieldname = 4
OTHERS = 5
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF NOT /sapapo/v_matloc-matnr IS INITIAL.
IF NOT /sapapo/matkey-matnr LE /sapapo/v_matloc-matnr.
--> set the global error flag
PERFORM set_error.
MESSAGE e215 WITH text-560.
ENDIF.
ENDIF.
IF NOT /sapapo/matkey-matnr IS INITIAL OR
NOT /sapapo/v_matloc-matnr IS INITIAL. "OR
NOT r_tln_matnr[] IS INITIAL.
*--->Get Select options for MATNR
PERFORM gv_tln_matnr.
ELSEIF NOT r_tln_matnr[] IS INITIAL.
READ TABLE r_tln_matnr INDEX 1.
IF sy-subrc = 0.
/sapapo/matkey-matnr = r_tln_matnr-low .
ENDIF.
ENDIF.
The user command : 'TEST'
gv_tln_tab-fieldname = 'MATNR'.
gv_tln_tab-tablename = '/SAPAPO/MATKEY'.
CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
EXPORTING
TITLE = ' '
TEXT = TEXT
SIGNED = 'X'
LOWER_CASE = ' '
NO_INTERVAL_CHECK = ' '
JUST_DISPLAY = ' '
JUST_INCL = ' '
EXCLUDED_OPTIONS = EXCLUDED_OPTIONS
DESCRIPTION = DESCRIPTION
HELP_FIELD = HELP_FIELD
SEARCH_HELP = SEARCH_HELP
tab_and_field = gv_tln_tab
TABLES
range = r_tln_matnr
EXCEPTIONS
no_range_tab = 1
cancelled = 2
internal_error = 3
invalid_fieldname = 4
OTHERS = 5
.
IF sy-subrc = 0.
IF r_tln_matnr[] IS INITIAL.
CLEAR : /sapapo/matkey-matnr, /sapapo/v_matloc-matnr.
ELSE.
READ TABLE r_tln_matnr INDEX 1.
/sapapo/matkey-matnr = r_tln_matnr-low.
/sapapo/v_matloc-matnr = r_tln_matnr-high.
CLEAR r_tln_matnr.
ENDIF.
ELSEIF sy-subrc EQ 2.
MESSAGE s215 WITH text-561.
ELSEIF sy-subrc <> 0 AND sy-subrc <> 2.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |