Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Help! BAPI_CATIMESHEETMGR_INSERT with php

I am a beginner, try to export data with BAPI_CATIMESHEETMGR_INSERT.

I was try it with saprc.class with this code.

include_once 'classes/saprfc.class.php';

// Create saprfc-instance

$sap = new SAPRFC(array(

"logindata"=>array(

"ASHOST"=>"server" // application server ,"SYSNR"=>"03" // system number

,"CLIENT"=>"935" // client

,"USER"=>"user" // user

,"PASSWD"=>"passwd" // password

,"LANG"=>"EN" // language

)

,"show_errors"=>true // let class printout errors

,"debug"=>false)) ; // detailed debugging information

$catsdata = array ("WORKDATE"=>"20080909","EMPLOYEENUMBER"=>"202370","SEND_CCTR"=>"","SENBUSPROC"=>"","ACTTYPE"=>"LA1106","PO_NUMBER"=>"","PO_ITEM"=>"","SERVICE"=>"","REC_CCTR"=>"","REC_ORDER"=>"","NETWORK"=>"6007970","ACTIVITY"=>"0010","SUB_ACTIVITY"=>"","CAPA_CATEGORY"=>"","SPLIT"=>"","WORK_CNTR"=>"","WBS_ELEMENT"=>"","RECSALEORD"=>"","RECITEM"=>"","RECCOSTOBJ"=>"","RECBUSPROC"=>"","ABS_ATT_TYPE"=>"0810","WAGETYPE"=>"","TRIPNO"=>"","OT_COMP_TYPE"=>"","WORKTAXAREA"=>"","VALUATION_BASIS"=>"","CURRENCY"=>"","CURRENCY_ISO"=>"","EXTRA_PAY_INDIC"=>"","PAYSCALEGROUP"=>"","PAYSCALELEVEL"=>"","BONUSTYPE"=>"","BONUSVALUE"=>"","POSITION"=>"","CO_AREA"=>"1000","TRANS_CURR"=>"","TRANS_CURR_ISO"=>"","PRICE"=>"","PLANT"=>"","CALC_MOTIVE"=>"","CATSHOURS"=>"8","UNIT"=>"","ISOCODE_UNIT"=>"","STARTTIME"=>"","ENDTIME"=>"","PREVIOUS_DAY"=>"","ALL_DAY_FLAG"=>"","REM_WORK"=>"","FCST_FIN_DATE"=>"","FIN_CONF"=>"","SHORTTEXT"=>"","PART_CONF"=>"","EXTSYSTEM"=>"","EXTAPPLICATION"=>"","EXTDOCUMENTNO"=>"","STATKEYFIG"=>"","QUANTITY"=>"","UNITQ"=>"","ISO_UNITQ"=>"","AMOUNT"=>"","LONGTEXT"=>"");

$aParameter = array(array("IMPORT","PROFILE","ZCC1"),array("IMPORT","TESTRUN",array()),array("EXPORT","CATSRECORDS_IN",$catsdata));

// Call-Function

$result=$sap->callFunction("BAPI_CATIMESHEETMGR_INSERT",$aParameter);

if ($sap->getStatus() == SAPRFC_OK && is_array($result[CATSRECORDS_IN])) {

var_dump($result);

// No, print long Version of last Error

$sap->printStatus();

}

Then i get the messages:

No errors detected.

call function 'BAPI_CATIMESHEETMGR_INSERT' successfull.

But, when I read the table CATSRECORDS_OUT are still empty.

Can any one help, what's wrong with my code.

Thanks.

Edited by: Gede Suartana on Sep 10, 2008 3:20 PM

Former Member
Not what you were looking for? View more on this topic or Ask a question