on 06-11-2007 10:26 AM
Hello,
i have a subtype of BUS2105. There i implemented a attribut documenttype (BSART) now i try to use a start condition based on this attribute. It doesn't work.
The start condition is documenttype = ZXXX
The event trace alway says "Operator 'EQ': The value of the left operand cannot be determined"
If i raise the event bei "swue" it works but if i use standard transaction me51n it doesn't work.
TO raise the event i used a userexit:
DATA: objkey TYPE SWEINSTCOU-OBJKEY,
empty_container TYPE STANDARD TABLE OF swcont.
objkey = im_banfn_new.
CALL FUNCTION 'SWE_EVENT_CREATE'
EXPORTING: objtype = 'YBUS2105'
objkey = objkey
event = 'CREATED'
TABLES: event_container = empty_container
EXCEPTIONS: objtype_not_found = 01.
Can someone explain the problem to me?
Thanks
hai
creat an method container in the mehod ur using and make sure the container having the propertys as document type (bsart) according to ur requirments.
now try to make the start conditions it will surly come .
hope ur problem solved
reward me with ur valuable ponts
regards
rose
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Userexits aren't necessarily the best way to raise an event. Most likely the data isn't written to the database yet. An event receiver is always executed in a different session by the workflow system, so if you are raising one in an exit that is called before the data is committed then your event receiver won't see all the document data.
Try using change documents (which guarantee the data is physically written to the database) or a different exit.
Also, you should always use the SAP_WAPI* function modules if possible as these are released for customer use - SAP_WAPI_CREATE_EVENT in your case.
Hope that helps,
Mike
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Manuel,
Any particular reason you can't use the standard events? I might be stating the obvious but if you deelegate your subtype you can check your new attribute in a BUS2105.RELEASESTEPCREATED event.
Alternatively have a look at other BAdIs - I know some of them are designed to work in the update task (the bit that does the physical DB write). Depending on the userexit, you could also try changing your FM call to :
CALL FUCTION ... IN UPDATE TASK.
Cheers,
Mike
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
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.