Google+ Followers

Tuesday, December 11, 2012

Useful programs for SAPScript

RSTXFCONConverts SAPScript page formats
RSTXSCRPUpload and download SAPScript layout sets

Table analysis between two systems

The contents of a table between two systems can be checked through the transaction OY19

SAP Tables for Enterprise Structure

 Enterprise Structure                                    Definition
FI          T880                                       Company
            T001                                       Company code
CO        TKA01                                   Controlling area
LO        T001W                                    Plant / sales organization
T499S                                     Locations
TSPA                                      Division
SD         TVKO                                    Sales organization / company code
TVTW                                    Distribution channel
TVBUR                                  Sales office
TVKBT                                  Sales office text

TVKGR                                  Sales group
TVGRT                                   Sales group text
T171T                                     Sales district text
MM       T001L                                    Storage locations
T024E                                     Purchasing organization
T3001                                     Warehouse number
TVST                                      Shipping point
TVLA                                     Loading point
TTDS                                     Transportation
CO        TKA02                                    Assign company code to controlling area
LO        T001K                                     Assign plant (valuation area) to company code

SD         TVKO                                     Sales organization / company code
TVKOV                                   Distribution channel / sales organization
TVKOS                                   Division to sales organization
TVTA                                      Sales area
TVKBZ                                   Sales office to sales area
TVBVK                                   Sales group to sales office
TVKWZ                                  Plants to sales organization
MM       T024E                                     Purchasing organization / company code
T024W                                    Plant to Purchase organization
T001K                                     Link plant ( = valuation area) / company code
TVSWZ                                   Shipping point to plant
T320                                        Assignment MM Storage Location to WM Warehouse

Maintaining a workflow substitute for someone else

As an administrator of workflow you may want to assign a substitute for someone else (e.g. if they are out sick)

To do this use T-Code RMPS_SET_SUBSTITUTE

Add Local SAPScript to Transport Request

At times developers develop SAPScript as local object. Unlike reports where we can change the development class using the attributes option , nothing such is available for SAPScripts.

However we can use the program RSWBO052 to change the development class.

Following are the step by step screenshots to change the development class

Click on the Object Directory and change the package

Workitem stuck in READY status but the workflow is COMPLETE

If a work item is being executed and the workflow runtime system tries to access the work item then it will not be successful due to the lock or enqueue currently on the work item.

Example 1

An asynchronous task is being executed by a user. While the work item is being executed the terminating event is raised in the system and tries to set the work item status to COMPLETE but cannot due to the lock/enqueue.In this case the event is buffered in the event queue. As soon as the work item is released, it will deliver the buffered event immediately.

Example 2

You use parallel processing where you have a fork with 2 branches (1 Branch necessary for completion). In one branch is a dialog activity step and in the other is a 'Wait for Event' step. While the dialog step is being executed by a user the Wait for Event step receives its event and continues along the branch and completes the fork (Remember only 1 branch needed for completion). Once the end of fork is reached the dialog work item should be set to status Logically Deleted but this does not occur due to the lock/enqueue on the work item while the user is executing it. Since a callback is essential for a workflow to continue running, this callback is suspended (stored in the SWP_SUSPEN table). These callbacks are started again via the RSWWERRE report. If you have not scheduled report RSWWERRE then the work items will remain in table SWP_SUSPEN and the work items will not receive their callback and will therefor will not continue.


If there are examples of work items hanging then check table SWP_SUSPEN to see if the callback work item ID is there. If it is then make sure you have the RSWWERRE job running in order to redeliver it. If RSWWERRE is running and the entry is not being delivered then please check for notes using the search term "RSWWERRE" and "SWP_SUSPEN". If there is no entry in SWP_SUSPEN, then check the workflow definition to see if the work item is asynchronous i.e. needs a terminating event as in Example 1 above. Check the event queue via transaction SWEQADM to see if the terminating event is being buffered there. If it is then it should automatically be redelivered so do a notes search in relation to the event queue.

Retrieving Email addresses from Distribution List

Distribution list(Email id's) can be maintained in SBWP. They are stored in table SOOD. It can be retrieved using function module SO_DLI_READ_API1.

Performance of transaction SBWP (Available BAdI's)

If you are experiencing performance issue in SBWP the main reason being that users have far too many work items in their inboxes (Several thousand). Some customers have a business need to have all work items in their inboxes rather than use more specific agent assignment (Call Centre scenario). Therefore several BAdI's are provided to improve performance e.g. reduce the number of work items in users inboxes
  • WF_BWP_SELECT_FILTER                                         
    This BAdI enables you to limit the number of the work items displayed by filtering. It is mainly suited to scenarios where all users are working on the same inventory of work items (for example, call center).
  • WF_BWP_DYN_COLUMN                                           
    Hiding the dynamic columns improves performance in the Business Workplace. If this is not possible, you can implement the BAdI WF_BWP_DYN_COLUMN to determine the values of the dynamic columns directly from the application data.
  • WF_BWP_OBJ_ATTRIBUTE                                         
    With this BAdI, it is possible to set the default attributes of the dominant object (_WI_Object_ID) and the grouping characteristic (_WI_Group_ID). The default attributes are used for grouping according to content, and grouping according to sort key and for hiding the group object column and work item content.