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

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

November 30Hits:0
Advertisement
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?

Answers

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

Read other 14 answers

Tags:

Related Articles

  • Add new tab of long text to production orderNovember 30

    Hi all i need to add new tab of long text to production order, which will be blocked for changes. anyone can help with this? thanks.Yossi, The purpose of long text is so that business users can add additional information while processing the order so

  • How to add the long text in Production order through FMOctober 11

    Hi, Iam having custom program which has BAPI (BAPI_PRODORD_CREATE) inside it and this program is used to create Production orders with the details of Sales order Number,Line item,Plant,Order type,Quantity and Start date. This program is scheduled in

  • Update Long Text of Production OrderOctober 11

    Hi ABAP Gurus, We want to update some information in long text automatically while releasing production order. We try PPCO0007 We found that we must update AUFK-LTEXT as 'E' then we can see long text via CO02, CO03. Without updating AUFK-LTEXT, even

  • Replicate the Sales order Line Item Text to Production OrderNovember 30

    I want to replicate the Sales Order Line Item Text to Production Order? Please tell me if this is Functional job or a Developers Job? I believe this can be achieved by customization and doesnot need any programming and I am trying hard to gather rele

  • Printing Long Text of Production OrderNovember 30

    Dear all, Can we print the long text of Production Order using Co04N transaction? Please suggest. regards, KumarHi, Thanks for suggestion,,, awarded points. Thread closed regards, KumarRead other 5 answers

  • How to read text in Production Memo tab of Production Order using READ_TEXTNovember 30

    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

  • Sales Order Text to Production Order TextOctober 11

    Dear Experts, When creating a sales order in VA01, I added in some comments in the item level Texts tab. How can I configure the system so that when a production order is created from this sales order, the comments entered in the sales order will be

  • Copy purchase order text to production order textOctober 11

    Hello, purchase order text should be copied to production order text so that the end user can see and edit the text before saving the production order. I'm trying to do it with exit PPCO0006. I can read the purchase order text with read_text but cann

  • How to copy long text from production order to automatically created P.ROctober 11

    Hello experts, I want to add some text to the long text , in the production order and save it. There is an external process in our routing, in which when the order is saved and released, there is a P.R created automatically. My requirement :-  The te

  • How to create long text in production order?October 11

    Hi, i have found that i could only change long text in the production order by 'SAVE_TEXT'. but i want to create long text and any advice?DATA:TEXT_HEADER LIKE THEAD. DATA:TEXT_LINES LIKE TLINE OCCURS 0 WITH HEADER LINE. data: t_ponum  like BAPI_ORDE

Copyright (C) 2019 wisumpire.com, All Rights Reserved. webmaster#wisumpire.com 14 q. 0.639 s.