<?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: User exit code! in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-code/m-p/1535912#M244529</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;xvbap is the input to your routine. So try to change VBAP or check any different structure in scope.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Becos after you modity again the data will be resetted in the main program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regds&lt;/P&gt;&lt;P&gt;Manohar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Jul 2006 22:03:38 GMT</pubDate>
    <dc:creator>Manohar2u</dc:creator>
    <dc:date>2006-07-27T22:03:38Z</dc:date>
    <item>
      <title>User exit code!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-code/m-p/1535911#M244528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to modify 'ROUTE' field in VBAP in the exit 'userexit_document_save'. It is modifying the xvbap table but when the sales order is created that value is overwritten somewhere. Please suggest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    DATA: ls_xvbpa LIKE xvbpa,
          lf_aland LIKE tvst-aland,
          lf_azone LIKE tvst-azone,
          lf_lland LIKE trolz-lland,
          lf_lzone LIKE trolz-lzone,
          ls_vbadr LIKE vbadr,
          ls_xvbap LIKE xvbap,
          ls_tvst LIKE tvst,
          lv_route LIKE trolz-route.

    LOOP AT xvbap INTO ls_xvbap.
      IF NOT ls_xvbap-vstel IS INITIAL.
        SELECT SINGLE * FROM tvst
          INTO ls_tvst
         WHERE vstel EQ ls_xvbap-vstel.

        IF sy-subrc = 0.
          lf_aland = ls_tvst-aland.
          lf_azone = ls_tvst-azone.
        ENDIF.
      ENDIF.
      READ TABLE xvbpa INTO ls_xvbpa WITH KEY vbeln = ls_xvbap-vbeln
                                              posnr = ls_xvbap-posnr
                                              parvw = 'Q1'.

      IF sy-subrc = 0.
        CALL FUNCTION 'SD_ADDRESS_GET'
          EXPORTING
            fif_address_number      = ls_xvbpa-adrnr
          IMPORTING
            fes_address             = ls_vbadr
          EXCEPTIONS
            address_not_found       = 1
            address_type_not_exists = 2
            no_person_number        = 3
            OTHERS                  = 4.

        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.
        ELSE.
          lf_lland = ls_vbadr-land1.
          lf_lzone = ls_vbadr-lzone.
        ENDIF.
      ENDIF.

      CALL FUNCTION 'SD_ROUTE_DETERMINATION'
        EXPORTING
          i_aland             = lf_aland
          i_azone             = lf_azone
          i_lland             = lf_lland
          i_lzone             = lf_lzone
        IMPORTING
          e_route             = lv_route
        EXCEPTIONS
          no_route_found      = 1
          departure_error     = 2
          destination_error   = 3
          invalid_generic_key = 4
          customer_exit_error = 5
          OTHERS              = 6.

      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.
      ELSE.
        ls_xvbap-route = lv_route.
        MODIFY xvbap FROM ls_xvbap TRANSPORTING route.

      ENDIF.
    ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2006 21:55:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-code/m-p/1535911#M244528</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-27T21:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: User exit code!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-code/m-p/1535912#M244529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;xvbap is the input to your routine. So try to change VBAP or check any different structure in scope.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Becos after you modity again the data will be resetted in the main program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regds&lt;/P&gt;&lt;P&gt;Manohar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2006 22:03:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-code/m-p/1535912#M244529</guid>
      <dc:creator>Manohar2u</dc:creator>
      <dc:date>2006-07-27T22:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: User exit code!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-code/m-p/1535913#M244530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you update the XVBAP internal table, you should set the update indicator.  The field is XVBAP-UPDKZ.  I think it's 'U' for update, 'D' for delete.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I think there is another userexit specifically used for route determination change.  I'll check.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2006 22:13:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-code/m-p/1535913#M244530</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-27T22:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: User exit code!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-code/m-p/1535914#M244531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you look in txn CMOD or SMOD, check enhancement 0VRF0001.  It uses function module EXIT_SAPL0VRF_001.  It is used to manipulate route determination for SD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function module if fully documented.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2006 22:22:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-code/m-p/1535914#M244531</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-27T22:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: User exit code!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-code/m-p/1535915#M244532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Manohar and Norman,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all your replies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Norman...I cant use the exit EXIT_SAPL0VRF_001 because my req. is to re-determine the route based on a partner addition. So after you add a partner to the item, this code will not execute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I tried with UPDKZ indicator with I and U. It didnt work. Any more ideas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Manohar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I modify vbap directly in that user exit. Direct update is not a good idea though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2006 22:48:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-code/m-p/1535915#M244532</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-27T22:48:36Z</dc:date>
    </item>
    <item>
      <title>Re: User exit code!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-code/m-p/1535916#M244533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;you can update directly..no issues...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Abdul Hakim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2006 22:49:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-code/m-p/1535916#M244533</guid>
      <dc:creator>abdul_hakim</dc:creator>
      <dc:date>2006-07-27T22:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: User exit code!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-code/m-p/1535917#M244534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried updating vbap directly...but it didnt work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2006 23:48:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-code/m-p/1535917#M244534</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-27T23:48:20Z</dc:date>
    </item>
    <item>
      <title>Re: User exit code!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-code/m-p/1535918#M244535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you plz paste your code here...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Abdul Hakim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jul 2006 23:50:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-code/m-p/1535918#M244535</guid>
      <dc:creator>abdul_hakim</dc:creator>
      <dc:date>2006-07-27T23:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: User exit code!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-code/m-p/1535919#M244536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a reason why you are using USEREXIT_SAVE_DOCUMENT instead of USEREXIT_SAVE_DOCUMENT_PREPARE?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does the route get redetermined after USEREXIT_SAVE_DOCUMENT_PREPARE?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I ask because the original intent for USEREXIT_SAVE_DOCUMENT was to save data in OTHER tables.  Usually the internal tables are manipulated in USEREXIT_SAVE_DOCUMENT_PREPARE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jul 2006 00:11:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-code/m-p/1535919#M244536</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-28T00:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: User exit code!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-code/m-p/1535920#M244537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;pls try in the USEREXIT_SAVE_DOCUMENT_PREPARE?.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jul 2006 01:33:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-code/m-p/1535920#M244537</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-28T01:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: User exit code!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-code/m-p/1535921#M244538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Norman and Niranjan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are correct. I did the same and worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jul 2006 13:20:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/user-exit-code/m-p/1535921#M244538</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-28T13:20:25Z</dc:date>
    </item>
  </channel>
</rss>

