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

Read Material Classification during MM01 creation

Former Member
0 Likes
1,113

hello all,

my requirement is to send Idocs to different system when a material is created or changed. change pointers have been created and badi BDCP_BEFORE_WRITE is being used to filter out the records that don't need to be sent.

the process works perfectly with one exception. one of the filter criteria is a material classification we named COMMODITYTYPE. at the moment my code looks like this:

SELECT SINGLE ATWRT INTO l_CHAR_VALUE FROM AUSP

WHERE OBJEK = l_matnr

AND ATINN = '0000000023'

AND KLART = '001'.

this works very well for changed materials (MM02) but it looks like AUSP is being updated in a separate update task and it hasn't been triggered at the time BDCP_BEFORE_WRITE gets triggered so there is nothing in the table.

i am looking for a function module (or whatever) that can read the classification when BDCP_BEFORE_WRITE is triggered.

has anyone come across this before? any ideas? thanks much.

(running ECC 6.0)

hello all,

my requirement is to send Idocs to different system when a material is created or changed. change pointers have been created and badi BDCP_BEFORE_WRITE is being used to filter out the records that don't need to be sent.

the process works perfectly with one exception. one of the filter criteria is a material classification we named COMMODITYTYPE. at the moment my code looks like this:

SELECT SINGLE ATWRT INTO l_CHAR_VALUE FROM AUSP

WHERE OBJEK = l_matnr

AND ATINN = '0000000023'

AND KLART = '001'.

this works very well for changed materials (MM02) but it looks like AUSP is being updated in a separate update task and it hasn't been triggered at the time BDCP_BEFORE_WRITE gets triggered so there is nothing in the table.

i am looking for a function module (or whatever) that can read the classification when BDCP_BEFORE_WRITE is triggered.

has anyone come across this before? any ideas? thanks much.

(running ECC 6.0)

4 REPLIES 4
Read only

Former Member
0 Likes
985

Hi James,

for material classification, i think you are using CLFMAS message type. if you are not using then use this.

use FM: IDOC_INPUT_CLFMAS

Regards,

Tutun

Read only

Former Member
0 Likes
985

tutun,

thanks for your reply. however, i may not have been clear. i am not actually sending the classification in the material idoc (and we are using MATMAS as the basic type). in fact, the idoc gets created with everything we want. the issue is filtering the change pointers at the time of creation. we only want tocreate idocs for certain materials and one of the filter criteria is the classification COMMODITYTYPE.

so as i go through the MM01 views i can see the correct value in the COMMODITYTYPE field but when i look in AUSP during the BADI BDCP_BEFORE_WRITE it is not there - it gets updated in a secondary update task. so this value is sitting in memory somewhere and i am trying to find it.

i hope that helps explain things.

james

Read only

0 Likes
985

Hi,

Same issue. Not solved...

Read only

0 Likes
985

alex,

there is no direct solution - that was confirmed by OSS. what i came up as an alternative was to copy the classification to an unused material mater (MARA) field within a user exit. since the MARA values are available in BDCP_BEFORE_WRITE this works to solve the issue.

it is clumsy but it worked and was the only solution that i could come up with.

james