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: 

Clear IDOC creation when only header level changes are made ME22N.

Former Member
0 Kudos

Hi All,

when the PO is on changed in the header level only(for example header texts and header code) and when we execute RSNAST00 one BADI getts triggered which checks if the Item category is 9 and badi will clear the IDOC creation.

If the PO item category is = 9, the IDOC must not be created. This badi works fine if the changes are made at

1)at Item level

2)both header level and Item level

In case of 1 and 2 we have both header segment E1EDK01 and item segments E1EDP01.As a result it checks for the item category in the item segment.so idoc is not created.

3)BADI is not working when the changes are made at the header level only. The IDOC is getting created even though the PO has the item category as 9.

I found in this case only header segments are availble while debugging and the item segments are not there to check the condition for the item category.

Please any one can suggest me possible solutions to clear idoc creation when only header level changes are made ME22N.

The BADI used is as below.

-


*

DATA : lwa_data TYPE edidd.

DATA : lw_dp01 TYPE e1edp01.

DATA : lwa_control TYPE edidc.

CHECK idoc_control-rcvprn = '3PL' AND idoc_control-idoctp = 'ORDERS05'.

LOOP AT idoc_data INTO lwa_data.

IF lwa_data-segnam = 'E1EDP01'.

lw_dp01 = lwa_data-sdata.

IF lw_dp01-pstyp = '9'.

CLEAR create_idoc.

ENDIF.

ENDIF.

ENDLOOP.

ENDMETHO

Thanks in advance.

5 REPLIES 5

Former Member
0 Kudos

Hi all,

Is there any way that I can get the item category details when Only header level changes are made to the PO in ME22N and only header segments are available in the IDOC.

Is this possible:- Fetch the po number and item category details from ekpo table that matches with the header segment po number and then check for item category value to clear the idoc creation?

Any information is helpfull.

Edited by: Selina.selk on Nov 20, 2009 1:39 PM

Edited by: Selina.selk on Nov 20, 2009 2:49 PM

0 Kudos

I applied the logive I mentioned and waas sucessfull.

Thank you all.

Former Member
0 Kudos

I applied my logic specified n it was sucessfull

Former Member
0 Kudos

You're welcome, I'm glad we could help you

Tamá

0 Kudos

Hi Tamás,

Are you sure you could help in this issue? If you can notice there were no replies forthis issue.