<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: DATA IMPORT MODE for BAPI_INSPECTIONPLAN_CREATE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-import-mode-for-bapi-inspectionplan-create/m-p/8167942#M1622972</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jeet,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Specifically, your issue is with the Table parameter 'INSPCHARACTERISTIC'. There are some IF conditions in your code which were not very clear to me and hence, I can recommend you to verify the data in your internal table in De-bugging mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have a look at the Short-text of that parameter, then, there are some hints.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. The operation is identified by specifying the operation ID in the field OPERATION_ID. If this is not available, the system then trys to determine the operation using the operation number in the field ACTIVITY.&lt;/P&gt;&lt;P&gt;2. You should enter an inspection characteristic number in the field INSPCHAR to identify inspection characteristics.&lt;/P&gt;&lt;P&gt;3. You can create inspection charactetistics with or without reference to a master inspection characteristic, if you enter a master inspection characteristic (MSTR_CHAR and PMSTR_CHAR fields). Enter the reference for the master inspection characteristic in the field CHA_MASTER_IMPORT_MODUS (mode for reference to the master inspection characteristic).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"L" for reference&lt;/P&gt;&lt;P&gt;In this case, the master inspection characteristic must be completely maintained. In parameter INSPCHARACTERISTIC, you must only enter data in the fields, in which data cannot be transferred from the master inspection characteristic.&lt;/P&gt;&lt;P&gt;"C" for copy (flexible reference)&lt;/P&gt;&lt;P&gt;In this case, the data is copied from the master inspection characteristic to the inspection characteristic.&lt;/P&gt;&lt;P&gt;"N" for creating a flexible reference&lt;/P&gt;&lt;P&gt;In this case, no data is transferred from the master inspection characteristic. You must enter all fields in parameter INSPCHARACTERISTIC.&lt;/P&gt;&lt;P&gt;For "L" or "C", you can copy the control indicators for the inspection characteristic directly from the master inspection characteristic. For "N" or if you do not enter a master inspection characteristic, you must enter the control indicators individually or enter a key for the control indicators in field PRESET_CTRL_INDS_KEY, if you have defined this key in Customizing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. If you enter a tolerance key, the data is automatically copied from the tolerance key. If you enter an upper or lower tolerance specification limit, you must also set the control indicator for the upper or lower specification limit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are also notes to the BAPI which will be of use to you. Read the BAPI Documentation carefully.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pranav.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Sep 2011 10:14:04 GMT</pubDate>
    <dc:creator>former_member222709</dc:creator>
    <dc:date>2011-09-06T10:14:04Z</dc:date>
    <item>
      <title>DATA IMPORT MODE for BAPI_INSPECTIONPLAN_CREATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-import-mode-for-bapi-inspectionplan-create/m-p/8167939#M1622969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    I have to discuss an interesting issue with u all ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used FM 'BAPI_INSPECTIONPLAN_CREATE' to upload master inspection plan , everything is working fine .but when goes to upload Quantitative data for some Quantitative characterstic  such as .. decimal places , Measurement unit , target value , lower limit , upper limit, not able to upload.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried "C" ,"L" and "N' modes but not able to upload quantitative data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have googled a lot but not able to find any solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If any one please , put some precious suggestion or solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx,&lt;/P&gt;&lt;P&gt;Jeet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Sep 2011 18:59:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-import-mode-for-bapi-inspectionplan-create/m-p/8167939#M1622969</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-02T18:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: DATA IMPORT MODE for BAPI_INSPECTIONPLAN_CREATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-import-mode-for-bapi-inspectionplan-create/m-p/8167940#M1622970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jeet,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe you might be missing out on some indicator or flag. If you could post your code, then, it will be helpful in error resolution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pranav.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Sep 2011 05:57:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-import-mode-for-bapi-inspectionplan-create/m-p/8167940#M1622970</guid>
      <dc:creator>former_member222709</dc:creator>
      <dc:date>2011-09-05T05:57:42Z</dc:date>
    </item>
    <item>
      <title>Re: DATA IMPORT MODE for BAPI_INSPECTIONPLAN_CREATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-import-mode-for-bapi-inspectionplan-create/m-p/8167941#M1622971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pranav ,&lt;/P&gt;&lt;P&gt;   Thanx a lot for showing so much of interest............&lt;/P&gt;&lt;P&gt;Code is as follows:-----&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report  ZPP_INSPECTION_UPLOAD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;This Program is used to upload QM inspection Plans using BAPI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;Note:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; 1) Provide the Data as per the Template Attached&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; 2) See Sample Text File for Example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZPP_INSPECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Type Pool Used for ALV Log Display&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE-POOLS : slis,truxs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Data Declarations for import internal table parameters to BAPI&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : t_task TYPE TABLE OF bapi1191_tsk_c WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_materialtaskallocation TYPE TABLE OF bapi1191_mtk_c  WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_inspcharacteristic TYPE TABLE OF bapi1191_cha_c  WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_operation TYPE TABLE OF bapi1191_opr_c  WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t_return TYPE TABLE OF bapiret2 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: file_name TYPE rlgrap-filename.&lt;/P&gt;&lt;P&gt;DATA: raw_data TYPE truxs_t_text_data.&lt;/P&gt;&lt;P&gt;DATA: abap_true TYPE sap_bool.&lt;/P&gt;&lt;P&gt;DATA: program_name TYPE sy-repid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Local Variables&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : v_group TYPE bapi1191_tsk_c-task_list_group,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_grpcounter TYPE bapi1191_tsk_c-group_counter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_file TYPE localfile,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_row TYPE n,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_plant LIKE t_task-plant,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_lines TYPE i,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_per TYPE p,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_txt(50) TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Declare Internal table for Message tables for ALV Display&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INCLUDE zdata_dec.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Structure to Load Data from the Text File&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES : BEGIN OF ty_insplan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plant LIKE  t_task-plant,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;material  LIKE  t_materialtaskallocation-material,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tsk_description LIKE  t_task-description,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;task_list_usage LIKE  t_task-task_list_usage,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;task_list_status  LIKE  t_task-task_list_status,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lot_size_from         LIKE  t_task-lot_size_from,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lot_size_to         LIKE  t_task-lot_size_to,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;planning_work_center  LIKE  t_task-planning_work_center,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;task_measure_unit LIKE  t_task-task_measure_unit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;op_activity         LIKE  t_operation-activity,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;control_key         LIKE  t_operation-control_key,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;work_cntr         LIKE  t_operation-work_cntr,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;op_description  LIKE  t_operation-description,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;operation_measure_unit  LIKE  t_operation-operation_measure_unit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*nominator LIKE t_operation-nominator,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*cost_rel TYPE c,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ins_activity         LIKE t_inspcharacteristic-activity,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inspchar         LIKE t_inspcharacteristic-inspchar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;quantitative_ind  LIKE  t_inspcharacteristic-quantitative_ind,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mstr_char         LIKE  t_inspcharacteristic-mstr_char,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PMSTR_CHAR  LIKE  t_inspcharacteristic-pmstr_char,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cha_master_import_modus LIKE t_inspcharacteristic-cha_master_import_modus,&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;char_descr         LIKE t_inspcharacteristic-char_descr,&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;method  LIKE  t_inspcharacteristic-method,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pmethod LIKE  t_inspcharacteristic-pmethod,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dec_places like t_inspcharacteristic-dec_places,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;meas_unit LIKE  t_inspcharacteristic-meas_unit,&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;target_val         LIKE t_inspcharacteristic-target_val,&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;up_tol_lmt         LIKE t_inspcharacteristic-up_tol_lmt,&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;lw_tol_lmt         LIKE t_inspcharacteristic-lw_tol_lmt,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEF_CODE_GRP_GENERAL LIKE t_inspcharacteristic-DEF_CODE_GRP_GENERAL,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEF_CODE_GENERAL    LIKE t_inspcharacteristic-DEF_CODE_GENERAL,&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;smpl_procedure  LIKE  t_inspcharacteristic-smpl_procedure,&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;smpl_unit         LIKE  t_inspcharacteristic-smpl_unit,&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;smpl_quant         LIKE t_inspcharacteristic-smpl_quant,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SPC_CRITERION_KEY LIKE  t_inspcharacteristic-SPC_CRITERION_KEY,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END OF ty_insplan.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal Table to Load and Hold Data from the Text File&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : it_insplan TYPE TABLE OF ty_insplan WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Clear Internal Tables holding Messages&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR it_loghead[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR it_logdetail[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call Subroutine to Show File Dialog&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM choose_data_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call Subroutine to Load data into Internal table from excel file&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM load_data_from_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Determine the number of records in the internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE TABLE it_insplan LINES v_lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Loop at internal table to load all data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT it_insplan.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call Subroutine to Display the Progress&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; PERFORM display_progress_timer.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      INPUT         = it_insplan-material&lt;/P&gt;&lt;P&gt;   IMPORTING&lt;/P&gt;&lt;P&gt;     OUTPUT        = it_insplan-material&lt;/P&gt;&lt;P&gt;            .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ON CHANGE OF it_insplan-material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF it_insplan-ins_activity IS INITIAL AND t_task IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call Subroutine to Load the inspection plan&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      PERFORM call_bapi_and_commit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Re-initialise the internal tables&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      PERFORM clear_internal_tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF it_insplan-plant IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      v_plant = it_insplan-plant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDON.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF it_insplan-plant NE space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Moving Corresponding fields to Material internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_materialtaskallocation-material = it_insplan-material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_materialtaskallocation-plant = it_insplan-plant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_materialtaskallocation-valid_from = sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    APPEND t_materialtaskallocation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Moving Corresponding fields to task internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_task-valid_from = sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_task-description = it_insplan-tsk_description.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_task-task_list_usage = it_insplan-task_list_usage.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_task-task_list_status = it_insplan-task_list_status.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_task-lot_size_from = it_insplan-lot_size_from.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_task-lot_size_to = it_insplan-lot_size_to.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_task-planning_work_center = it_insplan-planning_work_center.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_task-plant = it_insplan-plant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_task-task_measure_unit = it_insplan-task_measure_unit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    APPEND t_task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Moving Corresponding fields to Operation internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_operation-valid_from = sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_operation-activity = it_insplan-op_activity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_operation-plant = it_insplan-plant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_operation-control_key = it_insplan-control_key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_operation-work_cntr =  it_insplan-work_cntr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_operation-description = it_insplan-op_description.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_operation-operation_measure_unit   = it_insplan-operation_measure_unit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_operation-denominator  = '1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_operation-nominator    = '1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_operation-base_quantity = '1.000'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    APPEND t_operation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Moving Corresponding fields to Inspection Characteristics internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_inspcharacteristic-activity = it_insplan-ins_activity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_inspcharacteristic-inspchar = it_insplan-inspchar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_inspcharacteristic-valid_from  = sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_inspcharacteristic-mstr_char = it_insplan-mstr_char.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_inspcharacteristic-pmstr_char = it_insplan-pmstr_char.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_inspcharacteristic-method = it_insplan-method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_inspcharacteristic-pmethod = it_insplan-pmethod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_inspcharacteristic-smpl_procedure  = it_insplan-smpl_procedure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_inspcharacteristic-smpl_unit = it_insplan-smpl_unit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_inspcharacteristic-dec_places = it_insplan-dec_places.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_inspcharacteristic-meas_unit = it_insplan-meas_unit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_inspcharacteristic-smpl_quant = it_insplan-smpl_quant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_inspcharacteristic-char_descr = it_insplan-char_descr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF not it_insplan-target_val is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   t_inspcharacteristic-quantitative_ind = it_insplan-quantitative_ind.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_inspcharacteristic-target_val = it_insplan-target_val.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_inspcharacteristic-up_tol_lmt = it_insplan-up_tol_lmt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_inspcharacteristic-lw_tol_lmt = it_insplan-lw_tol_lmt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;   t_inspcharacteristic-cha_master_import_modus = .&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*ELSEIF it_insplan-target_val is initial.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;      t_inspcharacteristic-cha_master_import_modus = it_insplan-cha_master_import_modus.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_inspcharacteristic-cha_master_import_modus = it_insplan-cha_master_import_modus.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_inspcharacteristic-def_code_grp_general = it_insplan-def_code_grp_general.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    t_inspcharacteristic-def_code_general = it_insplan-def_code_general.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   t_inspcharacteristic-spc_criterion_key = it_insplan-spc_criterion_key.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    APPEND t_inspcharacteristic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CLEAR t_inspcharacteristic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF t_task IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call Subroutine to upload last inspection plan details&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  PERFORM call_bapi_and_commit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call Subroutine to Display Log in ALV&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM display_log_list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  CHOOSE_DATA_FILE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; Subroutine to Show File Dialog and select file from the PC&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM choose_data_file .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'F4_FILENAME'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    PROGRAM_NAME        = SYST-CPROG&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    DYNPRO_NUMBER       = SYST-DYNNR&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    FIELD_NAME          = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   IMPORTING&lt;/P&gt;&lt;P&gt;     FILE_NAME           =  file_name&lt;/P&gt;&lt;P&gt;            .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " CHOOSE_DATA_FILE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  LOAD_DATA_FROM_FILE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Subroutine to Load data into Internal table from text file&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM load_data_from_file .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call Function module to load data from Text File&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    I_FIELD_SEPERATOR          =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     I_LINE_HEADER              = 'X'&lt;/P&gt;&lt;P&gt;      I_TAB_RAW_DATA             = raw_data&lt;/P&gt;&lt;P&gt;      I_FILENAME                 = file_name&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      I_TAB_CONVERTED_DATA       = it_insplan&lt;/P&gt;&lt;P&gt;   EXCEPTIONS&lt;/P&gt;&lt;P&gt;     CONVERSION_FAILED          = 1&lt;/P&gt;&lt;P&gt;     OTHERS                     = 2&lt;/P&gt;&lt;P&gt;            .&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt; MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " LOAD_DATA_FROM_FILE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  CALL_BAPI_AND_COMMIT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Subroutine to Load the inspection plans&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM call_bapi_and_commit .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Initialise internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  REFRESH t_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call Function to Create Inspection Plan&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'BAPI_INSPECTIONPLAN_CREATE'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      group                  = v_group&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      groupcounter           = v_grpcounter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      task                   = t_task&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      materialtaskallocation = t_materialtaskallocation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      operation              = t_operation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      inspcharacteristic     = t_inspcharacteristic&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      return                 = t_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ TABLE t_return INDEX 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DESCRIBE TABLE t_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Check for success message and then Commit, otherwise dont commit&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF t_return-type EQ 'S' AND sy-tfill EQ 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate Success message in internal table for ALV Log display&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    it_loghead-plant = v_plant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    it_loghead-material = t_materialtaskallocation-material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    it_loghead-msgtype = 'S'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   it_loghead-msg = 'Inspection Plan Created Successfully'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    APPEND it_loghead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   MESSAGE e499(sy) with 'Inspection Plan  created Successfully'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate Error message in internal table for ALV Log display&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    it_loghead-plant = v_plant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    it_loghead-material = t_materialtaskallocation-material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    it_loghead-msgtype = 'E'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   it_loghead-msg = 'Inspection Plan Not Created'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    APPEND it_loghead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Retrieve and populate Error Details for Log Display&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CLEAR t_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT t_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      it_logdetail-plant = v_plant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      it_logdetail-material = t_materialtaskallocation-material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      it_logdetail-msgtype = t_return-type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      it_logdetail-msg = t_return-message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF t_return-parameter IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        CONCATENATE it_logdetail-msg '- Error in parameter'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        t_return-parameter INTO it_logdetail-msg SEPARATED BY space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        IF t_return-row IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          v_row = t_return-row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          CONCATENATE it_logdetail-msg '- In Row' v_row&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          INTO it_logdetail-msg SEPARATED BY space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      APPEND it_logdetail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    REFRESH t_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*MESSAGE e499(sy) with 'Inspection Plan is not created Successfully'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " CALL_BAPI_AND_COMMIT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  CLEAR_INTERNAL_TABLES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Subroutine to Clear Internal Tables&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM clear_internal_tables .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR t_materialtaskallocation[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR t_task[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR t_operation[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR t_inspcharacteristic[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR t_return[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " CLEAR_INTERNAL_TABLES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check into it , and let me know if any thing I am missing.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jeet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2011 05:20:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-import-mode-for-bapi-inspectionplan-create/m-p/8167941#M1622971</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-06T05:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: DATA IMPORT MODE for BAPI_INSPECTIONPLAN_CREATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-import-mode-for-bapi-inspectionplan-create/m-p/8167942#M1622972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jeet,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Specifically, your issue is with the Table parameter 'INSPCHARACTERISTIC'. There are some IF conditions in your code which were not very clear to me and hence, I can recommend you to verify the data in your internal table in De-bugging mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have a look at the Short-text of that parameter, then, there are some hints.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. The operation is identified by specifying the operation ID in the field OPERATION_ID. If this is not available, the system then trys to determine the operation using the operation number in the field ACTIVITY.&lt;/P&gt;&lt;P&gt;2. You should enter an inspection characteristic number in the field INSPCHAR to identify inspection characteristics.&lt;/P&gt;&lt;P&gt;3. You can create inspection charactetistics with or without reference to a master inspection characteristic, if you enter a master inspection characteristic (MSTR_CHAR and PMSTR_CHAR fields). Enter the reference for the master inspection characteristic in the field CHA_MASTER_IMPORT_MODUS (mode for reference to the master inspection characteristic).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"L" for reference&lt;/P&gt;&lt;P&gt;In this case, the master inspection characteristic must be completely maintained. In parameter INSPCHARACTERISTIC, you must only enter data in the fields, in which data cannot be transferred from the master inspection characteristic.&lt;/P&gt;&lt;P&gt;"C" for copy (flexible reference)&lt;/P&gt;&lt;P&gt;In this case, the data is copied from the master inspection characteristic to the inspection characteristic.&lt;/P&gt;&lt;P&gt;"N" for creating a flexible reference&lt;/P&gt;&lt;P&gt;In this case, no data is transferred from the master inspection characteristic. You must enter all fields in parameter INSPCHARACTERISTIC.&lt;/P&gt;&lt;P&gt;For "L" or "C", you can copy the control indicators for the inspection characteristic directly from the master inspection characteristic. For "N" or if you do not enter a master inspection characteristic, you must enter the control indicators individually or enter a key for the control indicators in field PRESET_CTRL_INDS_KEY, if you have defined this key in Customizing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. If you enter a tolerance key, the data is automatically copied from the tolerance key. If you enter an upper or lower tolerance specification limit, you must also set the control indicator for the upper or lower specification limit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are also notes to the BAPI which will be of use to you. Read the BAPI Documentation carefully.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pranav.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2011 10:14:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-import-mode-for-bapi-inspectionplan-create/m-p/8167942#M1622972</guid>
      <dc:creator>former_member222709</dc:creator>
      <dc:date>2011-09-06T10:14:04Z</dc:date>
    </item>
    <item>
      <title>Re: DATA IMPORT MODE for BAPI_INSPECTIONPLAN_CREATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-import-mode-for-bapi-inspectionplan-create/m-p/8167943#M1622973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanx all&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Sep 2011 05:22:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-import-mode-for-bapi-inspectionplan-create/m-p/8167943#M1622973</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-09-16T05:22:16Z</dc:date>
    </item>
  </channel>
</rss>

