07-17-2008 5:47 AM
Hello everyone,
I hav one scenario where i have to implement the table maintenance events and trigger a workflow by checking the data.
Please help me out.......
07-17-2008 5:53 AM
hi Manu,
I have gone through with this scenario....
You Can follow these steps..........
Let us take an example to create customer information in Z table with following fields. And, if user will enter Country as u2018INu2019, in that case workflow should get trigger.
Click on Utility -> Table Maintenance Generator
Provide authorization group, function group and screen numbers and Save it.
Click on Back button.
Now, click on Environment -> Modification -> Events
Click on New Entries.
Select u201905 u2013 Creating a new entryu2019.
Provide a Form routine as u2018CREATE_CUST_INFOu2019 and click on Editor Button.
Select the u2018New Includeu2019 and continue.
Write the following code in the include program. Activate it. Activate your function group as well.
FORM CREATE_CUST_INFO. ZCUST_INFO-CR_DATE = SY-DATUM.
ZCUST_INFO-CR_TIME = SY-UZEIT.
IF ZCUST_INFO-COUNTRY = 'IN'. DATA: W_OBJTYPE TYPE SWETYPECOU-OBJTYPE,
W_OBJKEY TYPE SWEINSTCOU-OBJKEY,
W_EVENT TYPE SWETYPECOU-EVENT. W_OBJTYPE = 'YH355_BO'.
W_OBJKEY = ZCUST_INFO-CUSTNO.
W_EVENT = 'SENDEMAIL'. CALL FUNCTION 'SWE_EVENT_CREATE'
EXPORTING
objtype = W_OBJTYPE
objkey = W_OBJKEY
event = W_EVENT
. COMMIT WORK. ENDIF.ENDFORM.Step 11:
Go to SE11. Click on Utilities -> Table Contents -> Create Entries.
Enter the details except Date and Time.
In result, Date and Time will get populated and event will get trigger.
Please award me points if this will help you a lot...........
07-17-2008 5:53 AM
hi Manu,
I have gone through with this scenario....
You Can follow these steps..........
Let us take an example to create customer information in Z table with following fields. And, if user will enter Country as u2018INu2019, in that case workflow should get trigger.
Click on Utility -> Table Maintenance Generator
Provide authorization group, function group and screen numbers and Save it.
Click on Back button.
Now, click on Environment -> Modification -> Events
Click on New Entries.
Select u201905 u2013 Creating a new entryu2019.
Provide a Form routine as u2018CREATE_CUST_INFOu2019 and click on Editor Button.
Select the u2018New Includeu2019 and continue.
Write the following code in the include program. Activate it. Activate your function group as well.
FORM CREATE_CUST_INFO. ZCUST_INFO-CR_DATE = SY-DATUM.
ZCUST_INFO-CR_TIME = SY-UZEIT.
IF ZCUST_INFO-COUNTRY = 'IN'. DATA: W_OBJTYPE TYPE SWETYPECOU-OBJTYPE,
W_OBJKEY TYPE SWEINSTCOU-OBJKEY,
W_EVENT TYPE SWETYPECOU-EVENT. W_OBJTYPE = 'YH355_BO'.
W_OBJKEY = ZCUST_INFO-CUSTNO.
W_EVENT = 'SENDEMAIL'. CALL FUNCTION 'SWE_EVENT_CREATE'
EXPORTING
objtype = W_OBJTYPE
objkey = W_OBJKEY
event = W_EVENT
. COMMIT WORK. ENDIF.ENDFORM.Step 11:
Go to SE11. Click on Utilities -> Table Contents -> Create Entries.
Enter the details except Date and Time.
In result, Date and Time will get populated and event will get trigger.
Please award me points if this will help you a lot...........
07-17-2008 5:55 AM
Hi Manu,
Check this link ,
http://209.85.175.104/search?q=cache:D0uXQjUjrhkJ:help.sap.com/bp_bblibrary/600/Documentation/G20_BB...tablemaintenanceeventsandtriggeraworkflowbycheckingthe+data.&hl=en&ct=clnk&cd=10&gl=in
view as DOC .
Might be useful
Mohinder Singh
07-17-2008 5:58 AM
Hi
Maintaining the Workflow for Automatic Customizing
Use
In this step, you can finish the customizing for the workflow automatically. Workflow automatic customizing carries out the basic settings in the workflow required for IDoc processing. The workflow customizing settings made earlier are not overwritten.
The settings are not transported. This means that you also have to carry out this step in the productive system. The following steps are carried out within workflow automatic customizing:
Configuration of a client-dependent RFC destination ("WORKFLOW_LOCAL_$<Client$>")
Scheduling of a background job for deadline monitoring
Setting of an active plan version
Classification of single-step tasks as general tasks
Maintenance of a system administrator for the workflow
Procedure
Access the activity using one of the following navigation options:
SAP ECC Menu Tools u2192 Business Workflow u2192 Development u2192 Utilities u2192 Automatic Workflow Customizing
Transaction Code SWU3
On the screen Automatic Workflow Customizing, select Perform Automatic Workflow Customizing (F9) on the toolbar. Ignore any error message appearing on the screen.
Choose Back.
If you get an error message, such as RFC password must be synchronized, run the following activities to fix it. Otherwise, you can ignore the following steps for the remainder of this activity.
Create a user named WF-BATCH with transaction SU01.
On the screen User Maintenance: Initial Screen, enter the following:
Key field Value (description)
User WF-BATCH
Choose Create.
On the Maintain User screen, on the Address tab, enter the following:
Key field Value (description)
Last Name WF-BATCH
On the screen Maintain User, on the Logon data tab, enter the following:
Key field Value Description
Initial password init You can use your own password here, but you need to enter the exact same password in the field Repeat password.
Repeat password init
User type System You must select the system user type here, since this user is only used by the system.
On the screen Maintain User, in the Profile tab, enter the following two profiles:
SAP_ALL
SAP_NEW
Choose Save.
A message appears on the status bar: User WF-BATCH was saved.
To synchronize the RFC password, use transaction SWUB.
On the screen Configure Workflow RFC Destination, enter the following entry:
Key field Value Description
RFC user WF-BATCH
RFC password init Enter the same password you created for RFC user WF-BATCH
Choose Synchronize Passwords on the application toolbar.
A message appears on the status bar: RFC destination password and user password synchronized successfully.
Restart the workflow automatic customizing. Follow the activities described in the section procedure above.
To make sure that automatic workflow customizing was successful, run the following activity:
Access the activity using the following navigation option:
Transaction Code SWU3
On the screen Automatic Workflow Customizing, expand item Maintain Runtime Environment.
Mark all entries below item Maintain Runtime Environment with a green check flag. If these selections are not available, re-run steps 1 through 3 of the procedure described above.
reward if helpful