2009 Jul 31 12:13 AM
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)
2009 Jul 31 5:28 AM
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
2009 Jul 31 5:14 PM
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
2009 Oct 27 1:35 AM
2009 Oct 27 5:18 PM
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
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |