‎2008 Feb 15 2:39 PM
Hi all,
I have a declaration like
data : begin of it_data occurs 0,
matnr like mara-matnr,
ernam like mara-ernam,
end of it_data.
select-options s_data for it_data.
so frnds can anyone tell me what is the problems in using this select-options and any performance problem.
regards,
satish
‎2008 Feb 15 2:44 PM
Hi Satish,
You can not use SELECT-OPTION for an internal table.
You can only use Database tables.
And for using these table u have to define them in the top by using TABLES option.
Example if u want to use table field from MATNR in your select option.
Do like this.
TABLES : MATNR.
SELECT-OPTIUON.................................... and so on.
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Feb 15, 2008 2:51 PM
‎2008 Feb 15 2:45 PM
Hi,
Select-options are declared only for feilds not for table. In your requirement you have to declare as
select-options: s_matnr for mara-matnr,
s_erdat for mara-erdat.
then it will execute perfectly.
Thanks
Sarada
‎2008 Feb 15 3:08 PM
‎2008 Feb 15 3:35 PM
Hi,
After execution, it will display low option and high option with 30char length each(18 matnr & 12 ernam)..
So when u wil fill 30 characters in low then it wil fill matnr-low and ernam-low in sequence same applies to high option. Here we can access all fields MATNR-LOW HIGH & ERNAM-LOW HIGH. And selection table strucre wil b like sign option matnr-low ernam-low matnr-high ernam-high.
So it will execute normally.
<REMOVED BY MODERATOR>
-Pranjali.
Edited by: Alvaro Tejada Galindo on Feb 15, 2008 2:53 PM
‎2008 Feb 15 2:53 PM
hi,
here s_data is internal Table.
The Components of This S_DATA is.
SIGN OPTION LOW-MATNR LOW-ERNAM HIGH-MATNR HIGH-ERNAM.
After execution of program if u give any value for low.
Every time it is assiging to LOW-MATNR.
we can not Assign the value LOW-ERNAM.
Similarly for HIGH-ERNAM also.
That is only the drawback with the above Declaration..
Anyway u done a Nice experiment.
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Feb 15, 2008 2:52 PM
‎2008 Feb 15 3:09 PM
By using this syntax, you get a SELECT-OPTIONS on a CHAR field of length 30
Be aware than in low field (resp. high) the conversion exit for matnr has not been executed,
Also, user will have to count the character and no search help available.
And you wont be able to use this SELECT-OPTIONS in a SELECT ... WHERE X IN selopt.
Interesting, but what was your purpose?
Regards
‎2008 Feb 15 7:07 PM
SELECT-OPTION for DB table fields not for internal table fields.
you use code like this
data : abc type mara-matnr. (instead of table it is efficient)
data : begin of it_data occurs 0,
matnr like mara-matnr,
ernam like mara-ernam,
end of it_data.
select-options s_data for abc.