‎2008 Feb 18 7:33 AM
hiiiiiiiiiii
hi i want a text box in a selection-screen as a input field
in that i want to write a paragraph upto 500 characters.
pls tell me the coding.
thanks.
‎2008 Feb 18 7:40 AM
Hi,
In this case write the description as selcection screen comment, and then input box (select option) on the selection screen.
Example:
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 10(20) TEXT-001
FOR FIELD PARM.
SELECTION-SCREEN POSITION POS_LOW.
PARAMETERS PARM LIKE SAPLANE-PLANETYPE.
SELECTION-SCREEN END OF LINE.
Other option is to provide F1 help for the selection screen input box.
Hope this helps..
Thanks,
Harikrishna.
‎2008 Feb 18 9:38 AM
Hi Manpreet,
In a selection screen,input field can be defined using PARAMETER or SELECT-OPTIONS components.
In your case,PARAMETERS is a better option.
However using PARAMETERS,the maximum length of the input field is 132. The maximum visible length of the input field is between 39 and 45, depending on the nesting depth in blocks with frames.
Keeping this in mind,you can declare different parameters with max. length of 132 to write a paragraph of lengh 500 characters.
For example:
SELECTION-SCREEN BEGIN OF BLOCK b1.
PARAMETERS:
ROW1(132) TYPE C,
ROW2(132) TYPE C,
- - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - -- - - --
SELECTION-SCREEN END OF BLOCK b1.
If you wish to make the contents of the paragraph visible in the input field,you need to declare parameters with max. visible length of the input field between 39 and 45.
Hope this helps.
Regards,
Kaveri.
‎2008 Feb 18 9:59 AM
Edited by: priya padhee on Feb 18, 2008 11:56 AM
Edited by: priya padhee on Feb 18, 2008 11:56 AM
‎2008 Feb 18 11:20 AM
hi
good
Check this sample.
SELECTION-SCREEN BEGIN OF BLOCK BLCK1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: S_EBELN FOR EKKO-EBELN MODIF ID RD1,
S_ANFNR FOR EKPO-ANFNR MODIF ID RD2,
S_EKORG FOR EKKO-EKORG.
SELECTION-SCREEN SKIP.
PARAMETERS: P_PO RADIOBUTTON GROUP RAD1 USER-COMMAND USR DEFAULT 'X',
P_KON RADIOBUTTON GROUP RAD1,
P_RFQ RADIOBUTTON GROUP RAD1.
SELECTION-SCREEN END OF BLOCK BLCK1.
AT SELECTION-SCREEN OUTPUT.
IF P_PO = 'X' OR P_KON = 'X'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'RD2'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'RD1'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
<REMOVED BY MODERATOR>
thanks
mrutyun^
Edited by: Alvaro Tejada Galindo on Feb 18, 2008 2:34 PM
‎2008 Feb 18 11:24 AM
Hi,
Look at class cl_gui_textedit
(1) Screen
In dynpro create a custom container, call it 'INPUTBOX' or so
(2) In program top, declare
codeDATA: container TYPE REF TO cl_gui_custom_container,
editor TYPE REF TO cl_gui_textedit.[/code]
(3) in PBO
if editor is initial.
CREATE OBJECT: container EXPORTING container_name = 'TEXTBOX',
editor EXPORTING parent = container
wordwrap_mode = 2
wordwrap_position = 80
wordwrap_to_linebreak_mode = 1.
CALL METHOD editor->set_text_as_r3table
EXPORTING table = texttab.
ENDIF.
(4) in PAI
read the text
codeIF NOT init IS INITIAL.
CALL METHOD editor->get_text_as_r3table
IMPORTING table = texttab.[/code]
exit and release
code CALL METHOD editor->free.
CALL METHOD container->free.
CLEAR: editor, container.
ENDIF.[/code]
Look at SAP Textedit.
Regards,
Chandru