Application Development 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: 

How to modify existing active user-exit

Former Member
0 Kudos

Hi all,

I have in the Production system, the user-exit for customer-specific data for Purchase Order EXIT_SAPMM06E_012. The include ZXM06U43 already contains some code which is running perfectly.

I need to append some more fresh code in this include. I have tried to use SE38 to change this include. But after appending the code, if I am trying to activate it, I encounter the following error message

"Field "‘’" is unknown. It is neither in one of the specified tables nor

defined by a "DATA" statement."

I am only trying to apply conditional statement on a field which is a parameter given by the exit.

What could be the problem. What are the steps involved in modifying an existing active user-exit. Am I missing any one of those.

Thank you for your responses & time.

Harikrishnan

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi Hari,

i too got the same error..

but i modified a bit and got no errors..

tables : ekko.

<b>data : b(5) value 'VOID'.</b>

IF sy-tcode EQ 'ME21' OR sy-tcode EQ 'ME21N' OR

sy-tcode EQ 'ME22' OR sy-tcode EQ 'ME22N'.

CASE i_ekko-zzpotype.

WHEN 'IMPPO'.

IF <field> EQ b.

MESSAGE e000(zhari) WITH text-001 .

ENDIF.

WHEN OTHERS.

IF <field> NE b.

MESSAGE e000(zhari) WITH text-001.

ENDCASE.

ENDIF.

endif.

regards

satesh

8 REPLIES 8

Former Member
0 Kudos

hi,

can you give the code that you implemented in the exit..

regards

satesh

0 Kudos

Hi Satish,

Thank you for your quick response.

I am checking the value of custom screen field which are appended to PO table EKKO. These were appended through customer include structure CI_EKKODB.

The exit EXIT_SAPMM06E_012 gets the itab I_EKKO which has the customer fields also filled.

I have the following code:

...............begin................................

IF sy-tcode EQ 'ME21' OR sy-tcode EQ 'ME21N' OR

sy-tcode EQ 'ME22' OR sy-tcode EQ 'ME22N'.

CASE i_ekko-zzpotype.

WHEN 'IMPPO'.

IF i_ekko-zzimp_assessmode EQ ‘VOID’.

MESSAGE e000(zhari) WITH ‘Incompatible import assessment mode!’.

ENDIF.

WHEN OTHERS.

IF i_ekko-zzimp_assessmode NE ‘VOID’.

MESSAGE e000(zhari) WITH ‘Incompatible import assessment mode!’.

ENDCASE.

ENDIF.

...............end.................................

When I activate the include, I get the following syntax error:

Field "‘VOID’" is unknown. It is neither in one of the specified tables

nor defined by a "DATA" statement.

Thank you,

Harikrishnan

0 Kudos

Check your single quotes...

<b>IF i_ekko-zzimp_assessmode = 'VOID'.</b>

Copy this line and see...

It may be because you might have copied from an external editor like Microsoft Word...

0 Kudos

Hi,

I too suggest the following.Reward points by clikcing the star on the left of reply,if it helps.

Only thing you need to do is declare a variable and assign the value to it and then try using the variable in the program.

data l_void(5) type c value 'VOID'.

IF sy-tcode EQ 'ME21' OR sy-tcode EQ 'ME21N' OR

sy-tcode EQ 'ME22' OR sy-tcode EQ 'ME22N'.

CASE i_ekko-zzpotype.

WHEN 'IMPPO'.

IF i_ekko-zzimp_assessmode EQ l_void.

MESSAGE e000(zhari) WITH ‘Incompatible import assessment mode!’.

ENDIF.

WHEN OTHERS.

IF i_ekko-zzimp_assessmode NE l_void.

MESSAGE e000(zhari) WITH ‘Incompatible import assessment mode!’.

ENDCASE.

ENDIF.

0 Kudos

Hi Harikrishnan,

The problem was not in your check and declaring a variable to solve the problem.

Just copy the lines below into a report program and test it:

REPORT ZTEST.

DATA a(10) TYPE c VALUE 'Hi'.

IF a = ‘VOID’.

ENDIF.

You must get the same error that you got earlier...

And now copy these lines in the program and compile it:

REPORT ZTEST.

DATA a(10) TYPE c VALUE 'Hi'.

IF a = 'VOID'.

ENDIF.

This should compile fine without any errors.

Although it seems that these codes are the same the problem lies in the <b>single quotes</b>.

Refer my earlier post...

Former Member
0 Kudos

hi Hari,

i too got the same error..

but i modified a bit and got no errors..

tables : ekko.

<b>data : b(5) value 'VOID'.</b>

IF sy-tcode EQ 'ME21' OR sy-tcode EQ 'ME21N' OR

sy-tcode EQ 'ME22' OR sy-tcode EQ 'ME22N'.

CASE i_ekko-zzpotype.

WHEN 'IMPPO'.

IF <field> EQ b.

MESSAGE e000(zhari) WITH text-001 .

ENDIF.

WHEN OTHERS.

IF <field> NE b.

MESSAGE e000(zhari) WITH text-001.

ENDCASE.

ENDIF.

endif.

regards

satesh

0 Kudos

Hi Satish,

That was one nice way to trick the compiler which was looking for the data declaration. Your solution worked for me. I am going in for the transport.

Thanks a lot!

Regards

Harikrishnan

Former Member
0 Kudos

hi Hari,

the problem was in the single quote..

anyways .. i hope your problem is solved..

regards

satesh