Dynamic where clause: Urgent
I am facing a problem with data retrieval in a BADI with dynamic where clause.
I have a variable defined as:
data: lv_where_condn TYPE string.
I concatenate the data in the string based on the user's input and perform the following select:
INTO TABLE lt_data
The sy-subrc returns a value 4 although there is data in the system for the users data input.
Earlier it used to give a short dump which I have now take care of with the catch statement.
SAP has suggested the following:
This problem happens if an attempt was made to bind or define a variable character string with a buffer length less than the two-byte minimum requirement. Please check the variable definition in your custom code and increase the buffer size or use a different type.
Any inputs will b appreciated in declaring the dats type for lv_where_condn.