2023 Jul 28 6:42 AM
Hi all,
Iam microsoftteams-image-4.png getting this error in the SQL message error as Number of Maximum input host variables (32768) exceed to 50987
can anyone please help out from this error what is course of action need to taken to resolve this ?
2023 Jul 28 8:25 AM
Reduce the value of p_count and check. Hopefully this will work.
abhishekchatt8240
Please refer this code i had written in my code iam getting the error on where clause
abhishekchatt8240
OPEN CURSOR WITH HOLD gv_cur FOR
SELECT * FROM (p_p_tab) WHERE (gt_dyn_where).
FETCH NEXT CURSOR gv_cur
INTO TABLE <fs_dynamic_tab> PACKAGE SIZE p_count.
IF sy-subrc <> 0.
CLOSE CURSOR gv_cur.
EXIT.
ENDIF.
2023 Jul 28 7:39 AM
2023 Jul 28 8:22 AM
abhishekchatt8240
Please refer this code i had written in my code iam getting the error on where clause
abhishekchatt8240
OPEN CURSOR WITH HOLD gv_cur FOR
SELECT * FROM (p_p_tab) WHERE (gt_dyn_where).
FETCH NEXT CURSOR gv_cur
INTO TABLE <fs_dynamic_tab> PACKAGE SIZE p_count.
IF sy-subrc <> 0.
CLOSE CURSOR gv_cur.
EXIT.
ENDIF.
2023 Jul 28 8:22 AM
abhishekchatt8240
Please refer this code i had written in my code iam getting the error on where clause
abhishekchatt8240
OPEN CURSOR WITH HOLD gv_cur FOR
SELECT * FROM (p_p_tab) WHERE (gt_dyn_where).
FETCH NEXT CURSOR gv_cur
INTO TABLE <fs_dynamic_tab> PACKAGE SIZE p_count.
IF sy-subrc <> 0.
CLOSE CURSOR gv_cur.
EXIT.
ENDIF.
2023 Jul 28 8:25 AM
2023 Jul 28 8:25 AM
Reduce the value of p_count and check. Hopefully this will work.
2023 Jul 28 11:16 AM
Thanks
Abhishek ChatterjeeNow it working fine thanks for your valuable support
2023 Jul 28 11:30 AM
yasu_1096 In the end, could you tell us the old value of P_COUNT, and which new value works?
2023 Jul 28 10:35 AM
You may edit your question by menu Actions > Edit.
1) Better paste the text for better indexing.
DBSQL_ARGUMENT_ERROR
CX_SY_OPEN_SQL_DB
[ASE Error SQL2]ERROR: Number of maximum input host variables (32768) exceeded: 50897.
2) If not, at least embed the image rather than a hyperlink to an image.
Like this:

3) Paste your code with button [CODE] to indent and colorize it (for better reading it):
OPEN CURSOR WITH HOLD gv_cur FOR
SELECT * FROM (p_p_tab) WHERE (gt_dyn_where).
FETCH NEXT CURSOR gv_cur
INTO TABLE <fs_dynamic_tab> PACKAGE SIZE p_count.
IF sy-subrc <> 0.
CLOSE CURSOR gv_cur.
EXIT.
ENDIF.
2023 Jul 28 10:42 AM
I feel that it's related to the contents of GT_DYN_WHERE. It possibly refers to a ranges table ("IN ranges_table") with many lines, which are transformed by the ASE database engine into host variables.
You may also contact SAP support (I couldn't find a SAP note).
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |