Regarding Change document read

Hi All,
Am using Change Document read function module to find out the changed material details. i want to fetch the plant from marc to filter the records am having the only relationship i.e material to fetch the details from marc and mara,with this i can't filter because for one material four plants will be there.so am using the tabkey from that function module to fetch the plant i don't think is this a right way can anyone explain how i can get a plant.

Think you query is misleading...
As per my understanding you are trying to find all changes for materials in a specific plant right????
If so below code can give you some idea:
TABLES: mara.
SELECT-OPTIONS: so_date FOR mara-laeda. " Date Criteria
PARAMETERS: p_werks TYPE werks_d obligatory. " Plant
CONSTANTS: c_tcode TYPE sytcode VALUE 'MM02'.
TYPES: BEGIN OF ty_marc,
         matnr TYPE matnr,
         werks TYPE werks_d,
       END OF ty_marc.
DATA: i_cdocs TYPE STANDARD TABLE OF cdred,  " Change Docs
      wa_cdocs TYPE cdred,
      i_marc TYPE STANDARD TABLE OF ty_marc, " Plant Existence
      wa_marc TYPE ty_marc.
START-OF-SELECTION.
" Read Change documents
  CALL FUNCTION 'CHANGEDOCUMENT_READ'
    EXPORTING
      date_of_change             = so_date-low
      objectclass                = 'MATERIAL'
      date_until                 = so_date-high
    TABLES
      editpos                    = i_cdocs
    EXCEPTIONS
      no_position_found          = 1
      wrong_access_to_archive    = 2
      time_zone_conversion_error = 3
      OTHERS                     = 4.
" Delete documents where materials are not changed
  DELETE i_cdocs WHERE tcode NE c_tcode.
  CHECK NOT i_cdocs[] IS INITIAL.
* Check for Material existence in Plant
  SELECT matnr werks INTO TABLE i_marc
         FROM marc
         FOR ALL ENTRIES IN i_cdocs
         WHERE matnr = i_cdocs-objectid(18)
         AND   werks = p_werks.
  LOOP AT i_cdocs INTO wa_cdocs.
    READ TABLE i_marc INTO wa_marc
       WITH KEY matnr = wa_cdocs-objectid.
    IF sy-subrc EQ 0.  " Material Defined in specified plant
      " Further Processing statements
    ENDIF.
  ENDLOOP.
Correct me if my understanding is wrong.
Regards
Eswar

Similar Messages

  • Change Document Read Positions

    Hi Gurs,
    I get an error message in the FM "Change Document Read Positions"
    which is used in FB03 the error message is
    "System error: Error in routine POSITIONEN_LESEN RC
    = 1"
    CDPOS table does not find a value for certain changenumber and hence the select query returs 0 sy-dbcnt
    which is why I get this error message ..
    could you help me in undersatnding where does this CDPOS gets populated and why is this so crucial here and how can I rectify this probs .
    your inputs are greatly appreciated and will be highly rewarded by me ..
    Thanks!!
    Aryan
    Message was edited by: Aryan T

    Hi,
    refer the OSS Note<b> 422547</b>
    Symptom
    When you display all change documents in the customer or vendor master data, the system generates error message F4308 "System error: Error in routine POSITIONEN_LESEN RC=1".
    Additional key words
    FD02, FK02, XD02, XK02, VD02, MK02,
    FD03, FK03, XD03, XK03, VD03, MK03
    Cause and prerequisites
    There are several entries in the change document header table (CDHDR), however, there are no corresponding change document items (CDPO). This may be due to report SAPF019 ("Deleting Master Data") which, in error, only deleted line item data (refer to Note 0134293).
    These change documents are old documents which were created when you used Release 4.0.
    <b>Solution</b>
    Execute report <b>YDELCDHD</b> of Note <b>134293</b> in the test mode and check whether the error is actually due to this problem. If so, execute report <b>YDELCDHD</b> in the update run.
    Source code corrections

  • Regarding change document creation

    hi all
    I created the change document  & there i mentioned the master data table name TCJ1T (Project types)
    Updation to this table is done via standard tcode SPRO
    but my log entirs are not going in CDPOS , CDHDR
    now my question is :
    by creating the change document, when i run the standard tcode where exactly  the change document will be called to log the entries

    Hi
    Where you have created the change doc?
    in <b>SCDO</b> tcode
    Activate the object after creation and giving the table name
    Once it is created entries should come into CDHDR and CDPOS tables.
    Reward points if useful
    Regards
    Anji

  • Regarding change document generation

    Hi,
    In t-code SCDO, for one object class STUE_V I have added one new table MAST and generated the same.  But while I execute my t-code CS01, the same is not appearing in exporting parameters in the standard program where it is calling my generated fucntion module.
    Hence it is giving dump.  This is part of BOMMAT idoc change pointer creation.
    Could someone shed some light on this as I am really stuck here.

    Hi
    Have you tried generating after adding the table in the class ? This is more a generation issue. Might be the include LCSVBF30 has not got properly generated.
    What I feel is if you are adding a table to a standard class then you must also change the code yourself and SAP is not changing the where used list of the update function calls.
    Refer
    http://www.scribd.com/doc/12627676/Logging-Using-Change-Document
    http://help.sap.com/saphelp_nw04/helpdata/en/2a/fa015b493111d182b70000e829fbfe/frameset.htm
    http://wiki.sdn.sap.com/wiki/display/ABAP/Change+Document
    note - 0000391833  -  No change documents for object dependencies change
    Regards
    Vijay

  • Regarding Change Document

    Hi,
    I need the reading material for Change document ( SCDO ).

    Hi,
    Check this link.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/2a/fa015b493111d182b70000e829fbfe/content.htm
    Thanks
    Naren

  • Regarding change document objects

    hi to all,
               I created  one change document object for one transaction say /tmw/tmw . Now I am trying to make changes in /tmw/tmw . table cdhdr and cdpos table are not updating anymore. but cdhdr and cdpos table are updating while passing data to function module /TMW/CHG_OBJ1_WRITE_DOCUMENT in se38 program. MY problem is tables are not updating while make changes in transaction(/tmw/tmw) screen . please help me .
    thanks in advance
    Edited by: mohankumarreddy on Jan 4, 2010 10:22 AM

    The transaction you are using must contain the write document function modules.
    steps:
    1. Create the change document. (Use the transaction SCD0.)
    2. Activate the change document for the object. (Use data element maintenance: transaction SE11.)
    3. Generate an update for the object. (Use the transaction SCD0.)
    4. Insert the appropriate calls in the corresponding programs     "<----
    Your write document will be havng fm's like CHANGEDOCUMENT_OPEN etc.
    The same must be incorporated in your transaction also.
    check sap help
    link:[http://help.sap.com/saphelp_nw2004s/helpdata/en/2a/fa015b493111d182b70000e829fbfe/content.htm]

  • Regarding change documents in Project module

    Hi All
    Can we write change pointers in CDHDR table when we change the status of the project .
    When I change the status of the project then status of the network is also changed.
    Now my requirement is , as soon as the status of the network is changed ,entry should be recorded in to CDHDR.
    I am able to record the changes when description or other things of the nework are changed but facing problem for status change.
    Can we achieve this ?

    Thanks Sreenivas,
    This I am already doing and I am getting the records in JCDS as well as JEST table .
    I just need to know is there any way through which we can write these records in CDHDR and CDPOS table. Because I am using SMD tool .
    So i have created my own message type and done some configurations in BD52 transaction . When I run program RBDMIDOC program , this program reads all entries from CDHDR and CDPOS table based on the selection criteria defined in BD52  and log them into BDCP table. From BDCP table then I read these entries and perform my functionality.
    When I change anything apart from status in the network it is logged in CDHDR and CDPOS. Status is going into JCDS and JEST table.
    Now I need a advise from you , if i have to send the network record as an idoc to third party as soon as the project is released then what should i do. Is there any userexit on the save of CJ20N transaction or some other technique?

  • CR10 transaction  - Work Center Change Documents

    Hi Expers,
    I am doing a test for our customer now and I am stuck with one test.
    That is to test transaction CR10.
    I can't make him to bring any result!
    As I understand, it should bring me the changes, made to Resources or work centers.
    I am creating work centers, using crc1 or cr01, then I do some changes the them and try to view the changes history using cr10. No result. it just stays on it's initial screen.
    I enter only plant and resource name.
    Can anyone give me an advice how to make it work?
    Thanks in advance,
    Artashes

    In OP40 tick the change document tick box for WC catagory
    Now create work centre with that catogary...system will give the change document.

  • TRX CR10- work center change documents

    I need to get a report which can show me all the change logs by workcenter.  I found trx CR10 in the menu path, but I don't get any output, it does not appear to work at all.  Is any one familiar with the trx? and how to make it work?
    Thanks
    Edited by: Dunkin on Jun 26, 2009 6:04 PM
    Edited by: Dunkin on Jun 26, 2009 6:05 PM

    In OP40 tick the change document tick box for WC catagory
    Now create work centre with that catogary...system will give the change document.

  • In MAC, I want to change document size from 8.5X11 to 18X24 to create a poster to print through Staples. I created the doc originally in WORD, changed the size in WORD, converted to PDF doc. But PDF doc is still in 8.5X11. Read ADOBE support help info. Te

    In MAC, I want to change document size from 8.5X11 to 18X24 to create a poster to print through Staples. I created the doc originally in WORD, changed the size in WORD, converted to PDF doc. But PDF doc is still in 8.5X11. Read ADOBE support help info. Terls me to change size in application rather than printer. BUT ACROBAT Pro does not give me a page set up option in FILE. I can only find one in the printer dialog box. Help!

    from the FAQs on Staples website:
    I have a file that I know is a PDF, but the website claims it is not in a PDF format. What should I do?
    Check to see that the file has the .PDF extension. Also, check that the filename does not have any special characters such as an ampersand (“&”).
    Regarding your measurements set to centimeters rather than inches; is it just in MS Word?
    Or does it occur in all other applications.
    Check your Work preferences first:
    If it is happening in all your applications, check your Mac OS System Preferences.

  • BADI: BBP_WFL_EMPL_WI_BADI - Read change document

    Hi,
    I am implementing BADI BBP_WFL_EMPL_WI_BADI to be able to decide when the SC should return to requester or not. For some changes like increased value we want to send WI to requster and for some changes like decreased value we do not want to send SC to requester. To be able to decide this we need to read the change documents. I have tried to use FM BBP_CHANGE_DOC_GENERAL, but at the time the BADI is called the change doucment are not avaliable. Do anyone know if there is a FM (or other way) avaliable to read the change doc from memory instead?
    Our release is SRM 5.0 server 550
    Regards,
    Christine

    Hi
    <b>Please go through the following pointers which might help.</b>
    <u>Re: Is possible to avoid requester have to accept after a partial rejection
    Re: Vendor changes tracking, Payment term filtering, Vendor listing
    Re: location where the change document log is stored
    G/L Account for Extension Service PO Value In-Correct
    Re: Get PO modifications?
    Re: Change log table for Vendor Bidder information?</u>
    Regards
    - Atul

  • Regarding Workflow trigerring using change document

    Hi all,
    I am trying to trigger a workflow using change document object.
    I want that to trigger the workflow on the material master change through MM02.
    I have created  a business object ZBUS1001 and wanted that on change of material master
    the custom change document object should call the workflow
    I went through all the material avaialable over SDN ,but can not find a change object for change in material master through MM02  for std business object  BUS1001.
    Please tell me how to find one.
    Please reply if any one of you have some solution.

    Hi,
    Thanks for your reply.
    I am using an existing change object - MATERIAL_N of Business Object - BUS1001 and the event
    BASICMATERIALCHANGED.
    I have mentioned  the details in the tcode SWEC.
    And even in the workflow i have given the start of event  as the BUS1001 and event BASICMATERIALCHANGED.
    But workflow not called .
    Do we need to maintain an entry in SWED?
    If yes then in function module column what we need to mention.

  • Regarding a Change Document Function Module ----- VERY VERY Urgent

    I am using a Change Document Function module "CHANGEDOCUMENT_READ". It is taking a long time.
    I am using the parameters:
    Start date is the first date of the current month
    Enddate as last date of the current month
    Object class as 'MATERIAL'
    Table Name as 'MBEW'

    Hi ,
    When you want to read the change documents, please follow the below process.
    1. Read the change documents headers with function modules
    call function 'CHANGEDOCUMENT_READ_HEADERS'
           exporting
                date_of_change             = cdhdr-udate
                objectclass                = cdhdr-objectclas
                objectid                   = cdhdr-objectid
                time_of_change             = '000000'
                username                   = cdhdr-username
           tables
                i_cdhdr                    = gt_cdhdr
           exceptions
                no_position_found          = 1
                wrong_access_to_archive    = 2
                time_zone_conversion_error = 3
                others                     = 4.
    2. From above step you will get data of change documents very quickly into Itab (gt_cdhdr)
    3. Read the details on change documents with functiion module by using Itab in loop for each document.
      loop at gt_cdhdr.
        call function 'CHANGEDOCUMENT_READ_POSITIONS'
             exporting
                  changenumber            = gt_cdhdr-changenr
             importing
                  header                  = cdhdr
             tables
                  editpos                 = gt_cdshw
             exceptions
                  no_position_found       = 1
                  wrong_access_to_archive = 2
                  others                  = 3.
    Above is the best way to read the change documents.
    Rewards please if above info is useful.
    Thanks.

  • How to read service order change document data

    Hi Experts,plz help me,my requirement is to read the service order change document data,for that one i need to read from cdhdr and cdpos tables,so what i need to do.in input parameters for cdhdr table in place of ibjectclass and objectid what i need to pass.plz help me.

    Same for CDHDR and CDPOS.
    OBJECTCLAS = 'ORDER'
    OBJECTID = combination of client(AUFK-MANDT) + Order category(AUFK-AUTYP) + Order number (AUFK-AUFNR)
    for example
    OBJECTCLAS = 'ORDER'
    OBJECTID = '10030004001108788'
    Chaiphon

  • Quirey regarding BOM change documents display -records  not able to underst

    Hi,
    While viewing Change documents  of BOm through CS03--Environment --change documents    ....the following is being displayed
    what does it really refers to ?
    user id is ofcourse :RNDCORE
    can any one provide some inputs ? what it refers and where to get the entire details of these deleted  ....records ?
    55564677   16.07.2008 12:24:33 RNDCORE      CS02  
    STAS    777M00016605010000013300000267   Deleted
    STPO    777M000166050000013300000266     Deleted
    regards,
    Madhu Kiran

    >    
    > STAS    777M00016605010000013300000267   Deleted
    >
    > STPO    777M000166050000013300000266     Deleted
    >
    >
    >  regards,
    > Madhu Kiran
    Hi,
    It says:
    STAS    777M00016605010000013300000267
    777           -Client
    M             -Material BOM
    00016605  - BOM
    01            - Alternative
    00000133 - Item Node
    00000267 - Counter
    Similarly for STPO    777M000166050000013300000266  also.
    Hope this Clarifies.
    Regards,
    Siva

Maybe you are looking for

  • Strange album artist problem

    On some songs, every time I play them my iTunes decides its fun to change the album artist for me. I don't know where its getting this information or why, but its really weird and messing up my organization. two examples: Every time I play "Day 'n' N

  • E72- Unable to send e-mail from work mailbox

    I am unable to send e-mails from my work e-mail through my E72 although it receives perfectly. I have been in contact with Nokia via e-mail for the last 2 weeks and they have sent several suggestions to solve the issue but nothing is working. I have

  • Adding custom fields to Va05n output list

    Hi Experts, i am looking to add some custom fields to Transaktion Va05n. It seems,at least to me, that the underling Program "SD_SALES_ORDERS_VIEW" is not meant to be enhanced. I guess i could do a append to the structure used in the ALV-Output, but

  • Copy/Paste function no longer works in iOS5?

    Just upgraded to iOS5 last night, and I just noticed I can no longer copy/paste from Safari to Office HD. It goes through all the motions, but there is no text pasted. I tried rebooting, same deal. I can paste the text in notes, but it doesn't work i

  • Joint Stereo Balance Issues with Headphones iPod iPad iTunes 10.5.0.142

    This is a cross posting. I'm running iTunes 10.5.0.142 on windows vista SP2.  I have an old nano (2nd gen) and an iPad (1st gen). Most of the files in my library are MP3 encoded using iTunes with default joint-stereo settings.  All of my library seem