Application Development and Automation 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: 
Read only

Variants and edit control

rainer_hbenthal
Active Contributor
0 Likes
629

I would like to have a report with a custom control (containing cl_gui_textedit) which can save variants for some other fields.

So either i build my own screen, but how do i save the input fields(not the control) in a variant?

Or i am creating a standard report with a selection screen, but how can i use the text editor in the selection screen?

Any suggestions?

1 ACCEPTED SOLUTION
Read only

former_member194669
Active Contributor
0 Likes
556

So either i build my own screen, but how do i save the input fields(not the control) in a variant?

I think this is not possible , ie save contents of textedit gui control in a variant.

but how can i use the text editor in the selection screen?

Possible way is create a push button in selection screen and user press the button call fm EDIT_TEXT

So either i build my own screen, but how do i save the input fields(not the control) in a variant?

I think this is not possible , ie save contents of textedit gui control in a variant.

but how can i use the text editor in the selection screen?

Possible way is create a push button in selection screen and user press the button call fm EDIT_TEXT

3 REPLIES 3
Read only

former_member194669
Active Contributor
0 Likes
557

So either i build my own screen, but how do i save the input fields(not the control) in a variant?

I think this is not possible , ie save contents of textedit gui control in a variant.

but how can i use the text editor in the selection screen?

Possible way is create a push button in selection screen and user press the button call fm EDIT_TEXT

Read only

0 Likes
556

No, the content of text edit control does not need to be saved in the variant. I have some other fields which i'm putting either in the selection screen (but then i dont know how to show the text edit control) or i'm creating my own screen with drop down boxes but then i dont know how to save them in a variant. Selection fields and edit control should be visible together, but only the selection fields needs to be stored in a variant. Hope it is a little bit clearer now.

Read only

0 Likes
556

1. Save variant in a dialog screen

/people/alvaro.tejadagalindo/blog/2007/05/22/save-a-variant-from-a-dynpro-screen

2. Putting a long text in selection screen

The following example is provided by Rich in this forum few months back


report  zars no standard page heading
        line-size 170
        line-count 65(4).
data:
      dockingleft  type ref to cl_gui_docking_container,
      text_editor    type ref to cl_gui_textedit,
      repid type syrepid.

data: begin of header.
        include structure thead.
data: end of header.

data: begin of lines occurs 0.
        include structure tline.
data: end of lines.

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

parameters: p_check.
parameters: matnr like mara-matnr.

at selection-screen output.

  repid = sy-repid.

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

  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.