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

regarding the validation in the include program.

Former Member
0 Likes
1,105

In the Z.... include program for an user-exit i am unable to do validation because it is raising a syntax error . For example the statement

if bbp_iv_hd-company  =  ‘DH00’.

is raising the following error.

Field "‘DH00" is unknown. It is neither in one of the specified

tables nor defined by a "DATA" statement.

11 REPLIES 11
Read only

Former Member
0 Likes
1,074

if company eq 'DH00'.

do nothing

endif.

Regards

prabhu

Read only

0 Likes
1,074

thanks for your prompt reply. But it was not working

Read only

Former Member
0 Likes
1,074

Try to check with single quotes & use eq instead of =

Sandeep

Read only

Former Member
0 Likes
1,074

Are u sure that the error is in that line??? double click on that to know the error line..

can u give some code before after the IF statement

Read only

0 Likes
1,074
if i_hd-company  eq  v_dh00.
   If i_hd-currency  = v_aud and
      ti_it-gl_account = ‘7070101010’.
      MESSAGE ID sy-msgid Type ‘S’ NUMBER sy-msgno
      WITH gl_account currency.

The line no#3 is raising error "Field "‘7070101010’" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement".

Read only

0 Likes
1,074

r u looping at the internal table ti_it?



loop at ti_it.

if i_hd-company  eq  v_dh00.
   If i_hd-currency  = v_aud and
      ti_it-gl_account = ‘'7070101010'.
      MESSAGE ID sy-msgid Type ‘S’ NUMBER sy-msgno
      WITH gl_account currency.

endloop.

Read only

0 Likes
1,074

Hi,

Can you try assigning the value to a constant and using in the if condition.

Regards,

Anusha

Read only

0 Likes
1,074

no i did nt use the loop statement here

Read only

0 Likes
1,074

Hi Anusha,

i have to declare a lot of constants if i need to replace the values with the constants.

Read only

0 Likes
1,074

Is there any other solution???

Read only

Former Member
0 Likes
1,074

Hi,

Remove the single cotes also then it will work since the field which you are comparing is the numeric field ..i think.

Regards,

Narla