ARFC - Write data to SAP

Hi,
I using aRFC to write to SAP R/3. When i execute the writing request i do not get any feedback in return. Neither can i see that SAP-database is updated.
Therefore I would like track some error messages indication what went wrong.
How can I obtain more information about what went wrong etc.
(Netweaver 04)
Regards
Jerry

1) If there was any error while executing the RFC you will get the exception that you would have handled in the WebDynpro. If you are not getting any errors it should mean that the execution was fine. This opens up an option that the input was not mandatory and that the way you set your input are not correct.
2) Check the way you are setting the inputs for the RFC.
3) If the RFC is a custom RFC then you could confirm whether that the sy-subrc is 0 after the database insert.
Please revert back for further clarifications.
Regards,
Noufal

Similar Messages

  • RFC to write data to SAP

    Hi,
    Is there an RFC available that takes in data and write it back to SAP tables?
    Could LSMW be somehow used in an RFC?
    Regards,
    Mark

    Well I have a graphical application which shows the Org Structure. Here the users can move a position from department to another.
    So basically I am trying to send back the position (S) and the organization (O).
    Thanks,
    Mark

  • How to rewrite data in SAP from a Widget

    Hi Experts,
    I would like to create a widget that able to send data in SAP : for exemple you call purchase requisition for release and when you have the list you can approve the purchase.
    So there is a specific template in the SAP development tool or specific development to do?
    Thank for your help,
    Regards
    Benjamin

    Hi Jaideep,
    Thank you for answer. I know that the Sap development tool it's for create and modify widget but I'd like to know if there is someone who already create a widget who write data on SAP system? If it's possible to approve purchase order by clicking on a widget?
    Regards

  • I  want to write data in 10th line or 20th line in sap scripts

    i  want to write data in 10th line or 20th line in sap scripts,how can write it

    Give 10 line feeds in your Paragraph Formats
    then write your Data there &DATA1&
    again give 10 line feeds and write your data2 there
    Reward Points if helpful .
    Regards,
    Ismail

  • How to get purchasing data from SAP R/3 to OWB (Oracle warehouse builder).

    Hi,
    My name is Pavan Tata. I work as a SAP BW developer. Here is the situation at my client place. Client decided to retire BW system and wants to replace with OWB(Oracle warehouse). In all this currently we have purhchasing application in BW production system and wants to move this application to OWB for the same type of reporting what they are getting currently.
    Here is my question:
    How to get purchasing data from SAP R/3 to OWB(Warehouse) with initial full loads and deltas mechanism in the same way as we do in BW.
    Please help on this, also send me any documentation about this if you have.
    Thanks,
    Pavan.

    Hello,
    here is a short report which converts S012 entries to strings with separator semicolon. Perhaps this will help you?
    Regards
    Walter Habich
    REPORT habitest2 LINE-SIZE 255.
    TYPES:
      strtab_t TYPE TABLE OF string.
    CONSTANTS:
      separator VALUE ';'.
    DATA:
      it_s012 LIKE s012 OCCURS 0,
      wa_s012 LIKE s012,
      strtab TYPE strtab_t,
      strele TYPE string.
    SELECT * FROM s012 INTO TABLE it_s012 UP TO 100 ROWS.
    PERFORM data_to_string
      TABLES
        strtab
      USING
        'S012'. "requires it_s012 and wa_s012
    LOOP AT strtab INTO strele.
      WRITE: / strele.
    ENDLOOP.
    *&      Form  data_to_string
    FORM data_to_string TABLES strtab TYPE strtab_t
                        USING  ittab TYPE any.
      DATA:
        h_zaehler TYPE i,
        line_str TYPE string,
        l_tabellenname(10) TYPE c,
        l_arbeitsbereichsname(10) TYPE c,
        h_string TYPE string,
        h_char(255) TYPE c.
      FIELD-SYMBOLS: <l_tabelle> TYPE ANY TABLE,
                     <l_arbeits> TYPE ANY,
                     <feldzeiger> TYPE ANY.
      CLEAR strtab.
      CONCATENATE 'IT_' ittab INTO l_tabellenname.
      ASSIGN (l_tabellenname) TO <l_tabelle>.
      CONCATENATE 'WA_' ittab INTO l_arbeitsbereichsname.
      ASSIGN (l_arbeitsbereichsname) TO <l_arbeits>.
      LOOP AT <l_tabelle> INTO <l_arbeits>.
        CLEAR: h_zaehler, line_str.
        line_str = ittab.
        DO.
          ADD 1 TO h_zaehler.
          ASSIGN COMPONENT h_zaehler OF
            STRUCTURE <l_arbeits> TO <feldzeiger>.
          IF sy-subrc <> 0. EXIT. ENDIF.
          WRITE <feldzeiger> TO h_char LEFT-JUSTIFIED.          "#EC *
          h_string = h_char.
          CONCATENATE line_str separator h_string INTO line_str.
        ENDDO.
        APPEND line_str TO strtab.
      ENDLOOP.
    ENDFORM.                    "data_to_string

  • XML data into sap

    Hi guys,
    How to upload a XML file into sap?
    is there any function module?
    can anybody give me an example program for converting or uploading XML data into sap.
    regards,
    vinoth.

    Hi all,
    The XML code and XML file given is running fine for me, but when i am using it, my XML file and code, the tables GV_header and GT_item are filling in the perform but outside perform it's empty.  Please find the code and XML file , PLease give the answer its urgent, points will be given for sure.
    My function module code is:-
    FUNCTION Z_MMI_XML_EXTRACT_COPY.
    ""Local interface:
    *"       IMPORTING
    *"             REFERENCE(DOCTYPE) LIKE  DRAW-DOKAR
    *"             REFERENCE(DOCNUM) LIKE  DRAW-DOKNR
    *"             REFERENCE(DOCVER) LIKE  DRAW-DOKVR
    *"             REFERENCE(DOCPART) LIKE  DRAW-DOKTL
    *"       TABLES
    *"              T_HEADER STRUCTURE  ZFI_HEADER
    *"              T_ITEMS STRUCTURE  ZFI_ITEMS
    Load iXML Lib.
    type-pools: ixml.
    class cl_ixml definition load.
    data: G_IXML type ref to if_ixml.
    data: STREAMFACTORY type ref to if_ixml_stream_factory.
    data: ISTREAM type ref to if_ixml_istream.
    data: DOCUMENT type ref to if_ixml_document.
    data: PARSER type ref to if_ixml_parser.
    You should provide the parameter for file name
    *LV_FILE_URL = 'C:input_xml.xml'.
    types: begin of XML_LINE,
            DATA(256) type x,
          end of XML_LINE.
    ***types: begin of TY_HEADER,
            CUST_NAME(20)     type c,
            CARD_NO(20)       type c,
            TAX_AMOUNT(10)    type c,
            TOTAL_AMOUNT(10)  type c,
          end of TY_HEADER.
    ***types: begin of TY_ITEM,
            ITEM_NO(4)      type n,
            ITEM_ID(20)     type c,
            ITEM_TITLE(50)  type c,
            ITEM_QTY(10)    type c,
            ITEM_UPRICE(10) type c,
          end of TY_ITEM.
    *data: GV_HEADER type TY_HEADER.
    *data: GV_HEADER like zfi_header occurs 0 with header line.
    data : GV_HEADER LIKE ZFI_HEADER.
    *data: GT_ITEM   type standard table of TY_ITEM   with header line.
    *data: GT_ITEM type standard table of zfi_items with header line.
    data: GT_ITEM type standard table of zfi_items with header line.
    data: XML_TABLE      type table of XML_LINE,
          XML_TABLE_SIZE type i.
    data: LV_FILE_URL type rlgrap-filename.
      DATA : BEGIN OF itab OCCURS 0,
      a(100) TYPE c,
      END OF itab.
      DATA: xml_out TYPE string .
      DATA : BEGIN OF upl OCCURS 0,
      f(255) TYPE c,
      END OF upl.
      DATA: xmlupl TYPE string .
      DATA : BEGIN OF wa_draw OCCURS 0,
             dokar LIKE draw-dokar,
             doknr LIKE draw-doknr,
             dokvr LIKE draw-dokvr,
             doktl LIKE draw-doktl,
             END OF wa_draw.
      DATA : g_documenttype LIKE bapi_doc_aux-doctype,
             g_documentnumber LIKE bapi_doc_aux-docnumber,
             g_documentpart LIKE bapi_doc_aux-docpart,
             g_documentversion LIKE bapi_doc_aux-docversion.
    *" Itab required in IMPORTING parameter of BAPI
      DATA : t_documentfile LIKE bapi_doc_files2 OCCURS 0 WITH HEADER LINE.
    DATA : t_documentstructure LIKE bapi_doc_structure OCCURS 0 WITH HEADER
    LINE,
    itab required in TABLES parameters of BAPI
           t_documentfiles LIKE bapi_doc_files2 OCCURS 0 WITH HEADER LINE,
           t_components LIKE bapi_doc_comp OCCURS 0 WITH HEADER LINE,
           t_return LIKE bapiret2.
      DATA : l_docfile TYPE string.
    ***FILL THE TYPE OF ATTACHMENT in IMPORTING itab**
      t_documentfile-wsapplication = 'XML'.
      APPEND t_documentfile.
      wa_draw-dokar = DOCTYPE.
      wa_draw-doknr = DOCNUM.
      wa_draw-doktl = DOCPART.
      wa_draw-dokvr = DOCVER.
      CALL FUNCTION 'BAPI_DOCUMENT_CHECKOUTVIEW2'
        EXPORTING
          documenttype              = wa_draw-dokar
          documentnumber            = wa_draw-doknr
          documentpart              = wa_draw-doktl
          documentversion           = wa_draw-dokvr
          documentfile              = t_documentfile "IMPORTING itab of BAPI
         getstructure              = '1'
         getcomponents             = 'X'
      ORIGINALPATH              = ' '
      HOSTNAME                  = ' '
         getheader                 = 'X'
      DOCBOMCHANGENUMBER        =
      DOCBOMVALIDFROM           =
      DOCBOMREVISIONLEVEL       =
       IMPORTING
         return                    = t_return
       TABLES
         documentstructure         = t_documentstructure
         documentfiles             = t_documentfiles "TABLES itab of BAPI
         components                = t_components
      LOOP AT t_documentfiles .
      ENDLOOP.
      l_docfile = t_documentfiles-docfile.
    The next step is creating the main factory for the iXML library:
    G_IXML = cl_ixml=>create( ).
    Now Create Stream Factory
    STREAMFACTORY = G_IXML->create_stream_factory( ).
      CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
    *filename = 'C:DMS_SPA.XML'
      filename = l_docfile
      filetype = 'BIN'
      IMPORTING
       FILELENGTH = XML_TABLE_SIZE
      TABLES
      data_tab = XML_TABLE.
    ISTREAM = STREAMFACTORY->create_istream_itable( table = XML_TABLE
                                                    size  = XML_TABLE_SIZE )
    Create XML Document instance
    DOCUMENT = G_IXML->create_document( ).
    Create parser Object
    PARSER = G_IXML->create_parser( stream_factory = STREAMFACTORY
                                    ISTREAM = istream
                                    DOCUMENT = document ).
    Parse an XML document into a DOM tree
    *parser->parse( ).
    Parsing Error Processing
    if PARSER->parse( ) ne 0.
      if PARSER->num_errors( ) ne 0.
        data: PARSEERROR type ref to if_ixml_parse_error,
              STR        type STRING,
              I          type i,
              COUNT      type I,
              INDEX      type i.
        COUNT = PARSER->num_errors( ).
        write: COUNT, ' parse errors have occured:'.
        INDEX = 0.
        while INDEX < COUNT.
          PARSEERROR = PARSER->get_error( INDEX = index ).
          I = PARSEERROR->get_line( ).
          write: 'line: ', i.
          I = PARSEERROR->get_column( ).
          write: 'column: ', i.
          STR = PARSEERROR->get_reason( ).
          write: STR.
          INDEX = index + 1.
        endwhile.
      endif.
    endif.
    Close the stream since it �s not needed anymore
    call method ISTREAM->close( ).
    clear ISTREAM.
    DATA : GV_NODE type ref to if_ixml_node.
    DATA : GV_NODETEXT type STRING.
    data:  GV_FIRST_TIME.
    GV_FIRST_TIME = 'X'.
    GV_NODE = DOCUMENT.
    *GT_ITEM-item_no = 1.
    GT_ITEM-itemno_acc = 1.
    perform GET_DATA tables     GT_ITEM
                     using      GV_NODE
                     changing   GV_HEADER.
    Last item is still not added.
      append GT_ITEM.
    APPEND GV_HEADER.
    *T_HEADER[] = gv_header[].
    t_items[] = gt_item[].
    **write  : GV_HEADER-cust_name,
            GV_HEADER-card_no,
            GV_HEADER-tax_amount,
            GV_HEADER-total_amount.
    **loop at GT_ITEM.
    write  /:.
    write  : GT_ITEM-item_no,
              GT_ITEM-item_id,
              GT_ITEM-item_title,
              GT_ITEM-item_qty,
              GT_ITEM-item_uprice.
    **endloop.
    ENDFUNCTION.
          FORM Get_data                                                 *
    ***form get_data tables   YT_ITEM    structure gt_ITEM
                 using value(x_node) type ref to if_ixml_node
                 changing Y_HEADER   type TY_HEADER.
    form get_data1 tables   YT_ITEM    structure zfi_items
                  using value(x_node) type ref to if_ixml_node
                  changing Y_HEADER   type zfi_header.
    ***form get_data tables   YT_ITEM    structure GT_ITEM
                 using value(x_node) type ref to if_ixml_node
                 changing Y_HEADER   type TY_HEADER.
      data: INDENT      type i.
      data: PTEXT       type ref to if_ixml_text.
      data: STRING      type string.
      data: TEMP_STRING(100).
      case X_NODE->get_type( ).
        when if_ixml_node=>co_node_element.
          STRING = X_NODE->get_name( ).
          GV_NODETEXT = STRING.
        when if_ixml_node=>co_node_text.
          PTEXT ?= X_NODE->query_interface( IXML_IID_TEXT ).
          if PTEXT->ws_only( ) is initial.
            STRING = X_NODE->get_value( ).
            case GV_NODETEXT.
             when 'Customer'.
                when 'HEADER'.
                clear GV_HEADER.
             when 'Name'.
               when 'INVOICE_IND'.
               move STRING to GV_HEADER-cust_name.
                move STRING to GV_HEADER-INVOICE_IND.
              when 'CompanyCode'.
                move STRING to GV_HEADER-CompanyCode.
              when 'OBJ_TYPE'.
                move STRING to GV_HEADER-OBJ_TYPE.
              when 'username'.
                move STRING to GV_HEADER-username.
              when 'PO_reference'.
                move STRING to GV_HEADER-PO_reference.
              when 'Invoice_Date'.
                move STRING to GV_HEADER-Invoice_Date.
              when 'Posting_Date'.
                move STRING to GV_HEADER-Posting_Date.
              when 'Amount'.
                move STRING to GV_HEADER-Amount.
              when 'Currency'.
                move STRING to GV_HEADER-Currency.
    *APPEND GV_HEADER.
            Iteam details
              when 'invoice_doc_item'.
                move STRING to GT_ITEM-ITEMNO_ACC.
              when 'currency'.
                move STRING to TEMP_STRING.
                move TEMP_STRING to GT_ITEM-CURRENCY.
              when 'Quantity'.
                move STRING to GT_ITEM-Quantity.
              when 'UoM'.
                move STRING to GT_ITEM-UoM.
            endcase.
          endif.
      endcase.
      if GV_NODETEXT = 'Header'.
        clear GV_HEADER.
      elseif GV_NODETEXT = 'Item'.
        if GV_FIRST_TIME ne 'X'.
           append GT_ITEM.
         clear : gt_item.
           GT_ITEM-ITEMNO_ACC = gt_item-itemno_acc + 1.
        endif.
        GV_FIRST_TIME = ' '.
      endif.
    Get the next child
      X_NODE = x_node->get_first_child( ).
    Recurse
      while not X_NODE is initial.
        perform GET_DATA tables     GT_ITEM
                         using      X_NODE
                         changing   GV_HEADER.
        X_NODE = x_node->get_next( ).
      endwhile.
    endform.
    the XML file is:-
    Thanx in advance

  • How to write data in the Infocube using BI IP input ready functionality

    Hi All,
    Please help me in the following scenario...
    Input given to me is-- ZCUBSDID cube with associated role ZSP_BW_SAI_BUDGETS-DID_ALL.
    Query is ZR_V7_CO_PA_CH_PB_DID_BUDGET_2 based on agregation level ZALBSDID (& ZALBVDID) in infoarea ZDACOPA.
    I have to write data in the cube by using Input-Ready functionality of BI IP. Can you please provide me step by step procedure for writing the data in the cube as i am very new in IP side.
    Also if any further input required just let me know.
    My Analysis-> I checked that cube is in Planning mode and in Query Designer>Property Pane-->Planning Pane, Query is in Change mode and also associated Keyfigures are in Input-Ready enabled.
    Also i am able to access query in Analyzer.
    This is very critical for me and need to provide solution asap. Please update asap. It really be great help.
    Thanks & Regards
    Rupali Singh

    Hi,
      To enter data in to planning cube through manual planning, you can do the following,
    1. In a query that is used for manual planning, a cell is only input ready if each characteristic value of all the characteristics included in the aggregation level is unique. None of the aggregated values on the aggregation level are therefore input ready: Totals, subtotals and inner hierarchy nodes are not input ready.
    2. To be able to change values for calculated key figures (like Average Price as a quotient of Amount and Quantity), these must be based on input-ready formulas, and at least one operand must be input ready. More information: Defining Inverse Formulas (Designtime) and Inverse Formulas (Runtime).
    3. In order to change aggregated values (with respect to the aggregation level), these values must be disaggregated on all the data records that contribute to the aggregated value of the cell. More information: Disaggregation (Top-Down-Distribution).
    4. If a query used for manual planning includes a navigation attribute that is restricted using a fixed or dynamic filter or a restricted key figure, the system treats the navigation attribute as a normal characteristic. The rule under point 1 applies here. The system only reacts as though the navigation attribute were not part of the query if the navigation attribute is not restricted.
    5. In a query defined on a MultiProvider or a complex aggregation level that you want to use manual planning for, a cell is not input ready if the InfoProvider that is defined by this cell is:
                                a.      Not a real-time InfoCube
                                b.      A real-time InfoCube that has been switched to load mode
    6. If an input-ready query is executed in change mode, but the requested data is locked by another user, the query starts in display mode.
    For more details, you can refer to the following link,
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/43/0c033316cd2bc4e10000000a114cbd/frameset.htm
    Hope this helps you to solve your issue.
    Regards,
    Balajee

  • How to write data on to a location other than desktop or application server

    Hi all,
            I already posted this question.But  i didn't get exact answer
    Can anyone explain that how to write data on to a share drive located on other Nonsap server.Please I dont want to FTP the file.I dont want that solution.I need to write directly on to that Nonsap share drive..
    Thanks,
    Balaji

    I guess the only way is sending the file using a XI connection to the non sap system server,generate RFC adapters, inbound, outbound interfaces, using xml or soap or IDOC to move the file to that system.

  • Extracting updated data from SAP R/3 to BOBJ DS

    Hi all,
    I have a doubt reg extracting updated data from SAP to BOBJ DS. For example i am extracting 50000 records from SAP table to BOBJ DS say its taking half an hour, after extracting data 10 more records have added in the same table. Do we need extract the whole record again or do we have some other way to extract only those 10 records from table.
    Please help me.  I have searched in forums but cudnt find the exact solution fyi.
    Thanks,
    Guna

    Apart from stepd 1,2, you need to create a Target Data store and a table to load your MARA data.
    3. Now the MARA data will be available in data store(DS_ERP), say table name as BO_MARA
      Why do you want to change the table name? Are you planning to stage the data anywhere?
    4. Create a dataflow source as BO_MARA, query transform and destination as a table
    Data transport object is required if you are using R/3 Data Flow.
    This would suffice just for a full load, if all your transformations can be incorporated inside the Query transform.
    5. Do Transformation.
    6. Transformed data will be available in target table.
    Only after executing the job that the transformed "data" will be available in the target.
    The above part mentions only about a Source, Query transform, Source Data Store and table.
    Apart from these
    You would require a Script object to write the condition, to SELECT the MAX timestamps. You would require Variables to be created in your job to redirect your job path and to restrict the data extracted.
    Use your DataFlow in a Conditional object. If load type is first, in the then part use the dataflow which you might have already designed. Else part will have a replicated Data Flow with the above mentioned WHERE condtion in Query transform.
    Suggest you to refer Desiger document and DI supplement for SAP as well. Inform if you are stuck.
    Regards,
    Suneer Mehmood.

  • How to delete data in SAP Tables

    Can i delete data in SAP tables in IDES version? I need step wise answer.
    Best answer get good points.
    Regards
    Kalyan Pothini

    Hope this helps:
    http://searchsap.techtarget.com/tip/1,289483,sid21_gci1159707,00.html
    Fast deletion of SAP table content
    Stan Shuralyov
    01.17.2006
    Rating: -3.86- (out of 5)
    If a table has millions of records, full deletion becomes time consuming. Try this tip when you need to delete data quickly -- it works in seconds.
    Editor's note: This tip works on an SAP 4.6C, WAS620 and WAS640 system (i.e., all currently suppported SAP platforms). Note that it is a tricky function that should only be used by programmers who know what they are doing.
    Code
    Use function from SE14
            call function 'DD_DATABASE_UTILITY'
                 exporting
                      fct                     = 'MDF'
                      obj_name                = 'TABLE_NAME'
                      obj_type                = 'TABL'
                      exec_modus              = 'S'
                 importing
                      subrc                   = sl_subrc
                 exceptions
                      unexpected_error        = 1
                      unsupported_function    = 2
                      unsupported_obj_type    = 3
                      table_is_locked_by_tcnv = 4
                      authority_check_failed  = 5
                      abort_function          = 6
                      conversion_error        = 7
                      others                  = 8.
            if sl_subrc = 0 and sy-subrc = 0.
              write:/ '&1', '- Table Deleted OK'.
              commit work and wait.
            else.
              sl_status = 1.                          "Deletion Failed
              write:/ '&1', '- Table Deletion FAILED'.
            endif.

  • Write data to table

    hallow i have table yhr_1
    and i wont to write data to her
    how can i do that?
    just from progran or other option.
    regards

    <b>Use insert command:</b>
    Inserting into the Database
    Variants:
    1. INSERT INTO  dbtab      VALUES wa. oder
    INSERT INTO (dbtabname) VALUES wa. oder
    INSERT  dbtab      FROM wa. oder
    INSERT (dbtabname) FROM wa.
    2. INSERT  dbtab      FROM TABLE itab. oder
    INSERT (dbtabname) FROM TABLE itab.
    3. INSERT  dbtab. oder
    INSERT *dbtab.
    Effect
    Inserts new lines in a database table (see relational database). You can specify the name of the database table either in the program itself in the form dbtab or at runtime as the contents of the variable dbtabname. In both cases, the database table must be defined in the ABAP Dictionary. By default, data is only inserted in the current client. Data can only be inserted using a view if the view refers to a single table and was defined in the ABAP Dictionary with the maintenance status "No restriction".
    INSERT belongs to the Open SQL command set.
    In some cases, the syntax rules that apply to Unicode programs are different than those for non-Unicode programs.See Open SQL and Unicode.
    Notes
    You cannot insert a line if a line with the same primary key already exists or if a UNIQUE index already has a line with identical key field values (with regard to this UNIQUE index).
    When inserting lines using a view, all fields of the
    database table that are not in the view are set to their initial value
    (see TABLES) - if they were defined with NOT NULL in the ABAP Dictionary. Otherwise they are set to NULL.
    Authorization checks (see The SAP Authorization Concept) are not supported by the INSERT statement. You must include these in the program yourself.
    Lines specified with the INSERT command are not finally added to the database table until after a database commit (see Logical Unit of Work (LUW)). Prior to this, you can cancel any changes to the database with a database rollback (see Programming Transactions).
    In the dialog system, you cannot rely on the locking mechanism used by the database system (see Database Locking) to synchronize simultaneous access to the same database by several users. Therefore, it is often necessary to use SAP's locking mechanism (see SAP Locking).
    Variant 1
    INSERT INTO dbtab      VALUES wa. or
    INSERT INTO (dbtabname) VALUES wa. or
    INSERT  dbtab      FROM wa. or
    INSERT (dbtabname) FROM wa.
    Extras:
    1. ... CLIENT SPECIFIED
    2. ... CONNECTION con
    Effect
    Inserts one line into a database table. The line to be inserted is taken from the work area wa and the data read from left to right according to the line structure of the database table dbtab. Here, the structure of wa is not taken into account. For this reason, the work area wa must be at least as wide (see DATA) as the line structure of dbtab, and the alignment of the work area wa must correspond to the alignment of the line structure. Otherwise, a runtime error occurs.
    If the database table dbtab or the work area wa contain strings, wa must be compatible with the line structure of dbtab.
    When the command has been executed, the system field SY-DBCNT contains the number of inserted lines (0 or 1).
    The Return Code is set as follows:
    SY-SUBRC = 0:
    Line was successfully inserted.
    SY-SUBRC = 4:
    Line could not be inserted since a line with the same key already exists.
    Example
    Insert the customer Robinson in the current client:
    DATA: wa TYPE scustom.
    wa-id        = '12400177'.
    wa-name      = 'Robinson'.
    wa-postcode  = '69542'.
    wa-city      = 'Heidelberg'.
    wa-custtype  = 'P'.
    wa-discount  = '003'.
    wa-telephone = '06201/44889'.
    INSERT INTO scustom VALUES wa.
    Addition 1
    ... CLIENT SPECIFIED
    Effect
    Automatic client handling is switched off. This allows
    you to process data on a cross-client basis for client-specific tables. The client field is then treated like a normal table field which the program must fill with values in the work area wa.
    The addition CLIENT SPECIFIED must be specified directly after the name of the database table.
    Example
    Insert the customer Robinson in client 2:
    DATA: wa TYPE scustom.
    wa-mandt     = '002'.
    wa-id        = '12400177'.
    wa-name      = 'Robinson'.
    wa-postcode  = '69542'.
    wa-city      = 'Heidelberg'.
    wa-custtype  = 'P'.
    wa-discount  = '003'.
    wa-telephone = '06201/44889'.
    INSERT scustom CLIENT SPECIFIED FROM wa.
    Addition 2
    ... CONNECTION con
    Effect
    The Open SQL command is not executed on the
    standard database, but on the secondary database connection specified with con. con is the name of the databse connection as it was specified in the table DBCON in the column CON_NAME. The database connection con can also be specified dynamically in the form (source_text), where the field source_text contains the name of the database connection and must be type C or STRING. The CONNECTION con addition must be specified directly after the name of the database table or after the CLIENT SPECIFIED addition.
    Variant 2
    INSERT  dbtab      FROM TABLE itab. oder
    INSERT (dbtabname) FROM TABLE itab.
    Extras:
    1. ... CLIENT SPECIFIED
    2. ... ACCEPTING DUPLICATE KEYS
    3. ... CONNECTION con
    Effect
    Mass insert: All lines of the internal table itab are inserted in one single operation. The lines of itab must fulfill the same conditions as the work area wa in variant 1.
    When the command has been executed, the system field SY-DBCNT contains the number of inserted lines.
    The Return Code is set as follows:
    SY-SUBRC = 0:
    All lines successfully inserted. Any other result causes a runtime error.
    Note
    If the internal table itab is empty, SY-SUBRC and SY-DBCNT are set to 0 after the call.
    Addition 1
    ... CLIENT SPECIFIED
    Effect
    As with variant 1.
    Addition 2
    ... ACCEPTING DUPLICATE KEYS
    Effect
    If a line cannot be inserted, the system does not
    terminate with a runtime error but only sets the return value SY-SUBRC to 4. All other lines are inserted after the command is executed.
    Addition 3
    ... CONNECTION con
    Effect
    As with variant 1.
    Variant 3
    INSERT  dbtab. or
    INSERT *dbtab.
    Extras:
    1. ... CLIENT SPECIFIED
    2. ... CONNECTION con
    The syntax check performed in an ABAP Objects context is stricter than in other ABAP areas.
    See Cannot Use Short Forms and Cannot Use * Work Areas.
    Note
    This variant is obsolete.
    Effect
    These are the SAP-specific short forms of variant 1. They have the same effect as variant 1, but the work area is not specified explicitly. Instead, the system implicitly uses the table work area dbtab or *dbtab declared using a TABLES statement.
    INSERT  dbtab. bzw.
    INSERT *dbtab.
    is equivalent to
    INSERT INTO dbtab VALUES  dbtab. or
    INSERT INTO dbtab VALUES *dbtab.
    When the command has been executed, the system field SY-DBCNT contains the number of lines inserted (0 or 1).
    The Return Code is set as follows:
    SY-SUBRC = 0:
    Line successfully inserted.
    SY-SUBRC = 4:
    Line could not be inserted, since a line with the same key already exists.
    Example
    Add a line to a database table:
    TABLES sairport.
    sairport-id   = 'NEW'.
    sairport-name = 'NEWPORT APT'.
    INSERT sairport.
    Notes
    You should always use variant 1 where you specify an explicit work area wa instead of using the implicit TABLES work area.
    If a work area is not explicitly specified, the values for the line to be inserted are taken from the table work area dbtab if the statement is in a FORM or FUNCTION where the table work area is stored in a formal parameter or local variable of the same name.
    Addition 1
    ... CLIENT SPECIFIED
    Effect
    As with variant 1.
    Addition 2
    ... CONNECTION con
    Effect
    As with variant 1.

  • Transfering Data to SAP

    Hi Guys,
    I've been aksed this question and need to know how would you answer it.
    How do you transfer data to SAP using trans LSMW.

    The LSM Workbench is a tool that supports data transfer from   non-SAP systems to R/3. The main functions of the LSM Workbench are:
          - Import data (legacy data in spreadsheet tables and/or    sequential files)
          - Convert data (from source format to target format)
          - Import data (into the database of the R/3 application)
    Pre requisites of LSMW -
    Make sure that SAP customizing is finished.
    Run the relevant transaction in the SAP system manually with test data from the legacy system and see which fields must be filled. There may be required fields that do not correspond to data fields in the legacy system. In such a case, one should better assign a fixed value or establish an optional field for data transfer.
    Map the fields in advance in written form: Assign the source fields to the target fields.
    Determine the form in which non-SAP data will be transferred into the SAP system (e.g. via "Move" or according to a rule).
    Import Methods -
    IDOC's
    BAPI's
    Standard/Direct input
    Batch Input
    Steps -
    Enter the transaction code (LSMW) or add this transaction to your favourites (right-click with your mouse on the Favourites map in the start menu and choose Insert transaction, type lsmw and press enter), since LSMW is an additional transaction, it is not available in the standard SAP menu.
    At the initial screen, you can create a new project, corresponding subprojects and objects via Edit -> Create new entry. Alternatively you can select from an existing project
    Project: An ID with a maximum of 10 characters to name your data      transfer project. If you want to transfer data from several legacy systems, you may create a project e.g. for every legacy system
    Subproject: An ID with a maximum of 10 characters that is used as further structuring attribute
    Object: An ID with a maximum of 10 characters to name the business object
    - At the initial screen, ‘All Objects’ provides a list of all projects   created already.
         -  ‘My Objects’ displays a list of all objects you created personally
         - ‘All Project Objects’ displays all objects of the selected project as tree structure.
         - ‘Project Documentation’ displays any documentation written for the individual pop-ups and processing steps. You can print the project documentation out, send it and save it in various file formats.
         -  Select  ‘Documentation’ to enter your notes. After clicking, a popup is displayed in which you can write down your personal documentation.
    Regards,
    Reward if useful.

  • Can we write data stright to PTEX2000.

    Hi All,
    We are working on a Rostering integration project with SAP.
    We wanted to Submit external timesheets to HR so thought of using CATS_INSERT02 IDOC.
    Well what I could understand the process flow is.
    Employee create a timesheet, dat is stored in CATSDB.
    When its approved and relased its moves to PTEXDIR, PTEX2000 tables.
    when we run CAT6 data from PTEX2000 is transfered to INFOTYPE 2002 in HR.
    I just wonder can we write data stright to PTEXT2000 & or PTEXDIR eliminating CATSDB.
    Ist here a IDOC available for this purpose..?
    Your help in this regard is well appriciated.
    Thanks & Regards,
    Sai Krishna

    Hi,
    No, it's not possible with 5.6.2. Excel based templates are supposed to be coming but I don't know when the release date will be.
    Thanks
    Paul

  • Read and write data from / to cube in CUSTOM_LOGIC BADI

    Here are the details:
    BPC displays a set of details - with 5 rows and 5 columns. There are 50 additional rows for the 5 columns which are blank to start with.
    User changes a cell. BPC 10 only sends that cell which is changed by the user in CUSTOM_LOGIC and WRITE_BACK BADIs.
    I need to get other 5 X 5 cells (other than 1 cell, which is changed and being passed in the BADIs) details to determine all the details and calculate the additional 50 rows. After calculating these values, i need to update the cube so that the BPC report refreshes with the data i have updated.
    Whats the best way? What are the funtion modules involved in reading / writing? Are there any best practices to read / write data from cube.
    Appreciate your help.

    Hi Ravan,
    Look at my sample write back badi here: http://scn.sap.com/message/14290977#14290977
    At the end of the code I have values updated in ct_data. The contents of ct_data will be automatically written to the cube (you don't need to have special code to write data).
    B.R. Vadim

  • Extract data from SAP and send to external system via Webmethods & IDOC's

    Hi,
    We need to Extract data from SAP and send to an external system via Webmethods middlewear using IDOCs. I have never used webmethods before and would like to know more about how to implement this scenario. I have used IDOCS in an EDI scenario before but not used it along with WebMethods.
    Any pointers would be of great help. Thanks

    If you have already ABAP programs /BAPI's in place then try to develop RFC interface and write some back ground programs to scheudl BAPI's and develop scenario but you need to implement error handling , data validation in PI mapping level.
    or
    take help from ABAPer to design in ABAP like writing Proxy program to pull data and send it PI.
    if you are dealing with master data bit risky(correctness) but can be achived using PI.

Maybe you are looking for

  • Safari can't find the server.

    I updated to Ilife08....I went to iweb and added some pages to the site....i published the pages...I got the announce your site message...I did that....I then went to visit site and I got Safari can't find the server.Safari can't open the page "http:

  • Error while refreshing BO objects using live office

    Hi Forum, We are getting below error while refreshing the data using Live Office plug-in on PPT. "An error occurred while receiving the HTTP response to http://........ This could be due to the service endpoint binding not using the HTTP protocol. Th

  • Iphone 5 is on recovery mode and USB is not being recognized by PC

    Hello! I promise you this will be very usefull! just read!! So I had this same problem and  I tried a lot of things including hitting on the on/off button along with the middle button at the same time but it did not work!!!! here's what I tried- all

  • IPod Touch 2G 3.1.1 bug No Music in the Library

    I was shocked when I saw the music library of my iPod Touch, my music files were all erased from the library but the free space is still the same and no videos erased. I am sure that I did not pressed the option to erase anything from the iPod. Just

  • DC rename failed‏ [server 2008 R2]

    hi there. thank you for reading this. For convenience I will call servers like this Domain Name - domain.local Old server name - old.domain.local New server name - new.domain.local Recently I changed the computer name of the domain (the domain is alo