on 10-17-2006 9:17 PM
Hi everyone,
can any one say the function module used to call the long text in scripts.
Hi
You can use read_text function module
Important thing to notice while using READ_TEXT is that
TEXT-ID field needs to be properly created based on Order number, Item no, Slaes Org, Distribution channel etc.
Most of the time You will find that Sales organization field is of 4 characters lenght, (Say 0001) in this case Since SAP discards first 3 zeroes of the number to blank spaces, you need to append zeroes to the final text-id field making it of required 20 characters key field (Say).
Therefore, you need to take care of append zeroes, shift spaces, concatenate command, etc. which depends on your scenario.
you have to check the following parameters
ID: this textid
language:language u maintained the text,this also important
name: The no in which text-id is maintained
Usually we make mistake here,the no is combination of purchase order no and item no.
Example:420000210000010(Puchase orderno:4200002100 item no:00010)
Object:it change based on the text-id so u can check it the document no.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = p_var
language = g_f_langu
name = g_f_tdname
object = g_f_obj
TABLES
lines = g_t_lines
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.
Hope this definitely help.
Regards
- Atul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi ya the table tline contains two fields tdline and one more smething lik tht but ya two fields.
n other question i cant answer me jus a beginner n currently workin on my first project
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
suresh i tried this out in my case also
the number was a combination of company code , document number,fiscal year and the item numer
language i think i gave en,rest i don remember and sorry cant telll u noe bcoz sap isnt workin ova here.
but still i got the data in Lines table which is a struccture of type Tline.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
U can use read_text
u have to chek the following parameters
ID: this textid
language:language u maintained the text,this also important
name: The no in which text-id is maintained
Usually we make mistake here,the no is combination of purchase order no and item no.
Example:420000210000010(Puchase orderno:4200002100 item no:00010)
Object:it change based on the text-id so u can check it the document no.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = p_var
language = g_f_langu
name = g_f_tdname
object = g_f_obj
TABLES
lines = g_t_lines
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.
Pass the varibles as i have said and let me know if u face any problem.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try out the function 'Read_text'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Aman,
One small doubt regarding this question.
i.e in sO10 there is a standard text contains data 2 pages.my requirement is just display 1000 charecters only from that standard text.
If i use READ_TEXT is it possible?
One more doubt is T_lines table contain 2 fields with 132 charecters?
Please clarify this..
Regards,
Kishore.
Hi
first upload the text file into standard text name in SO10 transaction code and transport that in se78 and call it in the form
INCLUDE standardtextname OBJECT TEXT ID ST
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
I guess you have the standard text created.
In the text elements
go to text and then click the standart and then give your standard text.
INCLUDE &ZTXTNAME& OBJECT BOM ID MZU
Thanks
VENKI
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.