Filtering of IDOCs

ROB CRAWFORD ROB.CRAWFORD at menasha.com
Mon Jul 2 16:44:05 EDT 2001


Hi Eddie,
 
A filter only prevents data in that segment and any child segments from =
being sent to the external system.  In your case, the plant segment =
E1MARCM is a child segment of E1MARAM.  If you apply the filter for the =
plant, you should notice that the E1MARCM is filtered out but the IDOC =
itself still exists.  What I have done to get around this is use an =
existing field in the highest level segment (E1MARAM), a check box usually =
works the best, and then add some code in MASTERIDOC_CREATE_MATMAS to set =
this flag if the material meets the criteria you have specified for the =
plant in the distribution model.
 
The following example was from distribution of vendors but it should give =
you the idea.
 
CALL FUNCTION 'ALE_MODEL_INFO_GET'
        EXPORTING
          MESSAGE_TYPE                 =3D 'CREMAS'
          RECEIVING_SYSTEM             =3D 'MP5'
          SENDING_SYSTEM               =3D w-own_log_sys
       TABLES
         MODEL_DATA                    =3D t_BDI_MODEL.
 
      IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
 
      SELECT LIFNR BUKRS
      FROM LFB1 INTO TABLE T_LFB1
      WHERE lifnr =3D e1lfa1m-lifnr.
 
      LOOP AT T_LFB1.
        read table t_bdi_model with key objtype =3D 'BUKRS' objvalue =3D
                                        t_lfb1-bukrs.
        if syst-subrc =3D 0.
          w-match =3D w-match + 1.
          move 'X' to E1LFA1M-STKZN.
        endif.
      endloop.
 
      if w-match > 0.
        clear idoc_data-sdata.
        MOVE E1LFA1M TO idoc_data-sdata.
        modify idoc_data index 1.
      endif.
 
 
Rob Crawford
I.T. Business Analyst
Menasha Advantage
920-751-2513
rob.crawford at menasha.com
 
 
>>> Eddie.Collins at guinness.com 06/29/01 10:57AM >>>
Hi all,
 
I am trying to filter Material IDOCs by PLANT.  What I am trying to do is =
as
follows:
 
if a material within a plant is changed, create a distribution  IDOC for =
the
corresponding logical system only.  Do not create an IDOC for other =
logical
systems to which MATMAS is assigned.
 
I have looked at using the filtering provided.  However this only filters
IDOC segment E1MARCM where the plant is stored, the basic IDOC information
still goes throught to all other LOGICAL Systems.
 
I tried filtering with classifications but didn't have much luck - =
probably
me.
 
I then decided to add an extension to E1MARAM to handle PLANT details.
However although you enter the plant when making changes to many of the
Material screens, it is not stored so by the time I run BD21 there is no
link to the plant you entered before making the changes.
 
Thus I feel my only option is to send IDOCs to all logical sytems and only
filter out the plant related details.
 
This seem a pain due to the volume of data being created.
 
Any ideas or suggestions.
 
Thanks inadvance
 
Eddie Collins
 
 
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
 
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
 
www.mimesweeper.com=20
**********************************************************************
 


More information about the SAP-WUG mailing list