Application Development 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: 

Problem with read_text

Former Member
0 Kudos
726

Hi,

I have used the following code .

CONCATENATE WA_EBAN1-BANFN WA_EBAN1-BNFPO INTO NAME.

CALL FUNCTION 'READ_TEXT'

EXPORTING

  • CLIENT = SY-MANDT

id = 'B01'

language = 'E'

name = NAME

object = 'EBAN'

  • ARCHIVE_HANDLE = 0

  • LOCAL_CAT = ' '

  • IMPORTING

  • HEADER =

tables

lines = LINES

EXCEPTIONS

ID = 1

LANGUAGE = 2

NAME = 3

NOT_FOUND = 4

OBJECT = 5

REFERENCE_CHECK = 6

WRONG_ACCESS_TO_ARCHIVE = 7

OTHERS = 8

.

But in lines-tdline i am getting INCLUDE 200 OBJECT TEXT ID ST.

How can I get the actual data

5 REPLIES 5

Former Member
0 Kudos
206

hi,

what data u r trying to read, as per ur code , i think u r reading the text for purchase requisition.

In the editor of PR text, in the menu bar, u can see tdid, tdname, tdobject so try to populate these values as it is..then u can get the required output.

Check whether the name in ur code, is the combination of banfn and bnfpo in the editor tdname.

Rgds.,

subash

peter_ruiz2
Active Contributor
0 Kudos
206

Hi,

Uncomment the Text ID to retrieve the Long Text.

Text ID for Purchase Requisition Header Note is B01.

Alos, Text Object for Purchase Requisition Header Note is EBANH.

Regards,

Peter

0 Kudos
206

Hi copy paste this code ... It will work

data : name type TYPE thead-tdname.

NAME = WA_EBAN1-BANFN.

CALL FUNCTION 'READ_TEXT'

EXPORTING

  • CLIENT = SY-MANDT

id = 'B01'

language = 'E'

name = NAME

object = 'EBANH'

  • ARCHIVE_HANDLE = 0

  • LOCAL_CAT = ' '

  • IMPORTING

  • HEADER =

tables

lines = LINES

EXCEPTIONS

ID = 1

LANGUAGE = 2

NAME = 3

NOT_FOUND = 4

OBJECT = 5

REFERENCE_CHECK = 6

WRONG_ACCESS_TO_ARCHIVE = 7

OTHERS = 8

GauthamV
Active Contributor
0 Kudos
206

Hello,

If you are trying to retrive item text of PR then what ever you have passed to

that fm is correct.Just check in ME53n the text that is provided for it.

Also check if you are getting leading zeros also to the feild name.

for ex like PR + item = 0050000007 + 0010.

Former Member
0 Kudos
206

Hi Parvatha,

To get the PR basic data or classification data details,

Also remaining materials from PO or any other.. Try this,..

Type 1)

D_NAME = EBAN-BANFN.

D_NAME+10(5) = EBAN-BNFPO.

D_OBJECT = 'EBAN'.

D_ID = 'B01'.

TNAME = 'ITEM_TEXT'.

Type 2)

D_NAME = EBAN-MATNR.

D_OBJECT = 'MATERIAL'.

D_ID = 'BEST'.

TNAME = 'Purchase_Order_text'.

Type 3)

D_NAME = EBAN-MATNR.

D_NAME+19 = EBAN-WERKS.

D_OBJECT = 'MDTXT'.

D_ID = 'LTXT'.

TNAME = 'Material_note_MRP'.

REFRESH T_TEXT.

CALL FUNCTION 'READ_TEXT'

EXPORTING

OBJECT = D_OBJECT

NAME = D_NAME

ID = D_ID

LANGUAGE = 'E'

IMPORTING

HEADER = THEAD

TABLES

LINES = T_TEXT

EXCEPTIONS

OBJECT = 1

ID = 2

LANGUAGE = 3

NAME = 4

NOT_FOUND = 5

REFERENCE_CHECK = 6.

Thanks & regards,

Dileep .C