cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hello!

Is there any way or you may modify the CardCode a Business Partner from the SDK,

so far I only update fields as cardCode, CardType, etc, but when I update the CardCode throws me the error -2035, which as I saw in the documentation is that "Data Source - Duplicate Keys" the cardCode is duplicated.

Here is the code (this in php):

<?php

try {

    if(!$sap->Connected)

        $sap->Connect();

    if($sap->Connected) {

        $oBO = $sap->GetBusinessObject(2);

        if ($oBO->GetByKey('CL-7777776') == true) {

            $oBo->CardCode='CL-7777777';

            $VALOR = $oBo->Add();

            if($VALOR != 0)

                echo 'ERROR : ' . $ERR. '<br>';

        }

        $sap->Disconnect();

    }

    else {

        echo 'No Conectado';

    }

}

catch (Exception $e) {

    echo 'ERROR: <br />' . $e  . '<br />';

    echo $sap->GetLastErrorDescription() . '<br />';

}

?>

0 Likes
View Entire Topic
Former Member
0 Likes

Hi Jhonatan,

Until you have created any document for that Business Partner, you can change BP Code.

If you have any document created with that Business Partner you can not update the BP Code.

--

Amrut Sabnis