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

How to read text in Production Memo tab of Production Order using READ_TEXT

Hi all,

Please help me, I was able to develop a program that using READ_TEXT function module to read the Production Order long text.

Now my requirement is to read the text in the Production memo tabe of production order.

Can some one tell mee how to do it? the same program is now not working.

do i need to do any changes?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Oct 28, 2008 at 04:04 PM

    the text ID and Text_object and other things you pass into the FM read_text need to be changed..

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      If it is a sales order text.

      Concatenate sales order number and position.

      Table : STXH

      TDOBJECT : VBBK ( For Header Text) VBBP ( For Item Text)

      TDNAME : sales order + Item ( With Leading Zero's)

      TDID : Check from Menu header or STXH table entries

      TDSPRAS : Sy-langu

      If it is a Production order text.

      Concatenate client number and production order.

      Table : STXH

      TDOBJECT : AUFK

      TDNAME : client number+ production order ( With Leading Zero's)

      TDID : KOPF

      TDSPRAS : Sy-langu

      Edited by: senthil kumar on Oct 29, 2008 12:07 AM

  • author's profile photo Former Member
    Former Member
    Posted on Oct 28, 2008 at 05:15 PM

    Hi,

    TDOBJECT --> AUFK

    TDID -->KOPF

    IF your given same means it's correct i think check your coding

    i will give u sample coding analyze .

    REPORT z_test1.

    TABLES:

    thead.

    PARAMETERS:

    p_vbeln TYPE vbak-vbeln.

    PARAMETERS:

    p_textid TYPE thead-tdid.

    DATA:

    BEGIN OF t_thead OCCURS 0.

    INCLUDE STRUCTURE thead.

    DATA:

    END OF t_thead.

    DATA:

    w_line TYPE i,

    w_idx TYPE i,

    w_flag TYPE i.

    DATA:

    BEGIN OF t_tline OCCURS 0.

    INCLUDE STRUCTURE tline.

    DATA:

    END OF t_tline.

    DATA:

    w_test TYPE thead-tdname,

    w_temp TYPE string VALUE 'TEST'.

    START-OF-SELECTION.

    w_test = p_vbeln.

    CALL FUNCTION 'READ_TEXT'

    EXPORTING

    client = sy-mandt

    id = p_textid

    language = sy-langu

    name = w_test

    object = 'VBBK'

    TABLES

    lines = t_tline

    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 NE 0.

    MESSAGE 'HEADER TEXT NOT FOUND' TYPE 'I'.

    ENDIF.

    END-OF-SELECTION.

    LOOP AT t_tline.

    IF t_tline-tdline = w_temp.

    w_flag = 1.

    ENDIF.

    ENDLOOP.

    IF w_flag NE 1.

    t_tline-tdline = w_temp.

    APPEND t_tline.

    ENDIF.

    REFRESH t_thead.

    t_thead-tdobject = 'VBBK'.

    t_thead-tdname = w_test.

    t_thead-tdid = p_textid.

    t_thead-tdspras = sy-langu.

    APPEND t_thead.

    CALL FUNCTION 'SAVE_TEXT'

    EXPORTING

    client = sy-mandt

    header = t_thead

    savemode_direct = 'X'

    TABLES

    lines = t_tline

    EXCEPTIONS

    id = 1

    language = 2

    name = 3

    object = 4.

    IF sy-subrc NE 0.

    WRITE: / 'ERROR'.

    ELSE.

    COMMIT WORK.

    WRITE: / 'TEXT SAVED'.

    ENDIF.

    LOOP AT t_tline.

    WRITE: / t_tline-tdline.

    ENDLOOP.

    Regards

    swamy

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 28, 2008 at 06:45 PM

    concatenate xkdauf kdpos into l_name.

    CALL FUNCTION 'READ_TEXT'

    EXPORTING

    CLIENT = SY-MANDT

    ID = '0006'

    LANGUAGE = SY-LANGU

    NAME = l_NAME

    OBJECT = 'VBBK'

    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.