‎2010 Sep 23 1:56 PM
Hi,
The background is that we are having a z idoc(basic) type and we need a change pointer kind of thing for it where every night we can send idocs only having the changes.
Now the issue is the standard transaction WAK2(sap-retail) does not have any badi or user exit that gets called on save so i dont have any place holder where i can use FM CHANGE_POINTERS_CREATE_DIRECT to create entry in BDCP2 table. So what should i do so that i can send the idocs with changes.
Instead of BD21 which send changes as idoc for my case where i am not able to create change pointes, is it a good solution to have a stand alone program which will read change documents (cdhdr and cdpos) and create idocs from it.
‎2010 Sep 23 2:14 PM
If we are having the change doucment you can directly maintain BD52 entries and it should automatically write change pointers for you.
check [this|http://help.sap.com/saphelp_nw04/helpdata/en/78/2178da51ce11d189570000e829fbbd/content.htm] out, let me know if this helps.
‎2010 Sep 23 2:14 PM
If we are having the change doucment you can directly maintain BD52 entries and it should automatically write change pointers for you.
check [this|http://help.sap.com/saphelp_nw04/helpdata/en/78/2178da51ce11d189570000e829fbbd/content.htm] out, let me know if this helps.
‎2010 Sep 23 3:10 PM
Hi Shital,
Thanks for the quick and correct reply, now i can see entry in bdcp2 table there are no entries in bdcp or bdcps tables, if i have no entries in these tables how will i create idocs based on the changes.
‎2010 Sep 23 3:26 PM
BDCP/BSCPS is the older way of SAP maintaining the changepointers which is replaced by SAP with BDCP2. However we have control as to which tables to use with view V_TBDA2X.
‎2010 Sep 23 3:33 PM
Okay so now once i have entries in bdcp2 what are the steps that i need to carry out in order to generate idocs .
In bd60 i will have to create an entry for my zmessagetype and in the z function module
I will have to code in the following way as mentioned the the help link you gave, but when i use CHANGE_POINTERS_READ and provide object class and messagetype to it , nothing is returned.
1. Read all the change pointers that have not yet been processed for your message type using the function module CHANGE_POINTERS_READ.
2. Create an IDoc for every modified master data object. In the IDoc, only fill the segments that, according to the change pointers, were changed. In every segment, fill the first field MSGFN as follows:
009, if the segment was added
004, if segment fields were changed
003, if the segment was deleted
018, if segment fields were not changed, but the segment must be included in the IDoc, because hierarchically subordinate segments in the IDoc have to be dispatched.
3. Pass the IDoc to the ALE layer by calling function module MASTER_IDOC_DISTRIBUTE.
4. For the master data object that has just been processed, set the change pointers to u2018Finishedu2019. This is done by calling function module CHANGE_POINTERS_STATUS_WRITE.
5. Execute the COMMIT WORK command and call the DEQUEUE_ALL function module. For performance reasons, do not perform this step after every IDoc. Wait until you have created, for example, 50 IDocs.
‎2010 Sep 23 3:42 PM
Check if you have entries in BDCP2 with PROCESS indicator as SPACE in BDCP2, except that I dont see any reason why you dont get the change pointer after you read from BDCP2.
‎2010 Sep 23 4:06 PM
I have supplied the messagetype and object class the changepointer is unprocessed, still the fm is not returning anything, i had one more query suppose i changed any feild value from A to B then the value B will be in bdcp2 or we need to retrive it via document number of bdcp2 where in we take the document number and go to cdhdr and then cdpos to see what was the value that was changed,
‎2010 Sep 23 4:13 PM
BDCP2 would always have the latest values, no need to fetch it from CDPOS/CDHDR. Also I have no Idea why READ FM is not working for you, may be you can provide more details so I can help.
‎2010 Sep 23 4:31 PM
If you see below then cdpos has new value as 99 , but i cant see that in bdcp2.
CDPOS
Client 500
Change doc. object W_PROMO
Object value 0000100128
Document number 1471941
Table Name WAKP
Table Key 5000000100128000000000000001365EA
Field Name PABBM
Change ID U
Text flag 1
Unit (UNIT OLD) EA
Unit (UNIT NEW) EA
CUKY (CUKY OLD)
CUKY (CUKY NEW)
New value 99.000
Old value 1.000
BDCP2
Client 500
Message Type -ZTEST
Change pointer 611684
Process. indic.
Table Name WAKP
Table Keys 5000000100128000000000000001365EA
Field Name PABBM
Creation time 20100923162618
Activation time 20100923162618
Name xxxx
Change doc. object W_PROMO
Object value 0000100128
Document number 1471941
Change ID U
Edited by: RAHULBSP on Sep 23, 2010 5:32 PM
‎2010 Sep 23 4:47 PM
have you actiated pointers through transaction BD61, and view V_TBD62. Please read the link carefully and you be able to find the answers.
also you would be able to finds entries in BDCP2 only for the fields which are maintained in BD52.
Edited by: shital phadake on Sep 23, 2010 9:19 PM
‎2010 Sep 24 9:39 AM
Hi shital,
i got your hint i have maintained the key feilds for all table of the object in TBD62, still i am not able to see the values. for testing i am changing only PABBM , but in bdcp2 i am not able to see the changed value, i would have expected that an entry with feild key would have been there in bdcp2 but its not there
W_PROMO WAGU KEY
W_PROMO WAKC KEY
W_PROMO WAKH KEY
W_PROMO WAKP KEY
W_PROMO WAKP PABBM
W_PROMO WAKR KEY
W_PROMO WAKT KEY
W_PROMO WALE KEY
W_PROMO WAZB KEY
W_PROMO WAZT KEY
W_PROMO WAZW KEY
Client 500
Message Type ZECOM_PROMSET
Change pointer 611689
Process. indic.
Table Name WAKP
Table Keys 5000000100128000000000000001365EA
Field Name PABBM
Creation time 20100924093331
Activation time 20100924093331
Change doc. object W_PROMO
Object value 0000100128
Document number 1471947
Change ID U
‎2010 Sep 24 1:48 PM
Hi Shital,
I have even added all key fields of the respective table in bd52 but still i can see the value of the changed feild
‎2010 Sep 25 7:40 AM
‎2011 Oct 10 8:19 PM
Hi ,
I am facing the same issue. However in my case entries are getting created in CDHDR and CHPOS Table. I have checked BDCP2OK checkbox in BD60, Have maintained the feilds in BD52, have Activated the pointers in BD50 and BD61, still i am unable to see the Entries in BDCP2 Table for my message type . Please Help.
‎2011 Oct 10 11:34 PM
Resolved.
Solution :- The Table TBDA2 was not getting updated in test Client. I did an SCC1 to copy the Customizing task and the entries were created in BDCP2 Table.
‎2015 Dec 22 11:25 AM
Hey
I have a requirement to send an idoc for sales order change using change pointers and not via NACE thing.
As you said , if we have entries in cdhdr and cdpos , making entry in bd52 will suffice and entry in bdcp would be done automatically.
can you elaborate on this....as I have entry in cdhdr and cdpos for order change which is obvious but despite of setting transaction bd52 , bdcp is not getting updated..
any help would be highly appreciated...