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: 

BADI for co11n

Former Member
0 Kudos

hi experts,

I am using WORKORDER_GOODSMVT BADI to put check on quantity field of CO11n tcode. I found the method GOODS_RECEIPT having the changing parameter CT_GOODS_RECEIPT which is containing the field ERFMG (quantity).

I created an implementation ZBADI_co11n for the BADI.

I am trying to write code like this :

IF ct_goods_receipt-erfmg = 0.

MESSAGE e001(0) WITH ' Please Enter Exact Quantity ' .

ENDIF.

it is throwing error CT_GOODS_RECEIPT is a table without header line therefore has no component called ERFMG.

can anyone tell what to write in the mehtod GOODS_RECEIPT for my check on field.

help pls

2 REPLIES 2

Former Member
0 Kudos

Hai,

METHOD if_ex_workorder_goodsmvt~goods_receipt.

DATA : wa_mesg TYPE imseg.

LOOP AT ct_goods_receipt INTO wa_mesg.

IF wa_mesg-erfmg = 0.

MESSAGE e001(0) WITH ' Please Enter Exact Quantity ' .

ENDIF.

ENDLOOP.

ENDMETHOD.

Here ct_goods_receipt is internal tbale so decl. one work area wa_mesg like above code.

Thanks,

Durai.V

0 Kudos

thank you for your reply. but I want to display this check at the goods movement screen. It is displaying message at the confirmation screen leve.

if i use sy-dynnr eq '130'.

code..

endif.

is this useful.