cancel
Showing results for 
Search instead for 
Did you mean: 

Reg sap script long text

Former Member
0 Kudos

Hi experts,

I have one problemin bseg-sgtxt field. i develop sap script for payment print prog, In my script my field is bseg-sgtxt(item text). and this field lenght is 50 char. i want more then 50 char through this field in my script. for that i use long text button... this long text stored in EENO_DYNP and field name is ZEILE , but it is a structure...so my question is

1) How can i retrive this long text field in my script

2) Can u give me example with this coding..

3) How can i concate bseg-sgtxt with EENO_DYNP-ZEILE

I need code example for that....

Pl help me its urgent

zeni

Accepted Solutions (0)

Answers (1)

Answers (1)

mnicolai_77
Active Participant
0 Kudos

hi,

the long text of a document are stored into the standard text table and u can read it with the function READ_TEXT.

call this function in this way

>CONCATENATE bseg-bukrs bseg-belnr bseg-buzei INTO name.

>CALL FUNCTION 'READ_TEXT'

> EXPORTING

> id = '0001'

> language = sy-langu

> name = name

> object = 'DOC_ITEM' " identified FI document

> TABLES

> lines = t_line

> EXCEPTIONS

> id = 1

> language = 2

> name = 3

> not_found = 4

> object = 5

> reference_check = 6

> wrong_access_to_archive = 7

> OTHERS = 8.

the id of the text you can find in SPRO transaction under

Financial accounting->Financial accounting Global Settings ->Document->line Item-> Define Text Identifications for Line Items

here you can find all ID of the standard text that are configurated in your system.

now you can concatenate BSEG-SGTXT with the standard text of the document item .

bye

Marco

himayan_das2
Explorer
0 Kudos

Hi Marco,

The solution provided by you seems very useful..

But prob being faced here is that the document number being created by "Name" doesnt give the longtext thru the FM.

This problem is faced while using Tcode FB70 for invoice printing & entering long text.

I guess the form is printed before the document or long text is saved.

Kindly guide me in this..

Thanks..

mnicolai_77
Active Participant
0 Kudos

hi,

i've got create a documet from fb70 and i found it in the table STXH where all text are stored

from se16 look in this table using TDNAME = * belnr * i think that there is a different ID because you can configure the ID but you can't configure the name of the ID.

go to SPRO transaction under

Financial accounting->Financial accounting Global Settings ->Document->line Item-> Define Text Identifications for Line Items

so you can find the correct ID for the text

Edited by: nicolai marco on Jan 11, 2008 3:34 PM