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
pedro_magueija
Active Contributor
0 Likes

Hi Jhonatan,

I think you can only change the code if you have no transaction for that BP.

Good luck.

Best regards,

Pedro Magueija