2013 Feb 15 9:18 AM
How create SO10 object for address and use in reports?
I want use the object in report not in smart forms..
2013 Feb 15 9:34 AM
Hi ,
Go to tcode--SE75 to create or change or display the text id and object name.
please follow the steps which are in the linkhttp://www.****************/Tutorials/ABAP/TableControl/TextEditor4.htm.
to save the text use follwing check the follwing sample code.
*&---------------------------------------------------------------------*
*& Form save_text
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->PT_TEXT text
* -->P_OBJECT text
* -->P_ID text
* -->P_TITLE text
* -->P_REQUEST text
*----------------------------------------------------------------------*
FORM save_text TABLES pt_text LIKE gt_text
USING p_object TYPE thead-tdobject
p_id TYPE thead-tdid
p_title TYPE thead-tdtitle
p_request TYPE zpp_prdtool-request.
DATA:l_thead TYPE thead,
lt_save TYPE TABLE OF tline,
ls_save TYPE tline,
ps_text LIKE LINE OF gt_text.
DATA: lv_tdname TYPE thead-tdname.
MOVE: p_matnr TO lv_tdname.
CONDENSE lv_tdname.
l_thead-tdobject = p_object.
l_thead-tdname = lv_tdname.
l_thead-tdid = p_id.
l_thead-tdspras = sy-langu.
l_thead-tdtitle = p_title.
l_thead-tdlinesize = 72.
DATA:ls_text LIKE LINE OF gt_text,
t_line LIKE gt_text,
s_line LIKE LINE OF gt_text,
lv_string TYPE string.
LOOP AT pt_text INTO ls_text.
ls_save-tdline = ls_text-line.
APPEND ls_save TO lt_save.
CLEAR: ls_text,ls_save.
ENDLOOP.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
client = sy-mandt
header = l_thead
insert = 'X'
TABLES
lines = lt_save
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.
ENDFORM. " SAVE_TEXT
to read the text use the FM 'READ_TEXT'.
reward if hellpful.
Regards,
Gurunath Kumar D
Hi ,
Go to tcode--SE75 to create or change or display the text id and object name.
please follow the steps which are in the linkhttp://www.****************/Tutorials/ABAP/TableControl/TextEditor4.htm.
to save the text use follwing check the follwing sample code.
*&---------------------------------------------------------------------*
*& Form save_text
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->PT_TEXT text
* -->P_OBJECT text
* -->P_ID text
* -->P_TITLE text
* -->P_REQUEST text
*----------------------------------------------------------------------*
FORM save_text TABLES pt_text LIKE gt_text
USING p_object TYPE thead-tdobject
p_id TYPE thead-tdid
p_title TYPE thead-tdtitle
p_request TYPE zpp_prdtool-request.
DATA:l_thead TYPE thead,
lt_save TYPE TABLE OF tline,
ls_save TYPE tline,
ps_text LIKE LINE OF gt_text.
DATA: lv_tdname TYPE thead-tdname.
MOVE: p_matnr TO lv_tdname.
CONDENSE lv_tdname.
l_thead-tdobject = p_object.
l_thead-tdname = lv_tdname.
l_thead-tdid = p_id.
l_thead-tdspras = sy-langu.
l_thead-tdtitle = p_title.
l_thead-tdlinesize = 72.
DATA:ls_text LIKE LINE OF gt_text,
t_line LIKE gt_text,
s_line LIKE LINE OF gt_text,
lv_string TYPE string.
LOOP AT pt_text INTO ls_text.
ls_save-tdline = ls_text-line.
APPEND ls_save TO lt_save.
CLEAR: ls_text,ls_save.
ENDLOOP.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
client = sy-mandt
header = l_thead
insert = 'X'
TABLES
lines = lt_save
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.
ENDFORM. " SAVE_TEXT
to read the text use the FM 'READ_TEXT'.
reward if hellpful.
Regards,
Gurunath Kumar D
2013 Feb 15 9:34 AM
Hi ,
Go to tcode--SE75 to create or change or display the text id and object name.
please follow the steps which are in the linkhttp://www.****************/Tutorials/ABAP/TableControl/TextEditor4.htm.
to save the text use follwing check the follwing sample code.
*&---------------------------------------------------------------------*
*& Form save_text
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->PT_TEXT text
* -->P_OBJECT text
* -->P_ID text
* -->P_TITLE text
* -->P_REQUEST text
*----------------------------------------------------------------------*
FORM save_text TABLES pt_text LIKE gt_text
USING p_object TYPE thead-tdobject
p_id TYPE thead-tdid
p_title TYPE thead-tdtitle
p_request TYPE zpp_prdtool-request.
DATA:l_thead TYPE thead,
lt_save TYPE TABLE OF tline,
ls_save TYPE tline,
ps_text LIKE LINE OF gt_text.
DATA: lv_tdname TYPE thead-tdname.
MOVE: p_matnr TO lv_tdname.
CONDENSE lv_tdname.
l_thead-tdobject = p_object.
l_thead-tdname = lv_tdname.
l_thead-tdid = p_id.
l_thead-tdspras = sy-langu.
l_thead-tdtitle = p_title.
l_thead-tdlinesize = 72.
DATA:ls_text LIKE LINE OF gt_text,
t_line LIKE gt_text,
s_line LIKE LINE OF gt_text,
lv_string TYPE string.
LOOP AT pt_text INTO ls_text.
ls_save-tdline = ls_text-line.
APPEND ls_save TO lt_save.
CLEAR: ls_text,ls_save.
ENDLOOP.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
client = sy-mandt
header = l_thead
insert = 'X'
TABLES
lines = lt_save
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.
ENDFORM. " SAVE_TEXT
to read the text use the FM 'READ_TEXT'.
reward if hellpful.
Regards,
Gurunath Kumar D
2013 Feb 18 6:27 AM
Hi tanvi,
The tcode SO10 used to create the text object id, this object id will be using in scripts by using include statement text editor call this object which has been created in SO10.
Create object in SO10 enter the text name which blongs to customer name space and select Text id = ADRS, then type what ever text you want finally activate it.
In reports we can call this text id by using FM Read_text.
2013 Feb 18 12:13 PM
Hi Tanvi,
Use FM - READ_TEXT to get the details of Address.
Which one you can use in your report.
Thanks
Tarak
2013 Mar 12 9:35 AM
Hi,
to solve this issue you can use function module READ_TEXT into report.
this parameter is obligatory
ID LIKE THEAD-TDID Text ID of text to be read
LANGUAGE LIKE THEAD-TDSPRAS Language of text to be read
NAME LIKE THEAD-TDNAME Name of text to be read
OBJECT LIKE THEAD-TDOBJECT Object of text to be read
LINES LIKE TLINE Lines of text read
Example
CALL FUNCTION 'READ_TEXT'
EXPORTING
* CLIENT = SY-MANDT
id = 'ST'
language = sy-langu
name = zname
object = 'TEXT'
* ARCHIVE_HANDLE = 0
* LOCAL_CAT = ' '
* IMPORTING
* HEADER =
TABLES
lines = ztline
Best Regards
Ivan
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |