Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Single quote in dynamic where condition

Former Member
0 Likes
1,200

BAPI_STUDENT_IDENTIFIC_ADD has a field called IDENTIFICATIONNUMBER. This field is later used in a dynamic where condition and causes a short dump when it contains a single quote. I will change the program that calls the BAPI to check for single quotes, but is there anything else I need to check for to ensure a correct where condition?

Thanks,

Dan

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
633

Hi Dan,

You need to exclude the following characters:

CONTANTS:
  c_single_quote VALUE '''',
  c_double_quote VALUE '"',
  c_asteriks     VALUE '*'.

Regards,

Rob.

Hi Dan,

You need to exclude the following characters:

CONTANTS:
  c_single_quote VALUE '''',
  c_double_quote VALUE '"',
  c_asteriks     VALUE '*'.

Regards,

Rob.

2 REPLIES 2
Read only

Former Member
0 Likes
634

Hi Dan,

You need to exclude the following characters:

CONTANTS:
  c_single_quote VALUE '''',
  c_double_quote VALUE '"',
  c_asteriks     VALUE '*'.

Regards,

Rob.

Read only

Former Member
0 Likes
633

Hi Dan,

The best way to ensure correctness of syntax of a dynamic where condition is:

Run the program in debugging mode, Get the Query that is generated dynamically and write it to some other ABAP program and perform syntax check.

This will help you to remove all the syntax errors.

Regards,

Darshil