cancel
Showing results for 
Search instead for 
Did you mean: 

start condition

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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

pokrakam
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Thanks alot this could realy be the problem.

Now i have the problem change document for BANF doesn't work on create only on change thats why i used the userexit.

What kann i do?

Thanks

pokrakam
Active Contributor
0 Kudos

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