Quality Management ERP & EWM Usage Decision – Custom SAP Fiori Transactional App (ECC)
This document covers the details of the custom SAP fiori Transactional App developed for Usage Decision using FIORI 2.0. SAP does not provide standard solution (FIORI App) that covers all these functionalities for ECC. The entire code is not shared but all FMs/Tables/Logic are listed in the last part of the document as pointers.
The document focuses on two aspects depending on the target audience:
- Features covered in the app (Functional/Business/End Users Audience)
- High level Technical details for each functionality (Technical Audience)
Features of the App
- Display Characteristics , Inspection Points, Defects , Notifications , Multiple Specifications for an inspection lot
- Assigning Batch for Batch Managed Lots
- Changing Batch Status
- Usage Decision with Digital Signature
- Force Closure
- EWM Usage Decision
- Search for Inspection Lots Based on Given Search Parameters
- Value helps for all fields with wild card search/case sensitive search wherever possible
- Variant Management ( as in SAP ) – Create / Update / Delete / Setting Default Variant
- Create/View Note for Inspection Lot
- Create/View Attachments for Inspection Lot
- Print Report ( Sap script Form/Smart form/Adobe in PDF format)
- Decimal , Date User format as per the user profile
- Multiple Language support
- Lock Mechanism
- Authority checks done as per Client requirements
- Security Roles assigned to Catalogs , Groups , OData Services on Gateway and Backend
These features covers functionalities of transactions QA32/33, QA11/12/13, EWM Tcode – /SCWM/QIDPR
Most of the functionalities (points 7 to 17) are common to previous app. Refer below link for common functionalities. This document focuses on the Usage Decision specific functionalities (points 1 to 6).
- Display Characteristics , Inspection Points, Defects , Notifications , Multiple Specifications for an inspection lot
After selecting inspection lot from the search results screen, information such as Characteristics, Inspection Points, Defects, Notifications, Multiple Specifications are displayed for the user to review and to make a decision for UD.
Characteristics Tab : Displaying Operations , Valuation , Specifications , Results , Short Text , Status
Inspection Points Tab
Defects Tab
Notifications Tab
Multiple Specifications Tab
In case there are specifications that may have different results for different countries or customers, then those are displayed in multiple specifications tab.
- Assigning Batch for Batch Managed Lots
In case of batch managed lots, assignment of batch to a lot is mandatory before doing UD. User can assign a batch from existing list of batches for the material and plant of the inspection lot or create a new batch.
Click on Create Batch to create a new batch and assign to the Inspection lot.
Batch is created and assigned to the inspection lot.
- Changing Batch Status
User can also change the batch status for the inspection lot batch.
- Usage Decision with Digital Signature
After reviewing all the information, user can decide whether to accept or Reject or do a conditional Usage Decision. After clicking on either of the buttons, a pop up for digital Signature is given. After signing in the credentials, UD is done.
After successful posting the screen is refreshed with the UD code and is locked so that the User cannot do the UD again.
- Force Closure
While doing UD, the system checks if result recording for the characteristics are done or not. In case the characteristics are not closed then a message is given to inform the user that characteristics are still open. If User still wants to go ahead with UD then a message is given to enter reason for Force closure.
- EWM Usage Decision
Here comes the most challenging functionality of doing UD. For specific inspection type, the UD is done in EWM system at Handling Unit Level. There are no helps/links or standard solution for achieving this and even SAP replied the same to us while implementing this functionality.
High Level Technical Details
This part of the document would be more appealing for the technical people as most of the time is lost in finding the correct logic/function modules/tables/enhancements and testing them. The aim is only to give high level details and not the exact step by step process done to achieve the functionalities.
Functionality | Technical Details |
Set Usage Decision | BAPI_INSPLOT_SETUSAGEDECISION |
Create Batch | VB_CREATE_BATCH |
Change Batch Status | BAPI_BATCH_SAVE_REPLICA |
Get Characteristics, Inspection Points Data |
BAPI_INSPLOT_GETOPERATIONS BAPI_INSPOPER_GETDETAIL |
Get Defects | Tables : QMFEL , QPCT |
Get Notifications | Tables : VIQMEL , QNAOD_AOBJECT |
EWM UD at HU level |
Custom RFC FM (directed to EWM ) written for doing UD at HU level /SCWM/CL_QINSP_STOCK-> SET_QINSP_ABILITY_STOCK -> Returns all relevant HU line items for which UD is not done
For each of the relevant items CL_QIE_INSPECTION_DOCUMENT->CREATE_ELEMENT CL_QIE_ELEMENT->RELEASE CL_QIE_ELEMENT->SET_DECIDED_DATA CL_QIE_ELEMENT->SET_DECI_CODE_ID
/SCWM/RF_QM_PRD_INSP_DEC ->Update stock decision /SCWM/CL_QSETUP=>SAVE_OBJECTS ->save objects /SCWM/TO_POST -> Post data
|
Read EWM HU line items |
Tables : QIE_INSP_DOC_ES , QIE_INSP_DOC LO_QINSP_STOCK->SET_QINSP_ABILITY_STOCK -> Return HU line items for which UD is not done /SCWM/CL_QUI_INSPDOC->SELECT_BY_RELATION -> Returns HU lines items for which UD is done |
Enhancements/Exits/BADI Used:
Functionality | Purpose and Technical Details |
Digital Signature | Standard UD FM has the Digital Signature Code, but it checks the flag and gives an error message and stops the process. To continue signing, if the FM is called from FIORI a flag is set to indicate that the call Is from FIORI screen. The necessary DS flag is cleared from the method and standard signing process continues. |
Long text while force closure | Implicit enhancement in QSS_TEXT_TABLES_PROCESSING for long text during force closure |
Thanks!!!
Hello Ragini Upadhyay,
thank you for your helpfull blog.
Do you have any examples regarding methode CL_QIE_ELEMENT->SET_DECIDED_DATA
Regards,
Hello Ragini Upadhyay, ,,
Thanks for the helpful blog.
Could you please suggest me that, how we can avoid the error (QV052 - Making the usage decision for inspection lot xxxxxx requires digital signature) from BAPI_INSPLOT_SETUSAGEDECISION.
Hello Ragini Upadhyay,
Thank you for your helpful blog, it helps me a lot.
I faced the same issue when I tried to implement quality inspection using tcode /SCWM/QINSP.
There are no standard FM/Classes for achieving this. Your blog gives me a direction to complete it.
Here are my steps for partial quality inspection.
/SCWM/CL_QUI_INSP_STOCK->/SCWM/IF_AF_QUI_STOCK_INT~SET_QINSP_ABILITY_STOCK
CL_QIE_INSPECTION_MANAGER=>GET_INSTANCE( ).
CL_QIE_INSPECTION_MANAGER->GET_INSPECTION_DOCUMENT( IV_GUID = GUID ).
For each of the relevant items
CL_QIE_INSPECTION_DOCUMENT->CREATE_ELEMENT
CL_QIE_ELEMENT->RELEASE
CL_QIE_ELEMENT->SET_DECI_CODE_ID
CL_QIE_ELEMEN->DECIDE( ).
CALL FUNCTION '/SCWM/RF_QM_PRD_INSP_DEC'
/SCWM/CL_QSETUP=>SAVE_OBJECTS( ).
CALL FUNCTION '/SCWM/TO_POST'
Regards
Harry