01.
<?php
02.
header(
"Content-Type: application/vnd.ms-excel"
);
03.
header(
'Content-Disposition: attachment; filename="Report.xls"'
);#????????
04.
05.
$INPUT
=
'23445'
;
06.
require_once
(
"./../Config_Rfc/saprfc.php"
);
07.
require_once
(
"./../Config_Rfc/config_rfc_400.php"
);
08.
$result
=
$sap
->callFunction(
"Z_GET_REPORT"
,
09.
array
(
array
(
"IMPORT"
,
"I_INPUT"
,
$INPUT
),
10.
array
(
"TABLE"
,
"T_table"
,
array
())
11.
));
12.
13.
14.
15.
if
(
$sap
->getStatus() == SAPRFC_OK) {
16.
foreach
(
$result
[
'T_TOTAL'
]
as
$sum_bsis
){
17.
echo
$sum_bsis
[
'PERIOD02'
];
18.
19.
}
20.
21.
22.
}
else
{
23.
$sap
->printStatus();
24.
}
25.
$sap
->logoff();
26.
?>