Skip to Content
author's profile photo Former Member
Former Member

Somebody please help

Hi Everyone.

I have been working on a SAPSCRIPT. I have donemost of it but left out few changes. If you go to transaction QM02 and enter a notification, a page will be openned.

Below in the subject, there is a description.

Now i have to bring this text from here and put it in the form.

I have tried to put an include and pull out the text but i could not do that.

Can anyone please send me a sample code that you have for this scenario?

Thanks

Deepthi

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 19, 2006 at 05:00 PM

    Description will be there in QMEL - QMTXT. If u want to get the long text after that description button use the FM READ_TEXT with the following data.

    <b>CLIENT </b> 120

    <b>ID</b> LTQM

    <b>LANGUAGE</b> EN

    <b>NAME</b> 000200000001

    <b>OBJECT</b> QMEL

    Regards,

    Prakash.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      In the form give the internal table name say '&i_lines1-tdline&'.

      use the read text fm in the script program and get the value into a internal table,then loop at that internal table and use the write form.

      LOOP AT i_lines1.

      PERFORM write_forms USING ws_element_name ws_window_name.

      ENDLOOP.

      Regards,

      Prakash.

  • author's profile photo Former Member
    Former Member
    Posted on Oct 19, 2006 at 05:04 PM

    Hi, deepthi ..

    go through the code ..

    All the long text can be retrieve using this method.

    You have to used the READ_TEXT functions to read the SAP long text. e.g. Sales Order, Purchase Order Item text etc.

    To check your long text header, go into the long text. Click Goto -> Header

    Example of READ_TEXT functions reading tables PBIM - Independent requirements for material.

    REPORT ZTEXT .

    TABLES: PBIM.

    • stxh, stxl, stxb - trans tables for text

    • ttxit - text on text-ids

    • ttxot - Short texts on text objects

    • Transaction MD63

    SELECT-OPTIONS: S_MATNR FOR PBIM-MATNR,

    S_WERKS FOR PBIM-WERKS.

    DATA: BEGIN OF HTEXT.

    INCLUDE STRUCTURE THEAD.

    DATA: END OF HTEXT.

    DATA: BEGIN OF LTEXT OCCURS 50.

    INCLUDE STRUCTURE TLINE.

    DATA: END OF LTEXT.

    DATA: BEGIN OF DTEXT OCCURS 50.

    DATA: MATNR LIKE PBIM-MATNR.

    INCLUDE STRUCTURE TLINE.

    DATA: END OF DTEXT.

    DATA: TNAME LIKE THEAD-TDNAME.

    SELECT * FROM PBIM WHERE WERKS IN S_WERKS.

    MOVE PBIM-BDZEI TO TNAME.

    CALL FUNCTION 'READ_TEXT'

    EXPORTING

    • CLIENT = SY-MANDT

    ID = 'PB'

    LANGUAGE = 'E'

    NAME = TNAME

    OBJECT = 'PBPT'

    • ARCHIVE_HANDLE = 0

    IMPORTING

    HEADER = HTEXT

    TABLES

    LINES = LTEXT

    EXCEPTIONS

    ID = 1

    LANGUAGE = 2

    NAME = 3

    NOT_FOUND = 4

    OBJECT = 5

    REFERENCE_CHECK = 6

    WRONG_ACCESS_TO_ARCHIVE = 7

    OTHERS = 8.

    LOOP AT LTEXT.

    IF LTEXT-TDLINE NE ''.

    MOVE LTEXT-TDLINE TO DTEXT-TDLINE.

    MOVE PBIM-MATNR TO DTEXT-MATNR.

    APPEND DTEXT.

    ENDIF.

    ENDLOOP.

    ENDSELECT.

    LOOP AT DTEXT.

    WRITE:/ DTEXT-MATNR, DTEXT-TDLINE.

    ENDLOOP.

    hope this helps ,

    Regards,

    Vijay

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 19, 2006 at 04:56 PM

    Hi,

    i would write a perform statement for that.Find out the fiield name and read that value from the table based on the notification

    Thanks

    Venki

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 19, 2006 at 05:14 PM

    deepthi,

    first of all try to get the values in ur driver program/

    second transfers the content into variables ..

    now use these variables in ur form by passing it to the form editor sap script ..

    you cannot use include to get this ..

    regards,

    vijay.

    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.