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

SO10 transaction

Former Member
0 Likes
891

How create SO10 object for address and use in reports?

I want use the object in report not in smart forms..

1 ACCEPTED SOLUTION
Read only

gurunathkumar_dadamu
Active Contributor
0 Likes
817

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

How create SO10 object for address and use in reports?

I want use the object in report not in smart forms..

4 REPLIES 4
Read only

gurunathkumar_dadamu
Active Contributor
0 Likes
818

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

Read only

Former Member
0 Likes
817

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.

Read only

Former Member
0 Likes
817

Hi Tanvi,

Use FM - READ_TEXT to get the details of Address.

Which one you can use in your report.

Thanks

Tarak

Read only

Former Member
0 Likes
817

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