ID:               24465
 User updated by:  artpego at hotmail dot com
 Reported By:      artpego at hotmail dot com
-Status:           Bogus
+Status:           Open
 Bug Type:         COM related
 Operating System: Windows XP SP1
 PHP Version:      4.3.2
 New Comment:

Do not dismiss this so quickly as not understanding PHP syntax. I am a
very compentant PHP coder for a large company (a company which I am
trying to show that PHP can replace their horrible asp/VB systems for
accessing SAP). I understand PHP syntax very well and that using:
$optionAdd(1,"TEXT")="FCURR = 'NTD'";
Will cause a parse error ##using an equal '=' sign after what php would
see as a funtion call is impossible## None the less, I have not found a
way to assign this value. The 
whole point is that I have to assign a value to a co-ordinate:

TABLE   COL1
ROW1  #VALUE#

this co-oridinate/value is represented by (1,1)

I can retrieve the default value assigned to this co-ordinate by
using:

$myValue=$optionAdd->value(1,1); ## LEGAL, I get my value back

I am unable to ASSIGN a value since every time I try it would be
hurting the parser's feelings or breaking the metods rules.

$optionAdd->value(1,1)="Some Text"; Unexpected '=' Error
$optionAdd->value="Some Text"; propput failed invalid index
$optionAdd->appendRow(1,1);
$optionAdd="Some Text"; Invalid number of arguments appendRow

The list goes on and on. I have spent more time than I can imagine
hunting for ways to modify my script. I have researched the SAP COM
methods for alternate solutions, I have studied examples in every other
language, I tried everything I know how to do. I cannot do this. If you
it is as simple as not understanding PHP syntax, then show me how it is
done, otherwise, tell me why it can't be done.


Previous Comments:
------------------------------------------------------------------------

[2003-07-02 21:38:38] [EMAIL PROTECTED]

Learn PHP syntax first.


------------------------------------------------------------------------

[2003-07-02 15:01:15] artpego at hotmail dot com

Description:
------------
This is caused while using the "RFC_READ_TABLE" remote function call
for SAP R/3. The ability to add a value to a temporary table at a
specified row and column is required.






Reproduce code:
---------------
$funSap=new COM("SAP.Functions") or die ("Did Not Create");
$myFun=$funSap->Add("RFC_READ_TABLE");
$optionAdd=$myFun->Tables("OPTIONS");
$optionAdd->AppendRow();
$optionAdd(1,"TEXT")="FCURR = 'NTD'";

Expected result:
----------------
The script above supposed to do the following:

a) $optionAdd=$myFun->Tables("OPTIONS")
## CREATE A TABLE NAMED OPTIONS.

b) $optionAdd->AppendRow()
## METHOD CALLED TO ADD A BLANK ROW TO THE OPTIONS TABLE

c) $optionAdd(1,"TEXT")="FCURR = 'NTD'"
## ASSIGN THE VALUE "FCURR = 'NTD'" TO THE OPTIONS TABLE (ROW 1,
COLUMN1)==(1,"TEXT")

Actual result:
--------------
## ERROR -> parse error, unexpected '=' in line ...
This is due to the line $optionAdd(1,"TEXT")="FCURR = 'NTD'"

I have tried countless combinations, read every piece of documentation,
searched the internet for over a week and can see exambles in every
other language doing exactly this with COM objects (VB,Java,PERL,Etc).

Every other part of the script works
a) I can connect to SAP
b) I can query functions and tables and get results

However: If I am unable to use the portion of the script listed above,
there is no way to limit my queries through a "WHERE CLAUSE" or even
select specific fields... This means my query results would return
every row from the entire table (some have millions of entries) and
there is a buffer width of 512 Bytes that can not be exceeded for each
row. Your assistance will be greatly appreciated.

Michael


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=24465&edit=1

Reply via email to