Use of Cell Variant for a normal table

Hi Experts,
I have a requirement in a normal table where a row is first in read-only mode, then on click of edit button (given on that row),
the row should become editable and also edit button should become invisible and two more buttons update/cancel have to be visible. How to achieve this using a cell variant for this normal table.
A detailed reply would be appreciated.
Thanks in Advance,
Mirza Hyder.

Hi Mirza,
Cell variant property is used to chenge the cell property not for other.That means in one cell you want checkbox and in other cell you want textview like this you can change the property of cell as you want.
Test this standard program WDR_TEST_TABLE in that test view cell varint for your understanding.
Coming to your requirement.You can do in this way.
Check in the below thread in that i gave code to make the entire row is editable when you click on the lead selection of row.I gave code for ALV.I hope that code is use ful for you.
How to make all columns of alv editable
To make tool bar buttons disable and enable:Write your logic in method handler of lead selection event like change the visible property of button to none.
Note: In the event handler method you dont get reference of view.You only get reference of view in WDDOMODIFYVIEW only so take a global variable of type ref to if_wd_view and populate that global variable in method WDODIFYVIEW.So that you can access any view element in any method.
For cell variant in ALV check this Article written by me.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0e7461d-5e6c-2b10-dda9-9e99df4d136d

Similar Messages

  • Setting new cell variant for an alv table column

    Hi,
    I want to set a new cell variant for a column. Therefore I did the following steps:
    1. Create an object of CL_SALV_WD_CV_STANDARD
    2. SET_KEY( 'CELLVAR1 )
    3. set_cell_design([..]-goodvalue_medium )
    4. SET_EDITOR( lr_alv_input_field )
    After that I added the cell variant to the column by using the method "add_cell_variant".
    The last step is to call method SET_SELECTED_CELL_VARIANT.
    I checked my program by using get_selected_cell_variant( ) and the return string was okay.
    But when the table is displayed, the new cell variant isn't working. I defined an input field as the cell editor for my new cell variant but when the table is shown, it is just text - no input possible. In addition to that the selected cell design (goodvalue_medium , step 3) isn't working. So I think the cell variant is not used.
    Can you help me?
    Thanks & Regards,
    Hendrik

    Hi
    I wonder if you can help me please, I too am having issues implementing ALV cell changes in WDA?
    I am basically trying to dynamically change the individual color of a cell (not the entire column or row) dependant on certain criteria. I apologies but find that you are the closest resource for any potential information. Please see screen shot below.
    Currently my code is as follows:
    see: www.picasaweb.google.co.uk/dave.alexander69/Pictures#5244416971466907938
    data: lr_cv TYPE REF TO cl_salv_wd_cv_standard.
    loop at table 1 row data
            loop at table columns
              for the date columns only...
              IF <fs_column>-id(4) = 'CELL'.
               get and set column header dates from select option user input - done
                loop at table 2 row data (table 2 contains date ranges for row concerned)
                  MOVE: ls_zdata-variance TO lv_variance.
                  method 1 - as in sap press WD4A -:
                  lr_cv = cl_wd_table_standard_cell=>new_table_standard_cell(
                                                     view        = view
                                                    variant_key = lv_variance ).
                 as mentioned...
                  CREATE OBJECT lr_cv.
                  lr_cv->set_key( 'VARIANCE' ).
                  lr_cv->set_cell_design( '09' ).
                  lr_cv->set_editor( lr_input_field ).
                  lr_column->add_cell_variant( lr_cv ).
                  lr_column->set_cell_editor( lr_input_field ).
                  lr_column->set_sel_cell_variant_fieldname( 'VARIANCE' ).
                  lr_column->set_cell_design_fieldname( value = 'COLOR_CELL' ).
                  lr_field = lr_table->if_salv_wd_field_settings~get_field( <fs_column>-id ).
                  lr_field->if_salv_wd_sort~set_sort_allowed( abap_false ).
                  the only way I get cell coloring to work - but this is for entire column?
                  ls_zdata-color_cell = cl_wd_table_standard_cell=>e_cell_design-one.
                  MODIFY lt_zdata FROM ls_zdata..
                ENDLOOP.
              ENDIF.
              IF <fs_column>-id = 'COLOR_CELL'.
                CALL METHOD lr_column->set_visible( EXPORTING value = '00' ).
              ENDIF.
            ENDLOOP
          ENDLOOP.
    As you see I am in the dark a bit regarding cell variants and wonder if you can point me in a better direction.
    Many thanks for any help,
    Dave Alexander

  • Can we use two costing variant for standard cost estimate

    Hi,
    Can we use two costing variant for standard cost estimate of two different materials in the same period ? e.g. Costing variant Z001 for Material code 1000 and Costing Variant Z002 for Material code 2000.
    Here the system is not allowing to change the costing variant in Marking Allowance (t code CK24) for marking and release of Material cost 2000 if the standard cost for Material code 1000 is already marked and released.
    Thanks,
    Bijay

    For a material in a period only one price can be released. Though you cn have two separate costing variants and then calculate standard estimate with that. U can release based on one variant only for a month. Or use MR21 and update the price as per the other variant
    Thanks and Regards

  • List UIBB - Access to cell editor for a certain table line possible

    Hi,
    I am looking for a way to access the cell editor of the last table line as I want to mark it as a special - summary - line.
    I intend a similar approach like in WebDynrpo ABAP when accessing the node info and modifying the "CELL DESIGN" attribute like in the following code (copied from WD Comp WDR_TEST_TABLE, View CELL DESIGN, method FILL_CELL_DESIGNS) :
      data tab type IF_CELL_DESIGN=>Elements_Cell_Designs.
      data line type IF_CELL_DESIGN=>Element_Cell_Designs.
      data node_info type ref to if_wd_context_node_info.
      data attribute_info type wdr_context_attribute_info.
      data attr_value type WDR_CONTEXT_ATTR_VALUE.
      node_info = node->get_node_info( ).
      attribute_info = node_info->get_attribute( 'CELL_DESIGN' ).
      line-is_expanded = abap_true.
      line-is_leaf     = abap_false.
      line-key         = 'FIRST'.
      loop at attribute_info-value_set into attr_value.
        line-text = sy-tabix.
        concatenate 'Text #' line-text into line-text. "#EC NOTEXT
        line-cell_design = attr_value-value.
        insert line into table tab.
        line-is_leaf = abap_true.
        line-key = attr_value-value.
        line-parent_key = 'FIRST'.
      endloop.
      node->bind_table( tab ).
    I suspect the method IF_FPM_GUIBB_LISTGET_DATA (or IF_FPM_GUIBB_LISTGET_DEFINITION) of my feeder class to be the right access point.
    But unfortunately, I have not yet found out how to change the cell design for specific lines, only for whole columns.
    Can anyone give me a hint here?
    BTW: The "summary" line is not a sum of the lines above, but determined by backend logic, so not ALV-summary line for me.
    Kind Regards

    Hi,
    A short update for all interested:
    My current work around is to always set the lead selection to the summary line. It does in a kind "mark" that line as special as long as I cannot mark it using a different cell design.
    How do I assure this?
    I have implemented the following code in a redefinition of the method ADJUST_SELECTION:
    *- alter selection
      DATA:
       ls_size TYPE rstabix.
      "get index of summary line
      ls_size-tabix = mo_collection->size( ).
      "change only if there are any cash conc. proposals
      IF ls_size-tabix > 0.
        "do FPM selection
        CLEAR: ev_lead_index, et_selection.
        ev_lead_index = ls_size-tabix.
        APPEND ls_size TO et_selection.
        "do BOL selection
        mo_collection->if_bol_bo_col_multi_sel~unmark_all( ).
        mo_collection->if_bol_bo_col_multi_sel~mark( iv_index = ls_size-tabix ).
      ENDIF.
    The general downside is, that no other selection is possible!
    The selection is always reset to the summary line with each roundtrip.
    Waiting for a better solution...
    Kind Regards,
    Robert

  • Can we use two costing variants for standards cost estimate release.

    Hi,
    We have 2 plants (plant 5100 and plant 5200) under company code 5000.
    We have run standard cost estimate(CK11N) for material 98001000027 at plant 5100 using costing variant ZG01 and at plant 5200 using costing variant ZG02. First, we released  standard cost estimate (CK24) for this materia at plant 5100 and set (in marking allowance) costing variant ZG01 and costing version 01. Next time when we are trying to release the standard cost estimate for the same material for plant 5200, it is automatically picking ZG01 as costing variant in marking allowance and it is not allowing to change the costing variant to ZG02 saying Company code 5000: Release already carried out, cancellation not possible, Message no. CK797.
    Is it possible to use two different costing variants for release of standard cost estimate for a material at two different plants at the same company code? If so how?
    Please suggest.
    Thanks,
    Bijay

    Hi,
    Thanks for your reply again.
    What is the benefit of assigning "Single Valuation Variant same to different Plants" ? In costing variant also we can assign maximum only one valuation variant and this valuation variant will default for all the plants, and hence I dont think it is necessary to assign same valuation variant to different plants.
    My  issue is :
    Example: ( Standard Cost Estimate for material 98001000027)
    Plant - 1
    Material Cost                                             Rs.100
    Labour Cost                                               Rs.50
    Overheads (10% of Labour Cost)                  Rs.5
    (say ,through costing sheet - 1)
    Total Standard Cost Estimate                      Rs.155
    Plant - 2
    Material Cost                                             Rs.150
    Labour Cost                                               Rs.100
    Overheads (20% of Labour Cost)                  Rs.20
    (say, through costing sheet - 2)
    Total Standard Cost Estimate                      Rs.270
    Now, Please explain why we cannot have two Standard Cost Estimates for a material at two different plants? If it is possible to have two standard cost estimates for a material at two different plants, how to take care of  overheads (rate of which varies) at two different plants (plant - 1 > 10% and plant- 2>20%) as we can assign maximum one costing sheet to a valuation variant variant?
    How to map the system so as to meet the above requirement?
    Thanks,
    Bijay

  • Using large block sizes for index and table spaces

    " You are not using large blocksizes for your index tablespaces. Oracle research proves that indexes will build flatter tree structures in larger blocksizes.
    Is this a generic statement that I can use for all tables or indexes? I also have batch and online activity. My primary target is batch and it should not impact online. Not sure if both have common tables.
    How to find the current block size used for tables and index? is there a v$parameter query?
    What is an optimal block size value for batch?
    How do I know when flatter tree str has been achieved using above changes? Is there a query to determine this?
    What about tables, what is the success criterion for tables. can we use the same flat tree str criterion? Is there a query for this?

    user3390467 wrote:
    " You are not using large blocksizes for your index tablespaces. Oracle research proves that indexes will build flatter tree structures in larger blocksizes.
    Is this a generic statement that I can use for all tables or indexes? This is a generic statement used by some consultants. Unfortunately, it is riddled with exceptions and other considerations.
    One consultant in particular seems to have anecdotal evidence that using different block sizes for index (big) and data (small) can yield almost miraculous improvements. However, that can not be backed up due to NDA. Many of the rest of us can not duplicate the improvements, and indeed some find situations where that results in a degradation (esp with high insert/update rates from separated transactions).
    I also have batch and online activity. My primary target is batch and it should not impact online. Not sure if both have common tables.
    How to find the current block size used for tables and index? is there a v$parameter query?
    What is an optimal block size value for batch?
    How do I know when flatter tree str has been achieved using above changes? Is there a query to determine this?
    What about tables, what is the success criterion for tables. can we use the same flat tree str criterion? Is there a query for this?I'd strongly recommend that you
    1) stop using generic tools to analyze specific problems
    2) define you problem in detail ()what are you really trying to accomplish - seems like performance tuning, but you never really state that)
    3) define the OS and DB version - in detail. Give rev levels and patch levels.
    If you are having a serious performance issue, I strongly recommend you look at some performance tuning specialists like "http://www.method-r.com/", "http://www.miracleas.dk/", "http://www.hotsos.com/", "http://www.pythian.com/", or even Oracle's Performance Tuning consultants. Definitely worth the price of admission.

  • Using a reset button for a dynamic table

    I have a 6 page form that includes several dynamic tables. There is a reset button that clears only specific parts of the form because it is something that will be filled out weekly and a lot of the information will stay the same. My problem is that I want the reset button to clear specific rows of the table, but reset whatever is typed in the row for every instance in the table. The reset button only clears the row I want in the first column, not all the other columns/instances. Has anyone done this before or have any suggestions?
    I don't want to include the whole script for the reset button because it has about 100 fields to clear but essentially this is what I have for the dynamic table and it works but only for the first column/instance, the rest stay the same:
    xfa.host.resetData("form1.Page1.Subform1.Table1.Row5.Textbox1.somExpression");

    Hi,
    I’m not sure I understand your exact scenario but I use a function in a script object that I pass in a subform (possibly the top subform to reset the whole form) and the function resets all fields within it. 
    function resetData(node)
        if (node.className === "field")
            var enableResetData = node.desc.nodes.namedItem("enableResetData");
            if (enableResetData === null || enableResetData.value === true)
                // reset all fields except those with enableResetData set to false
                node.rawValue = null;
        else
            for (var i = 0; i < node.nodes.length; i++)
                var currentNode = node.nodes.item(i);
                if (currentNode.isContainer)
                    // ignore some form objects
                    if (currentNode.className !== "draw" &&
                        currentNode.className !== "variables")
                        resetData(currentNode);
    If there are any fields that I don’t want reset I put the following code in the initialise event of those fields.  Depending on the number of fields involved you might what to reverse this logic.  (you could also add the desc.enableResetData element in the XML Source view)
    var enableResetData = this.desc.nodes.namedItem("enableResetData");
    if (enableResetData == null)
        enableResetData = xfa.form.createNode("boolean", "enableResetData");
        this.desc.nodes.append(enableResetData);
    enableResetData.value = true;
    This works by storing a value “enableResetData” in the desc element of the field, allowing a generic function to have specific behaviour for particular fields.
    Hope this helps.
    Bruce

  • HELP NEEDED: Use a new record for a customized table as a workflow trigger

    Hi SAP Workflow Gurus,
    Good day!
    One of our requirements is to have the creation of a new record in a custom database table trigger a workflow. I read and followed the steps as indicated in this link
    http://www.****************/Tutorials/Workflow/Table/events.htm
    As a summary, here is what I did:
    1. Created a subroutine for the custom table ZPA2003 for the create event
    2. Defined this event as a trigger for the custom workflow WS90000019
    3. Maintained and activated the event linkage via SWETYPV
    Basically I tried following the instructions indicated on the link
    Note that the entries for the custom table are created via a function module.
    Now during testing of the workflow, the system was able to complete the notification message. However, when I triggered the event via creation of the entry in the custom db table nothing happened
    1. Is there a way to debug/find out whether the link between the subroutine in the table and event itself are connected?
    2. I also tried running the event trace to check the activities executed but found nothing.
    Can you guys help me check on what I may have missed out?
    Regards,

    Hi All,
    Basically these are the requirements for the work schedule substitution:
    1. Employee enters the request via ESS (custom portal transaction)
    2. Upon saving of the entry (request) in a custom  table, this should trigger the workflow at the backend
    3. The Manager should then receive a work item in his Universal Worklist at the MSS side of the portal
    4. Upon clicking on the work item, a new screen will pop up showing the work schedule substitution details as well as an interface which will allow him to enter his/her usage decision
    5. Depending on the decision, the workflow must execute the necessary notifications as well as changes in the custom and PA2003 tables
    Now, we have accomplished step 1 and I am currently in the process for step 2. Now I have some queries:
    1. For the Manager to view and approve the substitution details, I used two methods for each process (view and approve) since our ABAPer mentioned that this cannot be done in 1 function module. Is there a way to simplify this step or is it really valid that they need to be executed in 2 different methods?
    2. As per our ABAPer, function Modules only import and export variables; they do not have the facility of say having tags on the details being displayed. Hence, if the details are 10001 (Employee Number), 10/20/2011 (Start Date), 10/25/2011 (End Date) the output would be 10001, 10/20/2011, 10/25/2011. Is there a way within the function module (or dynpro interface) to show it like this: Employee Number: 10001
                               Start Date: 10/20/2011
                               End Date: 10/25/2011
    3.  Speaking of dynpro applications, do I need to still develop one to allow the Manager to view and approve/reject the request via the MSS portal upon accessing the work item via the UWL? How would the work item go about calling the dynpro application? or is this even possible?
    It would have been easier if the facility would not pass through workflows since it will be just direct web dynpro/ABAP calls. Having to include it as a work item in the UWL puts a certain twist to it
    Your inputs are well-appreciated.
    Regards,

  • Can I use a cell value to reference a table on another sheet?

    I'm not sure if this is possible and I have had no luck with searches, here is what I am attempting to do...
    On my first sheet I have a number of tables, each holding information on a service. Each table is named to match the service name.
    On another sheet I have a list of clients that use these services, with the service name (to match the table name on the first sheet) in a cell in the client's row.
    I would like to pull data from one of the cells on the Service table to include it in a concatenate formula in the clients row.
    I was hoping to be able to use the value of the cell with the service name in it as part of the formula to reference the service sheet...
    For example:
    ="something"&Services::B2::C6&"something"
    Is this possible, or is there a way I can work around the auto corrections that numbers keeps applying?
    Cheers

    you can construct the text of a cell reference as a string by concatenating information then use the function indirect() to turn the string into a reference.
    so you would do something like:
    =indirect("something"&Services::B2::C6&"something")
    this is assuming that "something"&Services::B2::C6&"something"  results in a string that would be a valid reference.

  • Using WHERE NOT EXISTS for a Fact Table Load

    I'm trying to set up a fact table load using T SQL, and I need to use WHERE NOT EXISTS. All of the fields from the fact table are listed in the WHERE NOT EXISTS clause. What I expect is that if the value of any one of the fields is different, that the whole
    record be treated as a new record, and inserted into the table. However, in my testing, when I 'force' a field value, new records are not inserted.
    The following is my query:
    declare 
    @Created_By nchar(50)
    ,@Created_Date datetime --do we need utc check?
    ,@Updated_By nchar(50)
    ,@Updated_Date datetime
    select @Created_By = system_user
    ,@Created_Date = getdate()
    ,@Updated_By = system_user
    ,@Updated_Date = getdate()
    insert fact.Appointment
    Slot_ID
    , Slot_DateTime
    , Slot_StartDateTime
    , Slot_EndDateTime
    , Slot_Duration_min
    , Slot_CreateDateTime
    , Slot_CreateDate_DateKey
    , Healthcare_System_ID
    , Healthcare_Service_ID
    , Healthcare_Supervising_Service_ID
    , Healthcare_Site_ID
    , Booked_Appt_ID
    , Appt_Notification_Submission_DateKey
    , Appt_Notification_Completion_DateKey
    , Appt_Notification_Duration
    , Appt_Notification_ID
    , Patient_ID
    , Physician_ID
    , Referral_ID
    , Specialty
    , LanguageRequested
    , Created_Date
    , Created_By
    , Updated_Date
    , Updated_By
    select distinct
    Slot.Slot_ID 
    , Slot.Slot_Start_DateTime  as Slot_DateTime --???
    , Slot.Slot_Start_DateTime
    , Slot.Slot_End_DateTime
    , datediff(mi,slot.Slot_Start_DateTime,slot.Slot_End_Datetime) as Slot_Duration_Min 
    , Slot.Created_Date as Slot_CreateDateTime
    , SlotCreateDate.Date_key as Slot_CreateDate_DateKey
    , HSite.Healthcare_System_ID
    , HSite.Healthcare_Service_ID
    , HSite.Healthcare_Service_ID as Healthcare_Supervising_Service_ID
    , HSite.Healthcare_Site_ID 
    , Ref.Booked_Appt_ID 
    , ApptSubmissionTime.Date_key as Appt_Notification_Submission_DateKey
    , ApptCompletionTime.Date_key as Appt_Notification_Completion_DateKey
    , datediff(mi,appt.SubmissionTime,appt.CompletionTime) as Appt_Notification_Duration
    , Appt.Appt_Notification_ID 
    , pat.Patient_ID 
    , 0 as Physician_ID
    , ref.Referral_ID
    , Hsrv.Specialty
    , appt.[Language] as LanguageRequested
    ,@Created_Date as Created_Date
    ,@Created_By as Created_By
    ,@Updated_Date as Updated_Date
    ,@Updated_By as Updated_By
    from dim.Healthcare_System HSys
    inner join dim.Healthcare_Service HSrv
    on HSys.Healthcare_System_ID = HSrv.HealthCare_System_ID 
    inner join dim.Healthcare_Site HSite
    on HSite.HealthCare_Service_ID = HSrv.Healthcare_Service_ID
    and HSite.HealthCare_System_ID = HSrv.HealthCare_System_ID 
    inner join dim.Referral Ref 
    on Ref.ReferralSite_ID = HSite.Site_ID
    and Ref.ReferralService_ID = HSite.Service_ID
    and Ref.ReferralSystem_ID = HSite.System_ID 
    right join (select distinct Slot_ID, Source_Slot_ID, Slot_Start_DateTime, Slot_End_DateTime, Created_Date from dim.slot)slot
    on ref.Source_Slot_ID = slot.Source_Slot_ID
    inner join dim.Appointment_Notification appt
    on appt.System_ID = HSys.System_ID
    inner join dim.Patient pat 
    on pat.Source_Patient_ID = appt.Source_Patient_ID
    inner join dim.SystemUser SysUser
    on SysUser.Healthcare_System_ID = HSys.Healthcare_System_ID
    left join dim.Calendar SlotCreateDate
    on SlotCreateDate.Full_DateTime = cast(Slot.Created_Date as smalldatetime)
    left join dim.Calendar ApptSubmissionTime
    on ApptSubmissionTime.Full_DateTime = cast(appt.SubmissionTime as smalldatetime)
    left join dim.Calendar ApptCompletionTime
    on ApptCompletionTime.Full_DateTime = cast(appt.CompletionTime as smalldatetime)
    where not exists
    select
    Slot_ID
    , Slot_DateTime
    , Slot_StartDateTime
    , Slot_EndDateTime
    , Slot_Duration_min
    , Slot_CreateDateTime
    , Slot_CreateDate_DateKey
    , Healthcare_System_ID
    , Healthcare_Service_ID
    , Healthcare_Supervising_Service_ID
    , Healthcare_Site_ID
    , Booked_Appt_ID
    , Appt_Notification_Submission_DateKey
    , Appt_Notification_Completion_DateKey
    , Appt_Notification_Duration
    , Appt_Notification_ID
    , Patient_ID
    , Physician_ID
    , Referral_ID
    , Specialty
    , LanguageRequested
    , Created_Date
    , Created_By
    , Updated_Date
    , Updated_By
    from fact.Appointment
    I don't have any issues with the initial insert, but records are not inserted on subsequent inserts when one of the WHERE NOT EXISTS field values changes.
    What am I doing wrong?
    Thank you for your help.
    cdun2

    so I set up a WHERE NOT EXIST condition as shown below. I ran the query, then updated Slot_Duration_Min to 5. Some of the Slot_Duration_Min values resolve to 15. What I expect is that when I run the query again, that the records where Slot_Duration_Min resolves
    to 15 should be inserted again, but they are not. I am using or with the conditions in the WHERE clause because if any one of the values is different, then a new record needs to be inserted:
    declare 
    @Created_By nchar(50)
    ,@Created_Date datetime
    ,@Updated_By nchar(50)
    ,@Updated_Date datetime
    select
    @Created_By = system_user
    ,@Created_Date = getdate()
    ,@Updated_By = system_user
    ,@Updated_Date = getdate()
    insert fact.Appointment
    Slot_ID
    , Slot_DateTime
    , Slot_StartDateTime
    , Slot_EndDateTime
    , Slot_Duration_min
    , Slot_CreateDateTime
    , Slot_CreateDate_DateKey
    , Healthcare_System_ID
    , Healthcare_Service_ID
    , Healthcare_Supervising_Service_ID
    , Healthcare_Site_ID
    , Booked_Appt_ID
    , Appt_Notification_Submission_DateKey
    , Appt_Notification_Completion_DateKey
    , Appt_Notification_Duration
    , Appt_Notification_ID
    , Patient_ID
    , Physician_ID
    , Referral_ID
    , Specialty
    , LanguageRequested
    , Created_Date
    , Created_By
    , Updated_Date
    , Updated_By
    select distinct
    Slot.Slot_ID 
    , Slot.Slot_Start_DateTime  as Slot_DateTime --???
    , Slot.Slot_Start_DateTime
    , Slot.Slot_End_DateTime
    , datediff(mi,slot.Slot_Start_DateTime,slot.Slot_End_Datetime) as Slot_Duration_Min 
    , Slot.Created_Date as Slot_CreateDateTime
    , SlotCreateDate.Date_key as Slot_CreateDate_DateKey
    , HSite.Healthcare_System_ID
    , HSite.Healthcare_Service_ID
    , HSite.Healthcare_Service_ID as Healthcare_Supervising_Service_ID
    , HSite.Healthcare_Site_ID 
    , Ref.Booked_Appt_ID 
    , ApptSubmissionTime.Date_key as Appt_Notification_Submission_DateKey
    , ApptCompletionTime.Date_key as Appt_Notification_Completion_DateKey
    , datediff(mi,appt.SubmissionTime,appt.CompletionTime) as Appt_Notification_Duration
    , Appt.Appt_Notification_ID 
    , pat.Patient_ID 
    , 0 as Physician_ID
    , ref.Referral_ID
    , Hsrv.Specialty
    , appt.[Language] as LanguageRequested
    ,@Created_Date as Created_Date
    ,@Created_By as Created_By
    ,@Updated_Date as Updated_Date
    ,@Updated_By as Updated_By
    from dim.Healthcare_System HSys
    inner join dim.Healthcare_Service HSrv
    on HSys.Healthcare_System_ID = HSrv.HealthCare_System_ID 
    inner join dim.Healthcare_Site HSite
    on HSite.HealthCare_Service_ID = HSrv.Healthcare_Service_ID
    and HSite.HealthCare_System_ID = HSrv.HealthCare_System_ID 
    inner join dim.Referral Ref 
    on Ref.ReferralSite_ID = HSite.Site_ID
    and Ref.ReferralService_ID = HSite.Service_ID
    and Ref.ReferralSystem_ID = HSite.System_ID 
    right join (select distinct Slot_ID, Source_Slot_ID, Slot_Start_DateTime, Slot_End_DateTime, Created_Date from dim.slot)slot
    on ref.Source_Slot_ID = slot.Source_Slot_ID
    inner join dim.Appointment_Notification appt
    on appt.System_ID = HSys.System_ID
    inner join dim.Patient pat 
    on pat.Source_Patient_ID = appt.Source_Patient_ID
    inner join dim.SystemUser SysUser
    on SysUser.Healthcare_System_ID = HSys.Healthcare_System_ID
    left join dim.Calendar SlotCreateDate
    on SlotCreateDate.Full_DateTime = cast(Slot.Created_Date as smalldatetime)
    left join dim.Calendar ApptSubmissionTime
    on ApptSubmissionTime.Full_DateTime = cast(appt.SubmissionTime as smalldatetime)
    left join dim.Calendar ApptCompletionTime
    on ApptCompletionTime.Full_DateTime = cast(appt.CompletionTime as smalldatetime)
    where not exists
    select
    Slot_ID
    , Slot_DateTime
    , Slot_StartDateTime
    , Slot_EndDateTime
    , Slot_Duration_min
    , Slot_CreateDateTime
    , Slot_CreateDate_DateKey
    , Healthcare_System_ID
    , Healthcare_Service_ID
    , Healthcare_Supervising_Service_ID
    , Healthcare_Site_ID
    , Booked_Appt_ID
    , Appt_Notification_Submission_DateKey
    , Appt_Notification_Completion_DateKey
    , Appt_Notification_Duration
    , Appt_Notification_ID
    , Patient_ID
    , Physician_ID
    , Referral_ID
    , Specialty
    , LanguageRequested
    , Created_Date
    , Created_By
    , Updated_Date
    , Updated_By
    from fact.Appointment fact
    where 
    Slot.Slot_ID  = fact.Slot_ID 
    or
    Slot.Slot_Start_DateTime   = fact.Slot_DateTime  
    or
    Slot.Slot_Start_DateTime = fact.Slot_StartDateTime
    or
    Slot.Slot_End_DateTime = fact.Slot_EndDateTime
    or
    datediff(mi,slot.Slot_Start_DateTime,slot.Slot_End_Datetime) =
    fact.Slot_Duration_min
    or
    Slot.Created_Date  = fact.Slot_CreateDateTime
    or
    SlotCreateDate.Date_key = fact.Slot_CreateDate_DateKey
    or
    HSite.Healthcare_System_ID = fact.Healthcare_System_ID
    or
    HSite.Healthcare_Service_ID = fact.Healthcare_Service_ID
    or
    HSite.Healthcare_Service_ID  =
    fact.Healthcare_Service_ID 
    or
    HSite.Healthcare_Site_ID  = fact.Healthcare_Site_ID 
    or
    Ref.Booked_Appt_ID  = fact.Booked_Appt_ID 
    or
    ApptSubmissionTime.Date_key =
    fact.Appt_Notification_Submission_DateKey
    or
    ApptCompletionTime.Date_key =
    fact.Appt_Notification_Completion_DateKey
    or 
    datediff(mi,appt.SubmissionTime,appt.CompletionTime)  = fact.Appt_Notification_Duration
    or
    Appt.Appt_Notification_ID = fact.Appt_Notification_ID 
    or
    pat.Patient_ID  =
    fact.Patient_ID 
    or
    0 = 0
    or
    ref.Referral_ID = fact.Referral_ID
    or
    Hsrv.Specialty = fact.Specialty
    or
    appt.[Language] = fact.LanguageRequested

  • IDOC trigger using Z change pointers for standard SAP table

    For IDOC trigger, is using custom change pointers on standard SAP master data tables, a good idea? A seasoned abaper told me "it will mess with the standard" and further told to go with scheduled job.
    So, for example, say that my data for table T001K is updated via transports in PRD and I need to transfer this updated data via IDOC to an external system. Since there is no standard message type for this data, I will create a new one. Further, I will create a new change pointer for table T001K (it already has six fields with their data elements activated for Change Documents). Then I link the message type and the new change pointer. And so on an so forth. I have followed the procedure given here:SAP Tips: A to Z of Custom Change Pointer
    Now, the question is, will this be a good idea to capture data and trigger IDOC? Or a batch program with calls to standard FM to read CDHRD/CDPOS be a more suitable option.
    I need to know if a near instantaneous data transfer (and an effecient one as far as the system performance and reliability is concerned) can be acheived. If there is any other way of doing this, I am not aware of it!
    Any one has any input/experience on this?

    Hi Viktor,
    I think the batch program approach would be a good solution as the by this way you are taking matter into your own hands rather giving control to the SAP framework because you may have to test out the other approach as to how the standard SAP framework is behaving for custom change pointers.
    Thanks,
    Ravi

  • How to use sp_msforeachdb with sp_rename for changing two table names in each databases-

    I have around 990 databases on a single SQL server in which I want to rename two tables 'AuditEvent' and 'AuditPropertyEvent' to 'AuditEvent_Archive' and AuditPropertyEvent_Archive table.
    Then I want to transfer lastest 6 months of data from now newly rename archived tables to New created Auditevent tables (Which will have same structure as old),
    For doing it I tried Cursor and SP_msforeachdb as possible solutions but its not allowing me to execute 2 sp_rename statements with go inside a dynamic statement.
    Please suggest any possible solutions on how to rename the 2 tables in all databases using sp_msforeachdb or cursor in a single go.

    exec sp_msforeachdb '
    USE [?]
    IF EXISTS (SELECT 1 FROM ?.INFORMATION_SCHEMA.TABLES WHER TABLE_NAME = ''AuditEvent'')
    EXEC sp_rename ''AuditEvent'',''AuditEvent_Archive''
    IF EXISTS (SELECT 1 FROM ?.INFORMATION_SCHEMA.TABLES WHER TABLE_NAME = ''AuditPropertyEvent'')
    EXEC sp_rename ''AuditPropertyEvent'',''AuditPropertyEvent_Archive''
    SELECT *
    INTO AuditEvent
    FROM AuditEvent_Archive
    WHERE datecolumn>dateadd(month,-6,getdate())
    SELECT *
    INTO AuditPropertyEvent
    FROM AuditPropertyEvent_Archive
    WHERE datecolumn >dateadd(month,-6,getdate())
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to know the column name using the index name for a particular table

    Hi All,
    I have small query regarding, I have index name and table name so by using this how can I know the column name associated with that index of that particular table specific to Oracle9i.
    Thanks
    Sudheer

    select *
    from user_ind_columns -- or all_ind_columns
    where table_name = UPPER('&table_name')
    and index_name = UPPER('&index_name');
    Regards
    Arun
    Gurgaon

  • Using my cell phone for my internet access w/pdanet now computer all messed up help

    browser keeps logging off ie,google,firefox.computer starting slow ,pages load slow and most links seem to go around in circles is there an automated fix for dummys like me please help.

    Many site issues can be caused by corrupt cookies or cache. In order to try to fix these problems, the first step is to clear both cookies and the cache.
    The Firefox cache temporarily stores images, scripts, and other parts of websites while you are browsing. <br>
    Note: ''This will temporarily log you out of all sites you're logged in to.''
    To clear cache and cookies, do the following:
    #Tap the menu icon located at the top right corner. This is the icon with 3 bars. On older Android devices you'll have to press the hardware menu key and then tap More.
    #Tap '''Settings'''.
    #After that, you will be taken to the settings screen. In the settings screen, look under the section '''''Privacy & Security''''' and select '''Clear private data'''.
    #You will then be taken to a list of what can be cleared. Select the following 2 for deletion:
    #*Cookies & active logins
    #*Cache
    #After those have been selected, tap the '''Clear data''' button to actually clear the cache and cookies.
    Make sure that, your using latest version of Firefox
    Try the Beta version of Firefox
    *https://play.google.com/store/apps/details?id=org.mozilla.firefox_beta

  • CELL VARIANT

    Hi Experts,
    Could you provide me detailed information on how to use the cell variants in a normal table in Webdynpro ABAP (using the cell variants to make a read-only field as input field/dropdown field on the click of a button).
    Thanks in Advance,
    Mirza.

    Hi Mirza,
    Please go through this excellent [blog|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0e7461d-5e6c-2b10-dda9-9e99df4d136d] by Suman Kumar in which he explains usage of cell variants to make the cells of a column as checkboxes or textviews dynamically.
    Regards,
    Uday

Maybe you are looking for

  • Requirement in Cell Editor

    Hello Guys, I am having one requirement in Cell Editor. My report is static report. I mean all the columns and rows already decided. My infoprovider is contain only one characteristics and two key figures. My characteristic is Circle and the Key Figu

  • Javascript fails on 'next ' and/or slideshow

    The 'next>' shows as 'javascript:void(0);' and fails to move to next screen, just reloads the current page. Alternatively the slide show bar option also fails to proceeed, just continues to reload the initial page.

  • What is the iPad alternative to Flash Player?

    What is the iPad alternative to Flash Player?

  • Photoshop CS6 No lens profiles (lens correction filter) for Canon 6D raw files

    LightRoom and Camera Raw have profiles for Lens Correction and all the current available lens are  in the list for the Canon 6D raw files. BUT the Filter/Lens Correction when in Photoshop CS6 only have 2 Tamron lens listed. Odd that there are lens pr

  • Database PCH

    Hi Experts, with the following macros I can restrict the results on the database PCH. TABLES: objec. START-OF-SELECTION. RH-SET-INDEX-INFTY '1007'. RH-CONDITION-LINE VACAN EQ 'X' SPACE. RH-SET-INDEX-INFTY-CONDITION. GET objec. Is it possible to repea