<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ME32K: read text before saving in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/me32k-read-text-before-saving/m-p/8229127#M1628971</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have checked some threads that I think could help me with my problem but I have no luck. My be somebody can help me...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to check a specific header text at ME32K transaction before saving. If the user complete it everything is ok, if not an error message appears. I solved this with an exit, but the problem is that the text is not saved at this point, I need to get it from memory and I'm not solving this point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have any ide to solve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Oct 2011 16:28:57 GMT</pubDate>
    <dc:creator>marcela_martinez</dc:creator>
    <dc:date>2011-10-04T16:28:57Z</dc:date>
    <item>
      <title>ME32K: read text before saving</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/me32k-read-text-before-saving/m-p/8229127#M1628971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have checked some threads that I think could help me with my problem but I have no luck. My be somebody can help me...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to check a specific header text at ME32K transaction before saving. If the user complete it everything is ok, if not an error message appears. I solved this with an exit, but the problem is that the text is not saved at this point, I need to get it from memory and I'm not solving this point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have any ide to solve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2011 16:28:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/me32k-read-text-before-saving/m-p/8229127#M1628971</guid>
      <dc:creator>marcela_martinez</dc:creator>
      <dc:date>2011-10-04T16:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: ME32K: read text before saving</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/me32k-read-text-before-saving/m-p/8229128#M1628972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the fm READ_TEXT, it always returns the current text, that means:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- If the text is not saved yet, it returns the text from buffer&lt;/P&gt;&lt;P&gt;- if the text is saved, it return the text from DB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2011 16:33:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/me32k-read-text-before-saving/m-p/8229128#M1628972</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-04T16:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: ME32K: read text before saving</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/me32k-read-text-before-saving/m-p/8229129#M1628973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Max but READ_TEXT is not useful for me. If the existing text was deleted READ_TEXT brings the old one.&lt;/P&gt;&lt;P&gt;I need to read which the user does: if the text was deleted I need to know it.&lt;/P&gt;&lt;P&gt;Thx a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2011 16:35:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/me32k-read-text-before-saving/m-p/8229129#M1628973</guid>
      <dc:creator>marcela_martinez</dc:creator>
      <dc:date>2011-10-04T16:35:26Z</dc:date>
    </item>
    <item>
      <title>Re: ME32K: read text before saving</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/me32k-read-text-before-saving/m-p/8229130#M1628974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the text is deleted, the READ_TEXT doesn't return the text?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you sure?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2011 16:47:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/me32k-read-text-before-saving/m-p/8229130#M1628974</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-04T16:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: ME32K: read text before saving</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/me32k-read-text-before-saving/m-p/8229131#M1628975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm sure... READ_TEXT returns the text which is saved.&lt;/P&gt;&lt;P&gt;Thx.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2011 16:50:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/me32k-read-text-before-saving/m-p/8229131#M1628975</guid>
      <dc:creator>marcela_martinez</dc:creator>
      <dc:date>2011-10-04T16:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: ME32K: read text before saving</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/me32k-read-text-before-saving/m-p/8229132#M1628976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Uhm&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've inserted the following code in the exit for the checking of Purchase Order:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: L_HEADER TYPE MEPOHEADER.
  DATA: L_NAME   TYPE THEAD-TDNAME.

  L_HEADER = IM_HEADER-&amp;gt;GET_DATA( ).

  DATA: LINES TYPE STANDARD TABLE OF  TLINE.


  MOVE L_HEADER-EBELN TO L_NAME.

  CALL FUNCTION 'READ_TEXT'
    EXPORTING
*     CLIENT                        = SY-MANDT
      ID                            = 'F91'
      LANGUAGE                      = 'I'
      NAME                          = L_NAME
      OBJECT                        = 'EKKO'
    TABLES
      LINES                         = 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 &amp;lt;&amp;gt; 0.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the lines I can see the modification I've done in the text before saving the document, I mean I see the current text&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2011 16:58:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/me32k-read-text-before-saving/m-p/8229132#M1628976</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-04T16:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: ME32K: read text before saving</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/me32k-read-text-before-saving/m-p/8229133#M1628977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Max!!&lt;/P&gt;&lt;P&gt;Can you tell me which is IM_HEADER?&lt;/P&gt;&lt;P&gt;I'm just going to copy exactly which you said, I did it before but not with im_header-&amp;gt;get_data( )&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2011 17:40:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/me32k-read-text-before-saving/m-p/8229133#M1628977</guid>
      <dc:creator>marcela_martinez</dc:creator>
      <dc:date>2011-10-04T17:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: ME32K: read text before saving</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/me32k-read-text-before-saving/m-p/8229134#M1628978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Max, with your suggested code, al ME32K user-exit the text is the old one &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2011 17:47:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/me32k-read-text-before-saving/m-p/8229134#M1628978</guid>
      <dc:creator>marcela_martinez</dc:creator>
      <dc:date>2011-10-04T17:47:12Z</dc:date>
    </item>
    <item>
      <title>Re: ME32K: read text before saving</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/me32k-read-text-before-saving/m-p/8229135#M1628979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is the BADI for PO (ME22N), but the contract should be very similar, I'm trying to ckeck for the contract, but I don't know if there's an exit developed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2011 17:52:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/me32k-read-text-before-saving/m-p/8229135#M1628979</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-04T17:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: ME32K: read text before saving</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/me32k-read-text-before-saving/m-p/8229136#M1628980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Which exit are you using?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2011 17:56:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/me32k-read-text-before-saving/m-p/8229136#M1628980</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-04T17:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: ME32K: read text before saving</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/me32k-read-text-before-saving/m-p/8229137#M1628981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Exit MM06E005&lt;/P&gt;&lt;P&gt;FM EXIT_SAPMM06E_012&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2011 17:59:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/me32k-read-text-before-saving/m-p/8229137#M1628981</guid>
      <dc:creator>marcela_martinez</dc:creator>
      <dc:date>2011-10-04T17:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: ME32K: read text before saving</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/me32k-read-text-before-saving/m-p/8229138#M1628982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Uhm ok&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That exit is developed for PO, so I've inserted my code in that exit:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: L_NAME TYPE THEAD-TDNAME.
  DATA: TLINES TYPE STANDARD TABLE OF TLINE.

  MOVE I_EKKO-EBELN TO L_NAME.

  CALL FUNCTION 'READ_TEXT'
    EXPORTING
*     CLIENT                        = SY-MANDT
      ID                            = 'K01'
      LANGUAGE                      = 'I'
      NAME                          = L_NAME
      OBJECT                        = 'EKKO'
*     ARCHIVE_HANDLE                = 0
*     LOCAL_CAT                     = ' '
*   IMPORTING
*     HEADER                        =
    TABLES
      LINES                         = TLINES
*   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 &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I'm go to the header text, do a modification to the text ID K01 and press the CHECKING in order to trigger the exit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I run the process above in debug way, in table TLINES I can see the current text (so all modifications I've done)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Oct 2011 18:12:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/me32k-read-text-before-saving/m-p/8229138#M1628982</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-04T18:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: ME32K: read text before saving</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/me32k-read-text-before-saving/m-p/8229139#M1628983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Maxi for hour help, it was very helpful.&lt;/P&gt;&lt;P&gt;I solve it by another way:&lt;/P&gt;&lt;P&gt;I get if the text was modified or not with an ASSIGN. I put down a piece of code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;fs_control&amp;gt; TYPE ANY TABLE,&lt;/P&gt;&lt;P&gt;               &amp;lt;wa_control&amp;gt; TYPE ANY,&lt;/P&gt;&lt;P&gt;               &amp;lt;fs_aux&amp;gt; TYPE ANY TABLE,&lt;/P&gt;&lt;P&gt;               &amp;lt;fs_aux2&amp;gt; TYPE ANY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;  ASSIGN ('(SAPMM06E)theadtab[]') TO &amp;lt;fs_control&amp;gt;.&lt;/P&gt;&lt;P&gt;  IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;    LOOP AT &amp;lt;fs_control&amp;gt; ASSIGNING &amp;lt;wa_control&amp;gt;.&lt;/P&gt;&lt;P&gt;      wal_thead = &amp;lt;wa_control&amp;gt;.&lt;/P&gt;&lt;P&gt;      IF wal_thead-tdobject EQ cl_ekko AND wal_thead-tdid EQ cl_k24.&lt;/P&gt;&lt;P&gt;        IF wal_thead-tdtxtlines EQ 0.&lt;/P&gt;&lt;P&gt;          vl_fill = cl_x.&lt;/P&gt;&lt;P&gt;          EXIT.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Oct 2011 18:05:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/me32k-read-text-before-saving/m-p/8229139#M1628983</guid>
      <dc:creator>marcela_martinez</dc:creator>
      <dc:date>2011-10-05T18:05:06Z</dc:date>
    </item>
  </channel>
</rss>

