Application Development 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: 

Issue In Providing 255 Charcters From The Selection Screen Select-Option

former_member191434
Participant
0 Kudos

Dear Guru,

I am searching for table field with having length = 255 character.

which i want to use in select-option for proving data from the selection screen.

I have found the table myhlp and it associated field allvals which is having length = 255.

I am using it as below in my selection screen for the value to be provided 255 character long.

SELECTION-SCREEN : BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
SELECT-OPTIONS   : s_mlbody FOR myhlp-allvals  NO INTERVALS.
SELECTION-SCREEN : END OF BLOCK b3.

Now when i am going for the multiple selection option --> It is providing me the Multiple selection popup and giving me the provision of provide multiple line .

But the issue is that --> For a particular single value line in the popup i am able to enter only 45 charcters not 255 character.

But i need to put 255 charcter for particular line in a single value..

Please give me some guideline how resolve this or any other alternative way of reading the 255 charcter from the selection screen

Thanks & regards

Saifur Rahaman

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Parameters statement can allow input upto 132 characters long,and select-options - upto 45 charcters long. As far as i know its not possible through select-options and parameters statements. In module pools its possible to assign filed length to 255 charcters length

Regards,

Ravi.

17 REPLIES 17

former_member194669
Active Contributor
0 Kudos

Select-options have length limitation of 45 character. You need to use as paramter instead of select options.

like


parameters : p_1(250) type c.
parameters: p_2(250) type c.
parameters: p_3(250) type c.
parameters: p_4(250) type c.

0 Kudos

Dear a®s

I have gone through the suggestion you have given for .

The 1st Isuue : parameter i am only able to provide 132 chacter from the selection screen

The 2nd Issue is if we using parameter in the selection screen that means we are restricting the provision of multiple i/p s

cos suppose if user wants to add 10-15 lines then for that i have code 10-15 parameters which looks little immature kind of taking user input.

so in alternative way how we can achieve this ??

Please provide some guideline

Thanks & regards

Saifur Rahaman

Former Member
0 Kudos

Hi,

Parameters statement can allow input upto 132 characters long,and select-options - upto 45 charcters long. As far as i know its not possible through select-options and parameters statements. In module pools its possible to assign filed length to 255 charcters length

Regards,

Ravi.

0 Kudos

Dear rshankar ,

I have gone through the opinion you have provided. I agree with you in this case.

But i want to provide it from the selection screen itself so that i can save it into a variant and using that variant whenever reports get executed no need to provide that 255 character length line again and again.

Please Provide some guideline other than modulepool if it is possible to resolve

Thanks & regards

Saifur Rahaman

0 Kudos

Hi,

The other way is using class CL_GUI_TEXTEDIT.

I think you need this 255 character length screen for composing mail body.If so try using this class.

Regards,

Lakshman.

0 Kudos

Hi,

As said by Laxmanan , text edit control is other option. In text editor you can enter more no of charcters. if you are using this for a cutomized report than you can get vaues split by using any special charcters (example ; ). use split command before your selection. The better way is always select the datas by primary keys atleast not by long text fields.

Regards,

Ravi

0 Kudos

Dear Lakshman N

If i use this class the how should i link it from the selection screen i/p to this class and to the o/p of the report or any internal table . Can you provide me some guide line...

Thanks & Regards

Saifur Rahaman

0 Kudos

Dear rshankar ,

I have gone through the suggestion you have given for text edito control,

Th thing which i want to know now

1. what is the tcode for Text editor control

2. how i should use this in my report to get the values written in text editor .

Can you please provide some guideline

Thanks & regards

Saifur Rahaman

0 Kudos

Hello Saifur,

But i want to provide it from the selection screen itself so that i can save it into a variant and using that variant whenever reports get executed no need to provide that 255 character length line again and again

Are the values input by the user fixed & i mean is it one time entry only ? Please clarify.

BR,

Suhas

0 Kudos

Hi,

Have a look at this link.

[Text Editor using cl_gui_textedit|;

Please go to the transaction code EMAIL.Just check the code for the text editor for this tcode .You will get clear idea on this.

There is a method set_text_as_r3table in this class which is used to get the input entered in editor into an internal table.

Regards,

Lakshman.

Edited by: Lakshman N on Dec 14, 2009 10:06 AM

0 Kudos

Another possible solution will be create a custom screen with table controll with a length of 255 , and then place a button in the selection screen. On click of this button this custom screen needs to be called and get user input and the go for start-of-selection

0 Kudos

Suhas Da,

It s not an one time entry , if is one time entry the I could have done using hardcoding in the program but the user need need the chage the text line as per their won wish ... that is the reason why i am implicitly telling user want thyself to provide the desired inputs and for each line there should be 255 charcter. and they want to run the report in back ground also so that multiple time they dont need to fire the tcode again and again

Is there any possible way to achieve this ....

can you provide some guideline

Thanks & regards

Saifur Rahaman

0 Kudos

Hi,

As suggested, try string, it will allow 255 characters.

parameters p1 type string.

data l type i.

l = strlen( p1 ).

write l

0 Kudos

Hi,

As said by A@s selction screen with table control will be a good option.

design a custom screen with SUBSCREEN as screeen attribute using tcode se51.

For table control sample - go through Tcode ABAPDOCU - abap user dialogs-screens-complex screen- table control

Try Following,

REPORT Zsample .

controls: tc type tableview using screen 200.

parameters: p_user type myhlp-username.

data: begin of itab occurs 50,

field1(255) type c,

end of itab.

data: i_out type standard table of myhlp.

SELECTION-SCREEN BEGIN OF TABBED BLOCK MAX FOR 22 LINES.

SELECTION-SCREEN TAB (25) TABS1 USER-COMMAND UCOMM1

DEFAULT SCREEN 200.

SELECTION-SCREEN END OF BLOCK MAX.

start-of-selection.

select * from myhlp into table i_out for all entries in itab

where username eq p_user

and allvals = itab-field1.

----


MODULE READ_ITAB INPUT.

insert itab index tc-current_line.

ENDMODULE. " READ_ITAB INPUT

0 Kudos

A very good suggestion you have provided .

Let me try it

Former Member
0 Kudos

Hi

Try with below code but this is possible only in E ECC 6.0

PARAMETERS:p_text TYPE string LOWER CASE.

TYPES:BEGIN OF ty_text,

text(75) TYPE c,

END OF ty_text.

DATA:v_do TYPE sy-index.

DATA:v_dec TYPE p DECIMALS 2,

v_len TYPE i.

DATA:v_start TYPE i,

v_end TYPE i.

DATA:wa_text TYPE ty_text.

DATA:it_text TYPE STANDARD TABLE OF ty_text.

START-OF-SELECTION.

v_len = 250.

v_dec = v_len / 75.

v_do = FLOOR( v_dec ).

CLEAR:v_start,v_end.

DO v_do TIMES.

v_end = v_start + 75.

wa_text-text = p_text+v_start(75).

APPEND wa_text TO it_text.

CLEAR:wa_text.

v_start = v_start + 75.

ENDDO.

IF v_end LT v_len.

v_start = v_end.

v_end = v_len - v_end.

wa_text-text = p_text+v_start(v_end).

APPEND wa_text TO it_text.

CLEAR:wa_text.

ENDIF.

LOOP AT it_text INTO wa_text.

WRITE:/ wa_text-text.

ENDLOOP.

Regards

Srilaxmi

0 Kudos

Dear Srilaxmi,

I have tried the suggestion you have opted for.

For this i am getting the below dump

Runtime Errors STRING_OFFSET_LENGTH_TOO_LARGE

Except. CX_SY_RANGE_OUT_OF_BOUNDS