Code thrownig an error after recording for MM01

Hello BAPI Experts,
I would like to ask that recording using T.Code shdb(for MM01)  Mat Type: Raw Material to extend from one plant & storage location to another .My code thrownig an error , as I capture all views
ls it not possible using BDC.
Valuable answer will b appreciated in form of beers!
Thanks in advance!!!!!!
R Sinha

Hi Sinha..
In recording select Views using PgDn button, You should not use mouse by scrolling it.
I think this will resolve your Problem, still need help plz do message me.
Please do close the thread once you problem is resolved.
Regards,
sg

Similar Messages

  • Bdc recording for mm01

    hi all,
    this is an extract of materail master upload for mm01 when i execute this recording purchase order text view doesnot get populated with text. anybody can tell me whts wrong with this?????
    perform bdc_field       using 'MAKT-MAKTX'
                                  'carr'.
    perform bdc_dynpro      using 'SAPLSTXX' '1100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RSTXT-TXLINE(05)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TXVB'.
    perform bdc_field       using 'RSTXT-TXLINE(02)'
                                  'qqqqqqqqqqqqqq  ssssssssssssssssssssss'
                                & 'sssss.00000000000000jjjjjjjjjjjjoo'.
    perform bdc_field       using 'RSTXT-TXLINE(03)'
                                  'wwwwwwwwwwwwwwwwwwwwwwwwwwwwwww jjjjjj'
                                & 'jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj'.
    perform bdc_field       using 'RSTXT-TXLINE(04)'
                                  'kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk'
                                & 'kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk'.
    perform bdc_field       using 'RSTXT-TXLINE(05)'
                                  '66666666666666666666666666666666666666'
                                & '6666666666666666666666666666666666'.
    perform bdc_dynpro      using 'SAPLSTXX' '1100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RSTXT-TXLINE(06)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=TXBA'.
    perform bdc_dynpro      using 'SAPLMGMM' '4040'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SP12'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  'carr'.
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.

    Hi
    You have to upload the Texts using the CREATE_TEXT fun module
    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
            text     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-text NE ' '.
          itab-matnr = gv_matnr.
          itab-text  = itab1-text.
          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.
    Regards
    Anji

  • Message 614: Format error by recording for BDC

    Hi PP Gurus,
    I would be appreciable if anybody face the same problem and resole my issue.
    When we are trying to create a program from within the transaction recorder, Transaction SHDB, using the function 'Create program'. Then a
    termination occurs with the following message:MS614 Format error by recording: Field PLPOD-CKSELKZ not avaliable on screen.
    Thanks & Regards,
    Abu Arbab

    Hi R. Brahmankar,
    I've a doubt on your comment is once recording is done for some material's Say 'A' Rate Routing with internally generated Group (say 5000005), Counter-1 and all the things relevant to BDC finished. Now suppose we are uploading Rate routings for other materials. Can we upload Rate Routings for a material in the same Group but with many counters say 2,3,4,5.....?
    Do we need to do some special settings either in BDC program or that also be recorded in same recording? Or different recording has to be created?
    Thanks & Regards,
    Abu Arbab
    Edited by: abu arbaba on Oct 15, 2008 5:02 PM
    Edited by: abu arbaba on Oct 24, 2008 8:18 AM

  • BDC RECORDING  FOR MM01 PROBLEM

    Hi Experts ,
    I did recording using SHDB for TC MM01. I selected Purchase order text as one of the view but after saving my recording I not able to find the text I have entered.
    Please help.

    while recording
    if the view is selected
    and the text is not getting displayed its because of control tecnoogy being used in enjoy transactions so u cant record if u see there will be a choose button in purchase order text view
    click that it will take u to sap script editor where u can enter text

  • Forms 6i gives FRM-40734 Internal PL/SQL Error after Hourglass for 30 Min

    Hi,
    I am developing a New custom Form using a copy of Oracle Apps. TEMPLATE.FMB
    (Out of two custom forms , I am getting the below issue in only one form and the other is working fine)
    Everything works fine but I observed one unique issue during my testing.
    I executed the form and entered a value in one column of the master record
    (now the record in CHANGED status).
    Now I pressed the F11 Key (for Enter-Query in Apps) for doing the
    Query by ignoring the entered record values.
    Instead of giving a message "Do you want to Save the changes you have made (or)
    A Required Field must be entered"
    But the Form shows the Hourglass(Busy) for 30 Minutes then gives the error :
    FRM-40734 Internal PL/SQL Error
    May I know in the above situation, what are the triggers the form will fire and in which sequence (forms 6i)
    In summary what form triggers will be fired :
    When a NEW record status is CHANGED and when the user invokes Enter-Query
    (F11 on Apps and F8 on standalone) , before form changes to Enter-Query mode.
    Any pointers to my issue resolution.
    Below is my form canvas/block layout and I am getting the issue Only in Master Block and not in any of the detail blocks
    MASTER BLOCK
    DETAIL1 BLOCK
    DETAIL2 BLOCK DETAIL2 BLOCK DETAIL2 BLOCK
    thanks,
    Shashi

    Issue got resolved:
    ==================
    In my case, The solution I found is renaming the Relations with a unique name.
    When the Relation is created for two different master blocks
    the "Block creation wizard" has given the same name for both
    these relations.
    I renamed both of them with a custom unique name then the issue got resolved now the form is behaving correctly.
    thanks,
    Shashi

  • Adobe Captivate Exception Error After Recording

    I am using Adobe Captivate 4 to record tutorials from a website (the tutorials are showing how to use a website) and keep getting the following message after completing a recording:
    "The exception unknown software exception (0xc0000409) occurred in the application at location 0x02d13782" then the program terminates completely.  The file allows you to record but after you click on the file in the taskbar to import the recording it errors out then closes.  
    The tutorials are being recorded on a website using a Dell machine that exceeds the hardware requirements, has Windows XP SP3 with recent updates, and IE7 with recent updates.  The files are HUGE in size so I am wondering if that might be the problem.  One tutorial (.cp file) might be anywhere from 20MB up.  I have all of the audio and recording settings set to low so my question is how are these files growing so large in size, and is that the reason I keep getting the exception error?  Thanks in advance!

    I too am getting this error on a couple of my Captivate (4) files.  It occurs if I try to insert (eg click box) or import (eg Powerpoint files).
    Files aren't particularly big - about 2 MB - and are one of many similar files in a project so can't understand why this is occurring - but is frustrating as I can't do anything with the file any longer - even if I try to open past versions I get the same error if I try to insert/import
    Would appreciate any comments on why this may be occurring.

  • Download Error after paying for music

    I have paid for two albums off of Blackberry World. When I go into the downloading area all that shows is download error under the progress bar. I have tried canceling the downloads, battery pulls, clearing out the cache, etc. I have not been able to get my albums to download at all. All apps I purchase download and install fine. I am always connected to a WIFI source when I am attempting this. Anyone have any ideas before I look for a refund????

    Hello jmsnsdrinker, 
    Welcome to the forums. 
    I would suggest you use one of the methods listed on the below page to contact BlackBerry to have this investigated. 
    BlackBerry Technical Support Services
    -SR
    Come follow your BlackBerry Technical Team on twitter! @BlackBerryHelp
    Be sure to click Kudos! for those who have helped you.Click Solution? for posts that have solved your issue(s)!

  • Error after reconfiguration for shared services 11.1.2.1 and EAS

    Error 401 :The server has not found anything matching the URL [shared services]
    Oracle Essbase Adminitration Services 11.1.2.1 not connected.
    What might be the reason and which log to check
    Please help very very urgent

    Thank you everybody.I am again doing clean installationm by clesaning all the environment varaiables and uninstalling weblogic,Oracle Application developer,and Regedit oracle and hyperion.
    Thank u all for ur quick response.
    Thanks

  • [SOLVED] GPGME error after chrooting for new installs

    There is another thread about this topic, but it is marked as solved. But obviously this error is not solved because new installs are failing.
    The problem: after installing the base system with pacstrap and chrooting into the system, there are some very ugly errors when trying to install any additional packages.
    Pacman gives the following output:
    warning: GPGME error: Invalid crypto engine
    File XYZ is corrupted (invalid vor corrupted package (PGP signature)
    Do you want to delete it?
    Since i installed arch just a few days ago on the same system with different SSD, this error seems to come from the server side. But i am no expert at all, so i have no idea what's wrong.
    I tried to delete the etc/pacman.d/gnupg folder and running pacman-key --init, but this is not working.
    Last edited by tumas (2014-01-13 18:37:18)

    Update the system from the install disk with pacman --root <mountpoint> -Syu. The problem is that you installed at exactly the wrong time, when all of the packages that use gcrypt were updated but libgcrypt wasn't.
    Last edited by Scimmia (2014-01-13 18:29:37)

  • Lsmw for mm01 is not working

    Hello experts,
    We are extending the material to another plant and storage location etc.
    so i want to do in lsmw. but it is not working fine .please help me.
    First in the lsmw i selected recording and done the recording for mm01.
    in the first screen i entered
    material abc,industry sector mech engi, material type wfinis and copy from material abc,then i pressed the
    enter and i selected the views Sales: Sales Org. Data 1,Sales: Sales Org. Data 2,
    Purchasing and Accounting 1.
    then i pressed enter and got the screen to enter plant, valuation type , sales org, cist channel. so i enterd
    plant ,sale org and dist channel in the organization levels and copy from fields.
    then i pressed enter and in the next screen i entered some required data and pressed enter and in another
    screen o entered and etc and finally saved . The recording is
    successful .then i completed all the lsmw steps when i run the session it is showing the error
    at the screen where we enter the orginational levels like plant, sales org etc.
    our flat file is a text file and it is in the same order as in
    the lsmw.
    I approched one senior consultant and he said we cant do lsmw bcuse
    the org level screen will be moving every time.
    so please kindly help me what to do to analyse this error.
    =>Can we debug the lsmw , if so how.
    =>In one moment previously 2 days back when i am doing lsmw i got a
    error with return code 13, please tell what actually means and where to see this one.
    Thank you so much for the replies.

    Shiva,
    First of all its not advisable to use the recording method in lsmw for uploading the material master data. It involves lot of views so if something goes wrong very much difficult to identify the error point, at the same time I will advise you to go with bapi or idoc method to do the same.
    When comes to you question regarding the debugging of lsmw you can debug it.
    From the usermenu tab take the generate conversion program step into u r list of steps
    then execute it and go into the program and put a break point then execute the convert data step directly you will get into the debugging mode you do debug the code.

  • Upload for MM01

    Hi
    I am trying to create Recording for MM01 through SHDB Tcode  but after selecting views , i m fail to select Plant through search help on next screen. system get stuck and i need to restart the SAP.
    Regards
    Ammad

    thanks for your reply i have to upload material master data ...
    i have 59 fields in MS Excel file, i ill get into an internal table through Function module now tell me how  can i pass that data to the BAPI
    Data is like that E.g
    Field Name      Data
    Industry Sector B
    Mat type           Fert
    Plant                1000
    sales Org        PBLS
    Dist Channel    02
    Regards
    Ammad

  • Maintain output condition record for material documents

    Please help me with transaction code to " maintain output condition records" for material documents

    Hi,
    Is it MN21 transaction you are looking for?
    Cheers,
    HT

  • I have a few wedding projects(1-2 hours)I am trying to export at full hd quality,than burn in idvd.After rendering for 8hrs I receive error code that states "file is too big". Please help? compressing tips without losing quality?

    I have a few wedding projects(1-2 hours)I am trying to export at full hd quality,than burn in idvd. After rendering for 8hrs I receive error code that states "file is too big". Please help? compressing tips without losing quality? or any other exporting alternatives?

    Hey Z,
    Thank you for the tip on exporting by media browser (large) from imovie. But of course, if it's not one thing it's another. Now that I figured how to export a large file from imovie, I have an idvd issue. I followed the instructions for burning from idvd and changing the encoding to professional quality and the burn speed to x4, but I am receiving an error that states the following,
    Your project exceeds the maximum content duration. To burn your DVD, change the encoder setting in the Project Info window.
    Project:
    - total project duration: 79:04 minutes
    - total project capacity: 4.327 GB (max. available: 4.172 GB)
    Menus:
    - number of menus in project: 1 menus
    - total menu duration: 0:39 minutes
    - total menu capacity: 37.370 MB
    Movies:
    - total movies duration: 78:25 minutes
    - total movies capacity: 4.291 GB
    I have searched in the idvd forum for similar issues and I am stumped at this point. I have tried deleting the encoding assets and re launching idvd with the changed preferences, and still the same error. I know you mentioned something about free hard drive space available, and I have very little left. 4GB to be exact due to massive hours of non-edited footage. I am not sure if this is why, but I do not recall ever needing free space to burn memory onto a separate dvd. I would be more than happy if I am wrong, and it would be a quick fix. Otherwise, the technical nightmare continues. It's all a learning process and your expertise is greatly appreciated! Thanks in advance.

  • BDC code for MM01 Transaction

    Hi All,,
                 Please give Entire BDC code for MM01 Transaction.
    i will change as per my requirement.
    I think this is already done by some ABAP Consultants.
    plz dont give answers like do recording for that transaction MM01. I know recording...
    For time constraiint, I have to complete soon.....
    Thanks in Advance
    BestRegards,
    Anil

    Hi,
    The below code is using the Session Method
    report ZDS_BDC_MM01
           no standard page heading line-size 255.
    include bdcrecx1.
    *parameters: dataset(132) lower case.
    ***    DO NOT CHANGE - the generated data section - DO NOT CHANGE    ***
    *   If it is nessesary to change the data section use the rules:
    *   1.) Each definition of a field exists of two lines
    *   2.) The first line shows exactly the comment
    *       '* data element: ' followed with the data element
    *       which describes the field.
    *       If you don't have a data element use the
    *       comment without a data element name
    *   3.) The second line shows the fieldname of the
    *       structure, the fieldname must consist of
    *       a fieldname and optional the character '_' and
    *       three numbers and the field length in brackets
    *   4.) Each field must be type C.
    *** Generated data section with specific formatting - DO NOT CHANGE  ***
    data: begin of record OCCURS 0,
    * data element: MATNR
            MATNR_001(018),
    * data element: MBRSH
            MBRSH_002(001),
    * data element: MTART
            MTART_003(004),
    * data element: XFELD
            KZSEL_01_004(001),
    * data element: XFELD
            KZSEL_02_005(001),
    * data element: MAKTX
            MAKTX_006(040),
    * data element: MEINS
            MEINS_007(003),
    * data element: MAKTX
            MAKTX_008(040),
          end of record.
    *** End generated data section ***
    start-of-selection.
    *perform open_dataset using dataset.
    perform open_group.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      ='C:\DHRUV.TXT'
       FILETYPE                      = 'DAT'
    *   HAS_FIELD_SEPARATOR           = ' '
    *   HEADER_LENGTH                 = 0
    *   READ_BY_LINE                  = 'X'
    *   DAT_MODE                      = ' '
    *   CODEPAGE                      = ' '
    *   IGNORE_CERR                   = ABAP_TRUE
    *   REPLACEMENT                   = '#'
    *   CHECK_BOM                     = ' '
    *   VIRUS_SCAN_PROFILE            =
    *   NO_AUTH_CHECK                 = ' '
    * IMPORTING
    *   FILELENGTH                    =
    *   HEADER                        =
      TABLES
        DATA_TAB                      = RECORD
    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.
    *do.
    LOOP AT record.
    *read dataset dataset into record.
    if sy-subrc <> 0. exit. endif.
    perform bdc_dynpro      using 'SAPLMGMM' '0060'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RMMG1-MATNR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RMMG1-MATNR'
                                  record-MATNR_001.
    perform bdc_field       using 'RMMG1-MBRSH'
                                  record-MBRSH_002.
    perform bdc_field       using 'RMMG1-MTART'
                                  record-MTART_003.
    perform bdc_dynpro      using 'SAPLMGMM' '0070'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MSICHTAUSW-DYTXT(02)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(01)'
                                  record-KZSEL_01_004.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(02)'
                                  record-KZSEL_02_005.
    perform bdc_dynpro      using 'SAPLMGMM' '4004'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-MAKTX_006.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MARA-MEINS'.
    perform bdc_field       using 'MARA-MEINS'
                                  record-MEINS_007.
    perform bdc_dynpro      using 'SAPLMGMM' '4004'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MAKT-MAKTX'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-MAKTX_008.
    perform bdc_dynpro      using 'SAPLSPO1' '0300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=YES'.
    perform bdc_transaction using 'MM01'.
    *enddo.
    ENDLOOP.
    perform close_group.
    *perform close_dataset using dataset.
    *Text elements
    * E00 Error opening dataset, return code:
    * I01 Session name
    * I02 Open session
    * I03 Insert transaction
    * I04 Close Session
    * I05 Return code =
    * I06 Error session created
    * S01 Session name
    * S02 User
    * S03 Keep session
    * S04 Lock date
    * S05 Processing Mode
    * S06 Update Mode
    * S07 Generate session
    * S08 Call transaction
    * S09 Error sessn
    * S10 Nodata indicator
    * S11 Short log
    *Messages
    * Message class: MS
    *613   Please enter a session name and user name
    The Below is the coding for the Call Transaction...
    report ZDS_BDC_MM01_2
           no standard page heading line-size 255.
    *include bdcrecx1.
    *parameters: dataset(132) lower case.
    ***    DO NOT CHANGE - the generated data section - DO NOT CHANGE    ***
    *   If it is nessesary to change the data section use the rules:
    *   1.) Each definition of a field exists of two lines
    *   2.) The first line shows exactly the comment
    *       '* data element: ' followed with the data element
    *       which describes the field.
    *       If you don't have a data element use the
    *       comment without a data element name
    *   3.) The second line shows the fieldname of the
    *       structure, the fieldname must consist of
    *       a fieldname and optional the character '_' and
    *       three numbers and the field length in brackets
    *   4.) Each field must be type C.
    *** Generated data section with specific formatting - DO NOT CHANGE  ***
    data: begin of record OCCURS 0,
    * data element: MATNR
            MATNR_001(018),
    * data element: MBRSH
            MBRSH_002(001),
    * data element: MTART
            MTART_003(004),
    * data element: XFELD
            KZSEL_01_004(001),
    * data element: MAKTX
            MAKTX_005(040),
    * data element: MEINS
            MEINS_006(003),
    * data element: MTPOS_MARA
            MTPOS_MARA_007(004),
          end of record.
    DATA: FLNAME TYPE STRING.
    *** End generated data section ***
    DATA:   BDCDATA LIKE BDCDATA    OCCURS 0 WITH HEADER LINE.
    *** MESSAGE******
    DATA: BEGIN OF MESSTAB OCCURS 0.
            INCLUDE STRUCTURE BDCMSGCOLL.
            DATA: MATNR TYPE MARA-MATNR,
          END OF MESSTAB.
    ****END OF MESSAGE****
    PARAMETERS: FILENAME TYPE RLGRAP-FILENAME.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILENAME.
      CALL FUNCTION 'F4_FILENAME'
       IMPORTING
         FILE_NAME           = FILENAME.
    start-of-selection.
    *perform open_dataset using dataset.
    perform open_group.
    FLNAME = FILENAME.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = FLNAME
        FILETYPE                      = 'DAT'
    *   HAS_FIELD_SEPARATOR           = ' '
    *   HEADER_LENGTH                 = 0
    *   READ_BY_LINE                  = 'X'
    *   DAT_MODE                      = ' '
    *   CODEPAGE                      = ' '
    *   IGNORE_CERR                   = ABAP_TRUE
    *   REPLACEMENT                   = '#'
    *   CHECK_BOM                     = ' '
    *   VIRUS_SCAN_PROFILE            =
    *   NO_AUTH_CHECK                 = ' '
    * IMPORTING
    *   FILELENGTH                    =
    *   HEADER                        =
      TABLES
        DATA_TAB                      = record
    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.
    LOOP AT record.
      DATA:
        CNT TYPE I.
        CNT = CNT + 1.
        REFRESH BDCDATA.
    perform bdc_dynpro      using 'SAPLMGMM' '0060'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RMMG1-MTART'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RMMG1-MATNR'
                                  record-MATNR_001.
    perform bdc_field       using 'RMMG1-MBRSH'
                                  record-MBRSH_002.
    perform bdc_field       using 'RMMG1-MTART'
                                  record-MTART_003.
    perform bdc_dynpro      using 'SAPLMGMM' '0070'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MSICHTAUSW-DYTXT(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(01)'
                                  record-KZSEL_01_004.
    perform bdc_dynpro      using 'SAPLMGMM' '4004'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  record-MAKTX_005.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MARA-MEINS'.
    perform bdc_field       using 'MARA-MEINS'
                                  record-MEINS_006.
    perform bdc_field       using 'MARA-MTPOS_MARA'
                                  record-MTPOS_MARA_007.
    perform bdc_dynpro      using 'SAPLSPO1' '0300'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=YES'.
    *perform bdc_transaction using 'MM01'.
    CALL TRANSACTION 'MM01' USING BDCDATA
                            MODE 'N'
                            UPDATE 'A'
                            MESSAGES INTO MESSTAB.
    READ TABLE MESSTAB INTO MESSTAB INDEX CNT.
       IF MESSTAB-MSGTYP = 'E'.
         MESSTAB-MATNR = RECORD-MATNR_001.
         MODIFY MESSTAB INDEX CNT FROM MESSTAB. " TRANSPORTING MATNR.
       ENDIF.
    ENDLOOP.
    FORM OPEN_GROUP.
      CALL FUNCTION 'BDC_OPEN_GROUP'
             EXPORTING  CLIENT   = SY-MANDT
                        GROUP    = 'MM01'
                        USER     = SY-UNAME
                        KEEP     = 'X'.
    ENDFORM.
    FORM BDC_INSERT.
      CALL FUNCTION 'BDC_INSERT'
       EXPORTING
         TCODE                  = 'MM01'
    *     POST_LOCAL             = NOVBLOCAL
    *     PRINTING               = NOPRINT
    *     SIMUBATCH              = ' '
    *     CTUPARAMS              = ' '
        TABLES
          DYNPROTAB              = BDCDATA
       EXCEPTIONS
         INTERNAL_ERROR         = 1
         NOT_OPEN               = 2
         QUEUE_ERROR            = 3
         TCODE_INVALID          = 4
         PRINTING_INVALID       = 5
         POSTING_INVALID        = 6
         OTHERS                 = 7
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.
    END-OF-SELECTION.
    LOOP AT MESSTAB.
        IF MESSTAB-MSGTYP = 'E'.
          WRITE:/ 'ERROR OCCURED ON MATNR = ',MESSTAB-MATNR , 'MESSAGE : MATNR ALREADY EXISTS IN MARA!!!'.
        ENDIF.
      ENDLOOP.
    perform close_group.
    *perform close_dataset using dataset.
    *&      Form  close_group
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM close_group .
    CALL FUNCTION 'BDC_CLOSE_GROUP'
    EXCEPTIONS
       NOT_OPEN          = 1
       QUEUE_ERROR       = 2
       OTHERS            = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM.                    " close_group
    *&      Form  bdc_dynpro
    *       text
    *      -->P_0270   text
    *      -->P_0271   text
    FORM bdc_dynpro  USING PROGRAM DYNPRO.
      CLEAR BDCDATA.
      BDCDATA-PROGRAM  = PROGRAM.
      BDCDATA-DYNPRO   = DYNPRO.
      BDCDATA-DYNBEGIN = 'X'.
      APPEND BDCDATA.
    ENDFORM.                    " bdc_dynpro
    *&      Form  bdc_field
    *       text
    *      -->P_0275   text
    *      -->P_0276   text
    FORM bdc_field  USING  FNAM FVAL.
      IF FVAL <> ' '.
        CLEAR BDCDATA.
        BDCDATA-FNAM = FNAM.
        BDCDATA-FVAL = FVAL.
        APPEND BDCDATA.
      ENDIF.
    ENDFORM.                    " bdc_field
    *Text elements
    * E00 Error opening dataset, return code:
    * I01 Session name
    * I02 Open session
    * I03 Insert transaction
    * I04 Close Session
    * I05 Return code =
    * I06 Error session created
    * S01 Session name
    * S02 User
    * S03 Keep session
    * S04 Lock date
    * S05 Processing Mode
    * S06 Update Mode
    * S07 Generate session
    * S08 Call transaction
    * S09 Error sessn
    * S10 Nodata indicator
    * S11 Short log
    HTH
    Regards,
    Dhruv Shah

  • Error " Data missing for the entry check while creating a new waste code

    Hi all, While setting a new Waste code I get the error " Data missing for the entry check, correction:". while filling the NAM- WASTECOCAT - LER item.
    This sould look for the catalog's name included in the phrase set but for some reason it doesn't find it giving me this error.
    I am changing original Characteristics, phrase set, classes, and value assignment type. Just to have my own estructure with Znames for all of them.
    I have also change the enviroment parameter "WAM_PHRSET_WACATLG" with the name of my phrase set.
    I have checked everything several times watching for typos or looking for a missing step.
    I have even tried including my new Z's characteristics in the classe and living the original SAP_EHS_1024_001_WASTE_CATALOG. (changing the enviroment parameter WAM_PHRSET_WACATLG to SAP_EHS_1024_001_WASTE_CATALOG) and it works.
    I will like to change this characteristic by Z_EHS_WA_WASTE_CATALOG
    Phrase set to Z_EHS_WA_WASTE_CATALOG.
    enviroment parameter WAM_PHRSET_WACATLG= Z_EHS_WA_WASTE_CATALOG
    After matching up the master data It should work fine but I might be missing something to get it running ok.
    ¿Any idea?
    Regards,
    Alvaro

    Hello Juan Carlos, the value and class that I want to duplicate and doesn't work is for Waste Code, I have also duplicated the one you have displayed (waste pproperties) without any problem.
    1.I have duplicated and changed class SAP_EHS_1024_001. to Z_EHS_WA
    2. Create a copy of the 5 characteristics included in this class.
    SAP_EHS_1024_001_WASTE_CATALOG
    SAP_EHS_1024_001_WASTE_CODE
    SAP_EHS_1024_001_WA_SUBCATEG
    SAP_EHS_1024_001_WA_CATEGORY
    SAP_EHS_1024_001_REMARK
    change the name by
    Z_EHS_WA_WASTE_CATALOG
    Z_EHS_WA_WASTE_CODE
    Z_EHS_WA_SUBCATEG
    Z_EHS_WA_CATEGORY
    Z_EHS_WA_REMARK.
    I checked the funcion C14K_WASTECATLG_CHECK is in the value of the Z_EHS_WA_WASTE_CODE characteristic
    I checked the funcion C14K_WASTECODE_CHECK is in the value of the Z_EHS_WA_WASTE_CATALOG characteristic
    3. Create phrase sets for each new category. with same name.
    4. Match up the master data.
    5. Change the enviroment parameter.to Z_EHS_WA_WASTE_CATALOG
    I think I have followed all the steps, but for some reason it doesn't find the catalog
    The phrase for the catalog is EWC in english and LER in spanish.
    Regards
    Alvaro.

Maybe you are looking for

  • I want to upgrade my iMac (late 2006) to Mavericks. It meets all other specifications. Will Mavericks work on this computer?

    I want to upgrade my iMac (late 2006) to Mavericks. It meets all other specifications. Will Mavericks work on this computer?

  • IPod not recognized in My Computer/iTunes/Updater

    I'm sure this has been discussed elsewhere but I couldn't seem to find my exact problem. I have a 30GB Video iPod that has been working just fine. Plugged it in and transfered some new songs before I left on my trip. Took my Computer and iPod with me

  • Two hard drives are better?

    I am running Windows ME on my PC And now I want to install Solaris on the same PC is it better off having two hard drives to run two different OSes ? or partition my 30GB hard drives is far enough? Thank You

  • Save book templates

    It would be great if I was able to save the book layout that I created. Maybe even being able to use my layout later with the AutoFill feature. Am I dreaming? If anything is there a way to save your book layout other than making it a PDF? Thanks Rebe

  • Personal oracle9i startup password in windows98

    hi i installed oracle 9i personal edition for win98.the installation was fine without errors. when i restarted the system and tried to connect to system/manager, it is again asking for password. anybody has any ideas. thanks.