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: 

Long String as parameter

Former Member
0 Kudos

I have the following

PARAMETERS: texto(10000) TYPE c.

But it only accept less than 200 characters and I want to receive more.

Is this possible?

Thanx in advance

9 REPLIES 9

Former Member
0 Kudos

Just curious, why do you need such a long parameter ? I am assuming that you need to allow the user to enter variable text descriptions which you can then use in your code.

Can you instead read in a text file which contains the necessary descriptions & then use it ? I think its cleaner this way & there is no restriction on the text length.

0 Kudos

I generate a letter in a Smart Form and the content for each one is different o_O.

Regards

0 Kudos

Hello Jose,

If you want to write an ABAP program, would you be comfortable using a single field of indefinite length where all your code can be written?

From the usability perspective, don't you think your user would also want to enter the text for the letter in some kind of an editor, something like the one in which you write your program?

You have got two options -

1. Provide a text-edit control (refer to Rich Heilman's post below)

2. Provide a standard text editor (the one where you'd generally write the documentation)

Regards,

Anand Mandalika.

former_member188685
Active Contributor
0 Kudos

I think it is not possible.

regards

vijay

Former Member
0 Kudos

Hi,

I dont think thats possible in Abap.

by the way what do u want the user to enter in a 10000 line width parameter?

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

A text editor might be good for you here.




report zrich_0001 .

data:
      dockingleft  type ref to cl_gui_docking_container,
      text_editor    type ref to cl_gui_textedit,
      repid type syrepid.

data: textlines type table of tline-tdline,
      wa_text type tline-tdline.

parameters: p_check.

at selection-screen output.

  repid = sy-repid.

  create object dockingleft
              exporting repid     = repid
                        dynnr     = sy-dynnr
                        side      = dockingleft->dock_at_left
                        extension = 1070.

  create object text_editor
              exporting
                   parent     = dockingleft.

start-of-selection.

  call method text_editor->get_text_as_r3table
     importing
           table              = textlines
     exceptions
           others             = 1.

  loop at textlines into wa_text.
    write:/ wa_text.
  endloop.

Regards,

Rich HEilman

Former Member
0 Kudos

The text for the letter probably is on the presentation server somewhere - right? So instead of setting the text as a parameter, you could simply upload the file.

Rob

Former Member
0 Kudos

Hi,

In selection screen provide a Pushbutton when ever user click the pushbutton provide him with Text editor .

for example

data : IT_TLINE TYPE STANDARD TABLE OF TLINE WITH HEADER LINE.

SELECTION-SCREEN PUSHBUTTON /33(25) PB1 USER-COMMAND 0001. "Details

AT SELECTION-SCREEN OUTPUT.

*-- To display the details Form text editor

PERFORM LAST_PAGE_TEXT

IF W_UCOMM = '0001'.

*-- Pass the some header documnet

WA_HEAD-TDOBJECT = 'FKKKO'.

WA_HEAD-TDID = 'FKK0'.

WA_HEAD-TDSPRAS = 'EN'.

WA_HEAD-TDFORM = 'SYSTEM'.

WA_HEAD-TDLINESIZE = 72.

WA_HEAD-TDTITLE = 'Acknowledgement'.

MOVE-CORRESPONDING WA_HEAD TO WA_NOTIZ-HEAD.

IF NOT WA_NOTIZ-HEAD-TDTITLE IS INITIAL.

WA_ITCED-USERTITLE = 'X'.

ENDIF.

*-- Call the Text editor

CALL FUNCTION 'EDIT_TEXT'

EXPORTING

DISPLAY = ' '

EDITOR_TITLE = 'Enter text for last page'(011)

HEADER = WA_HEAD

SAVE = ' '

CONTROL = WA_ITCED

TABLES

LINES = IT_TLINE

EXCEPTIONS

ID = 1

LANGUAGE = 2

LINESIZE = 3

NAME = 4

OBJECT = 5

TEXTFORMAT = 6

COMMUNICATION = 7

OTHERS = 8.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDIF. " IF W_UCOMM = '0001'.

once you trap that in internal table same you can pass to the layout.

Hope this will help you.

Thanks

Rajeev

former_member186741
Active Contributor
0 Kudos

Hi, as with most of the other responders I have to wonder why you want to do this...but you could have several(many)parameters of 200 and then move their contents into an internal table to work with.

eg

PARAMETERS: P_CODE1(200) LOWER CASE.

PARAMETERS: P_CODE2(200) LOWER CASE.

PARAMETERS: P_CODE3(200) LOWER CASE.

etc.

Another approach would be to use SAP standard texts which are maintained via SO10 and have the name of that as a parameter on your selection screen.