Skip to Content

Enhancement in CO02 T-code.

Feb 14, 2017 at 04:16 AM


avatar image
Former Member


In co02 T-code- Components overview, If a user clicks any fields the following tcoding has to be triggered.

1.IF user clicks any field and if the material quantity in the field is not back-flushed it must not show any error.

2.If the material quantity is backflushed it must show warning message as "The Material 'matnr, is already back-flushed .


For the above requirement i created the enhancement with below coding but it is not get triggered while clicking on the field.

Types: begin of str,
AUFNR1 type afko-aufnr,
matnr type aufm-matnr,
bwart type aufm-bwart,
menge type aufm-menge,
end of str.

get parameter id 'ANR' field aufnr.

data:it1 type table of str,
wa type str,
it2 type table of str,
wa1 type str.

select aufnr matnr bwart menge
from aufm into table it1
where aufnr = aufnr and bwart = 261.
select aufnr matnr bwart menge
from aufm into table it2
where aufnr = aufnr and bwart = 101.

loop at it1 into wa.

Loop at it2 into wa1.

if wa-menge = wa1-menge.
message 'No ERROr' type 'S'.

message ' ERROr' type 'S'.


10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Raymond Giuseppi Feb 14, 2017 at 06:35 AM

If the fields are not defined as hotspot a single click won't trigger anything. Better handle the double-click event/function code.


Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member


Thanks for the reply,

I defined the event for the same and its working,

Kindly let me know if its possible to show the warning message as

"The material 'matnr' has already backflushed with 'igmng'Quantities.

Here the MATNR & IGMNGis Material no belongs to that line item where we tried to change the quantity,

Is it possible to catch the values from the sructure and show in a message.

Pl refer attached screenshot were we trying to show the message.untitled.png

In attached screen shot if we tried to change the value of the line item 10 the message should be appear as

"The material B has already backflushed with 25 Quantities.

Is it possible.

untitled.png (49.5 kB)