<?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 Re: Regarding a function exit in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-a-function-exit/m-p/1721271#M314835</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pavan,&lt;/P&gt;&lt;P&gt;I fail to understand the req.  You have found the proper function exit.. You have application data.. You have the idoc/segment details ....Check following code to update the idoc...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;STEP 1 - Open document to edit&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;CALL FUNCTION 'EDI_DOCUMENT_OPEN_FOR_EDIT' &lt;/P&gt;&lt;P&gt;       EXPORTING &lt;/P&gt;&lt;P&gt;            document_number               = t_docnum &lt;/P&gt;&lt;P&gt;       IMPORTING &lt;/P&gt;&lt;P&gt;            idoc_control                  = itab_edidc &lt;/P&gt;&lt;P&gt;       TABLES &lt;/P&gt;&lt;P&gt;            idoc_data                     = itab_edidd &lt;/P&gt;&lt;P&gt;       EXCEPTIONS &lt;/P&gt;&lt;P&gt;            document_foreign_lock         = 1 &lt;/P&gt;&lt;P&gt;            document_not_exist            = 2 &lt;/P&gt;&lt;P&gt;            document_not_open             = 3&lt;/P&gt;&lt;P&gt;            status_is_unable_for_changing = 4 &lt;/P&gt;&lt;P&gt;            OTHERS                        = 5. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;STEP 2 - Loop at itab_edidd and change data&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab_edidd WHERE segnam = 'E1EDKA1'. &lt;/P&gt;&lt;P&gt;  e1edka1 = itab_edidd-sdata. &lt;/P&gt;&lt;P&gt;  IF e1edka1-parvw = 'LF'. &lt;/P&gt;&lt;P&gt;    e1edka1-partn = t_eikto.&lt;/P&gt;&lt;P&gt;    itab_edidd-sdata = e1edka1. &lt;/P&gt;&lt;P&gt;    MODIFY itab_edidd.&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;STEP 3 - Change data segments&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'EDI_CHANGE_DATA_SEGMENTS' &lt;/P&gt;&lt;P&gt;           TABLES &lt;/P&gt;&lt;P&gt;                idoc_changed_data_range = itab_edidd &lt;/P&gt;&lt;P&gt;           EXCEPTIONS &lt;/P&gt;&lt;P&gt;                idoc_not_open           = 1 &lt;/P&gt;&lt;P&gt;                data_record_not_exist   = 2 &lt;/P&gt;&lt;P&gt;                OTHERS                  = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you..let me know if need more input on this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Enjoy SAP.&lt;/P&gt;&lt;P&gt;Pankaj Singh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 18 Nov 2006 11:24:15 GMT</pubDate>
    <dc:creator>messier31</dc:creator>
    <dc:date>2006-11-18T11:24:15Z</dc:date>
    <item>
      <title>Regarding a function exit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-a-function-exit/m-p/1721270#M314834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; i have extended an idoc and for this i am using a function exit to populate data in the added new segment z1segment under E!knvkm segment ( parent segment). I found which funtion exit to use but i could not make out the logic to populate the data in the segment z1segment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; can any one please help me regarding this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; thank you very much&lt;/P&gt;&lt;P&gt;       pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Nov 2006 11:10:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-a-function-exit/m-p/1721270#M314834</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-18T11:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding a function exit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-a-function-exit/m-p/1721271#M314835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pavan,&lt;/P&gt;&lt;P&gt;I fail to understand the req.  You have found the proper function exit.. You have application data.. You have the idoc/segment details ....Check following code to update the idoc...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;STEP 1 - Open document to edit&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;CALL FUNCTION 'EDI_DOCUMENT_OPEN_FOR_EDIT' &lt;/P&gt;&lt;P&gt;       EXPORTING &lt;/P&gt;&lt;P&gt;            document_number               = t_docnum &lt;/P&gt;&lt;P&gt;       IMPORTING &lt;/P&gt;&lt;P&gt;            idoc_control                  = itab_edidc &lt;/P&gt;&lt;P&gt;       TABLES &lt;/P&gt;&lt;P&gt;            idoc_data                     = itab_edidd &lt;/P&gt;&lt;P&gt;       EXCEPTIONS &lt;/P&gt;&lt;P&gt;            document_foreign_lock         = 1 &lt;/P&gt;&lt;P&gt;            document_not_exist            = 2 &lt;/P&gt;&lt;P&gt;            document_not_open             = 3&lt;/P&gt;&lt;P&gt;            status_is_unable_for_changing = 4 &lt;/P&gt;&lt;P&gt;            OTHERS                        = 5. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;STEP 2 - Loop at itab_edidd and change data&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab_edidd WHERE segnam = 'E1EDKA1'. &lt;/P&gt;&lt;P&gt;  e1edka1 = itab_edidd-sdata. &lt;/P&gt;&lt;P&gt;  IF e1edka1-parvw = 'LF'. &lt;/P&gt;&lt;P&gt;    e1edka1-partn = t_eikto.&lt;/P&gt;&lt;P&gt;    itab_edidd-sdata = e1edka1. &lt;/P&gt;&lt;P&gt;    MODIFY itab_edidd.&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;STEP 3 - Change data segments&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'EDI_CHANGE_DATA_SEGMENTS' &lt;/P&gt;&lt;P&gt;           TABLES &lt;/P&gt;&lt;P&gt;                idoc_changed_data_range = itab_edidd &lt;/P&gt;&lt;P&gt;           EXCEPTIONS &lt;/P&gt;&lt;P&gt;                idoc_not_open           = 1 &lt;/P&gt;&lt;P&gt;                data_record_not_exist   = 2 &lt;/P&gt;&lt;P&gt;                OTHERS                  = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you..let me know if need more input on this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Enjoy SAP.&lt;/P&gt;&lt;P&gt;Pankaj Singh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Nov 2006 11:24:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-a-function-exit/m-p/1721271#M314835</guid>
      <dc:creator>messier31</dc:creator>
      <dc:date>2006-11-18T11:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding a function exit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-a-function-exit/m-p/1721272#M314836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for ur answer pankaj, i will explain you my requirement -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i need to add contact person business address in debmas05 idoctype and that is why i decided to extend the idoc by adding an extension type z1debmas where i need to populate fields from sadr table which contain business address details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for this there is enhancement vsv00001 which consists of function exit exit_saplvv01_001 and in here i need to add code to populate z1debmas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plss reply bk if u dunt understand and try to help me regarding this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Nov 2006 11:40:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-a-function-exit/m-p/1721272#M314836</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-18T11:40:06Z</dc:date>
    </item>
  </channel>
</rss>

