Skip to Content

calling long text in script

Hi everyone,

can any one say the function module used to call the long text in scripts.

Add a comment
10|10000 characters needed characters exceeded

Related questions

7 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 17, 2006 at 08:23 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 18, 2006 at 12:25 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 18, 2006 at 03:24 AM

    try out the function 'Read_text'.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.

  • author's profile photo Former Member
    Former Member
    Posted on Oct 18, 2006 at 06:09 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 18, 2006 at 06:23 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 18, 2006 at 07:19 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 18, 2006 at 08:00 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.