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

regarding read_text FM in SAP Script

Former Member
0 Likes
873

Hi ALL,

I want to include the note(long text) from MIRO TCODE in my SAP Script.

How can I do this Explain me step by step.

Thanks and Regards

Garima

Hi ALL,

I want to include the note(long text) from MIRO TCODE in my SAP Script.

How can I do this Explain me step by step.

Thanks and Regards

Garima

4 REPLIES 4
Read only

Former Member
0 Likes
700

hi,

Use FM READ_TEXT to read the various text objects not only in sale order, any document in SAP.

See the following sample code.

data xname like THEAD-TDNAME.

data i_xtline like tline.

clear i_xtline.

refresh i_xtline.

move i_vbak-vbeln to XNAME.

  • The NAME & OBJECT differ from object to object. The composition of NAME and OBJECT can be found out in the text screen in the document.

Double click into the Text field

At the Top Menu - Click - Goto - Header

  • XNAME refers to Text name

CALL FUNCTION 'READ_TEXT'

EXPORTING

ID = '0001'

LANGUAGE = 'E'

NAME = XNAME

OBJECT = 'VBBP'

TABLES

LINES = i_XTLINE

EXCEPTIONS

ID = 1

LANGUAGE = 2

NAME = 3

NOT_FOUND = 4

OBJECT = 5

REFERENCE_CHECK = 6.

If it is smartform or script you can include the text object directly with out using READ_TEXT FM.

regards,

pavan t.

Edited by: Pavan T on Mar 20, 2008 7:58 AM

Read only

0 Likes
700

No ypu just pls reply according to my Question.

What i have to write for miro note in this FM.Whatever I m giving in that it is not giving any Output.

Pls explain me in detail.

Read only

0 Likes
700

hi,

we have to find out object , id, lang from the technical information of the long note and pass it to include statement like this

INCLUDE &T166K-TXNAM& OBJECT &T166K-TDOBJECT& ID &T166K-TDID& LANGUAGE &EKKO-SPRAS&

actually my sap is not working so i am unable to open miro tcode

try with the above syntax.

regards,

pavan t.

Read only

Former Member
0 Likes
700

Hi,

think you can create a subroutine in ur SCRIPT through which you can call the text.

and in se38 write a subroutine like

FORM getinfo TABLES pv_in_tab STRUCTURE itcsy " Form that will be called

pv_out_tab STRUCTURE itcsy.

and in this form you can write the select query for fetching the text (may be into variable like v_val)

Now, read pv_out_tab into work area index1 and

IF sy-subrc = 0 .

wa_outtab-value = v_val.

MODIFY pv_out_tab INDEX 1 FROM wa_outtab .

ENDIF .

Plz Reward if helpful.

Thanks.