• No results found

2 Ts Arr-product

N/A
N/A
Protected

Academic year: 2021

Share "2 Ts Arr-product"

Copied!
62
0
0

Loading.... (view fulltext now)

Full text

(1)

Technical Specification for Annual Review Report

for Material

(2)

Title: Technical Specifications for Annual Review Report for Material

Project ID 8000056898 Document ID TS-8000056898 Status :

Department IT BPE Version 1.0 Page 2 of 62

Table of Contents

1. Introduction ... 3

2. Overview ... 3

3. Design Specification ... Error! Bookmark not defined. 3.1 Function 1 – Generation of the report. ... 3

3.2 Function 2 – Viewing and modification of report using Web dynpro ... 44

4. Data ... 59 5. Interfaces ... 60 6. Non-functional Attributes... 60 7. Environment ... 60 8. Glossary ... 60 9. References ... 60

10. Annexure ... Error! Bookmark not defined. Revision History ... 61

(3)

Title: Technical Specifications for Annual Review Report for Material

Project ID 8000056898 Document ID TS-8000056898 Status :

Department IT BPE Version 1.0 Page 3 of 62

1. Introduction

This technical specification document will explain areas where functionalities have to be achieved through technical development with details of all ABAP objects.

2. Overview.

The requirement is to test Annual Review Report for Material where the detail report will be created with combination of manual entry and system generated data for each of the material after a period of one year (review period). There are as many as 19 report for each of the material which will be created at the end of the review period. The reports will reviewed at different level which finally will be consolidated into one PDF report.

3. Design Specification

Function provide testing of Annual Review Report for Material where different report will be generated at the end of the review period of each of the Material. Report will be generated partly by manual intervention and partly by the system. The report will be reviewed at each level with comments by the person responsible. And finally all the reports will be consolidated at the end. There are two major functions to get performed. They are

1. Generation of the report

2. Viewing and modification of the report using Web dynpro and Workflow

3.1

Function 1 – Generation of the report.

Objective – The function will helps to generate report associated with each of the material for the given review period (review period is for one year)

Details of Use – This function is used to extract all the data related to each material entered in the system for the given reviewing period. There are about 19 reports which will extract all the important data in the system in the form of PDF for the given material.

Following are the reports for each material in the given reviewing period.

The logic of extracting the data in the given internal table is done by the function module. And the function module will consolidate the data from the Z-table. The reports are explained below with logic of extracting the data as follow:

# Transaction Code Name of the Table Brief Description of the functionality

1

ZQMT_CPARR_PRDDSC zqm_cto_arr_0151 PRODUCT DESCRIPTION

2

ZQMT_CPARR_REVIEWP zqm_review_per Maintains Review Period of Product

3

ZQMT_CPARR_YIELD zqm_cto_arr_0251

BATCH PRODUCTION AND DISPATCH DETAILS

REVIEW OF REPROCESS & REWORK

4

ZQMT_CPARR_STRT_PK_NS zqm_cto_arr_0551

REVIEW OF STARTING MATERIALS & PACKAGING MATERIALS FROM NEW SOURCE

(4)

Title: Technical Specifications for Annual Review Report for Material

Project ID 8000056898 Document ID TS-8000056898 Status :

Department IT BPE Version 1.0 Page 4 of 62

6

ZQMT_CPARR_OOS_OOTREV zqm_cto_arr_0651 REVIEW OF OOS & OOT RESULTS

7

ZQMT_CPARR_INCDNTREV zqm_cto_arr_0652 REVIEW OF INCIDENTS

8

ZQMT_CPARR_CCTRLREV zqm_cto_arr_0655 REVIEW OF CHANGE CONTROLS

10

ZQMT_CPARR_COMPLREV zqm_cto_arr_0658 REVIEW OF CUSTOMER COMPLAINTS

11

ZQMT_CPARR_RETGDREV zqm_cto_arr_0659 RETURNED GOODS

12

ZQMT_CPARR_RECALL_UL zqm_cto_arr_2051 RECALLS

13

ZQMT_CPARR_PROCESSCNT zqm_cto_arr_0664 REVIEW OF VALIDATION ACTIVITIES

14

ZQMT_CPARR_REGFILSTS zqm_cto_arr_2052 REVIEW OF REGULATORY FILING STATUS

15

ZQMT_CPARR_RESSAMPLES zqm_cto_arr_0661 REVIEW OF RETAINED SAMPLES(FINISHED PRODUCT)

a. Report-1- Product description

The data for this report will be extracted from the z-table which will be updated by the BOM explosion report. The function module will extract the data by giving Plant, year and the material number and will extract Bulk API and the material type for it.

All the fields for table will be directly extract from the z-table except Chemical name and Codes of manufacturing stages

 Chemical name is the description of the material obtained by using the standard functional module of extracting the long text from the material master.

 Code of manufacturing stages- By inputting the material type as INT, KSM, API (or ARR material type) , it will extract the BOM from the z-table.

Logic- This function is achieved through Function module Zqm_cto_arr_9000 &

ABAP programming. Program – ZQM_CTO_ARR_0151 was developed for the report compilation

(5)

Title: Technical Specifications for Annual Review Report for Material

Project ID 8000056898 Document ID TS-8000056898 Status :

Department IT BPE Version 1.0 Page 5 of 62

*---*

*---1.0 PRODUCT DESCRIPTION---*

"code added

DATA : zyear1 TYPE zyear.

zyear1 = zyear + 1. "ended SELECT SINGLE bulk_api arr_mat_type FROM zqm_cto_arr_0151

(6)

Title: Technical Specifications for Annual Review Report for Material

Project ID 8000056898 Document ID TS-8000056898 Status :

Department IT BPE Version 1.0 Page 6 of 62

INTO wa_pr_desc

WHERE bom_component EQ bulk_api AND plant EQ werks

AND zyear EQ zyear .

* AND arr_mat_type EQ 'API'."CODE COMMENTED ON 20/7/2014 wa_pr_desc-arr_mat_type = 'API'.

IF sy-subrc IS INITIAL.

MOVE wa_pr_desc-sap_code TO lv_name.

CALL FUNCTION 'READ_TEXT'

EXPORTING client = sy-mandt id = 'GRUN' language = 'E' name = lv_name object = 'MATERIAL' TABLES lines = it_lines EXCEPTIONS id = 1 language = 2 name = 3 not_found = 4 object = 5 reference_check = 6 wrong_access_to_archive = 7 OTHERS = 8. IF sy-subrc <> 0.

* Implement suitable error handling here ENDIF.

LOOP AT it_lines INTO wa_lines WHERE tdline IS NOT INITIAL.

if sy-tabix eq 1.

CONCATENATE wa_pr_desc-chemical_name wa_lines-TDLINE INTO wa_pr_desc -chemical_name.

else.

CONCATENATE wa_pr_desc-chemical_name wa_lines-TDLINE INTO wa_pr_desc -chemical_name. endif. ENDLOOP. SELECT SINGLE in_housecode "in_housecode_api FROM zqm_cto_arr_0151

INTO wa_pr_desc-name_of_product

WHERE bom_component EQ wa_pr_desc-sap_code.

ENDIF.

SELECT bom_component FROM zqm_cto_arr_0151 INTO TABLE it_pr_desc_int WHERE bulk_api EQ bulk_api AND plant EQ werks

AND zyear EQ zyear "COMMENTED FOR 628 * AND zyear EQ zyear1

AND arr_mat_type EQ 'INT'.

DATA : lv_int_text TYPE ZMAKTX,

lv_int_cnt type int4.

(7)

Title: Technical Specifications for Annual Review Report for Material

Project ID 8000056898 Document ID TS-8000056898 Status :

Department IT BPE Version 1.0 Page 7 of 62

SELECT *

FROM zqm_cto_arr_0151 INTO TABLE it_makt

FOR ALL ENTRIES IN it_pr_desc_int

WHERE bom_component EQ it_pr_desc_int-sap_code and arr_mat_type = 'INT'.

IF sy-subrc IS INITIAL.

LOOP AT it_pr_desc_int ASSIGNING <fs_it_pr_desc_int>.

lv_int_text = <fs_it_pr_desc_int>-sap_code.

lv_int_cnt = sy-tabix.

if SY-TABIX ne 1 and <fs_it_pr_desc_int>-sap_code = lv_int_text.

READ TABLE it_makt INTO wa_makt INDEX lv_int_cnt.

IF sy-subrc IS INITIAL.

<fs_it_pr_desc_int>-in_house = wa_makt -in_housecode_api.

CLEAR wa_makt.

endif.

ELSE.

READ TABLE it_makt INTO wa_makt

WITH KEY bom_component = <fs_it_pr_desc_int> -sap_code.

IF sy-subrc IS INITIAL.

<fs_it_pr_desc_int>-in_house = wa_makt-in_housecode_api.

CLEAR wa_makt. ENDIF. ENDIF. ENDLOOP. ENDIF. ENDIF. SELECT bom_component FROM zqm_cto_arr_0151 INTO TABLE it_pr_desc_ksm WHERE bulk_api EQ bulk_api AND plant EQ werks

AND zyear EQ zyear * AND zyear EQ zyear1 AND arr_mat_type EQ 'KSM'.

IF it_pr_desc_ksm[] IS NOT INITIAL.

SELECT *

FROM zqm_cto_arr_0151 INTO TABLE it_makt

FOR ALL ENTRIES IN it_pr_desc_ksm

WHERE bom_component EQ it_pr_desc_ksm-sap_code and arr_mat_type = 'KSM'.

IF sy-subrc IS INITIAL.

LOOP AT it_pr_desc_ksm ASSIGNING <fs_it_pr_desc_ksm>.

READ TABLE it_makt INTO wa_makt

WITH KEY bom_component = <fs_it_pr_desc_ks m>-sap_code.

IF sy-subrc IS INITIAL.

<fs_it_pr_desc_ksm>-in_house = wa_makt -in_housecode_api.

CLEAR wa_makt.

(8)

Title: Technical Specifications for Annual Review Report for Material

Project ID 8000056898 Document ID TS-8000056898 Status :

Department IT BPE Version 1.0 Page 8 of 62

ENDLOOP.

ENDIF.

ENDIF.

b. Report -2- Batch production and dispatch details This report consists of three sections as given below

b.1 Summery of Production of Intermediate and API’s Batch

The fields will be extracted from the z-table already filled up by the report program using the SAP data base. The data will be extracted by the function module by giving the material number, Plant and the review period as the input.

 Product stages is the primary key and consists of either API or INT material type. On the basis of this the data will get extracted from the Z-table.

 Material code and Product stage code will be obtained from the z-table used for Report-1  No of Batches Manufactured – group batches by taking the movement type 101 and 102

(that is good issue and good return). Condition should be batches for 101 good movement plus batches for 102 good movement will be greater than 0

 Quantity Manufactured - Use table MSEG , Pass the INT and API Material's along with plant and filter with Movement type 101 and 102 for the review period and get the Batch & Quantity details along with UOM (Unit of Measurement)

 UOM (Unit Of Measurement)- It uses standard SAP table MSEG

*--- ---* *---2.1 Summary of production ---* REFRESH : it_makt1. CLEAR wa_makt. CLEAR: lv_str_code, lv_str_des, wa_makt. SELECT matnr bulk_api batch_count menge meins maktx postp DAUAT "added on 1/9/2014 FROM zqm_cto_arr_0251

INTO TABLE it_pr WHERE

bulk_api EQ bulk_api AND zyear EQ zyear AND werks EQ werks.

IF sy-subrc IS INITIAL.

SELECT *

FROM zqm_cto_arr_0151 INTO TABLE it_makt1 FOR ALL ENTRIES IN it_pr WHERE bulk_api EQ it_pr-matnr.

SELECT * from T003P

(9)

Title: Technical Specifications for Annual Review Report for Material

Project ID 8000056898 Document ID TS-8000056898 Status :

Department IT BPE Version 1.0 Page 9 of 62

FOR ALL ENTRIES IN it_pr WHERE AUART eq it_pr-DAUAT.

ENDIF.

IF sy-subrc IS INITIAL.

LOOP AT it_pr INTO wa_pr.

COLLECT wa_pr INTO it_pr_cumulate.

CLEAR wa_pr.

ENDLOOP.

LOOP AT it_pr_cumulate INTO wa_pr.

READ TABLE it_makt1 INTO wa_makt WITH KEY bom_componen t = wa_pr-matnr.

CALL FUNCTION 'CONVERSION_EXIT_MATN1_OUTPUT'

EXPORTING

input = wa_pr-matnr IMPORTING

output = wa_pr-matnr.

lv_str_code = wa_makt-in_housecode_api.

* SPLIT wa_makt-in_housecode_api AT '(' INTO * lv_str_code

* lv_str_des.

* REPLACE ')' WITH ' ' INTO * lv_str_des.

IF wa_pr-postp EQ 'ARR' OR wa_pr

-postp EQ 'ARR1' OR wa_pr-postp EQ 'ARR2' OR wa_pr -postp EQ 'ARR3'.

wa_pr-postp = 'API'.

ENDIF.

CONCATENATE

wa_pr-matnr ' ' '(' wa_pr-postp ')'

INTO wa_batch_pr-pr_stage.

wa_batch_pr

-pr_stage_code = lv_str_code.

wa_batch_pr-batch_count = wa_pr -batch_count.

wa_batch_pr-qty_manufactured = wa_pr -menge.

wa_batch_pr-meins = wa_pr -meins.

READ TABLE it_t003p INTO wa_t003p WITH KEY auart = wa _pr-dauat.

wa_batch_pr-TXT = wa_t003p -txt.

APPEND wa_batch_pr TO it_batch_pr.

CLEAR wa_batch_pr. CLEAR lv_str_code. CLEAR lv_str_des. CLEAR wa_makt. ENDLOOP. ENDIF.

b.2 Dispatch details of the product against the sales order

In this part function module will be used to extract the data from the Z-table as well as from the standard SAP table.

(10)

Title: Technical Specifications for Annual Review Report for Material

Project ID 8000056898 Document ID TS-8000056898 Status :

Department IT BPE Version 1.0 Page 10 of 62

 A Z table has to be created where in Market and country name will be maintained  A Z table has to be created which updates the dispatched details of 35 series material for

the current year.

 Material code- will be obtained from Report -1

 Market name- Pass the API material in MSEG table along with 261 movement type, get the details of Sales Order. Pass the Sales Order into VBAK table, get the KGVR4 to get the Country name. Check the Country name in Z table where country name and Market name is maintained. Pick the Market name and populate.

 Dispatch quantity- Pass the Sales order into LIPS table against movement type 601 and get the Dispatched quantity. Populate this quantity as dispatched quantity.

 UOM (Unit Of Measurement)- It uses standard SAP table MSEG b.3 Dispatch details of the product against STO.

In this part function module will be used to extract the data from the Z-table as well as from the standard SAP table.

 Material code- will be obtained from Report -1

 FTO unit- Pass the API material in MSEG table along with 261 movement type to get the details of Process order. Pass the Process Order into AFPO and get the FTO Unit No,  Dispatch quantity- Pass the API material in MSEG table along with 261 movement type

to get the details of Process order. Pass the Process Order into AFPO and get the FTO Unit No and get the quantity using 603 movement type.

 UOM (Unit Of Measurement)- It uses standard SAP table MSEG

*---* *---2.2 Dispatch details---* CLEAR: lv_tot_sum, lv_serial_no, wa_disp_mar_tot. SELECT market_desc lfimg meins FROM zqm_cto_arr_0351 INTO TABLE it_disp

WHERE bulk_api EQ bulk_api AND werks EQ werks

AND zyear EQ zyear.

IF sy-subrc IS INITIAL.

LOOP AT it_disp INTO wa_disp_sos.

lv_tot_sum = lv_tot_sum + wa_disp_sos -lfimg.

wa_disp_mar_tot-total_quan = lv_tot_sum.

wa_disp_mar_tot-uom = wa_disp_sos-uom.

COLLECT wa_disp_sos INTO it_disp_sos.

ENDLOOP.

CLEAR wa_disp_sos.

LOOP AT it_disp_sos INTO wa_disp_sos.

lv_serial_no = lv_serial_no + 1.

wa_disp_sos-serial_no = lv_serial_no.

MODIFY it_disp_sos FROM wa_disp_sos.

ENDLOOP.

(11)

Title: Technical Specifications for Annual Review Report for Material

Project ID 8000056898 Document ID TS-8000056898 Status :

Department IT BPE Version 1.0 Page 11 of 62

CLEAR wa_disp_sto_tot. CLEAR lv_serial_no. CLEAR lv_tot_sum. SELECT werks1 lfimg meins FROM zqm_cto_arr_0352 INTO TABLE it_disp1

WHERE bulk_api EQ bulk_api AND werks EQ werks

AND zyear EQ zyear.

IF sy-subrc IS INITIAL.

LOOP AT it_disp1 INTO wa_disp_sto.

lv_tot_sum = lv_tot_sum + wa_disp_sto -lfimg.

wa_disp_sto_tot-total_quan = lv_tot_sum.

wa_disp_sto_tot-uom = wa_disp_sos-uom.

COLLECT wa_disp_sto INTO it_disp_sto.

ENDLOOP.

* lv_disp_sum = lv_tot_sum. CLEAR wa_disp_sto.

LOOP AT it_disp_sto INTO wa_disp_sto.

lv_serial_no = lv_serial_no + 1.

wa_disp_sto-serial_no = lv_serial_no.

MODIFY it_disp_sto FROM wa_disp_sto.

ENDLOOP.

ENDIF.

c. Report-3- Review of quality trends of API Starting material.

This reports will give the trend of the API as the Starting material. The function module will be used to extract the trend of the each of the character assigned to the API product with respect to the batch used for the product.

There will be as many as 40 column maintained for the given batch which will be dynamically extracted with the MIC (Maintenance Inspection characteristics) value from the Z-table for given product.

The data will be extracted on the basis of the Product number, plant and the review period.  All API Starting materials should be taken into account

 API Starting material- Material extracted with Item category "5" from BOM of Bulk API  Chemical name- using the standard function module extract the long text from the

material master of the given product

 Specification Ref No- It will be extracted using the Task list Header of the given inspection lot number of the given batch and the product in the review period.

 Batch No- API Starting material will be obtained from the table MSEG table and further on the basis of Material/Plant/101 Batch for the review period will be extracted.

 Batch-->QALS->Group and Counter Pass Group and Counter-->PLMK-->Characteristics and KURZTEXT and populate in dynamic columns

 If the Characteristics is Qualitative, then for the assigned MIC, the Catalog type, Selected set indicator/Selected set /Catalog group for the plant read the long text using FM READ_TEXT and find out the long text description for the" code "starting with "S" and should be populated in above.

(12)

Title: Technical Specifications for Annual Review Report for Material

Project ID 8000056898 Document ID TS-8000056898 Status :

Department IT BPE Version 1.0 Page 12 of 62

 If the Characteristics is Quantitative, then for the assigned MIC, the Specification limit along with UOM is to be populated along with the MIC description in col1,2,3 as shown below.

 IL will be extracted from QAMR , for each characteristics, find out the Recorded values(ISTSTPUMF) Values. If this charac is qualitative, Get the Code group and code details field and the corresponding Long text using FM READ_TEXT.If this is recorded value is 1 and characteristic is quantitative, get the Original value filed and populate in table as value for the charac.If recorded values is more than 1, Pass the IL in QASE table, get the Original value field for all the values and populate in table.

 Mean, sigma, 3 sigma and Standard deviation will be calculated automatically and on the basis of this for given batch and product the graph will be populated.

Logic- This function is achieved through Function module Zqm_cto_arr_9013,

ZQM_CTO_ARR_9014 & ABAP programming. Program – ZQM_CTO_ARR_0458 was developed for the

report compilation

(13)

Title: Technical Specifications for Annual Review Report for Material

Project ID 8000056898 Document ID TS-8000056898 Status :

Department IT BPE Version 1.0 Page 13 of 62

These FM inturn uses Tables ZQM_CTO_ARR_0451 & ZQM_CTO_ARR_0452. The below FM ‘ZQM_CTO_ARR_9051’ generates Graph based on Mean values. g_ixml = cl_ixml=>create( ).

refresh mime.

perform create_data_demo using l_ixml_data_doc.

* perform create_custom_demo using l_ixml_custom_doc. create object l_igs_ce

exporting

destination = 'IGS_RFC_DEST'.

call function 'SCMS_BINARY_TO_XSTRING'

exporting input_length = content_length * FIRST_LINE = 0 * LAST_LINE = 0 importing buffer = l_xstream tables binary_tab = mime * EXCEPTIONS * FAILED = 1 * OTHERS = 2 .

call function 'SSFC_BASE64_ENCODE'

exporting bindata = l_xstream importing b64data = chartstring. xstring = l_xstream. if sy-subrc <> 0.

* Implement suitable error handling here endif.

clear l_cached_response.

create object l_cached_response type

cl_http_response exporting

add_c_msg = 1.

l_cached_response->set_data( l_xstream ).

l_cached_response

->set_header_field( name = if_http_header_fields=>content_type value = 'imag

e/bmp' ).

l_cached_response->set_status( code = 200 reason = 'OK' ).

l_cached_response->server_cache_expire_rel( expires_rel = 300 ).

concatenate 'HTTP://ECCDCS1S.MYDRREDDYS.COM:8001/sap/bc/webdynpro/sap/zte st_pk'

'/image1.bmp' into l_image_url1.

(14)

Title: Technical Specifications for Annual Review Report for Material

Project ID 8000056898 Document ID TS-8000056898 Status :

Department IT BPE Version 1.0 Page 14 of 62

ed_response ). * call method clear url. url = l_image_url1. * endif. endfunction. *&---* *& Form create_data_demo

*&---* * text

*---* * -->P_IXML_DOC text

*---*

form create_data_demo using p_ixml_doc type ref to if_ixml_document.

data: l_simplechartdata type ref to if_ixml_element,

l_categories type ref to if_ixml_element,

l_series type ref to if_ixml_element,

l_element type ref to if_ixml_element,

* l_text type ref to if_ixml_element, l_encoding type ref to if_ixml_encoding,

l_globalsettings type ref to if_ixml_element,

string1 type string,

string2 type string.

data:

igs_chart type ref to cl_igs_chart,

line type igs_data,

data type igs_data_tab,

l_igs_ce type ref to cl_igs_chart_engine,

ext_line type igs_ext,

extension type igs_ext_tab,

html type w3htmltabtype,

html_line type w3html,

content_type type w3param-cont_type,

content_subtype type w3param-cont_type,

p_html type w3htmltabtype,

g_html_control type ref to cl_gui_html_viewer.

* CREATE OBJECT g_html_control. * EXPORTING

* parent = cl_gui_container=>default_screen. p_ixml_doc = g_ixml->create_document( ).

l_encoding = g_ixml->create_encoding(

byte_order = if_ixml_encoding=>co_little_endian character_set = 'utf-8' ).

p_ixml_doc->set_encoding( l_encoding ).

* empty result table refresh p_html.

(15)

Title: Technical Specifications for Annual Review Report for Material

Project ID 8000056898 Document ID TS-8000056898 Status :

Department IT BPE Version 1.0 Page 15 of 62

* create chart object create object igs_chart.

if chart_type1 = 'LINES' or chart_type1 = 'LINE'.

igs_chart->type = cl_igs_chart=>co_type_lines.

else.

* set chart type

igs_chart->type = cl_igs_chart=>co_type_cols.

endif.

* igs_chart->CO_SCHEME_STRAIGHT = 'STRAIGHT'. * set picture size

igs_chart->width = 3600." 2300."1600. "1000. igs_chart->height = 700. "450. ".270

* some data to be displayed if nos ge '1'.

line-groupid = series1.

loop at it_table into wa_table.

string1 = wa_table-x_axis.

string2 = wa_table-i_val.

line-x = string1. line-y = string2. * if sy-tabix = 3. * line-datalabel = string1. * ENDIF. * line-extension = 'href="http://www.sap.com"'. append line to data.

clear string1. clear string2. clear wa_table. endloop. endif. if nos ge '2'.

line-groupid = series2.

loop at it_table into wa_table.

string1 = wa_table-x_axis.

string2 = wa_table-i_val1.

line-x = string1.

line-y = string2.

* line-extension = 'href="http://www.sap.com"'. append line to data.

clear string1. clear string2. clear wa_table. endloop. endif. if nos ge '3'.

line-groupid = series3.

loop at it_table into wa_table.

string1 = wa_table-x_axis.

string2 = wa_table-i_val2.

line-x = string1.

line-y = string2.

* line-extension = 'href="http://www.sap.com"'. append line to data.

(16)

Title: Technical Specifications for Annual Review Report for Material

Project ID 8000056898 Document ID TS-8000056898 Status :

Department IT BPE Version 1.0 Page 16 of 62

clear string1. clear string2. clear wa_table. endloop. endif. if nos ge '4'.

line-groupid = series4.

loop at it_table into wa_table.

string1 = wa_table-x_axis.

string2 = wa_table-i_val3.

line-x = string1.

line-y = string2.

* line-extension = 'href="http://www.sap.com"'. append line to data.

clear string1. clear string2. clear wa_table. endloop. endif. if nos ge '5'.

line-groupid = series5.

loop at it_table into wa_table.

string1 = wa_table-x_axis.

string2 = wa_table-i_val4.

line-x = string1.

line-y = string2.

* line-extension = 'href="http://www.sap.com"'. append line to data.

clear string1. clear string2. clear wa_table. endloop. endif. if nos ge '6'.

line-groupid = series6.

loop at it_table into wa_table.

string1 = wa_table-x_axis.

string2 = wa_table-i_val5.

line-x = string1.

line-y = string2.

* line-extension = 'href="http://www.sap.com"'. append line to data.

clear string1. clear string2. clear wa_table. endloop. endif. if nos ge '7'.

line-groupid = series7.

loop at it_table into wa_table.

string1 = wa_table-x_axis.

string2 = wa_table-i_val6.

line-x = string1.

(17)

Title: Technical Specifications for Annual Review Report for Material

Project ID 8000056898 Document ID TS-8000056898 Status :

Department IT BPE Version 1.0 Page 17 of 62

* line-extension = 'href="http://www.sap.com"'. append line to data.

clear string1. clear string2. clear wa_table. endloop. endif. if nos ge '8'.

line-groupid = series8.

loop at it_table into wa_table.

string1 = wa_table-x_axis.

string2 = wa_table-i_val7.

line-x = string1.

line-y = string2.

* line-extension = 'href="http://www.sap.com"'. append line to data.

clear string1. clear string2. clear wa_table. endloop. endif. if nos ge '9'.

line-groupid = series9.

loop at it_table into wa_table.

string1 = wa_table-x_axis.

string2 = wa_table-i_val8.

line-x = string1.

line-y = string2.

* line-extension = 'href="http://www.sap.com"'. append line to data.

clear string1.

clear string2.

clear wa_table.

endloop.

endif.

igs_chart->data = data.

* set titles

igs_chart->title = header.

igs_chart->title_values = y_axis.

igs_chart->title_categories = x_axis.

* igs_chart->SUBTITLE = 'abcd'. * set some extensions

ext_line-token = 'TITLE'.

* ext_line-value = 'href="http://www.sap.com"'. append ext_line to extension.

ext_line-token = 'LGNDI'.

* ext_line-value = 'href="http://www.spiegel.de"'. append ext_line to extension.

(18)

Title: Technical Specifications for Annual Review Report for Material

Project ID 8000056898 Document ID TS-8000056898 Status :

Department IT BPE Version 1.0 Page 18 of 62

* create picture

" commtnting for testing start... call method igs_chart->send

importing content_type = content_type content_length = content_length content = mime imagemap = html exceptions rfc_communication_error = 1 rfc_system_error = 2 internal_error = 3 others = 4.

" commtnting for testing end...

* IF sy-subrc IS INITIAL AND p_real NE space.

* SPLIT content_type AT '/' INTO content_type content_subtype. * CALL METHOD g_html_control->load_data

* EXPORTING * type = content_type * subtype = content_subtype * size = content_length * IMPORTING * assigned_url = url * CHANGING * data_table = mime. * ENDIF. endform. " create_data_demo

d. Report-4- Review of starting material and Packaging material from new source.

Here the report will be having two sections where the data will be extracted by taking the combination of Product number, plant and review period.

 Function module will be used to extract the data from the Z-table for the Raw Material considering the material type as VERP

 Function module will be used to extract the data from the Z-table for the Packing Material considering the material type as KSM

*---* *---4.1 Raw Materials---* REFRESH: IT_MAKT1. CLEAR: WA_MAKT.

LV_TOTAL_D = 'Total no. of vendors approved during the review period:'.

LV_TOT = 'Total no. of vendor evaluation under progress during the review

period:'.

LV_TOT_D = 'Total no. of vendor rejected/blocked during the review period :'.

CLEAR LV_SERIAL_NO.

SELECT *

FROM ZQM_CTO_ARR_0551

INTO CORRESPONDING FIELDS OF TABLE IT_RAW WHERE

BULK_API EQ BULK_API AND WERKS EQ WERKS

(19)

Title: Technical Specifications for Annual Review Report for Material

Project ID 8000056898 Document ID TS-8000056898 Status :

Department IT BPE Version 1.0 Page 19 of 62

AND ZYEAR EQ ZYEAR AND POSTP NE 'VERP'.

IF SY-SUBRC IS INITIAL.

SELECT *

FROM ZQM_CTO_ARR_0151

INTO CORRESPONDING FIELDS OF TABLE IT_MAKT1 FOR ALL ENTRIES IN IT_RAW

WHERE BOM_COMPONENT EQ IT_RAW-MATNR.

ENDIF.

* IF sy-subrc IS INITIAL. "commented on 25/8/2014 LOOP AT IT_RAW INTO WA_RAW.

READ TABLE IT_MAKT1 INTO WA_MAKT WITH KEY BOM_COMPONENT = WA_RAW -MATNR.

LV_SERIAL_NO = LV_SERIAL_NO + 1.

CALL FUNCTION 'CONVERSION_EXIT_MATN1_OUTPUT'

EXPORTING

INPUT = WA_RAW-MATNR IMPORTING

OUTPUT = WA_RAW-MATNR.

CONCATENATE WA_RAW-MATNR '(' WA_MAKT-IN_HOUSECODE_API ')'

INTO WA_RAW_MAT-MATNR_DES.

WA_RAW_MAT-SERIAL_NO = LV_SERIAL_NO.

WA_RAW_MAT-SOURCE_DETAIL = WA_RAW-SOURCE_DETAIL.

WA_RAW_MAT-VENDOR_STATUS = WA_RAW-VENDOR_STATUS.

WA_RAW_MAT-DATUV = WA_RAW-DATUV.

WA_RAW_MAT-ZBLOCK_REASON = WA_RAW-ZBLOCK_REASON.

IF WA_RAW_MAT-VENDOR_STATUS = 'Approved vendor'.

LV_APPROVED = LV_APPROVED + 1.

ELSEIF WA_RAW_MAT-VENDOR_STATUS = 'Provisional vendor'.

LV_U_EVAL = LV_U_EVAL + 1.

ELSEIF ( WA_RAW_MAT-VENDOR_STATUS = 'Rejected vendor' OR WA_RAW_MAT -VENDOR_STATUS = 'Blocked vendor' ).

LV_REJECTED = LV_REJECTED + 1.

ENDIF.

APPEND WA_RAW_MAT TO IT_RAW_MAT.

CLEAR WA_RAW_MAT.

CLEAR WA_RAW.

ENDLOOP.

LV_APPROVED = LV_SERIAL_NO.

CONCATENATE LV_TOTAL_D LV_APPROVED INTO LV_DESC1_S.

CONCATENATE LV_TOT LV_U_EVAL INTO LV_DESC2_S.

CONCATENATE LV_TOT_D LV_REJECTED INTO LV_DESC3_S.

CONCATENATE LV_DESC1_S LV_DESC2_S LV_DESC3_S INTO WA_RAW_SU -SYS_MSG SEPARATED BY NEWLINE.

IF IT_RAW IS INITIAL.

LV_APPROVED = 'NIL'.

LV_U_EVAL = 'NIL'.

LV_REJECTED = 'NIL'.

CONCATENATE LV_TOTAL_D LV_APPROVED INTO LV_DESC1_S.

CONCATENATE LV_TOT LV_U_EVAL INTO LV_DESC2_S.

CONCATENATE LV_TOT_D LV_REJECTED INTO LV_DESC3_S.

CONCATENATE LV_DESC1_S LV_DESC2_S LV_DESC3_S INTO WA_RAW_SU -SYS_MSG SEPARATED BY NEWLINE.

ENDIF.

* ENDIF. "commented on 25/8/2014 CLEAR WA_MAKT.

(20)

Title: Technical Specifications for Annual Review Report for Material

Project ID 8000056898 Document ID TS-8000056898 Status :

Department IT BPE Version 1.0 Page 20 of 62

REFRESH IT_MAKT1. *---* *---4.2 Packaging Materials---* REFRESH: IT_MAKT1. CLEAR WA_MAKT. CLEAR: LV_SERIAL_NO, LV_APPROVED, LV_U_EVAL, LV_REJECTED, LV_DESC1_S, LV_DESC2_S, LV_DESC3_S. LV_SERIAL_NO = 0. LV_APPROVED = 0. LV_U_EVAL = 0. LV_REJECTED = 0. SELECT * FROM ZQM_CTO_ARR_0551

INTO CORRESPONDING FIELDS OF TABLE IT_PACK WHERE

BULK_API EQ BULK_API AND WERKS EQ WERKS AND ZYEAR EQ ZYEAR AND POSTP NE 'KSM'.

IF SY-SUBRC IS INITIAL.

SELECT *

FROM ZQM_CTO_ARR_0151 INTO TABLE IT_MAKT1

FOR ALL ENTRIES IN IT_PACK WHERE BULK_API = IT_PACK-MATNR.

ENDIF.

* IF sy-subrc IS INITIAL.

LOOP AT IT_PACK INTO WA_PACK.

READ TABLE IT_MAKT1 INTO WA_MAKT WITH KEY BULK_API = WA_PACK-MATNR.

LV_SERIAL_NO = LV_SERIAL_NO + 1.

CALL FUNCTION 'CONVERSION_EXIT_MATN1_OUTPUT'

EXPORTING

INPUT = WA_PACK-MATNR IMPORTING

OUTPUT = WA_PACK-MATNR.

CONCATENATE WA_PACK-MATNR '(' WA_MAKT-IN_HOUSECODE_API ')'

INTO WA_PACK_MAT-MATNR_DES.

WA_PACK_MAT-SERIAL_NO = LV_SERIAL_NO.

WA_PACK_MAT-SOURCE_DETAIL = WA_PACK-SOURCE_DETAIL.

WA_PACK_MAT-VENDOR_STATUS = WA_PACK-VENDOR_STATUS.

WA_PACK_MAT-DATUV = WA_PACK-DATUV.

WA_PACK_MAT-ZBLOCK_REASON = WA_PACK-ZBLOCK_REASON.

IF WA_PACK_MAT-VENDOR_STATUS = 'Approved vendor'.

LV_APPROVED = LV_APPROVED + 1.

ELSEIF WA_PACK_MAT-VENDOR_STATUS = 'Provisional vendor'.

LV_U_EVAL = LV_U_EVAL + 1.

ELSEIF ( WA_PACK_MAT

(21)

-Title: Technical Specifications for Annual Review Report for Material

Project ID 8000056898 Document ID TS-8000056898 Status :

Department IT BPE Version 1.0 Page 21 of 62

VENDOR_STATUS = 'Blocked vendor' ).

LV_REJECTED = LV_REJECTED + 1.

ENDIF.

APPEND WA_PACK_MAT TO IT_PACK_MAT.

CLEAR WA_PACK_MAT.

CLEAR WA_PACK.

ENDLOOP.

CONCATENATE LV_TOTAL_D LV_APPROVED INTO LV_DESC1_S.

CONCATENATE LV_TOT LV_U_EVAL INTO LV_DESC2_S.

CONCATENATE LV_TOT_D LV_REJECTED INTO LV_DESC3_S.

CONCATENATE LV_DESC1_S LV_DESC2_S LV_DESC3_S INTO WA_PACK_SU -SYS_MSG SEPARATED BY NEWLINE.

IF IT_PACK IS INITIAL.

LV_APPROVED = 'NIL'.

LV_U_EVAL = 'NIL'.

LV_REJECTED = 'NIL'.

CONCATENATE LV_TOTAL_D LV_APPROVED INTO LV_DESC1_S.

CONCATENATE LV_TOT LV_U_EVAL INTO LV_DESC2_S.

CONCATENATE LV_TOT_D LV_REJECTED INTO LV_DESC3_S.

CONCATENATE LV_DESC1_S LV_DESC2_S LV_DESC3_S INTO WA_PACK_SU -SYS_MSG SEPARATED BY NEWLINE.

ENDIF.

* ENDIF.

CLEAR WA_MAKT.

REFRESH IT_MAKT1.

e. Report-5- Review of quality and yield trends of Intermediate stages of materials This report extraction is exactly similar like that of Report-3 on the basis of two trends

 Quality Trend- Where the quality trend of the intermediate product of the Bulk API will be extracted and the value will be captured along with the quality trend graph. The intermediate product will be obtained from the formation of the BOM explosion of the Bulk API from the Z-table. The characteristics will be obtained from the Z-table.

CALL FUNCTION 'ZQM_CTO_ARR_9013'

EXPORTING BULK_API = LV_BULK WERKS = LV_WERKS ZYEAR = LV_YEAR ARR_MAT_TYPE = ARR_MAT_TYPE * INSP_LOT_ORIGIN = * INSP_TYPE = TABLES * IT_MAT_ALL = IT_MAT_K_ALL * IT_CPP_ALL = IT_QT_ALL = IT_QT_K_ALL_I * IT_YT_ALL = * IT_CPP_BPR = * IT_YT_BPR =

IT_QYT = IT_K_QYT_I. "MATNR *"QUALITY

CALL FUNCTION 'ZQM_CTO_ARR_9014'

EXPORTING

BULK_API = LV_BULK WERKS = LV_WERKS ZYEAR = LV_YEAR

(22)

Title: Technical Specifications for Annual Review Report for Material

Project ID 8000056898 Document ID TS-8000056898 Status :

Department IT BPE Version 1.0 Page 22 of 62

ARR_MAT_TYPE = ARR_MAT_TYPE TABLES * it_mat_all = it_mat_K_all IT_QT_MAT_ALL = IT_QT_K_ALL_I IT_QT_MIC_HDR = IT_QT_MIC_K_HDR_I IT_QT_MIC_VALUE = IT_QT_MIC_K_VALUE_I IT_QT_MIC_MEAN = IT_QT_MIC_K_MEAN_I.

The above Function modules used the table ZQM_CTO_ARR_0451 which holds MIC description and ZQM_CTO_ARR_0452 which holds result values.

 Yield Trend- This will be obtained using the function module from the standard Z-table for the given batch of the intermediate products for the Bulk API product. And Yield Graph will be triggered on the basis of the data extracted.

* "YIELD

CALL FUNCTION 'ZQM_CTO_ARR_9016'

EXPORTING BULK_API = LV_BULK WERKS = LV_WERKS ZYEAR = LV_YEAR TABLES IT_MAT_ALL = IT_MAT_I_ALL IT_YT_ALL_BPR = IT_YT_I_BPR IT_YT_ALL_INC = IT_YT_I_ALL IT_YT_INCIDENT = IT_YT_I_INCIDENT IT_YT_QUANTITY = IT_YT_I_QUANTITY IT_HDR_MSG = IT_HDR_I_MSG.

f. Report-6- Review of quality and yield trends of API (Finished ) stage of product

This report has 3 sections and the data will be extracted using the function module from the Z-table. The data extraction will be similar to that of the report-5 but this will be for the finished product (API product type). The data will be extracted on the basis of the Product number, Plant and the review period.

 Critical parameters trend  Quality trend and Yield trend

For the Quality trend and the Yield trend graphs will be displayed as per the data extracted using the function module ZQM_CTO_ARR_9016

IT_YT_BPR_mat_unique[] = IT_YT_ALL_BPR[].

sort IT_YT_BPR_mat_unique by matnr.

delete ADJACENT DUPLICATES FROM IT_YT_BPR_mat_unique COMPARING matnr.

loop at IT_YT_BPR_mat_unique into wa_yt_bpr_mat_unique.

it_quantity[] = IT_YT_ALL_BPR[].

delete it_quantity where matnr ne wa_yt_bpr_mat_unique -matnr . "it_quantity contain 1 matnr quntity records it_incident[] = it_yt_all_inc[].

delete it_incident WHERE matnr ne wa_yt_bpr_mat_unique -matnr. "it_incident contain 1 matnr quntity records it_quantity_bpr[] = it_quantity[].

SORT it_quantity_bpr by FORM_NUM.

delete ADJACENT DUPLICATES FROM it_quantity_bpr COMPARING FORM_NUM.

"contain unique bpr number

(23)

Title: Technical Specifications for Annual Review Report for Material

Project ID 8000056898 Document ID TS-8000056898 Status :

Department IT BPE Version 1.0 Page 23 of 62

it_quantity_charg[] = it_quantity[].

delete it_quantity_charg WHERE FORM_NUM ne wa_quantity_bpr-FORM_NUM.

"->start counter for next internal table and work area . lv_total_review = 0. lv_serial_no = 0. lv_serial_no2 = 0. lv_outside_p3s = 0 . lv_outside_m3s = 0 . lv_total_review = 0. lv_fails_yield_limit = 0 . lv_devition = 0 .

LOOP AT it_quantity_charg INTO wa_quantity_charg.

lv_serial_no = lv_serial_no + 1.

wa_yt_quantity-serial_no = lv_serial_no .

wa_yt_quantity-matnr = wa_quantity_bpr-matnr.

wa_yt_quantity-bpr_ref_no = wa_quantity_bpr-form_num.

wa_yt_quantity-batch_no = wa_quantity_charg-charg.

wa_yt_quantity-quantity = wa_quantity_charg -menge. "HERE MEINS REQUIRED TO CHANGE IN KG

lv_unit = wa_quantity_charg-meins.

APPEND wa_yt_quantity TO it_yt_quantity_temp. " it will contain data f or only 1 bpr

**->populate Details of Yield deviation batches:

LOOP AT it_incident INTO wa_incident WHERE charg = wa_quantity_char g-charg. "l00p

MOVE wa_incident-qmnum TO lv_name.

CALL FUNCTION 'READ_TEXT'

EXPORTING * CLIENT = SY-MANDT id = 'LTQM' language = 'E' name = lv_name object = 'QMEL' TABLES lines = it_lines EXCEPTIONS id = 1 language = 2 name = 3 not_found = 4 object = 5 reference_check = 6 wrong_access_to_archive = 7 OTHERS = 8. IF sy-subrc <> 0.

* Implement suitable error handling here ENDIF.

(24)

Title: Technical Specifications for Annual Review Report for Material

Project ID 8000056898 Document ID TS-8000056898 Status :

Department IT BPE Version 1.0 Page 24 of 62

IF lv_start_line IS INITIAL.

IF wa_lines-tdline CS 'Description of incident'.

lv_start_line = 'X'.

ENDIF.

ELSE.

IF wa_lines-tdline CS 'Immediate Correction done'.

EXIT.

ELSE.

CONCATENATE lv_desc wa_lines -tdline INTO lv_desc SEPARATED BY space.

ENDIF.

ENDIF.

ENDLOOP.

" lv_total_review = lv_total_review + 1. lv_serial_no2 = lv_serial_no2 + 1.

wa_yt_incident-serial_no = lv_serial_no2.

wa_yt_incident-batch_no = wa_incident-charg.

wa_yt_incident-incident_no = wa_incident-qmnum.

wa_yt_incident-incident_date = wa_incident-erdat.

wa_yt_incident-incident_desc = lv_desc.

wa_yt_incident-batch_status = wa_incident -kurztext.

wa_yt_incident-stat = wa_incident-stat.

wa_yt_incident-matnr = wa_incident-matnr.

wa_yt_incident-bpr_ref_no = wa_quantity_charg -form_num.

APPEND wa_yt_incident TO IT_YT_INCIDENT.

CLEAR:wa_incident,wa_yt_incident.

ENDLOOP. "

CLEAR: WA_QUANTITY,wa_yt_quantity,wa_incident,wa_quantity_charg.

ENDLOOP.

g. Report-7- Review of Bio burden on product

This report will capture the test result of Bio burden product in terms of the Product number, Plant and year,.

Function module will be used to extract the value of the MIC from the inspection lot for the given batch of the material and will calculate necessary mean, sigma and deviation along with the graphical trend.

"FM FOR BIO-BURDEN

CALL FUNCTION 'ZQM_CTO_ARR_9013'

EXPORTING bulk_api = lv_bulk werks = lv_werks zyear = lv_year arr_mat_type = 'ARR' insp_lot_origin = '89' insp_type = 'ZBD' TABLES it_mat_all = it_mat_b_all * IT_CPP_ALL = it_qt_all = it_qt_b_all

(25)

Title: Technical Specifications for Annual Review Report for Material

Project ID 8000056898 Document ID TS-8000056898 Status :

Department IT BPE Version 1.0 Page 25 of 62

* IT_YT_ALL = * IT_CPP_BPR = * IT_YT_BPR =

it_qyt = it_b_qyt. "MATNR "QUALITY

CALL FUNCTION 'ZQM_CTO_ARR_9014'

EXPORTING bulk_api = lv_bulk werks = lv_werks zyear = lv_year arr_mat_type = 'ARR' insp_lot_origin = '89' insp_type = 'ZBD' TABLES * it_mat_all = it_mat_B_all it_qt_mat_all = it_qt_b_all it_qt_mic_hdr = it_qt_mic_b_hdr it_qt_mic_value = it_qt_mic_b_value it_qt_mic_mean = it_qt_mic_b_mean.

This report works similar to Report 3 , 5 and 6.

h. Report-8- Review of OOS and OOT results

This report will have two section one for OOS result and another for OOT result. All the data will be again extracted using function module from the standard Z-table and will be store in the internal table.

 For OOS result- The data will be extracted considering the code group as OOS_ZBD  For OOT result- The data will be extracted considering the code group as QN_LAB01 LOGIC for OOS:

SELECT qmnum oos_no matnr erdat stat charg kurztext FROM zqm_cto_arr_0651 INTO TABLE it_oos

WHERE bulk_api EQ bulk_api "200000239 AND werks EQ werks "1003

AND zyear EQ zyear "2013 * AND fegrp EQ 'OOS-ZBD'

AND fegrp NE 'S009'

* AND ( qmgrp EQ 'QN-OOS01' OR qmgrp EQ 'CTO-OOS' ) AND ( arr_mat_type eq 'INT' OR arr_mat_type EQ 'ARR' ).

CLEAR wa_pack.

* IF it_oos IS NOT INITIAL. SELECT *

FROM zqm_cto_arr_0151 INTO TABLE it_makt

(26)

Title: Technical Specifications for Annual Review Report for Material

Project ID 8000056898 Document ID TS-8000056898 Status :

Department IT BPE Version 1.0 Page 26 of 62

WHERE bulk_api EQ it_oos-matnr.

IF sy-subrc IS INITIAL.

LOOP AT it_oos ASSIGNING <fs_it_oos>.

READ TABLE it_makt INTO wa_makt

WITH KEY bulk_api = <fs_it_oos>-matnr.

IF sy-subrc IS INITIAL.

<fs_it_oos>-maktx = wa_makt-in_housecode_api.

CLEAR wa_makt. ENDIF. ENDLOOP. ENDIF. SELECT * FROM zqm_cto_arr_capa INTO TABLE it_capa

FOR ALL ENTRIES IN it_oos WHERE matnr EQ it_oos-matnr AND zyear = zyear

AND werks = werks

AND copa_source EQ 'OOS'

AND arr_mat_type EQ 'INT' OR arr_mat_type EQ 'ARR'.

lv_counter = 1.

lv_serial_no = 1.

SORT it_oos BY matnr.

it_oos1[] = it_oos[].

DELETE ADJACENT DUPLICATES FROM it_oos1 COMPARING matnr.

LOOP AT it_oos1 INTO wa_oos1.

LOOP AT it_oos INTO wa_oos WHERE matnr EQ wa_oos1-matnr.

READ TABLE it_makt INTO wa_makt WITH KEY bulk_api = wa_oos-matnr.

REFRESH it_lines.

* MOVE wa_oos-notif_no TO lv_name. * MOVE wa_oos-oos_no TO lv_name.

CONCATENATE WERKS wa_oos-oos_no INTO lv_name SEPARATED BY '_'.

CALL FUNCTION 'READ_TEXT'

EXPORTING CLIENT = SY-MANDT id = 'LTQM' language = 'E' name = lv_name object = 'QMEL' TABLES lines = it_lines EXCEPTIONS id = 1 language = 2 name = 3 not_found = 4 object = 5 reference_check = 6 wrong_access_to_archive = 7 OTHERS = 8. IF sy-subrc <> 0.

"Implement suitable error handling here ENDIF.

CLEAR lv_name.

LOOP AT it_lines INTO wa_lines.

(27)

-Title: Technical Specifications for Annual Review Report for Material

Project ID 8000056898 Document ID TS-8000056898 Status :

Department IT BPE Version 1.0 Page 27 of 62

tdline IS NOT INITIAL ).

shift wa_lines-tdline LEFT DELETING LEADING '*'.

CONCATENATE lv_desc wa_lines -tdline INTO lv_desc SEPARATED BY space.

ELSE.

CONCATENATE lv_desc wa_lines

-tdline INTO lv_desc SEPARATED BY space. "Addded on 10/9/2014 ENDIF.

ENDLOOP.

wa_oos-description = lv_desc.

CLEAR lv_desc.

SPLIT wa_makt-in_housecode_api AT '(' INTO lv_str_code lv_str_des.

* wa_oos_oot-notif_no = wa_oos-notif_no. wa_oos_oot-notif_no = wa_oos-OOS_NO.

wa_oos_oot-batch_no = wa_oos-batch_no.

wa_oos_oot-reporting_date = wa_oos-reporting_date.

wa_oos_oot-batch_stat = wa_oos-batch_stat.

wa_oos_oot-investigation_stat = wa_oos -investigation_stat.

wa_oos_oot-description = wa_oos-description.

wa_oos_oot-serial_no = lv_serial_no.

CASE lv_counter.

WHEN 1.

READ TABLE it_capa INTO wa_capa WITH KEY matnr = wa_oos-matnr.

lv_capa_v1 = wa_capa-capa_raised.

lv_capa_v2 = wa_capa-capa_closed.

lv_capa_v3 = wa_capa-capa_open.

lv_capa_v4 = wa_capa-capa_exc_closed.

lv_capa_v5 = wa_capa-capa_exc_open.

CALL FUNCTION 'CONVERSION_EXIT_MATN1_OUTPUT'

EXPORTING

input = wa_oos-matnr IMPORTING

output = wa_oos-matnr.

CONCATENATE wa_oos-matnr lv_str_code INTO

wa_oos_01-pr_stage_code SEPARATED BY space.

IF wa_oos_oot-investigation_stat EQ 'Closed' OR wa_oos_oot -investigation_stat EQ 'CLOSED'.

lv_u_eval = lv_u_eval + 1.

ELSEIF wa_oos_oot-investigation_stat EQ 'Open' OR wa_oos_oot -investigation_stat EQ 'OPEN'.

lv_rejected = lv_rejected + 1.

ENDIF.

CONCATENATE lv_total_d lv_total INTO lv_desc1_s.

CONCATENATE lv_tot lv_u_eval INTO lv_desc2_s.

CONCATENATE lv_tot_d lv_rejected INTO lv_desc3_s.

CONCATENATE lv_capa_d1 lv_capa_v1 INTO lv_capa_c1.

CONCATENATE lv_capa_d2 lv_capa_v2 INTO lv_capa_c2.

CONCATENATE lv_capa_d3 lv_capa_v3 INTO lv_capa_c3.

CONCATENATE lv_capa_d4 lv_capa_v4 INTO lv_capa_c4.

CONCATENATE lv_capa_d5 lv_capa_v5 INTO lv_capa_c5.

CONCATENATE lv_desc1_s lv_desc2_s lv_desc3_s

lv_capa_c1 lv_capa_c2 lv_capa_c3 lv_capa_c4 lv_capa_c5 INTO wa_ oos_01-sys_msg SEPARATED BY newline.

(28)

Title: Technical Specifications for Annual Review Report for Material

Project ID 8000056898 Document ID TS-8000056898 Status :

Department IT BPE Version 1.0 Page 28 of 62

LOGIC FOR OOT:

SELECT qmnum oos_no matnr erdat stat charg kurztext FROM zqm_cto_arr_0651 INTO TABLE it_oos

WHERE bulk_api EQ bulk_api "200000239 AND werks EQ werks "1003

AND zyear EQ zyear "2013 * AND fegrp EQ 'OOS-ZBD'

AND fegrp EQ 'S009'

* AND ( qmgrp EQ 'QN-OOS01' OR qmgrp EQ 'CTO-OOS' ) AND ( arr_mat_type eq 'INT' OR arr_mat_type EQ 'ARR' ).

IF it_oos IS NOT INITIAL.

SELECT *

FROM zqm_cto_arr_0151 INTO TABLE it_makt

FOR ALL ENTRIES IN it_oos WHERE bulk_api EQ it_oos-matnr.

IF sy-subrc IS INITIAL.

LOOP AT it_oos ASSIGNING <fs_it_oos>.

READ TABLE it_makt INTO wa_makt

WITH KEY bulk_api = <fs_it_oos>-matnr.

IF sy-subrc IS INITIAL.

<fs_it_oos>-maktx = wa_makt -in_housecode_api. CLEAR wa_makt. ENDIF. ENDLOOP. ENDIF. SELECT * FROM zqm_cto_arr_capa INTO TABLE it_capa

FOR ALL ENTRIES IN it_oos WHERE matnr EQ it_oos-matnr AND zyear = zyear

AND werks = werks

AND copa_source EQ 'OOT'

AND arr_mat_type EQ 'INT' OR arr_mat_type EQ 'ARR'.

lv_counter = 1.

lv_serial_no = 1.

SORT it_oos BY matnr.

it_oos1[] = it_oos[].

DELETE ADJACENT DUPLICATES FROM it_oos1 COMPARING matnr.

LOOP AT it_oos1 INTO wa_oos1.

LOOP AT it_oos INTO wa_oos WHERE matnr EQ wa_oos1-matnr.

READ TABLE it_makt INTO wa_makt WITH KEY bulk_api = wa_oos-matnr.

REFRESH it_lines.

* MOVE wa_oos-oos_no TO lv_name.

CONCATENATE WERKS wa_oos-oos_no INTO lv_name SEPARATED BY '_'.

(29)

Title: Technical Specifications for Annual Review Report for Material

Project ID 8000056898 Document ID TS-8000056898 Status :

Department IT BPE Version 1.0 Page 29 of 62

EXPORTING * CLIENT = SY-MANDT id = 'LTQM' language = 'E' name = lv_name object = 'QMEL' TABLES lines = it_lines EXCEPTIONS id = 1 language = 2 name = 3 not_found = 4 object = 5 reference_check = 6 wrong_access_to_archive = 7 OTHERS = 8. IF sy-subrc <> 0.

* Implement suitable error handling here ENDIF.

CLEAR lv_name.

LOOP AT it_lines INTO wa_lines.

IF ( sy-tabix <> 1 AND sy-tabix <> 2 ) AND ( wa_lines -tdline IS NOT INITIAL ).

shift wa_lines-tdline LEFT DELETING LEADING '*'.

CONCATENATE lv_desc wa_lines -tdline INTO lv_desc SEPARATED BY space.

ELSE.

CONCATENATE lv_desc wa_lines

-tdline INTO lv_desc SEPARATED BY space. "Addded on 15/10/2014 ENDIF.

ENDLOOP.

wa_oos-description = lv_desc.

CLEAR lv_desc.

SPLIT wa_makt-in_housecode_api AT '(' INTO lv_str_code lv_str_des.

* wa_oos_oot-notif_no = wa_oos-notif_no. wa_oos_oot-notif_no = wa_oos-OOS_NO.

wa_oos_oot-batch_no = wa_oos-batch_no.

wa_oos_oot-reporting_date = wa_oos-reporting_date.

wa_oos_oot-batch_stat = wa_oos-batch_stat.

wa_oos_oot-investigation_stat = wa_oos -investigation_stat.

wa_oos_oot-description = wa_oos-description.

wa_oos_oot-serial_no = lv_serial_no.

CASE lv_counter.

WHEN 1.

READ TABLE it_capa INTO wa_capa WITH KEY matnr = wa_oos-matnr.

lv_capa_v1 = wa_capa-capa_raised.

lv_capa_v2 = wa_capa-capa_closed.

lv_capa_v3 = wa_capa-capa_open.

lv_capa_v4 = wa_capa-capa_exc_closed.

lv_capa_v5 = wa_capa-capa_exc_open.

CALL FUNCTION 'CONVERSION_EXIT_MATN1_OUTPUT'

EXPORTING

input = wa_oos-matnr IMPORTING

(30)

Title: Technical Specifications for Annual Review Report for Material

Project ID 8000056898 Document ID TS-8000056898 Status :

Department IT BPE Version 1.0 Page 30 of 62

CONCATENATE wa_oos-matnr lv_str_code INTO

wa_oot_01-pr_stage_code SEPARATED BY space.

IF wa_oos_oot-investigation_stat EQ 'CLOSED' OR wa_oos_oot -investigation_stat EQ 'Closed'.

lv_u_eval = lv_u_eval + 1.

ELSEIF wa_oos_oot-investigation_stat EQ 'OPEN'.

lv_rejected = lv_rejected + 1.

ENDIF.

CONCATENATE lv_total_d lv_total INTO lv_desc1_s.

CONCATENATE lv_tot lv_u_eval INTO lv_desc2_s.

CONCATENATE lv_tot_d lv_rejected INTO lv_desc3_s.

CONCATENATE lv_capa_d1 lv_capa_v1 INTO lv_capa_c1.

CONCATENATE lv_capa_d2 lv_capa_v2 INTO lv_capa_c2.

CONCATENATE lv_capa_d3 lv_capa_v3 INTO lv_capa_c3.

CONCATENATE lv_capa_d4 lv_capa_v4 INTO lv_capa_c4.

CONCATENATE lv_capa_d5 lv_capa_v5 INTO lv_capa_c5.

CONCATENATE lv_desc1_s lv_desc2_s lv_desc3_s

lv_capa_c1 lv_capa_c2 lv_capa_c3 lv_capa_c4 lv_capa_c5 INTO wa_ oot_01-sys_msg SEPARATED BY newline.

APPEND wa_oos_oot TO it_oot_01 .

i. Report-9- Review of Re process and Rework

This report will extract the data on the basis of the Re process and Rework order type. Function module will be used to extract the data on the basis of Product number, plant and review period from the Z-table which is already populated with the data by report.

 For re process review result will be obtained considering the order type as ZRP1  For re work review result will be obtained considering the order type as ZRW1  The data for both the above order type will be populated considering the condition that

the status of result recording for the given processes will have the status as rejected.

SELECT * FROM

zqm_cto_arr_0251

INTO CORRESPONDING FIELDS OF TABLE it_rprw WHERE bulk_api EQ bulk_api

AND zyear EQ zyear AND werks EQ werks AND dauat EQ 'ZRP1'.

* IF sy-subrc IS INITIAL.

SELECT *

FROM zqm_cto_arr_0151 INTO TABLE it_makt1

FOR ALL ENTRIES IN it_rprw WHERE bulk_api = it_rprw-matnr.

SELECT "CHANGED ON 30/10/2014 to fetch vcode prueflos matnr charg vcode kurztext FROM zqm_cto_arr_0452

INTO CORRESPONDING FIELDS OF TABLE it_rej FOR ALL ENTRIES IN it_rprw

WHERE matnr = it_rprw-matnr AND charg = it_rprw-charg.

(31)

Title: Technical Specifications for Annual Review Report for Material

Project ID 8000056898 Document ID TS-8000056898 Status :

Department IT BPE Version 1.0 Page 31 of 62

* AND vcode EQ 'REJ'.

SELECT prueflos vcode VBEWERTUNG FROM qave INTO TABLE it_qave

FOR ALL ENTRIES IN it_rej WHERE vcode = it_rej-vcode and prueflos = it_rej-prueflos.

* LOOP AT it_rprw INTO wa_rprw.

* wa_rp_rw-material_no = wa_rprw-matnr. * SPLIT wa_rprw-maktx AT '(' INTO

* lv_str_code * lv_str_des. * wa_rp_rw-in_housecode = lv_str_code. * wa_rp_rw-tot_rp_batches = wa_rprw-batch_count. * wa_rp_rw-tot_rp_quan = wa_rprw-menge. * wa_rp_rw-meins = wa_rprw-meins. * COLLECT wa_rp_rw INTO it_rp_rw.

* ENDLOOP.

LOOP AT it_rprw INTO wa_rprw.

READ TABLE it_rp_rw INTO wa_rp_rw

WITH KEY material_no = wa_rprw-matnr.

READ TABLE it_makt1 INTO wa_makt WITH KEY bom_component = wa_rprw -matnr.

IF sy-subrc EQ 0.

wa_rp_rw-material_no = wa_rprw-matnr.

SPLIT wa_makt-in_housecode_api AT '(' INTO

lv_str_code lv_str_des.

wa_rp_rw-in_housecode = lv_str_code.

wa_rp_rw-tot_rp_batches = wa_rprw-batch_count.

wa_rp_rw-tot_rp_quan = wa_rprw-menge.

wa_rp_rw-meins = wa_rprw-meins.

append wa_rp_rw to it_rp_rw.

else.

wa_rp_rw-tot_rp_batches = wa_rp_rw -tot_rp_batches + wa_rprw-batch_count.

wa_rp_rw-tot_rp_quan = wa_rp_rw -tot_rp_quan + wa_rprw-menge.

LOOP AT it_rp_rw into wa_rp_rw2 WHERE material_no = wa_rprw-matnr.

wa_rp_rw2-tot_rp_batches = wa_rp_rw-tot_rp_batches.

wa_rp_rw2-tot_rp_quan = wa_rp_rw-tot_rp_quan.

modify it_rp_rw from wa_rp_rw2.

ENDLOOP.

ENDIF.

ENDLOOP.

LOOP AT it_qave INTO wa_qave WHERE VBEWERTUNG = 'R' .

LOOP AT IT_REJ INTO WA_REJ WHERE prueflos = wa_qave-prueflos .

MOVE wa_rej-charg TO lv_charg.

CONCATENATE lv_desc ',' lv_charg INTO lv_desc.

ENDLOOP.

ENDLOOP.

* LOOP AT it_rej INTO wa_rej WHERE vcode EQ 'REJ'. "COMMENTED ON 30/10/2 014

(32)

Title: Technical Specifications for Annual Review Report for Material

Project ID 8000056898 Document ID TS-8000056898 Status :

Department IT BPE Version 1.0 Page 32 of 62

* MOVE wa_rej-charg TO lv_charg.

* CONCATENATE lv_desc ',' lv_charg INTO lv_desc. * ENDLOOP.

CONCATENATE lv_total_d lv_desc INTO lv_desc1_s SEPARATED BY space.

* ENDIF. REFRESH: it_rprw, it_rej, it_makt1, IT_QAVE. CLEAR: wa_rp_rw, wa_rprw, wa_rej, lv_str_code, lv_str_des, lv_desc, lv_rejected, wa_makt. lv_desc = 0. SELECT * FROM zqm_cto_arr_0251

INTO CORRESPONDING FIELDS OF TABLE it_rprw WHERE bulk_api EQ bulk_api

AND zyear EQ zyear AND werks EQ werks AND dauat EQ 'ZRW1'.

* IF sy-subrc IS INITIAL. "COMMENTED ON 25/8/2014 SELECT *

FROM zqm_cto_arr_0151 INTO TABLE it_makt1

FOR ALL ENTRIES IN it_rprw WHERE bulk_api = it_rprw-matnr.

SELECT matnr charg vcode kurztext FROM zqm_cto_arr_0452

INTO CORRESPONDING FIELDS OF TABLE it_rej FOR ALL ENTRIES IN it_rprw

WHERE matnr = it_rprw-matnr AND charg = it_rprw-charg.

* AND vcode EQ 'REJ'.

SELECT prueflos vcode VBEWERTUNG FROM qave INTO TABLE it_qave

FOR ALL ENTRIES IN it_rej WHERE vcode = it_rej-vcode AND prueflos = it_rej-prueflos.

LOOP AT it_rprw INTO wa_rprw.

* wa_rp_rw1-material_no = wa_rprw-matnr. * SPLIT wa_rprw-maktx AT '(' INTO

* lv_str_code * lv_str_des.

* wa_rp_rw1-in_housecode = lv_str_code.

(33)

Title: Technical Specifications for Annual Review Report for Material

Project ID 8000056898 Document ID TS-8000056898 Status :

Department IT BPE Version 1.0 Page 33 of 62

* wa_rp_rw1-tot_rw_quan = wa_rprw-menge. * wa_rp_rw1-rw_uom = wa_rprw-meins. * COLLECT wa_rp_rw1 INTO it_rp_rw1.

READ TABLE it_rp_rw INTO wa_rp_rw

WITH KEY material_no = wa_rprw-matnr.

READ TABLE it_makt1 INTO wa_makt WITH KEY bom_component = wa_rprw -matnr. "CHANGED ON 21/7/2014

IF sy-subrc eq 0. "end of changes

wa_rp_rw-material_no = wa_rprw-matnr.

SPLIT wa_makt-in_housecode_api AT '(' INTO

lv_str_code lv_str_des.

wa_rp_rw-in_housecode = wa_makt -in_housecode_api. "lv_str_code.

wa_rp_rw-tot_rw_batches = wa_rprw-batch_count.

wa_rp_rw-tot_rw_quan = wa_rprw-menge.

wa_rp_rw-meins = wa_rprw-meins.

append wa_rp_rw to it_rp_rw.

else.

wa_rp_rw-tot_rw_batches = wa_rp_rw -tot_rw_batches + wa_rprw-batch_count.

wa_rp_rw-tot_rw_quan = wa_rp_rw -tot_rw_quan + wa_rprw-menge.

LOOP AT it_rp_rw into wa_rp_rw2 WHERE material_no = wa_rprw-matnr.

wa_rp_rw2-tot_rw_batches = wa_rp_rw-tot_rw_batches.

wa_rp_rw2-tot_rw_quan = wa_rp_rw-tot_rw_quan.

modify it_rp_rw from wa_rp_rw2.

ENDLOOP.

ENDIF.

ENDLOOP.

h. Report-10- Review of Incidents

This report will extract the data on the basis of Product number, plant and the review period. Function module will be used to extract all the field of the given internal table from the report ZNOTIF_LOG_REPORT. The data will be extracted on the basis of the notification of type F3 Which will be generated by the report.

SELECT * FROM

zqm_cto_arr_0652

INTO TABLE it_incident WHERE

bulk_api EQ bulk_api "200000011 AND werks EQ werks "1001

AND zyear EQ zyear. "2013 IF sy-subrc IS INITIAL.

SELECT SINGLE *

FROM zqm_cto_arr_capa INTO wa_capa

WHERE bulk_api = bulk_api AND zyear = zyear

AND werks = werks

AND copa_source EQ 'INCIDENT'.

lv_capa_v1 = wa_capa-capa_raised.

lv_capa_v2 = wa_capa-capa_closed.

lv_capa_v3 = wa_capa-capa_open.

(34)

Title: Technical Specifications for Annual Review Report for Material

Project ID 8000056898 Document ID TS-8000056898 Status :

Department IT BPE Version 1.0 Page 34 of 62

lv_capa_v5 = wa_capa-capa_exc_open.

LOOP AT it_incident INTO wa_incident.

MOVE wa_incident-qmnum TO lv_name.

CALL FUNCTION 'READ_TEXT'

EXPORTING * CLIENT = SY-MANDT id = 'LTQM' language = 'E' name = lv_name object = 'QMEL' TABLES lines = it_lines EXCEPTIONS id = 1 language = 2 name = 3 not_found = 4 object = 5 reference_check = 6 wrong_access_to_archive = 7 OTHERS = 8. IF sy-subrc <> 0.

* Implement suitable error handling here ENDIF.

LOOP AT it_lines INTO wa_lines WHERE tdline IS NOT INITIAL.

IF lv_start_line IS INITIAL.

IF wa_lines-tdline CS 'Description of incident:'.

lv_start_line = 'X'.

ENDIF.

ELSE.

IF wa_lines-tdline CS 'Immediate Correction done:'.

EXIT.

ELSE.

shift wa_lines-tdline LEFT DELETING LEADING '*'.

CONCATENATE lv_desc wa_lines-tdline INTO lv_desc. "SEPARATED BY space. ENDIF. ENDIF. ENDLOOP. lv_serial_no = lv_serial_no + 1.

wa_rev_incident-serial_no = lv_serial_no.

wa_rev_incident-matnr = wa_incident-matnr.

wa_rev_incident-batch_no = wa_incident-charg.

wa_rev_incident-incident_no = wa_incident-qmnum.

wa_rev_incident-reporting_date = wa_incident-erdat.

wa_rev_incident-incident_desc = lv_desc.

wa_rev_incident-investigation_stat = wa_incident -stat."wa_incident-kurztext

wa_rev_incident-root_cause = wa_incident -zidenti_desc."wa_incident-zrident_desc.

lv_total = lv_serial_no.

* IF wa_rev_incident

References

Outline

Related documents

The hypothesis for the second research question stated that students who participate in restorative justice practices experience a difference in Active Accountability compared to

[87] demonstrated the use of time-resolved fluorescence measurements to study the enhanced FRET efficiency and increased fluorescent lifetime of immobi- lized quantum dots on a

To get that in synchronous CDMA, we transmit , where C n,i is the chip sequence coded with data bit for n th user and i th time.. As it is synchronized in chip as well as

As a quality indicator, somatic cell count increase with lactation order, but reduces to half in cold season compared to warm season.. Key words : milk, somatic cell count,

Academic Achievement Services (AAS) – Students who experience difficulties with 

Unlike the male characters, women oppose the Law of the patriarchy, labeling them only as mothers, and emancipate themselves from the identity that the symbolic realm imposes on

Recognizing spatio-temporal similarities between video sequences is a difficult task, since the objects undergo var- ious transformations or may be occulted through the se- quence.

According to the study, financially unconstrained group show a strong investment-bubble sensitivity through catering channel, induced by agency costs, while those that are