Inserting data via ABAP

When we use INSERT statement to insert data in DB tables there is no foriegn key check or check table validations that are performed this is clearly mention by SAP in its documentation.
I am uploading lot of data from an excel sheet into the ABAP in then using the INSERT statement to put data in the tables.
Now i need to perform the check table validation . I cannot do this validation for each and every record cause it will be very demanding on the ABAP. Can anybody suggest someway of doing this validation a FM or something ?

the foriegn key/check table validations are processed on dynpros, not when directly updating the database.   You need to do the validations in the ABAP yourself.  For example, checking company code from your excel file.
data: xt001 type t001.
select Single * from t001 into xt001
       where bukrs = iupload_file-bukrs.
if sy-subrc <> 0.
* Company code was not found.
endif.
Or you can save some hits to the database, by picking up the table first before looping at your records and doing a READ TABLE statement instead.
data: it001 type table of t001 with header line.
select * into table it001 from t001.
Loop at iupload_file.
read table it001 with key bukrs = iupload_file-bukrs.
if sy-subrc <> 0.
* Company code not found
endif.
endloop.
Welcome to SDN!  Please remember to award points for any helpful answers that you might receive and mark you posts as solved when solved completely.  Thanks.
Regards,
Rich Heilman

Similar Messages

  • Link to Messaging tool data via ABAP stack

    Is there a way to get access to adapter data or the audit log linked to a message id via ABAP class or a FM.
    I'm using objects from CL_XMS_PERSIST and CL_XMS_PERSIST_ADM and either of them does not provide the adapter specific status.
    I really appreciate any leads in this area.
    Thank you.

    Hi Parimala
    I doubt there is any standard ABAP code available to access the adapter framework, since it runs in the J2EE stack. You might be able to access the information you want via http at http://host:port/mdt/monitorservlet, but this would likely require considerable reverse-engineering on your part.
    Regards,
    Thorsten

  • Adding Master data Via ABAP

    Hi,
    My requirements is to load master data infoobject through ABAP. I searched in the forum and found RSDMD_WRITE_ATTRIBUTES_TEXTS function module .
    data : itab like /BI0/PMATERIAL occurs 0 with header line.
    itab-MATERIAL = 'Mat420'.
    itab-OBJVERS = 'A'.
    append itab.
    CALL FUNCTION 'RSDMD_WRITE_ATTRIBUTES_TEXTS'
      EXPORTING
        I_IOBJNM                     = '0MATERIAL'
        I_TABCLASS                   = 'M'
      TABLES
        I_T_TABLE                    = ITAB
    EXCEPTIONS
       ATTRIBUTE_NAME_ERROR         = 1
       IOBJ_NOT_FOUND               = 2
       GENERATE_PROGRAM_ERROR       = 3
       OTHERS                       = 4.
    However , it doesnt add an entry into infoobject...
    We are using APO 3.0 version.
    Does anyone has any idea on this ?.

    Thank you all of you for your replys.
    I believe there must be a version issue while using function module RSDMD_WRITE_ATTRIBUTES_TEXTS  , it works well in BW system but not in APO version
    However , my issue gets resolved by using Function Module RSNDI_MD_ATTRIBUTES_UPDATE.
    Here is a sample code in APO 3.0 version. ( for other's reference )
    Data : i_final Like RSNDI_S_CHAVL occurs 0 with header line,
         i_final-RECORD_NO = 1.
         i_final-IOBJNM    = '0Material'.
         i_final-VALUE     = 'DTEST'.
         Append i_final.
    CALL FUNCTION 'RSNDI_MD_ATTRIBUTES_UPDATE'
          EXPORTING
               I_IOBJNM                                     = '0MATERIAL'            
               I_UPDATE_ALL_ATTRIBUTES       = 'X'
            TABLES
                I_T_DATA                                    = i_final
                E_T_MESSAGES                         = i_message.
    After execution , it did add records into infoobject.
    Anyway thank you all for your replies and suggestions.
    Regards,
    Prashant
    Message was edited by:
            Prashant

  • How to insert data in nested ref table

    hi i am having some problems i am trying to insert data into a table that has a ref and is nested can some one please help me.
    Now this is the problem tring to insert data in manfs when it is already a ref and a nested table
    Can someone please tell me the correct way to insert data
    via Home>SQL>SQL Commands or another way if easier.
    INSERT INTO TABLE (
    SELECT c.CustName
    FROM Customer_objtab c
    WHERE c.CustName = 'Edward Teach'
    VALUES (1,
    BeerTableType(
    BeerType2(‘pride’,’ale’,’yellow’),
    below are the other tables i have created so far;
    ----------------------This is my tbale-------------------------
    CREATE TYPE Customer_objtyp AS OBJECT (
    CustNo NUMBER,
    CustName VARCHAR2(200),
    Address_obj Address_objtyp,
    PhoneList_var PhoneList_vartyp,
    ) NOT FINAL;
    ------------------this is my subtype of customer----------------------
    CREATE TYPE Corp_Customer_objtyp UNDER Customer_objtyp
    (account_mgr_id NUMBER(6) ) NOT FINAL;
    CREATE TYPE BeerType2 AS OBJECT (
    nameCHAR(20),
    kindCHAR(10),
    colourCHAR(10));
    CREATE TYPE BeerTableTypeAS
    TABLE OF BeerType2;
    CREATE TABLE manfs(
    age number,
    Cust_ref REF Customer_objtyp,
    beers BeerTableType,
    copy number)
    NESTED TABLE beers STORE AS BeerTable;

    Dear user!
    Please modify your code like that:
    CREATE TYPE Customer_objtyp AS OBJECT (
    CustNo NUMBER,
    CustName VARCHAR2(200),
    Address_obj Address_objtyp,
    PhoneList_var PhoneList_vartyp,
    ) NOT FINAL;
    CREATE TYPE Corp_Customer_objtyp UNDER Customer_objtyp
    (account_mgr_id NUMBER(6) ) NOT FINAL;
    CREATE TYPE BeerType2 AS OBJECT (
    name CHAR(20),
    kind CHAR(10),
    colour CHAR(10));
    CREATE TYPE BeerTableTypeAS
    TABLE OF BeerType2;
    CREATE TABLE manfs(
    age number,
    Cust_ref REF Customer_objtyp,
    beers BeerTableType,
    copy number)
    NESTED TABLE beers STORE AS BeerTable;
    -- This is new --
    CREATE TABLE Customer_objtyp_table OF Customer_objtyp;
    -- Now try the following insert --
    INSERT INTO manfs
    VALUES (10,
            (SELECT REF(co) FROM Customer_objtyp_table co WHERE co.CustNo = 1),
            BeerTableType(BeerType2('pride','ale','yellow')),
            1)I hope this will give you an example of how to use REF and Nested tables.
    Yours sincerely
    Florian W.

  • How to extract data from BPC InfoCube via ABAP program?

    Hi experts!!
    I tried to extract data from a BPC InfoCube via ABAP program, but I did'n have succeed.
    I used the function 'RSDRI_INFOPROV_READ' to extract data from standard InfoCubes such as '0COPC_C07' and it run OK! However, when I change the InfoCube name to '/CPMB/WAIX8NE' (BPC InfoCube), everything goes wrong...
    Is there any difference between extracting data from BPC and standard InfoCubes?
    Thank you all!

    Moderator message - Welcome to SCN.
    But please do not cross and duplicate post.
    Thread locked.
    Rob

  • Insert record via data tab of table detail display

    I am using SQL Developer 3.0.04
    When I tries to insert more than 200 rows into a table via data tab of table detail display, it takes more than 8 minutes. It takes more than 19 minutes for 400+ rows. It is slow and it is not so slow in previous version (e.g. 1.5.4)
    Had anyone experienced the same issue and is there any workaround (other than loading data via SQL loader and stop using SQL Developer)?
    [Timer of SQL Developer 3.0| http://i.imgur.com/KVAdI.png]

    I've seen this also sometimes but i rarely load large amount of data using SQLDeveloper anyway.
    Please make sure you have patch1 installed and provide information on the database used.
    You can check if patch1 is installed at the
    Help -> About -> Extensionyou should find a "SQL Developer Patch" entry there.

  • Push data from BW 3.5 to XI 3.0 via ABAP proxy

    Hi,
      I have the following scenario: I´m in BW 3.5 trying to send data to XI 3.0 via ABAP proxy. I´ve already found a "How-to" to do build this scenario, but something does not work. I think that problem is when a try do the logon from BW to XI because I got the message "logon data not provided" on http service in XI. I´ve already configure an RFC Destination(SM59) as R/3 connection(type 3) and another as HTTP connection to R/3(type H) and both are correct. Someone knows where I configure the user/pass to logon from BW Intergration Server to XI Integration Server?
    Regards,
    Rafael Soares

    Hello fellows!
       I discovered that my problem was configuration on SXMB_ADM transaction.
       Thank you very much for your help!
    Best regards.
    Rafael

  • Wrong data when consuming web service via ABAP

    Dear all,
    we tried to consume a web service via ABAP and used one of the various existing how-to papers from the internet in order to develop everything.
    The development was not that difficult, but when we now execute our ABAP, we noticed that
    - the first 100 returned rows from the webservice are completely correct
    - then we receive 10-15 completely incorrect rows (empty fields, redundant lines, etc.)
    - the rest of the data (60 records) is correct again
    As we nearly all objects have been generated automatically via SE80, I do not really know where this problem might come from. We double checked the original data and there everything is correct.
    Any ideas?
    Thanks for your feedback,
    Andreas

    Marcelo  Almeida wrote:
    > You can use Logial port for it in LPCONFIG ( Transaction). See this examplo Below:
    >
    > TRY.
    >
    > CREATE OBJECT my_proxy
    > EXPORTING
    > logical_port_name = 'LP01'.
    > CATCH cx_ai_system_fault.
    > ENDTRY.
    >
    > TRY.
    > input-airline_id = p_carrid.
    > input-connection_id = p_connid.
    > input-flight_date = p_fldate.
    >
    > CALL METHOD my_proxy->flight_get_detail
    > EXPORTING
    > input = input
    > IMPORTING
    > output = output.
    > CATCH cx_ai_system_fault.
    > CATCH cx_ai_application_fault.
    > ENTRY.
    >
    > Its necessary create a connection in SM59 (type H) and setting in the call parameters logical port (LPCONFIG).
    Hi,
    thanks for your answer. It´s working!
    Cheers,
    Andy

  • Input via ABAP Webdynpro  - Display data Adobe form

    Hi,
    My requirement is I will pass input via ABAP webdynrpo selection screen and I want to get output in ADOBE FORM.Do we have any blogs or tutorials ? BTW this will not be interactive form right?
    rgds
    vara

    Hi Vara,
    Do follow these steps:
    1) Goto SE80 and create a WDC.
    2) Create a main view, and in the view go to context, and create a node and an attribute in it to fill the values from WDA.
    3) Goto layout of the View, and create an inputfield UI element, and bind the attribute created in the context.
    4) Now create an Interactive form UI element and give some name in the Template source of that UI element.
    5) On press of enter, it asks you to create a new SFP, and say yes for that. Also choose context as the data source during that process.
    6) Now SFP tcode is opened for you to design the layout.
    7) Similarly desing the layout and bind the copied node from webdypro component.
    8) Save and activate the form.
    9) Save and activate the WDC.
    10) Create an application and test it.
    This completes the scenario mentiond by you..
    I Hope it helps you.
    Good day!
    Regards,
    Shashikanth. D

  • Not able to insert data in database via forms

    Hi there. i have been trying to insert data into my database, which i am connected to remotely. i have written some sql code for a button.
    INSERT INTO address_repository VALUES('ADD'|| :address.address_id, :address.address_street_num,
    :address.address_street_name, :address.address_suburb, :address.address_postcode, :address.address_state, :address.address_country);
    where the above are the above are textfield items. my code compiles fine, and no errors are displayed on my form, but when i click the button, nothing happens, and the page is busy, and appears to be processing something, but does nothing.

    don't write
    INSERT INTO address_repository VALUES('ADD'|| :address.address_id, :address.address_street_num,
    :address.address_street_name, :address.address_suburb, :address.address_postcode, :address.address_state, :address.address_country);
    write
    INSERT INTO address_repository (address_id, ....., ....., .....
    VALUES('ADD'|| :address.address_id, :address.address_street_num,
    :address.address_street_name, :address.address_suburb, :address.address_postcode, :address.address_state, :address.address_country);
    if the same error is still active, then we look further, ok?

  • Calling a new browser window with WD Abap and passing data via POST

    Hi there,
    does anybody know whether passing data via POST method is possible when opening a new browser window from within a Web Dynpro Component? In my case I use method IF_WD_WINDOW_MANAGER->CREATE_EXTERNAL_WINDOW for opening a new browser window. Now I want to pass a big amount of data which is only possible via POST method. How can I achieve that or is it not considered inside the Web Dynpro Framework?
    Kind regards,
    Albert

    Hi Priya,
    can you please explain a little bit more what you mean? I didn't get it..
    Kind regards,
    Albert

  • Send a mail via ABAP program

    Hello Experts,
    I want to send mail via ABAP program with the following requirements :
    1. Recipient is OUTLOOK email -id
    2. Sender address has to be an external email-id
    3. Send mail as CC and BCC also to other email-id.
    Is there any function module which can satisfy all the above requirements.
    Regards,
    Mansi.

    hi,
    this code will definately help you just go through it:
    firstly  exported the data to memory using the FM LIST_FROM_MEMORY.
    CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
    listobject = t_listobject
    EXCEPTIONS
    not_found = 1
    OTHERS = 2.
    IF sy-subrc 0.
    MESSAGE e000(su) WITH text-001.
    ENDIF.
    then i converted it into ASCII using LIST_TO_ASCI,
    CALL FUNCTION 'LIST_TO_ASCI'
    TABLES
    listasci = t_xlstab
    listobject = t_listobject
    EXCEPTIONS
    empty_list = 1
    list_index_invalid = 2
    OTHERS = 3.
    IF sy-subrc NE 0.
    MESSAGE e003(yuksdbfzs).
    ENDIF.
    This gives the data in ASCII format separated by '|' and the header has '-', dashes. If you use this internal table directly without any proccesing in SO_NEW_DOCUMENT_ATT_SEND_API1, then you will not get a good excel sheet attachment. To overcome this limitation, i used cl_abap_char_utilities=>newline and cl_abap_char_utilities=>horizontal_tab to add horizontal and vertical tabs to the internal table, replacing all occurences of '|' with
    cl_abap_char_utilities=>horizontal_tab.
    Set the doc_type as 'XLS', create the body and header using the packing_list and pass the data to be downloaded to SO_NEW_DOCUMENT_ATT_SEND_API1 as contents_bin.
    This will create an excel attachment.
    Sample code for formatting the data for the attachment in excel format.
    u2022     Format the data for excel file download
    LOOP AT t_xlstab INTO wa_xlstab .
    DESCRIBE TABLE t_xlstab LINES lw_cnt.
    CLEAR lw_sytabix.
    lw_sytabix = sy-tabix.
    u2022     If not new line then replace '|' by tabs
    IF NOT wa_xlstab EQ cl_abap_char_utilities=>newline.
    REPLACE ALL OCCURRENCES OF '|' IN wa_xlstab
    WITH cl_abap_char_utilities=>horizontal_tab.
    MODIFY t_xlstab FROM wa_xlstab .
    CLEAR wa_xlstab.
    wa_xlstab = cl_abap_char_utilities=>newline.
    IF lw_cnt NE 0 .
    lw_sytabix = lw_sytabix + 1.
    u2022     Insert new line for the excel data
    INSERT wa_xlstab INTO t_xlstab INDEX lw_sytabix.
    lw_cnt = lw_cnt - 1.
    ENDIF.
    CLEAR wa_xlstab.
    ENDIF.
    ENDLOOP.
    Sample code for creating attachment and sending mail:
    FORM send_mail .
    u2022     Define the attachment format
    lw_doc_type = 'XLS'.
    u2022     Create the document which is to be sent
    lwa_doc_chng-obj_name = 'List'.
    lwa_doc_chng-obj_descr = w_subject. "Subject
    lwa_doc_chng-obj_langu = sy-langu.
    u2022     Fill the document data and get size of message
    LOOP AT t_message.
    lt_objtxt = t_message-line.
    APPEND lt_objtxt.
    ENDLOOP.
    DESCRIBE TABLE lt_objtxt LINES lw_tab_lines.
    IF lw_tab_lines GT 0.
    READ TABLE lt_objtxt INDEX lw_tab_lines.
    lwa_doc_chng-doc_size = ( lw_tab_lines - 1 ) * 255 + STRLEN( lt_objtxt ).
    lwa_doc_chng-obj_langu = sy-langu.
    lwa_doc_chng-sensitivty = 'F'.
    ELSE.
    lwa_doc_chng-doc_size = 0.
    ENDIF.
    u2022     Fill Packing List For the body of e-mail
    lt_packing_list-head_start = 1.
    lt_packing_list-head_num = 0.
    lt_packing_list-body_start = 1.
    lt_packing_list-body_num = lw_tab_lines.
    lt_packing_list-doc_type = 'RAW'.
    APPEND lt_packing_list.
    u2022     Create the attachment (the list itself)
    DESCRIBE TABLE t_xlstab LINES lw_tab_lines.
    u2022     Fill the fields of the packing_list for creating the attachment:
    lt_packing_list-transf_bin = 'X'.
    lt_packing_list-head_start = 1.
    lt_packing_list-head_num = 0.
    lt_packing_list-body_start = 1.
    lt_packing_list-body_num = lw_tab_lines.
    lt_packing_list-doc_type = lw_doc_type.
    lt_packing_list-obj_name = 'Attach'.
    lt_packing_list-obj_descr = w_docdesc.
    lt_packing_list-doc_size = lw_tab_lines * 255.
    APPEND lt_packing_list.
    u2022     Fill the mail recipient list
    lt_reclist-rec_type = 'U'.
    LOOP AT t_recipient_list.
    lt_reclist-receiver = t_recipient_list-address.
    APPEND lt_reclist.
    ENDLOOP.
    u2022     Finally send E-Mail
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = lwa_doc_chng
    put_in_outbox = 'X'
    commit_work = 'X'
    IMPORTING
    sent_to_all = lw_sent_to_all
    TABLES
    packing_list = lt_packing_list
    object_header = lt_objhead
    contents_bin = t_xlstab
    contents_txt = lt_objtxt
    receivers = lt_reclist
    EXCEPTIONS
    too_many_receivers = 1
    document_not_sent = 2
    document_type_not_exist = 3
    operation_no_authorization = 4
    parameter_error = 5
    x_error = 6
    enqueue_error = 7
    OTHERS = 8.
    Hope it will help you
    regards
    Rahul sharma

  • File to R/3 via Abap proxy -- need help

    Hello,
    I have made a scenario File to R/3 via Abap Proxy
    My Inbound Async Message Interface has Message Type -Emp_Rac_Detail_MT.
    Message Type has structure
    EmpID
    EmpName
    Age
    I have table in R/3 ZRACTABLE where I need to post data
    Fields in ZRACTABLE are
    EMPID
    EMPNAME
    AGE1
    Pls send me the code that I need to write in Async Method of Proxy
    that will put data
    Regards

    Hi Herry,
    First of all u have to write a Function module in R/3 ....for that i given u the code above.
    Now in ur inbount proxy in the implementation class u have to write code right???
    Here is the code...
    **** INSERT IMPLEMENTATION HERE **** ***
    DATA:
    lv_EMPID type EMPID,
    lv_EMPNAME type EMPNAME,
    lv_AGE type AGE.
    Convert Input Parameters
    lv_EMPID        =  input-Emp_Rac_Detail_MT-EMPID.
    lv_EMPNAME      =  input-Emp_Rac_Detail_MT-EMPNAME.
    lv_AGE          =  input-Emp_Rac_Detail_MT-AGE.
    call function 'ZEMP_RAC_FM'             /** thats ur function module name **/
        EXPORTING
        EMPID       =  lv_EMPID .
        EMPNAME     =  lv_EMPNAME.
        AGE         =  lv_AGE.
    endmethod.
    Regards
    biplab
    <i>*** give points if it hepls you!!!</i>

  • How can I insert data into the standard CRM tables ?

    Hi Experts,
    Scenario----
    I need to download few attributes (fields) from SAP MDM to SAP CRM via SAP XI. I'm using the 'COMT_PRODUCT_MAINTAIN_API' API for it.
    The attributes(fields) that are present in the strucutres of API are downloaded into CRM system (by executing the Inbound proxy that is created based on the Message Interface created on XI) by calling the functions present in the API.
    And for those fields that are not present in CRM, but need to be downloaded into CRM, I'm creating the Set Type attributes in CRM, which get appended to the API.
    My query is:
    There are fields in CRM into which I need to insert the values. But they are not listed in the API. So, how can I insert(/download) the values into these standard fields?
    Regret the long description. Intended to be clear.
    TIA. Points will be awarded.
    Regards,
    Kris
    Edited by: Kris on Jul 21, 2008 8:00 AM

    he INSERT program throws exception???
    can any one help me how to insert data into tabel.I have never used the jdbc driver to access, but what do you think that the flag READONLY=true means? An insert is not a read.
    Kaj

  • Is there a way to Insert Data into a Lookup Column Type on a SharePoint List Destination in SSIS?

    Greetings.
    I have successfully worked out inserting SQL data (2008 R2) into my 2010 SharePoint list (New, Update, Delete) by creating an SSIS Data Flow Task as outlined here:
    http://fsugeiger.blogspot.com/2010/01/synchronise-sql-table-with-sharepoint.html
    However, the problem I am running into is inserting data into the SharePoint Columns that are "Lookup" column types. I verified that all of the values I am copying from SQL into the SharePoint lookup column exist in the customn list it is pointing to. It
    is important to have this column be a lookup column as it links to another custom list that has many more columns of related information.
    I have read and re-read the SharePoint SSIS Adapters 2011.docx from
    http://sqlsrvintegrationsrv.codeplex.com/ and the only section that seems to apply is this:
    "Looking Up Values in a SharePoint List
    If you have to look up a value in a SharePoint list, you can use the Lookup transformation in your data flow, and use the SharePoint List source to load the lookup table. You may have to add a Derived Column transformation or a Script component that splits
    data in the lookup column on the ";#" delimiter to separate the ID value from the description.
    If you are replacing values in your data with the values that you look up in the list, then loading the changed data back into SharePoint, you only have to include the ID from the lookup column. SharePoint ignores the description if you include it."
    I am not sure if the above statement means that I should be passing the assocaited ID's other than the actual data into the SharePoint List destination. If that is the case, that will not really work as the lookup contains hundreds of rows. Not too mention
    I have several of these lookup column types pointing to several different lists.
    Any guidance in how I can put data into a SharePoint Lookup column type via Data Flow Task would be so much appreaciated.
    Thank you.
    My errors are:
    Error: 0x0 at Data Flow Task, SharePoint List Destination: Error on row ID="1": 0x1 - Unspecified error, such as too many items being updated at once (batch), or an invalid core field value.
    Error: 0xC0047062 at Data Flow Task, SharePoint List Destination [1903]: Microsoft.Samples.SqlServer.SSIS.SharePointListAdapters.PipelineProcessException: Errors detected in this component - see SSIS Errors at Microsoft.Samples.SqlServer.SSIS.SharePointListAdapters.SharePointListDestination.ProcessInput(Int32
    inputID, PipelineBuffer buffer) at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostProcessInput(IDTSManagedComponentWrapper100 wrapper, Int32 inputID, IDTSBuffer100 pDTSBuffer, IntPtr bufferWirePacket)
    Error: 0xC0047022 at Data Flow Task, SSIS.Pipeline: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "SharePoint List Destination" (1903) failed with error code 0x80131500 while processing input "Component Input" (1912). The identified
    component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will

    I have found a solution to my problem and thought I would share it here in case there are others who are struggling with the above scenario. If you have a better way, I would love to hear about it since my way is a bit tedious.
    In a nutshell, in order to have an SSIS package put data from an OLE DB Source into a SharePoint List Destination Lookup Column, you need to pass the ID of the value that is being looked up, not the value that is in the “master” OLE DB source.
    Rough explanation, OLE DB Source value for column “Approp” is “4005” --> SQL matches “4005” with the ID in the new lookup table (“4005” = ID “5” as defined in the SharePoint lookup list) --> “5” gets passed into SharePoint List destination lookup
    column --> SharePoint displays “4005” and successfully links to the lookup list.
    Funny thing (not really), the error(s) outlined in my original post are not related in getting data into a SharePoint Lookup column as I am now successful in getting data into the system but I am still getting the same above error(s). I think it has to do
    with the ID column in the SharePoint list destination. What I can’t seem to figure out is why since I am not linking any data to that ID column (at least on new records). I am however linking it on Update and Delete and the errors mentioned above disappear
    and things work well.
    There are three tasks that need to get done in order to get data from SQL into a SharePoint lookup column assuming you have already set up your SharePoint lookup lists:
    1. Create new lookup table(s) in SQL that has the IDs from the SharePoint Lookup list and the values coming from the “master” OLD DB Source. You can see the ID column in SharePoint by toggling it on in a view.
    2. Create a SQL command that JOINs all the databases and tables so that the ID is passed and not the value into the SharePoint lookup column
    3. Change the “Data access mode” to “SQL Command” instead of the “Table or view” in the OLE DB Source and paste your command into the “SQL command text:” area.
    Other helpful info is that you may also need to add additional columns in the new lookup tables in SQL for the scenarios when the data is not unique. You can see this two times in my SQL command example for Units and JobTitles:
    SELECT
    pps.SSNm,
    pps.file_updated,
    pps.Employee_id,
    /* pps.CheckDistNm,*/
    Check_Distribution_id = COALESCE( d.ID, 0 ),
    pps.Job_nbr,
    pps.SeqNm,
    pps.action_eff_dt,
    Fund_id = COALESCE( f.id, 0 ),
    Appropriation_id = COALESCE( ap.id, 0 ),
    ActionCode_id = COALESCE( ac.id, 0 ),
    SpecNumber_id = COALESCE( jt.ID, 0 ),
    pps.Employee_id,
    /* pps.Fund,
    pps.Approp,
    pps.Unit,*/
    Unit_id = COALESCE( u.ID, 0 ),
    PosNm,
    PosCode,
    pps.LastName,
    pps.FirstName,
    pps.MI
    FROM
    x_PPS.aReportVw.pps_screens_active AS pps
    LEFT OUTER JOIN dbo.DistributionNumbers AS d ON
    pps.CheckDistNm = d.Check_Distribution
    LEFT OUTER JOIN dbo.Units AS u ON
    pps.Fund = u.Fund AND
    pps.Approp = u.Approp AND
    pps.Unit = u.Unit
    LEFT OUTER JOIN dbo.Appropriations AS ap ON
    pps.Approp = ap.Approp
    LEFT OUTER JOIN dbo.Funds AS f ON
    pps.Fund = f.Fund
    LEFT OUTER JOIN dbo.ActionCodes AS ac ON
    pps.ActionCode = ac.ActionCode
    LEFT OUTER JOIN dbo.JobTitles AS jt ON
    pps.SpecNm = jt.SpecNumber AND
    pps.JurisClass = jt.JurisClass

Maybe you are looking for