2 Ts Arr-product

Share Embed Donate


Short Description

Technical Specification for ARR Product...

Description

Corporate Centre

Technical Specification

Technical Specification for Annual Review Report for Material

Corporate Centre

Technical Specification

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 APPROVAL & AUTHORIZATION ................................................................................................................................. 62

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

Corporate Centre

Technical Specification 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. 2.

Generation of the report Viewing and modification of the report using Web dynpro and Workflow

Function 1 – Generation of the report.

3.1  

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

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

Corporate Centre

Technical Specification 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

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

Corporate Centre

Technical Specification

*--------------------------------------------------------------------------------------------------------------------------* *------------------------------------------------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 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

Corporate Centre

Technical Specification 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_descchemical_name. else. CONCATENATE wa_pr_desc-chemical_name wa_lines-TDLINE INTO wa_pr_descchemical_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. IF it_pr_desc_int[] IS NOT INITIAL. 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

Corporate Centre

Technical Specification 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 . lv_int_text = -sap_code. lv_int_cnt = sy-tabix. if SY-TABIX ne 1 and -sap_code = lv_int_text. READ TABLE it_makt INTO wa_makt INDEX lv_int_cnt. IF sy-subrc IS INITIAL. -in_house = wa_maktin_housecode_api. CLEAR wa_makt. endif. ELSE. READ TABLE it_makt INTO wa_makt WITH KEY bom_component = sap_code. IF sy-subrc IS INITIAL. -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 . READ TABLE it_makt INTO wa_makt WITH KEY bom_component = -sap_code. IF sy-subrc IS INITIAL. -in_house = wa_maktin_housecode_api. CLEAR wa_makt. ENDIF. 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

Corporate Centre

Technical Specification 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 INTO TABLE it_T003P

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

Corporate Centre

Technical Specification 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_prpostp EQ 'ARR1' OR wa_pr-postp EQ 'ARR2' OR wa_prpostp EQ 'ARR3'. wa_pr-postp = 'API'. ENDIF. CONCATENATE wa_pr-matnr ' ' '(' wa_pr-postp ')' INTO wa_batch_pr-pr_stage. wa_batch_prpr_stage_code = lv_str_code. wa_batch_pr-batch_count = wa_prbatch_count. wa_batch_pr-qty_manufactured = wa_prmenge. wa_batch_pr-meins = wa_prmeins. READ TABLE it_t003p INTO wa_t003p WITH _pr-dauat. wa_batch_pr-TXT txt.

KEY auart = wa = wa_t003p-

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.

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

Corporate Centre

Technical Specification    

 

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 lfimg. wa_disp_mar_tot-total_quan wa_disp_mar_tot-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 wa_disp_sos-serial_no MODIFY it_disp_sos FROM wa_disp_sos. ENDLOOP. ENDIF.

= lv_tot_sum + wa_disp_sos= lv_tot_sum. = wa_disp_sos-uom.

= lv_serial_no + 1. = lv_serial_no.

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

Corporate Centre

Technical Specification 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 lfimg. wa_disp_sto_tot-total_quan wa_disp_sto_tot-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 wa_disp_sto-serial_no MODIFY it_disp_sto FROM wa_disp_sto. ENDLOOP. ENDIF. c.

= lv_tot_sum + wa_disp_sto= lv_tot_sum. = wa_disp_sos-uom.

= lv_serial_no + 1. = lv_serial_no.

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.

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

Corporate Centre

Technical Specification  



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

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

Corporate Centre

Technical Specification 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. cl_http_server=>server_cache_upload( url = l_image_url1 response = l_cach 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

Corporate Centre

Technical Specification 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 l_categories l_series l_element * l_text l_encoding l_globalsettings string1 string2 data: igs_chart line data l_igs_ce ext_line extension html html_line content_type content_subtype p_html g_html_control * * *

type ref to if_ixml_element, type ref to if_ixml_element, type ref to if_ixml_element, type ref to if_ixml_element, type ref to if_ixml_element, type ref to if_ixml_encoding, type ref to if_ixml_element, type string, type string.

type ref to cl_igs_chart, type type type type type type type type type type type

igs_data, igs_data_tab, ref to cl_igs_chart_engine, igs_ext, igs_ext_tab, w3htmltabtype, w3html, w3param-cont_type, w3param-cont_type, w3htmltabtype, 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. 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

Corporate Centre

Technical Specification * 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.

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

Corporate Centre

Technical Specification 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. line-y = string2.

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

Corporate Centre

Technical Specification *

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. igs_chart->extension = extension.

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

Corporate Centre

Technical Specification * 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 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

Corporate Centre

Technical Specification 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_RAWMATNR. 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_MATVENDOR_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_SUSYS_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_SUSYS_MSG SEPARATED BY NEWLINE. ENDIF. * ENDIF. "commented on 25/8/2014 CLEAR WA_MAKT. 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

Corporate Centre

Technical Specification 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_MATVENDOR_STATUS = 'Rejected vendor' OR WA_PACK_MATTitle: 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

Corporate Centre

Technical Specification 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_SUSYS_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_SUSYS_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

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

Corporate Centre

Technical Specification *

ARR_MAT_TYPE TABLES it_mat_all IT_QT_MAT_ALL IT_QT_MIC_HDR IT_QT_MIC_VALUE IT_QT_MIC_MEAN

= ARR_MAT_TYPE = = = = =

it_mat_K_all IT_QT_K_ALL_I IT_QT_MIC_K_HDR_I IT_QT_MIC_K_VALUE_I 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.  

f.

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.

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 Ztable. 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_uniquematnr . "it_quantity contain 1 matnr quntity records it_incident[] = it_yt_all_inc[]. delete it_incident WHERE matnr ne wa_yt_bpr_mat_uniquematnr. "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 loop at it_quantity_bpr into wa_quantity_bpr. 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

Corporate Centre

Technical Specification 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_chargmenge. "HERE MEINS REQUIRED TO CHANGE IN KG lv_unit = wa_quantity_charg-meins. APPEND wa_yt_quantity TO it_yt_quantity_temp. or only 1 bpr

" it will contain data f

**->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. LOOP AT it_lines INTO wa_lines WHERE tdline IS NOT INITIAL. 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

Corporate Centre

Technical Specification 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_linestdline 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 wa_yt_incident-batch_no wa_yt_incident-incident_no wa_yt_incident-incident_date wa_yt_incident-incident_desc wa_yt_incident-batch_status kurztext. wa_yt_incident-stat wa_yt_incident-matnr wa_yt_incident-bpr_ref_no form_num.

= = = = = =

lv_serial_no2. wa_incident-charg. wa_incident-qmnum. wa_incident-erdat. lv_desc. wa_incident-

= wa_incident-stat. = wa_incident-matnr. = wa_quantity_charg-

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

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

Corporate Centre

Technical Specification * * *

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 FOR ALL ENTRIES IN it_oos

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

Corporate Centre

Technical Specification WHERE bulk_api EQ it_oos-matnr. IF sy-subrc IS INITIAL. LOOP AT it_oos ASSIGNING . READ TABLE it_makt INTO wa_makt WITH KEY bulk_api = -matnr. IF sy-subrc IS INITIAL. -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. IF ( sy-tabix 1 AND sy-tabix 2 ) AND ( wa_linesTitle: 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

Corporate Centre

Technical Specification tdline IS NOT INITIAL ). shift wa_lines-tdline LEFT DELETING LEADING '*'. CONCATENATE lv_desc wa_linestdline INTO lv_desc SEPARATED BY space. ELSE. CONCATENATE lv_desc wa_linestdline 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_oosinvestigation_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_ootinvestigation_stat EQ 'CLOSED'. lv_u_eval = lv_u_eval + 1. ELSEIF wa_oos_oot-investigation_stat EQ 'Open' OR wa_oos_ootinvestigation_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. APPEND wa_oos_oot TO it_oos_01 .

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

Corporate Centre

Technical Specification 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 . READ TABLE it_makt INTO wa_makt WITH KEY bulk_api = -matnr. IF sy-subrc IS INITIAL. -maktx = wa_maktin_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 '_'. CALL FUNCTION 'READ_TEXT'

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

Corporate Centre

Technical Specification 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_linestdline IS NOT INITIAL ). shift wa_lines-tdline LEFT DELETING LEADING '*'. CONCATENATE lv_desc wa_linestdline INTO lv_desc SEPARATED BY space. ELSE. CONCATENATE lv_desc wa_linestdline 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_oosinvestigation_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. *

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

Corporate Centre

Technical Specification 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_ootinvestigation_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. 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

Corporate Centre

Technical Specification *

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 SPLIT wa_rprw-maktx AT '(' INTO lv_str_code lv_str_des. wa_rp_rw-in_housecode wa_rp_rw-tot_rp_batches wa_rp_rw-tot_rp_quan wa_rp_rw-meins COLLECT wa_rp_rw INTO it_rp_rw. ENDLOOP.

= wa_rprw-matnr.

= = = =

lv_str_code. wa_rprw-batch_count. wa_rprw-menge. wa_rprw-meins.

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_rprwmatnr. 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_rwtot_rp_batches + wa_rprw-batch_count. wa_rp_rw-tot_rp_quan = wa_rp_rwtot_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. * 014

ENDLOOP. LOOP AT it_rej INTO wa_rej WHERE vcode EQ 'REJ'. "COMMENTED ON 30/10/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 31 of 62

Corporate Centre

Technical Specification * * *

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 SPLIT wa_rprw-maktx AT '(' INTO lv_str_code lv_str_des. wa_rp_rw1-in_housecode wa_rp_rw1-tot_rw_batches

= wa_rprw-matnr.

= lv_str_code. = wa_rprw-batch_count.

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

Corporate Centre

Technical Specification * * *

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_rprwmatnr. "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_maktin_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_rwtot_rw_batches + wa_rprw-batch_count. wa_rp_rw-tot_rw_quan = wa_rp_rwtot_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 AND werks EQ werks "1001 AND zyear EQ zyear. "2013

"200000011

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. lv_capa_v4 = wa_capa-capa_exc_closed. 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

Corporate Centre

Technical Specification 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 wa_rev_incident-serial_no wa_rev_incident-matnr wa_rev_incident-batch_no wa_rev_incident-incident_no wa_rev_incident-reporting_date wa_rev_incident-incident_desc wa_rev_incident-investigation_stat stat."wa_incident-kurztext wa_rev_incident-root_cause zidenti_desc."wa_incident-zrident_desc. lv_total

= = = = = = = =

lv_serial_no + 1. lv_serial_no. wa_incident-matnr. wa_incident-charg. wa_incident-qmnum. wa_incident-erdat. lv_desc. wa_incident-

= wa_incident= lv_serial_no.

* IF wa_rev_incidentinvestigation_stat = 'Closed' or wa_rev_incidentTitle: 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

Corporate Centre

Technical Specification investigation_stat = 'CLOSED'. lv_u_eval = lv_u_eval + 1. * ELSEIF wa_rev_incidentinvestigation_stat = 'Reject'."COMMENTED ON 10/8/2014 ELSEIF wa_rev_incidentinvestigation_stat = 'Open' or wa_rev_incident-investigation_stat = 'OPEN'. lv_rejected = lv_rejected + 1. ENDIF. APPEND wa_rev_incident TO it_rev_incident. CLEAR wa_rev_incident. CLEAR lv_desc. CLEAR lv_start_line. ENDLOOP. "to fetch Previous year incident CLEAR : lv_approved,lv_total1. SELECT SINGLE * from ZQM_CTO_ARR_0666 INTO WHERE bulk_api = bulk_api and zyear = zyear and werks = werks and sec_name = 'INCIDENT'. i.

wa_cto_arr_0666

Report-11- Review of change controls

CAPA proposed is also the incident which will be extracted in this report for given product Number, plant and year. Function module will be used to extract the data from the Z-table for which the CAPA source should be incident. The structure of the report is similar to that of Report 10. The report will extract on the basis of the following   

All the F3 Notification product specific with code group QN-CC01 Show only those notification if the task CO02 is completed All the fields of the given report will be extracted on the basis of above conditions.

SELECT * FROM zqm_cto_arr_0655 INTO CORRESPONDING FIELDS OF TABLE it_chng_ctrl WHERE bulk_api EQ bulk_api AND zyear EQ zyear AND werk EQ werks. 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 'CHANGE CON'. lv_capa_v1 = wa_capa-capa_exc_closed_out. lv_capa_v2 = wa_capa-capa_exc_open_out. LOOP AT it_chng_ctrl INTO wa_chng_ctrl. MOVE wa_chng_ctrl-qmnum TO lv_name. Title: Technical Specifications for Annual Review Report for Material Project ID

8000056898

Document ID

TS-8000056898

Status :

Department

IT BPE

Version

1.0

Page 35 of 62

Corporate Centre

Technical Specification 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 'Proposed'. "'Proposed Change:'. lv_start_line = 'X'. ENDIF. ELSE. IF wa_lines-tdline CS 'Justification for change:'. 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_change_ctrl-serial_no = lv_serial_no. wa_change_ctrl-matnr = wa_chng_ctrl-matnr. wa_change_ctrl-initi_dt = wa_chng_ctrl-qmdat. wa_change_ctrl-notif_no = wa_chng_ctrl-qmnum. wa_change_ctrl-change_type = wa_chng_ctrl-kurztext1. wa_change_ctrl-change_req_in = wa_chng_ctrl-kurztext2. wa_change_ctrl-change_cat = wa_chng_ctrl-kurztext3. wa_change_ctrl-closure_stat = wa_chng_ctrl-stat. wa_change_ctrl-change_desc = lv_desc. lv_total = lv_serial_no. IF wa_change_ctrl-closure_stat = 'CLOSED' or wa_change_ctrlclosure_stat = 'Closed' . lv_u_eval = lv_u_eval + 1. ELSEIF wa_change_ctrl-closure_stat = 'OPEN' or wa_change_ctrlclosure_stat = 'Open'. lv_rejected = lv_rejected + 1. ENDIF. APPEND wa_change_ctrl TO it_change_ctrl. Title: Technical Specifications for Annual Review Report for Material Project ID

8000056898

Document ID

TS-8000056898

Status :

Department

IT BPE

Version

1.0

Page 36 of 62

Corporate Centre

Technical Specification CLEAR lv_desc. CLEAR wa_change_ctrl. CLEAR lv_start_line. ENDLOOP. SELECT SINGLE * from ZQM_CTO_ARR_0666 INTO WHERE bulk_api = bulk_api and zyear = zyear and werks = werks and sec_name = 'CC'. j. Report 12- Stability study

wa_cto_arr_0666

This report will be extracted on the basis of product number, Plant and review year of the given material number. The data will be extracted using the function module from the Z-table which will be already populated by data using report. The report will have three sections and the data for the given field will be further extracted on the basis of following conditions.    

Accelerated Stability study- this is done on the basis of storage condition-0003 or 0006 Long term Stability study- this is done on the basis of storage condition based on 0001, 0004, 0005 and 0008. Intermediate stability studies- this is done on the basis of storage condition 0002 All the above data will be fetched on the basis of temperature as the characteristics

LOGIC FOR ACCELERATED STABILITY STUDY: SELECT * FROM zqm_cto_arr_0669 INTO TABLE it_stability WHERE bulk_api EQ bulk_api AND zyear EQ zyear AND werks EQ werks AND ( stabicon EQ '0003' OR stabicon EQ '0006' ).

LOGIC FOR LONG TERM STABILITY STUDY: SELECT * FROM zqm_cto_arr_0669 INTO TABLE it_stability WHERE bulk_api EQ bulk_api AND zyear EQ zyear AND werks EQ werks AND ( stabicon EQ '0001' OR stabicon EQ '0004' OR stabicon EQ '0005' OR stabicon EQ '0008' ). LOGIC FOR INTERMEDIATE STABILITY STUDY: SELECT * FROM zqm_cto_arr_0669 INTO TABLE it_stability WHERE bulk_api EQ bulk_api AND zyear EQ zyear AND werks EQ werks AND stabicon EQ '0002'. k.

Report 13- Review of customer complaints, ROG and Recalls

Title: Technical Specifications for Annual Review Report for Material Project ID

8000056898

Document ID

TS-8000056898

Status :

Department

IT BPE

Version

1.0

Page 37 of 62

Corporate Centre

Technical Specification Report will use the function module to extract the data from Z-table already populated with data using report. The extraction of the data will be done on the basis of the Product number, plant and the review year, the status of the customer complaint should be closed. On the basis of following conditions the data will be populated.     

Customer complaints from 35 series to be taken into account Notification type will be YA 2 Series material to be captured in notification Multiple batch no to come, separated by comma Multiple batches can be seen as assigned objects

CUSTOMER COMPLAINTS: SELECT * FROM zqm_cto_arr_0658 INTO TABLE it_cust_com WHERE bulk_api EQ bulk_api AND werks EQ werks AND zyear EQ zyear. *

IF sy-subrc IS INITIAL. REFRESH it_lines. LOOP AT it_cust_com INTO wa_cust_com. IF ( wa_cust_com-zzdate_of_compl LE e_start_date AND wa_cust_comstat EQ 'CLOSED' ). lv_approved = lv_approved + 1. ENDIF. MOVE wa_cust_com-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 ( sy-tabix 1 and wa_lines-tdline is not initial ). shift wa_lines-tdline LEFT DELETING LEADING '*'. CONCATENATE lv_desc wa_linestdline INTO lv_desc ."SEPARATED BY space. ENDIF. ENDLOOP. if it_lines IS INITIAL. SELECT SINGLE qmtxt from qmel INTO lv_desc WHERE qmnum = lv_name. Title: Technical Specifications for Annual Review Report for Material Project ID

8000056898

Document ID

TS-8000056898

Status :

Department

IT BPE

Version

1.0

Page 38 of 62

Corporate Centre

Technical Specification endif. lv_serial_no = lv_serial_no + 1. wa_cust_complaint-serial_no = lv_serial_no. wa_cust_complaint-receipt_date = wa_cust_comzzdate_of_compl. wa_cust_complaint-cust_nam = wa_cust_com-name1. wa_cust_complaint-complaint_no = wa_cust_com-qmnum. wa_cust_complaint-batch_no = wa_cust_com-batchnum1. wa_cust_complaint-closure_dat = wa_cust_com-erldat. wa_cust_complaint-complaint_des = lv_desc. wa_cust_complaint-conclusion = wa_cust_com-conclusion. lv_total = lv_serial_no. IF wa_cust_com-stat = 'CLOSED'. lv_u_eval = lv_u_eval + 1. ELSEIF wa_cust_com-stat = 'OPEN'. lv_rejected = lv_rejected + 1. ENDIF. APPEND wa_cust_complaint TO it_cust_complaint. CLEAR lv_desc. CLEAR lv_start_line. ENDLOOP.

RETURNED GOODS: SELECT qmnum charg zdater cust_name action_taken stat FROM zqm_cto_arr_0659 INTO TABLE it_ret_goods WHERE bulk_api EQ bulk_api AND zyear EQ zyear AND werk EQ werks. *

IF sy-subrc IS INITIAL. LOOP AT it_ret_goods INTO wa_return. REFRESH it_lines. CONCATENATE wa_return-report_no 'ZE01' INTO lv_name. CALL FUNCTION 'READ_TEXT' EXPORTING client = sy-mandt id = 'ZROG' language = 'E' name = lv_name object = 'ZQM_ROG' TABLES lines = it_lines EXCEPTIONS id = 1 language = 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 39 of 62

Corporate Centre

Technical Specification 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. IF wa_lines-tdline IS NOT INITIAL . CONCATENATE lv_desc wa_linestdline INTO lv_desc SEPARATED BY space. ENDIF. ENDLOOP. CLEAR wa_lines. lv_serial_no wa_return-return_reason wa_return-serial_no lv_total IF wa_return-closure_stat = 'CLOSED'. lv_u_eval = lv_u_eval + 1. ELSEIF wa_return-closure_stat = 'OPEN'. lv_rejected = lv_rejected + 1. ENDIF. MODIFY it_ret_goods FROM wa_return. CLEAR lv_name. CLEAR lv_desc. ENDLOOP.

= = = =

lv_serial_no + 1. lv_desc. lv_serial_no. lv_serial_no.

RECALLS: SELECT zzcust_name zzreport_no charg initiation_date recall_reason action_taken status FROM zqm_cto_arr_2051 INTO TABLE it_recalls WHERE bulk_api EQ bulk_api AND werks EQ werks AND zyear EQ zyear.

l.

Report 14- Multiple batches can be seen as assigned objects Report will be having two sections and function module will extract the data from two different ztable from SAP already populated with the data by report forms.  Summary of Process validation- for this section data will be extracted on the basis of validation type process validation.  Summary of cleaning validations- for this section data will be extracted on the basis of validation type cleaning validation.

PROCESS VALIDATION: SELECT * FROM zqm_cto_arr_0664 Title: Technical Specifications for Annual Review Report for Material Project ID

8000056898

Document ID

TS-8000056898

Status :

Department

IT BPE

Version

1.0

Page 40 of 62

Corporate Centre

Technical Specification INTO CORRESPONDING FIELDS OF TABLE it_p_valid WHERE bulk_api EQ bulk_api AND zyear EQ zyear AND werks EQ werks AND zzvalid_type EQ 'Process Validation' AND ZZSUB_SYSTEM EQ 'PROCESS VALIDATION' AND ( postp EQ 'INT' OR postp EQ 'ARR').

*

IF

sy-subrc IS INITIAL. LOOP AT it_p_valid INTO wa_p_valid. lv_serial_no = lv_serial_no + 1. wa_pro_valid-serial_no = lv_serial_no. wa_pro_valid-protocol_approval_date = wa_p_validzzprotocol_approval_date. wa_pro_valid-protocol_no = wa_p_validzzprotocol. wa_pro_valid-valid_type = wa_p_validzzvalid_type. wa_pro_valid-reason_init = wa_p_validzzreason_init. wa_pro_valid-valid_batch_no = wa_p_valid-zzbatch. wa_pro_valid-stat = wa_p_valid-stat. lv_total = lv_serial_no. IF wa_pro_valid-stat = 'CLOSED'or wa_pro_valid-stat = 'Closed'. lv_u_eval = lv_u_eval + 1. ELSEIF wa_pro_valid-stat = 'OPEN' or wa_pro_validstat = 'Open' or wa_pro_valid-stat = 'Cancel'. lv_rejected = lv_rejected + 1. ENDIF. APPEND wa_pro_valid TO it_pro_valid. ENDLOOP.

CLEANING VALIDATION: SELECT * FROM zqm_cto_arr_0664 INTO CORRESPONDING FIELDS OF TABLE it_c_valid WHERE bulk_api EQ bulk_api AND zyear EQ zyear AND werks EQ werks * AND zzvalid_type EQ 'Cleaning Validation' AND ZZSUB_SYSTEM EQ 'CLEANING VALIDATION' AND ( postp EQ 'INT' OR postp EQ 'ARR'). IF

sy-subrc IS INITIAL. LOOP AT it_c_valid INTO wa_c_valid. lv_serial_no = lv_serial_no + 1. wa_cle_valid-serial_no wa_cle_valid-protocol_approval_date zzprotocol_approval_date. wa_cle_valid-protocol_no zzprotocol. wa_cle_valid-valid_type zzvalid_type. wa_cle_valid-reason_init zzreason_init. wa_cle_valid-valid_batch_no wa_cle_valid-stat

= lv_serial_no. = wa_c_valid=

wa_c_valid-

= wa_c_valid= wa_c_valid= wa_c_valid-zzbatch. = wa_c_valid-stat.

Title: Technical Specifications for Annual Review Report for Material Project ID

8000056898

Document ID

TS-8000056898

Status :

Department

IT BPE

Version

1.0

Page 41 of 62

Corporate Centre

Technical Specification lv_total = lv_serial_no. IF wa_c_valid-stat = 'CLOSED' OR wa_c_valid-stat = 'Closed'. lv_u_eval = lv_u_eval + 1. ELSEIF wa_c_valid-stat = 'OPEN' or wa_c_validstat = 'Open' or wa_c_valid-stat = 'open'. lv_rejected = lv_rejected + 1. ENDIF. APPEND wa_cle_valid TO it_cle_valid. ENDLOOP. m. Report 15- Regulatory filing status This report will be extracted using the function module from the Z-table on the basis of Bulk API product, plant and review year. SELECT filing_date agency_name filing_type current_status FROM zqm_cto_arr_2052 INTO TABLE it_regulatory WHERE bulk_api EQ bulk_api AND werks EQ werks AND zyear EQ zyear.

n.

Report 16- Review of retained samples( Finished products) This report will be extracted using the function module from the Z-table on the basis of Bulk API product, plant and review year. SELECT charg hsdat zzdate zobser zsampl zremar FROM zqm_cto_arr_0661 INTO CORRESPONDING FIELDS OF TABLE it_reserve_sampl WHERE bulk_api = bulk_api AND werks = werks AND zyear = zyear.

o.

Report 17- Review of Last ARR This report will be final review report which be extracted on the basis of following 

Compare QMEL table and Z-QMEL table for 

 

Source notification field of QMEL table equals source notification table ZQMEL.  Material number of QMEL table = Bulk API of our input Notification type = Z3 ARR type should be equal to product

Title: Technical Specifications for Annual Review Report for Material Project ID

8000056898

Document ID

TS-8000056898

Status :

Department

IT BPE

Version

1.0

Page 42 of 62

Corporate Centre

Technical Specification By above condition source notification will be fetched. The source notification so obtained will be passed to QMSM table with condition that the task in the notification is with 40 and task 40 will be completed. SELECT b~qmnum a~aedat INTO TABLE it_qmnumdat FROM qmel AS a INNER JOIN zqm_cto_qmel AS b ON a~qmnum = b~qmnum WHERE a~matnr = bulk_api AND a~qmart EQ 'Z3' AND b~arr_type EQ 'PRODUCT' AND b~werks = werks AND b~arr_year = zyear. *

*

*

sort it_qmnumdat by aedat DESCENDING. DELETE it_qmnumdat FROM 2. READ TABLE it_qmnumdat INTO wa_qmnumdat INDEX 1. SELECT erldat FROM qmsm INTO TABLE it_last_arr_date WHERE qmnum = wa_qmnumdat-qmnum AND mncod EQ '040'. AND mncod EQ '060'. SORT it_last_arr_date by erldat DESCENDING. delete it_last_arr_date FROM 2. READ TABLE it_last_arr_date INTO wa_last_arr_date INDEX 1. wa_last_arr-apprv_dt_last_arr = wa_last_arr_date-erldat.

SELECT * FROM zqm_cto_arr_0671 INTO TABLE it_last_arr1 WHERE bulk_api = bulk_api AND zyear = zyear AND werks = werks. IF sy-subrc IS INITIAL. LOOP AT it_last_arr1 INTO wa_last_arr1. lv_serial_no = lv_serial_no + 1. wa_last_arriproposed_capa = wa_last_arr1-capa_long. wa_last_arricapa_compl_dt = wa_last_arr1-task_compl_date. wa_last_arristatus = wa_last_arr1-stat. wa_last_arriserial_no = lv_serial_no. if wa_last_arr-apprv_dt_last_arr is INITIAL. wa_last_arr-apprv_dt_last_arr = wa_last_arr1INITIAL_TIMELINE. endif. APPEND wa_last_arri TO it_last_arr. ENDLOOP.

Title: Technical Specifications for Annual Review Report for Material Project ID

8000056898

Document ID

TS-8000056898

Status :

Department

IT BPE

Version

1.0

Page 43 of 62

Corporate Centre

Technical Specification



All these 19 different reports are broadly classified into two major categories.  

Report with static column- where the data is fixed and there is no dynamic changes in data. Report with dynamic columns - This is the case where we have MICs in reports. Since there are different number of MIC s applicable to different material .So the number of columns should get dynamically picked up from SAP

Function 2 – Viewing and modification of report using Web dynpro

3.2 

Objective – The function will helps to trigger notification of type Z3 where task will be assigned to responsible person. Using the given task the responsible person can access the UWL or Web Dynpro screen to view, comment and modify some fields in the different reports whose data has already been extracted using the first functionality.



Details of Use – This function is used to get access to all the 19 reports whose data has been extracted using the first functionality for given material within given reviewing period. The whole functions will be realized using the workflow and Web Dynpro screen by the responsible person.

Web dynpro screen and the Workflow is given below. Workflow Id :WS92000316 

A notification Z3 will be triggered with initial task 10 assigned to the given person responsible. This will reach to the person using workflow. The user can access the report using the Web dypro corresponding to the given Task 10. Flowing are the functionality of the Web dynpro screen for task 10 as given below:    

The user will receive all the details of the material in the web dynpro screen and will have the provision of manually uploading of the data. This include report number 13 (regulatory filings report) and report number 15 (recall report). To Create a Webdynpro Application which Displays The Program which needs to be uploaded manually. To navigate from webdynpro to t-code and upload the data manually. User Uploads data manually for these reports and complete this task.

Title: Technical Specifications for Annual Review Report for Material Project ID

8000056898

Document ID

TS-8000056898

Status :

Department

IT BPE

Version

1.0

Page 44 of 62

Corporate Centre

Technical Specification



TASK 10 INITIAL SCREEN :

Title: Technical Specifications for Annual Review Report for Material Project ID

8000056898

Document ID

TS-8000056898

Status :

Department

IT BPE

Version

1.0

Page 45 of 62

Corporate Centre

Technical Specification

For all the tasks from 20 to 60 following functionality is coded in Web dynpro screen.  Dynamic Table has to be created which fetches all the sections and it will be represented in the form of button to the user.  Each button should trigger its respective PDF  User comments should be captured in a long text.  User clicks on button to view its respective PDF and saves the entered comments in the PDF.

Title: Technical Specifications for Annual Review Report for Material Project ID

8000056898

Document ID

TS-8000056898

Status :

Department

IT BPE

Version

1.0

Page 46 of 62

Corporate Centre

Technical Specification



Save ARR- this is the final step where all the report should be there in one document. This will be included in the task number 70 in same notification number generated.      

Once tasks 60 above gets completed by the concern person, then Save ARR tasks (tasks 70 ) will get triggered automatically from the same notification to the concern person. Create t-code which merges all the above said sections(Various PDF) into one PDF Correct Numbering of the document Webdynpro application with a button which calls this t-code and save the final ARR PDF. Upload the final ARR PDF from webdynpro application User will be navigated to t-code from webdynpro and he should save the final ARR. Upload the same from webdynpro.

Title: Technical Specifications for Annual Review Report for Material Project ID

8000056898

Document ID

TS-8000056898

Status :

Department

IT BPE

Version

1.0

Page 47 of 62

Corporate Centre

Technical Specification

The final PDF is obtained through Report ‘ZQM_CTO_ARR_PRODUCT’.

Title: Technical Specifications for Annual Review Report for Material Project ID

8000056898

Document ID

TS-8000056898

Status :

Department

IT BPE

Version

1.0

Page 48 of 62

Corporate Centre

Technical Specification

AT SELECTION-SCREEN OUTPUT. IF p_assemb = abap_false OR cl_fp_feature_test=>is_available( iv_connection = p_conn iv_feature = cl_fp_feature_test=>gc_assemble_stitch ) = abap_false. CLEAR p_stitch. p_repeat = 1. * LOOP AT SCREEN. * IF screen-group1 = 'STI'. * screen-active = 0. * MODIFY SCREEN. * ENDIF. * ENDLOOP. ENDIF. *AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_conn. PERFORM value_help_for_destination USING 'P_CONN'. START-OF-SELECTION. Title: Technical Specifications for Annual Review Report for Material Project ID

8000056898

Document ID

TS-8000056898

Status :

Department

IT BPE

Version

1.0

Page 49 of 62

Corporate Centre

Technical Specification DATA :wa_zqm_cto_qmel TYPE zqm_cto_qmel. If strlen( notif_no ) ne 12. CONCATENATE '000' notif_no INTO notif_no. ENDIF. SELECT SINGLE * FROM zqm_cto_qmel INTO wa_zqm_cto_qmel WHERE qmnum = notif_no. lv_bulk = wa_zqm_cto_qmel-matnr . lv_werks = wa_zqm_cto_qmel-arr_werks. lv_year = wa_zqm_cto_qmel-arr_year. IF strlen( lv_bulk ) ne '18'. CONCATENATE '000000000' lv_bulk INTO lv_bulk. ENDIF. lv_bulk1 = lv_bulk+9(9). lv_year1 = lv_year. lv_werks1 = lv_werks. gs_outputparams-assemble = 'M'. IF p_assemb = abap_true. IF p_stitch = abap_true AND cl_fp_feature_test=>is_available( iv_connection = p_conn iv_feature = cl_fp_feature_test=>gc_assemble_stitch ) = abap_true. gs_outputparams-assemble = 'S'. ELSE. gs_outputparams-assemble = abap_true. ENDIF. ENDIF. ***************************** **$$ CALL FORM NAME AND FM $$ ***************************** TRY. CALL FUNCTION 'FP_FUNCTION_MODULE_NAME' EXPORTING i_name = gc_form_top IMPORTING e_funcname = gv_fm_name_top. CATCH cx_fp_api_repository cx_fp_api_usage cx_fp_api_internal. MESSAGE ID 'FPAPIGENERIC' TYPE 'E' NUMBER '000' WITH gc_form_1. ENDTRY. TRY. CALL FUNCTION 'FP_FUNCTION_MODULE_NAME' EXPORTING i_name = gc_form_1 IMPORTING e_funcname = gv_fm_name_r1. CATCH cx_fp_api_repository cx_fp_api_usage cx_fp_api_internal. MESSAGE ID 'FPAPIGENERIC' TYPE 'E' NUMBER '000' WITH gc_form_1. ENDTRY. TRY. CALL FUNCTION 'FP_FUNCTION_MODULE_NAME' EXPORTING i_name = gc_form_2 IMPORTING Title: Technical Specifications for Annual Review Report for Material Project ID

8000056898

Document ID

TS-8000056898

Status :

Department

IT BPE

Version

1.0

Page 50 of 62

Corporate Centre

Technical Specification e_funcname = gv_fm_name_r2. CATCH cx_fp_api_repository cx_fp_api_usage cx_fp_api_internal. MESSAGE ID 'FPAPIGENERIC' TYPE 'E' NUMBER '000' WITH gc_form_1. ENDTRY.

****************************************< **$$TO GET PAGE NO $$ **************************************** * gs_docparams-FILLABLE = 'X'. * Set output parameters and open spool job. gs_outputparams-dest = 'LP01'. gs_outputparams-nodialog = abap_true. gs_outputparams-getpdf = 'M'. gs_outputparams-getpdl = 'X'. gs_outputparams-connection = p_conn. gs_outputparams-bumode = p_bum. "This job openclose is used to fetch the total no of Pages Alone.............. CALL FUNCTION 'FP_JOB_OPEN' CHANGING ie_outputparams = gs_outputparams EXCEPTIONS cancel = 1 usage_error = 2 system_error = 3 internal_error = 4 OTHERS = 5. IF sy-subrc IS NOT INITIAL. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDIF. *TASKCODE_main-comments = '02'. taskcode_main-comments = '70'. "to determine total no of Pages wa_pr_hdr_top = wa_pr_hdr. "fUNCTION MODULE FOR OTHER SECTIONS CALL FUNCTION gv_fm_name_top "pdf 1 EXPORTING /1bcdwb/docparams = gs_docparams * lv_page = it_compiled = it_compiled it_reviewed = it_reviewed it_approved = it_approved wa_pr_hdr_top = wa_pr_hdr_top WA_TOC_P = WA_TOC_P TASKCODE_TOP = TASKCODE_TOP IMPORTING /1bcdwb/formoutput EXCEPTIONS usage_error system_error internal_error OTHERS

= gs_output = = = =

1 2 3 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 51 of 62

Corporate Centre

Technical Specification IF sy-subrc IS INITIAL. ENDIF. * Close spool job. CALL FUNCTION 'FP_JOB_CLOSE' IMPORTING e_result = gs_joboutput EXCEPTIONS usage_error = 1 system_error = 2 internal_error = 3 OTHERS = 4. IF sy-subrc IS INITIAL. ENDIF.

"modify till here

gs_outputparams-nodialog = abap_true. gs_outputparams-getpdf = 'M'. gs_outputparams-getpdl = 'M'. gs_outputparams-connection = p_conn. gs_outputparams-bumode = p_bum. CALL FUNCTION 'FP_JOB_OPEN' CHANGING ie_outputparams = gs_outputparams EXCEPTIONS cancel = 1 usage_error = 2 system_error = 3 internal_error = 4 OTHERS = 5. IF sy-subrc IS NOT INITIAL. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDIF.

*

wa_pr_hdr_top-tot_no = total_no_pages. CALL FUNCTION gv_fm_name_top EXPORTING /1bcdwb/docparams = gs_docparams lv_page = it_compiled = it_compiled it_reviewed = it_reviewed it_approved = it_approved wa_pr_hdr_top = wa_pr_hdr_top WA_TOC_P = WA_TOC_P TASKCODE_TOP = TASKCODE_TOP IMPORTING /1bcdwb/formoutput = gs_output EXCEPTIONS usage_error = 1 system_error = 2 internal_error = 3 OTHERS = 4. IF sy-subrc IS INITIAL. PERFORM retrieve_pdf_table USING gv_index gs_output-pages CHANGING gt_result. ELSE.

Title: Technical Specifications for Annual Review Report for Material Project ID

8000056898

Document ID

TS-8000056898

Status :

Department

IT BPE

Version

1.0

Page 52 of 62

Corporate Centre

Technical Specification MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDIF. CALL FUNCTION gv_fm_name_r19 EXPORTING /1bcdwb/docparams = gs_docparams RECOMMENDATIONS = WA_RECOMMENDATIONS taskcode_19 = taskcode_19 wa_pr_hdr_r19 = wa_pr_hdr_r19 IMPORTING /1bcdwb/formoutput = gs_output EXCEPTIONS usage_error = 1 system_error = 2 internal_error = 3 OTHERS = 4. IF sy-subrc IS INITIAL. PERFORM retrieve_pdf_table USING gv_index gs_output-pages CHANGING gt_result. ELSE. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDIF. * Close spool job. CALL FUNCTION 'FP_JOB_CLOSE' IMPORTING e_result = gs_joboutput EXCEPTIONS usage_error = 1 system_error = 2 internal_error = 3 OTHERS = 4. IF sy-subrc IS INITIAL. PERFORM retrieve_pdf_table USING

gv_index gs_output-pages CHANGING gt_result.

ELSE. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDIF. INCLUDE fp_spool_constants. DATA ls_result TYPE gty_result. DATA lv_file TYPE fpfile. DATA lv_sep TYPE c. DATA lt_data TYPE tsfixml. DATA lv_rc TYPE sysubrc. *

"#EC INCL_OK

IF p_ucomm = '&IC1'. READ TABLE gt_result INDEX 1 INTO ls_result. CALL METHOD cl_gui_frontend_services=>get_temp_directory CHANGING temp_dir = lv_file

Title: Technical Specifications for Annual Review Report for Material Project ID

8000056898

Document ID

TS-8000056898

Status :

Department

IT BPE

Version

1.0

Page 53 of 62

Corporate Centre

Technical Specification EXCEPTIONS cntl_error = 1 error_no_gui = 2 not_supported_by_gui = 3 OTHERS = 4. IF sy-subrc IS NOT INITIAL. MESSAGE ID 'ED' TYPE 'E' NUMBER '256'. ENDIF. CALL METHOD cl_gui_cfw=>flush EXCEPTIONS cntl_system_error = 1 cntl_error = 2 OTHERS = 3. IF sy-subrc IS NOT INITIAL. MESSAGE ID 'ED' TYPE 'E' NUMBER '256'. ENDIF. *

lv_file = 'C:\Users\kumarabi\Desktop'. lv_file = 'C:\Users\alamn\Desktop'. CALL METHOD cl_gui_frontend_services=>get_file_separator CHANGING file_separator = lv_sep EXCEPTIONS cntl_error = 1 error_no_gui = 2 not_supported_by_gui = 3 OTHERS = 4. IF sy-subrc IS NOT INITIAL. MESSAGE ID 'ED' TYPE 'E' NUMBER '256'. ENDIF. CONCATENATE lv_file lv_sep sy-repid c_file_ext_pdf INTO lv_file. CALL FUNCTION 'SCMS_XSTRING_TO_BINARY' EXPORTING buffer = ls_result-content TABLES binary_tab = lt_data. CALL METHOD cl_gui_frontend_services=>gui_download EXPORTING bin_filesize = xstrlen( ls_result-content ) filename = lv_file filetype = 'BIN' CHANGING data_tab = lt_data EXCEPTIONS file_write_error = 1 no_batch = 2 gui_refuse_filetransfer = 3 invalid_type = 4 no_authority = 5 unknown_error = 6 header_not_allowed = 7 separator_not_allowed = 8 filesize_not_allowed = 9 header_too_long = 10 dp_error_create = 11 dp_error_send = 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 54 of 62

Corporate Centre

Technical Specification dp_error_write = 13 unknown_dp_error = 14 access_denied = 15 dp_out_of_memory = 16 disk_full = 17 dp_timeout = 18 file_not_found = 19 dataprovider_exception = 20 control_flush_error = 21 not_supported_by_gui = 22 error_no_gui = 23 OTHERS = 24. IF sy-subrc IS NOT INITIAL. MESSAGE ID 'ED' TYPE 'E' NUMBER '256'. ENDIF. CALL METHOD cl_gui_frontend_services=>execute EXPORTING document = lv_file synchronous = 'X' EXCEPTIONS cntl_error = 1 error_no_gui = 2 bad_parameter = 3 file_not_found = 4 path_not_found = 5 file_extension_unknown = 6 error_execute_failed = 7 synchronous_failed = 8 not_supported_by_gui = 9 OTHERS = 10. IF sy-subrc IS NOT INITIAL. MESSAGE ID 'ED' TYPE 'I' NUMBER '256'. ENDIF. * * * * * * * * * * * * * * * * * *

CALL METHOD cl_gui_frontend_services=>file_delete EXPORTING filename = lv_file CHANGING rc = lv_rc EXCEPTIONS file_delete_failed = 1 cntl_error = 2 error_no_gui = 3 file_not_found = 4 access_denied = 5 unknown_error = 6 not_supported_by_gui = 7 wrong_parameter = 8 OTHERS = 9. IF sy-subrc IS NOT INITIAL. MESSAGE ID 'ED' TYPE 'E' NUMBER '256'. ENDIF.

*&---------------------------------------------------------------------* *& Form retrieve_pdf_table Title: Technical Specifications for Annual Review Report for Material Project ID

8000056898

Document ID

TS-8000056898

Status :

Department

IT BPE

Version

1.0

Page 55 of 62

Corporate Centre

Technical Specification *&---------------------------------------------------------------------* * Retrieve table with PDF documents from forms-processing * run-time environment. *----------------------------------------------------------------------* * -->P_INDEX index from the loop over the customer table * -->P_PAGES total page count of a bundle *
View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF