Skip to Content
0

Problems to send a internal table with SAPNWRFC PHP

Mar 21 at 05:56 PM

62

avatar image

I am sending an internal table to an ABAP function with SAPNWRC but I have problems with it. For example, if I send one array to my itab with 3 values, it works but if I send one array with 4 values or more it does not work. This is my code:

The following piece of code works:

$input_parameters = [
            'S_PSPID' => $strctr_project,
            'T_PPTOBASE' => [
                [
                'PSPNR' => '30964',
                'PSPHI' => '394',
                'WLGEV' => '0'
                ],
                [
                'PSPNR' => '30965',
                'PSPHI' => '394',
                'WLGEV' => '0'
                ],
                [
                'PSPNR' => '30966',
                'PSPHI' => '394',
                'WLGEV' => '0'
                ]
            ]
        ];

        $function  = $connection -> function_lookup('ZFUNCTION');
        $itab_proj = $function -> invoke($input_parameters);
        $itab_proj = $itab_proj['T_TABLE'];<br>

On the other hand this does not:

$input_parameters = [
            'S_PSPID' => $strctr_project,
            'T_PPTOBASE' => [
                [
                'PSPNR' => '30964',
                'PSPHI' => '394',
                'WLGEV' => '0'
                ],
                [
                'PSPNR' => '30965',
                'PSPHI' => '394',
                'WLGEV' => '0'
                ],
                [
                'PSPNR' => '30966',
                'PSPHI' => '394',
                'WLGEV' => '0'
                ],
                [
                'PSPNR' => '30966',
                'PSPHI' => '394',
                'WLGEV' => '0'
                ]
            ]
        ];

        $function  = $connection -> function_lookup('ZFUNCTION');
        $itab_proj = $function -> invoke($input_parameters);
        $itab_proj = $itab_proj['T_TABLE'];

Error: SapnwrfcConnectionException An invalid handle was passed to the API call

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Juan Morales Mar 23 at 06:13 AM
0

Thanks guys, I solved my problem installing SAP NW RFC SDK extension for PHP7.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi,

Can you please tell me how to install SAP NW RFC SDK extension for PHP7

Thank you

0