on 04-20-2011 2:48 PM
Hi,
How to create new entry in SWED
How to create new business object possibly required to create new change document object
This is needed to have event triggered if anyone changes bank details of vendor . So like we have BO for LFA1, LFB1 and LFM1, a BO is requried for LFBK.
thank you for any inputs
B
put * in old and new values column in field restriction list for KRED in SWEC without going to the condition editor, on the first screen itself.
This didnt prove complete helpful but it did trigger event on change of bank data of vendor.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
first check if any event at all is triggered for any of the mentioned tables.
If so, just use one of those events and use swb_cond or at worst a check function module to trigger the correct workflow.
If that one doesnt exist check if theres a different way to trigger the event, you already mentioned that there ar no change documents for this scenario.
for instance status management BSVW can also be used to create events.
If this is also not possible then you probably have to use a badi or exit to trigger the events yourself with the SAP_WAPI_CREATE_EVENT function module
Kind regards, Rob Dielemans
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
For this porpose you need to first check in transaction SCDO whether a change document object present or not.
If present then check table LFA1, LFB1, LFM1 and LFBK are maintained there or no. if not then add the tables there.
If no chagne object present then you need to create a new chagne object and add the above tables there.
After that maintain an entry in SWEC.
Note : You can use custom or standard event here.
so please create you custom event in a BO and use it in SWEC.
Thanks and regards,
SNJY
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Thank you very much
I found entry KRED_N for LFBK table
so I also made entry in SWED :
change do cobject KRED_N
leading table in change document LFBK
change document key with structure LFBK
Checked oncreate, onchange , ondelete
next I made entry in SWEC
when i use ZLFA1 (subtype of LFA1) it says key feild mismatch
then i created new BO ZLFBK and gave LFBK key fields, and one event and made entry in SWEC :
change doc obj - KRED
object type LFBK
event zcreated
My intention is that when LFBK data for vendor is changed/created/deleted, I need to trigger an event
but above config doesnt trigger any event.
kindly help
thank you
Hi B,
Once the change document object is created, you have to call the generated code in the user exit/badi.
Please check the below link.
Thanks,
Viji.
Hello Viji,
I am extremely thank ful for the document.
Kindly help me with below points of possible
1) if it is standard table (LFBK) , even then shall we will need to do the generate program
step in SCDO ?
2) does it generate Z-function module ?
3) do we need to call this function module at appropriate places to update the CDPOS and CDHDR
for changes in the standard table ?
4) I have already created custom business object for LFBK so that Iu2019ll be able to create entry
in SWEC (fyi)
5) how and when are the method used in the table maintenance generator called ?
6) Page 14 point 3 says that "Add a new entry to link the Change Document Object ZPRPS_CD and
table ZPRPS so that changes are recorded when table entries change."
Does this mean that once we create SCDO and generate program, these two steps are enough
for the SWED entry to create change log in CDPOS and CDHDR ?
7) It is understood that it is necessary that the change object in SWEC should be logged in
CDPOS and CDHDR only then the event would be created for the SWEC entry. is this correct ?
in order to create change log for the change object in CDHDR and CDPOS, is the SCDO entry
and generate program steps enough or the methods of table maintenance generator are also
required ?
thank you very much for your time
B
Hi,
Once the changes has been made in the bank data, Check that Table and field value in CDHDR and CDPOS tables.
If the old and new values recorded by the change documents tables, then no need to create the new change document object.
But if the field changes not updated in the CDHDR and CDPOS, you have to create the change document and you need to update those tables.
Also check the event trace using SWEL and check any events triggered when you do the Bank data changes. If no events triggered, then you have to go for the custom change document object as described in the document.
Also before creating change document object, try the status management using BSVW - customer settings. For some of database changes this will trigger the event.
Once you created the change document you have to use the generated program n the user exit. Once your changes has been updated the CDHDR tables, your event - maintained in the SWEC will trigger.
Thanks,
Viji.
Hi,
The tables CDHDR and CDPOS are indeed getting updated when anything is changed in bank data in the vendor. ie whenver data changes in LFBK table. The change object seen in CDHDR and CDPOS is KRED
These records dont have old value and new value bcoz changing BANKN, BANKL and BANKS is like inserting new record itself
So I understand that I do not need custom change document and I can use KRED oncreate mode as I already have the CDHDR and CDPOS tables updated.
There is no event in the SWEL for bank data changes. if it was then it was end of work for me. tats wat is basic requiremnt forme.
I am not able to use BSVW. as I dont find anything relevant to vendor or KRED or LFBK over there.
My SWEC event does not trigger. even though the changes are seen in CDHDR and CDPOS tables.
I have tried following
KRED on create field restriction LFBK-BANKN, BANKL, BANKS exist
KRED on change fld restriction LFBK-BANKN, BANKL, BANKS exist
kindly help me how can I make the CDHDR and CDPOS entries already seen for LFBK enable event creation in SWEC ?
ps. i cant use badi as its liltle restrictions here. so i am struggling for the SWEC solution.
thank you
B
Hi,
When i follow the steps given in the document above,
where should I call the generated fucntion module to update CDHDR, CDPOS with my new change document ?
the document talks about custom table , but mine is LFBK which is std table so how can i use the function module ?
kindly help
thank you
b
Hello !
Your scenario is to raise the event provided if any changes the bank details of a vendor.
For this scenario , I don't think so change document needs to be created.I request you to by the suggestion of Mr.Rob Dielemans.
Change document is a log where the details about the changes incorporated in objects are stored in terms of what was changed, who changed, etc.
Regards,
S.Suresh
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.