Function Module for Data upload in background

Hi,
I want to upload data from a flat file in background . I tried the function module ws_upload but its giving an error when program is executed in background .
I am working on sap 4.6b .
Can any one help me alternate function module or any other way by which i can upload data in background in this version of sap.

hi...
you can upload your file on application server.Then you can use open dataset to upload data from this file on application server and schedule this program in background.
i have done a similar kind of program.
you can try this method.

Similar Messages

  • Function Modules for Data and Time

    Hi all,
              I need 2 function modules for date and time. when we pass current data(sy-datum) and current time (sy-uzeit) into function modules, shoud get date in <b>dd/mm/yyyy or dd.mm.yyyy</b> and time in<b> HH:MM:SS</b> formats.
    Thanks in advance

    Hi Ranjith,
    i think this will b usefull for you..
    SAP Bar Chart Function Modules and what they are used for
    Function module
    Used for
    BARC_GRAPHIC_PBO
    Starting bar chart at PBO time, using a graphic profile (parameter PROFILE)
    BARC_GRAPHIC_PAI
    Analyzing data returned by the graphic
    BARC_SET_TIME_AXIS
    Setting start and end of time axis
    BARC_SET_OPTIONS
    Setting options
    BARC_ADD_CHART
    Creating a chart
    BARC_SET_CHART_ATTRIB
    Setting chart attributes
    BARC_ADD_SECTION
    Creating a section on the time axis
    BARC_SET_SECTION_ATTRIB
    Setting section attributes
    BARC_ADD_RIBBON
    Adding a ribbon to the time axis
    BARC_SET_RIBBON_ATTRIB
    Setting attributes for ribbons in the chart
    BARC_ADD_GRID
    Adding a time grid
    BARC_SET_GRID_ATTRIB
    Setting grid attributes
    BARC_ADD_LAYER
    Adding a layer (graphic elements)
    BARC_SET_LAYER_ATTRIB
    Setting layer attributes
    BARC_ADD_LINE
    Adding a line
    BARC_ADD_CALENDAR
    Creating a calendar
    BARC_SET_CALENDAR_ATTRIB
    Setting attributes for a calendar
    BARC_ADD_TIME_PROFILE
    Creating time profiles
    BARC_SET_TIME_PROFILE_ATTRIB
    Setting attributes for time profile
    BARC_ADD_INTERVAL
    Adding a time interval
    BARC_SET_INTERVAL_ATTRIB
    Setting time interval attributes
    BARC_ADD_TIME_OBJECT
    Creating a time object
    BARC_CONVERT_DATE
    Creating a date string in bar chart format
    BARC_REVERT_DATE
    Converting a date string in bar chart format to date and time
    BARC_ADD_DATELINE
    Creating a date line
    BARC_SET_DATELINE_ATTRIB
    Setting dateline attributes
    BARC_GET_PROFILE_CONTENTS
    Obtaining profile contents for customizing a chart
    BARC_GET_COLUMN_WIDTH
    Selecting new column width
    BARC_SET_COLUMN_WIDTH
    Setting the column width
    BARC_GET_TEXTINDEX
    Obtaining the text index of a field
    BARC_SET_LABELS
    Positioning the chart display
    BARC_SET_COLUMN_ATTRIB
    Setting column attributes
    BARC_SET_ROW_ATTRIB
    Setting row attributes
    BARC_SET_ROW_HEIGHT
    Setting the line height
    BARC_SET_MAXCHARTS
    Setting the maximum number of charts sent
    <b>If its usefull reward points
    </b>

  • Function Module for data retrival for work order clearence (WCA)

    Hi All ,
      Function Module for data retrival for work order clearence (WCA) for a particular Planning plant and (WCD's).
    Thanks.

    Hi Anne,
    BAPI_PRODORD_GET_DETAIL
    BAPI_PRODORD_GET_LIST
    You can find further FM in Function Group COPRINT and CODR or take F4 on CO* in Function Group
    These will serve your purpose.
    Cheerz.
    Ram

  • Any Function module for Date conversion

    Hi,
    In my output the date is coming like 80999898 but the actual date is 01.01.1900.
    Could you please tell me is there any Function module for that.
    Regards,
    Tushar

    Use the conv. exit CONVERSION_EXIT_INVDT_OUTPUT for this purpose.
    BR,
    Suhas

  • Wht are the function modules for download upload excel files in bdc.

    hi all,
    this question seems to be silly but i had open office excel files i am getting problems to upload or down loading.  can you tell which function modules can upload or down load open office excel files.
    another dought this is not need full but i need to get some of graphics which are in se78  .
    how can we dowload them from sap.
    thanq,
    rajesh.k

    Hi,
      use  :   CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
       REPORT  YKC_XL_UPLOAD.
    TYPE-POOLS TRUXS.
    TABLES : ZMARA.
    * Selection screen
    PARAMETER P_FILE TYPE RLGRAP-FILENAME DEFAULT
    'C:\Kris\TEST_UPLOAD.xls'.
    TYPES:  BEGIN OF T_TAB,
            MATNR   LIKE ZMARA-MATNR,
            ERSDA  LIKE ZMARA-ERSDA,
            ERNAM  LIKE ZMARA-ERNAM,
            END OF T_TAB.
    DATA :  T_UPLOAD  TYPE STANDARD TABLE OF T_TAB WITH HEADER LINE ,
            WA_UPLOAD TYPE T_TAB,
            IT_RAW TYPE TRUXS_T_TEXT_DATA.  "work table internal table
    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.
    START-OF-SELECTION.
    * Uploading the data in the file into internal table
      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
      EXPORTING
    *   I_FIELD_SEPERATOR =
    *   I_LINE_HEADER  = 'X'
        I_TAB_RAW_DATA = IT_RAW
        I_FILENAME     = P_FILE
      TABLES
        I_TAB_CONVERTED_DATA = T_UPLOAD[]
      EXCEPTIONS
        CONVERSION_FAILED = 1
        OTHERS            = 2.
      IF SY-SUBRC NE  0.
        MESSAGE ID SY-MSGID
                TYPE SY-MSGTY
                NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    END-OF-SELECTION.
    * Uploading the data into the database table
      LOOP AT T_UPLOAD INTO T_UPLOAD.
        ZMARA-MATNR = T_UPLOAD-MATNR.
        ZMARA-ERSDA = T_UPLOAD-ERSDA.
        ZMARA-ERNAM = T_UPLOAD-ERNAM.
        INSERT  ZMARA.
    Endloop.
    Tks,
    Krishna

  • Function modules for data retrieval from diff. tables

    Hi,
    I would just like to ask if there are function modules that can be used to retrieve data from the ff. tables:
    TSAD3T
    KNVV
    ESTRH
    for TSAD3T i need to get the value of title_medi
    for KNVV    i need to get the fields klabc vkorg vtweg
    for ESTRH  i need to get the fields subcat subid.
    Thanks.

    I doubt if you have such a FM

  • Function Modules for Date

    Hi ALL,
    I would like to know the various function modules that can be used for calculating dates.Like first day of month,last day.....etc etc.
    Please give me a list of the FM's and not the F4 help option info.
    Cheers

    Hi ,
    Here are a few FM used for date manipulation
    <b>DATE_IN_FUTURE  </b>                   Add / Substract days from a given date
    <b>HR_SGPBS_ADD_TIME_TO_DATE</b>     Find the next date based on input date , addition / sub and month , year ,date
    <b>CONVERT_DATE_TO_EXTERNAL</b>     Convert date to External format
    <b>SG_PS_ADD_MONTH_TO_DATE</b>     Find the next date based on input date , addition / sub and month , year ,date
    <b>DATE_COMPUTE_DATE</b>     For a input date gives the day of the week
    <b>DATE_GET_WEEK</b>For an input date ,gives the week as output
    <b>WEEK_GET_FIRST_DAY</b>     Input year and week output is the first day of the week
    <b>WEEKDAY_GET</b>     Gives the day range , Monday , Tuesday ,…..
    <b>RP_CALC_DATE_IN_INTERVAL</b>     Calculate Future Date
    <b>CALCULATE_DATE</b>     Calculate Future Date
    <b>FIMA_DAYS_AND_MONTHS_AND_YEARS</b>     Difference between two dates
    <b>CONVERSION_EXIT_PDATE_INPUT</b>     It checks if the date is in future , if yes an error is displayed
    Reagrds
    Arun

  • Function module for date

    Hello experts.
    my requirement is , I am having a fiscial year ( gjahr) and period ie month (monart) . Now i need afunction module that gives the last date of the month. say if it is january it should give 31 - month-year. I want to populate this date to the budat field. so please tell me how to solve this issue. i want to pass as date-month-year to budat. but i am having year as seperate field and month as seperate field. so please tell me the function module that gives all the three or any other solution to this.
    thanks for all the replies

    populate month, year u have and 01 into w_datum in and it should always give day1 of that month like this.
    concatenate l_year l_month '01' into w_datum_in.
    CALL FUNCTION 'SLS_MISC_GET_LAST_DAY_OF_MONTH'
                EXPORTING
                  day_in            = w_datum_in
                IMPORTING
                  last_day_of_month = w_datum_out
                EXCEPTIONS
                  day_in_not_valid  = 1
                  OTHERS            = 2.
    *reward if solved*

  • Function Module for Date/ Time difference in Working Days

    Hi all,
    Are there any function modules which will calculate the difference between a date AND time, but in working days?
    I can use the FIMA_DAYS_BETWEEN_TWO_DATES_2 FM for the dates, but I need to include times in this as well.
    This is for situations where the 'starting date' is a non-working day, and the 'end date' is a working day.  In this situation I need to take all the hours and minutes into account, which happened on the working day.  To give an example -
    Start date:  04.07.2010 (Sunday - Non working day)
    Start time:  21:12:36
    End date:  05.07.2010 (Monday - Working day)
    End time:  04:47:24
    I realise there is a Time option in this function module, but when I test it, it doesn't seem to be returning the desired results (returns 0 for days and time).  I am using '5' as the I_STGMETH and 'GB' as the I_SKALID. 
    I need a calcuation which will return the time, post midnight on the working day - in this example, 4 hours, 47 minutes (seconds are optional!).
    Can anyone help? - can I still use FIMA_DAYS_BETWEEN_TWO_DATES_2 but with different parameters?
    Thanks
    Mischa
    Edited by: Mischa Gulseven on Jul 20, 2010 10:40 AM

    Hi,
    Thanks but this FM does not seem to account for working days.
    For example, if I use:
    DATE1                           04.07.2010  (non working day)
    TIME1                           04:00:00
    DATE2                           05.07.2010   (working day)
    TIME2                           21:00:00
    It will give the following results -
    DATEDIFF                                                      1
    TIMEDIFF                                                     17
    EARLIEST                        1
    I don't want to account for the non-working day so the result I actually want would be to calculate from midnight on 05.07 to 21:00 on 05.07 which should be 21 hours.
    I suspect I probably need to include the STGMETH and the factory calendar somewhere in the FM?
    Does such a FM exist, or could anyone help me with some ABAP for this?
    thanks
    Mischa

  • Function module for date ranges

    Hi all,
           Is there any function module to display all the dates in between start date and end date. Or provide blocke code for this.
    Ex : If i have given nov 5th 2008 and nov 10th 2008 as input parameters.
           Output should be nov 5th 2008, nov 6th 2008,nov 7th 2008,nov 8th 2008,nov 9th 2008,nov 10th 2008,
    Please help me out in this regard.
    thanks
    naidu

    Hi Omkaram,
           Thank you verymuch for your code. That link is useful for me. I have rewarded you.
           But when i'm using the same code in my function module its not working.
           I have done the debugging the function module is not taking the input.
          Ex : itab[] = lt_date[].
          when i'm doing debugging the input parameter lt_date has no value.
          I dont know why it is.
          Can you help me please.
       Regards
       Naidu

  • Function Module for DATE Conversion

    Hi All,
    I need some help to know a function module to get the exact date in a year.
    If i give the no. of days and the year.. it has to give me the exact date.
    for eg: if no. of days are 90 and the year is 2006 the output should be 31st MARCH 2006. Like that if i enter any number (< 364 or 363) and the year it has to tell me the date of the count of no.of days.
    Thank You,
    Suresh

    Hi Suresh,
    You can use FM HR_SEN_CALE_DAYS_DATE.
    Here you can pass '01.01.2006' , operator as '+' and in
    IS_DURATION enter the number of days under 'CALDD'.
    For eg:
    Test for function group      HRSEN00CRULE_CALE_DAYS                              
    Function module              HR_SEN_CALE_DAYS_DATE                               
    Import parameters                                                                               
    ID_DATE                         01.01.2006  
      ID_OPERATOR                     +             
      IS_DURATION                         0.0000     0.0000       30.0000                                                                               
    Export parameters               Value                                                                               
    ED_DATE                         30.01.2006                                                                               
    Regards,
    Raj

  • Function Module for Date Conversion - 20060131 - January 31, 2006

    I can write some quick code and use the T015M table, but I figure there must be an existing function module.  I want to convert a system date to a character string.  Ideally, I would like it based on a country field.
    20060131 -> January 31, 2006
    20060131 -> 31 January 2006

    Norman
    Strange I've used edit mask LDATE, function CONVERSION_EXIT_LDATE_OUTPUT, and get the full month name.
    Anyway, here is a little program to see the outputs for different countries. It does need updating for edit mask MODAT, and checking the return code after select and function calls:
    REPORT ZZMATTG004 .
    DATA: D8(20),
          WA_MASK LIKE DD01D-CONVEXIT,
          MONTH_NAMES LIKE T247 OCCURS 12 WITH HEADER LINE.
    TABLES: T005.                          "Countries
    PARAMETERS: DATE LIKE SY-DATUM DEFAULT SY-DATLO.
    SELECT-OPTIONS S_LAND FOR T005-LAND1 NO INTERVALS.
    PARAMETERS: P_LANGU AS CHECKBOX DEFAULT 'X'.
    D8  =  DATE.
    DESCRIBE FIELD DATE EDIT MASK WA_MASK.
    WRITE: 'MASK IS :- ''', WA_MASK NO-GAP, '''' NO-GAP.
    SKIP.
    WRITE:
           / DATE DD/MM/YYYY, 22 'DD/MM/YYYY',
           / DATE MM/DD/YYYY, 22 'MM/DD/YYYY',
           / DATE DD/MM/YY  , 22 'DD/MM/YY',
           / DATE MM/DD/YY  , 22 'MM/DD/YY',
           / DATE DDMMYY    , 22 'DDMMYY',
           / DATE MMDDYY    , 22 'MMDDYY',
           / DATE YYMMDD    , 22 'YYMMDD'.
    SKIP.
    WRITE:
           / D8   USING EDIT MASK '==LDATE', 'LDATE',
           / D8   USING EDIT MASK '==SDATE', 'SDATE',
           / D8   USING EDIT MASK '==IDATE', 'IDATE',
           / D8   USING EDIT MASK '==D3DAT', 'D3DAT',
           / D8   USING EDIT MASK '==PDATE', 'PDATE',
           / D8   USING EDIT MASK '==INVD1', 'INVD1',
           / D8   USING EDIT MASK '==INVDT', 'INVDT'.
    LOOP AT S_LAND.
    * BREAK-POINT.
      SET COUNTRY S_LAND-LOW.
      SELECT SINGLE SPRAS INTO T005-SPRAS FROM T005
             WHERE  LAND1  =  S_LAND-LOW.
      IF  P_LANGU  =  'X'.
        SET LANGUAGE T005-SPRAS.
      ENDIF.
      REFRESH MONTH_NAMES.
      CALL FUNCTION 'MONTH_NAMES_GET'
           EXPORTING
                LANGUAGE              = T005-SPRAS
    *      IMPORTING
    *           RETURN_CODE           =
           TABLES
                MONTH_NAMES           = MONTH_NAMES
           EXCEPTIONS
                MONTH_NAMES_NOT_FOUND = 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.
    * READ TABLE MONTH_NAMES INDEX DATE+4(2).
      READ TABLE MONTH_NAMES WITH KEY MNR  =  DATE+4(2).
      SKIP.
      WRITE: / 'COUNTRY SET TO', S_LAND-LOW COLOR 2,
             / 'Month name is', MONTH_NAMES-KTX, MONTH_NAMES-LTX,
               'Language (T005) is', T005-SPRAS, '(SYST)', SY-LANGU.
      WRITE:
             / DATE DD/MM/YYYY, 22 'DD/MM/YYYY',
             / DATE MM/DD/YYYY, 22 'MM/DD/YYYY',
             / DATE DD/MM/YY  , 22 'DD/MM/YY',
             / DATE MM/DD/YY  , 22 'MM/DD/YY',
             / DATE DDMMYY    , 22 'DDMMYY',
             / DATE MMDDYY    , 22 'MMDDYY',
             / DATE YYMMDD    , 22 'YYMMDD'.
      SKIP.
      WRITE:
             / D8   USING EDIT MASK '==LDATE', 'LDATE',
             / D8   USING EDIT MASK '==SDATE', 'SDATE',
             / D8   USING EDIT MASK '==IDATE', 'IDATE',
             / D8   USING EDIT MASK '==D3DAT', 'D3DAT',
             / D8   USING EDIT MASK '==PDATE', 'PDATE',
             / D8   USING EDIT MASK '==INVD1', 'INVD1',
             / D8   USING EDIT MASK '==INVDT', 'INVDT'.
    ENDLOOP.
    SET COUNTRY SPACE.
    * SET LANGUAGE T005-SPRAS.
      REFRESH MONTH_NAMES.
      CALL FUNCTION 'MONTH_NAMES_GET'
           EXPORTING
                LANGUAGE              = SY-LANGU
    *      IMPORTING
    *           RETURN_CODE           =
           TABLES
                MONTH_NAMES           = MONTH_NAMES
           EXCEPTIONS
                MONTH_NAMES_NOT_FOUND = 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.
    * READ TABLE MONTH_NAMES INDEX DATE+4(2).
      READ TABLE MONTH_NAMES WITH KEY MNR  =  DATE+4(2).
      SKIP.
      WRITE: / 'COUNTRY SET TO', 'SPACE'    COLOR 2,
             / 'Month name is', MONTH_NAMES-KTX, MONTH_NAMES-LTX.
      WRITE:
             / DATE DD/MM/YYYY, 22 'DD/MM/YYYY',
             / DATE MM/DD/YYYY, 22 'MM/DD/YYYY',
             / DATE DD/MM/YY  , 22 'DD/MM/YY',
             / DATE MM/DD/YY  , 22 'MM/DD/YY',
             / DATE DDMMYY    , 22 'DDMMYY',
             / DATE MMDDYY    , 22 'MMDDYY',
             / DATE YYMMDD    , 22 'YYMMDD'.
      SKIP.
      WRITE:
             / D8   USING EDIT MASK '==LDATE', 'LDATE',
             / D8   USING EDIT MASK '==SDATE', 'SDATE',
             / D8   USING EDIT MASK '==IDATE', 'IDATE',
             / D8   USING EDIT MASK '==D3DAT', 'D3DAT',
             / D8   USING EDIT MASK '==PDATE', 'PDATE',
             / D8   USING EDIT MASK '==INVD1', 'INVD1',
             / D8   USING EDIT MASK '==INVDT', 'INVDT'.
    MattG.

  • Function Modules for Benefits Upload

    Hi,
        I am working on ECC 6.0 with HR 6.00
        My requirement is to Create/Maintain
    1) Benefits Savings Plan information (IT0169)
    2) Family members/Dependents for this savings plan (IT0021)
       Please let me know if there are any HR-BAPI function modules or HR function modules to achieve this.
       Also can you please send me detailed information on the parameters for these function modules.
    Thanks and Regards,
    Aditya

    Hi Kum,
               I just checked HR_BEN_CREATE_SAVINGS_PLAN. This will definitely create a savings plan.
               I need a function module to edit the savings plan also (preferably standard function module). Do let me know if one exists
    Thanks and Regards,
    Aditya

  • Function module for date format

    Hi,
    what is the function module name to get the date format in <b>(dd.mm.yyyy)</b> from (<b>dd-mon-yyyy)</b>
    Thanx.

    try this Fm
    CONVERSION_EXIT_SDATE_INPUT
    input as dd-mon-yyyy
                28FEB2007
    im assuming mon in literal format.
    output is 20070228
    WRITE STATEMENT WILL DISPLAY THE DATA IN DEFALUT DATE FORMATS OF SU3 .
    <b>Elaborate teh query with an example .</b>
    check this
    regards,
    vijay.

  • Need function modules for date manupulation

    HI,
    Could you please suggest the function module the below reqiurments
    1) adding days to date.
    ex: 20 days to 25.03.2008 = 15.04.2008
    2) To find the given date is working date or not according to factory calender id.
    3) To find the previous or last working date to the given date(Holiday date) according to the factory calender id.
    It is very urgent requirment. please help me.
    Thanks in advance
    sathish kumar swamy

    hi use this...
    RE_ADD_MONTH_TO_DATE
    DATE_CONVERT_TO_FACTORYDATE
    CALL FUNCTION 'OIL_LAST_DAY_OF_PREVIOUS_MONTH'
         EXPORTING
              I_DATE_OLD = date1
        IMPORTING
             E_DATE_NEW = date1
    data date2 like sy-datum.
    date2 = date1 + 1.
    write date2.
    If you put 27.12.2005 as the input date,   date2 you will get as 01.12.2005.
    Or else you can use the following code:
    v_startdate = sy-datum.
    v_startdate+6(2) = '01'.
    v_enddate = v_startdate.
    if v_enddate+4(2) >= '01' AND v_enddate >= '11'.
       v_endate4(2) = v_enddate4(2) + 1.
    elseif v_enddate = '12'.
      v_enddate+4(2) = '01'.
      v_enddate(4) = v_enddate(4) + 1.
    endif.
    v_enddate = v_enddate - 1.
    regards,
    venkat.

Maybe you are looking for

  • Created by : Vendor Report

    Dear Experts , Is there a standard SAP report that shows which user has created a vendor ?? The details are there in table LFA1 . But i need a standard SAP Report . Regards Anis

  • Imported MPEG video playback problems

    Hi, I have a client whose camera produces MPG video files. When she imports them into Presenter, the resulting video plays back way too fast, with no audio. If she plays the original MPG video on the desktop media player, it plays fine. Anyone with e

  • Which macbook is the right one for me

    I want to buy a macbook pro but I'm not sure which one is for me I want it for itunes watching movies (don't need a cd drive) for photos so I need it to be crystal clear and can handle like about 10 games like minecraft and gta san andreas plus inter

  • No WiFi when in Bootcamp with Windows 7

    I have a MBP running Yosemite with Bootcamp running Windows 7 installed. My problem is that no matter how many wifi drivers I try in Windows I cannot get the wireless card to pull up any networks. It works fine in OS X - sees all networks and connect

  • Difference in tcode VL10*

    HI, what is the difference in theses tcodes VL10A/B/C/D/E/F/G/H/I