Update material master data BAPI_MATERIAL_SAVE DATA

Hi All,
I am using BAPI_MATERIAL_SAVE DATA Fm to update the material master data .
I want to change material type vend (which already existed) to HIBE material type .
Even though Basic data view populated its not updating in Material master .
Which views do i need to populate to change material type one value to other value?

if you use FM - BAPI_MATERIAL_SAVE DATA ,you can not update material type , use bdc program to update material type ,
See the transaction : MMAM - No BAPI to update material type
you need to use BDC Program.
Reward Points if it is helpful
Thanks
Seshu

Similar Messages

  • Using the APD to update material master in CRM

    Does anybody know if it is possible to update material master records in CRM from BW using the Analyses Process Designer with target CRM?
    I would prefer to know this before creating a custom data target adapter in the CRM SPRO, writing all the required function modules and then finding out that it does not work.
    Thanks,
    József.

    Which direction??
    Inbound/Outbound
    Inbound : IDOC_INPUT_MATMAS01

  • Updating Material Master Moving Average Price using BAPI

    Hi,
    We need to create a program using which we can update material master moving average price for a specific material.
    For this we are using BAPI_MATERIAL_SAVEDATA.
    when we are executing this bapi with inputs, it is showing data updated or created but when we are checking it in MAterial Master the data (MOving Price ) is not getting updated.
    Please advise,
    Thanks.

    I am trying to use BAPI_MATVAL_PRICE_CHANGE to change the price of a material in material master
    (The moving average price [MAP] in Accounting View 1)
    Using the BAPI, I enter
    --> RFC target are
    -> Material No.
    -> Valuation Area
    --> Prices table (I enter the new price that i want)
    when I run the BAPI, i get error message (This can be seen in the returns table)
    ID --> CKMLSENDPRICE
    MESSAGE NUMBER --> 701
    DETAILS --> No customizing data for Valuation Area XXXX found
    PLease advise.

  • Bapi or Function Module to update Material Master Data

    Hi Friends,
               could anyone let me know any BAPI's or Function Modules for Material Master UPdate.
    Thanks in Advance
    Regards
    Tina

    hi Tina,
    check this BAPi BAPI_MATERIAL_SAVEDATA to create and change the material master .
    Try ....
    BAPI_MATERIAL_SAVEDATA
    REPORT Z_BAPI_MAT.
                   STRUCTURE  DECLARATIONS                             *
    TABLES: BAPIMATHEAD,  "Headerdata
            BAPI_MARA,    "Clientdata
            BAPI_MARAX,   "Clientdatax
            BAPI_MARC,    "Plantdata
            BAPI_MARCX,   "Plantdatax
            BAPI_MAKT,    "Material description
            BAPIRET2.     "Return messages
    DATA:V_FILE TYPE STRING.
    DATA:
      BEGIN OF LSMW_MATERIAL_MASTER,
        MATNR(018) TYPE C,  "Material number
        MTART(004) TYPE C,  "Material type
        MBRSH(001) TYPE C,  "Industry sector
        WERKS(004) TYPE C,  "Plant
        MAKTX(040) TYPE C,  "Material description
        DISMM(002) TYPE C,  "Extra Field Added In the Program as itsrequired
        MEINS(003) TYPE C,  "Base unit of measure
        MATKL(009) TYPE C,  "Material group
        SPART(002) TYPE C,  "Division
        LABOR(003) TYPE C,  "Lab/office
        PRDHA(018) TYPE C,  "Product hierarchy
        MSTAE(002) TYPE C,  "X-plant matl status
        MTPOS_MARA(004) TYPE C,  "Gen item cat group
        BRGEW(017) TYPE C,  "Gross weight
        GEWEI(003) TYPE C,  "Weight unit
        NTGEW(017) TYPE C,  "Net weight
        GROES(032) TYPE C,  "Size/Dimensions
        MAGRV(004) TYPE C,  "Matl grp pack matls
        BISMT(018) TYPE C,  "Old material number
        WRKST(048) TYPE C,  "Basic material
        PROFL(003) TYPE C,  "DG indicator profile
        KZUMW(001) TYPE C,  "Environmentally rlvt
        BSTME(003) TYPE C,  "Order unit
        VABME(001) TYPE C,
        EKGRP(003) TYPE C,  "Purchasing group
        XCHPF(001) TYPE C,  "Batch management
        EKWSL(004) TYPE C,  "Purchasing key value
        WEBAZ(003) TYPE C,  "GR processing time
        MFRPN(040) TYPE C,  "Manufacturer part number
        MFRNR(010) TYPE C,  "Manufacturer number
        VPRSV(001) TYPE C,  "Price control indicator
        STPRS(015) TYPE C,  "Standard price
        BWPRH(014) TYPE C,  "Commercial price1
        BKLAS(004) TYPE C,  "Valuation class
      END OF LSMW_MATERIAL_MASTER.
                   INTERNAL TABLE DECLARATIONS                         *
    *to store the input data
    DATA:
      BEGIN OF it_matmaster OCCURS 0.
            INCLUDE STRUCTURE LSMW_MATERIAL_MASTER.
    DATA:
      END OF it_matmaster.
    *for material description
    DATA:BEGIN OF IT_MATERIALDESC OCCURS 0.
         INCLUDE STRUCTURE BAPI_MAKT .
    DATA:END OF IT_MATERIALDESC.
    *to return messages
    DATA:BEGIN OF IT_RETURN OCCURS 0.
         INCLUDE STRUCTURE BAPIRET2.
    DATA:END OF IT_RETURN.
    SELECTION SCREEN
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-002.
    PARAMETERS:P_FILE LIKE RLGRAP-FILENAME OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK B1 .
    AT SELECTION SCREEN
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          PROGRAM_NAME  = SYST-CPROG
          DYNPRO_NUMBER = SYST-DYNNR
          FIELD_NAME    = 'P_FILE'
        IMPORTING
          FILE_NAME     = P_FILE.
                   TO UPLOAD THE DATA                                  *
    START-OF-SELECTION.
    V_FILE = P_FILE.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                      = V_FILE
       FILETYPE                      = 'ASC'
       HAS_FIELD_SEPARATOR           = 'X'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
      tables
        data_tab                      =  IT_MATMASTER
    EXCEPTIONS
       FILE_OPEN_ERROR               = 1
       FILE_READ_ERROR               = 2
       NO_BATCH                      = 3
       GUI_REFUSE_FILETRANSFER       = 4
       INVALID_TYPE                  = 5
       NO_AUTHORITY                  = 6
       UNKNOWN_ERROR                 = 7
       BAD_DATA_FORMAT               = 8
       HEADER_NOT_ALLOWED            = 9
       SEPARATOR_NOT_ALLOWED         = 10
       HEADER_TOO_LONG               = 11
       UNKNOWN_DP_ERROR              = 12
       ACCESS_DENIED                 = 13
       DP_OUT_OF_MEMORY              = 14
       DISK_FULL                     = 15
       DP_TIMEOUT                    = 16
       OTHERS                        = 17
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
                   DATA POPULATIONS                                    *
    LOOP AT  IT_MATMASTER.
      BAPIMATHEAD-MATERIAL = IT_MATMASTER-MATNR.
      BAPIMATHEAD-IND_SECTOR = IT_MATMASTER-Mbrsh.
      BAPIMATHEAD-MATL_TYPE = IT_MATMASTER-Mtart.
      BAPIMATHEAD-BASIC_VIEW = 'X'.
      BAPIMATHEAD-PURCHASE_VIEW = 'X'.
      BAPIMATHEAD-ACCOUNT_VIEW = 'X'.
      BAPI_MARA-MATL_GROUP = IT_MATMASTER-MATKL.
      BAPI_MARA-OLD_MAT_NO = IT_MATMASTER-BISMT.
      BAPI_MARA-BASE_UOM = IT_MATMASTER-MEINS.
      BAPI_MARA-BASIC_MATL = IT_MATMASTER-WRKST.
      BAPI_MARA-MFR_NO = IT_MATMASTER-MFRNR.
      BAPI_MARAX-MATL_GROUP = 'X'.
      BAPI_MARAX-OLD_MAT_NO = 'X'.
      BAPI_MARAX-BASE_UOM = 'X'.
      BAPI_MARAX-BASIC_MATL = 'X'.
      BAPI_MARAX-MFR_NO = 'X'.
      BAPI_MARC-PLANT = IT_MATMASTER-WERKS.
      BAPI_MARC-PUR_GROUP = IT_MATMASTER-EKGRP.
      BAPI_MARCX-PLANT = IT_MATMASTER-WERKS.
      BAPI_MARCX-PUR_GROUP = 'X'.
      IT_MATERIALDESC-LANGU = 'EN'.
      IT_MATERIALDESC-MATL_DESC = IT_MATMASTER-MAKTX.
      append IT_materialdesc.
      CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
        EXPORTING
          headdata                   = BAPIMATHEAD
          CLIENTDATA                 = BAPI_MARA
          CLIENTDATAX                = BAPI_MARAx
         PLANTDATA                  = BAPI_MARc
         PLANTDATAX                 = BAPI_MARcx
        FORECASTPARAMETERS         =
        FORECASTPARAMETERSX        =
        PLANNINGDATA               =
        PLANNINGDATAX              =
        STORAGELOCATIONDATA        =
        STORAGELOCATIONDATAX       =
        VALUATIONDATA              =
        VALUATIONDATAX             =
        WAREHOUSENUMBERDATA        =
        WAREHOUSENUMBERDATAX       =
        SALESDATA                  =
        SALESDATAX                 =
        STORAGETYPEDATA            =
        STORAGETYPEDATAX           =
        FLAG_ONLINE                = ' '
        FLAG_CAD_CALL              = ' '
       IMPORTING
         RETURN                     = IT_RETURN
       TABLES
         MATERIALDESCRIPTION        = IT_MATERIALDESC
        UNITSOFMEASURE             =
        UNITSOFMEASUREX            =
        INTERNATIONALARTNOS        =
        MATERIALLONGTEXT           =
        TAXCLASSIFICATIONS         =
        RETURNMESSAGES             =
        PRTDATA                    =
        PRTDATAX                   =
        EXTENSIONIN                =
        EXTENSIONINX               =
    WRITE:/    IT_RETURN-TYPE,
            2   IT_RETURN-ID,
            22  IT_RETURN-NUMBER,
            25  IT_RETURN-MESSAGE.
               IT_RETURN-LOG_NO,
               IT_RETURN-LOG_MSG_NO,
               IT_RETURN-MESSAGE_V1,
               IT_RETURN-MESSAGE_V2,
               IT_RETURN-MESSAGE_V3,
               IT_RETURN-MESSAGE_V4,
               IT_RETURN-PARAMETER,
               IT_RETURN-ROW,
               IT_RETURN-FIELD,
               IT_RETURN-SYSTEM.
    ENDLOOP.
    Regards,
    Naveen

  • BAPI by which we can update material master AFS data.

    Hello All,
    I want to update net weigt for a perticular material of material type FERT.
    I have data in my internal table.Is there any BAPI for updation.
    I want to update like .
    Goto MM02. and goto any FERT material.
    Goto Additional data button.
    GOto AFS weights and volumes tab.
    There we need to update netweight value corresponding to the size.
    So, Please let me know the various ways of updating.
    Please ,Ask me for any clarifications.
    Thanks,
    kumar
    Moderator message - Moved to the correct forum
    Edited by: Rob Burbank on Oct 26, 2009 9:25 AM

    Hello all,
    Did any one have any updates on my ques.. please.
    Thanks
    Kumar

  • How to deleate material master  in basic data corss-plant cm

    in material master fert in basic data cross-plant cm how to delete

    Hi Gopal,
    its not possible to delete entry from "cross-plant cm" baisc data 2 view.
    once you made a entry in this field , it will greyed out and its not possible to delete it.
    its a important field related to variant configuration, and one should be careful before making any entry in this field. same is applicable to MARC-STDPD in MRP 3 view.
    Regards
    Ritesh
    Edited by: R S D on Jun 2, 2009 12:22 PM

  • Problem loading material master (IS Mill) data from ECC to BI

    Hi Gurus,
    We have a problem loading Material master data from ECC to BI 7.0 SP 18.
    The scenario is :
    The ECC is with IS Mill... due to which the Material field MATNR is of length 40 instead of standard 18 characters.
    That is data element MATNR has 18 chars and its output length is 40 chars.
    When is table MARA browsed using SE16, the material with more than 18 chars.... shows only first 18 characters and are ended with !.
    OMSL setting shows length as 40.
    When the extractor checker runs 0MATERIAL_TEXT or 0MATERIAL_ATTR it gives correct output ..... which is more than 18 characters... not ended with !
    Till here no problem.
    On BI side, after replication of the datasource, i checked data element MATNR ... but it has length as 18 chars and output length as 18 chars.
    OMSL setting cannot be set more than 18.
    Infopackage has pulled data till PSA successfully. I checked the PSA data .... here to the material with more than 18 chars is ended with !.
    When the data is further pushed to 0MATERIAL infoobject, it throws following error for all materials irrespetive of its length (example below):
    0MATERIAL : Data record 768 ('SIT_PL_B01L_10_01!E '): Version 'SIT_PL_B01L_10_01! ' is not valid
    0MATERIAL : Data record 165 ('RLIRS52 E '): Version 'RLIRS52 ' is not valid
    Diagnosis
         Data record 768 & with the key 'SIT_PL_B01L_10_01!E &' is invalid in value 'SIT_PL_B01L_10_01! &' of the attribute/characteristic 0MATERIAL.
    System Response
         The system has recognized that the value mentioned above is invalid, and has processed this general error message. A subsequent message may give  you more information on the error. This message refers to the same value, even though it does not state this explicitly.
    I did search for SAP note related to this... but could not find any.
    There is one SAP note (Note 960868) which mentions about this, but the correction was then shipped with BI SP 9.... we are running on SP 18.
    Requesting you all experts for help.
    Best Regards,
    Deepak

    Hi,
    follow bellow steps:
    1. you need to activate the Datasouce in BI side.
    Goto RSA1>  Datasource> Select Datasource> Double click> Check fileds and Activate.
    2. Replicate the Datasource into BI side.
    3. Check the RFC connections by useing SM59.
    Regards.

  • How to post material master legal control data (Foreign trade export view)?

    Dear Gurus,
    Currently we have an external application which posts material master data into SAP using MATMAS IDOC through JCO. Now we have a requirement wherein we need to post legal control data ( especially ALNUM field) beisdes the regular views. MATMAS Idoc do not have a provision to post this specific field ALNUM ( Export control class).
    Can you please suggest how to post this field value in to SAP. Do we need to use any other IDOC or RFM/BAPI as we do with classification view. In that case can you please suggest those relevant APIs.
    Thanks in advance
    Aman

    Hi Aman,
             I have got the same problem with this legal control field(ALNUM field).
             There is no provison to post this field through IDOC. Can u please tell me what was the why u followed for this issue.
    Thanks& regards,
    Naren.

  • Using supplier to update material master (MM02)

    Hi,
    We have a supplier that manufactures for us and we are asking that they pass certain MARA fields to us, so that we can automatically update the material master.  The primary fields are weights and dimensions.  We are using EDI and the MATMAS message type and basic type.  However, we only want 6 or 7 fields allowed to pass to MARA, but we are getting all fields that are included in MATMAS, which is passing a null value to MARA and overwriting our existing data. 
    Does anyone know how to only pass certain fields using the MATMAS basic/message type?  Should we be using another basic/message type to pass material master information from a supplier?
    Your help is greatly appreciated.
    Regards,
    Vicki Smith
    PHE

    Hi,
    This requires external program interface. Through web portal, your supplier can upload directly all relevant material master data.
    Hope this information will be useful.
    Bye,
    Muralidhara

  • How can i update material master standard price.

    Hi Everyone,
    i would like to know if there is any way i can update my MM Std Price everytime i make any purchase.
    I.e i have std price 40, but next time when i make PO and update Inforec for 70 so i want this 70 also take effect in my material master. Is any expert can tell me about this functionality or any alternate. would be great help
    Ali

    If you are using std prices then these do not vary unless someone is manually changing them (or using a program to do this). That is the main point of std prices, they do not change unless you change them yourself.
    MAP and standard prices are used in material master and it has nothing to do with price with which you will sell your customer.
    MAP and Standard prices will just hit you inventory account and COGS account once you will do PGI.
    I am assuming that you are talking about the price at which you sell to your customer.The easy way of tracking changing prices is that you can make them manual conditions and based on your information you can put them manually in your sales order.
    It is not recommended to change standard price constantly. At this period end, modify the standard price in material Master & continue.
    This can be a regulr activity at period ends, say every month end or quater end or half yearly or yearly. In general it is prctices on yearly basis, but as per the requirement you can consider the period.
    Just go throught the links given below
    http://www.sap-img.com/materials/purchasing-tips.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/MMIVMVAL/MMIVMVAL.pdf
    Primarily, You cannot maintain both Standard Price & MAP. You can maintain only one of it.
    It is recommended that standard price should not be changed at randomly, but as a policy, if required, it should be changed at period end, say monthly, quaterly, Half-yearly or yearly.
    You can also check out transaction CK40N
    reward points if it helps
    regards
    Biju

  • Problem in updating material master using  FM 'MD_MRP_LEVEL_CHANGE_DATA'

    hi experts,
    i m using this FM 'MD_MRP_LEVEL_CHANGE_DATA' to update the material master for MRP Area related data. i m passing the fields in the FM according to the requirement. when i execute the program it gives a msg
    000I : 000, i m not able to track this msg that what can be the error..........
    and also the changes are not reflected in MM03 transaction.
    and if i m trying to pass the same data directly from SE37 and executing the FM , its running perfectly and changes are reflected in MM03.
    please help me out to get out of this problem.
    points will be rewarded for the correct answer.
    thanks in advance..........
    Manisha

    Manisha,
    Can you please provide the code where u r having problems?
    Thanks
    Ganesh.S

  • Message ME095 No short text is mantained, update material master

    Hi,
    While creatin a Preq in ME51N I'm Getting an error message if I log on in Spanish saying there is no short text for that material in Language ES;  mantain material master and the error message is ME095 but I'm sure that I already mantaines correctly in MM02 this material, and I don't get this error if create the Preq logged in English.
    Any ideas?
    Thanks

    Hi,.
    GO to MM02 -> Basic view --> additional data --> desctription language .
    set the EN & enter.
    Save. After that error won't come for this.
    SAM
    Edited by: Saminathan Gopalan on Jul 28, 2010 10:04 AM

  • Update Material Master

    Hi All
    i would like to assign material group to purchasing gorup in material master. how can i assign through mass maintenance MM17 or other way ?
    thanks

    Dear,
    One other way for done it.
    Enter t-code MASS.
    Select Object Type BUS1001 - For Material Master.
    Select field EKGRP and MATKL.
    Click on execute button, Enter Material and plant detail.
    And change the data as per your requirement.
    Regards,
    Mahesh Wagh.

  • Updating Material master purchase order text -LSMW

    Dear Experts
    How can update Purchase order Text  through LSMW, while am doing recording system is not recording this field from material master
    Regards
    Ajeesh.s

    Dear Expert
    Please throw some light on this issue
    Regards
    Ajeesh.s

  • Upload Purchase order text  using BDC  while updating Material Master MM02

    Hi All,
    Please help me out with sample code upload PO Txt ( long text...which is more than 72 chars)using MM02. Its very urgent
    I am not able to pass data into following fields seen in recording,
    RSTXT-TXLINE(02),
    RSTXT-TXLINE(03),
    RSTXT-TXLINE(04),
    RSTXT-TXLINE(05),  as we can see only RSTXT-TXLINE field in the RSTXT structure......
    how to split  the long text into 72 chrs each and pass into data into the RSTXT-TXLINE(02), RSTXT-TXLINE(03), RSTXT-TXLINE(04)....correspondingly........
    Thanks in advance.....
    Reagards,
    Prasad KR.

    Hi
    see the sample program
    REPORT zmm_longtext
           NO STANDARD PAGE HEADING
           LINE-SIZE 255.
    Internal Table for Upload of Long Texts Data
    DATA: BEGIN OF itab1 OCCURS 0,
            matnr    LIKE mara-matnr,    " Material
            text1    LIKE tline-tdline,  " Long Text
            text2    LIKE tline-tdline,  " Long Text
            text3    LIKE tline-tdline,  " Long Text
            text4    LIKE tline-tdline,  " Long Text
            text5    LIKE tline-tdline,  " Long Text
            text6    LIKE tline-tdline,  " Long Text
            text7    LIKE tline-tdline,  " Long Text
            text8    LIKE tline-tdline,  " Long Text
            text9    LIKE tline-tdline,  " Long Text
            text10   LIKE tline-tdline,  " Long Text
            text11   LIKE tline-tdline,  " Long Text
            text12   LIKE tline-tdline,  " Long Text
            text13   LIKE tline-tdline,  " Long Text
            text14   LIKE tline-tdline,  " Long Text
            text15   LIKE tline-tdline,  " Long Text
            text16   LIKE tline-tdline,  " Long Text
            text17   LIKE tline-tdline,  " Long Text
            text18   LIKE tline-tdline,  " Long Text
            text19   LIKE tline-tdline,  " Long Text
            text20   LIKE tline-tdline,  " Long Text
            text21   LIKE tline-tdline,  " Long Text
            text22   LIKE tline-tdline,  " Long Text
            text23   LIKE tline-tdline,  " Long Text
            text24   LIKE tline-tdline,  " Long Text
            text25   LIKE tline-tdline,  " Long Text
          END OF itab1.
    Internal Table for Upload of Long Texts Data
    DATA: BEGIN OF itab OCCURS 0,
            matnr LIKE mara-matnr,    " Material
            text  LIKE tline-tdline,  " Long Text
          END OF itab.
    To create Long Text lines for CREATE_TEXT function module
    DATA:BEGIN OF dt_lines OCCURS 0.
            INCLUDE STRUCTURE tline.   " Long Text
    DATA:END OF dt_lines.
    Variable declarations for CREATE_TEXT function module
    DATA : dl_name TYPE thead-tdname,   " Object Name
           dl_lan TYPE thead-tdspras,   " Language
           gv_matnr TYPE matnr.
    Constants
    CONSTANTS:
    Object ID for Long Text of Material Basic Data 1
      c_best     TYPE thead-tdid VALUE 'GRUN',
      c_material TYPE thead-tdobject VALUE 'MATERIAL'. " Object
    Parameters
    PARAMETERS p_file LIKE rlgrap-filename.
    At selection-screen on Value Request for file Name
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    Get the F4 Values for the File
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          program_name  = syst-cprog
          dynpro_number = syst-dynnr
        IMPORTING
          file_name     = p_file.
    Start Of Selection
    START-OF-SELECTION.
    *To Upload Flat file
      CALL FUNCTION 'UPLOAD'
        EXPORTING
          filename                = p_file
          filetype                = 'DAT'
        TABLES
          data_tab                = itab1
        EXCEPTIONS
          conversion_error        = 1
          invalid_table_width     = 2
          invalid_type            = 3
          no_batch                = 4
          unknown_error           = 5
          gui_refuse_filetransfer = 6
          OTHERS                  = 7.
      SORT itab1 BY matnr.
      LOOP AT itab1.
        CLEAR gv_matnr.
        SELECT SINGLE matnr INTO gv_matnr
           FROM mara WHERE bismt = itab1-matnr.
        IF itab1-text25 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text25.
          APPEND itab.
        ENDIF.
        IF itab1-text24 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text24.
          APPEND itab.
        ENDIF.
        IF itab1-text23 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text23.
          APPEND itab.
        ENDIF.
        IF itab1-text22 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text22.
          APPEND itab.
        ENDIF.
        IF itab1-text21 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text21.
          APPEND itab.
        ENDIF.
        IF itab1-text20 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text20.
          APPEND itab.
        ENDIF.
        IF itab1-text19 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text19.
          APPEND itab.
        ENDIF.
        IF itab1-text18 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text18.
          APPEND itab.
        ENDIF.
        IF itab1-text17 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text17.
          APPEND itab.
        ENDIF.
        IF itab1-text16 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text16.
          APPEND itab.
        ENDIF.
        IF itab1-text15 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text15.
          APPEND itab.
        ENDIF.
        IF itab1-text14 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text14.
          APPEND itab.
        ENDIF.
        IF itab1-text13 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text13.
          APPEND itab.
        ENDIF.
        IF itab1-text12 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text12.
          APPEND itab.
        ENDIF.
        IF itab1-text11 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text11.
          APPEND itab.
        ENDIF.
        IF itab1-text10 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text10.
          APPEND itab.
        ENDIF.
        IF itab1-text9 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text9.
          APPEND itab.
        ENDIF.
        IF itab1-text8 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text8.
          APPEND itab.
        ENDIF.
        IF itab1-text7 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text7.
          APPEND itab.
        ENDIF.
        IF itab1-text6 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text6.
          APPEND itab.
        ENDIF.
        IF itab1-text5 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text5.
          APPEND itab.
        ENDIF.
        IF itab1-text4 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text4.
          APPEND itab.
        ENDIF.
        IF itab1-text3 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text3.
          APPEND itab.
        ENDIF.
           IF itab1-text2 NE ' '.
        itab-matnr = gv_matnr.
        itab-text  = itab1-text2.
        APPEND itab.
           ENDIF.
        IF itab1-text1 NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text1.
          APPEND itab.
        ENDIF.
        CLEAR itab.
      ENDLOOP.
      DELETE itab WHERE matnr EQ ' '.
    Upload the Texts
      SORT itab BY matnr.
      LOOP AT itab.
        dt_lines-tdformat = 'ST'.
        dt_lines-tdline = itab-text.
        APPEND dt_lines.
        dl_lan = sy-langu.
        dl_name = itab-matnr.
    Call the Function Module to Create Text
        CALL FUNCTION 'CREATE_TEXT'
          EXPORTING
            fid         = c_best
            flanguage   = dl_lan
            fname       = dl_name
            fobject     = c_material
            save_direct = 'X'
            fformat     = '*'
          TABLES
            flines      = dt_lines
          EXCEPTIONS
            no_init     = 1
            no_save     = 2
            OTHERS      = 3.
        IF sy-subrc <> 0.
          WRITE:/ 'Long Text Creation failed for Material'(001),
                 itab-matnr.
        ELSE.
          WRITE:/ 'Long Text Created Successfully for Material'(002),
                 itab-matnr.
        ENDIF.
        AT END OF matnr.
          REFRESH dt_lines.
        ENDAT.
      ENDLOOP.
    Reward points for useful Answers
    Regards
    Anji

Maybe you are looking for

  • How do I transfer voice memos from my macbook to my iphone?

    I had to back up all of my information from my phone to my macbook as I needed to restore my iphone to factory settings and would lose all my information. Now I want my voice memos back on my iphone and I am unable to sync them onto my phone. Not eve

  • Is there plagiarism checker software for mac

    Does anyone know if there is any plagiarism checker software that apple makes? This would make my life a lot easier with school. Thanks

  • How to make Recovery Partition in my new HDD (Win8.1)

    I already re-install my Win8 with usb. But after finish the installation (I choose Fully Clean in my new HDD), why there is no Recovery Partition like my old HDD (original HDD)? how to make a Recovery Partition in my new HDD? Thx

  • Portal:  Tab displayed but not assigned to any roles of user

    HI Experts, I have a problem need your great help. When I logon portal as a specific user, there are 5 tab in home page. When I check the role list, 3 tabs doesn't assigned to any roles this user owned. Then I try to copy current user into a new user

  • Marks in PSD's when moving edit layers in PS CC

    I have just upgraded this evening to PS CC after I upgraded I cannot now move any type without it leaving marks over any images in the PSD file......when I save the file as a jpeg etc the marks are still there. They appear even if the image layer is