DATA Export not success

Hi,
Below is the script I am using to export...the problem is that it is generating the log file but not generating the txt file in the same path.
I tried with the database->Rightclick->export->filename......it is showing succeeded but not generating file.
What I am missing here? Please help.
spool on to '\\Meta\CubeRef\data_EXPORT.log'
LOGIN testuser ****** ON testmach;
export database 'TEST_AP'.'TEST_CU' level0 data to data_file '\\Meta\CubeRef\data_EXP.txt';
Thanks in advance

You might want to try the following per the tech ref:
A file name or an absolute path to a file. If the string contains special characters, it must be enclosed in single or double quotation marks. Double quotation marks allows variable expansion; single quotation marks does not. If the file path contains a backslash ( \ ), it must be preceded with another backslash ( \\ ) to be interpreted correctly by the MaxL Shell.
Examples:
file01
'D:\\filename'
"$ARBORPATH/errors.txt"
"$ARBORPATH\\app\\sample\\basic\\calcdat.txt" (double quotation marks to expand the variable)
'/homes/fiona/scriptfile.msh' (UNIX file path)
Double back slashes....
You may find the export file "\\Meta\CubeRef\data_EXP.txt'" has been created in the app folder.

Similar Messages

  • Essbase Data Export not Overwriting existing data file

    We have an ODI interface in our environment which is used to export the data from Essbase apps to text files using Data export calc scripts and then we load those text files in a relational database. Laetely we are seeing some issue where the Data Export calc script is not overwriting the file and is just appending the new data to the existing file.
    The OverWriteFile option is set to ON.
    SET DATAEXPORTOPTIONS {
         DataExportLevel "Level0";
         DataExportOverWriteFile ON;     
    DataExportDimHeader ON;
         DataExportColHeader "Period";
         DataExportDynamicCalc ON;
    The "Scenario" variable is a substitution variable which is set during the runtime. We are trying to extract "Budget" but the calc script is not clearing the "Actual" scenario from the text file which was the scenario that was extracted earlier. Its like after the execution of the calc script, the file contains both "Actual" and "Budget" data. We are not able to find the root cause as in why this might be happening and why OVERWRITEFILE command is not being taken into account by the data export calc script.
    We have also deleted the text data file to make sure there are no temporary files on the server or anything. But when we ran the data export directly from Essbase again, then again the file contained both "Actual" as well as "Budget" data which really strange. We have never encountered an issue like this before.
    Any suggestions regarding this issue?

    Did some more testing and pretty much zoomed on the issue. Our Scenario is actually something like this "Q1FCST-Budget", "Q2FCST-Budget" etc
    This is the reason why we need to use a member function because Calc Script reads "&ODI_SCENARIO" (which is set to Q2FCST-Budget) as a number and gives an error. To convert this value to a string we are using @member function. And, this seems the root cause of the issue. The ODI_Scenario variable is set to "Q2FCST-Budget", but when we run the script with this calculation function @member("&ODI_SCENARIO"), the data file brings back the values for "Q1FCST-Budget" out of nowhere in addition to "Q2FCST-Budget" data which we are trying to extract.
    Successful Test Case 1:
    1) Put Scenario "Q2FCST-Budget" in hard coded letters in Script and ran the script
    e.g "Q2FCST-Phased"
    2) Ran the Script
    3) Result Ok.Script overwrote the file with Q2FCST-Budget data
    Successful Case 2:
    1) Put scenario in @member function
    e.g. @member("Q2FCST-Budget")
    2) Results again ok
    Failed Case:
    1) Deleted the file
    2) Put scenario in a substitution variable and used the member function "@member("&ODI_Scenario") and Ran the script . *ODI_SCENARIO is set to Q@FCST-Budget in Essbase variables.
    e.g. @member("&ODI_SCENARIO")
    3) Result : Script contained both "Q1FCST-Budget" as well as "Q2FCST-Budget" data values in the text file.
    We are still not close to the root cause and why is this issue happening. Putting the sub var in the member function changes the complete picture and gives us inaccurate results.
    Any clues anyone?

  • HFM Taskflow Email and Data Export Not Working

    Hello all,
    I am attempting to set up the HFM taskflow email and Data export functionality. Unfortunately, the email is not working. I completed the set up of my SMTP mail using the EPM Configurator, and tested the email funtiontionality for FR and it works well. Not the case for Taskflow.
    Is there an addtional seetings that needs to be configured. I am also unable to extract data using the taskflow. The export path is specified in the textbox, but the file is not exporting to the server location. Is there any type of port or setting that needs to be configured.
    I am on version 11.1.2.1. Please help
    Edited by: 944327 on 17/09/2012 14:52

    I wanted to create a thread about this too. There is a big problem in Lightrooms email sending. Photos are sent inline but not as attachments. They need to be sent as attachments so that the email clients can save them easily.
    This is actually important to some and responses by Adobe have not understood this.
    --2510201414571280874==00004
    content-id: <AEDF354435956231.560091>
    content-description: L1120161.jpg
    content-transfer-encoding: BASE64
    content-disposition: inline; filename="L1120161.jpg"
    content-type: image/jpg; name="L1120161.jpg"
    As for your low res image. It is probably the setting you used, you might have it set to "email quality"
    Ankur

  • Why data has not been copied from staging DB to Reporting DB even timer job status is success ?

    Hello,
    I am facing following issue regarding web analytic service for specific date 2014-08-18:
    Verified following services which are running and status was success on that specific date 2014-08-18 :
    Web Analytics Service
    Microsoft Usage Data Import
    Microsoft SharePoint Foundation Usage Data Processing
    Observed latest Web Analytics Setting as below :
    LastAggregationDateId 
    20140817 -   The date id of the last successfully completed data aggregation
    LastAggregationTime
    2014-08-18T00:00:13.210 - The time of the last successfully completed data aggregation
    LastBestBetSuggestionAggregationDateId
    20140818 - The date id of the last successfully completed best bet suggestion data aggregation. This date id should not be reset to an earlier date manually.
    LastDataCopyTime
    2014-08-17T23:59:09.693 - The last time the data were copied from the staging databases to this reporting database for aggregation
    Above settings says that Data has not copied from Staging DB to Reporting DB on Date 2014-08-18
    In order to verify the same I have checked as follow:
    SELECT COUNT (*) FROM [dbo].[WATrafficAggregationByDate] WITH (NOLOCK)
    WHERE  [DateId] = 20140818
    Above SQL Query has returned ZERO value.
    Can anyone please let me know Why data has not been copied from staging DB to Reporting DB even timer job status is success ?
    Your help will be much appreciated.
    Thanks and Regards,
    Dipti Chhatrapati

    The image itself has the answer
    The user requests a page, and the action gets picked up by the Web Analytics service that runs on SharePoint.
    The Web Analytics service logs this in the “.usage” files.
    A Timer job called “Microsoft SharePoint Foundation Usage Data Import” by default runs every 30 minutes. It imports the logs into the staging database.
    Each night the “Microsoft SharePoint Foundation Usage Data Processing” Timer job runs and transforms the data into the reporting database.
    The last run time of the import from staging and the aggregation is logged in the Settings table in the Reporting database.
    Usage and Health Data Collection Service Application collects Data about Usage and Health of your farm.
    This information is used for Health Monitoring and this is also required for running the Web Analytics Service. If you do not have a Usage and Health Data Collection Service Application or your
    Usage and Health Data Collection Proxy is stopped, you will not see any data in the Web Analytics Report
    Regards Chen V [MCTS SharePoint 2010]

  • Data is not exported by the FD : GUI_DOWNLOAD in background.

    Hi all,
    Data is not Exported by the program scheduled in background by the FD "GUI_DOWNLOAD"
    its only exporting into the excel sheet and notepad in foreground.
    Plase me out how should I follow the process.
    Thanks & Regards,
    Rajeev

    You can write data to Application server in background. For path of file on Application server see TCode AL11
    e.g.
    file = '/tmp'.  "Path
    concatenate file '/itab.txt' into file.
    open dataset file for output in text mode.
    if SY-SUBRC = 0.
      write : /  'File opened on application server' .
    else.
      write : /  'Unable to open file on application server'.
    endif.
      loop at itab.
        transfer itab to file.
      endloop.
      if SY-SUBRC = 0.
        write : /  'Data transfer to file on application server complete.' .
      else.
        write : /  'Unable to transfer data to file on application server.'.
      endif.
      close dataset file.
      if SY-SUBRC = 0.
        write : /  'File closed on application server' .
      else.
        write : /  'Unable to close file on application server'.
      endif.

  • In XI pro, exporting PDF to Excel problem.  Excel columns and data are not properly aligned.  Help?

    I used 30 day trial of Acrobat XI and all the functions work perfectly.  But, when I buy the program (either download or disk) my PDF that export to Excel is not working.  The excel columns and data are not properly aligned as they should be.  The Trial version aligns everything perfectly.  What is happening?  I use a MAC 10.9.5.  But this shouldn't matter because the trial version works perfectly.  Can anyone help?

    just found out that this is posted in the wrong section.

  • Database Export exporting data does not export time of date columns

    Hi,
    I'm trying to export some data using Database Export and for the date columns the resulting scripts truncates dates showing only the date part not the time one. If export from a query result the resulting script include all the information (date and time).
    Does anyone has an idea on how to export all the date information using database export.
    thanks

    Yep, as Jim said, under Tools / Preferences / Database / NLS Parameters I changed Date Format to DD-MON-YYYY HH24:MI:SS
    Seems to have done the trick. What's the significance of DD-MON-RR versus DD-MON-YY?

  • Used Migration Assistant to successfully transfer PC files to Mini. However file creation or modified date does not transfer. Date of creation is listed as day of transfer.  I would gratefully appreciate any help in solving this,

    Used Migration Assistant to successfully transfer PC files to Mini. However file creation or modified date does not transfer. Date of creation is listed as day of transfer.  I would gratefully appreciate any help in solving this?

    I have the same problem; used Migration Assistant to transfer all my pix from PC to MacbookPro, however dates of pix were not transferred. Date created as the date of transfer. Cannot sort my pix according to date.
    Anybody has an answer?

  • Virtex6:Configuration data download to FPGA was not successful. DONE did not go high, please check your configuration setup and mode settings

    Hello,everyone.
    I am using virtex6 FPGA and trying to download mcs file to PROM and have failed.
    I download .bit file to FPGA and succeed.
    When i try to download .mcs file to PROM XCF128X-FTG64C(BPI Flash) and choose Slave SelectMAP Mode
    and the process is about 68% it fails.
    The message below the IMapct is as belows:
    done.
    PROGRESS_END - End Operation.
    Elapsed time =      0 sec.
    // *** BATCH CMD : identifyMPM
    // *** BATCH CMD : assignFile -p 1 -file "C:/Users/Administrator/Desktop/TEST/LED/led.bit"
    '1': Loading file 'C:/Users/Administrator/Desktop/TEST/LED/led.bit' ...
    done.
    INFO:iMPACT:2257 - Startup Clock has been changed to 'JtagClk' in the bitstream stored in memory,
    but the original bitstream file remains unchanged.
    UserID read from the bitstream file = 0xFFFFFFFF.
    INFO:iMPACT:501 - '1': Added Device xc6vlx240t successfully.
    INFO:iMPACT - Current time: 2014/3/13 8:48:14
    // *** BATCH CMD : Program -p 1
    PROGRESS_START - Starting Operation.
    Maximum TCK operating frequency for this device chain: 66000000.
    Validating chain...
    Boundary-scan chain validated successfully.
    INFO:iMPACT - 1: Over-temperature condition detected! [ 230.52C >  120.00C]
    1: Device Temperature: Current Reading:  230.52 C, Max. Reading:  230.52 C
    1: VCCINT Supply: Current Reading:   2.997 V, Max. Reading:   2.997 V
    1: VCCAUX Supply: Current Reading:   2.997 V, Max. Reading:   2.997 V
    '1': Programming device...
     Match_cycle = NoWait.
    Match cycle: NoWait
     LCK_cycle = NoWait.
    LCK cycle: NoWait
    done.
    INFO:iMPACT:2219 - Status register values:
    INFO:iMPACT - 0011 1111 0111 1110 0100 1011 1100 0000
    INFO:iMPACT:579 - '1': Completed downloading bit file to device.
    INFO:iMPACT:188 - '1': Programming completed successfully.
     Match_cycle = NoWait.
    Match cycle: NoWait
     LCK_cycle = NoWait.
    LCK cycle: NoWait
    INFO:iMPACT - '1': Checking done pin....done.
    '1': Programmed successfully.
    PROGRESS_END - End Operation.
    Elapsed time =     23 sec.
    Selected part: XCF128X
    // *** BATCH CMD : attachflash -position 1 -bpi "XCF128X"
    // *** BATCH CMD : assignfiletoattachedflash -position 1 -file "C:/Users/Administrator/Desktop/TEST/LED/leda.mcs"
    INFO:iMPACT - Current time: 2014/3/13 8:49:32
    // *** BATCH CMD : Program -p 1 -dataWidth 16 -rs1 NONE -rs0 NONE -bpionly -e -v -loadfpga
    PROGRESS_START - Starting Operation.
    Maximum TCK operating frequency for this device chain: 66000000.
    Validating chain...
    Boundary-scan chain validated successfully.
    INFO:iMPACT - 1: Over-temperature condition detected! [ 230.52C >  120.00C]
    1: Device Temperature: Current Reading:  230.52 C, Max. Reading:  230.52 C
    1: VCCINT Supply: Current Reading:   2.997 V, Max. Reading:   2.997 V
    1: VCCAUX Supply: Current Reading:   2.997 V, Max. Reading:   2.997 V
    '1': BPI access core not detected. BPI access core will be downloaded to the device to enable operations.
    INFO:iMPACT - Downloading core file D:/Xilinx/14.3/ISE_DS/ISE/virtex6/data/xc6vlx240t_jbpi.cor.
    '1': Downloading core...
     Match_cycle = NoWait.
    Match cycle: NoWait
     LCK_cycle = NoWait.
    LCK cycle: NoWait
    done.
    INFO:iMPACT:2219 - Status register values:
    INFO:iMPACT - 0011 1111 0111 1110 0100 1011 1100 0000
    INFO:iMPACT:2492 - '1': Completed downloading core to device.
    Current cable speed is set to 6.000 Mhz.
    Cable speed is default to 3Mhz or lower for BPI operations.
    Current cable speed is set to 3.000 Mhz.
    Setting Flash Control Pins ...
    Setting Configuration Register ...
    Populating BPI common flash interface ...
    Common Flash Interface Information Query completed successfully.
    INFO:iMPACT - Common Flash Interface Information from Device:
    INFO:iMPACT - Verification string:  51 52 59
    INFO:iMPACT - Manufacturer ID:         49
    INFO:iMPACT - Vendor ID:              01
    INFO:iMPACT - Device Code:            18
    Setting Flash Control Pins ...
    Using x16 mode ...
    Setting Flash Control Pins ...
    Setting Configuration Register ...
    '1': Erasing device...
    '1': Start address = 0x00000000, End address = 0x008CE03B.
    done.
    '1': Erasure completed successfully.
    Setting Flash Control Pins ...
    Using x16 mode ...
    Setting Flash Control Pins ...
    Setting Configuration Register ...
    INFO:iMPACT - Using Word Programming.
    '1': Programming Flash.
    done.
    Setting Flash Control Pins ...
    '1': Flash Programming completed successfully.
    Using x16 mode ...
    Setting Flash Control Pins ...
    Setting Configuration Register ...
    '1': Reading device contents...
    done.
    '1': Verification completed.
    Setting Flash Control Pins ...
    Current cable speed is resumed to 6.000 Mhz.
    '1': Configuration data download to FPGA was not successful. DONE did not go high, please check your configuration setup and mode settings.
    `Elapsed time =    814 sec.
    and i find many people have met the same thing. But they are spartan  series FPGA and i try to low the Resistances of Mode pins,M0 M1 and M2, but the problem does not been solved.
    I have read the status Registers and find there is an over-temperature state 
    and in Impact i could not readback the registers. It is strange.
    I am anxious about this problem and have not solved it yet
    What reasons may it be?
    Hope for your answer, thank you

    Hi~I want to know if you solve the configuration problem for virtex-6?
    As I encounter the  same configuration problem, I want to consult  you with some question.
    Can I have your email?
    gszakacs wrote:
    I have measured the VCCINT and find it is 1.0V, not 2.997V;
    That is not at all surprising.  I always assumed the problem is with reading the XADC (system monitor) block and not with the voltage or temperature.
    my Reference board is ML605
    That would have been nice to know at the beginning...
    It seems that you have selected the correct mode, assuming your jumpers are set as required in the ML605 Hardware User's Guide.  See table 1-27, table 1-33 and the note below it about switch S1.
    I'm not that familiar with the details of this reference design, but it may be that the slave SelectMap circuitry requires a reset or power cycle to actually configure the FPGA.  Have you tried power-cycling to see if the FPGA boots from the flash?
    I'd also suggest that you select the V6 in the JTAG chain view, then go to the debug menu of Impact and select Read Device Status (this is from memory, but it's something like that).  That will not only show the bits of the configuration status register, but also describe what each bit means.  Among other things you can check the state of the FPGA's configuration logic and the Mode pins.
     

  • HT201210 I have updated my iPhone to iOS6.1.3 today and lost all my photos and some data(messageies) I have tried iTunes back up but still not success, please help. This

    I have updated my iPhone to iOS6.1.3 today and lost all my photos and some data(messageies) I have tried iTunes back up but still not success, please help.

    If your messages and photos weren't part of your backup, then they're gone.
    Certainly you weren't foolish enough to update the iOS on your phone before importing your photos off your phone for safe keeping on your computer like you would do with any digital camera, were you?

  • Configuration data download to FPGA was not successful.

    I have designed a board with the Spartan 6 LX9 TQFP144 Package.
    I am able to load a bitstream to the device with the digilent HS-2. However the fpga can not selfconfigure from
    the attached SPI Flash.
    Here is the console output from iMPACT:
    GUI --- Auto connect to cable...
    INFO:iMPACT - Digilent Plugin: Plugin Version: 2.4.4
    INFO:iMPACT - Digilent Plugin: found 1 device(s).
    INFO:iMPACT - Digilent Plugin: opening device: "JtagHs2", SN:210249983579
    INFO:iMPACT - Digilent Plugin: User Name: JtagHs2
    INFO:iMPACT - Digilent Plugin: Product Name: Digilent JTAG-HS2
    INFO:iMPACT - Digilent Plugin: Serial Number: 210249983579
    INFO:iMPACT - Digilent Plugin: Product ID: 30900152
    INFO:iMPACT - Digilent Plugin: Firmware Version: 0109
    INFO:iMPACT - Digilent Plugin: JTAG Port Number: 0
    INFO:iMPACT - Digilent Plugin: JTAG Clock Frequency: 10000000 Hz
    Attempting to identify devices in the boundary-scan chain configuration...
    INFO:iMPACT - Current time: 27.07.2015 16:19:26
    PROGRESS_START - Starting Operation.
    Identifying chain contents...'0': : Manufacturer's ID = Xilinx xc6slx9, Version : 2
    INFO:iMPACT:1777 -
    Reading C:/Xilinx/ISE/14.7/ISE_DS/ISE/spartan6/data/xc6slx9.bsd...
    INFO:iMPACT:501 - '1': Added Device xc6slx9 successfully.
    done.
    PROGRESS_END - End Operation.
    Elapsed time =      0 sec.
    Selected part: N25Q128
    Unprotect sectors: FALSE
    INFO:iMPACT - Current time: 27.07.2015 16:20:19
    PROGRESS_START - Starting Operation.
    Maximum TCK operating frequency for this device chain: 25000000.
    Validating chain...
    Boundary-scan chain validated successfully.
    '1': SPI access core not detected. SPI access core will be downloaded to the device to enable operations.
    INFO:iMPACT - Downloading core file C:/Xilinx/ISE/14.7/ISE_DS/ISE/spartan6/data/xc6slx9_spi.cor.
    '1': Downloading core...
     LCK_cycle = NoWait.
    LCK cycle: NoWait
    done.
    '1': Reading status register contents...
    INFO:iMPACT:2219 - Status register values:
    INFO:iMPACT - 0011 1100 1110 1100
    INFO:iMPACT:2492 - '1': Completed downloading core to device.
    '1': IDCODE is '20ba18' (in hex).
    '1': ID Check passed.
     '1': IDCODE is '20ba18' (in hex).
    '1': ID Check passed.
     '1': Erasing Device.
    '1': Using Sector Erase.
    '1': Programming Flash.
    '1': Reading device contents...
    done.
    '1': Verification completed.
    '1':Programming in x4 mode.
    '1': Configuration data download to FPGA was not successful. DONE did not go high, please check your configuration setup and mode settings.
    INFO:iMPACT - '1': Flash was not programmed successfully.
    PROGRESS_END - End Operation.
    Elapsed time =     78 sec.
    If i read that correctly Data was written to the Flash but the fpga was not able to configure from that data.
    Done-pin is connected to 3.3V via a 470 Ohms Resisor.
    The Flash is a N25Q128A13ESE40G, Datasheet here: http://www.farnell.com/datasheets/1674445.pdf
    I can perform a readback, checksum and an erase.
    If i do a read device status this is the console output:
    INFO:iMPACT - Current time: 27.07.2015 16:36:27
    Maximum TCK operating frequency for this device chain: 25000000.
    Validating chain...
    Boundary-scan chain validated successfully.
    '1': IDCODE is '20ba18' (in hex).
    '1': ID Check passed.
     '1': IDCODE is '20ba18' (in hex).
    '1': ID Check passed.
     '1': IDCODE is '20ba18' (in hex).
    '1': ID Check passed.
     INFO:iMPACT - '1': Reloading FPGA configuration data stored in flash...
    INFO:iMPACT:182 - done.
    On the Flash side I have pulled s# and Hold up to 3.3V with 100k Resistors.
    Can someone help me to find the problem?

    So does the FPGA try to read the SPI flash when it boots ?
    out with scope, probe the clock and the data , see if you can see it streamig out when you boot.
    If so, then one other thing I see wrong a few times is data path of the SPI, single bit or 4 bits of data.
        you have to make certain the bit file was created in the same width as the fgpa is expecting,
          In ISE I think its in Impact where you make the SPI flash file and specify this .
     

  • V5 in BPI Mode " Configuration data download to FPGA was not successful. DONE did not go high,"

    Hello,everyone.
    I am using virtex5 XC5VLX155 FPGA and trying to download mcs file to BPI flash and have failed.
    The flash is JS28F512P30E. The iMpact version is 14.7. 
    FPGA's VCCINT is 1.0V, VCCAUX is 2.5V. VCCO is 3.3V.
    M[2:0] is 010 in Master BPI.  Ican  program FPGA through JTAG. The FPGA_DONE pin 's  LED can always flash.
    The error is shown as below. the full  IMPACT console log and the SCHEMATIC_ FLASH are in the attachment.
    Using x16 mode ...
    Setting Flash Control Pins ...
    '1': Erasing device...
    '1': Start address = 0x00000000, End address = 0x004E4AFF.
    done.
    '1': Erasure completed successfully.
    Using x16 mode ...
    Setting Flash Control Pins ...
    INFO:iMPACT - Using Word Programming.
    '1': Programming Flash.
    done.
    '1': Flash Programming completed successfully.
    '1': Configuration data download to FPGA was not successful. DONE did not go high, please check your configuration setup and mode settings.
    PROGRESS_END - End Operation.
    Elapsed time =    692 sec.
    Hope everyone give more advices. Thank you.
     

    Thank you very much!
    I can read ack the mcs file, but the file is much bigger than the original mcs file.
    The flash datasheet is in the attachment.
    I want to use the Master BPI mode. In BPI_UP, the address starts at 0 and increments by 1 until the DONE pin is
    asserted. I do not know the difference between the BPI_UP and BPI_DOWN.
    ps:  The R61,R62 and R63 are not weld on the board. The ADV pin is tie to VSS .
     

  • Regarding : Material document data and PO data do not match (Plant)

    Hi Gurus,
    Please go through this BAPI program.
    While uploading it is giving an error ' Material document data and PO data do not match (Plant) '.
    Please help regarding this issue.For all Other moment types it is working fine except this 351 moment type.
    dATA: i_excel TYPE truxs_t_text_data. "work table for excel upload
    DATA: BEGIN OF it_itab OCCURS 100,
          docdate(10),
          postdate(10),
          mvt_type(3), "Movement Type
          plant(4), "Plant
          lgort(4),
          pur_doc(10), "Purchase Document No
          po_item(3), "Purchase Document Item No
          material(18), "Material Number
         delnote(16),
          erfmg(13),
          uom(3),
         lfmng(13), "Quantity
          batch(10) TYPE c,
          vfdat TYPE vfdat,
          END OF it_itab.
    DATA: it_goodsmvt_head TYPE TABLE OF bapi2017_gm_head_01      INITIAL SIZE 100,
          it_goodsmvt_code TYPE TABLE OF bapi2017_gm_code         INITIAL SIZE 100,
          it_goodsmvt_item TYPE TABLE OF bapi2017_gm_item_create  INITIAL SIZE 100.
    DATA: wa_goodsmvt_head LIKE LINE OF it_goodsmvt_head,
          wa_goodsmvt_code LIKE LINE OF it_goodsmvt_code,
          wa_goodsmvt_item LIKE LINE OF it_goodsmvt_item.
    DATA: w_mat_doc  TYPE bapi2017_gm_head_ret-mat_doc,
          w_year     TYPE bapi2017_gm_head_ret-doc_year.
    DATA: BEGIN OF it_errmsg_goodsmvt OCCURS 10.
            INCLUDE STRUCTURE bapiret2.
    DATA: END OF it_errmsg_goodsmvt.
    DATA : obj_type LIKE bapiache09-obj_type,
           obj_key  LIKE bapiache09-obj_key,
           obj_sys  LIKE bapiache09-obj_sys.
    DATA: v_date1 TYPE sy-datum.
    DATA: v_date2 TYPE sy-datum.
    DATA: w_lines TYPE i.
    DATA: errflag.
    SELECTION-SCREEN BEGIN OF BLOCK bk1 WITH FRAME TITLE text-100.
    PARAMETERS: p_file TYPE  rlgrap-filename.
    SELECTION-SCREEN END OF BLOCK bk1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          field_name = 'P_FILE'
        IMPORTING
          file_name  = p_file.
    Start-of-selection processing
    START-OF-SELECTION.
      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
          i_line_header        = 'X'
          i_tab_raw_data       = i_excel
          i_filename           = p_file
        TABLES
          i_tab_converted_data = it_itab[]
        EXCEPTIONS
          conversion_failed    = 1
          OTHERS               = 2.
      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 it_itab.
        REFRESH it_goodsmvt_head.
        REFRESH it_goodsmvt_item.
        CONCATENATE it_itab-docdate6(4) it_itab-docdate3(2) it_itab-docdate+0(2) INTO v_date1.
        CONCATENATE it_itab-postdate6(4) it_itab-postdate3(2) it_itab-postdate+0(2) INTO v_date2.
        wa_goodsmvt_head-pstng_date = v_date2.
        wa_goodsmvt_head-doc_date   = v_date1.
       wa_goodsmvt_head-ref_doc_no = it_itab-delnote.
    wa_goodsmvt_head-pr_uname   = sy-uname.
        APPEND wa_goodsmvt_head TO it_goodsmvt_head.
    Maintain it_goodsmvt_code
        wa_goodsmvt_code-gm_code    = '04'.
    Maintain it_goodsmvt_item
    *LOOP AT it_itab.
    IF wa_goodsmvt_item-po_number IS INITIAL.
        wa_goodsmvt_item-po_number    = it_itab-pur_doc.
        wa_goodsmvt_item-move_type    = it_itab-mvt_type.
        wa_goodsmvt_item-MOVE_PLANT      = it_itab-plant.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            input  = it_itab-material
          IMPORTING
            output = it_itab-material.
        wa_goodsmvt_item-material     = it_itab-material.
        wa_goodsmvt_item-stge_loc     = it_itab-lgort.
        wa_goodsmvt_item-po_item      = it_itab-po_item.
        wa_goodsmvt_item-entry_qnt    = it_itab-erfmg.
        wa_goodsmvt_item-ENTRY_UOM_ISO    = it_itab-uom.
       wa_goodsmvt_item-po_pr_qnt    = it_itab-lfmng.
        wa_goodsmvt_item-batch        = it_itab-batch.
        wa_goodsmvt_item-expirydate   = it_itab-vfdat.
       wa_goodsmvt_item-NO_MORE_GR   = 'X'.
        wa_goodsmvt_item-mvt_ind      = 'B'.
        APPEND wa_goodsmvt_item TO it_goodsmvt_item.
        CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
          EXPORTING
            goodsmvt_header  = wa_goodsmvt_head
            goodsmvt_code    = wa_goodsmvt_code
          IMPORTING
            materialdocument = w_mat_doc
          TABLES
            goodsmvt_item    = it_goodsmvt_item
            return           = it_errmsg_goodsmvt.
    Process of commit work
        IF it_goodsmvt_head[] IS NOT INITIAL.
          DESCRIBE TABLE it_goodsmvt_head LINES w_lines.
        ENDIF.
        IF it_goodsmvt_item[] IS NOT INITIAL.
          DESCRIBE TABLE it_goodsmvt_item LINES w_lines.
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
            EXPORTING
              wait = 'X'.
        IMPORTING
        RETURN        =
          CLEAR errflag.
          READ TABLE it_errmsg_goodsmvt INDEX 1.
          IF it_errmsg_goodsmvt-type EQ 'E'.
            WRITE:/'Error in function', it_errmsg_goodsmvt-message.
            errflag = 'X'.
          ELSE.
            WRITE:/ it_errmsg_goodsmvt-message.
          ENDIF.
          IF errflag IS INITIAL.
            COMMIT WORK AND WAIT.
            IF sy-subrc NE 0.
              WRITE:/ 'Error in updating'.
              EXIT.
            ELSE.
              WRITE:/ 'Material Document created successfully and the Document Number for the Material',
                      wa_goodsmvt_item-material,'is:', w_mat_doc, w_year.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDLOOP.

    Hey,
    Just wanted to post that in my case this was the error of MVT_IND field in item table. When I made it from 'B' to blank then it worked.
    Mine is solved....
    Thanks

  • Storage location Data is not saving in table MARD using BAPI method.

    Hi Experts,
    TABLES: T001L, "Storage Locations
            MARA,  "General Material Data
            MAKT,  "Material Descriptions
            MBEW,  "Material Valuation
            MARC,  "Plant Data for Material
            MARD.  "Storage Location Data for Mate
    DATA: BAPI_HEAD   LIKE BAPIMATHEAD,  "MATERIAL
          BAPI_MAKT   LIKE BAPI_MAKT,    "Material Description
          BAPI_MARA1  LIKE BAPI_MARA,    "Client Data
          BAPI_MARAX  LIKE BAPI_MARAX,
          BAPI_MARC1  LIKE BAPI_MARC,    "Plant View
          BAPI_MARCX  LIKE BAPI_MARCX,
          BAPI_MBEW1  LIKE BAPI_MBEW,    "Accounting View
          BAPI_MBEWX  LIKE BAPI_MBEWX,
          BAPI_MARD1  LIKE BAPI_MARD,    "Storage location
          BAPI_MARDX  LIKE BAPI_MARDX,
          BAPI_RETURN LIKE BAPIRET2.
    DATA: BEGIN OF INT_MAKT OCCURS 100.
            INCLUDE STRUCTURE BAPI_MAKT.
    DATA: END OF INT_MAKT.
    DATA: BEGIN OF INT_MAT OCCURS 100,
             WERKS(4),     "Plant
             LGORT(4),     "Storage location
             MTART(4),     "Material type
             MATNR(18),    "Material number
             MAKTX(40),     "Material description
             MATKL(9) ,    "Material group
             MBRSH(1),     "Industry sector
             MEINS(3),     "Base unit of measure
             GEWEI(3),     "Weight Unit
             SPART(2),     "Division
             EKGRP(3),     "Purchasing group
             VPRSV(1),     "Price control indicator
             STPRS(12),    "Standard price
             PEINH(3),     "Price unit
             SPRAS(2),     "Language key
             BKLAS(4),     "VALUATION CLASS
             VERPR TYPE VERPR_BAPI,    "MOVING PRICE
             BWTTY(1),     "Valuation Catogory
             MLAST(1),     "Price determination
             MLMAA(1),     "Material Ledger
             EKLAS(4),     "Valuation Class for sales order stock
             QKLAS(4),     "Valuation Class for Project Stock
             ZKPRS TYPE DZKPRS, "Future price
             ZKDAT TYPE DZKDAT, "Valid From Date
             BWPRS TYPE BWPRS,  "Tax price 1
             BWPS1 TYPE BWPS1,  "Tax price 2
             VJBWS TYPE VJBWS,  "Tax price 3
             ABWKZ TYPE ABWKZ,  "Devaluatin indicator
             BWPRH TYPE BWPRH,  "Commercial price 1
             BWPH1 TYPE BWPH1,  "Commercial price 2
             VJBWH TYPE VJBWH,  "Commercial Price 3
             XLIFO(1),          "LIFO/FIFO revelant
             MYPOL(4),          "Pool no for LIFO
             MMSTA(2),          "Plant specific material status
             AUSME TYPE AUSME,  "Unit of issue
             QMATA(6),          "Material Authorization group
             RBNRM(9),          "Catalog Profile
             WEBAZ TYPE WEBAZ,  "Goods reciept processing time in days
             PRFRQ TYPE PRFRQ,  "Recurring Insepction
             SSQSS(8),          "QM Control key
             QZGTP(4),          "Certificate Type
             QSSYS(4),          "Required QM system for vendor
           END OF INT_MAT.
    DATA: V_MATNR TYPE MARA-MATNR.
    SELECT-OPTIONS:
                PLANT    FOR  MARC-WERKS OBLIGATORY MEMORY ID PLT,
                S_LGORT  FOR  MARD-LGORT MEMORY ID STL,
                MATERIAL FOR  MARA-MATNR MEMORY ID MAT,
                MATLTYPE FOR  MARA-MTART MEMORY ID MTY,
                DIVISION FOR  MARA-SPART MEMORY ID DIV.
    PARAMETERS:  F_FILE LIKE RLGRAP-FILENAME
                 DEFAULT 'C:\DATA\ZMATERIAL.XLS' MEMORY ID F_FILE,
    GETDATA AS CHECKBOX, "Tick to download materials data to local harddisk
             UPDDATA AS CHECKBOX. "Tick to update date to Materials Master
    IF GETDATA = 'X'.
       PERFORM DOWNLOAD_DATA.
       PERFORM DOWNLOAD_FILE.
    ENDIF.
    IF UPDDATA = 'X'.
       PERFORM UPLOAD_FILE.
       PERFORM UPDATE_MM.
    ENDIF.
    FORM DOWNLOAD_DATA.
    SELECT * FROM MARC  WHERE LVORM EQ ' '
                          AND WERKS IN PLANT
                          AND MATNR IN MATERIAL.
        CLEAR MARA.
        SELECT SINGLE * FROM MARA WHERE MATNR =  MARC-MATNR.
        CHECK MATLTYPE.
        CHECK DIVISION.
        CLEAR MBEW.
        SELECT SINGLE * FROM MBEW WHERE MATNR =  MARC-MATNR
                                    AND BWKEY =  MARC-WERKS.
        CLEAR MAKT.
        SELECT SINGLE * FROM MAKT WHERE SPRAS =  'EN'
                                    AND MATNR =  MARC-MATNR.
        CLEAR MARD.
        SELECT SINGLE * FROM MARD WHERE WERKS IN PLANT
                                  AND   LGORT IN S_LGORT.
        WRITE:/ MARC-WERKS,    "Plant
                MARD-LGORT,    "Storage location
                MARA-MTART,    "Material type
                MARA-MATNR,    "Material number
                MARA-MATKL,    "Material group
                MARA-MBRSH,    "Industry sector
                MARA-MEINS,    "Base unit of measure
                MARA-GEWEI,    "Weight Unit
                MARA-SPART,    "Division
                MARC-EKGRP,    "Purchasing group
                MBEW-VPRSV,    "Price control indicator
                MBEW-STPRS,    "Standard price
                MBEW-PEINH,    "Price unit
                MBEW-BKLAS,    "VALUE CLASS
                MAKT-SPRAS,    "Language key
                MBEW-BKLAS,    "Valuation Class
                MBEW-VERPR,    "Moving price
                MAKT-MAKTX,    "Material description
                MBEW-BWTTY,    "Valutaion Catogorey
                MBEW-MLAST,    "Price Determination
                MBEW-MLMAA,    "Material Ledger
                MBEW-EKLAS,    "Valuation class for Sales order stock
                MBEW-QKLAS,    "Valutaion Class for Project Stock
                MBEW-ZKPRS,    "Future Price
                MBEW-ZKDAT,    "Valid From Date
                MBEW-BWPRS,    "Tax price 1
                MBEW-BWPS1,    "Tax price 2
                MBEW-VJBWS,    "Tax price 3
                MBEW-ABWKZ,    "Devaluatin indicator
                MBEW-BWPRH,    "Commercial price 1
                MBEW-BWPH1,    "Commercial price 2
                MBEW-VJBWH,    "Commercial Price 3
                MBEW-XLIFO,    "LIFO/FIFO revelant
                MBEW-MYPOL,    "Pool no for LIFO
                MARC-MMSTA,    "Plant specific material status
                MARC-AUSME,    "Unit of issue
                MARC-QMATA,    "Material Authorization group
                MARA-RBNRM,    "Catalog Profile
                MARC-WEBAZ,    "Goods reciept processing time in days
                MARC-PRFRQ,    "Recurring Insepction
                MARC-SSQSS,    "QM Control key
                MARC-QZGTP,    "Certificate Type
                MARC-QSSYS.    "Required QM system for vendor
                INT_MAT-WERKS = MARC-WERKS.    "Plant
                INT_MAT-LGORT = MARD-LGORT.    "Storage Location
                INT_MAT-MTART = MARA-MTART.    "Material type
                INT_MAT-MATNR = MARA-MATNR.    "Material number
                INT_MAT-MAKTX = MAKT-MAKTX.    "Material description
                INT_MAT-MATKL = MARA-MATKL.    "Material group
                INT_MAT-MBRSH = MARA-MBRSH.    "Industry sector
                INT_MAT-MEINS = MARA-MEINS.    "Base unit of measure
                INT_MAT-GEWEI = MARA-GEWEI.    "Weight Unit
                INT_MAT-SPART = MARA-SPART.    "Division
                INT_MAT-EKGRP = MARC-EKGRP.    "Purchasing group
                INT_MAT-VPRSV = MBEW-VPRSV.    "Price control indicator
                INT_MAT-STPRS = MBEW-STPRS.    "Standard price
                INT_MAT-PEINH = MBEW-PEINH.    "Price unit
                INT_MAT-SPRAS = MAKT-SPRAS.    "Language key
                INT_MAT-BKLAS = MBEW-BKLAS.    "VALVATION CLASS
                INT_MAT-VERPR = MBEW-VERPR.    "MOVING price
                INT_MAT-BWTTY = MBEW-BWTTY.    "Valutaion Catogorey
                INT_MAT-MLAST = MBEW-MLAST.    "Price Determination
                INT_MAT-MLMAA = MBEW-MLMAA.    "Material Ledger
                INT_MAT-EKLAS = MBEW-EKLAS.    "Valuation class forS.O Stock
                INT_MAT-QKLAS = MBEW-QKLAS.    "Valutaion Class for Project
                INT_MAT-ZKPRS = MBEW-ZKPRS.    "Future Price
                INT_MAT-ZKDAT = MBEW-ZKDAT.    "Valid From Date
                INT_MAT-BWPRS = MBEW-BWPRS.    "Tax price 1
                INT_MAT-BWPS1 = MBEW-BWPS1.    "Tax price 2
                INT_MAT-VJBWS = MBEW-VJBWS.    "Tax price 3
                INT_MAT-ABWKZ = MBEW-ABWKZ.    "Devaluatin indicator
                INT_MAT-BWPRH = MBEW-BWPRH.    "Commercial price 1
                INT_MAT-BWPH1 = MBEW-BWPH1.    "Commercial price 2
                INT_MAT-VJBWH = MBEW-VJBWH.    "Commercial Price 3
                INT_MAT-XLIFO = MBEW-XLIFO.    "LIFO/FIFO revelant
                INT_MAT-MYPOL = MBEW-MYPOL.    "Pool no for LIFO
                INT_MAT-MMSTA = MARC-MMSTA.    "Plant specific material
                INT_MAT-AUSME = MARC-AUSME.    "Unit of issue
                INT_MAT-QMATA = MARC-QMATA.    "Material Authorization group
                INT_MAT-RBNRM = MARA-RBNRM.    "Catalog Profile
                INT_MAT-WEBAZ = MARC-WEBAZ.    "Goods reciept processing
                INT_MAT-PRFRQ = MARC-PRFRQ.    "Recurring Insepction
                INT_MAT-SSQSS = MARC-SSQSS.    "QM Control key
                INT_MAT-QZGTP = MARC-QZGTP.    "Certificate Type
                INT_MAT-QSSYS = MARC-QSSYS.    "Required QM system for
                APPEND INT_MAT.
                CLEAR  INT_MAT.
    ENDSELECT.
    ENDFORM.
    FORM DOWNLOAD_FILE.
    call function 'WS_DOWNLOAD'
      EXPORTING
        FILENAME                      = F_FILE
        FILETYPE                      = 'DAT'
      FILETYPE                      = 'WK1'
      tables
        data_tab                      = INT_MAT
      EXCEPTIONS
        FILE_OPEN_ERROR               = 1
        FILE_WRITE_ERROR              = 2
        INVALID_FILESIZE              = 3
        INVALID_TYPE                  = 4
        NO_BATCH                      = 5
        UNKNOWN_ERROR                 = 6
        INVALID_TABLE_WIDTH           = 7
        GUI_REFUSE_FILETRANSFER       = 8
        CUSTOMER_ERROR                = 9
        OTHERS                        = 10.
    IF SY-SUBRC = 0.
       FORMAT COLOR COL_GROUP.
       WRITE:/ 'Data Download Successfully to your local harddisk'.
       SKIP.
    ENDIF.
    ENDFORM.
    FORM UPLOAD_FILE.
    call function 'WS_UPLOAD'
      EXPORTING
        FILENAME                      = F_FILE
        FILETYPE                      = 'DAT'
      FILETYPE                      = 'WK1'
      tables
        data_tab                      = INT_MAT
      EXCEPTIONS
        FILE_OPEN_ERROR               = 1
        FILE_WRITE_ERROR              = 2
        INVALID_FILESIZE              = 3
        INVALID_TYPE                  = 4
        NO_BATCH                      = 5
        UNKNOWN_ERROR                 = 6
        INVALID_TABLE_WIDTH           = 7
        GUI_REFUSE_FILETRANSFER       = 8
        CUSTOMER_ERROR                = 9
        OTHERS                        = 10.
    IF SY-SUBRC = 0.
       FORMAT COLOR COL_GROUP.
       WRITE:/ 'Data Upload Successfully from your local harddisk'.
       SKIP.
    ENDIF.
    ENDFORM.
    FORM UPDATE_MM.
    LOOP AT INT_MAT.
    CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
      EXPORTING
        INPUT              = INT_MAT-MATNR
    IMPORTING
       OUTPUT             = INT_MAT-MATNR
    EXCEPTIONS
      LENGTH_ERROR       = 1
      OTHERS             = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Header
        BAPI_HEAD-MATERIAL        = INT_MAT-MATNR.
        BAPI_HEAD-IND_SECTOR      = INT_MAT-MBRSH.
        BAPI_HEAD-MATL_TYPE       = INT_MAT-MTART.
        BAPI_HEAD-BASIC_VIEW      = 'X'.
        BAPI_HEAD-PURCHASE_VIEW   = 'X'.
        BAPI_HEAD-ACCOUNT_VIEW    = 'X'.
    Material Description
        REFRESH INT_MAKT.
        INT_MAKT-LANGU           = INT_MAT-SPRAS.
        INT_MAKT-MATL_DESC       = INT_MAT-MAKTX.
        APPEND INT_MAKT.
    Client Data - Basic
        BAPI_MARA1-MATL_GROUP     = INT_MAT-MATKL.
        BAPI_MARA1-BASE_UOM       = INT_MAT-MEINS.
        BAPI_MARA1-UNIT_OF_WT     = INT_MAT-GEWEI.
        BAPI_MARA1-DIVISION       = INT_MAT-SPART.
        BAPI_MARAX-MATL_GROUP = 'X'.
        BAPI_MARAX-BASE_UOM   = 'X'.
        BAPI_MARAX-UNIT_OF_WT = 'X'.
        BAPI_MARAX-DIVISION   = 'X'.
    Plant - Purchasing
        BAPI_MARC1-PLANT      = INT_MAT-WERKS.
        BAPI_MARC1-PUR_GROUP  = INT_MAT-EKGRP.
        BAPI_MARC1-PUR_STATUS = INT_MAT-MMSTA.
        BAPI_MARC1-ISSUE_UNIT = INT_MAT-AUSME.
        BAPI_MARC1-QM_AUTHGRP = INT_MAT-QMATA.
        BAPI_MARC1-GR_PR_TIME = INT_MAT-WEBAZ.
        BAPI_MARC1-INSP_INT   = INT_MAT-PRFRQ.
        BAPI_MARC1-CTRL_KEY   = INT_MAT-SSQSS.
        BAPI_MARC1-CERT_TYPE  = INT_MAT-QZGTP.
        BAPI_MARC1-QM_RGMTS   = INT_MAT-QSSYS.
        BAPI_MARCX-PLANT      = INT_MAT-WERKS.
        BAPI_MARCX-PUR_GROUP  = 'X'.
        BAPI_MARCX-PUR_STATUS = 'X'.
        BAPI_MARCX-ISSUE_UNIT = 'X'.
        BAPI_MARCX-QM_AUTHGRP = 'X'.
        BAPI_MARCX-GR_PR_TIME = 'X'.
        BAPI_MARCX-INSP_INT   = 'X'.
        BAPI_MARCX-CTRL_KEY   = 'X'.
        BAPI_MARCX-CERT_TYPE  = 'X'.
        BAPI_MARCX-QM_RGMTS   = 'X'.
    Accounting 1
        BAPI_MBEW1-VAL_AREA      = INT_MAT-WERKS.
        BAPI_MBEW1-PRICE_CTRL    = INT_MAT-VPRSV.
        BAPI_MBEW1-STD_PRICE     = INT_MAT-STPRS.
        BAPI_MBEW1-PRICE_UNIT    = INT_MAT-PEINH.
        BAPI_MBEW1-MOVING_PR     = INT_MAT-VERPR.
        BAPI_MBEW1-VAL_CLASS     = INT_MAT-BKLAS.
        BAPI_MBEW1-VAL_CAT       = INT_MAT-BWTTY.
        BAPI_MBEW1-ML_SETTLE     = INT_MAT-MLAST.
        BAPI_MBEW1-ML_ACTIVE     = INT_MAT-MLMAA.
        BAPI_MBEW1-VM_SO_STK     = INT_MAT-EKLAS.
        BAPI_MBEW1-VM_P_STOCK    = INT_MAT-QKLAS.
        BAPI_MBEW1-FUTURE_PR     = INT_MAT-ZKPRS.
        BAPI_MBEW1-VALID_FROM    = INT_MAT-ZKDAT.
    *ACCOUNTING 2
       BAPI_MBEW1-TAXPRICE_1    = INT_MAT-BWPRS.
       BAPI_MBEW1-TAXPRICE_2    = INT_MAT-BWPS1.
       BAPI_MBEW1-TAXPRICE_3    = INT_MAT-VJBWS.
       BAPI_MBEW1-DEVAL_IND     = INT_MAT-ABWKZ.
       BAPI_MBEW1-COMMPRICE1    = INT_MAT-BWPRH.
       BAPI_MBEW1-COMMPRICE2    = INT_MAT-BWPH1.
       BAPI_MBEW1-COMMPRICE3    = INT_MAT-VJBWH.
       BAPI_MBEW1-LIFO_FIFO     = INT_MAT-XLIFO.
       BAPI_MBEW1-POOLNUMBER    = INT_MAT-MYPOL.
        BAPI_MBEWX-VAL_AREA   = INT_MAT-WERKS.
        BAPI_MBEWX-PRICE_CTRL = 'X'.
        BAPI_MBEWX-STD_PRICE  = 'X'.
        BAPI_MBEWX-PRICE_UNIT = 'X'.
        BAPI_MBEWX-MOVING_PR =  'X'.
        BAPI_MBEWX-VAL_CLASS =  'X'.
        BAPI_MBEWX-VAL_CAT       = 'x'.
        BAPI_MBEWX-ML_SETTLE     = 'X'.
        BAPI_MBEWX-ML_ACTIVE     = 'X'.
        BAPI_MBEWX-VM_SO_STK     = 'X'.
        BAPI_MBEWX-VM_P_STOCK    = 'X'.
        BAPI_MBEWX-FUTURE_PR     = 'X'.
        BAPI_MBEWX-VALID_FROM    = 'X'.
       BAPI_MBEWX-TAXPRICE_1    = 'X'.
       BAPI_MBEWX-TAXPRICE_2    = 'X'.
       BAPI_MBEWX-TAXPRICE_3    = 'X'.
       BAPI_MBEWX-DEVAL_IND     = 'X'.
       BAPI_MBEWX-COMMPRICE1    = 'X'.
       BAPI_MBEWX-COMMPRICE2    = 'X'.
       BAPI_MBEWX-COMMPRICE3    = 'X'.
       BAPI_MBEWX-LIFO_FIFO     = 'X'.
       BAPI_MBEWX-POOLNUMBER    = 'X'.
    *Storage Locations
        BAPI_MARD1-PLANT      = INT_MAT-WERKS.
        BAPI_MARD1-STGE_LOC   = INT_MAT-LGORT.
        BAPI_MARDX-PLANT      = INT_MAT-WERKS.
        BAPI_MARDX-STGE_LOC   = INT_MAT-LGORT.
       WRITE:/ BAPI_HEAD-MATERIAL, BAPI_MARC1-PLANT ,BAPI_MARD1-STGE_LOC.
        call function 'BAPI_MATERIAL_SAVEDATA'
          exporting
            HEADDATA                   = BAPI_HEAD
            CLIENTDATA                 = BAPI_MARA1
            CLIENTDATAX                = BAPI_MARAX
            PLANTDATA                  = BAPI_MARC1
            PLANTDATAX                 = BAPI_MARCX
          FORECASTPARAMETERS         =
          FORECASTPARAMETERSX        =
          PLANNINGDATA               =
          PLANNINGDATAX              =
    <b>      STORAGELOCATIONDATA        =  BAPI_MARD1
           STORAGELOCATIONDATAX       =  BAPI_MARDX</b>
            VALUATIONDATA              = BAPI_MBEW1
            VALUATIONDATAX             = BAPI_MBEWX
          WAREHOUSENUMBERDATA        =
          WAREHOUSENUMBERDATAX       =
          SALESDATA                  = BAPI_MVKE1
          SALESDATAX                 = BAPI_MVKEX
          STORAGETYPEDATA            =
          STORAGETYPEDATAX           =
          IMPORTING
            RETURN                     = BAPI_RETURN
          TABLES
            MATERIALDESCRIPTION        = INT_MAKT
          UNITSOFMEASURE             =
          UNITSOFMEASUREX            =
          INTERNATIONALARTNOS        =
          MATERIALLONGTEXT           =
          TAXCLASSIFICATIONS         =
          RETURNMESSAGES             =
          PRTDATA                    =
          PRTDATAX                   =
          EXTENSIONIN                =
          EXTENSIONINX               =
    IF BAPI_RETURN-TYPE = 'E'.
       WRITE:/ 'Error Message ', BAPI_RETURN-MESSAGE.
    ENDIF.
    ENDLOOP.
    ENDFORM.
    <b>i am using this bapi method to copy materials from one plant to another plant using storage location so here what happenig is everyting is going correct but only the storage location data is not saving in table mard so any body faced this kind of problem please tell me.... and one more dbt
    bapi_marcx-pur_status = 'x' what is 'X' here??? is that mandatory field or required field ???
    points wil be rewarded.
    reagrds,
    sunil k airam.

    In the HEADDATA structure, STORAGE_VIEW should also be set as 'X' , in order to update storage location data
    for example
    BAPI_HEAD-STORAGE_VIEW = 'X'.
    Also, PUR_STATUS corresponds to field MARA-MSTAE whose domain has value table T141, therefore values in the field are checked against T141
    Edited by: Harris Veziris on May 12, 2008 12:37 PM

  • How to Troubleshoot why data is not moving over into the Data Warehouse after Sql Server Agent Job Run

    Hello,
    Here is my problem:
    Data was imported into the staging area. After resolving some errors and running the job, I got the data to move over to the next area. From there, data should be moving over into the DW.  I have been troubleshooting for hours and cannot reslove this
    issue. I have restarted the sql service services, I have ran a couple packages manually, and the job is running successfully. 
    What are some reasons why data is not getting into the data warehouse? Where should I be looking? 
    Your help is greatly appreciated!!

    Anything is possible.
    So, just to reiterate, running the job manually works, running the scheduled job does not result in errors neither data arriving to the DW, right? And it used to, correct?
    If so, the 1st step would be to examine the configuration(s). But not before you inspect the package. Do you have an ability to export it to a file system and open in BIDS?
    Arthur My Blog

Maybe you are looking for

  • Fastest CPU for K7T Turbo Limited Edition

    I would like to ask, which is the fastest processor (Athlon XP) which I can put into this motherboard?? The general information on this website say that up to Athlon XP 2000+, but then there is a link on CPU Support and there is only up to XP 1800+,

  • How to delete a data element? - error message

    Error in the ABAP Application Program The current ABAP program "SAPLRSSG" had to be terminated because it has come across a statement that unfortunately cannot be executed. The following syntax error occurred in program "GP0GVENGV13S7QSCONTM4LCHNZG "

  • Why won't Numbers save my character styles shortcuts?

    I like to keep all my character styles shortcuts thru all my projects yet Numbers won't save them thru restarts or quits but it used to. Any help appreciated

  • Acrobat 7 not included with Creative Suite 2 downloads?

    Hey Jeff, thanks for your reply, but I told not the whole truth We have some CS2 Premium (for Mac) here and want to reinstall them, we've got no single Acrobat 7 here. If I want to reinstall the whole CS2 Premium or a part of it from our old installa

  • No render preview window??

    Hi, Having started another project on LT, I find that after a "normal" render preview, the window no longer shows up. I haven't had this situation prior and wonder where I might find a reason for such. Thanks!