‎2007 Jul 31 4:27 AM
Hello All,
What is the name of the standard SAP structure for SELECT-OPTIONS?
Thanks in Advance,
Prasad
‎2007 Jul 31 4:31 AM
Well, SELECT-OPTIONS is a internal table with 4 fields, SIGN, OPTION, LOW and HIGH. SIGN and OPTION are always 1 and 2 characters, LOW and HIGH take the type and length of the field that it references. So really, there is not a "Standard" structure, because you would want the LOW and HIGH fields to have the same data type and length as the field that you are referencing. For example, say you want a SELECT-OPTIONs for a date field.
select-options: s_datum for sy-datum.The LOW and HIGH would have the data type D with a length of 8.
Regards,
Rich Heilman
‎2007 Jul 31 4:39 AM
As Rich says, the LOW & HIGH depend on the field you are have the select-option for... if you want to write something generic, you could try something like having an internal table like structure BBPF4B "BAPI Selection Options for Choosing Values via Search Help" as a way of passing parameters around, and adjust the LOW & HIGH when needed (e.g. you might need to apply conversion exits or move-corresponding into a suitable local range object before searching the database for matching values).
‎2007 Jul 31 4:39 AM
‎2007 Aug 07 6:49 AM
i am using select - option statement in dis way : -
SELECT-OPTIONS : PO_DATE FOR AUFK-ERDAT,
PO_TYPE FOR AUFK-AUART,
PO_CO_M FOR RESB-MATNR.
but i want to write po_date as PRODUCTION ORDER DATE , as i know d default value is 8 characters,i want to know the solution problem.plz help me its urgent.
‎2007 Aug 07 7:25 AM
Hi yakul.
(1) Sample1
REPORT demo_sel_screen_select_default.
DATA wa_spfli TYPE spfli.
SELECT-OPTIONS airline FOR wa_spfli-carrid
DEFAULT 'AA'
TO 'LH'
OPTION nb
SIGN i.
(2) Sample2
....
SELECT-OPTIONS : PO_DATE FOR AUFK-ERDAT,
PO_TYPE FOR AUFK-AUART,
PO_CO_M FOR RESB-MATNR.
.....
INITIALIZATION.
PO_DATE-LOW = SY-DATUM.
PO_DATE-OPTION = 'EQ'.
PO_DATE-SIGN = 'I'.
APPEND PO_DATE.
....
Message was edited by:
Hyejeong Baik
‎2007 Aug 07 7:38 AM
Hi
You have declared as below.
SELECT-OPTIONS : PO_DATE FOR AUFK-ERDAT,
PO_TYPE FOR AUFK-AUART,
PO_CO_M FOR RESB-MATNR.
To Get the Description for PO_DATE as PRODUCTION ORDER DATE
Steps:
<b>1. Activate your program.
2. In the Source code of your program Select the menu path
GOTO -> TEXT ELEMENTS -> SELECTION TEXTS
There it will show all the fields of ur selection Screen
Enter the Descriptions you want.
3. Activate the Text elements and come back to Source code
4. Execute the program</b>
<b>Reward if Helpful.</b>
‎2007 Aug 07 7:52 AM