<?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: bapi_material_savedata problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-material-savedata-problem/m-p/4910374#M1146403</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After using BAPI_MATERIAL_SAVEDATA try to use COMMIT WORK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF sy-subrc IS INITIAL.
        COMMIT WORK.
      ELSE.
        ROLLBACK WORK.
      ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;SR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Dec 2008 07:49:59 GMT</pubDate>
    <dc:creator>RoySayak</dc:creator>
    <dc:date>2008-12-12T07:49:59Z</dc:date>
    <item>
      <title>bapi_material_savedata problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-material-savedata-problem/m-p/4910360#M1146389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi experts,&lt;/P&gt;&lt;P&gt;i am updating some custom fields using bapi_material_savedata.but i am populating bapi with all parameters.but custom fields are not updating.please guide me&lt;/P&gt;&lt;P&gt;check the  below code..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:BEGIN OF IT_EXTENSIONIN OCCURS 0 .&lt;/P&gt;&lt;P&gt;     INCLUDE STRUCTURE BAPIPAREX.&lt;/P&gt;&lt;P&gt;DATA:END OF IT_EXTENSIONIN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:BEGIN OF IT_EXTENSIONINX OCCURS 0 .&lt;/P&gt;&lt;P&gt;     INCLUDE STRUCTURE BAPIPAREX.&lt;/P&gt;&lt;P&gt;DATA:END OF IT_EXTENSIONINX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:TE TYPE BAPI_TE_MARA,&lt;/P&gt;&lt;P&gt;     TEX TYPE BAPI_TE_MARAX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:header TYPE bapimathead .&lt;/P&gt;&lt;P&gt;DATA:makt1 LIKE bapi_makt OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;data:bapiret2 LIKE bapiret2 OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;DATA:CLIENTDATA TYPE BAPI_MARA .&lt;/P&gt;&lt;P&gt;data: material type mara-matnr.&lt;/P&gt;&lt;P&gt;material = '000000002000000108'.&lt;/P&gt;&lt;P&gt;header-material = material.&lt;/P&gt;&lt;P&gt;header-MATL_TYPE = 'ZPRT'.&lt;/P&gt;&lt;P&gt;HEADER-IND_SECTOR = 'M'.&lt;/P&gt;&lt;P&gt;HEADER-BASIC_VIEW = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TE-MATERIAL = material.&lt;/P&gt;&lt;P&gt;TE-zzcode2 = 'C'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TEX-MATERIAL = material.&lt;/P&gt;&lt;P&gt;TEX-zzcode2 = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE 'BAPI_TE_MARA' TO IT_EXTENSIONIN-STRUCTURE.&lt;/P&gt;&lt;P&gt;IT_EXTENSIONIN-VALUEPART1 = TE.&lt;/P&gt;&lt;P&gt;APPEND IT_EXTENSIONIN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE 'BAPI_TE_MARAX' TO IT_EXTENSIONINX-STRUCTURE.&lt;/P&gt;&lt;P&gt;IT_EXTENSIONINX-VALUEPART1 = TEX.&lt;/P&gt;&lt;P&gt;APPEND IT_EXTENSIONINX.&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;CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    HEADDATA                    = HEADER&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   CLIENTDATA                  =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  CLIENTDATAX                 =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PLANTDATA                   =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PLANTDATAX                  =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FORECASTPARAMETERS          =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FORECASTPARAMETERSX         =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PLANNINGDATA                =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PLANNINGDATAX               =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  STORAGELOCATIONDATA         =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  STORAGELOCATIONDATAX        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  VALUATIONDATA               =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  VALUATIONDATAX              =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  WAREHOUSENUMBERDATA         =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  WAREHOUSENUMBERDATAX        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  SALESDATA                   =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  SALESDATAX                  =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  STORAGETYPEDATA             =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  STORAGETYPEDATAX            =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FLAG_ONLINE                 = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FLAG_CAD_CALL               = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  NO_DEQUEUE                  = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  NO_ROLLBACK_WORK            = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   RETURN                      = bapiret2&lt;/P&gt;&lt;P&gt; TABLES&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   MATERIALDESCRIPTION         =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  UNITSOFMEASURE              =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  UNITSOFMEASUREX             =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  INTERNATIONALARTNOS         =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MATERIALLONGTEXT            =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  TAXCLASSIFICATIONS          =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  RETURNMESSAGES              =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PRTDATA                     =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PRTDATAX                    =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    EXTENSIONIN                 = IT_EXTENSIONIN&lt;/P&gt;&lt;P&gt;    EXTENSIONINX                = IT_EXTENSIONINX&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  NFMCHARGEWEIGHTS            =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  NFMCHARGEWEIGHTSX           =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  NFMSTRUCTURALWEIGHTS        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  NFMSTRUCTURALWEIGHTSX       =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'BAPI_TRANSACTION_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;thanks&lt;/P&gt;&lt;P&gt;sai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 07:54:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-material-savedata-problem/m-p/4910360#M1146389</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-11T07:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: bapi_material_savedata problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-material-savedata-problem/m-p/4910361#M1146390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When creating material master data, you must transfer the material number, the material type, and the industry sector to the method. You must also enter a material description and its language.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Nicole&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 08:03:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-material-savedata-problem/m-p/4910361#M1146390</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-11T08:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: bapi_material_savedata problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-material-savedata-problem/m-p/4910362#M1146391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi nikole,&lt;/P&gt;&lt;P&gt;thanks for ur reply. i am not creating material. i am updating already existing material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 08:09:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-material-savedata-problem/m-p/4910362#M1146391</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-11T08:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: bapi_material_savedata problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-material-savedata-problem/m-p/4910363#M1146392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are already some threads with the same question of [extensionin in bapi_material_savedata|https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_all&amp;amp;query=extensionin+bapi_material_savedata&amp;amp;adv=true&amp;amp;sdn_author_name=&amp;amp;sortby=cm_rnd_rankvalue] none of those provides you any clues ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also check if you can maintain those fields with transactions MM01/MM02 and MM17, if not, begin with OSS [Note 44410 - Integrating cust.-specific fields in matl master|https://service.sap.com/sap/support/notes/44410] only then will you be able to begin with the BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 08:21:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-material-savedata-problem/m-p/4910363#M1146392</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2008-12-11T08:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: bapi_material_savedata problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-material-savedata-problem/m-p/4910364#M1146393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have the Extension one and extension1x in table  paramters u can pass u r customer fields there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just go through this.This is from function module of BAPI_MATERAIL_SAVEDATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just u go thorugh the documentation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Besides the table fields already defined, customer-defined table fields can also be supplied with data. Since these fields are created by the customer, they are known only during the runtime and must therefore be determined dynamically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The structures BAPI_TE_&amp;lt;NAME&amp;gt; (&amp;lt;NAME&amp;gt; = MARA, MARC, MARD, MBEW, MLGN, MLGT, MVKE) and the relevant checkbox structures BAPI_TE_&amp;lt;NAME&amp;gt; (&amp;lt;NAME&amp;gt; = MARAX, etc.) must first be extended by the customer to include the fields required. The standard structures contain only the corresponding key fields. When including new fields in these structures, make sure that the field has the same name as the field in the database table. In addition, the fields in the structures BAPI_TE_&amp;lt;NAME&amp;gt; may only be of the type CHARACTER. The data element BAPIUPDATE must be used for the fields in the checkbox structure (except for key fields).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The two parameters EXTENSIONIN and EXTENSIONINX are used to transfer the data to the method. The field STRUCTURE contains the name of the structure (for example, BAPI_TE_MARA or BAPI_TE_MARAX) used to identify the work area (for example, WA_BAPI_TE_MARA or WA_BAPI_TE_MARAX) to which the data is transferred. The remaining fields for the parameter EXTENSIONIN or EXTENSIONINX contain the data for the key fields (for example, the material number) and the data for the customer-defined fields. The number of characters reserved in the two parameters for the content of a customer-defined field must be the same as the number of characters for the corresponding work area field. If the number of characters required is smaller, the remaining characters in the two parameters must be filled with blanks. Only then may the content of another field be transferred. Here too, remember that the data is written to the database only if the corresponding indicator has been set in the work area.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 08:26:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-material-savedata-problem/m-p/4910364#M1146393</guid>
      <dc:creator>tarangini_katta</dc:creator>
      <dc:date>2008-12-11T08:26:19Z</dc:date>
    </item>
    <item>
      <title>Re: bapi_material_savedata problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-material-savedata-problem/m-p/4910365#M1146394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZMATERIALEXTENSION line-size 500 no standard page heading .&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;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; T A B L E S&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                             .&lt;/P&gt;&lt;P&gt;tables: t001l, "Storage Locations&lt;/P&gt;&lt;P&gt;        mara,  "General Material Data&lt;/P&gt;&lt;P&gt;        makt,  "Material Descriptions&lt;/P&gt;&lt;P&gt;        mbew,  "Material Valuation&lt;/P&gt;&lt;P&gt;        marc,  "Plant Data for Material&lt;/P&gt;&lt;P&gt;        mltx,  "Purchase Order Descriptions&lt;/P&gt;&lt;P&gt;        tq34, "Default values for inspection type&lt;/P&gt;&lt;P&gt;        qmat. "Inspection type - material parameters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*DECLARING WORK AREAs  TO BE PASSED TO THE FUNCTION MODULE.&lt;/P&gt;&lt;P&gt;data : ihead_data type BAPIMaTHEAD,&lt;/P&gt;&lt;P&gt;       iclient_data type bapi_mara,                    "Client Data&lt;/P&gt;&lt;P&gt;       iclient_datax type bapi_marax,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     imakt like bapi_makt,                           "Mat Description&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;       iplant_data    like bapi_marc,                  "Plant View&lt;/P&gt;&lt;P&gt;       iplant_datax   like bapi_marcx,&lt;/P&gt;&lt;P&gt;       iltxt type table of bapi_mltx with header line, "Pur Order Text&lt;/P&gt;&lt;P&gt;       istoragelocationdata type bapi_mard,            "Storage Location&lt;/P&gt;&lt;P&gt;       istoragelocationdatax type bapi_mardx,&lt;/P&gt;&lt;P&gt;       iaccounting_data  like bapi_mbew,               "Accounting View&lt;/P&gt;&lt;P&gt;       iaccounting_datax  like bapi_mbewx,&lt;/P&gt;&lt;P&gt;       bapiret like bapiret2,&lt;/P&gt;&lt;P&gt;       returnm type table of bapi_matreturn2 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*INTERNAL TABLE TO HOLD THE MATERIAL DESCRIPTION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of it_makt occurs 0.&lt;/P&gt;&lt;P&gt;include structure bapi_makt.&lt;/P&gt;&lt;P&gt;data end of it_makt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**Internal Table to hold the records in the text file&lt;/P&gt;&lt;P&gt;types:begin of it,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matnr(18),  " Material number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mbrsh(1),   " Industry sector&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mtart(4),   " Material type&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;werks(4),   " Plant&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LGORT_D(4),  "Storage Location&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;maktx(40),  " Material description&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;meins(3),   " Base unit of measure&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matkl(9) ,  " Material group&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BISMT(18),  " Old Material number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;spart(2),   " Division&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gewei(3),   " Weight Unit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TEXT1(30),  " Purchasr Order Text&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TEXT2(30),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TEXT3(30),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TEXT4(30),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TEXT5(30),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TEXT6(30),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DZEINR(22), " Document&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ekgrp(3),   " Purchasing group&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EKWSL(4),   " Purchase Value Key&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WEBAZ(3),   " Goods receipt processing time in days&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DISMM(2),   " MRP Type&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MINBE(13),  " Reorder point&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DISPO(3),   " MRP Controller&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DISLS(2),   " Lot size (materials planning)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MABST(13),  " Maximum stock level&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PLIFZ(3),   " Planned delivery time in days&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WEBAZ1(3),  " Goods receipt processing time in days&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FHORI(3),   " Scheduling Margin Key for Floats&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EISBE(13),  " Safety stock&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MTVFP(2),   " Checking Group for Availability Check&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LGPBE(10),  " Storage Bin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QMATAUTH(6)," Material Authorization Group for Activities in QM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QMPUR(1),   " QM in Procurement is Active&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QSSPUR(8),  " Control Key for Quality Management in Procurement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;****************************************Add for Inspection setup&lt;/P&gt;&lt;P&gt;QPART1(8),  " Inspection Type&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QPART2(8),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QPART3(8),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QPART4(8),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QPART5(8),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QMATAKTIV1(1)," Inspection Type - Material Combination is Active&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QMATAKTIV2(1),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QMATAKTIV3(1),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QMATAKTIV4(1),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QMATAKTIV5(1),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**************************************Add for Inspection setup&lt;/P&gt;&lt;P&gt;BKLAS(4),   " Valuation Class&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BWTTY_D(1), " Valuation Category&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vprsv(1),   " Price control indicator&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VERPR_BAPI(23), " Moving average price/periodic unit price&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PEINH(5),    " Price Unit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end of it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: it_data type table of it ,&lt;/P&gt;&lt;P&gt;      wa_data like line  of it_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Declaring Data Variables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: fstring type string.&lt;/P&gt;&lt;P&gt;data: potext type string."Purchase Order Desc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Internal Table for Messages&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:begin of it_ret occurs 0.&lt;/P&gt;&lt;P&gt;      include structure bapiret2.&lt;/P&gt;&lt;P&gt;      data end of it_ret.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:begin of it_fret occurs 0.&lt;/P&gt;&lt;P&gt;      include structure bapiret2.&lt;/P&gt;&lt;P&gt;      data end of it_fret.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Internal Table for Success Log&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:begin of s_fret occurs 0,&lt;/P&gt;&lt;P&gt;     parameter like bapiret2-PARAMETER,&lt;/P&gt;&lt;P&gt;     message like bapiret2-MESSAGE,&lt;/P&gt;&lt;P&gt;     type like bapiret2-type,&lt;/P&gt;&lt;P&gt;     end of s_fret.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Internal Table for Error Log&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:begin of e_fret occurs 0,&lt;/P&gt;&lt;P&gt;     parameter like bapiret2-PARAMETER,&lt;/P&gt;&lt;P&gt;     message like bapiret2-MESSAGE,&lt;/P&gt;&lt;P&gt;     type like bapiret2-type,&lt;/P&gt;&lt;P&gt;     end of e_fret.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:begin of main_table occurs 0,&lt;/P&gt;&lt;P&gt;     parameter like bapiret2-PARAMETER,&lt;/P&gt;&lt;P&gt;     message like bapiret2-MESSAGE,&lt;/P&gt;&lt;P&gt;     type like bapiret2-type,&lt;/P&gt;&lt;P&gt;     end of main_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*INTERNAL TABLE TO HOLD THE QMAT with Inspection Setup Data to be&lt;/P&gt;&lt;P&gt;*Distributed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : insctrl type table of bapi1001004_qmat 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;P&gt;*INTERNAL TABLE TO HOLD HEADER DATA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: it_excel type alsmex_tabline occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*SELECTION-SCREEN ELEMENTS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen begin of block b1 with frame title text-001.&lt;/P&gt;&lt;P&gt;parameter: fname type rlgrap-filename default 'c:\mat_extension.xls'.&lt;/P&gt;&lt;P&gt;parameter: slogfile type rlgrap-filename default 'c:\slog.txt'.&lt;/P&gt;&lt;P&gt;parameter: elogfile type rlgrap-filename default 'c:\elog.txt'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: p_begcol type i default '2' no-display,&lt;/P&gt;&lt;P&gt;            p_begrow type i default '7' no-display,&lt;/P&gt;&lt;P&gt;            p_endcol type i default '200' no-display,&lt;/P&gt;&lt;P&gt;            p_endrow type i default '2500' no-display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*perform f_get_data.&lt;/P&gt;&lt;P&gt;selection-screen end of block b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*DECLARATION OF EXCELAL TABLE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at selection-screen on value-request for fname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform f_get_file using fname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;perform f_xls_itab using fname&lt;/P&gt;&lt;P&gt;                   changing it_excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform f_move_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform f_get_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform f_call_bapi.&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;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  F_GET_FILE&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     --&amp;gt;P_FNAME  text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     &amp;lt;--P_SY_SUBRC  text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;*****************************************************************&lt;/P&gt;&lt;P&gt;****************This routine will display F4 help against filename&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form f_get_file  using    p_fname like fname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;******************************************************************&lt;/P&gt;&lt;P&gt;*********Fn Module for F4 help appear on the filename(on selection&lt;/P&gt;&lt;P&gt;*********screen)&lt;/P&gt;&lt;P&gt;call function 'KD_GET_FILENAME_ON_F4'&lt;/P&gt;&lt;P&gt; exporting&lt;/P&gt;&lt;P&gt;   program_name        = syst-repid&lt;/P&gt;&lt;P&gt;   dynpro_number       = syst-dynnr&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FIELD_NAME          = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  STATIC              = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MASK                = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  changing&lt;/P&gt;&lt;P&gt;    file_name           = p_fname&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MASK_TOO_LONG       = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS              = 2&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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 e006(zhnc).&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " F_GET_FILE&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;*&amp;amp;      Form  F_XLS_ITAB&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     --&amp;gt;P_FNAME  text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     &amp;lt;--P_IT_EXCEL  text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;****************************************************************&lt;/P&gt;&lt;P&gt;***************This routine will convert the excel file data into&lt;/P&gt;&lt;P&gt;***************internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form f_xls_itab  using    p_fname&lt;/P&gt;&lt;P&gt;                 changing p_it_excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*********************************************************************&lt;/P&gt;&lt;P&gt;*********Fn Module to convert the excel file data into internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'&lt;/P&gt;&lt;P&gt;  exporting&lt;/P&gt;&lt;P&gt;    filename                      = 'c:\mat_extension.xls'&lt;/P&gt;&lt;P&gt;    i_begin_col                   = p_begcol&lt;/P&gt;&lt;P&gt;    i_begin_row                   = p_begrow&lt;/P&gt;&lt;P&gt;    i_end_col                     = p_endcol&lt;/P&gt;&lt;P&gt;    i_end_row                     = p_endrow&lt;/P&gt;&lt;P&gt;  tables&lt;/P&gt;&lt;P&gt;    intern                        = it_excel&lt;/P&gt;&lt;P&gt; exceptions&lt;/P&gt;&lt;P&gt;   inconsistent_parameters       = 1&lt;/P&gt;&lt;P&gt;   upload_ole                    = 2&lt;/P&gt;&lt;P&gt;   others                        = 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt;  0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endform.                    " F_XLS_ITAB&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;*&amp;amp;      Form  F_MOVE_DATA&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; --&amp;gt;  p1        text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; &amp;lt;--  p2        text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;**********************************************************************&lt;/P&gt;&lt;P&gt;***********This routine will move each record to an internal table row&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form f_move_data .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : lv_index type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;field-symbols &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--- Sorting the internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort it_excel by row col.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear it_excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move it_excel-col to lv_index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--- Assigning the each record to an internal table row&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;assign component lv_index of structure wa_data to &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--- Asigning the field value to a field symbol&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move it_excel-value to &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at end of row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append wa_data to it_data.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;clear wa_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endat.&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;endform.                    " F_MOVE_DATA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*********************************************************************&lt;/P&gt;&lt;P&gt;********************This routine will move data from internal table to&lt;/P&gt;&lt;P&gt;********************work areas to be passed to the BAPI&lt;/P&gt;&lt;P&gt;form f_get_data .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_data into wa_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move-corresponding wa_data to ihead_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;********************************************************************&lt;/P&gt;&lt;P&gt;*******Fn Module to add the leading zeros to make the material to 18&lt;/P&gt;&lt;P&gt;*******char(SAP compatible)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    input              = WA_data-matnr&lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;   OUTPUT              = WA_data-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  LENGTH_ERROR       = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS             = 2&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&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;Header&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    ihead_data-material       = wa_data-matnr.&lt;/P&gt;&lt;P&gt;    ihead_data-ind_sector     = wa_data-mbrsh.&lt;/P&gt;&lt;P&gt;    ihead_data-matl_type      = wa_data-mtart.&lt;/P&gt;&lt;P&gt;    ihead_data-basic_view     = 'X'.&lt;/P&gt;&lt;P&gt;    ihead_data-purchase_view  = 'X'.&lt;/P&gt;&lt;P&gt;    ihead_data-MRP_VIEW       = 'X'.&lt;/P&gt;&lt;P&gt;    ihead_data-STORAGE_VIEW   = 'X'.&lt;/P&gt;&lt;P&gt;    ihead_data-QUALITY_VIEW   = 'X'.&lt;/P&gt;&lt;P&gt;    ihead_data-account_view   = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    move-corresponding wa_data to iclient_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Material Description&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    refresh it_makt.&lt;/P&gt;&lt;P&gt;    it_makt-langu              = 'EN'.&lt;/P&gt;&lt;P&gt;    it_makt-MATL_DESC          =  wa_data-maktx.&lt;/P&gt;&lt;P&gt;    append it_makt.&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;Purchase Order Description&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear:iltxt,iltxt[].&lt;/P&gt;&lt;P&gt;CONCATENATE wa_data-text1 wa_data-text2 wa_data-text3 wa_data-text4&lt;/P&gt;&lt;P&gt;wa_data-text5 wa_data-text6 into POTEXT&lt;/P&gt;&lt;P&gt;SEPARATED BY SPACE.&lt;/P&gt;&lt;P&gt;iltxt-applobject = 'MATERIAL'.&lt;/P&gt;&lt;P&gt;iltxt-text_name  =  wa_data-matnr.&lt;/P&gt;&lt;P&gt;iltxt-text_id    = 'BEST'.&lt;/P&gt;&lt;P&gt;iltxt-langu      = sy-langu.&lt;/P&gt;&lt;P&gt;iltxt-langu_iso  = 'EN'.&lt;/P&gt;&lt;P&gt;iltxt-format_col = space.&lt;/P&gt;&lt;P&gt;iltxt-text_line  = POTEXT.&lt;/P&gt;&lt;P&gt;append iltxt.&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;Client Data - Basic&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRANSLATE wa_data-meins TO UPPER CASE.&lt;/P&gt;&lt;P&gt;    iclient_data-matl_group     = wa_data-matkl.&lt;/P&gt;&lt;P&gt;    iclient_data-OLD_MAT_NO     = wa_data-BISMT.&lt;/P&gt;&lt;P&gt;    iclient_data-base_uom       = wa_data-meins.&lt;/P&gt;&lt;P&gt;    iclient_data-DOCUMENT       = wa_data-DZEINR.&lt;/P&gt;&lt;P&gt;    iclient_data-unit_of_wt     = wa_data-gewei.&lt;/P&gt;&lt;P&gt;    iclient_data-division       = wa_data-spart.&lt;/P&gt;&lt;P&gt;    iclient_data-QM_PROCMNT     = wa_data-QMPUR.&lt;/P&gt;&lt;P&gt;    iclient_data-PUR_VALKEY     = wa_data-EKWSL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    iclient_datax-matl_group    = 'X'.&lt;/P&gt;&lt;P&gt;    iclient_datax-OLD_MAT_NO    = 'X'.&lt;/P&gt;&lt;P&gt;    iclient_datax-base_uom      = 'X'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  iclient_datax-PO_UNIT       = 'X'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    iclient_datax-DOCUMENT      = 'X'.&lt;/P&gt;&lt;P&gt;    iclient_datax-unit_of_wt    = 'X'.&lt;/P&gt;&lt;P&gt;    iclient_datax-division      = 'X'.&lt;/P&gt;&lt;P&gt;    iclient_datax-QM_PROCMNT    = 'X'.&lt;/P&gt;&lt;P&gt;    iclient_data-PUR_VALKEY     = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move-corresponding wa_data to iplant_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Plant - Purchasing&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    iplant_data-plant          = wa_data-werks.&lt;/P&gt;&lt;P&gt;    iplant_data-pur_group      = wa_data-ekgrp.&lt;/P&gt;&lt;P&gt;    iplant_data-GR_PR_TIME     = wa_data-WEBAZ.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    iplant_datax-plant         = wa_data-werks.&lt;/P&gt;&lt;P&gt;    iplant_data-pur_group      = 'X'.&lt;/P&gt;&lt;P&gt;    iplant_datax-GR_PR_TIME    = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*MRP1 View&lt;/P&gt;&lt;P&gt;TRANSLATE wa_data-DISPO TO UPPER CASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    iplant_data-MRP_TYPE       = wa_data-DISMM.&lt;/P&gt;&lt;P&gt;    iplant_data-REORDER_PT     = wa_data-MINBE.&lt;/P&gt;&lt;P&gt;    iplant_data-MRP_CTRLER     = wa_data-DISPO.&lt;/P&gt;&lt;P&gt;    iplant_data-LOTSIZEKEY     = wa_data-DISLS.&lt;/P&gt;&lt;P&gt;    iplant_data-MAX_STOCK      = wa_data-MABST .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    iplant_datax-MRP_TYPE       = 'X'.&lt;/P&gt;&lt;P&gt;    iplant_datax-REORDER_PT     = 'X'.&lt;/P&gt;&lt;P&gt;    iplant_datax-MRP_CTRLER     = 'X'.&lt;/P&gt;&lt;P&gt;    iplant_datax-LOTSIZEKEY     = 'X'.&lt;/P&gt;&lt;P&gt;    iplant_datax-MAX_STOCK      = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*MRP2 View&lt;/P&gt;&lt;P&gt;    iplant_data-PLND_DELRY     = wa_data-PLIFZ.&lt;/P&gt;&lt;P&gt;    iplant_data-SM_KEY         = wa_data-FHORI.&lt;/P&gt;&lt;P&gt;    iplant_data-CTRL_KEY       = wa_data-QSSPUR.&lt;/P&gt;&lt;P&gt;    iplant_data-AVAILCHECK     = wa_data-MTVFP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    iplant_datax-PLND_DELRY     = 'X'.&lt;/P&gt;&lt;P&gt;    iplant_datax-SM_KEY         = 'X'.&lt;/P&gt;&lt;P&gt;    iplant_data-CTRL_KEY        = 'X'.&lt;/P&gt;&lt;P&gt;    iplant_datax-AVAILCHECK     = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*MRP3 View&lt;/P&gt;&lt;P&gt;   iplant_data-SAFETY_STK     = wa_data-EISBE.&lt;/P&gt;&lt;P&gt;   iplant_data-QM_AUTHGRP     = wa_data-QMATAUTH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   iplant_datax-SAFETY_STK     = 'X'.&lt;/P&gt;&lt;P&gt;   iplant_data-QM_AUTHGRP      = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move-corresponding wa_data to istoragelocationdata.&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;Inspection Setup&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;clear:insctrl,insctrl[].&lt;/P&gt;&lt;P&gt;insctrl-insptype                 =  wa_data-QPART1.&lt;/P&gt;&lt;P&gt;insctrl-material                 =  wa_data-matnr.&lt;/P&gt;&lt;P&gt;insctrl-plant                    =  wa_data-werks.&lt;/P&gt;&lt;P&gt;insctrl-QUAL_SCORE_PROCEDURE     =  '06'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;insctrl-ind_insptype_mat_active  = 'X'.&lt;/P&gt;&lt;P&gt;append insctrl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if wa_data-QPART2 is not initial .&lt;/P&gt;&lt;P&gt;insctrl-insptype                 =  wa_data-QPART2.&lt;/P&gt;&lt;P&gt;insctrl-material                 =  wa_data-matnr.&lt;/P&gt;&lt;P&gt;insctrl-plant                    =  wa_data-werks.&lt;/P&gt;&lt;P&gt;insctrl-QUAL_SCORE_PROCEDURE     =  '06'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;insctrl-ind_insptype_mat_active  = 'X'.&lt;/P&gt;&lt;P&gt;append insctrl.&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;if wa_data-QPART3 is not initial .&lt;/P&gt;&lt;P&gt;insctrl-insptype                 =  wa_data-QPART3.&lt;/P&gt;&lt;P&gt;insctrl-material                 =  wa_data-matnr.&lt;/P&gt;&lt;P&gt;insctrl-plant                    =  wa_data-werks.&lt;/P&gt;&lt;P&gt;insctrl-QUAL_SCORE_PROCEDURE     =  '06'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;insctrl-ind_insptype_mat_active  = 'X'.&lt;/P&gt;&lt;P&gt;append insctrl.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if wa_data-QPART4 is not initial .&lt;/P&gt;&lt;P&gt;insctrl-insptype                 =  wa_data-QPART4.&lt;/P&gt;&lt;P&gt;insctrl-material                 =  wa_data-matnr.&lt;/P&gt;&lt;P&gt;insctrl-plant                    =  wa_data-werks.&lt;/P&gt;&lt;P&gt;insctrl-QUAL_SCORE_PROCEDURE     =  '06'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;insctrl-ind_insptype_mat_active  = 'X'.&lt;/P&gt;&lt;P&gt;append insctrl.&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 wa_data-QPART5 is not initial .&lt;/P&gt;&lt;P&gt;insctrl-insptype                 =  wa_data-QPART5.&lt;/P&gt;&lt;P&gt;insctrl-material                 =  wa_data-matnr.&lt;/P&gt;&lt;P&gt;insctrl-plant                    =  wa_data-werks.&lt;/P&gt;&lt;P&gt;insctrl-QUAL_SCORE_PROCEDURE     =  '06'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;insctrl-ind_insptype_mat_active  = 'X'.&lt;/P&gt;&lt;P&gt;append insctrl.&lt;/P&gt;&lt;P&gt;endif.&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;Storage View&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    istoragelocationdata-plant        = wa_data-werks.&lt;/P&gt;&lt;P&gt;    istoragelocationdata-stge_loc     = wa_data-LGORT_D.&lt;/P&gt;&lt;P&gt;    istoragelocationdata-stge_bin     = wa_data-LGPBE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    istoragelocationdatax-plant        = wa_data-werks.&lt;/P&gt;&lt;P&gt;    istoragelocationdatax-stge_loc     = wa_data-LGORT_D.&lt;/P&gt;&lt;P&gt;    istoragelocationdatax-stge_bin     = 'X'.&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Accounting&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    iaccounting_data-val_area   = wa_data-werks.&lt;/P&gt;&lt;P&gt;    iaccounting_data-price_ctrl = wa_data-vprsv.&lt;/P&gt;&lt;P&gt;    iaccounting_data-MOVING_PR  = wa_data-VERPR_BAPI.&lt;/P&gt;&lt;P&gt;    iaccounting_data-PRICE_UNIT = wa_data-PEINH.&lt;/P&gt;&lt;P&gt;    iaccounting_data-VAL_CLASS  = wa_data-BKLAS.&lt;/P&gt;&lt;P&gt;    iaccounting_data-VAL_CAT    = wa_data-BWTTY_D.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    iaccounting_datax-val_area   = wa_data-werks.&lt;/P&gt;&lt;P&gt;    iaccounting_datax-price_ctrl = 'X'.&lt;/P&gt;&lt;P&gt;    iaccounting_datax-MOVING_PR  = 'X'.&lt;/P&gt;&lt;P&gt;    iaccounting_datax-PRICE_UNIT = 'X'.&lt;/P&gt;&lt;P&gt;    iaccounting_datax-VAL_CLASS  = 'X'.&lt;/P&gt;&lt;P&gt;    iaccounting_datax-VAL_CAT    = 'X'.&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;clear it_ret.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refresh it_ret.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform f_call_bapi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table it_ret with key type = 'S'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;perform f_bapi_commit.&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;loop at main_table where type = 'S' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;s_fret-parameter = main_table-parameter .&lt;/P&gt;&lt;P&gt;s_fret-message = main_table-message .&lt;/P&gt;&lt;P&gt;append s_fret.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write: /2  s_fret-parameter,&lt;/P&gt;&lt;P&gt;       21  s_fret-message.&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;loop at main_table where type ne 'S'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e_fret-parameter = main_table-parameter .&lt;/P&gt;&lt;P&gt;e_fret-message = main_table-message .&lt;/P&gt;&lt;P&gt;append e_fret.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write: /2  e_fret-parameter,&lt;/P&gt;&lt;P&gt;       21 e_fret-message.&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;fstring = slogfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform download_data tables s_fret using fstring.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fstring = elogfile.&lt;/P&gt;&lt;P&gt;perform download_data tables e_fret using fstring.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " F_GET_DATA&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;*&amp;amp;      Form  F_CALL_BAPI&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; --&amp;gt;  p1        text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; &amp;lt;--  p2        text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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 f_call_bapi .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;*********Call BAPI to upload a material from a flat file or from already&lt;/P&gt;&lt;P&gt;*********existing material&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'&lt;/P&gt;&lt;P&gt;   EXPORTING&lt;/P&gt;&lt;P&gt;     HEADDATA                   = ihead_data&lt;/P&gt;&lt;P&gt;     CLIENTDATA                 = iclient_data&lt;/P&gt;&lt;P&gt;     CLIENTDATAX                = iclient_datax&lt;/P&gt;&lt;P&gt;     PLANTDATA                  = iplant_data&lt;/P&gt;&lt;P&gt;     PLANTDATAX                 = iplant_datax&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   FORECASTPARAMETERS         =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   FORECASTPARAMETERSX        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   PLANNINGDATA               =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   PLANNINGDATAX              =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    STORAGELOCATIONDATA         = istoragelocationdata&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    STORAGELOCATIONDATAX        = istoragelocationdatax&lt;/P&gt;&lt;P&gt;     VALUATIONDATA              = iaccounting_data&lt;/P&gt;&lt;P&gt;     VALUATIONDATAX             = iaccounting_datax&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   WAREHOUSENUMBERDATA        =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   WAREHOUSENUMBERDATAX       =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   SALESDATA                  =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   SALESDATAX                 =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   STORAGETYPEDATA            = istoragelocationdata&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   STORAGETYPEDATAX           = istoragelocationdatax&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   FLAG_ONLINE                = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   FLAG_CAD_CALL              = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   NO_DEQUEUE                 = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   NO_ROLLBACK_WORK           = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    RETURN                     = it_ret&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    MATERIALDESCRIPTION        = it_makt&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  UNITSOFMEASURE             = it_uom&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  UNITSOFMEASUREX            = it_uomx&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  INTERNATIONALARTNOS        =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;     MATERIALLONGTEXT          = iltxt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   TAXCLASSIFICATIONS        =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    RETURNMESSAGES             = returnm.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   PRTDATA                   =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   PRTDATAX                  =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   EXTENSIONIN               =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   EXTENSIONINX              =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_fret-parameter = wa_data-matnr.&lt;/P&gt;&lt;P&gt;it_fret-message = it_ret-message.&lt;/P&gt;&lt;P&gt;it_fret-type = it_ret-type.&lt;/P&gt;&lt;P&gt;it_fret-ID = it_ret-ID.&lt;/P&gt;&lt;P&gt;it_fret-number = it_ret-number.&lt;/P&gt;&lt;P&gt;append it_fret.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;main_table-parameter = it_fret-parameter.&lt;/P&gt;&lt;P&gt;main_table-message = it_fret-message.&lt;/P&gt;&lt;P&gt;main_table-type = it_fret-type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append main_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*******************************************************************&lt;/P&gt;&lt;P&gt;********&lt;STRONG&gt;Fn Call for Insp Set Up&lt;/STRONG&gt;******************************Start&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_MATINSPCTRL_SAVEREPLICA'&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    return               = returnm&lt;/P&gt;&lt;P&gt;    inspectionctrl       = insctrl.&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;Fn Call for Insp Set Up&lt;/STRONG&gt;****************************End&lt;/P&gt;&lt;P&gt;endform.                    " F_CALL_BAPI&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;*&amp;amp;      Form  F_BAPI_COMMIT&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; --&amp;gt;  p1        text&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; &amp;lt;--  p2        text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;form f_bapi_commit .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**********************************************************************&lt;/P&gt;&lt;P&gt;************Fn Module to be called to write the changes to the database&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'BAPI_TRANSACTION_COMMIT'&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;  WAIT         =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  RETURN        =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endform.                    " F_BAPI_COMMIT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*********************************************************************&lt;/P&gt;&lt;P&gt;****&lt;STRONG&gt;Call Fn Module for log file of Success/Error records&lt;/STRONG&gt;*******Start&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM download_data TABLES  main_table USING g_filename.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'GUI_DOWNLOAD'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      filename              = g_filename&lt;/P&gt;&lt;P&gt;      filetype              = 'ASC'&lt;/P&gt;&lt;P&gt;      write_field_separator = 'X'&lt;/P&gt;&lt;P&gt;      trunc_trailing_blanks = 'X'&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      data_tab              = main_table.&lt;/P&gt;&lt;P&gt;ENDFORM.                     "download_data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*********************************************************************&lt;/P&gt;&lt;P&gt;******&lt;STRONG&gt;Call Fn Module for logfile of Success/Error records&lt;/STRONG&gt;*******End&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;top-of-page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; write: /3  'Material No'  color 6  inverse on,&lt;/P&gt;&lt;P&gt;        22  'Message'   color 6  inverse on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this code will solve ur problem.&lt;/P&gt;&lt;P&gt;If further u r facing some problem then revert me back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aastha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 08:38:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-material-savedata-problem/m-p/4910365#M1146394</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-11T08:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: bapi_material_savedata problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-material-savedata-problem/m-p/4910366#M1146395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi raymond,&lt;/P&gt;&lt;P&gt;we are maintaing those fields with MM01/MM02 trasactions.but still bapi is not updating.iam not getting any error also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 08:47:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-material-savedata-problem/m-p/4910366#M1146395</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-11T08:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: bapi_material_savedata problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-material-savedata-problem/m-p/4910367#M1146396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try to add HEADDATA-BASIC_VIEW = 'X' AND pass also  CLIENTDATA and CLIENTDATAX parameters with initial values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 09:24:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-material-savedata-problem/m-p/4910367#M1146396</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2008-12-11T09:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: bapi_material_savedata problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-material-savedata-problem/m-p/4910368#M1146397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Raymond,&lt;/P&gt;&lt;P&gt;i am already included basic_view = 'X'..it is not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 09:46:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-material-savedata-problem/m-p/4910368#M1146397</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-11T09:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: bapi_material_savedata problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-material-savedata-problem/m-p/4910369#M1146398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;any ideas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 13:23:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-material-savedata-problem/m-p/4910369#M1146398</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-11T13:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: bapi_material_savedata problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-material-savedata-problem/m-p/4910370#M1146399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try to &lt;/P&gt;&lt;P&gt;- add HEADDATA-BASIC_VIEW = 'X' &lt;/P&gt;&lt;P&gt;-  pass also CLIENTDATA and CLIENTDATAX parameters with one field changed to its current value.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 14:09:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-material-savedata-problem/m-p/4910370#M1146399</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2008-12-11T14:09:32Z</dc:date>
    </item>
    <item>
      <title>Re: bapi_material_savedata problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-material-savedata-problem/m-p/4910371#M1146400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI RAYMOND,&lt;/P&gt;&lt;P&gt; i have appended my custom fields to BAPI_TE_MARA,BAPI_TE_MARAX,MARA .i am populating custom fields in  BAPI_TE_MARA and update flag in  BAPI_TE_MARAX. i need to update only custom fields in  BAPI_TE_MARA.. i am not changing any data in clientdata and cliendatax.so how i can pass clintdata clientdatax .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2008 03:11:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-material-savedata-problem/m-p/4910371#M1146400</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-12T03:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: bapi_material_savedata problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-material-savedata-problem/m-p/4910372#M1146401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try to work with FUBA MATERIAL_MAINTAIN_DARK    instead of yours.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Nicole&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2008 06:41:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-material-savedata-problem/m-p/4910372#M1146401</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-12T06:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: bapi_material_savedata problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-material-savedata-problem/m-p/4910373#M1146402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My hypothesis is that the treatment of BAPI tests if one view is to be updated and exit prematurely if this is not the case. As you update client customer data (MARA) i suggest to simulate an update of the client data. If that's true, then do we need to simulate an update on a standard field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, just choice any allowed field, and simulate a change by giving its current value, so the BAPI will try to change basic data.and not only customer fields. just put the actual value in one of CLIENTDATA structure and the corresponding flag in CLIENTDATAX.&lt;/P&gt;&lt;P&gt;(Use BAPI_MATERIAL_GET_DETAIL if you don't have data ready for that)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If that works, you may even try with initial CLIENTDATA and CLIENTDATAX, just call the BAPI with the HEADDATA-BASIC_VIEW flag on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2008 07:27:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-material-savedata-problem/m-p/4910373#M1146402</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2008-12-12T07:27:58Z</dc:date>
    </item>
    <item>
      <title>Re: bapi_material_savedata problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-material-savedata-problem/m-p/4910374#M1146403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After using BAPI_MATERIAL_SAVEDATA try to use COMMIT WORK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF sy-subrc IS INITIAL.
        COMMIT WORK.
      ELSE.
        ROLLBACK WORK.
      ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;SR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2008 07:49:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-material-savedata-problem/m-p/4910374#M1146403</guid>
      <dc:creator>RoySayak</dc:creator>
      <dc:date>2008-12-12T07:49:59Z</dc:date>
    </item>
  </channel>
</rss>

