Hi Experts,
We are receiving following error when SAP Bw process chain executes.
SAPSQL_STMT_TOO_LARGE , Error occurs in following SQL statement and need your expert opinion on how to optmize the code.
CRM related objects are being used in the code.
Code:
SELECT crm_ohguid crm_itmgui kschl SUM( /bic/pr_kbetr )
FROM /bic/alq00_o0600 INTO TABLE lt_price
WHERE crm_ohguid IN lr_record
AND ( kschl = 'ZD01'
OR kschl = 'ZD10'
OR kschl = 'ZRME'
OR kschl = 'ZT03' )
AND /bic/pr_kinak = space
GROUP BY crm_ohguid crm_itmgui kschl
ORDER BY crm_ohguid crm_itmgui kschl.
Error Generated from the below code.
>>>>> SELECT crm_ohguid crm_itmgui kschl SUM( /bic/pr_kbetr )
FROM /bic/alq00_o0600 INTO TABLE lt_price
WHERE crm_ohguid IN lr_record <====
Here is the size information for variable lr_record:
LR_RECORD
Table IT_1201[167714x134]
Thank you.
Regards,
Las