Enterprise Resource Planning Blogs by Members
Gain new perspectives and knowledge about enterprise resource planning in blog posts from community members. Share your own comments and ERP insights today!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

Some time ago, I posted about some quality management processes in the Oil & Gas industry; In this blog,I want to mention the work-around which is possible for BAPI_INSPLOT_SETUSAGEDECISION. The problem with this BAPI is that when this BAPI is called for an inspection lot, it requests the user to input the QCI parameters. SAP has not provided the importing parameters for these QCI parameters. Now how to cater for this process is what this blog is about.

The work around for this process is to create a wrapper class/program around the BAPI call. The BAPI call will exist within a program itself. This program will call the BAPI normally with the usual parameters; This includes the selected-set configured for a plant ( Code group, Selected set, UD Code, Force_completion ), the usage decision ( approval or rejection )  and the inspection lot. Once the BAPI call is made within this program , the QCI values are prompted up in a dialog box.

The wrapper program should generate a BDC session in the background for this BAPI call program and thus, pass on the values of the qCI parameters within the BDC. This solution can be adapted to the various options which may be linked in the follow-up notifications (QS51) -if there are any further dialog boxes which may occur. Further validations can be placed in the program to allow or disallow the BDC call ( in case of materials with no QCI parameters). This functionality is inherent to oil& gas but can be adapted to other industries as well.

It is expected that SAP will create a new BAPI for the posting of the usage decision for Oil and Gas sooner or later but until than, this solution will fulfill the requirement.

Now regarding the consideration of stock as a whole in a particular tank. Once stock has been received and mixed with the existing stock, certain quality parameters might change. For this reason, the entire stock is considered to be under a quality-check. In order to accomplish this functionality; a combination of standard functionality and ABAP was used. Once a stock movement has been completed through SAP TD; (regardless of pipe-truck-ship variations- O4H1). there can be a material movement made in the background using the Oil Bapi for goods movement. QCI values are taken at standard value sets for that time; other consultants might argue that these values should be taken from the receiving goods movement document;  Our reasoning for using the standard values set in the system is that there will be no variation in the quantity values once the stock has settled/mixed. 

The goods movement will trigger the quality inspection itself; further work has to be done using ABAP shared objects to transfer linked information into the secondary inspection lot. Physical inventory which would be an activity later on would record either gains or losses for the total quantity. In the case of loss, the stock in QI would be adjusted during inventory count whereas in the case of gain, an additional inspection lot (type 5) would be triggered.

On completion of the process; approval or rejection of the primary inspection lot; the additional lot created would have the same value set as well. There would be only one inspection lot at one time for the receiving location.

This highlights just one possible way to tackle the business scenarios which could arise. I would appreciate it if others could share their experiences as well.

Labels in this area