Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

1.0   Introduction

     XML format is being used more often to exchange the data between different systems.For easy Readability of data the XML format is used. We can also import this XML Document for the future reference.In Audit Management XML Generation is used when importing and exporting audit components.

2.0   Steps for generating the XML

Click on the Audit from which you want to display the contents in XML format.

            Goto Audit Component --> Export --> Export Audit Component -->Export

Data of the Audit components will be present inside the XML Tags.

3.0   Process Overview

Whenever XML is generated it should contain the data of all additional fields added to the BASIC DATA Tab in the XML Format.

      XML Export of the new fields

  •    Export of audit XML file
  •   Export of corrective/preventive actions XML file

Additional Fields added to the BASIC DATA TAB should also have the XML format.

Whenever XML is generated it should contain the data of all additional text types added to the TEXTS Tab in the XML Format. Additional Text Types ‘CAUSE’ and ‘PLAN’ added to the TEXTS TAB should also have the XML Format.

CAUSE:

      Whenever a Corrective Action is created, the user has to mention the cause for creating it, which makes the End User to understand the reason for Creating the Corrective Action.

PLAN:

    Whenever a Corrective Action is created, the user has to mention the plan for correcting it ,so that  End User understands that some planning activities has been done for correcting it.

Additional Text Types should be displayed in a separate tag as well.

4.0  Creation of Text ID

The Text Types created in the Maintenance View V_TTXIDI will be reflected in the TEXTS TAB of PLMD_AUDIT Transaction.

             The Text ID’s for text types (Cause and Plan) should be created in Maintenance View V_TTXIDI in all the systems.

                                    Cause – Describe how root cause have been determined.

OBJECT ID : CGPL_TEXT

TEXT ID : CAUS

MEANING : Cause

                                    Plan  - Describe the plan for implementing the action.

OBJECT ID : CGPL_TEXT

TEXT ID : PLAN

MEANING : Plan

5.0   Append Structure

           “PLMT_AUDIT_ACT_BAPI_XML” is the Structure which contains all the fields to be displayed in the XML Format. We have to append the Additional  Fields and additional Text types to the Structure “PLMT_AUDIT_ACT_BAPI_XML” and Move the data of additional fields to the standard XML structure.

6.0  Implicit Enhancement: YPLM_XML

             XML of the additional fields   should be generated individually after the standard Items. An Implicit Enhancement “YPLM_XML” is created in the function module” MAP2E_PLM_COR_PRI_2_BAPI20370” in order to display the additional text types individually in the XML generation.

The Method CL_PLM_AUDIT_IF_SERVICES=>CONVERT_LONG_TEXT_2_STRING will read the data of the TEXT and move to the Corresponding string in the Structure ES_20370_FOR_XML.

Pseudo Code:

CALL METHOD CL_PLM_AUDIT_IF_SERVICES=>CONVERT_LONG_TEXT_2_STRING
        EXPORTING
          IT_TEXTDATA = LS_PRI_TEXT-TEXTDATA
          IV_TDID     = 'CAUS'
        IMPORTING
          EV_STRING   = ES_20370_FOR_XML-CAUS
        CHANGING
          CT_RETURN   = CT_RETURN.

CALL METHOD CL_PLM_AUDIT_IF_SERVICES=>CONVERT_LONG_TEXT_2_STRING
        EXPORTING
          IT_TEXTDATA = LS_PRI_TEXT-TEXTDATA
          IV_TDID     = 'PLAN'
        IMPORTING
          EV_STRING   = ES_20370_FOR_XML-PLAN
        CHANGING
          CT_RETURN   = CT_RETURN.

FINAL OUTPUT:

Additional Fields added to the BASIC DATA TAB  is having the XML format.

Additional Text Types added to the TEXTS TAB  is having the XML format.

Additional Text Types is  displayed in a separate tag as well.

 

7.0      Challenges

The XML is generated based on the fields in BAPI Structure. We have to append the Additional Fields in the BAPI Structure. But While Upgrade the BAPI Extension will create some performance issues so in order to avoid that an implicit Enhancement was created in the Function module for the same functionality.