<?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 Partner function updation in MV45AFZZ in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/partner-function-updation-in-mv45afzz/m-p/3059271#M724568</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to update the VBPA table by changing the entries in the XVBPA structure in the sales order user-exit MV45AFZZ.I have set the updation flag as 'I' for the UPDKZ field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem I am facing is that there is a termination which occurs in the standard code due to the insert.The termination occurs in the 'SD_PARTNER_UPDATE' function module line 480.I wish to know if there is any validation which I can execute on the partner function determination procedure before I actually try to update the partner function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly give your pointerts for the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Gaurav.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 24 Nov 2007 22:51:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-24T22:51:42Z</dc:date>
    <item>
      <title>Partner function updation in MV45AFZZ</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/partner-function-updation-in-mv45afzz/m-p/3059271#M724568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to update the VBPA table by changing the entries in the XVBPA structure in the sales order user-exit MV45AFZZ.I have set the updation flag as 'I' for the UPDKZ field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem I am facing is that there is a termination which occurs in the standard code due to the insert.The termination occurs in the 'SD_PARTNER_UPDATE' function module line 480.I wish to know if there is any validation which I can execute on the partner function determination procedure before I actually try to update the partner function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly give your pointerts for the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Gaurav.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Nov 2007 22:51:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/partner-function-updation-in-mv45afzz/m-p/3059271#M724568</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-24T22:51:42Z</dc:date>
    </item>
    <item>
      <title>Re: Partner function updation in MV45AFZZ</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/partner-function-updation-in-mv45afzz/m-p/3059272#M724569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should write your code to update the partner function in the USEREXIT_MOVE_DATA_VBPA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Nov 2007 02:46:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/partner-function-updation-in-mv45afzz/m-p/3059272#M724569</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2007-11-25T02:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: Partner function updation in MV45AFZZ</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/partner-function-updation-in-mv45afzz/m-p/3059273#M724570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naimesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply, could you please give more details as to where I can find this user exit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Gaurav.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Nov 2007 04:10:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/partner-function-updation-in-mv45afzz/m-p/3059273#M724570</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-25T04:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: Partner function updation in MV45AFZZ</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/partner-function-updation-in-mv45afzz/m-p/3059274#M724571</link>
      <description>&lt;P&gt;Hello, I had to change region of Shipt To Party from ADRC in MV45AFZZ when sales order gets saved.&lt;/P&gt;&lt;P&gt;I tried it with changing xvbadr but i did not work.&lt;/P&gt;&lt;P&gt;The solution which worked for me is with function modules around ADDR_UPDATE if address exists on database and ADDR_MAINTAIN_COMPLETE if only address handle exits but not on databse. I added the form in &lt;STRONG&gt;MV45AFZZ USER_SAVE_DOCUMENT_PREPARE&lt;/STRONG&gt;:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  UPDATE_WE_ADDRESS_REGION
*&amp;amp;---------------------------------------------------------------------*
*       Update Region of WE
*----------------------------------------------------------------------*

FORM update_we_address_region USING p_region.

  FIELD-SYMBOLS: &amp;lt;fs_badr&amp;gt; LIKE xvbadr,
                 &amp;lt;fs_vbpa&amp;gt; LIKE xvbpa.

  DATA: ls_addr1_sel      TYPE ADDR1_SEL,
        ls_addr1_value    TYPE ADDR1_VAL,
        ls_addr1_data     TYPE ADDR1_DATA,
        lt_return         TYPE TABLE OF ADDR_ERROR,
        lv_return_code    TYPE AD_RETCODE,
        lv_address_handle TYPE AD_HANDLE.

  LOOP AT xvbpa[] ASSIGNING &amp;lt;fs_vbpa&amp;gt; WHERE parvw = 'WE'.
    READ TABLE xvbadr[] ASSIGNING &amp;lt;fs_badr&amp;gt; WITH KEY adrnr = &amp;lt;fs_vbpa&amp;gt;-adrnr.
    IF sy-subrc eq 0.
      &amp;lt;fs_badr&amp;gt;-regio = p_region.
      clear: ls_addr1_sel, ls_addr1_value, ls_addr1_data, lv_return_code.
      ls_addr1_sel-addrnumber  =  &amp;lt;fs_badr&amp;gt;-adrnr.
      call function 'ADDR_GET'
        exporting
          address_selection = ls_addr1_sel
        importing
          address_value     = ls_addr1_value
        exceptions
          parameter_error   = 1
          address_not_exist = 2
          version_not_exist = 3
          internal_error    = 4
          others            = 5.

      " case if address exists on database already
      IF sy-subrc EQ 0.
        MOVE-CORRESPONDING ls_addr1_value TO ls_addr1_data.
        ls_addr1_data-region = p_region.
        REFRESH lt_return.
        CALL FUNCTION 'ADDR_UPDATE'
          EXPORTING
            address_data              = ls_addr1_data
            address_number            = ls_addr1_value-addrnumber
            nation                    = ls_addr1_value-nation
            check_empty_address       = ' '
            check_address             = ' '
          IMPORTING
            returncode                = lv_return_code
          TABLES
            error_table               = lt_return
          EXCEPTIONS
            address_not_exist         = 1
            parameter_error           = 2
            version_not_exist         = 3
            internal_error            = 4
            OTHERS                    = 5.
        IF sy-subrc EQ 0 AND lv_return_code NE 'E'.
          CALL FUNCTION 'ADDR_MEMORY_SAVE'
            EXCEPTIONS
              address_number_missing       = 1
              person_number_missing        = 2
              internal_error               = 3
              database_error               = 4
              reference_missing            = 5
            OTHERS                         = 6.
          IF sy-subrc EQ 0.
            CALL FUNCTION 'ADDR_MEMORY_CLEAR'
             EXCEPTIONS
               unsaved_data_exist       = 1
               internal_error           = 2
               OTHERS                   = 3.
            IF sy-subrc &amp;lt;&amp;gt; 0.
            ENDIF.
          ENDIF.
        ENDIF.
      ELSE.
        " case if address handle exists but not on database
        lv_address_handle = &amp;lt;fs_badr&amp;gt;-adrnr.
        DATA: lt_addr_complete TYPE SZADR_ADDR1_COMPLETE.
        CALL FUNCTION 'ADDR_GET_COMPLETE'
         EXPORTING
           ADDRHANDLE                    = lv_address_handle
         IMPORTING
           ADDR1_COMPLETE                = lt_addr_complete
         EXCEPTIONS
           PARAMETER_ERROR               = 1
           ADDRESS_NOT_EXIST             = 2
           INTERNAL_ERROR                = 3
           WRONG_ACCESS_TO_ARCHIVE       = 4
           ADDRESS_BLOCKED               = 5
           OTHERS                        = 6.

        IF sy-subrc EQ 0.
          READ TABLE lt_addr_complete-addr1_tab INDEX 1 ASSIGNING FIELD-SYMBOL(&amp;lt;fs_complete_addr&amp;gt;).
          IF sy-subrc EQ 0.
            &amp;lt;fs_complete_addr&amp;gt;-data-region = p_region.
            REFRESH lt_return.

            DATA: lv_update_kz TYPE AD_UPDFLAG.
            lv_update_kz = 'U'.
            CALL FUNCTION 'ADDR_MAINTAIN_COMPLETE'
              EXPORTING
                updateflag                          = lv_update_kz
                addr1_complete                      = lt_addr_complete
                address_group                       = 'SD01'
               CONSIDER_CONSNUMBER_FOR_INSERT       = 'X'
               IV_TIME_DEPENDENT_COMM_DATA          = 'X'
             IMPORTING
               RETURNCODE                           = lv_return_code
             TABLES
               ERROR_TABLE                          = lt_return
             EXCEPTIONS
               PARAMETER_ERROR                      = 1
               ADDRESS_NOT_EXIST                    = 2
               HANDLE_EXIST                         = 3
               INTERNAL_ERROR                       = 4
               ADDRESS_BLOCKED                      = 5
               OTHERS                               = 6.
            IF sy-subrc &amp;lt;&amp;gt; 0.
* Implement suitable error handling here
            ENDIF.
           ENDIF.
        ENDIF.
      ENDIF.
    ENDIF.
  ENDLOOP.
ENDFORM.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 28 Jan 2022 08:14:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/partner-function-updation-in-mv45afzz/m-p/3059274#M724571</guid>
      <dc:creator>Raphael_Sommer</dc:creator>
      <dc:date>2022-01-28T08:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: Partner function updation in MV45AFZZ</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/partner-function-updation-in-mv45afzz/m-p/3059275#M724572</link>
      <description>&lt;P&gt;Again, don't use old question &lt;/P&gt;&lt;P&gt;and posting several time the same question, is not a good practice&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jan 2022 08:27:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/partner-function-updation-in-mv45afzz/m-p/3059275#M724572</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2022-01-28T08:27:47Z</dc:date>
    </item>
  </channel>
</rss>

