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

TEXTS

Former Member
0 Likes
626

HOW TO UPLOAD N DOWNLOAD THE TEXT TO THE APPLICATIONS THRU BDC?AND ALSO BY USING THE FUNCTION MODULES READ_TEXT AND SAVE-TEXT?

THANKS .

5 REPLIES 5
Read only

anversha_s
Active Contributor
0 Likes
598

hi

if the field length in the data dictioray is unlimited .

1.you need to create text object and link this object

with key fields of the table and reading this text and storing this text you need to use SAVE_TEXT and READ_TEXT fm's.

chk the sample code below.

1.create a text object using SE75 transaction .

2.Use FM : SAVE_TEXT to save this data with text object id.(data will be stored into STXH table).

3.Use READ_TEXT to retrive data.

<i>sample code :</i>

DATA: ws_thead LIKE thead,
i_tline LIKE TABLE OF tline WITH HEADER LINE.
data : x_matnr like mara-matnr.

c_mara(4) type c value 'MARA',
c_zid(4) type c value 'Z001'.


MOVE : x_matnr TO ws_thead-tdname, <-moving MATNR to store data 
c_mara TO ws_thead-tdobject,
sy-langu TO ws_thead-tdspras,
c_zid TO ws_thead-tdid.

CALL FUNCTION 'SAVE_TEXT'
EXPORTING
client = sy-mandt
header = ws_thead
savemode_direct = 'X'
TABLES
lines = i_tline
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.

DATA: lws_id LIKE thead-tdid,
lws_name LIKE thead-tdname,
lws_object LIKE thead-tdobject.

lws_id = c_zid.
lws_name = x_matnr. <- reading data using key field(MATNR) 
lws_object = c_mara.


CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = lws_id
language = sy-langu
name = lws_name
object = lws_object
TABLES
lines = li_tline
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.

Regards

anver

Read only

Former Member
0 Likes
598

HOW WILLL I BE DOING THIS IN BDC FOR THE VENDOR MASTER.........???PLEASEE LET ME KNOW

Read only

Former Member
0 Likes
598

hello can someone help me out with please??

i need a solution.........

urgent requiremente

Read only

Former Member
0 Likes
598

Hi

Go to transaction XK02.

Click on the text which you want.

It will open line editor.

In that use the menu path goto--> Header it will give the Object details.

Pass the same in READ_TEXT.

Then you will get the text related to Vendor.

Read only

Former Member
0 Likes
598

I AM TRYING TO CREATE NO. OF VENDORS,TAKING THE DATA FROM THE FLAT FILE..................FOR EACH VENDOR I HAV DIFFERENT TEXT.HOW DO V GO ABOUT IT??WAT SHOULD B THE STRUCTURE OF THE FLATFILE AND HOW THE TEXT IS PUT IN TO THE FLATFILE...........N CONVENTIONALLY HOW IS IT DONE??AS IN ACCORDING TO NORMAL STANDARDS??