2016 Jan 27 8:09 AM
Hello All,
I have created a report on which there is a selection screen with select options.I am passing a string in Select-Options in runtime while executing the report. But length of the string which I am passing is about 50 chars.But Select options wont allow this so I am using Parameters for that.
But I have to pass more than 1 string with about 50 characters. How to add that multiple values using parameters?
Ragards,
Rahul
Hello All,
I have created a report on which there is a selection screen with select options.I am passing a string in Select-Options in runtime while executing the report. But length of the string which I am passing is about 50 chars.But Select options wont allow this so I am using Parameters for that.
But I have to pass more than 1 string with about 50 characters. How to add that multiple values using parameters?
Ragards,
Rahul
2016 Jan 27 8:37 AM
I would re-visit your select options. Any user having to type in multiple 50 character strings will be bound to make mistakes.
Explain a bit more.
Are these strings static ? Ie is the user selecting from a list of values that rarely changes - or only changes programatically ?? If that is the case consider using a code for each string, which is specified in a database table, and that database table is the check table for a domain. That will provide a popup list or you can then read those values and populate a VRM drop down.
If they are not static strings then what are they ? Can you make a dynamic domain out of them ?
Give more information and you will get a better answer.
Regards
Rich
2016 Jan 27 12:50 PM
Hi Rahul,
Since you did not include any code samples it hard to tell how your declaring your select option or the variables used by it but did you declare it using the following code?
TYPES: BEGIN of sample_structure,
sample(50) TYPE c,
END OF sample_structure.
DATA SAMPLE_TABLE TYPE TABLE OF sample_structure WITH HEADER LINE.
SELECT-OPTIONS s_range FOR sample_table-sample NO INTERVALS.
Please note the only reason i did the types and data declaration was that i had no tables with a field of 50 char available so i had to create one.
But i also agree with Richard that depending on what your trying to do there may be better ways to go about this then having users type in a 50 char string.
Geoffery
2016 Jan 28 12:41 AM
Just search for the data type CHAR<N> where N is the number you want the length of input parameter to be in SE11 and do a where-used on that. For example, search for data type CHAR50 and check its where used list. You will get table name along with field name where it is used.
Use this field's data type to create your select option on selection screen. It should not be an issue. But yes, before that do consider that why do you want to give a string type field on selection screen? Is it actually required?
Regards,
Richa
2016 Jan 28 6:06 AM
Hello All,
In the code , I am using this:
SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_reciv FOR somlrec90-receiver NO INTERVALS. "For multiple Email IDs
SELECTION-SCREEN : END OF BLOCK b1.
When I execute the program, I need to paas Multiple Email Ids in this select options . The length of those email IDs are huge.So its not taking email IDs with large number of characters.
Because of this , I am using PARAMETERS. But there is not provision in PARAMETERS to enter multiple values .
2016 Jan 28 6:33 AM
Hi,
What is the length of the email ids?
The field somlrec90-receiver can take upto 1215 characters.
Regards,
Taiyeb
2016 Jan 28 6:51 AM
Hi Taiyeb,
Its length is about 50 chars.
For example.
Here, it is not allowing the full length. i am unable to add '.com' in the last
Regards,
Rahul
2016 Jan 28 8:07 AM
Hi,
Could you tell me what is the length of somlrec90-receiver field.
If it is 50 characters then only the limitation arises, otherwise it should allow you to enter for the length specified.
Regards,
Taiyeb
2016 Jan 28 8:12 AM
Why don't you use SAP email field?
tables adr6.
select-options:s_email for adr6-smtp_addr.
2016 Jan 28 8:18 AM
Hi Taiyab,
The length of somlrec90-receiver field is 1215 CHARS. Still the select options wont allow length more than 45 chars.
Regards,
Rahul
2016 Jan 28 8:19 AM
Hi Nabneet,
I have tried select-options:s_email for adr6-smtp_addr. It is also not working as SELECT OPTIONS wont allow more than 45 chars
Regards,
Rahul
2016 Jan 28 8:25 AM
Hi,
Unfortunately this was a limitation for earlier NW release.
Please check this thread.
http://scn.sap.com/thread/3252093
Hope it helps.
Regards,
Taiyeb
2016 Jan 28 8:27 AM
2016 Jan 28 8:27 AM
I don't think select-option is suitable for some mail address, much too long, I would consider some true module program with some table control or ALV grid for input. Note that in second case you could display an ALV for input in a docking container during execution of a selection-screen.
Regards,
Raymond
2016 Jan 28 8:47 AM
Hmmm.
I like that idea - I've very often displayed results in an alv grid on with the selection screen above it but never used it as a parameter.
If you are talking about email addresses, then you will need a regex to check to see if it has a valid structure or not....
And this is a good example of where with-holding information at the start has made answering your question difficult.
Rich
2016 Jan 28 10:45 AM
Question: with which version does the OP work?
Actually, those "truncation" problems on select-options (and parameters in some cases) should be solved for system versions with BASIS 7.02 (when maximal length was raised to 255) or more recent, that should be enough:
The maximum length is specified in RFC 5321: "The maximum total length of a reverse-path or forward-path is 256 characters"
Regards,
Raymond
2016 Jan 28 10:50 AM
2016 Jan 28 10:16 AM
Hi,
Please try like this :
data test type text80.
SELECT-OPTIONS: s_reciv FOR test.
read table s_reciv.
if sy-subrc = 0.
write : s_reciv-low.
endif.
Go To SE51 with program name and screen number as 1000 and there you can change the field definite length to the desired length and it works.
Regards,
Pallavi
2016 Jan 28 10:31 AM
2016 Jan 28 10:36 AM
Hi Richard,
So, Can we create a user defined selection screen and place the screen elements with desired length instead? and call it from the ZProgram?
Please suggest .
Regards,
Pallavi
2016 Jan 28 10:39 AM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |