Escolar Documentos
Profissional Documentos
Cultura Documentos
Technical Specification
DMS-R0005 DIR Activity Log
(Report) - SAP
288862153
Document Name
Project Name
Client
Sasol
Document Author
Shruti Priya
Document Version
1.0
Document Status
In Review
Date Released
01-Dec-2014
Date
Additions/Modifications
Prepared/Revised by
1.0
01-Dec-2014
Initial draft
Shruti Priya
Name
Organization/Title
Comments
<Date>
Sourabh Mishra
Deloitte
Initial review
Organization/Title
Araja Reddy
Deloitte
Carl Wilcocks
Functional Consultant
Page ii
288862153
Table of Contents
1
Overview.............................................................................................................................................. 4
General Attributes............................................................................................................................... 5
2.1 Object Information......................................................................................................................... 5
2.2 Custom Object Attributes............................................................................................................... 5
Technical Details................................................................................................................................. 6
3.1 Technical Logic Flow..................................................................................................................... 6
3.2 Program Structure and Processing................................................................................................ 8
3.3 Selection Screen.......................................................................................................................... 11
3.4 Restart Capability........................................................................................................................ 11
3.5 Interactive Functionality............................................................................................................... 12
3.6 Performance Consideration......................................................................................................... 12
3.7 Sample Report Layout................................................................................................................. 12
3.8 Technical Assumptions and Dependencies..................................................................................12
Page iii
DMS_R0005_TDS
_DIR Activity
Log.docx
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.
Page 4 of 17
DMS_R0005_TDS
_DIR Activity
Log.docx
General Attributes
ZSD_DIR_ACTIV
Include Program(s)
Functions
N/A
Area Menu
N/A
Transactions
ZSD_DIR_ACTIV
N/A
Interactive Report
Yes
No
Report Layout
No
Yes Filename:______________
Run Mode
Foreground
Type of Report
Report Painter
ABAP Program
Background
Report Writer
Info System
Both
ALV
Other: __Interactive_____
Low
ZSD_DIR_ACTIV
Description
Logical Database
N/A
Package
ZSD
Editor Lock
Message Class
Yes
No
ZSD_001
Yes
No
Yes
No
Unicode
Yes
No
ZSD_DIR_ACTIV
Description
Development Package
ZSD
Type
Report Transaction
Program/Transaction
ZSD_DIR_ACTIV
Screen Number
1000
Variant
N/A
N/A
Page 5 of 17
DMS_R0005_TDS
_DIR Activity
Log.docx
Technical Details
Page 6 of 17
Page 7 of 17
DMS_R0005_TDS
_DIR Activity
Log.docx
DMS_R0005_TDS
_DIR Activity
Log.docx
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 Plan
4-Dec-14
Page 8 of 17
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_VBAPVBELN 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_VBAKAUART 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_VBAKSUBMI 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_VBAKVBELN 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_VBAPVBELN 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.
Technical Unit Test Plan
4-Dec-14
Page 9 of 17
DMS_R0005_TDS
_DIR Activity
Log.docx
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.
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).
Technical Unit Test Plan
4-Dec-14
Page 10 of 17
DMS_R0005_TDS
_DIR Activity
Log.docx
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
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.
TVAKT-BEZEI
VBAP-POSNR
Sold-To Party
Customer name
Sales document date
Material
Material Description
Purchase Order Number
Created By
Document date
Delivery date
P/O number on S/O
S/O number on P/O
S/O quantity
Sales Uom
Schedule line
Net value
Currency
Sales Organization
Distribution Channel
VBPA-KUNNR
KNA1-NAME1
VBAK-ERDAT
VBAP-MATNR
VBAP-ARKTX
EKKO-EBELN
VBAP-ERNAM
EKKO-AEDAT
VBEP-EDATU
VBAK-SUBMI
EKKO- SUBMI
VBAP- KWMENG
VBAP- VRKME
VBEP- ETENR
VBAP- NETWR
VBAP- WAERK
VBAK-VKORG
VBAK- VTWEG
Page 11 of 17
DMS_R0005_TDS
_DIR Activity
Log.docx
Field on Report
Division
Sales Office
Sales Group
Order Status
VBAK- VKBUR
VBAK- VKGRP
VBUK-GBSTK
Field name
Default
Values
From To
Validation
(Required / Optional)
Select Options
User Name
N/A
Select Options
Document Type
N/A
Select Options
Document
N/A
Select Options
Document Part
N/A
N/A
Select Options
Date
N/A
Checkbox
CV01N (Create)
N/A
Checkbox
Change Status
N/A
N/A
Checkbox
Original
N/A
Checkbox
Classification/Characteris
tics
N/A
Checkbox
Object Links
N/A
Checkbox
Added
N/A
Checkbox
Changed
N/A
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
Page 12 of 17
DMS_R0005_TDS
_DIR Activity
Log.docx
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.
Page 13 of 17
DMS_R0005_TDS
_DIR Activity
Log.docx
Error Handling
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.
Page 14 of 17
DMS_R0005_TDS
_DIR Activity
Log.docx
Step
#
Test
Type
Scenario
Title
Steps Performed
Expected
Results
Actual
Results
Positive
Transaction
execution
Execute
the
ZSD_LINKPURCHASE.
User input :
Selection
screen
transaction
Selection
screen
will
appear.
Validations
are
successful
and data is
fetched
based on the
selection
criteria.
Please refer to
test_case1
Koppulvr1/23rd
Sep. 2014
Please refer to
test_case1
Koppulvr1/23rd
Sep. 2014
Run By/Date
Number
Created By (ERNAM)
Sales
Organization
(VKORG)
Distribution
Channel
(VTWEG)
Division (SPART)
Sales Office (VKBUR)
Sales Group (VKGRP)
Report
Generation
List of Sales
Order
is
displayed
Call
Transaction
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.
Page 15 of 17
Koppulvr1/23rd
Sep. 2014
test_case1.docx
Negativ
e
Transaction
execution
Execute
the
ZSD_LINKPURCHASE.
transaction
Selection
screen
will
appear.
User input :
Selection
screen
Validations(s)
fail.
Appropriate
Error
message(s)
is/are
displayed.
Further
processing of
data
is
skipped.
Number
DMS_R0005_TDS
_DIR Activity
Log.docx
Please refer to
test_case2
Koppulvr1/23rd
Sep. 2014
Koppulvr1/23rd
Sep. 2014
test_case2.docx
Created By (ERNAM)
Sales
Organization
(VKORG)
Distribution
Channel
(VTWEG)
Division (SPART)
Sales Office (VKBUR)
3
Negativ
e
transaction
Selection
screen
will
appear.
Please refer to
test_case3
Koppulvr1/23rd
Sep. 2014
Validations
are
successful.
No data is
fetched.
Please refer to
test_case3
Koppulvr1/23rd
Sep. 2014
Transaction
execution
Page 16 of 17
Page 17 of 17
Error
message
saying
No
data to be
displayed
should
be
thrown
and
processing
should seize.
DMS_R0005_TDS
_DIR Activity
Log.docx
Koppulvr1/23rd
Sep. 2014
test_case3.docx