Trigger Extra Change Pointer Update

We have Price and Quantity fields configured on PO for creating change pointer records.
When both of the values (NETPR & MENGE) are changed at the same time then everything works out great in BW but if let say only Price is changed then there are issues.
What I need is if only the Price is changed then during the update of the PO the record for Qty should also be created in change pointer tables (CDHDR & CDPOS). If you can briefly describe how to do it that will be great help and I will highly appreciate it.

I figured out a way to do this which was to implement the BDCP_BEFORE_WRITE BADI which allows you to interrogate a change pointer based on an IDoc message type before it's saved to the database.  For starters, change pointers for message type CLFMAS must be activated in order for this to work, even though I'm not interested in those eventual IDocs. 
In the IF_EX_BDCP_BEFORE_WRITE~FILTER_BDCPV_BEFORE_WRITE method of the BADI implementation, I was able to loop through all of the change pointers about to be created and this is where I was able to obtain the vendor number the classification is being applied to.  I actually added another line to the internal table that's changeable in the method for CREMAS and it worked out well.
The only thing that was difficult was to debug this baby.  No matter how you set the breakpoint, it just never hits it until I discovered it's called using an UPDATE TASK.  I found an unorthodox method to debug this situation on the web which is to force an endless loop before your custom code such as.........
while sy-subrc <> 98.
endwhile.
<custom code here>
Once your process runs, it will be sitting in an endless loop in an update task which you can view in transaction SM50.  From here, you can highlight this line then you can click on "Program Session > Program > Debugging" to debug your code.  It's not something I was used to, but it allowed me to debug in the end.  I would hope there's better ways, but this worked for now.
I hope this helps someone else!
Cheers,
Chris

Similar Messages

  • Trigger CREMAS change pointer for vendor classification change in XK02/FK02

    Hi,
    I have a business case where I need to trigger a change pointer of type CREMAS whenever a client modifies vendor classification in transactions FK02/XK02.  I realize classificatiion/characteristics have their own change pointer types (CLFMAS, CHRMAS, etc.), but I was wondering if there was a user exit/BADI available for this scenario where I can manually create a change pointer.  I need the characteristic data to be part of a custom IDoc type (based off of CREMAS03), and it's no problem to include this data in the custom IDoc, but I need a way to trigger the change pointer if the clients changes vendor characteristic data, and nothing else. 
    I also went into transaction BD52 for type CREMAS to see if there's another row for classification (CLASSIFY), but couldn't figure out the right object type.
    There's a BADI called CACL_VALUE_CHANGE that triggers when vendor classification is changed, where I can generate my change pointer, but it's triggered before the client saves which means I would have a useless change pointer. 
    Does anyone have any ideas on what my options are?  I hope I've elaborated enough
    Thanks,
    Chris

    I figured out a way to do this which was to implement the BDCP_BEFORE_WRITE BADI which allows you to interrogate a change pointer based on an IDoc message type before it's saved to the database.  For starters, change pointers for message type CLFMAS must be activated in order for this to work, even though I'm not interested in those eventual IDocs. 
    In the IF_EX_BDCP_BEFORE_WRITE~FILTER_BDCPV_BEFORE_WRITE method of the BADI implementation, I was able to loop through all of the change pointers about to be created and this is where I was able to obtain the vendor number the classification is being applied to.  I actually added another line to the internal table that's changeable in the method for CREMAS and it worked out well.
    The only thing that was difficult was to debug this baby.  No matter how you set the breakpoint, it just never hits it until I discovered it's called using an UPDATE TASK.  I found an unorthodox method to debug this situation on the web which is to force an endless loop before your custom code such as.........
    while sy-subrc <> 98.
    endwhile.
    <custom code here>
    Once your process runs, it will be sitting in an endless loop in an update task which you can view in transaction SM50.  From here, you can highlight this line then you can click on "Program Session > Program > Debugging" to debug your code.  It's not something I was used to, but it allowed me to debug in the end.  I would hope there's better ways, but this worked for now.
    I hope this helps someone else!
    Cheers,
    Chris

  • ALE/Change Pointer Configuration for ZSEGMENTS

    Hello all,
    I have been searching for a few days now trying to obtain my requirement with extending of an idoc.  I am working with the following:
    Message Type: HRMD_A
    BASIC Type: HRMD_A06
    Extension: ZHRMDA06
    I extended the idoc because I wanted to include 2 extra infotypes which are not on that idoc.  Infotypes 77 and 709.
    Here is what I have completed so far.
    WE30...Created ZSEGMENTS to include below.
    WE31...Extended the HRMD_A idoc to include the ZSEGMENTS defined below.
    WE82...Updated the output types and assignments to idoc.
    BD61...Activate Change Pointers
    BD50...Activated change pointer for HRMD_A.
    I change the address field in infotype 0006. 
    Run the BD21...idoc is generated with the changes to address, everything looks good.
    Do the same thing for the ethnic origin on infotype 77, no idoc is generated. 
    I turned on logging onto table PA0077.
    I am evaluating the change logs via SCU3, and I am seeing my changes on the field.
    What I have tried...
    I have tried creating a object in t-code SCDO (ZTEST)
    I have associated  ZTEST with table/field PA0077-RACKY.
    Tried running BD21...No iDoc generated.
    I have been researching for a few days and it feels that this should be able to be done through configuration and not custom coding.  Am I wrong to think that?
    Has anyone ever did anything like this before which they can point to documentation or even the appropriate search criteria on the SCN forums.
    Thanks in advance for your help!
    Jason

    Hi Jason,
    I believe you have to enter the fields that trigger the changing pointer in tcode BD52. In my case these are the fields for BOM:
    Regards,
    Custodio

  • Update Terminated change pointer ID already exists

    Hi  All,
    While we are creating the article or purchase info record creation.
    When I checked the SM13 i got this error.
    Update was terminated
    System ID.... RDP
    Client....... 510
    User..... PRASH
    Transaction.. XK01
    Update key... 4993DEF56A574020E1000000AC19005E
    Generated.... 12.02.2009, 19:22:54
    Completed.... 12.02.2009, 19:22:55
    Error Info... B2 050: Change pointer ID already exists
    Please suggest.
    Regards,
    Prashant

    Hi Prashant,
    Can you share with me, how you solve this problem? I'm encounter the same thing when using Tcode: FK02 to change master data, with same error message. Thanks.

  • HRMD_ABA change pointer trigger not work for info type changes

    Hi,
      In change pointer for message type HRMD_ABA Certain changes to HR records like adding activity types to infotype 315, changing dates to infotype 0001, 0105 and 315 and adding/changing/deleting are not woking through change pointers.
    We are are replicating those changes through RHALEINI program, so can anyone let me know how to customize in case of adding this info types to trigger automatically through change pointers.
    Thanks,
    Marai

    Hi,
       Then check for change document created or not, if created then use SWEC  to  link it

  • A trigger that changes an insert into an update?

    This is probably a quite unusual question, but is it possible to create a trigger that changes an insert into an update?
    So, if someone tries to do something like this:
    INSERT INTO SOME_TABLE (column1, column2, column3) VALUES (value1, value2, value3);
    ...the trigger is able to change it into:
    UPDATE SOME_TABLE column1=value1, column2=value2, column3=value3 WHERE ID=1;
    Can it be done?

    Hi,
    You can do things like that in an INSTEAD OF INSERT trigger.
    See the PL/SQL manual for details:
    http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28370/create_trigger.htm#sthref2864
    INSTEAD of triggers only work on views. Of course, you can create a view as "SELECT * FROM some_table" just so you can use an INSTEAD OF trigger.

  • What is change pointer in ALE ?

    Dear Guru,
    1. What is change pointer in ALE and how to configure it ?
           The process of configure please guide me !
    Tanks and Regards,
    Subash.

    Hi,
    Change pointers are R/3 objects that mark changes to SAP master data. Change pointers are managed by mechanisms in a Shared Master Data (SMD) tool and are based on Change Document (CD) objects. CD objects record the changes occurring to master data at a field level. These changes are stored in tables CDHDR (header table) and CDPOS (detail table). ALE configuration provides a link between CD objects and change pointers. Internal mechanisms update tables BDCP and BDCPS, which host the change pointers. While CD objects are application-data-specific, the processing status of change pointers is message-type-specific. Also, the ALE change pointers are activated first at a general level and then at the message-type level.
    ALE provides powerful capabilities to capture changes occurring to master data and to distribute them via the IDOC interface. This feature can be used to keep two or more systems synchronized with respect to master data.
    Steps to configure change Pointers:
    1.Activate the change pointers globally(BD61)
    2.Activate the change pointers for individual message types(BD50)
    3.Schedule the program RBDMIDOC to run periodically on the sending system.
    To Delete Change pointers use transaction BD22 and the standard program is RBDCPCLR
    Remember You can see a check box in Further characteristics tab of the data element ( se11>enter data element>Further characteristics tab) for change document.
    This check box is to bo checked to trigger change pointers.
    please check out the following link for more information it might help you
    http://help.sap.com/saphelp_nw04/helpdata/en/12/83e03c19758e71e10000000a114084/content.htm
    http://help.sap.com/saphelp_470/helpdata/en/dc/eb683c00e8a646e10000000a11402f/frameset.htm
    Regards,
    Satish

  • Idoc trigerring with change pointer under conditions

    Hello dear experts
    Could you please tell me how can i trigger an outbound idoc using the change pointer ( RBDMIDOC program)?
    I have to generate the ARTMAS outbound idoc ONLY when the material status which is the table MARA is set to a certain value.
    I can manage to trigger the outbound idoc but i did not manage to restrict this triggering according to the value of the material status fields.
    Thanks for all your answers.
    Best Regards.
    Yannick

    I tested using filter on Dist Wh and change pointers - for us, Dist Wh filter for material set on plant.  When we made change to matierial, only if change to plant was made, so plant was included in idoc segment, did the filter work.  If change material description, plant not on idoc segment so was sent .  Looking for alternative...

  • IDOC to XI (Using Change Pointer) - Error

    Hi all,
    I have 1 scenario to update external GL master data using XI. in this case i already configure the source system (SAP) to sending the IDOC to XI whenever got changes.
    BD61 ---> Activate Change Pointer Globally,
    BD50 ---> Activate Change Pointer for GLMAST Message Type.
    SM59 ---> RFC destination for XI system (PX6CLNT300).
    BD54 ---> Logical System source (ST6CLNT100) and target xi (PX6CLNT300)
    WE20 ---> Partner Profile for XI (PX6CLNT300).
    BD64 ---> Create Distribution Model View.  Sender = ST6CLNT100, Receiver = PX6CLNT300 and Message Type = GLMAST
    The system can generate the IDOC whenever changes happen with running program RBDMIDOC. but the got error with no sender / receiver information in WE05.
    Please advise any step that i have to do ?
    Best Regards
    Fernand

    Hi Matias,
    Thank you for your answer. The problem is because i had used wrong logical system in my distribusion model. The system using not common logical system. nomarly it will use "PX6CLNT100" but in my system the basis people using different logical system that's why the GLMAST IDOC cannot pass throught to XI system.
    Best Regards
    Fernand

  • ALE change pointer

    Hi all ,
    Can anyone suggest any link where i get step by step / complete procedure to create change documnet and change pointer to trigger IDOC for changed master data?
    thanks & regards
    Sheetal

    Hi,
    Please go through SAP Technical sites for details. You can check this [Link Also.|http://wiki.sdn.sap.com/wiki/display/ABAP/ALEChangePointers]
    [Check This also|http://articles.techrepublic.com.com/5100-10878_11-1048973.html]
    thanks,
    Abhijit
    Edited by: Abhijit Mandal on Feb 15, 2010 6:54 PM

  • Reg : change pointer mechanism for triggering the IDOC for delivery note

    Hi ,
    I am working on a change pointer mechanism for triggering the IDOC for delivery note and will be using this message class DESADV.
    So SAP has suggested for assigning the message class DESADV with the function module in MASTERIDOC_CREATE_SMD_DESADV in BD60 transaction code.
    So I was looking to create this MASTERIDOC_CREATE_SMD_DESADV function module in SAP and SAP suggesting that  we should create this MASTERIDOC_CREATE_SMD_DESADV function module as same as the function module MASTERIDOC_CREATE_SMD_MATMAS.
    So do anyone knows that is there any tool has been provided by SAP for creating this function module MASTERIDOC_CREATE_SMD_DESADV in SAP system for triggering the change pointer mechanism for outbound Delivery.
    Thanks !
    Regards,
    Kiran

    Hi,
    When you are change pointer the system itself will take care of sending the changed master data to your partner system and the user will not have any intervention.  If you really wanted to have that then you need to use the change pointers to read the master data which is modified in a custom program and then display that on the screen.  Once the user selects that master data records then trigger an IDOC for creating the idoc for that master data and also flag that master data record as processed in the SAP BDCPS standard table, so that the same record will not be picked. If you wanted to know how the change pointers piece of code is written go through the program RBDMIDOC and you can understand how the change pointers logic is written.
    Thanks,
    Mahesh.

  • Transaction  for using change pointer technique in ALE -IDOCS

    Hi,
    please let me know the following points.
    1: while using change pointer technique , any change in the sale order(any field ) will trigger IDOC or only specific field change. Or do we have to specify field on which we want to trigger IDOC?
    2:When IDOC gets genrated from change pointer , does it contain complete sales order or only change fields?
    3:Do we have Native format of IDOC in 4.6c ?? XML format??
    Please reply soon.

    Hi,
    For the changes to be carried over by change pointers, the steps followed are,
    If it's gonna be the vendor master for which change pointers needs to be activated,
    - goto SALE transaction ->Modelling and Implementing business processes ->Replication of Modified data -> Activate Change pointers - generally / for message types.... or as said in the earlier post, alternatively BD61/BD50.
    - Schedule a background job for program RBDMDIOC providing the message type(CREMAS) for which the change pointers needs to be processed.
    - Now for any changes made to the vendor via transaction XK02, automatically CREMAS IDocs would get generated with the IDoc carrying the changed fields in it. You would also be able to find the number master and communication IDocs generated from the joblog of the scheduled RBDMIDOC background job.
    ~ Bineah.

  • Change pointer for Sales Order

    Hi,
    Using change pointers I want to create an IDOC when ever a specific field in the sales order line item is changed. I have activated the change pointer for message type ORDRSP. Also maintained the following entries in BD52
    VERKBELEG(Object) VBAP(Table) ABGRU(field).
    After this when I change this field at the sales order line item, it inserts entries into change pointer table.
    But my problem is creating IDOC's from those change pointer entries. I am not sure which function module (MASTERIDOC_CREATE_XXXXX) works for this.
    Anyhelp on this highly appreciated.
    Thanks
    Ram

    Hi Ram,
    I don't think so you can use change pointer for sales order changes. Usually, it is done through transaction code<b> NACE</b> - configuring condition for output type.
    You can setup requeirement in procedure control to trigger IDoc ORDRSP for any changes in item level.
    Hope this will help you and give an idea.
    Regards,
    Ferry Lianto

  • Material Master Change Pointer IDOCs not generated for Moving Avg Price GR

    No IDOC is created or distributed when the moving average price
    changes. Each time a Goods Receipt is performed, the material master
    moving average price (MBEW-VERPR) changes but the change is not
    distributed. No change pointer is created in the tables. Why?
    We need to send the moving average price each time it changes. In our
    case, each time a Inbound Delivery has been Post Goods Receipt this
    value changes for that material + plant combination and the value
    should be sent.
    The field MBEW-VERPR is included in BD52 as a field relevant for change
    pointers for the message type.
    Please advise.

    Hello,
      SAP will not generate change pointers (and no IDOCs) for Moving Average Price (MAP) changes. This is because MAP updates are not really Master Data changes and they are driven by transactions such as Goods Receipts, Revaluations etc. For these transactions, SAP will generate respective accouting documents for traceability.
    Thanks,
    Venu

  • Change pointer in IDOC message-type ARTMAS, for field MARA-LVORM

    Hi,
    When changing the description of a material in MM02 I am able to sent an idoc using BD21. As this relevant for a change pointer. But when field MARA-LVORM (deletion flag at client level) is chosen, I can not sent an idoc with bd21. How can I make this happen?
    thanks.

    Hi,
    Sorry I interpreted your question in wrong way. Solution I gave was for following requirement.
    Every time a material is created or changed a change pointer is created, which serves as a signal for generating IDocs to dependent systems. However, change of material type creates a change pointer that doesn't trigger an IDoc.The purpose is to create the change pointers and send the idocs. Eg. Material type field. As per your reply above I guess change pointer created for LVORM is enough to send the idocs.
    KR Jaideep,

Maybe you are looking for

  • Cant write/edit data on my external hard disk! Help please!~~

    Okay guys, currently, i'm using Tiger version 10.4.11. My problem is that i cant edit data or write data to any external hard disks, like the maxtor One Touch and so on. Only thing i can do is to extract the data from the disks. I have tried to write

  • How to eject DVD in single user mode

    Hi All, When starting my iMac, I get a white screen, the apple logo and the spinning wheel. After a while it goes away and I have just a white screen. I've reset PRAM, to no avail (it did do something, the computer start up sound now occurs each rest

  • Server failed to run - Reason:Server is not in the majority cluster partition

    Hi, my environment is Weblogic 12.1.2. The deployment configuration is: cluster, 2 machines, 2 managed servers, 1 data source, and JMS (with uniform distributed queue). When I'm starting the admin server + managed server on the first machine (using t

  • Data Conversion In SAP XI

    I need convert some data from one metric system to another when mapping, how to implement it in XI easily? do I need to implement java code or just design at integration repository? Message was edited by: Spring Tang

  • Mediatomb GUI not displaying in Midori

    As in the title, when opening the Mediatomb web-based GUI in Midori, I can see just the background, top banner image and frames, but no text at all. It's the first time a website is not displaying properly, although I've only been using Midori for a