2009 Mar 24 3:36 PM
Hi friends,
My reqirement is i need add a commet fieds in dialouge programming, i have a standered function module popup_to_confirm ,i have everything in this like title bar ,yes and no buttons,but after the buttons i need to write comments in commet box so how can i do this please help me.
Hi friends,
My reqirement is i need add a commet fieds in dialouge programming, i have a standered function module popup_to_confirm ,i have everything in this like title bar ,yes and no buttons,but after the buttons i need to write comments in commet box so how can i do this please help me.
2009 Mar 24 4:40 PM
For comment use textedit control like in below program:
REPORT z_textedit_fm.
DATA: it_str TYPE TABLE OF char72.
CALL SCREEN 100.
MODULE pbo_0100 OUTPUT.
SET PF-STATUS space.
CALL FUNCTION 'RH_EDITOR_SET'
EXPORTING
repid = sy-repid
dynnr = '0100'
controlname = 'CONTAINER'
max_cols = 72
max_lines = 20
TABLES
lines = it_str
EXCEPTIONS
create_error = 1
internal_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDMODULE. "pbo_0100 OUTPUT
MODULE pai_0100 INPUT.
IF sy-ucomm = 'BACK' OR
sy-ucomm = '%EX' OR
sy-ucomm = 'RW'.
LEAVE TO SCREEN 0.
ENDIF.
CALL FUNCTION 'RH_EDITOR_GET'
EXPORTING
controlname = 'CONTAINER'
col_width = 72
TABLES
lines = it_str
EXCEPTIONS
internal_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDMODULE. "pai_0100 INPUT
...or see this demo program SAPTEXTEDIT_DEMO_1 for textedit control by means of cl_gui_textedit class.
Regards
Marcin
2009 Mar 24 5:56 PM
hi ,
just copy the below code and paste
where p_comment is the text which is already ther if it there it will allow to change in run time else it will allow to enter new text with dialog box.
DATA : p_answer TYPE char30.
CALL FUNCTION 'POPUP_TO_GET_VALUE'
EXPORTING
fieldname = 'DESCRIPTION'
tabname = 'WOSCR_EXI_VALT'
titel = 'dialog for code comment'
valuein = p_comment "Old comment
IMPORTING
answer = p_answer
valueout = p_comment. "After editing new comment is added
IF sy-subrc <> 0.
ENDIF.
Regards,
Prabhudas
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |