cancel
Showing results for 
Search instead for 
Did you mean: 

Problems to send a internal table with SAPNWRFC PHP

former_member308319
Participant
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member308319
Participant
0 Kudos

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

Former Member
0 Kudos

Hi,

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

Thank you