Event scriptions created on standard business events not firing

We have created a subscription and written custom code in the standard business event oracle.apps.eam.workorder.created . It should fire after a work order is created, but somehow our code is not getting executed. Tried with phase <100 and >=100
Is there anything else that we need to do?
Appreciate your help.
Its in R12.
Thanks
Balaji

For future reference, you have to set the Enable Workflow for Workorders flag in the EAM Parameters form in order to get the seeded business events to fire. If you only want to use the business events and not the workflow, then you could modify the workflow to bypass the approval.
Edited by: 986824 on Feb 7, 2013 9:26 AM

Similar Messages

  • Standard Business Event issue in SOA.

    Hi,
    I created a subscription in SOA for the standard business event (*oracle.apps.jtf.cac.task.updateTask*) using Oracle Apps Adapter. When the event is fired in the Oracle EBusiness Suite, I am expecting SOA to capture the payload and create an instance. The instances are not created.
    This is the workaround I did to check if the events are firing or not.
    1. Whenever a standard business event is fired, we can see a record in WF_DEFERRED queue. In this case too, I am able to see the record.
    2. From WF_DEFERRED, the data should flow into WF_BPEL_Q. I am unable to see a record in this table in my case.
    Which mean the events are firing but SOA is unable to capture the events. I tried to raise a JAVA event in the Oracle EBusiness Suite's workflow manager and SOA was able to capture the payload and an instance was created in weblogic EM. But when I update the task in the Oracle EBS, SOA is not able to capture the payload.
    Any inputs to fix this issue is greatly appreciated. Please help.
    Thanks,
    Venkat Sai.

    Hi;
    For your issue i suggest close your thread here as changing thread status to answered and move it to Oracle Discussion Forums » SOA & Process Management » SOA Suite which you can get more quick response
    Regard
    Helios

  • APPS Adapter (ESB) error while reading standard business event

    Hi,
    I tested the sample services on TEST (myhost:7780) to consume the standard business event (oracle.apps.ar.hz.PartySite.create). Following exceptions are logged in j2ee log files (Section-1). The business event message is also rejected (see section-2).
    Does anyone in this forum ever faced this issue OR any idea to address this issue more correctly.
    If you want I can provide the sample service deatail in email.
    J2ee Logs (Section-1)
    <MESSAGE>
    <HEADER>
    <TSTZ_ORIGINATING>2007-09-28T19:15:08.676-04:00</TSTZ_ORIGINATING>
    <COMPONENT_ID>tip</COMPONENT_ID>
    <MSG_TYPE TYPE="WARNING"></MSG_TYPE>
    <MSG_LEVEL>1</MSG_LEVEL>
    <HOST_ID>myhost</HOST_ID>
    <HOST_NWADDR>212.112.194.34</HOST_NWADDR>
    <MODULE_ID>esb.server.service.impl.inadapter</MODULE_ID>
    <THREAD_ID>80</THREAD_ID>
    <USER_ID>oracle</USER_ID>
    </HEADER>
    <CORRELATION_DATA>
    <EXEC_CONTEXT_ID><UNIQUE_ID>212.112.194.34:69270:1191017705321:68</UNIQUE_ID><SEQ>7043</SEQ></EXEC_CONTEXT_ID>
    </CORRELATION_DATA>
    <PAYLOAD>
    <MSG_TEXT>Caught PCRetriableResourceException, reject/retry the message</MSG_TEXT>
    <SUPPL_DETAIL><![CDATA[ORABPEL-12600
    Generic error.
    java.lang.NullPointerException
    at oracle.tip.esb.server.service.impl.inadapter.ESBListenerImpl.processMessage(ESBListenerImpl.java:368)
    at oracle.tip.esb.server.service.impl.inadapter.ESBListenerImpl.onMessage(ESBListenerImpl.java:295)
    at oracle.tip.adapter.fw.jca.messageinflow.MessageEndpointImpl.onMessage(MessageEndpointImpl.java:293)
    at oracle.tip.adapter.apps.AppsMessageEndpointImpl.onMessage(AppsMessageEndpointImpl.java:89)
    at oracle.tip.adapter.aq.inbound.AQActivationSpecDequeuer.doRaise(AQActivationSpecDequeuer.java:375)
    at oracle.tip.adapter.aq.inbound.AQActivationSpecDequeuer.raiseInboundInteraction(AQActivationSpecDequeuer.java:314)
    at oracle.tip.adapter.aq.inbound.AQActivationSpecDequeuer.raise(AQActivationSpecDequeuer.java:246)
    at oracle.tip.adapter.aq.inbound.AQActivationSpecDequeuer.run(AQActivationSpecDequeuer.java:225)
    at oracle.j2ee.connector.work.WorkWrapper.runTargetWork(WorkWrapper.java:242)
    at oracle.j2ee.connector.work.WorkWrapper.doWork(WorkWrapper.java:215)
    at oracle.j2ee.connector.work.WorkWrapper.run(WorkWrapper.java:190)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:819)
    at java.lang.Thread.run(Thread.java:595)
    Please create a Service Request with Oracle Support.
    at oracle.tip.esb.server.service.impl.inadapter.ESBListenerImpl.processMessage(ESBListenerImpl.java:388)
    at oracle.tip.esb.server.service.impl.inadapter.ESBListenerImpl.onMessage(ESBListenerImpl.java:295)
    at oracle.tip.adapter.fw.jca.messageinflow.MessageEndpointImpl.onMessage(MessageEndpointImpl.java:293)
    at oracle.tip.adapter.apps.AppsMessageEndpointImpl.onMessage(AppsMessageEndpointImpl.java:89)
    at oracle.tip.adapter.aq.inbound.AQActivationSpecDequeuer.doRaise(AQActivationSpecDequeuer.java:375)
    at oracle.tip.adapter.aq.inbound.AQActivationSpecDequeuer.raiseInboundInteraction(AQActivationSpecDequeuer.java:314)
    at oracle.tip.adapter.aq.inbound.AQActivationSpecDequeuer.raise(AQActivationSpecDequeuer.java:246)
    at oracle.tip.adapter.aq.inbound.AQActivationSpecDequeuer.run(AQActivationSpecDequeuer.java:225)
    at oracle.j2ee.connector.work.WorkWrapper.runTargetWork(WorkWrapper.java:242)
    at oracle.j2ee.connector.work.WorkWrapper.doWork(WorkWrapper.java:215)
    at oracle.j2ee.connector.work.WorkWrapper.run(WorkWrapper.java:190)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:819)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: java.lang.NullPointerException
    at oracle.tip.esb.server.service.impl.inadapter.ESBListenerImpl.processMessage(ESBListenerImpl.java:368)
    ... 12 more
    ]]></SUPPL_DETAIL>
    </PAYLOAD>
    </MESSAGE>
    <MESSAGE>
    <HEADER>
    <TSTZ_ORIGINATING>2007-09-28T19:15:08.677-04:00</TSTZ_ORIGINATING>
    <COMPONENT_ID>tip</COMPONENT_ID>
    <MSG_TYPE TYPE="ERROR"></MSG_TYPE>
    <MSG_LEVEL>1</MSG_LEVEL>
    <HOST_ID>myhost</HOST_ID>
    <HOST_NWADDR>212.112.194.34</HOST_NWADDR>
    <MODULE_ID>esb.server.service.impl.inadapter</MODULE_ID>
    <THREAD_ID>80</THREAD_ID>
    <USER_ID>oracle</USER_ID>
    </HEADER>
    <CORRELATION_DATA>
    <EXEC_CONTEXT_ID><UNIQUE_ID>212.112.194.34:69270:1191017705321:68</UNIQUE_ID><SEQ>7043</SEQ></EXEC_CONTEXT_ID>
    </CORRELATION_DATA>
    <PAYLOAD>
    <MSG_TEXT>Exception in onMessage. Rejecting the message now</MSG_TEXT>
    <SUPPL_DETAIL><![CDATA[java.lang.NullPointerException
    at oracle.tip.esb.server.service.impl.inadapter.ESBListenerImpl.recordException(ESBListenerImpl.java:324)
    at oracle.tip.esb.server.service.impl.inadapter.ESBListenerImpl.onMessage(ESBListenerImpl.java:299)
    at oracle.tip.adapter.fw.jca.messageinflow.MessageEndpointImpl.onMessage(MessageEndpointImpl.java:293)
    at oracle.tip.adapter.apps.AppsMessageEndpointImpl.onMessage(AppsMessageEndpointImpl.java:89)
    at oracle.tip.adapter.aq.inbound.AQActivationSpecDequeuer.doRaise(AQActivationSpecDequeuer.java:375)
    at oracle.tip.adapter.aq.inbound.AQActivationSpecDequeuer.raiseInboundInteraction(AQActivationSpecDequeuer.java:314)
    at oracle.tip.adapter.aq.inbound.AQActivationSpecDequeuer.raise(AQActivationSpecDequeuer.java:246)
    at oracle.tip.adapter.aq.inbound.AQActivationSpecDequeuer.run(AQActivationSpecDequeuer.java:225)
    at oracle.j2ee.connector.work.WorkWrapper.runTargetWork(WorkWrapper.java:242)
    at oracle.j2ee.connector.work.WorkWrapper.doWork(WorkWrapper.java:215)
    at oracle.j2ee.connector.work.WorkWrapper.run(WorkWrapper.java:190)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:819)
    at java.lang.Thread.run(Thread.java:595)
    ]]></SUPPL_DETAIL>
    </PAYLOAD>
    </MESSAGE>
    Reject Message Section-2
    <WF_EVENT_T xmlns="http://xmlns.oracle.com/xdb/APPS">
    <PRIORITY xmlns="">50</PRIORITY>
    <SEND_DATE xmlns="">2007-09-28T19:13:22.000-04:00</SEND_DATE>
    <RECEIVE_DATE xmlns="">2007-09-28T19:15:08.000-04:00</RECEIVE_DATE>
    <CORRELATION_ID xmlns=""></CORRELATION_ID>
    <PARAMETER_LIST xmlns="">
    <PARAMETER_LIST_ITEM>
    <NAME>USER_ID</NAME>
    <VALUE>1395</VALUE>
    </PARAMETER_LIST_ITEM>
    <PARAMETER_LIST_ITEM>
    <NAME>RESP_ID</NAME>
    <VALUE>50360</VALUE>
    </PARAMETER_LIST_ITEM>
    <PARAMETER_LIST_ITEM>
    <NAME>RESP_APPL_ID</NAME>
    <VALUE>660</VALUE>
    </PARAMETER_LIST_ITEM>
    <PARAMETER_LIST_ITEM>
    <NAME>SECURITY_GROUP_ID</NAME>
    <VALUE>0</VALUE>
    </PARAMETER_LIST_ITEM>
    <PARAMETER_LIST_ITEM>
    <NAME>ORG_ID</NAME>
    <VALUE>103</VALUE>
    </PARAMETER_LIST_ITEM>
    <PARAMETER_LIST_ITEM>
    <NAME>PARTY_SITE_ID</NAME>
    <VALUE>217048</VALUE>
    </PARAMETER_LIST_ITEM>
    </PARAMETER_LIST>
    <EVENT_NAME xmlns="">oracle.apps.ar.hz.PartySite.create</EVENT_NAME>
    <EVENT_KEY xmlns="">oracle.apps.ar.hz.PartySite.create112538</EVENT_KEY>
    <EVENT_DATA xmlns=""></EVENT_DATA>
    <FROM_AGENT xmlns="">
    <NAME>WF_BPEL_QAGENT</NAME>
    <SYSTEM>ECSTST2.ARROW.COM</SYSTEM>
    </FROM_AGENT>
    <TO_AGENT xmlns=""/>
    <ERROR_SUBSCRIPTION xmlns="">okUY5xyheOjgMCOCKYkzaQ==</ERROR_SUBSCRIPTION>
    <ERROR_MESSAGE xmlns=""></ERROR_MESSAGE>
    <ERROR_STACK xmlns=""></ERROR_STACK>
    </WF_EVENT_T>
    Thanks in Advance.
    --KB                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hi
    I've recently had issues with the Apps Adapter for event listening when i upgraded to 10.1.3.3
    There have been problems with the way the namespace is derived. I applied patch 6267726 and now it works great!
    When I create a new listener for an event, a new xsd is created, specific to the name of the adapter process in EBS and henceforth the payload has that specific namespace attached. For example:
    http://xmlns.oracle.com/xdb/APPS/ListenForOrganizationCreate
    Events then get raised that reflect that namespace. XSL transformations then need to reflect that namespace in your routing rules.
    It may be that the XSLT mappings are expecting a different namespace than you are receiving..
    Give the patch a try if you are on 10.1.3.3 and then try and rebuild a process from scratch to see if it works.
    Chris

  • How do we pass the Business Event Data in the EBS business Events subscription Testing?

    HI,
    How do we pass the Business Event Data in the EBS business Events subscription Testing?
    --Khaleel

    Hi,
    Just to add what Dianne has said, whenever you are carrying out any configuration/ customising, you have to test all the related scenarios. For this you have to take help of the End Users who are in a better position to carry out this testing. If the affecting modules like FI, MM, SD, are many, then you also have to see how the cross-module enties are flowing.
    Regards,
    amit

  • Training & Event Management: Restrict Change to Business Event

    Hi,
    Does anyone know if there is a way to restrict change to Business Event (eg. changes to the Event Schedule) based on certain business criteria? My criteria cannot restrict by authorization.
    For eg. let say if something happens (based on business scenario), then my program will restrict the users to change details in Business Event, but they can still book Personnels to the event- so that means I can't use the LOCK/UNLOCK function.
    Thank you for your help.
    Regards,

    Dear,
    Oh! Sorry I did not noticed your initial post date, any how at least we can share knowledge.
    Regarding your concern about the FM, we have created function module ZHR_TRAINING_AUTH and table ZHR_TRAINING_AUTH to restrict authorization related to respective department secretaries and business event group.
    Then in Customization to create and configure the profile: go to Human Resources > Personal Management > Personal Development > Settings > Current Settings > Define Authorization Profile
    Then later on you can “Assign” this newly created profile to the users, then you are able to restrict.
    I hope this small information will help,
    Good luck

  • Standard business content not extarcting all data

    Hello,
    I am currently rolling out QN data.  The standard business content for 2lis_05Q0task includes FECOD FEGRP & OTEIL (from table QMFE) fields however the data is not being pulled. All the other data is coming in ok.  Is there something I need to do to get this data?
    Thanks For your help
    Mireille

    Hi,
      Pls Check in QMFE table if the data is present for these fields.
       Take the notification no from the RSA3 extraction and
    look for it in the QMFE table.
    Rgds,
    Ravindra.

  • My iPhone 4 calendar won't sync to iCloud. If I make a new event on my iCal on my MBP it will sync to iCloud and to my iPhone, but any new events I create on my iPhone will not sync to iCloud. Any potential solutions?

    I have tried numerous things like turning off iCloud on both devices and rebooting them and turning iCal on again, checking the settings, checking what calendars are being used but nothing has worked so far. Any other solutions welcome! Hoping I will not have to resort to restoring my iPhone completely.

    Go to Settings>Mail,Contacts,Calendars>Default Calendar and be sure you have selected an iCloud calendar as your default and not something else like On My iPhone, a Google calendar, etc.  If you haven't, make this change, then add a new event and see if it appears on your calendar on icloud.com now.
    If your settings are correct and new events still aren't appearing on icloud.com, add any missing calendar events from your phone to your calendar on icloud.com.  Once the calendar on icloud.com is up to date, go to Settings>iCloud, turn Calendars to Off, choose Delete from My iPhone when prompted (they will still be in iCloud), then after a minute or so, turn Calendars back to On.  Then add a new event on your phone and see if it appears on your calendar on icloud.com now.

  • Why calendar events I create on my iPhone do not appear on my iMac after sync?

    IPhone 4 32Gb w/ IOS 6.1
    IMac late 2009 with OS X 10.8.2 and iTune 11.0.1 (12)
    I'm using Wi-Fi Sync and I'm synching all calendars

    Go to Settings>Mail,Contacts,Calendars>Default Calendar and be sure you have selected an iCloud calendar as your default and not something else like On My iPhone, a Google calendar, etc.  If you haven't, make this change, then add a new event and see if it appears on your calendar on icloud.com now.
    If your settings are correct and new events still aren't appearing on icloud.com, add any missing calendar events from your phone to your calendar on icloud.com.  Once the calendar on icloud.com is up to date, go to Settings>iCloud, turn Calendars to Off, choose Delete from My iPhone when prompted (they will still be in iCloud), then after a minute or so, turn Calendars back to On.  Then add a new event on your phone and see if it appears on your calendar on icloud.com now.

  • Create after action on AD not fired

    This is to create exchange email box after the user is created. So a 'create after action, should be initiated on AD after creating
    a user.
    I added this field in 'Create User form' at the end.
    <Field name='accounts[AD].create after action'>
    <Expansion>
    <s>AfterCreate</s>
    </Expansion>
    </Field>
    Had a resource action object as:
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE Waveset PUBLIC 'waveset.dtd' 'waveset.dtd'>
    <Waveset>
    <ResourceAction name='AfterCreate'>
    <ResTypeAction restype='Windows Active Directory' timeout='75000'>
    <act>
    <!-- This is to test whether this is being fired .I supposed to call a batch file.-->
    echo create >> c:\%WSUSER_employeeID%.txt
    exit
    </act>
    </ResTypeAction>
    </ResourceAction>
    </Waveset>
    And Mapped in AD Schema as:
    <AccountAttributeType id='10' name='create after action' syntax='string' mapName='IGNORE_ATTR' mapType='string'>
    </AccountAttributeType>
    Basically, this action is not being fired at all.
    I am not sure if �create after action� was put in the wrong form in the �create user� workflow or the GW has any issues?
    Can anybody give me some pointers?
    Thanks.

    the code above works. the gateway service needs to be running as a user with sufficient permissions. initially, this change didn't seem to take on my win2003 server, but after a reboot it worked fine.
    Other than that I followed the resource ref doc, and I placed the field in the AD User Form, see below for a snippet showing the location I used.
    <Field name='accounts[$(RESOURCE_NAME)].Distinguished name'/>
    <Field name='accounts[$(RESOURCE_NAME)].Manager'/>
    <Field name='accounts[$(RESOURCE_NAME)].Mail Nick Name'/>
    </Field>
    <Field name='accounts[AD].create after action'>
    <Expansion>
    <s>ADAfterCreate</s>
    </Expansion>
    </Field>
    </Form>
    -----------------------------------------------------------

  • TEM: Relationship between External Person and Business Event

    Hi,
    The requirment is to have External Person to be related to Business Events.
    Please let me know whether it will be ideal to relate External Person to Business Events or External Person to Business Event Type?
    NOTE:As per the standard the relationship exist only between External Person(H) and Business Event Type (D).
    Will appreciate a quick reply.
    Thanks and Regards,
    Dev

    Hi Dev,
    U can create this relation through PP01. Select  Business event in the object type and go to relationship infotype and create the same...
    Regards,
    Sushil Soni

  • Need help in WMS Business Events

    I am looking for a business event "Pick Load" which is mentioned as a standard business event in WMS but I am unable to find that business event in oracle workflow business events screen. I need the corresponding business event.
    Can anyone help me on this please !!!

    Hi;
    I am not sure it could be help but please check
    No Device Request Is Created Using Wip Pick Release Business Event [ID 1373549.1]
    Regard
    Helios

  • Business Events in Core HR in Oracle Applications

    Hi,
    Did anyone used Business Events in Core HR in Oracle Applications. Any suggestions would be helpful.
    All that we are doing is to use the following standard business events available.
    oracle.apps.per.api.employee.create_employee
    oracle.apps.per.api.person.update_person
    We are expecting these to fire when we create an employee or update a person respectively.
    Thanks
    Arun

    Though I have not used them myself, I do have theoretical knowledge of Business Events. I will try to help you as much as I can.
    The first step is to create these business events in System Administrator responsibility. Next is to create subscriptions for them. I hope you have carried out these steps.
    Next you need to raise the event from certain point in the application. For example business event oracle.apps.per.api.employee.create_employee can be raised when a new employee is created in the system. This can be done by calling the workflow API named “wf_event.raise”. You need to do some research to know the parameters to be passed to this API in order to raise the event.
    Hope it helps for now. Do let us know how it worked out.
    Thanks,
    Brajesh
    PS: By the way, in R12 all these events are raised automatically by Oracle. What I explained above is for 11i, where the functionality of Business events is present but Core HR does not raise the events on its own, as it does in R12. Users need to raise these events from custom.pll if they want so.

  • Follow up Business Event by specific qualification date.

    Hi Expert,
    In the follow up business event, I want to transfer qualification to attendee with the start and end date of business event. For example, the business event date is held on 07.05.2007 – 11.05.2007 and the qualification will be given to all attendees by t-code: PV15. By standard the start and end date of given qualification is 11.05.2007 – 31.12.9999. My intention is to give the date as 07.05.2007 – 11.05.2007 instead. Is there any solution?
    Here is the background of the question. We migrated the training history record from legacy system in to SAP and stored it as qualification, and start and end date of qualification are the duration of (start/end date) of training course.
    Thanks in advance,
    ECTSAKC

    Hi,
    Sorry my English is not well. I'll tried.
    Our training process like this. When any employee who has attended the training course, he/she will be given the qualification according to the particular course. The qualification should be dated the same as the duration of training course. For example, the Techinical English course is held on 07.05.2007 - 11.05.2007. When the courese is finished, the user will do the follow-up activities by using T-code PV15. By default, the start date of given qualification is 11.05.2007 and end date is 31.12.9999.  But our intention is to give the start date of assigned qualification as 07.05.2007 - 11.05.2007.
    There is any user exit available to do that?
    Thanks.
    ECTSAKC

  • Badi and Business event( Urgent)

    Hi experts,
          I am new to badi and business event 1120P. Please post how this business event exactly comes in to picture in this badi. also how to find this business event?
    And also Post the logic or code. The requirement is given below . Pls Post the solution. Its very urgent.
    Enhancement Summary
    Two user exits are needed to determine the correct G/L Account and Cost Center on Shipment Cost documents and post the Material Group on the Accounting document. BADI_SCD_ACCTG and Business Event 1120P can be used to accommodate the new functionality.
    Business Process
    Specific G/L Accounts and Cost Centers have to be determined to post on the Shipment Cost document. This is needed to provide accurate management reporting capabilities on shipments for Sales Order or Stock Transfer Order. A new custom table must be created which contains the following information: Distribution, Mode of Transport, Account, Cost Center Material group. Distribution is an identifier here if this shipment originated from an SO or STO.
    There are no screens involved in this enhancement.
    Components
    Table: ZTABLE1
    Field     Data Element     Type     Length     Description
    MANDT     MANDT     CLNT (key)     3     Client
    DISTRIBUTION     Z_DISTRIBUTION     CHAR (key)     1     Distribution
    MOT     ZZDEF_MOT     CHAR (key)     2     Mode of Transportation
    MATKL     MATKL     CHAR (key)     9     Material group
    SAKNR     SAKNR     CHAR     10     G/L Account Number
    KOSTL     KOSTL     CHAR     10     Cost Center
    This table gets updated manually by the FI team.
    Values for Distribution are:
    ‘1’  =  Primary Distribution to Refinery
    ‘2’ = Primary and Secondary– Excluding refinery
    All entries must be checked against SAP config and master tables
    User exit BADI BADI_SCD_ACCTG will be used to determine the correct G/L Account, Cost Center and Product Group based on Distribution and Mode of Transport. This BADI gets called only when a new Shipment Cost document get created.
    Once the BADI determined the new values it populates field c_vfkn-sakto with the G/L account, field c_vfkn-kostl with the Cost Center and exports the Product group to memory.
    There is no field on the Shipment Cost Document to store the Product group. Therefore another mechanism must be used to get the Product Group on the accounting document.
    Business Event 1120P can be used to import the Product group out of memory and put it on BSEG-MATNR. Structure BSEG_SUBST must be enhanced with field MATNR for this purpose.
    Function, Rules, Exits      Description of Functionality, Rules, Exits
    BADI_SCD_ACCTG     Business Add-In for Shipment Cost Account Assignment
    Business Framework     Business Event 1120P can be used to import the Product Group from memory and to populate field BSEG_SUBST-MATNR.
    This event gets called from different places. It needs to be ensured that it only populates the value when it was called from BADI_SCD_ACCTG.
    Custom Table     A look-up Table needs to be maintained for Distribution, Mode of Transport, G/L Account, Cost Center and Material Group
    Transaction code     To maintain the new table
    Append Structure     To enhance structure BSEG_SUBST with MATNR
          Business Add-In BADI_SCD_ACCTG can be used to determine the account assignments for a shipment cost item to set the G/L Account and Cost Center. All data needed to determine the new information gets provided in this BADI.
    Logic:
    •     Determine if STO or SO based on Document Category from internal table I_REFOBJ-VTRLP field VGTYP If is C then Distribution type is Sales Order (Primary and Secondary – Excluding Refinery – ‘2’ ) else we need to check the receiving plant. If the receiving plant (I_REFOBJ-VTRLK field WERKS) is a refinery the Distribution type is Primary (1) else it’s a (Primary and Secondary – Excluding Refinery – ‘2’ ). Refineries can be identified via Function Module ZPLANTCLASSIFICATION. The plant must be passed into Import Parameter IP_SAPPLANT and field INT_PLANTCHAR-ATNAM must be looked up with value SAPTYPE. If it exists and field ATWRT contains ‘RFY’, the plant is a refinery.
    •     Product Group can be determined from the Material master through Material group field MARA-MATKL.
    •     Mode of Transport will be passed in the BADI in VTRLK-OIC_MOT.
    •     Select single entry from table ZTABLE1based on Distribution, Mode of Transport and Material Group. If nothing gets selected, error message ‘No entry exists in table ZTABLE1for Distribution (distribution), MOT (MOT) & Mat. Group (material group)’ should be triggered.
    •     Move ZTABLE1-SAKNR  to c_vfkn-sakto and ZTABLE1-KOSTL to c_vfkn-kostl
    •     The Material group must be exported to memory in BADI_SCD_ACCTG
    •     The Material group must be imported from memory in Business Event BP1120P
    •     Free Memory in Business Event BP1120P
    This is VI01 – Creation of Freight Cost Item screen
    and also code for function module ZPLANTCLASSIFICATION below
    FUNCTION zplantclassification .
    ""Local interface:
    *"  IMPORTING
    *"     REFERENCE(IP_SAPPLANT) LIKE  AUSP-OBJEK OPTIONAL
    *"     REFERENCE(IP_CPSPLANT) LIKE  AUSP-ATWRT OPTIONAL
    *"     REFERENCE(IP_SISLOC) LIKE  AUSP-ATWRT OPTIONAL
    *"  EXPORTING
    *"     VALUE(EP_SAPPLANT) LIKE  AUSP-OBJEK
    *"     VALUE(EP_CPSPLANT) LIKE  AUSP-ATWRT
    *"     VALUE(EP_SISLOC) LIKE  AUSP-ATWRT
    *"     VALUE(EP_OWNERSHIP) LIKE  AUSP-ATWRT
    *"     VALUE(EP_SMISTYPE) LIKE  AUSP-ATWRT
    *"     VALUE(EP_SPOTREF) LIKE  AUSP-ATWRT
    *"     VALUE(EP_SUBTYPE) LIKE  AUSP-ATWRT
    *"     VALUE(EP_SUPPLYREGION) LIKE  AUSP-ATWRT
    *"     VALUE(EP_TYPE) LIKE  AUSP-ATWRT
    *"     VALUE(EP_DISTAREA) LIKE  AUSP-ATWRT
    *"     VALUE(EP_GEOGAREA) LIKE  AUSP-ATWRT
    *"     VALUE(EP_HMF) LIKE  AUSP-ATWRT
    *"     VALUE(EP_IATACODE) LIKE  AUSP-ATWRT
    *"     VALUE(EP_IRSTCN) LIKE  AUSP-ATWRT
    *"     VALUE(EP_OPSAREA) LIKE  AUSP-ATWRT
    *"     VALUE(EP_PLANTSTAT) LIKE  AUSP-ATWRT
    *"     VALUE(EP_PORTCODE) LIKE  AUSP-ATWRT
    *"     VALUE(EP_REFAREA) LIKE  AUSP-ATWRT
    *"     VALUE(EP_SAPTYPE) LIKE  AUSP-ATWRT
    *"     VALUE(EP_MFGWARRANTY) LIKE  AUSP-ATWRT
    *"     VALUE(EP_USERTYPE) LIKE  AUSP-ATWRT
    *"     VALUE(EP_TRMCENTER) LIKE  AUSP-ATWRT
    *"     VALUE(EP_TRANSCENTER) LIKE  AUSP-ATWRT
    *"     VALUE(EP_FEIN) LIKE  AUSP-ATWRT
    *"  TABLES
    *"      INT_PLANTCHAR STRUCTURE  ZPLANTCLASSIFICATION OPTIONAL
    *"  EXCEPTIONS
    *"      NO_OBJEK_FOUND
    *"      NO_CPSPLANT_FOUND
    *"      NO_SISLOC_FOUND
    *"      NO_INPUT_FOUND
    *"      VALID_PLANT_NO_CHARACTERISTIC
    *"      ONE_TO_MANY_ISSUE
    *"      PLANT_NOT_FOUND_ZDEF_DELPLANT
    *"      UNKNOWN_ERRORS
    FM Name: ZPLANTCLASSIFICATION     
    Created By  :  SYUB                                                  *
    Description : Function Module to retrieve plant characteristics      *
    The function module has two capabilities:
    1. Retrieve only the necessary characteristics
    2. Retrieve the whole characteristics into an internal table.
    Parameter Description                                                *
    In the future, if there is a new characteristic added to the
    plant classification tables, the characteristic has to be added
    to the list of the export parameters and the loop statement.
      TABLES: ausp, cabn, ksml, zdef_delplant.
      DATA: ws_objek LIKE ausp-objek,
            ws_countchar TYPE i,
            ws_countplant TYPE i.
    *Internal table for SAP plant
      DATA: BEGIN OF int_plant OCCURS 0,
            plant LIKE ausp-objek,
            END OF int_plant.
    *sap plant code is the input parameter.Move objek, atnam, and atwrt to
    *internal table PLANTCHAR using inner join of AUSP, CABN, and KSML to
    *synch up the internal characteristic numbers throughout the 3 tables.
      IF NOT ip_sapplant IS INITIAL.
        SELECT auspobjek cabnatnam ausp~atwrt
          INTO CORRESPONDING FIELDS OF TABLE int_plantchar
          FROM ksml AS ksml
          INNER JOIN cabn AS cabn
            ON cabnatinn = ksmlimerk
          INNER JOIN ausp AS ausp
            ON ausp~objek = ip_sapplant
            AND auspatinn = cabnatinn
            AND ausp~mafid = 'O'
            AND ausp~klart = 'Z01'.
    *Checking the existence of ip_sapplant in the table, if it doesn't
    *exist, raise the exception else if it exists, check if it has
    *characteristic values.
        IF sy-subrc NE 0.
          RAISE no_objek_found.
        ELSE.
          DESCRIBE TABLE int_plantchar LINES ws_countchar.
          IF ws_countchar LT 2.
            RAISE valid_plant_no_characteristic.
          ENDIF.
        ENDIF.
    *cps plant code is the input parameter. Move objek from table AUSP to
    *ws_objek using inner join of CABN and AUSP to match up the internal
    *characteristic numbers from the 2 tables.
      ELSEIF NOT ip_cpsplant IS INITIAL.
        SELECT ausp~objek
          INTO TABLE int_plant
          FROM ausp AS ausp
          INNER JOIN cabn AS cabn
            ON cabn~atnam = 'OLDCODE'
              WHERE auspatinn = cabnatinn
                AND ausp~mafid = 'O'
                AND ausp~klart = 'Z01'
                AND ausp~atwrt = ip_cpsplant.
    *Checking the existence of ip_cpsplant in the table
        IF sy-subrc EQ 0.
    *Counting the number of SAP plants in the internal table int_plant
          DESCRIBE TABLE int_plant LINES ws_countplant.
    *Moving the values of objek, atnam, and atwrt to PLANTCHAR using objek
    *from ws_objek.
          IF ws_countplant EQ 1.
            LOOP AT int_plant.
              SELECT auspobjek cabnatnam ausp~atwrt
                INTO CORRESPONDING FIELDS OF TABLE int_plantchar
                FROM ksml AS ksml
                INNER JOIN cabn AS cabn
                  ON cabnatinn = ksmlimerk
                INNER JOIN ausp AS ausp
                  ON ausp~objek = int_plant-plant
                  AND auspatinn = cabnatinn
                  AND ausp~mafid = 'O'
                  AND ausp~klart = 'Z01'.
            ENDLOOP.
    *If there more than one SAP Plants, then raise an exception.
          ELSEIF ws_countplant GT 1.
            RAISE one_to_many_issue.
          ENDIF.
        ELSE.
          SELECT SINGLE werks FROM zdef_delplant
            INTO ws_objek
            WHERE cpsloc = ip_cpsplant.
          SELECT auspobjek cabnatnam ausp~atwrt
           INTO CORRESPONDING FIELDS OF TABLE int_plantchar
           FROM ksml AS ksml
           INNER JOIN cabn AS cabn
             ON cabnatinn = ksmlimerk
           INNER JOIN ausp AS ausp
             ON ausp~objek = ws_objek
             AND auspatinn = cabnatinn
             AND ausp~mafid = 'O'
             AND ausp~klart = 'Z01'.
          if sy-subrc ne 0.
            raise plant_not_found_zdef_delplant.
          endif.
        ENDIF.
    *cps plant code is the input parameter. Move objek from table AUSP to
    *ws_objek using inner join of CABN and AUSP to match up the internal
    *characteristic numbers from the 2 tables.
      ELSEIF NOT ip_sisloc IS INITIAL.
        SELECT ausp~objek
          INTO TABLE int_plant
          FROM ausp AS ausp
          INNER JOIN cabn AS cabn
            ON cabn~atnam = 'SISLOC'
              WHERE auspatinn = cabnatinn
                AND ausp~mafid = 'O'
                AND ausp~klart = 'Z01'
                AND ausp~atwrt = ip_sisloc.
    *Checking the existence of ip_sapplant in the table
        IF sy-subrc EQ 0.
          DESCRIBE TABLE int_plant LINES ws_countplant.
    *Moving the values of objek, atnam, and atwrt to PLANTCHAR using objek
    *from ws_objek.
          IF ws_countplant EQ 1.
            LOOP AT int_plant.
              SELECT auspobjek cabnatnam ausp~atwrt
                INTO CORRESPONDING FIELDS OF TABLE int_plantchar
                FROM ksml AS ksml
                INNER JOIN cabn AS cabn
                  ON cabnatinn = ksmlimerk
                INNER JOIN ausp AS ausp
                  ON ausp~objek = int_plant-plant
                  AND auspatinn = cabnatinn
                  AND ausp~mafid = 'O'
                  AND ausp~klart = 'Z01'.
            ENDLOOP.
    *If there more than one SAP Plants, then raise an exception.
          ELSEIF ws_countplant GT 1.
            RAISE one_to_many_issue.
          ENDIF.
        ELSE.
          SELECT SINGLE werks FROM zdef_delplant
            INTO ws_objek
            WHERE sisloc = ip_sisloc.
          SELECT auspobjek cabnatnam ausp~atwrt
           INTO CORRESPONDING FIELDS OF TABLE int_plantchar
           FROM ksml AS ksml
           INNER JOIN cabn AS cabn
             ON cabnatinn = ksmlimerk
           INNER JOIN ausp AS ausp
             ON ausp~objek = ws_objek
             AND auspatinn = cabnatinn
             AND ausp~mafid = 'O'
             AND ausp~klart = 'Z01'.
          if sy-subrc ne 0.
            raise plant_not_found_zdef_delplant.
          endif.
        ENDIF.
      ELSE.
    *Checking if there is an input parameter entered.
        RAISE no_input_found.
      ENDIF.
    Modified 7/30 by RFOR to validate SAP plant is in plant master
      data: wa_t001w like t001w.
      read table int_plantchar.
      SELECT SINGLE * from t001w into wa_t001w where
      werks = int_plantchar-objek.
      if sy-subrc ne 0.
        raise NO_OBJEK_FOUND.
      endif.
    *Moving all the characteristic values to the export parameters
      LOOP AT int_plantchar.
        MOVE int_plantchar-objek TO ep_sapplant.
        CASE int_plantchar-atnam.
          WHEN 'OLDCODE'.
            MOVE int_plantchar-atwrt TO ep_cpsplant.
          WHEN 'SISLOC'.
            MOVE int_plantchar-atwrt TO ep_sisloc.
          WHEN 'OWNERSHIP'.
            MOVE int_plantchar-atwrt TO ep_ownership.
          WHEN 'SMISTYPE'.
            MOVE int_plantchar-atwrt TO ep_smistype.
          WHEN 'SPOTREF'.
            MOVE int_plantchar-atwrt TO ep_spotref.
          WHEN 'SUBTYPE'.
            MOVE int_plantchar-atwrt TO ep_subtype.
          WHEN 'SUPPLYREGION'.
            MOVE int_plantchar-atwrt TO ep_supplyregion.
          WHEN 'TYPE'.
            MOVE int_plantchar-atwrt TO ep_type.
          WHEN 'DISTAREA'.
            MOVE int_plantchar-atwrt TO ep_distarea.
          WHEN 'GEOGAREA'.
            MOVE int_plantchar-atwrt TO ep_geogarea.
          WHEN 'HMF'.
            MOVE int_plantchar-atwrt TO ep_hmf.
          WHEN 'IATACODE'.
            MOVE int_plantchar-atwrt TO ep_iatacode.
          WHEN 'IRSTCN'.
            MOVE int_plantchar-atwrt TO ep_irstcn.
          WHEN 'OPSAREA'.
            MOVE int_plantchar-atwrt TO ep_opsarea.
          WHEN 'PLANTSTAT'.
            MOVE int_plantchar-atwrt TO ep_plantstat.
          WHEN 'PORTCODE'.
            MOVE int_plantchar-atwrt TO ep_portcode.
          WHEN 'REFAREA'.
            MOVE int_plantchar-atwrt TO ep_refarea.
          WHEN 'SAPTYPE'.
            MOVE int_plantchar-atwrt TO ep_saptype.
          WHEN 'MFG_WARRANTY'.
            MOVE int_plantchar-atwrt TO ep_mfgwarranty.
          WHEN 'USER_TYPE'.
            MOVE int_plantchar-atwrt TO ep_usertype.
          WHEN 'TERMINALCENTER'.
            MOVE int_plantchar-atwrt TO ep_trmcenter.
          WHEN 'TRANSPORTATIONCENTER'.
            MOVE int_plantchar-atwrt TO ep_transcenter.
          when 'FEIN'.
            move int_plantchar-atwrt to ep_fein.
        ENDCASE.
      ENDLOOP.
    ENDFUNCTION.
    Pls help me out from this problem its very urgent.
    Thanks

    hi SK ,
    process like this .
    in BADI
    method.
    1.Here u have to put ur logic based on the Requirement.
    2.then u have to call BTE like this
    <b>call function 'OPEN_FI_PERFORM_00001020_E'
          tables
            t_bseg = xbseg
            t_bkpf = xbkpf.</b>
    3.Update Ztables.
    endmethod.
    this is sample logic only.First get logic of TS then u will come to know how to do?
    regards
    prabhu

  • Creation of Business Event Type

    Hi
    We have already created a Business Event Type called Safety Refresher. Actually this training will happen every month. already created Safety Refresher and again trying to create its showing business event type already exists. Now i want under safety refresher is it possible to maintain month wise for the whole year or particular perilod.

    Hi Suraish
    You have not to create Business Event Type again and again. You only have to create new Business Event only under the said business event type. Use copy function and copy the previous business event and assign a new Schedule for the next month, also assing resources if required and then you can book the attendees against that new business event.
    Regards
    Rao Imran

Maybe you are looking for