07-06-2006 12:34 PM
In report i want an editor. Initially it blank. When we write something in this , then we save it. when we again run our program then we see this data only in disply mode with time stamp, user and date.I did not want this data to be changed other this we again write something & save it then we want whole data only in display mode.
07-06-2006 12:38 PM
07-06-2006 12:38 PM
Hello,
DATA: text type string.
If text is initial.
<b>format input on.</b>write: text.
endif.
So using format input on.
U can do this.
Reward points for useful answer.
Regards,
Vasanth
07-06-2006 12:38 PM
Hi,
To achieve this, following are required,
1. Input enabled fields in the report,
2. Custom table to store the report fields along with the input fields & date , time stamp,
whenever the report is run, it gets the details from the custom table, once the data is saved after editing, the custom table will have new entry, which cant be edited, this can also be done using Module pool programming,
Rds,
07-06-2006 12:40 PM
Hi Abhishek,
You can create an editor , but for that you have to use dialog programming... You have to use container concept and CL_GUI_TEXTEDIT class to create a text editor ....
May be you can try with INPUT ON addition of the parameters...
Otherwise , I don't think it is possible to create an editor....
Regards,
SP.
07-06-2006 12:43 PM
Try to use this..........
REPORT zabtext1 .
DATA : zthead LIKE thead,
znewhead LIKE thead,
ztline LIKE tline OCCURS 0 WITH HEADER LINE,
ztline1 LIKE tline OCCURS 0 WITH HEADER LINE,
ztline2 LIKE tline OCCURS 0 WITH HEADER LINE.
DATA : control LIKE itced.
DATA : BEGIN OF zstru,
clnt LIKE thead-mandt value,
id LIKE thead-tdid VALUE 'ZTOI',
en LIKE thead-tdspras VALUE 'E',
name LIKE thead-tdname VALUE '001',
obj LIKE thead-tdobject VALUE 'ZTO',
END OF zstru.
*DATA: txfunction(1) TYPE c.
display,
textscreen.
zthead-tdobject = 'ZTO'.
zthead-tdname = '001'.
zthead-tdid = 'ZTOI'.
zthead-tdspras = 'E'.
zthead-tdfuser = sy-uname.
ztline-tdformat = ''.
*ztline-tdline = '<SY-DATUM> <SY-UNAME>'.
*APPEND ztline.
CALL FUNCTION 'INIT_TEXT'
EXPORTING
id = zstru-id
language = zstru-en
name = zstru-name
object = zstru-obj
IMPORTING
header = zthead
TABLES
lines = ztline[]
EXCEPTIONS
id = 1
language = 2
name = 3
object = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'READ_TEXT_INLINE'
EXPORTING
id = zstru-id
inline_count = 26
language = zstru-en
name = zstru-name
object = zstru-obj
LOCAL_CAT = ' '
IMPORTING
header = zthead
TABLES
inlines = ztline2
lines = ztline1
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
OTHERS = 7
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
DATA: line TYPE i.
DESCRIBE TABLE ztline1 LINES line.
control-changemode = 'X'.
CONCATENATE '<' sy-uname '>' '<' sy-datum '>' '<' sy-timlo '>' INTO
ZTLINE1 SEPARATED BY space.
APPEND ZTLINE1.
CALL FUNCTION 'EDIT_TEXT_INLINE'
EXPORTING
display = ' '
editor_title = ' '
header = zthead
inline_count = line
save = 'X'
textscreen = 'X'
line_editor = 'X'
control = 'X'
suppress_end_space = 'X'
PROGRAM = ' '
LOCAL_CAT = ' '
IMPORTING
FUNCTION =
newheader = zthead
RESULT =
TABLES
inlines = ztline2
lines = ztline1
EXCEPTIONS
id = 1
language = 2
linesize = 3
name = 4
object = 5
OTHERS = 6
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
07-06-2006 1:10 PM
Hi abhishek,
1. in your program,
2. give like this,
CALL FUNCTION 'EDIT_TEXT_INLINE'
EXPORTING
<b>control = control</b>
3.
control = 'X'
gives error.
regards,
amit m.
07-06-2006 12:40 PM
creating a text object will suffice ur requirement. refer to se75 for creating text object.