Change Process are not getting triggered

Hi,
I have changed the first name of the user in OIM but the same is not getting sycned in DSEE.
When I have added the Change First Name Process task from Resource then it got successfully completed and the user's first name got changed in DSEE.
Automatically Change First Name process task is not getting triggered. It worked for me earlier but now it is not working.
Could you please let me know the reason for the same.
Thanks

verify below
1. task name under DSEE process def and process trigger lookup is exactly same(remove if any white space etc.)
2. make sure the task is marked as conditional
3. Allow Multiple should be checked
--nayan                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Change Pointers are not getting populated in BDCPV table.

    Hi All,
             I am trying to create IDOC for Activity type master - KL02 through change pointers. For that I have done following things.
    Message type - COAMAS
    1. Created Custom message type - WE81 - ZIN_COAMAS_TCSMOBILE
    2. WE82 - Config for Mess Type and Idoc type combination
    3. SCDO - Checked object type LSTAR and have required tables in that object.
    4. BD61 - Activated Change pointers - Generally.
    5. BD50 - Checked Active for ZIN_COAMAS_TCSMOBILE
    6. BD52 - Added fields for I want to create Change pointers
    7. BD60 - Message type and ref Mesage Type and function module config.
    8. BD64 - Created distribution model for my Message type
    After doing all this settings the change pointers are not getting created in BDCP and BDCPV tables.
    Note - The entries are going in CDHDR and CDPOS table for activity which i change through KL02 for class LSTAR
    Can anybody figure out what need to be done in this case?
    Regards,
    Gautam Joshi.

    Hi All,
              Solved the problem myself.
              In BD52 I have given
              LSTAR               CSLA         KOARS
              LSTAR               CSLA         LSTAR
              LSTAR               CSLT          KTEXT
              Here the data of activity are stored in TCLA and TCLT tables. So intially while doing config in BD52 I have given TCLA and TCLT table names.
              But I debugged the KL02 and found that change pointers are not created for TCLA and TCLT table. further looking into CDHDr and CDPOS table I found that for COAMAS message type in these two tables table name was CSLAB.
    CDPOS entry
    LSTAR                        
    3166442                      
    119512890                    
    *CSLAB*                        
    2003166442   2400123120000101
    KTEXT                        
    U                            
    --> BUT CSLAB is structure.
    After putting these entry in BD52 the problem solved.
    LSTAR     CSLAB     KOKRS
    LSTAR     CSLAB     KTEXT
    LSTAR     CSLAB     LSTAR
    Regards,
    Gautam Joshi.

  • In a metachain local chain are not getting triggered

    Hi Experts,
    I  have a transaction metachain  which includes 12 local chains. My query is some of the local chains are not triggering. Can anybody please help me in resolving this issue. <<removed>>
    Regards
    Sampada
    Edited by: kishan P on Jan 10, 2012 5:10 PM

    Hi ,
    I dont see any reason why Process chain is not getting triggered . Just check the Metachain in change mode and activate it again .
    Also please check display variant in all of the Local Process chains .It should be using metachain .
    2. Can you please check the status of the Previous local Process chains and check the status of the same in tables RSPCPROCESSLOG , RSPCPROCESSCHAIN .The status should be successfully finished . 
    Hope it helps .
    Thanks
    Kamal

  • Job are not getting Triggered

    Hi All,
    I Have encountered an Issue with JOB not getting Triggered in BI system .
    For Datasource 2LIS_04_P_ARBPL , I have created Infopackage , when I am going to schedule tab and running an Infopackage. Job is not getting trigger  . And it is going on Hold for a longer period.
    Data is in the source system and  I am unable to fetch data from source system .
    One more thing there was some upgration activity happened in the source system one day before.
    Could u please let us know , Is the reason behind could be upgration in source system  ?
    Please let me know what needs to be crosschecked and what could be the solution for this Issue.
    Looking for response .....
    Regards,
    Mahesh

    Hi ,
    In the Source system Data is fetching I mean through RSA3.
    Even I able to replicate the Datasource as well.
    Also in T-code : SM59 , when I am checking Source system Connection check , it is not poping any error.
    But When I am Checking through RSA1 - > Source System
    Source system connection by clicking CHECK Option  then it is poping an error "Check Failed for RFC Connection ; Check Destination ".
    Also In Source system T-code :SM50 I can see three BGD WP which are in waiting status.
    In T-code : BD87 I have checked I didnt find any IDOC's in Yellow colour .
    How do we need to check whether ALEREMOTE is active or not?
    Actually my Issue is Jobs are not getting trigger in BI . So what all things needs to be taken care apart from this.
    So Is there any thing to be taken care from Basis team for Restarting of BI Jobs after any kind of Upgration activity in general?
    Regards,
    Mahesh

  • Scheduled process chain not getting triggered properly

    Hi all,
    Process CHAIN, variant ZPC_MASTER_COMMON is not scheduled waiting for event RSPROCESS 3Y7V2S5WLYJ5VGT8IMCSG068H, after this message the job gets cancelled for any process chain when i schedule it as a periodic job.

    Hi,
    Please check if in the job you have 3Y7V2S5WLYJ5VGT8IMCSG068H entered as the event name. If yes, please change and activate again.
    -Vikram

  • XI Alerts are not getting triggered with conditions

    I could make Alerts work with all the filters with wildcards(*)-default. But I am not able to make with "Conditions " with restriction like:
    Sender Service: PurchaseOrder
    Sender Interface : *
    Sender Namespace: *
    It works fine if I have * for Sender Service and etc.
    I am using 2004s PI 7.0 sp 9.0.
    Please let me know if anybody had this Problem.
    Thanks in advance.
    Laxman Molugu

    Hi,
    Please do not use PurchaseOrder it means *  only ,,
    Please explain bit clear..
    Why bcoz, if you have multiple senders the you can achieve this in different way,
    suppose if you wolud like to get the name from database using diff tech like DBLookup or some machanism.. then do further process..
    Regards
    Chilla..

  • Workflow not getting triggered from Action definition in CRMD_ORDER

    Hello Experts,
    I have created a workflow which should send mail to partner team in a Change Request.This workflow should be triggered when a particular Zaction is performed on the CR.Zaction is created properly and my workflow is also assigned to it.I have also followed OSS note-733675 and created a workflow container with name "BUSINESSOBJECT" to get the application data into my workflow when the action is performed.My workflow is a background processing one.
    I have tested it separately by providing GUID foreground and it works perfectly fine and mail is sent to partner team.But when i perform the action,mails are not getting triggered nor the workflow.I am not even able to check the logs.I am not even able to know if all the action has triggered my workflow.Kindly help.Would appreciate your contribution.
    Regds
    VLP

    Please check in SWI2_FREQ whether the Workflow is really getting triggered.
    Thanks
    Arghadip

  • Alerts not getting triggered from Adapter Framework

    Hi,
    I have done the following steps for the Alerting:-
    1. In configuration of RWB, activated monitoring for XI integration server & XIAdapterFramework and set the monitoring level to 'HIGH'.
    2. Scheduled the Report 'SXMSALERT_PROCESS_DATA_GET' on ABAP stack.
    3. In the 'further settings' link in End-to-End monitoring, activated the monitoring and set the frequency.
    4.Created an alert category using t-code 'ALRTCATDEF' and assigned fixed users(myself) to it.
    5.Defined an alert rule with '*' in all conditions and 'No restrictions' for the question 'Where did the error occur'.
    Finally after all the steps:-
    I am able to receive the alerts in the inbox -
      a) by running the test report 'RSALERTTEST'
      b) from a control step in BPM.
    <b>However, alerts are not getting triggered for an error in the Adapter Framework. (an exception in the Adapter Channel)</b>
    When i debugged the SXMSALERT_PROCESS_DATA_GET report, there was step where it was looking for process instances in table 'SSPICSPRHD' which was empty and the alert error log said -
    <i> No process instances found for process type ID: 26460B43EB934C4C9ABBE9627380A89E ( XIDomain: domain.00.hqdvsapxi01 )</i>
    Any help/hint is welcome !!!
    Thanks & Regards,
    Renjith.

    Hi,
    https://www.sdn.sap.com/sdn/weblogs.sdn?blog=/pub/wlg/1382. [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken]
    I think this blog will be of help to you..
    Cheers,
    Divya

  • Plugin events not getting triggered

    Hello,
    APEX version 4.1.0.00.32 and 4.2.3.00.08
    Browser: latest version of Chrome browser
    I'm trying to include plugin events for the Select2 APEX plugin but facing one rather annoying issue; the dynamic actions based on the plugin events are not getting triggered. These are the steps I have taken:
    1. Registered several events with the plugin (e.g. slctchange, slctopen, slcthighlight, etc.). These events are based on the official Select2 documentation.
    2. Modified the render function to include event handlers that trigger the appropriate Select2 event.
    $("' || l_item_jq || '").on("change", function(e) {
      apex.jQuery(this).trigger("slctchange", { val:e.val, added:e.added, removed:e.removed });
    $("' || l_item_jq || '").on("select2-opening", function(e) {
      apex.jQuery(this).trigger("slctopening");
    $("' || l_item_jq || '").on("select2-open", function(e) {
      apex.jQuery(this).trigger("slctopen");
    $("' || l_item_jq || '").on("select2-highlight", function(e) {
      apex.jQuery(this).trigger("slcthighlight", { val:e.val, choice:e.choice });
    $("' || l_item_jq || '").on("select2-selecting", function(e) {
      apex.jQuery(this).trigger("slctselecting", { val:e.val, choice:e.choice });
    $("' || l_item_jq || '").on("select2-clearing", function(e) {
      apex.jQuery(this).trigger("slctclearing");
    $("' || l_item_jq || '").on("select2-removed", function(e) {
      apex.jQuery(this).trigger("slctremoved", { val:e.val, choice:e.choice });
    $("' || l_item_jq || '").on("select2-focus", function(e) {
      apex.jQuery(this).trigger("slctfocus");
    $("' || l_item_jq || '").on("select2-blur", function(e) {
      apex.jQuery(this).trigger("slctblur");
    I can confirm that the slctchange event (the first event in the list) is working properly both in APEX 4.1 and 4.2. Please note that I had to use apex.jQuery instead of $ to get it to work in 4.1. Might be because I overloaded jQuery in 4.1. Anyway, all others events are not getting triggered for some reason. The event handlers are getting executed for the appropriate event; that's not the problem. I guess the source of the problem lies with the trigger function. It simply doesn't trigger any of my dynamic actions.
    To make things even more complicated, it is possible to trigger the events manually in console. So if I execute this statement:
    apex.jQuery("#P20_SINGLE_VALUE_NEW").trigger("slctopen");
    Then I get back the result from the dynamic action.
    I tried a lot of different ways to trigger the plugin event. For example:
    $("' || l_item_jq || '").on("select2-open", function(e) {
      apex.jQuery(this).trigger("slctopen");
      $(this).trigger("slctopen");
      apex.jQuery(this).trigger("slctopen.BE_CTB_SELECT2");
      $(this).trigger("slctopen.BE_CTB_SELECT2");
      apex.jQuery("' || l_item_jq || '").trigger("slctopen");
      $("' || l_item_jq || '").trigger("slctopen");
      apex.jQuery("' || l_item_jq || '").trigger("slctopen.BE_CTB_SELECT2");
      $("' || l_item_jq || '").trigger("slctopen.BE_CTB_SELECT2");
    Nothing gets triggered...
    Can anyone tell me what the problem is here? Thanks in advance.
    Best regards,
    Nick

    Hello,
    APEX version 4.1.0.00.32 and 4.2.3.00.08
    Browser: latest version of Chrome browser
    I'm trying to include plugin events for the Select2 APEX plugin but facing one rather annoying issue; the dynamic actions based on the plugin events are not getting triggered. These are the steps I have taken:
    1. Registered several events with the plugin (e.g. slctchange, slctopen, slcthighlight, etc.). These events are based on the official Select2 documentation.
    2. Modified the render function to include event handlers that trigger the appropriate Select2 event.
    $("' || l_item_jq || '").on("change", function(e) {
      apex.jQuery(this).trigger("slctchange", { val:e.val, added:e.added, removed:e.removed });
    $("' || l_item_jq || '").on("select2-opening", function(e) {
      apex.jQuery(this).trigger("slctopening");
    $("' || l_item_jq || '").on("select2-open", function(e) {
      apex.jQuery(this).trigger("slctopen");
    $("' || l_item_jq || '").on("select2-highlight", function(e) {
      apex.jQuery(this).trigger("slcthighlight", { val:e.val, choice:e.choice });
    $("' || l_item_jq || '").on("select2-selecting", function(e) {
      apex.jQuery(this).trigger("slctselecting", { val:e.val, choice:e.choice });
    $("' || l_item_jq || '").on("select2-clearing", function(e) {
      apex.jQuery(this).trigger("slctclearing");
    $("' || l_item_jq || '").on("select2-removed", function(e) {
      apex.jQuery(this).trigger("slctremoved", { val:e.val, choice:e.choice });
    $("' || l_item_jq || '").on("select2-focus", function(e) {
      apex.jQuery(this).trigger("slctfocus");
    $("' || l_item_jq || '").on("select2-blur", function(e) {
      apex.jQuery(this).trigger("slctblur");
    I can confirm that the slctchange event (the first event in the list) is working properly both in APEX 4.1 and 4.2. Please note that I had to use apex.jQuery instead of $ to get it to work in 4.1. Might be because I overloaded jQuery in 4.1. Anyway, all others events are not getting triggered for some reason. The event handlers are getting executed for the appropriate event; that's not the problem. I guess the source of the problem lies with the trigger function. It simply doesn't trigger any of my dynamic actions.
    To make things even more complicated, it is possible to trigger the events manually in console. So if I execute this statement:
    apex.jQuery("#P20_SINGLE_VALUE_NEW").trigger("slctopen");
    Then I get back the result from the dynamic action.
    I tried a lot of different ways to trigger the plugin event. For example:
    $("' || l_item_jq || '").on("select2-open", function(e) {
      apex.jQuery(this).trigger("slctopen");
      $(this).trigger("slctopen");
      apex.jQuery(this).trigger("slctopen.BE_CTB_SELECT2");
      $(this).trigger("slctopen.BE_CTB_SELECT2");
      apex.jQuery("' || l_item_jq || '").trigger("slctopen");
      $("' || l_item_jq || '").trigger("slctopen");
      apex.jQuery("' || l_item_jq || '").trigger("slctopen.BE_CTB_SELECT2");
      $("' || l_item_jq || '").trigger("slctopen.BE_CTB_SELECT2");
    Nothing gets triggered...
    Can anyone tell me what the problem is here? Thanks in advance.
    Best regards,
    Nick

  • User-exit not getting triggered in VA32

    Hello Experts,
    Iu2019ve a requirement and Iu2019m working on Change Scheduling Agreement u2018t-code VA32u2019. According to requirement I need to capture all header data and data in Sales, Item Overview, Item Detail and Ordering party tabs. Iu2019ve set the break points in almost all the user-exits but only one FM (EXIT_SAPLV45L_002) of exit u2018V45L0001u2019 is getting trigger. Even though other exits/FM has all the tables as import/export parameters which I need but they are not getting triggered. Can anybody please tell me which user-exit / BADI I should use to capture the required data?
    Thanks.

    Hello Experts,
    Thanks a lot Vijay for you reply. Iu2019ve seen user exits of MV45AFZZ include and looks like USEREXIT_SAVE_DOCUMENT_PREPARE is the correct user exit. But I havenu2019t use Includes before can you or anybody else please tell me how to write code in include. I know how to search an include in a program but not sure how to add code in the user exit.
    Thanks

  • Changes are not getting reflected in Process Chain after changes.

    Hello,
    I have modified a Process Chain in Development environment. I have created one new infopackage and included it in the process chain. I have also added two new change run variants in the process chain. I have collected the process chain and infopackage in a transport request and transported it to integration environment.
    Transport request has reached successfully in integration but the changes in process chain are not getting reflected. The infopackage has reached to integration after transport.
    I need some suggestion on this.
    Regards,
    Sanjay

    Hi Sanjay.......
    R u in Display mode..........click on Change mode...........
    If you can see the chain in Change mode............then ur process chain is imported in in-active version..........
    U can try activating it manually or re-transport the active version..........
    Regards,
    Debjani......

  • New changes are not getting reflected in the bam reports.

    Hi
    I have created a BPEL process and it polls the data from a table and populate an object created in Bam.I have accomplished the above task by createing two database adaptors.One is on 10g database and another one is on Bam database.I have created a view based on the bamobject and used a database adaptor to populate the data. BPEL process is populating the data properly to that bamobject but those changes are not reflecting to bam reports automaticaly. We need to refresh the report or reprompt the report to see the changes.Could some help me to reslove this issue.
    Thanks in advance
    Laj Abraham

    Hi charles
    I have tried that option too.But that is also not working. BPEL Procees is able to populate the BAM object with the help of the sensor.But those changes are not getting reflected in BAM Reports.But if i create or update an existing record in BAM object through BAM Architect, those changes are getting reflected in BAM Reports(No manual intervention is required).
    Your help in this regard is highly appreciated.
    Thanks
    Laj Abraham

  • BBP_PGRP_ASSIGN_BAdI:Purchase Grp & Purchase Org. are not getting changed

    Hi Experts ,
    Actual  Process:
    As per the normal process when Purchase requisiton is created in ECC then  it will get reflected to SRM through BBP_EXTREQ_TRANSFER.So while SRM creating that it will assign some deflaut purchase group and organisation .
    Requirement given by user:
    But user requires the actual purchase org and purchase group to be determined from back end i.e.ECC and reflect the changes in SRM  .So we have tried implementing the BADI ->Method:( BBP_PGRP_ASSIGN_BAdI->BBP_SC_PGRP_ASSIGN) using filter option EXTREQ_INB.
    Now after implementation when we debug the badi the values are getting updated coorectly in the Change attriutes of Badi .
    After the badi execution finished will Org values are not getting modified .So on further anlyses we found that in   CT_ITEM(Shopping Cart Item details) the value EB_LOG_SYSTEM  is showing as SRMCLIENT300(SRM System ID) but when we manually changed that to EBD220(ECC system ID) the data is getting updated correctly in SRM .
    As per my understanding the back end system for SRM is ECC sytem id .But here it is capturing SRM system id.
    So I want to know how the standard will capture the logical system  as SRM ..instead EBD ..?
    Regards
    Phani.

    Hi Sanjeev,
    Backend purchase group is on under Act ECS.
    Here the main issue is - Users placed under backend purchase group (org -model) However when we trying to  create ECS PO in SRM , noticed that system is picking local purchase group  . Hence not replicating to backend system.
    I hope BADI should be enabled (BBPPGRPFIND) - could you please through some light on this ,how to proceed with this BADI?
    Thanks in advance
    Harish

  • Workflow not getting triggered on status change

    Hiii Everyone
    Workflow is not getting triggered whenever I change the status of the Order (Lead).  When we create a lead a workflow is triggered.
    1. If the status is Open a mail is sent.
    2. Then the status is checked for in process. And whenever the  status is changed to inprocess it is assigned to the agent by   the  rule attached to the workflow.
    3. And again when the status is changed to sanctioned a mail is sent.
    Now problem is if I create a lead and change its status to inprocess and then save , then the mail is sent and it is assigned to the agent properly. But when I change the status to sanctioned , then the mail is not sent for sanctioned(i.e. no worklfow step is shown in swel).
    If I open the lead and save it then the mail is sent properly. But then after that when I change the status to inprocess, the workflow is not showing agent assignment (jn swel).
    Summary: Whenever I cahnge the status after saving the order , the workflow is not showing any further step .
    Please suggest the solution.
    Regards
    Shafali

    Hi,
    Your workflow has been triggered when the status is open and then when change the status to in process,it is not sending mail as there is no agent assignment.
    That means, workflow triggered, but it is not going to the next step.
    Is it a standard or custom one?
    Can you post the workflow log screenshot over here?
    Cheers,
    Raja.D

  • When inserting 2 column details in a single table using Stored Procedure.Only 2 Column details getting inserted.1column details are not getting into the table.Please see the below script and help me to change.

    Line 390 Under the (Insert into SALES_TRADEIN Table)
    I need to insert (TradeIn_1_VIN) Values If there is no values in (TradeIn_1_VIN) then i have to insert (TradeIn_2_VIN) values to the (SALES_TRADEIN) Table.
    After i run then below script only (TradeIn_2_VIN) values are get inserted in the table. (TradeIn_1_VIN) are not getting loaded in to the table.
    I think there is the problem from Line No (404 to 414) Please help me change those particular lines to insert (TradeIn_1_VIN) Values also.If there is no details then (TradeIn_2_VIN) need to be inserted.
    -- =============================================
    -- Stored Procedure for Flatfile_Sales
    -- =============================================
    USE [IconicMarketing]
    ---==========Sales_Cursor
    --USE [IconicMarketing]
    --GO
    DECLARE
    @FileType
    varchar(50),
    @ACDealerID
    varchar(50),
    @ClientDealerID
    varchar(50),
    @DMSType
    varchar(50),
    @DealNumber
    varchar(50),
    @CustomerNumber
    varchar(50),
    @CustomerName
    varchar(50),
    @CustomerFirstName
    varchar(50),
    @CustomerLastName
    varchar(50),
    @CustomerAddress
    varchar(50),
    @CustomerCity
    varchar(50),
    @CustomerState
    varchar(50),
    @CustomerZip
    varchar(50),
    @CustomerCounty
    varchar(50),
    @CustomerHomePhone
    varchar(50),
    @CustomerWorkPhone
    varchar(50),
    @CustomerCellPhone
    varchar(50),
    @CustomerPagerPhone
    varchar(50),
    @CustomerEmail
    varchar(50),
    @CustomerBirthDate
    varchar(50),
    @MailBlock
    varchar(50),
    @CoBuyerName
    varchar(50),
    @CoBuyerFirstName
    varchar(50),
    @CoBuyerLastName
    varchar(50),
    @CoBuyerAddress
    varchar(50),
    @CoBuyerCity
    varchar(50),
    @CoBuyerState
    varchar(50),
    @CoBuyerZip
    varchar(50),
    @CoBuyerCounty
    varchar(50),
    @CoBuyerHomePhone
    varchar(50),
    @CoBuyerWorkPhone
    varchar(50),
    @CoBuyerBirthDate
    varchar(50),
    @Salesman_1_Number
    varchar(50),
    @Salesman_1_Name
    varchar(50),
    @Salesman_2_Number
    varchar(50),
    @Salesman_2_Name
    varchar(50),
    @ClosingManagerName
    varchar(50),
    @ClosingManagerNumber
    varchar(50),
    @F_AND_I_ManagerNumber
    varchar(50),
    @F_AND_I_ManagerName
    varchar(50),
    @SalesManagerNumber
    varchar(50),
    @SalesManagerName
    varchar(50),
    @EntryDate
    varchar(50),
    @DealBookDate
    varchar(50),
    @VehicleYear
    varchar(50),
    @VehicleMake
    varchar(50),
    @VehicleModel
    varchar(50),
    @VehicleStockNumber
    varchar(50),
    @VehicleVIN
    varchar(50),
    @VehicleExteriorColor
    varchar(50),
    @VehicleInteriorColor
    varchar(50),
    @VehicleMileage
    varchar(50),
    @VehicleType
    varchar(50),
    @InServiceDate
    varchar(50),
    @HoldBackAmount
    varchar(50),
    @DealType
    varchar(50),
    @SaleType
    varchar(50),
    @BankCode
    varchar(50),
    @BankName
    varchar(50),
    @SalesmanCommission
    varchar(50),
    @GrossProfitSale
    varchar(50),
    @FinanceReserve
    varchar(50),
    @CreditLifePremium
    varchar(50),
    @CreditLifeCommision
    varchar(50),
    @TotalInsuranceReserve
    varchar(50),
    @BalloonAmount
    varchar(50),
    @CashPrice
    varchar(50),
    @AmountFinanced
    varchar(50),
    @TotalOfPayments
    varchar(50),
    @MSRP varchar(50),
    @DownPayment
    varchar(50),
    @SecurityDesposit
    varchar(50),
    @Rebate
    varchar(50),
    @Term varchar(50),
    @RetailPayment
    varchar(50),
    @PaymentType
    varchar(50),
    @RetailFirstPayDate
    varchar(50),
    @LeaseFirstPayDate
    varchar(50),
    @DayToFirstPayment
    varchar(50),
    @LeaseAnnualMiles
    varchar(50),
    @MileageRate
    varchar(50),
    @APRRate
    varchar(50),
    @ResidualAmount
    varchar(50),
    @LicenseFee
    varchar(50),
    @RegistrationFee
    varchar(50),
    @TotalTax
    varchar(50),
    @ExtendedWarrantyName
    varchar(50),
    @ExtendedWarrantyTerm
    varchar(50),
    @ExtendedWarrantyLimitMiles
    varchar(50),
    @ExtendedWarrantyDollar
    varchar(50),
    @ExtendedWarrantyProfit
    varchar(50),
    @FrontGross
    varchar(50),
    @BackGross
    varchar(50),
    @TradeIn_1_VIN
    varchar(50),
    @TradeIn_2_VIN
    varchar(50),
    @TradeIn_1_Make
    varchar(50),
    @TradeIn_2_Make
    varchar(50),
    @TradeIn_1_Model
    varchar(50),
    @TradeIn_2_Model
    varchar(50),
    @TradeIn_1_ExteriorColor
    varchar(50),
    @TradeIn_2_ExteriorColor
    varchar(50),
    @TradeIn_1_Year
    varchar(50),
    @TradeIn_2_Year
    varchar(50),
    @TradeIn_1_Mileage
    varchar(50),
    @TradeIn_2_Mileage
    varchar(50),
    @TradeIn_1_Gross
    varchar(50),
    @TradeIn_2_Gross
    varchar(50),
    @TradeIn_1_Payoff
    varchar(50),
    @TradeIn_2_Payoff
    varchar(50),
    @TradeIn_1_ACV
    varchar(50),
    @TradeIn_2_ACV
    varchar(50),
    @Fee_1_Name
    varchar(50),
    @Fee_1_Fee
    varchar(50),
    @Fee_1_Commission
    varchar(50),
    @Fee_2_Name
    varchar(50),
    @Fee_2_Fee
    varchar(50),
    @Fee_2_Commission
    varchar(50),
    @Fee_3_Name
    varchar(50),
    @Fee_3_Fee
    varchar(50),
    @Fee_3_Commission
    varchar(50),
    @Fee_4_Name
    varchar(50),
    @Fee_4_Fee
    varchar(50),
    @Fee_4_Commission
    varchar(50),
    @Fee_5_Name
    varchar(50),
    @Fee_5_Fee
    varchar(50),
    @Fee_5_Commission
    varchar(50),
    @Fee_6_Name
    varchar(50),
    @Fee_6_Fee
    varchar(50),
    @Fee_6_Commission
    varchar(50),
    @Fee_7_Name
    varchar(50),
    @Fee_7_Fee
    varchar(50),
    @Fee_7_Commission
    varchar(50),
    @Fee_8_Name
    varchar(50),
    @Fee_8_Fee
    varchar(50),
    @Fee_8_Commission
    varchar(50),
    @Fee_9_Name
    varchar(50),
    @Fee_9_Fee
    varchar(50),
    @Fee_9_Commission
    varchar(50),
    @Fee_10_Name
    varchar(50),
    @Fee_10_Fee
    varchar(50),
    @Fee_10_Commission
    varchar(50),
    @ContractDate
    varchar(50),
    @InsuranceName
    varchar(50),
    @InsuranceAgentName
    varchar(50),
    @InsuranceAddress
    varchar(50),
    @InsuranceCity
    varchar(50),
    @InsuranceState
    varchar(50),
    @InsuranceZip
    varchar(50),
    @InsurancePhone
    varchar(50),
    @InsurancePolicyNumber
    varchar(50),
    @InsuranceEffectiveDate
    varchar(50),
    @InsuranceExpirationDate
    varchar(50),
    @InsuranceCompensationDeduction
    varchar(50),
    @TradeIn_1_InteriorColor
    varchar(50),
    @TradeIn_2_InteriorColor
    varchar(50),
    @PhoneBlock
    varchar(50),
    @LicensePlateNumber
    varchar(50),
    @Cost varchar(50),
    @InvoiceAmount
    varchar(50),
    @FinanceCharge
    varchar(50),
    @TotalPickupPayment
    varchar(50),
    @TotalAccessories
    varchar(50),
    @TotalDriveOffAmount
    varchar(50),
    @EmailBlock
    varchar(50),
    @ModelDescriptionOfCarSold
    varchar(50),
    @VehicleClassification
    varchar(50),
    @ModelNumberOfCarSold
    varchar(50),
    @GAPPremium
    varchar(50),
    @LastInstallmentDate
    varchar(50),
    @CashDeposit
    varchar(50),
    @AHPremium
    varchar(50),
    @LeaseRate
    varchar(50),
    @DealerSelect
    varchar(50),
    @LeasePayment
    varchar(50),
    @LeaseNetCapCost
    varchar(50),
    @LeaseTotalCapReduction
    varchar(50),
    @DealStatus
    varchar(50),
    @CustomerSuffix
    varchar(50),
    @CustomerSalutation
    varchar(50),
    @CustomerAddress2
    varchar(50),
    @CustomerMiddleName
    varchar(50),
    @GlobalOptOut
    varchar(50),
    @LeaseTerm
    varchar(50),
    @ExtendedWarrantyFlag
    varchar(50),
    @Salesman_3_Number
    varchar(50),
    @Salesman_3_Name
    varchar(50),
    @Salesman_4_Number
    varchar(50),
    @Salesman_4_Name
    varchar(50),
    @Salesman_5_Number
    varchar(50),
    @Salesman_5_Name
    varchar(50),
    @Salesman_6_Number
    varchar(50),
    @Salesman_6_Name
    varchar(50),
    @APRRate2
    varchar(50),
    @APRRate3
    varchar(50),
    @APRRate4
    varchar(50),
    @Term2
    varchar(50),
    @SecurityDeposit2
    varchar(50),
    @DownPayment2
    varchar(50),
    @TotalOfPayments2
    varchar(50),
    @BasePayment
    varchar(50),
    @JournalSaleAmount
    varchar(50),
    @IndividualBusinessFlag
    varchar(50),
    @InventoryDate
    varchar(50),
    @StatusDate
    varchar(50),
    @ListPrice
    varchar(50),
    @NetTradeAmount
    varchar(50),
    @TrimLevel
    varchar(50),
    @SubTrimLevel
    varchar(50),
    @BodyDescription
    varchar(50),
    @BodyDoorCount
    varchar(50),
    @TransmissionDesc
    varchar(50),
    @EngineDesc
    varchar(50),
    @TypeCode
    varchar(50),
    @SLCT2
    varchar(50),
    @DealDateOffset
    varchar(50),
    @AccountingDate
    varchar(50),
    @CoBuyerCustNum
    varchar(50),
    @CoBuyerCell
    varchar(50),
    @CoBuyerEmail
    varchar(50),
    @CoBuyerSalutation
    varchar(50),
    @CoBuyerPhoneBlock
    varchar(50),
    @CoBuyerMailBlock
    varchar(50),
    @CoBuyerEmailBlock
    varchar(50),
    @RealBookDate
    varchar(50),
    @CoBuyerMiddleName
    varchar(50),
    @CoBuyerCountry
    varchar(50),
    @CoBuyerAddress2
    varchar(50),
    @CoBuyerOptOut
    varchar(50),
    @CoBuyerOccupation
    varchar(50),
    @CoBuyerEmployer
    varchar(50),
    @Country
    varchar(50),
    @Occupation
    varchar(50),
    @Employer
    varchar(50),
    @Salesman2Commission
    varchar(50),
    @BankAddress
    varchar(50),
    @BankCity
    varchar(50),
    @BankState
    varchar(50),
    @BankZip
    varchar(50),
    @LeaseEstimatedMiles
    varchar(50),
    @AFTReserve
    varchar(50),
    @CreditLifePrem
    varchar(50),
    @CreditLifeRes
    varchar(50),
    @AHRes
    varchar(50),
    @Language
    varchar(50),
    @BuyRate
    varchar(50),
    @DMVAmount
    varchar(50),
    @Weight
    varchar(50),
    @StateDMVTotFee
    varchar(50),
    @ROSNumber
    varchar(50),
    @Incentives
    varchar(50),
    @CASS_STD_LINE1
    varchar(50),
    @CASS_STD_LINE2
    varchar(50),
    @CASS_STD_CITY
    varchar(50),
    @CASS_STD_STATE
    varchar(50),
    @CASS_STD_ZIP
    varchar(50),
    @CASS_STD_ZIP4
    varchar(50),
    @CASS_STD_DPBC
    varchar(50),
    @CASS_STD_CHKDGT
    varchar(50),
    @CASS_STD_CART
    varchar(50),
    @CASS_STD_LOT
    varchar(50),
    @CASS_STD_LOTORD
    varchar(50),
    @CASS_STD_URB
    varchar(50),
    @CASS_STD_FIPS
    varchar(50),
    @CASS_STD_EWS
    varchar(50),
    @CASS_STD_LACS
    varchar(50),
    @CASS_STD_ZIPMOV
    varchar(50),
    @CASS_STD_Z4LOM
    varchar(50),
    @CASS_STD_NDIAPT
    varchar(50),
    @CASS_STD_NDIRR
    varchar(50),
    @CASS_STD_LACSRT
    varchar(50),
    @CASS_STD_ERROR_CD
    varchar(50),
    @NCOA_AC_ID
    varchar(50),
    @NCOA_COA_ADDSRC
    varchar(50),
    @NCOA_COA_MATCH
    varchar(50),
    @NCOA_COA_MOVTYP
    varchar(50),
    @NCOA_COA_DATE
    varchar(50),
    @NCOA_COA_DELCD
    varchar(50),
    @NCOA_COA_RTYPE
    varchar(50),
    @NCOA_COA_RTNCD
    varchar(50),
    @NCOA_COA_LINE1
    varchar(50),
    @NCOA_COA_LINE2
    varchar(50),
    @NCOA_COA_CITY
    varchar(50),
    @NCOA_COA_STATE
    varchar(50),
    @NCOA_COA_ZIP
    varchar(50),
    @NCOA_COA_ZIP4
    varchar(50),
    @NCOA_COA_DPBC
    varchar(50),
    @NCOA_COA_CHKDGT
    varchar(50),
    @NCOA_COA_CART
    varchar(50),
    @NCOA_COA_LOT
    varchar(50),
    @NCOA_COA_LOTORD
    varchar(50),
    @NCOA_COA_URB
    varchar(50),
    @NCOA_COA_Z4LOM
    varchar(50),
    @NCOA_COA_ACTION
    varchar(50),
    @NCOA_COA_QNAME
    varchar(50),
    @NCOA_DPV_AA
    varchar(50),
    @NCOA_DPV_A1
    varchar(50),
    @NCOA_DPV_BB
    varchar(50),
    @NCOA_DPV_CC
    varchar(50),
    @NCOA_DPV_M1
    varchar(50),
    @NCOA_DPV_M3
    varchar(50),
    @NCOA_DPV_N1
    varchar(50),
    @NCOA_DPV_P1
    varchar(50),
    @NCOA_DPV_P3
    varchar(50),
    @NCOA_DPV_RR
    varchar(50),
    @NCOA_DPV_R1
    varchar(50),
    @NCOA_DPV_STATUS
    varchar(50),
    @NCOA_DPV_F1
    varchar(50),
    @NCOA_DPV_G1
    varchar(50),
    @NCOA_DPV_U1
    varchar(50),
    @myerror
    varchar(500),
    @SalesID
    int,
    @errornumber int,
                @errorseverity varchar(500),
                @errorstate int,
                @errorprocedure varchar(500),
                @errorline varchar(50),
                @errormessage varchar(1000);
    DECLARE Sales_Cursor CURSOR FOR 
    SELECT * from FLATFILE_SALES;
    OPEN Sales_Cursor;
     :r C:\Clients\BlackBook\BlackBookMarketing\Bharath\LOG_SALES_INSERT.sql
    WHILE @@FETCH_STATUS = 0
    BEGIN
    PRINT @VehicleVIN    ;
    --===============================================================================
    -- ****************** insert into Sales Table ***********
    BEGIN TRY
        INSERT INTO Sales 
    IconicDealerID,
    DealNumber,
    CustomerNumber,
    DMSType,
    ContractDate
    VALUES (@ClientDealerID,@DealNumber,@CustomerNumber,@DMSType,@ContractDate);
    END TRY
    BEGIN CATCH
         SELECT
            @errornumber = ERROR_NUMBER()
            ,@errorseverity = ERROR_SEVERITY() 
            ,@errorstate = ERROR_STATE() 
            ,@errorprocedure = ERROR_PROCEDURE() 
            ,@errorline = ERROR_LINE()
            ,@errormessage = ERROR_MESSAGE();
           :r C:\Clients\BlackBook\BlackBookMarketing\Bharath\LOG_SALES_INSERT.sql
    @errornumber ,
                @errorseverity ,
                @errorstate,
                @errorprocedure,
                @errorline,
                @errormessage);
    END CATCH
    PRINT @errornumber;
    PRINT @errorseverity;
    PRINT @errorprocedure;
    PRINT @errorline;
    PRINT @errormessage;
    PRINT @errorstate;
    set @myerror = @@ERROR;
        -- This PRINT statement prints 'Error = 0' because
        -- @@ERROR is reset in the IF statement above.
        PRINT N'Error = ' + @myerror;
    set @SalesID = scope_identity();
    PRINT @SalesID;
    --================================================================================
    --Insert into SALES_TRADEIN Table
    BEGIN TRY
    INSERT INTO SALES_TRADEIN
    SalesID,
    TradeIn_VIN,
    TradeIn_Make,
    TradeIn_Model,
    TradeIn_ExteriorColor,
    TradeIn_Year,
    TradeIn_Mileage,
    TradeIn_Gross,
    TradeIn_Payoff,
    TradeIn_ACV,
    TradeIn_InteriorColor
    VALUES
    @SalesID,
    case when  @TradeIn_1_VIN is not null then @TradeIn_2_VIN end,
    case when  @TradeIn_1_Make is not null  then @TradeIn_2_Make end,
    case when  @TradeIn_1_Model is not null  then @TradeIn_2_Model end,
    case when  @TradeIn_1_ExteriorColor is not null  then @TradeIn_2_ExteriorColor end,
    case when @TradeIn_1_Year is not null  then @TradeIn_2_Year end,
    case when  @TradeIn_1_Mileage is not null  then @TradeIn_2_Mileage end,
    case when @TradeIn_1_Gross is not null  then @TradeIn_2_Gross end,
    case when @TradeIn_1_Payoff is not null  then @TradeIn_2_Payoff end,
    case when @TradeIn_1_ACV is not null  then @TradeIn_2_ACV end,
    case when  @TradeIn_1_InteriorColor is not null  then @TradeIn_2_InteriorColor end
    END TRY
    BEGIN CATCH
    SELECT
            @errornumber = ERROR_NUMBER()
            ,@errorseverity = ERROR_SEVERITY() 
            ,@errorstate = ERROR_STATE() 
            ,@errorprocedure = ERROR_PROCEDURE() 
            ,@errorline = ERROR_LINE()
            ,@errormessage = ERROR_MESSAGE();
          :r C:\Clients\BlackBook\BlackBookMarketing\Bharath\LOG_SALES_INSERT.sql
    END CATCH

    This is what I've understood from your question. You want to replace @TradeIn_2_VIN value if @TradeIn_1_VIN
    is NULL, else the value of @TradeIn_1_VIN.
    If this is the requirement then, your CASE statement is missing ELSE part. You can re-write this as below
    case when  @TradeIn_1_VIN is null then @TradeIn_2_VIN
    ELSE @TradeIn_1_VIN end,
    or simply you can replace the CASE statement with the below
    COALESCE function,
    COALESCE(@TradeIn_1_VIN, @TradeIn_2_VIN),
    Krishnakumar S

Maybe you are looking for