Uploading Data Into CRM Using a Batch Job

Hi,
How can I automate the procedure of uploading data from a flat text file (product data) into CRM using the function module GUI_UPLOAD?
Thanks,
Rachita.

Hi,
GUI_UPLOAD, like the name says, uses the SAPGUI to upload the data to the server, and in a batch job, you don't have the connection to a SAPGUI. So you should use following kind of coding:
DATA MSG(100).
OPEN DATASET "FILENAM" FOR INPUT IN TEXT MODE ENCODING DEFAULT MESSAGE
MSG.
IF sy-subrc = 0.
DO.
READ DATASET "FILENAM" INTO [Your internal table].
IF sy-subrc <> 0.
EXIT.
ENDIF.
APPEND [Your internal table]P_DATA.
ENDDO.
ENDIF.
Reward points if found helpfull...
Cheers,
Siva.

Similar Messages

  • How to upload data into CRM using batch job

    Hello,
    I got some problem and need some hints.
    I am uploading data from a flat text file (product data) into CRM using thefunction module GUI_UPLOAD. My program starts with a selection screen whereI enter the path and the filename of the program, then I click start, and
    the data is transferred in CRM. This works perfect, and I can automaticallycreate service products in CRM.
    Here comes the PROB:
    But now I want to automize this procedure using a batch job that automatically picks up the file from the server and processes it automatically without any user interaction. BUT I always get an error saying that my function module GUI_UPLOAD can't run in batch mode. So
    anyone has an idea how to do this? Any other function modules that can run in batch mode? Any other ideas?
    Thx very much for ur help on this.

    Hi Bill,
    GUI_UPLOAD, like the name says, uses the SAPGUI to upload the data to theserver.. and in a batch job, you don't have the connection to a SAPGUI.
    So you should use following kind of coding:
    DATA MSG(100).
    OPEN DATASET "FILENAM" FOR INPUT IN TEXT MODE ENCODING DEFAULT MESSAGE
    MSG.
    IF sy-subrc = 0.
    DO.
    READ DATASET "FILENAM" INTO [Your internal table].
    IF sy-subrc <> 0.
    EXIT.
    ENDIF.
    APPEND [Your internal table]P_DATA.
    ENDDO.
    ENDIF.
    The file should then be available on the server.
    Regards

  • How to upload data into IT0000 using ABAP-HR program

    Hello,
    I'm required to upload data into multiple infotypes [IT000, 0001, 0002, etc] using single input text file. Can anyone able to guide me, how to upload data into IT0000 using ABAP program ?
    Thanks in advance.
    Regards
    Prabhakar.
    Message was edited by:
            Prabhakara Muthyal

    Example code for HR_MAINTAIN_MASTERDATA to COPY IT0002
    DATA: INT_0002_FINAL TYPE STANDARD TABLE OF PA0002 WITH HEADER LINE.
    DATA: VALUES        LIKE PPROP OCCURS 10 WITH HEADER LINE,
    RETURN        LIKE BAPIRETURN1,.
    LOOP AT INT_0002_FINAL.
          VALUES-INFTY = '0002'.
          VALUES-FNAME = 'P0002-PERNR'.
          VALUES-FVAL  = INT_0002_FINAL-PERNR.
          APPEND VALUES.
          VALUES-INFTY = '0002'.
          VALUES-FNAME = 'P0002-BEGDA'.
          VALUES-FVAL  = INT_0002_FINAL-BEGDA.
          APPEND VALUES.
          VALUES-INFTY = '0002'.
          VALUES-FNAME = 'P0002-ENDDA'.
          VALUES-FVAL  = INT_0002_FINAL-ENDDA.
          APPEND VALUES.
          VALUES-INFTY = '0002'.
          VALUES-FNAME = 'P0002-nachn'.
          VALUES-FVAL  = INT_0002_FINAL-NACHN.
          APPEND VALUES.
          VALUES-INFTY = '0002'.
          VALUES-FNAME = 'P0002-gblnd'.
          VALUES-FVAL  = INT_0002_FINAL-GBLND.
          APPEND VALUES.
          VALUES-INFTY = '0002'.
          VALUES-FNAME = 'P0002-vorna'.
          VALUES-FVAL  = INT_0002_FINAL-VORNA.
          APPEND VALUES.
          VALUES-INFTY = '0002'.
          VALUES-FNAME = 'P0002-rufnm'.
          VALUES-FVAL  = INT_0002_FINAL-RUFNM.
          APPEND VALUES.
          VALUES-INFTY = '0002'.
          VALUES-FNAME = 'P0002-name2'.
          VALUES-FVAL  = INT_0002_FINAL-NAME2.
          APPEND VALUES.
          VALUES-INFTY = '0002'.
          VALUES-FNAME = 'P0002-inits'.
          VALUES-FVAL  = INT_0002_FINAL-INITS.
          APPEND VALUES.
          VALUES-INFTY = '0002'.
          VALUES-FNAME = 'P0002-famst'.
          VALUES-FVAL  = INT_0002_FINAL-FAMST.
          APPEND VALUES.
          VALUES-INFTY = '0002'.
          VALUES-FNAME = 'P0002-gbdat'.
          VALUES-FVAL  = INT_0002_FINAL-GBDAT.
          APPEND VALUES.
          VALUES-INFTY = '0002'.
          VALUES-FNAME = 'P0002-sprsl'.
          VALUES-FVAL  = INT_0002_FINAL-SPRSL.
          APPEND VALUES.
          VALUES-INFTY = '0002'.
          VALUES-FNAME = 'P0002-anzkd'.
          VALUES-FVAL  = INT_0002_FINAL-ANZKD.
          APPEND VALUES.
          VALUES-INFTY = '0002'.
          VALUES-FNAME = 'P0002-natio'.
          VALUES-FVAL  = INT_0002_FINAL-NATIO.
          APPEND VALUES.
    * maintain master data
          CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'
            EXPORTING
              PERNR           = INT_0002_FINAL-PERNR
              ACTIO           = 'COP'
              BEGDA           = INT_0002_FINAL-BEGDA
    *         ENDDA           = INT_0002_FINAL-ENDDA
              SUBTY           = SPACE
              NO_ENQUEUE      = SPACE
              DIALOG_MODE        = '0'
              TCLAS              = 'A'
            IMPORTING
              RETURN1         = RETURN
            TABLES
              PROPOSED_VALUES = VALUES
    *         MODIFIED_KEYS   =
            EXCEPTIONS
              OTHERS          = 1.
          IF RETURN IS INITIAL.
            WRITE:/' Done....'.
          ELSE.
            WRITE:/   RETURN-ID, RETURN-TYPE, RETURN-NUMBER, RETURN-MESSAGE_V1, RETURN-MESSAGE_V2, RETURN-MESSAGE_V3, RETURN-MESSAGE_V4.
          ENDIF.
          CLEAR VALUES.
          REFRESH VALUES.
        ENDLOOP.

  • How to receive and upload data into Sharepoint using webservice in BizTalk (without using sharepoint adapter).

    Hi,
    I have a requirement to receive files from sharepoint and upload files to share point.
    So is there anyway we can achive this using webservices in BizTalk (without using sharepoint adapter)
    Thanks in advace

    I do not have a sample flow... but if you refer to the samples where these web services are used then you'd be able to translate those code samples into BizTalk flows.. For e.g.:
    http://msdn.microsoft.com/en-us/library/office/ms429658(v=office.14).aspx refers to returning list items. When you add generated items to your BizTalk for SharePoint Web Services, you'd get the schemas (xmlDocs in the sample) which you'd instantiate and
    call.
    When dealing with lists, you will need the GUID of the list so you need to do a GetLists call first and then get the GUID for your specific list from that. You will also encounter CAML which is what is used to query and get List Data.
    Have fun.
    Regards.

  • Best method for initial upload data into CRM

    Hey guys,
    could someone tell me what is the best and fastest method to upload a mass of data (11 mio. BPs) to CRM? Now i am not sure. I thought you have to do that through the CRM middleware. Now i read you can do this also via IDOC. Which method should i use to do this? What about LSMW?
        regards,
           Ming

    Hello Ming,
    Could you tell us where is the Mass Data of BP located?
    Are you trying to upload the data from R/3 to CRM? or from legacy systems?
    If its from legacy or non-R/3 systems then LSMW is the best approach.
    But if its from R/3 to CRM, then better approach would be via MW since once initial load is performed using txn:R3AS,
    subsequent delta changes would flow down automatically to CRM.
    Hope this helps!
    Best Regards,
    Shanthala Kudva.

  • How to upload data into form of Oracle EBS R12 using ATS ver 9.0

    Hi experts,
    Could you please guide me how to upload data into form on Oracle EBS R12 using Oracle Application Testing Suite verson 9.(The simpliest way)
    For example: I need to create user account on Oracle EBS. Normally, I use Dataloader to upload the data, however it just can upload one by one record, cannot upload multi record at same time. Moreover if the performance of server is low, so I will get the issue when using dataloader.
    Thanks in advance
    Best Regards
    Hieu

    Hi you can create Virtual users to enter data. Note than you have to name the objects accordingly.
    For Example default recording provided by Open script is ObjectNAME_(Index No of the object).
    when you record one iteration the name of any object would be ObjectNAME_(0)
    You can then create virtual users so the index will increment as the total number of Virtual users increases. Also you have to handle which row of your test data would get mapped to which Virtual user in the script run session.
    Thanks

  • How to upload data into Classification-MM02 for each MATNR By using BAPI

    Hi all
          How to upload data into characterstic value in  classification- MM02 for each MATNR by using BAPI.

    Hi Siva,
    Please try BAPI BAPI_OBJCL_CHANGE.
    The object key should be material number and object table should be MARA.
    Regards
    Hiren K.Chitalia

  • While uploading data into the r/3 using call transaction or session method

    hi experts
    while uploading data into the r/3 using call transaction or session method error occured in the middle of the processing then how these methods behaves it transfers next records or not?

    hai
    Session method: The records are not added to the database until the session is processed. sy-subrc is not returned. Error logs are created for error records. Updation in database table is always Synchronous.
    Call Transaction method: The records are immediately added to the database table. sy-subrc is returned to 0 if successful. Error logs are not created and hence the errors need to be handled explicitly. Updation in database table is either Synchronous or Asynchronous.
    While to transfer the data from the through if any errors occurs until the errors are the complete the data is not transfer to the SAP system.
    the system compulsory shows the errors. that errors are stored into the error logs (Transaction is SM35).
    so the session method should not return any value.
    In call transaction method data is directly pass to the SAP system.
    So its compulsory return the value.
    Because of the call transaction is the function.
    A function should return the value mandatory
    In session method errors stroed in SYSTEM GENRATED ERROR LOG.
    IN CALL TRANSACTION TO CAPTURE THE ERRORS WE SHOULD PERFORM THE FOLLOWING.
    FIRST ME MUST DECLARE AN INTERNAL TABLE WITH THE STRUCTURE OF BDCMSGCOLL TABLE.
    THEN WHILE WRITING THE CALL TRANSACTION STATEMENT WE SHOULD PUT THE 'E' MODE FOR CAPTURING ALL THE ERRORS.
    THEN FINALLY THE CAPTURED ERRORS MUST TO SENT TO THE INTERNAL TABLE WHICH WE DECLARED IN THE BEGINNING WITH BDCMSGCOLL BY USING THE FUNCTION MODULE "FORMAT_MESSAGE"
    AND THUS THE ERROR MESSAGES WILL BE SENT TO THE INTERNAL TABLE WHICH WE DECLARED AT THE BEGINNING.

  • Uploading data into a fixed length file

    hello experts,
    I got  a task to upload data into a fixed length positional file from internal table.So  please help me.
    regards,
    sriram.

    Hi there.  What you basically need to do is set up the path and name for the export file, move your records to an output table, and then transfer the data to the file that you have specified.  We usually set up our export programs so that the user can choose to download the file locally or onto the application server.  So first we define the following fields on the selection screen:
    PARAMETERS: p_file(128) LOWER CASE OBLIGATORY. "File
    *path name from system standard
    PARAMETERS: p_path LIKE rlgrap-filename MODIF ID fpn.  "Path Name
    PARAMETERS: p_local AS CHECKBOX.  "Local File Flag
    Then we use this to set the path to the application server:
    INITIALIZATION.
      CALL FUNCTION 'FILE_GET_NAME'
        EXPORTING
          logical_filename = 'Z_AO_HR_UP_LOAD'
          parameter_1      = space
        IMPORTING
          emergency_flag   = lw_emergency_flag
          file_name        = p_path
        EXCEPTIONS
          file_not_found   = 1
          OTHERS           = 2.
    AT SELECTION-SCREEN OUTPUT.
    make path name display only
      LOOP AT SCREEN.
        CHECK screen-group1 = 'FPN'.
        screen-input = 0.                  "Output (Display) only
        MODIFY SCREEN.
      ENDLOOP.
    After your START-OF-SELECTION statement, you need to open the file for output:
      IF p_local NE ztc_on.
    Get Path/file Name using logical filename.
          CALL FUNCTION 'FILE_GET_NAME'
        EXPORTING
          logical_filename = 'Z_AO_HR_UP_LOAD'
          parameter_1      = p_file
        IMPORTING
          emergency_flag   = lw_emergency_flag
          file_name        = p_path
        EXCEPTIONS
          file_not_found   = 1
          OTHERS           = 2.
        IF sy-subrc <> 0.
          w_message = 'No Output file - Missing Logical File Z_AO_HR_UP_LOAD'.
          WRITE: / w_message.
          IF sy-batch = 'X'.               "Is this in a job?
            NEW-PAGE.
            PERFORM end_of_selection.
            MESSAGE e000(38) WITH w_message. "This causes the job to cancel
          ELSE.
            MESSAGE i000(38) WITH w_message.
          ENDIF.
          w_stop = 'X'.
          STOP.
        ENDIF.
    *Check if output file is already present.
        OPEN DATASET p_path FOR INPUT IN TEXT MODE.
        IF sy-subrc EQ 0.
          CLOSE DATASET p_path.
          WRITE: 'Output Data file already present ', p_path.
    *Use the following for logging error message
          CONCATENATE 'Ouput Data file already present ' p_path INTO
                       w_message.
          IF sy-batch = ztc_on.            "Is this in a job?
            NEW-PAGE.
            PERFORM end_of_selection.
            MESSAGE e000(38) WITH w_message. "This causes the job to cancel
          ELSE.
            MESSAGE i000(38) WITH w_message.
          ENDIF.
          w_stop = 'X'.
          STOP.
        ENDIF.
        OPEN DATASET p_path FOR OUTPUT IN TEXT MODE.
        IF sy-subrc <> 0.
          WRITE: 'Unable to open output dataset - ', p_path.
    *Use the following for logging error message
          CONCATENATE 'Unable to open output dataset - ' p_path INTO
                       w_message.
          IF sy-batch = ztc_on.            "Is this in a job?
            NEW-PAGE.
            PERFORM end_of_selection.
            MESSAGE e000(38) WITH w_message. "This causes the job to cancel
          ELSE.
            MESSAGE i000(38) WITH w_message.
          ENDIF.
          w_stop = 'X'.
          STOP.
        ENDIF.
      ENDIF.
    Next you perform all of the steps to put your data in the internal table. After the end of selection we then transfer the data from the original internal table (which has many separate fields defined) to a second internal table, t_outfile, in which each record has a single field that is the total length of the original itab record:
    *Internal table for Output data
    DATA : BEGIN OF t_outfile OCCURS 0,
             text(1000).
    DATA : END OF t_outfile.
    Then you can download your file, checking whether it goes to a local drive or the application server:
      IF p_local EQ ztc_on.
          CALL FUNCTION 'WS_DOWNLOAD'
        EXPORTING
          filename                = p_file
        TABLES
          data_tab                = t_outfile
        EXCEPTIONS
          file_open_error         = 1
          file_write_error        = 2
          invalid_filesize        = 3
          invalid_table_width     = 4
          invalid_type            = 5
          no_batch                = 6
          unknown_error           = 7
          gui_refuse_filetransfer = 8
          OTHERS                  = 9.
      ELSE.
        LOOP AT t_outfile.
          TRANSFER t_outfile TO p_path.
        ENDLOOP.
      ENDIF.
    Now close your dataset if it is on the application server:
    IF p_local NE ztc_on.
          CLOSE DATASET p_path.
        ENDIF.
    I hope this helps!
    - April King

  • Upload data into SAP through standard program

    hi!
    why don't we prefer to upload data into sap through standard program like RFBIKR00 to upload for vendor master or other standard programs to upload durectly without using BDC or LSMW and how do we upload data into SAP through BAPI.
    pls help me with a sample program.
    regards
    Amit

    It totally depends upon the requierment which fields your want to update in transaction if it works with program then use program else go for bdc .
    If there is some any screen enhancement with z fields then program will not solve the problem.
    For BAPI you check these links:
    http://www.sap-img.com/abap/bapi-step-by-step-guidance.htm
    http://sap-img.com/bapi.htm
    Edited by: shilpi agarwal on Aug 22, 2008 7:28 AM

  • Problems with special characters uploading data into oracle database

    Greetings
    I have a problem uploading data into oracle tables from sybase datasource. The data that I want to upload is in Spanish, for example when I have a varchar field with the data 'Consultoría', in oracle table the data upload with interrogation symbols.
    I have my source and target datastores configured as follows.
    Any suggestion? Thank you for your time

    Chack section 10 Locales and Multi-byte Functionality in the SAP Data Services Reference Guide for an exhaustive description of NLS settings.
    As a summary, following settings are required:
    locales in the datastore definitions match the actual locale used in the associated databases
    the locale of the DS engine allows for source to target translation
    the character set in the target database supports storage of accented characters

  • Ways to Upload data into Cube,

    1. What are the methods to upload data into cube, apart from flat file mode.(.csv)
    2. I  have some data in the Planning book in a  KF eg. Sales Order. , i need to upload this sales order data to another cube, say forecast cube. how can i do it???
    how to upload the data from Planning book to another cube.
    Thanks!.

    Please follow the steps:
    1.      If necessary, replicate the DataSource. To do so, you can use the following options in the Data Warehousing Workbench:
    ○     Select the source system in the source system overview and choose Replicate DataSources in the context menu. This replicates all data sources in the source system.
    ○     Select the data source in the DataSource overview and choose Replicate Metadata in the context menu. This replicates just the one DataSource.
      2.      Create an InfoSource and assign the data source to it. To do so, choose your application component on the InfoSource page of the Data Warehousing Workbench. In the context menu, choose Create InfoSource. On the next dialog box, select Transactional Data. Another dialog box appears. Enter a name and description for the new InfoSource and choose Enter. In the tree, select the new InfoSource. In the context menu, choose Assign DataSource. On the dialog box that appears, enter the source system. A list of DataSources appears. Select the required DataSource. Choose Enter.
    Alternatively you can remain in the DataSource overview. A  icon indicates that no InfoSource has been assigned yet. Either click the icon or choose Assign InfoSource in the context menu. On the dialog box that appears, enter a name for the InfoSource. Choose . On the next dialog box, enter a description and choose . Confirm the following dialog box. You can now maintain the InfoSource.
    You can assign a DataSource to one InfoSource only.
    3.      Create a DataStore object in the InfoProvider overview of the Data Warehousing Workbench.
    a.      Select the InfoArea and then choose Create DataStore Object in the context menu. The Edit DataStore Object dialog box appears.
      b.      Enter a name and a short description. If required, you can also specify a DataStore object to use as a template. Choose . The Edit DataStore Object dialog box appears.
       c.      On the left-hand side of the screen, you can select InfoObjects, for example, InfoCubes or InfoObjectCatalogs. You can copy characteristics or key figures from these InfoObjects to the DataStore object. We suggest that you select either the InfoCube to which you want to copy the data, or the InfoSource.
         d.      Copy the characteristics to the key fields in the right-hand tree in the DataStore object and copy the key figures to the data fields. In both cases, use drag and drop. You might have to transfer the 0RECORDMODE InfoObject from the Business Content.
         e.      In the Settings branch of the DataStore tree, set the following indicators:
    ■      Set quality status to 'OK' automatically
    ■      Activate DataStore object data automatically
    ■      Update data targets from DataStore object automatically
      f.      Activate the DataStore object.
    For more information, see DataStore Object.
           4.      Create update rules for the DataStore object.
    .a.      Select the DataStore object in the data targets page (Data Warehousing Workbench).
    b.      Choose Create update rules from the context menu. The Create Update Rules screen appears.
    c.      Enter the InfoSource that you created in step 2. Choose . Edit the update rules as necessary.
    d.      Activate the update rules by choosing .
           5.      Create update rules for the InfoCube as above, but with the DataStore object as the data source.
           6.      Create an InfoPackage for the InfoSource. In contrast to the normal procedure, on the Processing tab page, set the Only PSA and Update subsequently in data targetsindicators. Start or schedule the data load

  • Uploading data into 0CRM_CO1 cube

    Hi all,
    i'm trying to upload data into the above said CRM cube... its a content cube .. but when i'm trying to see what is the datasource in the content i dont see any datasource.
    The question is ... do i need to create a generic datasource or there is some other way. Can anyone, let me know the steps too that should be followed to get the data from R/3 to BW into this cube?
    Thanks in advance,
    Mav

    Hi Sajita,
    Thanks for the reply. I have checked it in the metedata repository, i doesnt show any datasources .. infact it shows all the multiproviders connected to the cube.... Any clue ....(Look at it in metadata repository, u'll know what i'm talking abt).
    Thanks,
    Mav

  • Uploading data into Time Infotypes

    Dear All,
    I have a requirement wherein I need to upload data into time infotypes from an external source(file). The data is required to be uploaded into the relevant infotypes based on the content(attendance, absence etc.)
    Can you please suggest a generic way of uploading data into time infotypes.
    Thanks in advance,
    Sujit.

    Hi Sujit
    You can either create a BDC report to upload the data or use FM HR_INFOTYPE_OPERATION to upload the infotype in your report

  • Tcode to upload data into CATSDB table

    Hi All,
      Could anyone let me know what is the TCODE that we will record and upload data into CATSDB table in HR ABAP.
    Regards,
    Srinivas.

    Hi,
    I also need the same information...i.e i want to record overtime of Employees...Where to do this?
    I tried creating it in PA61. I am able to create it with attendance type. But its triggering the CREATED method of ATTENDANCE Bus. Object. But i have been asked to use CREATED method CATS Bus. Object.
      Can anyone help me in this??? Also tell me how make entries in CAT2 ....
    Thanks,
    Sivagami.R

Maybe you are looking for

  • Sequence header at the end of the sequence in the report

    Good afternoon everyone, I have a strange issue with my TestStand Report (any kind of report type) : some time ago the headers (with the name, the parameter's values, the module time, the status) of the sequence and sub-sequence were at the begining.

  • Can no longer listen to low-quality WAV files

    I have used iTunes to organize and listen to voice files recorded on portable digital recorders and cameras, but today discovered that they no longer work. Furthermore I can no longer import these files, with no error message. Should I look to replac

  • Related To FI , Anybody explain

    Hi, Anybody expalin : Accounts Receivable: Payment History (technical name 0FIAR_C05) Accounts Receivable: Transaction Data (technical name 0FIAR_C02) Accounts Receivable: Line Items (technical name 0FIAR_C03) On what scenarion these dataprovider com

  • JDBC/SQLJ Team - Please respond - invalid column type error

    Hi, I have posted several messages regarding problems using SQL/J to call out a stored packaged function that returns a ref cursor, but haven't gotten one response. I have yet a new problem with it. JDBC team, please acknowledge! I change the way I o

  • Submit button missing 7905

    Hello,      After resetting factory settings on a cisco ip phone 7905, the submitt button is missing on the web interface. Any ideas on how to get it back? Thanks