DMS.docx

21
New SAP Programme Technical Specification DMS-R0005 DIR Activity Log (Report) - SAP

Transcript of DMS.docx

Page 1: DMS.docx

New SAP Programme

Technical Specification

DMS-R0005 DIR Activity Log (Report) - SAP

Page 2: DMS.docx

Technical Specifications (Report) - SAPDMS_R0005_TDS

_DIR Activity Log.docx

Document Control Information

Document Information

Document Identification DMS-R0005_TDS_DIR Activity Log

Document Name Technical Specifications (Report) - SAP

FDS Document Identification DMS_R0005_FDS_DIR Activity Log_12112014

Project Name New SAP Programme

Client Sasol

Document Author Shruti Priya

Document Version 1.0

Document Status In Review

Date Released 01-Dec-2014

Document Edit History

Version Date Additions/Modifications Prepared/Revised by

1.0 01-Dec-2014 Initial draft Shruti Priya

Document Review/Approval History

Date Name Organization/Title Comments

<Date> Sourabh Mishra Deloitte Initial review

Distribution of Final Document

The following people are designated recipients of the final version of this document:

Name Organization/Title

Araja Reddy Deloitte

Carl Wilcocks Functional Consultant

Document Control Information5-Dec-14

Page ii New SAP Programmedocument.docx

Page 3: DMS.docx

Technical Specifications (Report) - SAPDMS_R0005_TDS

_DIR Activity Log.docx

Table of Contents

1 Overview.............................................................................................................................................. 4

2 General Attributes............................................................................................................................... 52.1 Object Information......................................................................................................................... 52.2 Custom Object Attributes...............................................................................................................5

3 Technical Details................................................................................................................................. 63.1 Technical Logic Flow..................................................................................................................... 63.2 Program Structure and Processing................................................................................................83.3 Selection Screen......................................................................................................................... 113.4 Restart Capability........................................................................................................................ 113.5 Interactive Functionality...............................................................................................................123.6 Performance Consideration.........................................................................................................123.7 Sample Report Layout.................................................................................................................123.8 Technical Assumptions and Dependencies.................................................................................12

4 Error Handling and Security.............................................................................................................13

5 Technical Unit Test Plan...................................................................................................................14

Document Control Information5-Dec-14

Page iii New SAP Programmedocument.docx

Page 4: DMS.docx

Technical Specifications (Report) - SAP DMS_R0005_TDS_DIR Activity Log.docx

DMS_R0005_TDS_DIR Activity

Log.docx

1 Overview

A report to keep a log of user activity on DIR with date & Time. Log should have a search screen and result screen that is exportable to an excel spread sheet.

Technical Unit Test Plan5-Dec-14

Page 4 of 16 New SAP Programmedocument.docx

Page 5: DMS.docx

Technical Specifications (Report) - SAP DMS_R0005_TDS_DIR Activity Log.docx

DMS_R0005_TDS_DIR Activity

Log.docx

2 General Attributes

2.1 Object Information

Program Name(s) ZSD_DIR_ACTIV

Include Program(s) ZSD_DIR_ACTIV _TOP –Include for global data declarationZSD_DIR_ACTIV _SEL – Include for Selection ScreenZSD_DIR_ACTIV _SUB – Include for subroutines

Functions N/A

Area Menu N/A

Transactions ZSD_DIR_ACTIV

Authorization Object Used N/A

Interactive Report Yes No

Report Layout No Yes – Filename:______________

Run Mode Foreground Background Both

Type of Report Report Painter Report Writer ALV ABAP Program Info System Other: __Interactive_____

Data Volume (Records) Low

2.2 Custom Object Attributes

Program Attributes

Name ZSD_DIR_ACTIV

Description DIR Activity Log

Logical Database N/A

Package ZSD

Editor Lock Yes No

Message Class ZSD_001

Start using variant; Yes No

Fixed Point Arithmetic: Yes No

Unicode Yes No

Transaction Attributes: {Provide relevant attributes based on transaction type}

Name ZSD_DIR_ACTIV

Description DIR Activity Log

Development Package ZSD

Type Report Transaction

Program/Transaction ZSD_DIR_ACTIV

Screen Number 1000

Variant N/A

Describe other attributes N/A

Technical Unit Test Plan5-Dec-14

Page 5 of 16 New SAP Programmedocument.docx

Page 6: DMS.docx

Technical Specifications (Report) - SAP DMS_R0005_TDS_DIR Activity Log.docx

DMS_R0005_TDS_DIR Activity

Log.docx

3 Technical Details

3.1 Technical Logic Flow

Technical Unit Test Plan5-Dec-14

Page 6 of 16 New SAP Programmedocument.docx

Page 7: DMS.docx

Technical Specifications (Report) - SAP DMS_R0005_TDS_DIR Activity Log.docx

DMS_R0005_TDS_DIR Activity

Log.docx

Technical Unit Test Plan5-Dec-14

Page 7 of 16 New SAP Programmedocument.docx

Page 8: DMS.docx

Technical Specifications (Report) - SAP DMS_R0005_TDS_DIR Activity Log.docx

DMS_R0005_TDS_DIR Activity

Log.docx

3.2 Program Structure and Processing

AT SELECTION SCREEN:

1. For User (SO_USER), validate against check table DRAW, if validation fails, display an error message “Please enter a valid User Name.”

2. For Document Type (SO_ DOKAR), validate against check table DRAW, if validation fails, display an error message “Please enter a valid Document Type.”

3. For Document Number (SO_DOKNR), validate against check table DRAW, if validation fails, display an error message “Please enter a valid Document Number.”

4. For Document Part (SO_DOKTL), validate against check table MARA, if validation fails, display an error message “Please enter a valid Document Part”.

5. For Document Version (SO_EBELN), validate against check table EKKO, if validation fails, display an error message “Please enter a valid Document Version”.

START OF SELECTION

1. Fetch MANDT (Client), Document Type (DOKAR), Document Number (DOKNR), Document Version (DOKVR), Document Part (DOKTL), Document Status (DOKST), Ctr.DRAP (STZAE), Date (DATUM), Log time (PZEIT) and User who sets document status (PRNAM) from the table DRAP into an internal table GT_DRAP where Document Type, Document Number, Document Version, Document Part, Date are in the range of the selection criteria entered on screen, PO_CV01N is equal to ‘X’ and DOKST is equal to ‘IW’.

2. Fetch MANDT (Client), Document Type (DOKAR), Document Number (DOKNR), Document Version (DOKVR), Document Part (DOKTL), Document Status (DOKST), Ctr.DRAP (STZAE), Date (DATUM), Log time (PZEIT) and User who sets document status (PRNAM) from the table DRAP into an internal table GT_DRAP where Document Type, Document Number, Document Version, Document Part and Date are in the range of the selection criteria entered on screen and PO_CHNG is equal to ‘X’.

3. Fetch Document Type (DOKTP), Document Number (DOKAR), Document Part (DOKTL), Document Version (DOKVR), User ID (USERID), Original Name (FILEP1), ZADD (Add), ZDATE (Date) and Time (ZTIME) from the table ZDMS_ACTIVE_LOG into an internal table GT_ZDMS where Document Type, Document Number, Document Part, Document Version and Date are in the range of the selection criteria entered on screen and PO_OADD is equal to ‘X’.

4. Fetch Document Type (DOKTP), Document Number (DOKAR), Document Part (DOKTL), Document Version (DOKVR), User ID (USERID), Original Name (FILEP1), ZCHANGED (Changed), ZDATE (Date) and Time (ZTIME) from the table ZDMS_ACTIVE_LOG into an internal table GT_ZDMS where Document Type, Document Number, Document Version, Document Part and Date are in the range of the selection criteria entered on screen and PO_OCHG is equal to ‘X’.

5. Fetch Document Type (DOKTP), Document Number (DOKAR), Document Part (DOKTL), Document Version (DOKVR), User ID (USERID), Original Name (FILEP1), ZDISPLAY (Display), ZDATE (Date) and Time (ZTIME) from the table ZDMS_ACTIVE_LOG into an internal table GT_ZDMS where Document Type, Document Number, Document Version, Document Part and Date are in the range of the selection criteria entered on screen and PO_ODIS is equal to ‘X’.

6. Fetch Document Type (DOKTP), Document Number (DOKAR), Document Part (DOKTL), Document Version (DOKVR), User ID (USERID), Original Name (FILEP1), ZDELETE (Delete), ZDATE (Date) and Time (ZTIME) from the table ZDMS_ACTIVE_LOG into an internal table GT_ZDMS where Document Type, Document Number, Document Version, Document Part and Date are in the range of the selection criteria entered on screen and PO_ODEL is equal to ‘X’.

Fetch CUOBJ (Int. object no), KLART (Class Type), OBTAB (Table), OBJEK (Object) from table INOB into LT_INOB where CUOBJ is equal to SO_DOKNR.

Technical Unit Test Plan5-Dec-14

Page 8 of 16 New SAP Programmedocument.docx

Page 9: DMS.docx

Technical Specifications (Report) - SAP DMS_R0005_TDS_DIR Activity Log.docx

DMS_R0005_TDS_DIR Activity

Log.docx

7. For all the Sales Order Type (AUART) fetched in the internal table GT_VBAK, fetch Sales Order Type (AUART), Sales Type Description (BEZEI) from the table TVAKT into an internal table GT_TVAKT where the language (SPRAS) would be system language (SY-LANGU).

8. For all the Sales Document No (VBELN) fetched in the internal table GT_VBAK, fetch Sales Document Number (VBELN), Order Status (GBSTK) from the table VBUK into an internal table GT_VBUK.

9. For all ‘S/O number on P/O’ (SUBMI) fetched in the internal table GT_VBAK, fetch purchase order no (EBELN), Document date (AEDAT), ‘S/O number on P/O’ (SUBMI) from the table EKKO into an internal table GT_EKKO.

10. For all the Sales Document No (VBELN) fetched in the internal table GT_VBAK, fetch Sales Document Number (VBELN), Sales Item No. (POSNR), Material (MATNR), Material Description (ARKTX), Net value (NETWR), Currency (WAERK), S/O quantity (KWMENG), Sales Uom (VRKME), from VBAP into an internal table GT_VBAP where sales document number VBELN equal to GT_VBAK-VBELN.

11. For all the Sales Document No (VBELN) and Sales Item No. (POSNR) fetched in the internal table GT_VBAP, fetch Sales Document Number (VBELN), Sales Item No. (POSNR), Sold-to-Party (KUNNR) from VBPA where PARVW=”AG” and store it in an internal table GT_VBPA.

12. For all the Sold to Party (KUNNR) fetched in the internal table GT_VBPA, fetch Sold-to-Party (KUNNR), Customer name (NAME1) from KNA1 in an internal table GT_KNA1.

13. For all the Sales Document No (VBELN) fetched in the internal table GT_VBAK, fetch Sales Document Number (VBELN), Sales Item No. (POSNR), Schedule line (ETENR), Delivery date (EDATU), from the table VBEP into an internal table GT_VBEP.

END OF SELECTION

1. To move all the fetched data into the single internal table GT_FINAL_REPORT, loop at the internal table GT_VBAP into the workarea LS_VBAP and do the following :

a. Read the internal table GT_VBAK for the Sales Document Number (VBELN) equal to LS_VBAP-VBELN into the workarea say LS_VBAK. Move corresponding fields of LS_VBAK and LS_VBAP to the workarea LS_FINAL_REPORT.

b. Read the internal table GT_VBPA for Sales Document No (VBELN) equal to LS_VBAP-VBELN and Sales Item No. (POSNR) equal to LS_VBAP-POSNR into the workarea say LS_VBPA. If the read is successful i.e sold to party exists then move corresponding fields of LS_VBPA to the workarea LS_FINAL_REPORT else skip further processing and go to next record.

c. Read the internal table GT_TVAKT for Sales Order Type (AUART) equal to LS_VBAK-AUART into the workarea say LS_TVAKT. Move corresponding fields of LS_TVAKT to the workarea LS_FINAL_REPORT.

d. Read the internal table GT_KNA1 for Sold to Party (KUNNR) equal to GS_VBAP-KUNNR into the workarea say LS_KNA1. Move corresponding fields of LS_KNA1 to the workarea LS_FINAL_REPORT.

e. Read the internal table GT_EKKO for Purchase order number (EBELN) equal to LS_VBAK-SUBMI into the workarea say LS_EKKO. Move corresponding fields of LS_EKKO to the workarea LS_FINAL_REPORT.

f. Read the internal table GT_VBEP for Sales Document No (VBELN) equal to LS_VBAK-VBELN into the workarea say LS_VBEP. Move corresponding fields of LS_VBEP to the workarea LS_FINAL_REPORT.

g. Read the internal table GT_VBUK for Sales Document No (VBELN) equal to LS_VBAP-VBELN and Sales Item No. (POSNR) equal to LS_VBAP-POSNR into the workarea say LS_VBUK. Move corresponding fields of LS_VBUK to the workarea LS_FINAL_REPORT.

h. Append the workarea LS_FINAL_REPORT into the internal table GT_FINAL_REPORT.2. If the internal table GT_FINAL_REPORT is empty, raise an error message saying ‘No data to

display. Enter sel. screen parameters’, otherwise call screen 9000 to display the ALV report.

Technical Unit Test Plan5-Dec-14

Page 9 of 16 New SAP Programmedocument.docx

Page 10: DMS.docx

Technical Specifications (Report) - SAP DMS_R0005_TDS_DIR Activity Log.docx

DMS_R0005_TDS_DIR Activity

Log.docx

3. Set the PF status, 'PF_MS-R0011' to set the BACK, CANCEl and EXIT button on the report and title bar ‘TB_MS-R0011' to set the title ‘List of Sales order’.

4. Create the ALV container on the screen by calling following function module :

IF gx_cc_9000 IS INITIAL.                                 CREATE OBJECT gx_cc_9000                                EXPORTING container_name = lc_alv_container.                   CREATE OBJECT gx_grid_9000                              EXPORTING i_parent = gx_cc_9000.                              

5. Create the fieldcatalog which will contain the report title for each coloumn, all the relevant data and interactive functionalities to be displayed on the report using the following function module :

CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'    EXPORTING      i_structure_name       = lc_struct      i_client_never_display = lc_x    CHANGING      ct_fieldcat            = gt_fieldcat    EXCEPTIONS      inconsistent_interface = 1      program_error          = 2      OTHERS                 = 3.  IF sy-subrc <> 0.    MESSAGE ID   sy-msgid TYPE sy-msgty NUMBER sy-msgno            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.  ENDIF.

6. Loop at GT_FIELDCAT into LS_FIELDCAT and populate the internal table with coloumn header text and place ‘X’ for hotspot functionality (gs_fieldcat-hotspot = ‘X’).

7. To create the sort sequence for VBELN and KUNNR, create an internal table GT_SORT and pass the sequence of sorting in that internal table.

gs_sort-spos ='1'.                                           gs_sort-fieldname = 'VBELN'.

8. Pass the fieldcatalog GT_FIELDCAT for coloumn headers and hotspot functionality (VBELN/SUMBI_PO), GT_FINAL_REPORT for relevant sales order data to be displayed and GT_SORT for sorted sequence to be displayed in the report to the function module “SET_TABLE_FOR_FIRST_DISPLAY” :

gx_grid_9000->set_table_for_first_display( EXPORTING is_layout=ls_layout CHANGING it_fieldcatalog=gt_fieldcat it_outtab=gt_final_report it_sort=gt_sort).

9. For drilldown requirement, use the below logic to create the hotspot. If Sales order is clicked, the screen will go to transaction VA01 else if purchase order no is clicked, transcation ME23N

Technical Unit Test Plan5-Dec-14

Page 10 of 16 New SAP Programmedocument.docx

Page 11: DMS.docx

Technical Specifications (Report) - SAP DMS_R0005_TDS_DIR Activity Log.docx

DMS_R0005_TDS_DIR Activity

Log.docx

will be called. Set the handler to handle the hotspot click on the ALV report and call the method “HANDLE_HOTSPOT_CLICK” and pass the row and coloumn index. Inside this method, read the internal table “GT_FINAL_REPORT” to know which cell has been clicked and which check functionality needs to be performed:

IF e_column_id-fieldname = 'VBELN'AND gs_final_report-vbeln IS NOT INITIAL.              SET PARAMETER ID 'AUN' FIELD gs_final_report-vbeln. CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.ELSEIF e_column_id-fieldname = 'SUBMI_PO'AND    gs_final_report-submi_po IS NOT INITIAL.           SET PARAMETER ID 'BES' FIELD gs_final_report-submi_po. CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.ENDIF.

10. Also, when user clicks “BACK”, “EXIT” or “CANCEL”, call subroutine “USER_COMMAND” inside the screen and perform the following logic:

CASE gv_ucomm.   WHEN 'BACK'.                      "When the back button clicked, go to screen 0      LEAVE TO SCREEN 0.    WHEN 'EXIT'    OR   'CANC'.                      "When exit or cancel is clicked, exit      LEAVE PROGRAM.  ENDCASE.

11. The required ouput layout will be displayed as per the sample layout given in section 3.7.

Field Details of the Report:

Field on Report Formulae/Table and field Name to be sourced fromSales Order Number VBAK-VBELNSales Order Type VBAK-AUART

Sales Type Description TVAKT-BEZEISales Item No. VBAP-POSNRSold-To Party VBPA-KUNNRCustomer name KNA1-NAME1Sales document date VBAK-ERDATMaterial VBAP-MATNR

Material Description VBAP-ARKTXPurchase Order Number EKKO-EBELNCreated By VBAP-ERNAMDocument date EKKO-AEDATDelivery date VBEP-EDATUP/O number on S/O VBAK-SUBMIS/O number on P/O EKKO- SUBMIS/O quantity VBAP- KWMENGSales Uom VBAP- VRKMESchedule line VBEP- ETENRNet value VBAP- NETWRCurrency VBAP- WAERKSales Organization VBAK-VKORGDistribution Channel VBAK- VTWEGDivision VBAK- SPART

Technical Unit Test Plan5-Dec-14

Page 11 of 16 New SAP Programmedocument.docx

Page 12: DMS.docx

Technical Specifications (Report) - SAP DMS_R0005_TDS_DIR Activity Log.docx

DMS_R0005_TDS_DIR Activity

Log.docx

Field on Report Formulae/Table and field Name to be sourced from

Sales Office VBAK- VKBURSales Group VBAK- VKGRPOrder Status VBUK-GBSTK

3.3 Selection Screen

Element Type Field name Default Values

From – To

Validation

(Required / Optional)

Select Options User Name N/A Validated against table VBAK

Select Options Document Type N/A Validated against table TVAK

Select Options Document N/A Validated against table KNA1

Select Options Document Part N/A N/A

Select Options Date N/A Validated against table MARA

Checkbox CV01N (Create) N/A Validated against table EKKO

Checkbox Change Status N/A N/A

Checkbox Original N/A Validated against table TVKO

Checkbox Classification/Characteristics

N/A Validated against table TVTW

Checkbox Object Links N/A Validated against table TSPA

Checkbox Added N/A Validated against table TVBUR

Checkbox Changed N/A Validated against table TVKGR

Checkbox Deleted N/A

Checkbox Viewed N/A

Although all the checkboxes are marked as optional, one of the options need to be selected before executing the report, otherwise an error message should be displayed:

CV01N (Create) Change Status Original Classification/Characteristics Object Links

3.4 Restart Capability

N/A

3.5 Interactive Functionality

Once the overview list is the displayed then the user can drill-down to the sales order display (transaction VA03) or the purchase order display (transaction ME23N) using hotspot functionality in ALV report.

3.6 Performance Consideration

N/A

Technical Unit Test Plan5-Dec-14

Page 12 of 16 New SAP Programmedocument.docx

Page 13: DMS.docx

Technical Specifications (Report) - SAP DMS_R0005_TDS_DIR Activity Log.docx

DMS_R0005_TDS_DIR Activity

Log.docx

3.7 Sample Report Layout

3.8 Technical Assumptions and Dependencies

1. Transactional data to be maintained where the purchase order number is referenced on the sales order and the sales order number is referenced on the required purchase order for swap deals.

2. Swap deals will be recorded in the SAP system.

Technical Unit Test Plan5-Dec-14

Page 13 of 16 New SAP Programmedocument.docx

Page 14: DMS.docx

Technical Specifications (Report) - SAP DMS_R0005_TDS_DIR Activity Log.docx

DMS_R0005_TDS_DIR Activity

Log.docx

4 Error Handling and Security

Error Handling

Please refer to section 3.2 under selection screen validations.

Security

Access to the report should be controlled by the transaction code assigned to the report. The report can be assigned to a display role with access to all sales areas and sales order types.

Technical Unit Test Plan5-Dec-14

Page 14 of 16 New SAP Programmedocument.docx

Page 15: DMS.docx

Technical Specifications (Report) - SAP DMS_R0005_TDS_DIR Activity Log.docx

DMS_R0005_TDS_DIR Activity

Log.docx

5 Technical Unit Test Plan

Step#

Test Type

Scenario Title

Steps Performed Expected Results

Actual Results

Run By/Date

1 Positive Transaction execution

Execute the transaction ZSD_LINKPURCHASE.

Selection screen will appear.

Please refer to “test_case1”

Koppulvr1/23rd

Sep. 2014

User input : Selection screen

Enter “Selection” criteria. Following validations should take :

Sales Order Number (VBELN)

Sales Order Type (AUART)

Sold-To Party (KUNNR)Sales document date (ERDAT)

Material (MATNR)Purchase Order Number (EBELN)

Created By (ERNAM)Sales Organization (VKORG)Distribution Channel (VTWEG)

Division (SPART)

Sales Office (VKBUR)

Sales Group (VKGRP)

Validations are successful and data is fetched based on the selection criteria.

Please refer to “test_case1”

Koppulvr1/23rd

Sep. 2014

Report Generation

Display an ALV report with hotspot functionality

List of Sales Order is displayed

Please refer to “test_case1”

Koppulvr1/23rd

Sep. 2014

Call Transaction

Using the hotspot functionality in the ALV grid display, click on sales/purchase order no. to jump to respective details.

Transaction VA03 will appear if the sales order no. is clicked.

Transaction ME23N will appear if the purchase order no. is clicked on the ALV grid.

Koppulvr1/23rd

Sep. 2014

2 Negative

Transaction execution

Execute the transaction ZSD_LINKPURCHASE.

Selection screen will appear.

Please refer to “test_case2”

Koppulvr1/23rd

Sep. 2014

Technical Unit Test Plan5-Dec-14

Page 15 of 16 New SAP Programmedocument.docx

Page 16: DMS.docx

Technical Specifications (Report) - SAP DMS_R0005_TDS_DIR Activity Log.docx

DMS_R0005_TDS_DIR Activity

Log.docx

User input : Selection screen

Enter “Selection” criteria. Following validations should take :

Sales Order Number (VBELN)

Sales Order Type (AUART)

Sold-To Party (KUNNR)Sales document date (ERDAT)

Material (MATNR)Purchase Order Number (EBELN)

Created By (ERNAM)Sales Organization (VKORG)Distribution Channel (VTWEG)

Division (SPART)

Sales Office (VKBUR)

Sales Group (VKGRP)

Validations(s) fail. Appropriate Error message(s) is/are displayed. Further processing of data is skipped.

Koppulvr1/23rd

Sep. 2014

3 Negative

Transaction execution

Execute the transaction ZSD_LINKPURCHASE

Selection screen will appear.

Please refer to “test_case3”

Koppulvr1/23rd

Sep. 2014

User input : Selection screen

Enter “Selection” criteria. Following validations should take :

Sales Order Number (VBELN)

Sales Order Type (AUART)

Sold-To Party (KUNNR)

Sales document date (ERDAT)

Material (MATNR)

Purchase Order Number (EBELN)

Created By (ERNAM)

Sales Organization (VKORG)

Distribution Channel (VTWEG)

Division (SPART)

Sales Office (VKBUR)

Sales Group (VKGRP)

Validations are successful. No data is fetched.

Please refer to “test_case3”

Koppulvr1/23rd

Sep. 2014

Report Generation

Error essage should be displayed Error message saying “No data to be displayed” should be thrown and processing should seize.

Koppulvr1/23rd

Sep. 2014

Technical Unit Test Plan5-Dec-14

Page 16 of 16 New SAP Programmedocument.docx