‎2007 Jun 13 9:08 PM
Hello all,
I have to download a file containing WO#, WO type, status and Tech ID # into an XML file when a Work Order (WO) is created using IW31 tcode. I looked for User exits and tried using IWO10009 and IWO10012, but found that work order number is not assigned by the time it reaches these exits.
During this reseach I found that there is a concept called change pointers. I have no idea how to use them I was wondering if it fits my requirement and needs any coding and if yes can anyone help me code that?
please let me know.
Note: I read a couple of threads in the forums and got a basic idea what change pointers are but I need help in using them.
Thanks in advance for your help
‎2007 Jun 13 9:17 PM
Hello Venky,
Welcome to SDN.
Whenever a WO is created or changed a change document or a change pointer is created with insert/update indicator. I believe the object class is ORDER (but I am not sure...please investigate) for WO. Since you need to download the newly created ones, you need to develop a report which reads all these change pointers and you will get the order number from the change pointer table (field I think it is OBJECTID/CDOBJID).
The tables for change documents is CDHDR and CDPOS
Change pointers BDCP and BDCPV
Hope it helps.
Rgds,
Naren
‎2007 Jun 13 9:27 PM
‎2007 Jun 13 9:30 PM
Hi,
Yes, after the Work Order gets created then only you will get the Order number. In order to download the information to a file, then you can write a simple report program which will download all Work Orders into a local file. for this you have to write a Select statement on AUFK table by passing your Username i.e, sy-uname, Creation Date etc, Order type etc to the Where clause. you will get all Orders created for the selection criteria you used.
thanks,
sksingh
‎2007 Jun 13 9:41 PM
thanks Naren, Ars and srinivas for the replies.
Srinivas,
the client doesnot want to run any program or schedule it for the file download. All they want is, when a work order is created a file needs to be downloaded automatically. This is the reason I looked for user exits initially.
Can anyone provide me a sample code for change pointers? I mean how to find a change pointer and use it in coding.
Thanks again..
‎2007 Jun 13 9:47 PM
At tis point I owuld suggest you to kepp a break point in the exit and create a WO. The WO data should be in <b>CAUFV</b> structure. I guess you can write the code in the exit and download the file.
I am ot sure of which exit would work good.
Hope it helps.
Shreekant
‎2007 Jun 13 9:52 PM
shreekanth,
I debugged most of the code and searched for user exits while creating an order...I saw that there are user exits before the WO number s created.
Thanks,
~V
‎2007 Jun 13 9:59 PM
Here are couple
<b>CHANGE_POINTERS_READ
CHANGE_POINTERS_CREATE</b>
‎2007 Jun 13 9:59 PM
Please try to do this.
Before you save activate debugger. /h and then hit save.
Once you enter the debug mode please look for structure CAUFV. Initially it will be blank but at a later stage it will be populated with data. Check the program where the data is populated.
Shreekant
‎2007 Jun 13 10:17 PM
‎2007 Jun 13 10:17 PM
naren..thanks for providing the function modules. Can you please help me how to use them? it is asking for the message type..can you please provide me with a schema?
‎2007 Jun 13 10:19 PM
Shreekanth I checked that user exit but when I put a break point where this call customer was called..it doesnot stop there..I wrote the code inside this user exit and activated it too...
‎2007 Jun 14 4:47 AM
can anyone pls help me with this requirement? I need guidance in using change pointers..how to go about using it..
thanks much!