on 2012 Oct 22 3:58 PM
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 />';
}
?>
Request clarification before answering.
Hi,
I guess you are trying to add new bp
$oBo->CardCode='CL-7777777';
$VALOR = $oBo->Add();
if seems that card code is already exists. If you want to update any existing transaction / master files, you need to use GetByKey function to get existing record and then fire update method.
Hope this will clear your confusion.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 23 | |
| 20 | |
| 17 | |
| 17 | |
| 10 | |
| 9 | |
| 8 | |
| 3 | |
| 3 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.