Diff dev dates

HI,
In a sales order having 10 different line items.,with different dates of delivery dates.Then how sales order is created & what are the settings we haveto customize & how pricing can be done for that each individual line item.
Please give me the solution for this.
Thanks,
rash

Hi,
As you say for 1o line items system has given different delivery dates, then in that case there is no problem if you save the sales order. But, this sales order will create different deliveries according to the delivery date. And if your customer needs only complete delivery then system will not allow you to create the delivery itself. Then, in that case you will have to change the delivery dates for all the items and keep a single date..
Hope this will give you the solution.
Hrishi

Similar Messages

  • SQL DEV DATA MODELER VERSION CONTROL

    Hi Anyone can tell me how to setup an environment to do version controlling with sql DEV data modeler.
    Thanks

    Hi,
    you can use visualSVN server - it has a free edition http://www.visualsvn.com/server/
    and getting started is here http://www.visualsvn.com/server/getting-started/
    Philip

  • BEX Query Views - Reqd in PRD but need to create in Dev - Data Issues

    Hello Bw Gurus 
    BI 7.0 ECC 4.7
    We have a BEx Query in BI production which uses a work centre hierarchy. The user wants to create query views on this query to use in BI production.
    Our normal transport procedure of a new development object would be BI DEV - QA - PRD
    However the DEV environment does not have all the work centres and the data of PRD. So if the query view needs to be created in DEV then we could not set up the view correctly as there is not the workcenters or the data in DEV.
    Hopefully that makes sense?
    Apart from allowing Query Views to be created in BI PRD directly is there any solution?
    Best,
    Steve Jones

    If you need exact char values for workcenter to create your views you can quickly create the master data (just the values you want) in Dev and use them to create the views...

  • Need MDX query to find something like date diff and Date Range for last 10 days

    Hi ,
    I need two Query .First Query for below;
    I have below data in table like.
    Cat      StartDate    EndDate     
    A    2000-01-01     2000-01-15   
    B    2000-01-02     2000-01-30    
    C    2000-01-01     2000-01-31    
    D    2000-02-01     2000-02-28    
    A    2000-01-10     2000-01-31    
    I need if Startdate and Date completes whole one month then set status =1 else  0 using MDX query.
    like this ;
    Cat      StartDate    EndDate       Status
    A    2000-01-01     2000-01-15    1
    B    2000-01-02     2000-01-30    0
    C    2000-01-01     2000-01-31    1
    D    2000-02-01     2000-02-28    1
    A    2000-01-10     2000-01-31    1
    In second query I need last 10 days from current days like;
    Now = 8/20/2014
    output will be ;
    8/20/2014
    8/19/2014
    8/18/2014
    8/17/2014
    8/16/2014
    8/15/2014
    8/14/2014
    8/13/2014
    8/12/2014
    8/11/2014
    8/10/2014
    Please help me .
    Thanks

    Hi Prajapati,
    In your scenario, you can use Properties and Datediff function to achieve your requirement. Since not know the structure of your cube, we cannot give you the esact query.
     I have tested it on the AdventureWorks cube, the query below is for you reference.
    WITH MEMBER [Measures].[StartDate]
    AS
    [Employee].[Employee Department].CURRENTMEMBER.PROPERTIES('Start Date')
    MEMBER [Measures].[WorkYear]
    AS
    DATEDIFF('yyyy',[Measures].[StartDate],NOW())
    MEMBER [Measures].[Status]
    AS
    IIF(DATEDIFF('yyyy',[Measures].[StartDate],NOW())>10,1,0)
    SELECT {[Measures].[StartDate],[Measures].[WorkYear],[Measures].[Status]} ON 0,
    [Employee].[Employee Department].[Employee].MEMBERS ON 1
    FROM [Adventure Works]
    Results
    Reference
    http://msdn.microsoft.com/en-us/library/ms144821.aspx
    Regards,
    Charlie Liao
    TechNet Community Support

  • FV60 and MIRO -duplicate invoice doent chk for diff inv dates

    In ecc 6.0 ,We use FV60 and MIRO  to enter all invoices. We have config (under MM) for duplicate invoice check against  "ref field" only. When we enter an invoice with the same ref field value, it gives error message as expected. However, when we change the date, the error message is gone and we are allowed to create the invoice and post the invoice.
    Pls help

    Hi,
    Check your config for duplicate invoices.  There is another check box for "Check Invoice Date", see if it is checked.  If yes, then remove it and the system should not allow you to post the same invoice with a different date.
    Cheers.

  • Spatial support in SQL Dev Data Modeler

    Hi,
    I am designing some tables using the new SQL Developer Data Modeler, and have added some columns which will store point clouds and TINs (both using the specialized Oracle data types). I have noticed in Data Modeler that the SDO_GEOMETRY data type is available to use as a column type, but the SDO_PC and SDO_TIN data types are not available for use. Or perhaps the column types for these data types are actually something else - perhaps integers (given that several tables may be used to store this specialized data)?
    Thanks,
    Matt

    Hi Matt,
    there are additional meta data related to spatial tables (and indexes) - Data modeler helps these data to be defined and properly registered in USER_SDO_GEOM_METADATA view. Also specific meta data for spatial indexes can be defined - unfortunately support for spatial indexes in dialogs is broken. Still table related spatial meta data can be defined and generated - see example below. You also can import spatial meta data from database (support is at Oracle 10g level) - you need to check "Spatial Properties" in "Data dictionary Import wizard".
    About SDO_Geometry data type and other types in MDSYS schema - SDO_Geometry comes predefined because of its importance for spatial table definitions - but that definition is incomplete (and still enough to be used). If you need complete definition of SDO_Geometry type or other types in MDSYS schema, you simply can import them from database and can use them in your model.
    Philip
    here is DDL with spatial meta data:
    - Generated by Oracle SQL Developer Data Modeler Version: 2.0.0 Build: 570
    -- at: 2009-07-22 00:12:29
    -- site: Oracle Database 10g
    -- type: Oracle Database 10g
    CREATE OR REPLACE TYPE MARKET_TYPE
    CREATE OR REPLACE TYPE MARKET_TYPE
    AS OBJECT
    SHAPE SDO_GEOMETRY ,
    NAME VARCHAR2 (32)
    ) NOT FINAL
    CREATE TABLE COLA_MARKETS
    MKT_ID NUMBER NOT NULL ,
    NAME VARCHAR2 (32 BYTE) ,
    SHAPE MDSYS.SDO_GEOMETRY
    ALTER TABLE COLA_MARKETS
    ADD CONSTRAINT PK_COLA_MARKETS PRIMARY KEY ( MKT_ID ) ;
    CREATE TABLE COLA_MARKETS_2
    MKT_ID NUMBER NOT NULL ,
    MARKET MARKET_TYPE NOT NULL
    ALTER TABLE COLA_MARKETS_2
    ADD CONSTRAINT PK_COLA_MARKETS_2 PRIMARY KEY ( MKT_ID ) ;
    CREATE TABLE LONG_LAT_TABLE
    LONGITUDE NUMBER ,
    LATITUDE NUMBER ,
    NAME VARCHAR2 (32 BYTE)
    INSERT INTO USER_SDO_GEOM_METADATA ( TABLE_NAME , COLUMN_NAME , DIMINFO , SRID )
    VALUES ( 'COLA_MARKETS', 'SHAPE' ,
    MDSYS.SDO_DIM_ARRAY (
    MDSYS.SDO_DIM_ELEMENT ('X',0,20,0.005),
    MDSYS.SDO_DIM_ELEMENT ('Y',0,20,0.005)
    NULL
    INSERT INTO USER_SDO_GEOM_METADATA
    VALUES
    'COLA_MARKETS_2',
    'MARKET.SHAPE',
    MDSYS.SDO_DIM_ARRAY (
    MDSYS.SDO_DIM_ELEMENT ('X',0,20,0.005),
    MDSYS.SDO_DIM_ELEMENT ('Y',0,20,0.005)
    NULL
    CREATE INDEX COLA_SPATIAL_IDX_2 ON COLA_MARKETS_2
    MARKET.SHAPE
    INDEXTYPE IS MDSYS.SPATIAL_INDEX
    INSERT INTO USER_SDO_GEOM_METADATA
    VALUES
    'LONG_LAT_TABLE',
    'GET_LONG_LAT_PT(LONGITUDE,LATITUDE)',
    MDSYS.SDO_DIM_ARRAY (
    MDSYS.SDO_DIM_ELEMENT ('Longitude',-180,180,0.005),
    MDSYS.SDO_DIM_ELEMENT ('Latitude',-90,90,0.005)
    8307
    ;

  • SQL Dev Data Modeller:  Auto-generate Surrogate PKs in the Physical Model ?

    How can I have the logical modeller allow the user to design with logical PKs, but then have surrogate primary keys be auto-generated off sequences by the modeller when it comes to create the physical model - as in conventional application design?
    Without this facility, this tool is useless, IMO.
    I want:
    i). sequences to become the physical PKs by default, and that what were the logical PKs in the logical model, to become a unique key in the physical model.
    ii). I want this set by default when generating the physical model....
    iii). ....with an option to turn this off on a entity-by-entity basis (as not all tables will necessarily require such a surrogate PK; so the logical PK may remain the physical PK).

    It is common practice that physical PKs in Oracle tables are defined from sequences (surrogate PKs), and that the logical PK from the entity becomes a unique key in the table.
    This may not always be the case in every application out there, and some people may disagree, but it is nonetheless a needed feature.
    My new Feature Request is therefore:
    I would like to see the following additions to the product.
    1. In the Preferences -> Data Modeler -> Model -> Logical, a flag that by default indicates whether the designer wishes to opt to enable this feature (ie; have all logical PKs converted to unique keys, and replaced by sequence nos. in the physical model). This flags needs to be there since in real life, albeit erroneously IMO, some people will choose not to opt to use this functionality.
    2. On every entity created in the model, there needs to be a flag that allows to override this default option, as not every table will require a surrogate PK to be generated. Being able to (re)set a flag located on the entity properties (perhaps under 'Engineer To'), will accomplish this.
    3. When Forward Engineering to the physical model from the logical, the following should happen.
    ENTITY  1 ---------->TABLE 1
    ---------------------> P * Surrogate PK
    * Attribute 1 -----> U * Column 1
    * Attribute 2 -----> U * Column 2
    o Attribute 3 ----------> Column 3
    Here you can see,
    - Attributes 1 & 2 (the logical PK) of the entity become a unique key in the table (columns 1 & 2),
    - optional Attribute 3 becomes NULLable column 3,
    - and a physical surrogate PK column is added (type unbounded INTEGER, PRIMARY KEY constraint added).
    From entity DEPT as:   (Examples based on SCOTT schema)
    DEPTNO NUMBER(2) NOT NULL <-- Logical primary key on entity
    DNAME VARCHAR2(14)
    LOC VARCHAR2(13)
    CREATE TABLE DEPT
    (PK_DEPT INTEGER, -- New column becomes surrogate physical PK, driven from sequence defined later
    DEPTNO NUMBER(2) NOT NULL, -- Former logical PK becomes a UK
    DNAME VARCHAR2(14),
    LOC VARCHAR2(13))
    ALTER TABLE DEPT
    ADD CONSTRAINT PK_DEPT PRIMARY KEY (PK_DEPT) USING INDEX PCTFREE 0
    ALTER TABLE DEPT
    ADD CONSTRAINT UKLPK_DEPTNO UNIQUE (DEPTNO) USING INDEX PCTFREE 0 -- Former logical PK becomes a UK (constraint name reflects this)
    CREATE SEQUENCE PK_DEPT_SEQ
    CREATE TRIGGER PK_DEPT_SEQ_TRG
    BEFORE INSERT ON DEPT
    FOR EACH ROW
    WHEN (new.PK_DEPT IS NULL)
    BEGIN
    SELECT PK_DEPT_SEQ.NEXTVAL
    INTO :new.PK_DEPT
    FROM DUAL;
    -- Or from 11g onwards, simply,
    :new.PK_DEPT := PK_DEPT_SEQ.NEXTVAL;
    END;
    From entity EMP as:
    EMPNO NUMBER(4) NOT NULL -- Logical primary key on entity
    ENAME VARCHAR2(10)
    JOB VARCHAR2(9)
    MGR NUMBER(4)
    HIREDATE DATE
    SAL NUMBER(7,2)
    COMM NUMBER(7,2)
    DEPTNO NUMBER(2)
    CREATE TABLE EMP
    (PK_EMP INTEGER, -- New column becomes surrogate physical PK, driven from sequence defined later
    FK_DEPT INTEGER, -- New FK to surrogate PK in DEPT table (maybe NOT NULL depending on relationship with parent)
    EMPNO NUMBER(4) NOT NULL, -- Former logical PK becomes a UK
    ENAME VARCHAR2(10),
    JOB VARCHAR2(9),
    MGR NUMBER(4),
    HIREDATE DATE,
    SAL NUMBER(7,2),
    COMM NUMBER(7,2),
    DEPTNO NUMBER(2))
    ALTER TABLE EMP
    ADD CONSTRAINT PK_EMP PRIMARY KEY (PK_EMP) USING INDEX PCTFREE 0
    ALTER TABLE EMP
    ADD CONSTRAINT FK_DEPT FOREIGN KEY (FK_DEPT) REFERENCES DEPT (PK_DEPT)
    ALTER TABLE EMP
    ADD CONSTRAINT UKLPK_EMPNO UNIQUE (EMPNO) USING INDEX PCTFREE 0 -- Former logical PK becomes a UK (constraint name reflects this)
    CREATE SEQUENCE PK_EMP_SEQ
    CREATE TRIGGER PK_EMP_SEQ_TRG
    BEFORE INSERT ON EMP
    FOR EACH ROW
    WHEN (new.PK_EMP IS NULL)
    BEGIN
    SELECT PK_EMP_SEQ.NEXTVAL
    INTO :new.PK_EMP
    FROM DUAL;
    -- Or from 11g onwards, simply,
    :new.PK_EMP := PK_EMP_SEQ.NEXTVAL;
    END;
    [NOTE:   I use PCTFREE 0 to define the index attributes for the primary & unique keys since the assumption is that they will in general not get updated, thereby allowing for the denser packing of entries in the indexes and the (albeit minor) advantages that go with it.
    This is certainly always true of a sequence-driven primary key (as it is by its very nature immutable), but if the unique key is likely to be frequently updated, then this PCTFREE option could be user-configurable on a per table basis (perhaps under Table Properties -> unique Constraints).
    For non-sequence-driven primary keys, this storage option could also appear under Table Properties -> Primary Key.
    I notice no storage options exist in general for objects, so you may like to consider adding this functionality overall].
    Associated Issues :
    - Preferences, 'Naming Standard: Templates' should be updated to allow for the unique key/constraint to be called something different, thus highlighting that it comes from the logical PK. I've used 'UKLPK' in this example.
    - Mark the physical PK as being generated from a sequence; perhaps a flag under Table Properties -> Primary Key.
    - When Forward Engineering, if an entity exists without a logical PK, the forward engineering process should halt with a fatal error.
    !!! MODERATOR PLEASE DELETE ME !!!

  • Can SQL Dev Data Modeler be used to reverse engineer Windchill PDMLink

    Does anyone know if SQL Developer Data Modeler be used to reverse engineer Windchill PDMLink Oracle database? I need to get the DDL and ERDs from Windchill PDMLink.
    Can SQL Developer Data Modeler be used to reverse engineer object oriented Oracle databases?

    SQL Developer Data Modeler be used to reverse engineer Windchill PDMLink Oracle databaseprobably you mean Windchill PDMLink tables in Oracle database - yes, it's possible to get the structure of tables.
    Can SQL Developer Data Modeler be used to reverse engineer object oriented Oracle databases?It's not clear for me - you can reverse engineer definition of object and collection types, definitions of tables and views including those that use object and collection types in their definition.
    You can try it.
    Philip

  • Diff between data objects & value objects

    what are the differences between Data and Value Objects?

    What exactly do you imply by "Data Objects"? If you mean Data Transfer Objects, they are the same as Value Objects. Just a new name!

  • Problem is fetching one row having min diff in date

    Hi All,
    I have a requirement like from below query's result, I want to pick the row having minimum DIFF only. But when I tried putting min around trunc(sysdate) - trunc(rsh.shipped_date) "DIFF", it is giving me error of "Not a single-group Group function"...
    select rsh.shipment_num "ASN_NUMBER",
    rsh.shipped_date "SHIPMENT_DATE",
    trunc(sysdate) - trunc(rsh.shipped_date) "DIFF",
    rsl.po_header_id,
    pha.segment1
    from rcv_shipment_lines rsl,
    rcv_shipment_headers rsh,
    po_headers_all pha
    where rsl.item_id = 701879
    and rsl.shipment_header_id = rsh.shipment_header_id
    and rsh.shipment_num is not NULL
    and pha.po_header_id = rsl.po_header_id
    and pha.org_id = 586
    Please help me. I have tried group by function also, but it is not helping...
    Thanks
    Nidhi

    Hi Guys,
    The problem is solved, now I am using following query to get the required result.
    select rsh.shipment_num "ASN_NUMBER",
    rsh.shipped_date "SHIPMENT_DATE",
    trunc(sysdate) - trunc(rsh.shipped_date) "DIFF",
    rsl.po_header_id,
    pha.segment1
    from rcv_shipment_lines rsl, rcv_shipment_headers rsh, po_headers_all pha
    where rsl.item_id = 701879 and
    rsl.shipment_header_id = rsh.shipment_header_id and
    rsh.shipment_num is not NULL and pha.po_header_id = rsl.po_header_id and
    pha.org_id = 586 and
    trunc(sysdate) - trunc(rsh.shipped_date) =
    (select min(trunc(sysdate) - trunc(rsh.shipped_date))
    from rcv_shipment_lines rsl,
    rcv_shipment_headers rsh,
    po_headers_all pha
    where rsl.item_id = 701879 and
    rsl.shipment_header_id = rsh.shipment_header_id and
    rsh.shipment_num is not NULL and
    pha.po_header_id = rsl.po_header_id and pha.org_id = 586)
    and rownum<2
    Thanks and Regards,
    Nidhi

  • How we differ the different clients data in datasource?

    Hi,
         Im in confussion please anyone clarify it...
           My confussion is My Company have two clients A and B and both are RETAIL based. The A client is implemented in one server using  datasources 0FI_GL_10, 2LIS_13_VDITM, 2LIS_03_BF and 0EC_PCA_3.. The problem is that client B also want to
    Implement the Project in same server.
              My confussion is The client A is already used those datasources. how we differ the data of these two clients if they want implement client B in same server???????

    Hi
    Please note that this is the forum for SAP Business Objects products. In short: Please post in the apprpriate forum
    Kind Regards
    Roland Hoeller

  • Best practice for migrating data tables- please comment.

    I have 5 new tables seeded with data that need to be promoted from a development to a production environment.
    Instead of the DBAs just using a tool to migrate the data they are insistent that I save and provide scripts for every single commit, in proper order, necessary to both build the table and insert the data from ground zero.
    I am very unaccustomed to this kind of environment and it seems much riskier for me to try and rebuild the objects from scratch when I already have a perfect, tested, ready model.
    They also require extensive documentation where every step is recorded in a document and use that for the deployment.
    I believe their rationale is they don't want to rely on backups but instead want to rely on a document that specifies each step to recreate.
    Please comment on your view of this practice. Thanks!

    >
    Please comment on your view of this practice. Thanks!
    >
    Sounds like the DBAs are using best practices to get the job done. Congratulations to them!
    >
    I have 5 new tables seeded with data that need to be promoted from a development to a production environment.
    Instead of the DBAs just using a tool to migrate the data they are insistent that I save and provide scripts for every single commit, in proper order, necessary to both build the table and insert the data from ground zero.
    >
    The process you describe is what I would expect, and require, in any well-run environment.
    >
    I am very unaccustomed to this kind of environment and it seems much riskier for me to try and rebuild the objects from scratch when I already have a perfect, tested, ready model.
    >
    Nobody cares if if is riskier for you. The production environment is sacred. Any and all risk to it must be reduced to a minimum at all cost. In my opinion a DBA should NEVER move ANYTHING from a development environment directly to a production environment. NEVER.
    Development environments are sandboxes. They are often not backed up. You or anyone else could easily modify tables or data with no controls in place. Anything done in a DEV environment is assumed to be incomplete, unsecure, disposable and unvetted.
    If you are doing development and don't have scripts to rebuild your objects from scratch then you are doing it wrong. You should ALWAYS have your own backup copies of DDL in case anything happens (and it does) to the development environment. By 'have your own' I mean there should be copies in a version control system or central repository where your teammates can get their hands on them if you are not available.
    As for data - I agree with what others have said. Further - ALL data in a dev environment is assumed to be dev data and not production data. In all environments I have worked in ALL production data must be validated and approved by the business. That means every piece of data in lookup tables, fact tables, dimension tables, etc. Only computed data, such as might be in a data warehouse system generated by an ETL process might be exempt; but the process that creates that data is not exempt - that process and ultimately the data - must be signed off on by the business.
    And the business generally has no access to, or control of, a development environment. That means using a TEST or QA environment for the business users to test and validate.
    >
    They also require extensive documentation where every step is recorded in a document and use that for the deployment.
    I believe their rationale is they don't want to rely on backups but instead want to rely on a document that specifies each step to recreate.
    >
    Absolutely! That's how professional deployments are performed. Deployment documents are prepared and submitted for sign off by each of the affected groups. Those groups can include security, dba, business user, IT and even legal. The deployment documents always include recovery steps so that is something goes wrong or the deployment can't procede there is a documented procedure of how to restore the system to a valid working state.
    The deployments themselves that I participate in have representatives from the each of those groups in the room or on a conference call as each step of the deployment is performed. Your 5 tables may be used by stored procedures, views or other code that has to be deployed as part of the same process. Each step of the deployment has to be performed in the correct order. If something goes wrong the responsible party is responsible for assisting in the retry or recovery of their component.
    It is absolutely vital to have a known, secure, repeatable process for deployments. There are no shortcuts. I agree, for a simple 5 new table and small amount of data scenario it may seem like overkill.
    But, despite what you say it simply cannot be that easy for one simple reason. Adding 5 tables with data to a production system has no business impact or utility at all unless there is some code, process or application somewhere that accesses those tables and data. Your post didn't mention the part about what changes are being made to actually USE what you are adding.

  • Difference between Key feilds and Data fileds in ODS

    Hi team,
    What is diff between data fields and Key fileds in ODS ?.
    Pl let me know.
    Regards,
    Senthil

    Hi
    Key fields:
    Unique identification of record: uniqueness of a record in ods is maintained by how you define the key fiedls in the ods. key fields in the ods are equal to the primany indexes on a table.
    If you activate the ODS it will generate a Table with Primarykey which you defined in the ODS.
    Datafields:
    data fields that can also contain character fields and keyfigures.
    http://help.sap.com/saphelp_nw04/helpdata/en/a6/1205406640c442e10000000a1550b0/frameset.htm
    Regards,
    Senthil Kumar.P

  • Problem displaying data in Crystal Viewer

    Hi,
    First time posting on here, so apologies if I've got the wrong thread....
    Currently developing an application that uses ASP, via a COM+ object to connect to SQL Server 2005 Db.  My problem is that since the users default printer might not be visible on the application server anymore, we have had to use a Crystal viewer on the front end to print.  To do this we have moved some code from the COM+ and placed it in an asp page. 
    This page then creates a connection and runs a stored procedure, putting the results of the query into a recordset.  This is then used to populate CrystalRuntime Application, Report and PageEngine objects.  This page #Includes the SmartViewerActiveX.asp file which then in turn calls rptserver.asp.
    The viewer is displayed on the screen, but with the fields displaying only the field types, no data from the Db is displayed.  I have no idea why and am at my wits end!!!   Can anyone give any advice or hints that I could investigate.  I've never used Crystal Viewer before and could do with any helpfull advice.   The SmartViewerActiveX.asp and rptserver.asp files have not been ameneded.  Do I need to do anything with the ttx files????
    Thanks in advance....
    Code of the originating asp page :-
    <object runat=server progid = Print.print id=objPrint></object>
    <object runat=server progid = com.session id=objSession></object>
    <object runat=server progid = com.login id=objLogin></object>
    <object runat=server progid = com.request id=objRequest></object>
    <!#INCLUDE FILE="gen_funcs.asp">
    <!#INCLUDE FILE="adovbs.inc">
    <%
         Dim rsSession
         Dim strUserID
         Dim iUserType
         Dim strSalutation1
         Dim strNewRequestASP
         Dim rsDetails     
         Dim varRetValue
         Dim Comm
         Dim Conn
         Dim ADORs
         Dim adoRS1
         Dim adoRS2
         Dim adoRS3
         Dim oApp
         Dim oRpt
         Dim oPageEngine
         strUserID = getWindowsLogIn
         'Retrieve Session Data from session object
         Set rsSession = objSession.GetDetails(strUserID)
         strSalutation = rsSession.Fields("login_data")
         iUserType = rsSession.Fields("user_type")
         Set rsSession = Nothing
         varRetValue = "true"
    If IsObject(session("oRpt")) then
         Set session("oRpt") = nothing
    End if 
    set Comm = Server.CreateObject("ADODB.Command")
    set Conn = Server.CreateObject("ADODB.Connection")
    set session("AdoRS") = Server.CreateObject("ADODB.Recordset")
    Comm.CommandTimeout=60
    mStr = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;User ID=sa;Initial Catalog=DEV;Data Source=GBNBS1501;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=GBNBS0500;Use Encryption for Data=False;Tag with column collation when possible=False"
    mstr=replace(mstr, "Integrated Security=SSPI;","")
    Conn.Open Mstr & ";Trusted_Connection=no", "crystaluser", "crystalpassword"
    set Comm.ActiveConnection = Conn
    Comm.CommandText = "usp_get_customer_letter"
    Comm.CommandType = adCmdStoredProc
    Comm.Parameters.Append Comm.CreateParameter("@requestID", adBigInt, adParamInput, 8, Request.QueryString("RequestID"))
    set session("AdoRS") = Comm.Execute
    If Not IsObject (session("oApp")) Then                             
         set session("oApp") = Server.CreateObject("CrystalRuntime.Application.11")
    End If
    If IsObject(session("oRpt")) then
         Set session("oRpt") = nothing
    End if
    'This "While/Wend" loop is used to determine the physical path (eg: C:\) to the
    'Crystal Report file by translating the URL virtual path (eg: http://Domain/Dir) 
    dim path
    Path = Request.ServerVariables("PATH_TRANSLATED")                    
    While (Right(Path, 1) <> "\" And Len(Path) <> 0)                     
    iLen = Len(Path) - 1                                                 
    Path = Left(Path, iLen)                                              
    Wend                                                                               
    path=path + "Reports\"
    set session("oRpt") = session("oApp").OpenReport(path & "Letter.rpt", 1) 
    session("oRpt").MorePrintEngineErrorMessages = False
    session("oRpt").EnableParameterPrompting = False
    session("oRpt").DiscardSavedData
    Set crDatabase = session("oRpt").Database
    Set crTables = crDatabase.Tables
    Set crTable = crTables.Item(1)
    crTable.SetPrivateData 3, session("AdoRS")
    on error resume next
         adoRS1 = objPrint.GetSubReportSuccessful(Request.QueryString("RequestID"))
         adoRS2 = objPrint.GetSubReportUnsuccessful(Request.QueryString("RequestID"))
            'This section adds subreport data for successful traces to the letter
         If adoRS1.EOF = False Then
                 Set crSections = session("oRpt").Sections
                  For x = 1 To crSections.Count
                      Set crSection = crSections(x)
                      Set crReportObjs = crSection.ReportObjects
                          For y = 1 To crReportObjs.Count
                              If crReportObjs.Item(y).Kind = crSubreportObject Then
                                  Set crSubreportObj = crReportObjs.Item(y)
                                  If crSubreportObj.Name = "Schemes" Or crSubreportObj.Name = "WelshSchemes" Then
                                      Set crSubreport = session("oRpt").OpenSubreport(crReportObjs(y).Name)
                                      crSubreport.DiscardSavedData
                                      Set crDatabase = crSubreport.Database
                                      Set crTables = crDatabase.Tables
                                      Set crTable = crTables.Item(1)
                                      crTable.SetPrivateData 3, adoRS1
                                  End If
                              End If
                          Next
                  Next
              End If
            'This section adds subreport data for unsuccessful traces to the letter
               If adoRS2.EOF = False Then
                 Set crSections = session("oRpt").Sections
                  For x = 1 To crSections.Count
                      Set crSection = crSections(x)
                      Set crReportObjs = crSection.ReportObjects
                          For y = 1 To crReportObjs.Count
                             If crReportObjs.Item(y).Kind = crSubreportObject Then
                                  Set crSubreportObj = crReportObjs.Item(y)
                                  If crSubreportObj.Name = "Unsuccessful_traces" Then
                                      Set crSubreport = oRpt.OpenSubreport(crReportObjs(y).Name)
                                      crSubreport.DiscardSavedData
                                      Set crDatabase = crSubreport.Database
                                      Set crTables = crDatabase.Tables
                                      Set crTable = crTables.Item(1)
                                      crTable.SetPrivateData 3, adoRS2
                                  End If
                              End If
                          Next
                  Next
              End If
    session("oRpt").ReadRecords
    If IsObject(session("oPageEngine")) Then                             
         set session("oPageEngine") = nothing
    End If
    set session("oPageEngine") = session("oRpt").PageEngine
    set Conn = nothing
    set Comm = nothing
    %>
    <!-- #include file="SmartViewerActiveX.asp" -->
    <%

    Here's the code...
    <object runat=server progid = Print.print id=objPrint></object>
    <object runat=server progid = com.session id=objSession></object>
    <object runat=server progid = com.login id=objLogin></object>
    <object runat=server progid = com.request id=objRequest></object>
    <!#INCLUDE FILE="gen_funcs.asp">
    <!#INCLUDE FILE="adovbs.inc">
    <%
         Dim rsSession
         Dim strUserID
         Dim iUserType
         Dim strSalutation1
         Dim strNewRequestASP
         Dim rsDetails     
         Dim varRetValue
         Dim Comm
         Dim Conn
         Dim ADORs
         Dim adoRS1
         Dim adoRS2
         Dim adoRS3
         Dim oApp
         Dim oRpt
         Dim oPageEngine
         strUserID = getWindowsLogIn
         'Retrieve Session Data from session object
         Set rsSession = objSession.GetDetails(strUserID)
         strSalutation = rsSession.Fields("login_data")
         iUserType = rsSession.Fields("user_type")
         Set rsSession = Nothing
         varRetValue = "true"
    If IsObject(session("oRpt")) then
         Set session("oRpt") = nothing
    End if 
    set Comm = Server.CreateObject("ADODB.Command")
    set Conn = Server.CreateObject("ADODB.Connection")
    set session("AdoRS") = Server.CreateObject("ADODB.Recordset")
    Comm.CommandTimeout=60
    mStr = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;User ID=sa;Initial Catalog=DEV;Data Source=GBNBS1501;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=GBNBS0500;Use Encryption for Data=False;Tag with column collation when possible=False"
    mstr=replace(mstr, "Integrated Security=SSPI;","")
    Conn.Open Mstr & ";Trusted_Connection=no", "crystaluser", "crystalpassword"
    set Comm.ActiveConnection = Conn
    Comm.CommandText = "usp_get_customer_letter"
    Comm.CommandType = adCmdStoredProc
    Comm.Parameters.Append Comm.CreateParameter("@requestID", adBigInt, adParamInput, 8, Request.QueryString("RequestID"))
    set session("AdoRS") = Comm.Execute
    If Not IsObject (session("oApp")) Then                             
         set session("oApp") = Server.CreateObject("CrystalRuntime.Application.11")
    End If
    If IsObject(session("oRpt")) then
         Set session("oRpt") = nothing
    End if
    'This "While/Wend" loop is used to determine the physical path (eg: C:\) to the
    'Crystal Report file by translating the URL virtual path (eg: http://Domain/Dir) 
    dim path
    Path = Request.ServerVariables("PATH_TRANSLATED")                    
    While (Right(Path, 1) <> "\" And Len(Path) <> 0)                     
    iLen = Len(Path) - 1                                                 
    Path = Left(Path, iLen)                                              
    Wend                                                                               
    path=path + "Reports\"
    set session("oRpt") = session("oApp").OpenReport(path & "Letter.rpt", 1) 
    session("oRpt").MorePrintEngineErrorMessages = False
    session("oRpt").EnableParameterPrompting = False
    session("oRpt").DiscardSavedData
    Set crDatabase = session("oRpt").Database
    Set crTables = crDatabase.Tables
    Set crTable = crTables.Item(1)
    crTable.SetPrivateData 3, session("AdoRS")
    on error resume next
         adoRS1 = objPrint.GetSubReportSuccessful(Request.QueryString("RequestID"))
         adoRS2 = objPrint.GetSubReportUnsuccessful(Request.QueryString("RequestID"))
            'This section adds subreport data for successful traces to the letter
            If adoRS1.EOF = False Then
                 Set crSections = session("oRpt").Sections
                  For x = 1 To crSections.Count
                      Set crSection = crSections(x)
                      Set crReportObjs = crSection.ReportObjects
                          For y = 1 To crReportObjs.Count
                              If crReportObjs.Item(y).Kind = crSubreportObject Then
                                  Set crSubreportObj = crReportObjs.Item(y)
                                  If crSubreportObj.Name = "Schemes" Or crSubreportObj.Name = "WelshSchemes" Then
                                      Set crSubreport = session("oRpt").OpenSubreport(crReportObjs(y).Name)
                                      crSubreport.DiscardSavedData
                                      Set crDatabase = crSubreport.Database
                                      Set crTables = crDatabase.Tables
                                      Set crTable = crTables.Item(1)
                                      crTable.SetPrivateData 3, adoRS1
                                  End If
                              End If
                          Next
                  Next
              End If
            'This section adds subreport data for unsuccessful traces to the letter
               If adoRS2.EOF = False Then
                 Set crSections = session("oRpt").Sections
                  For x = 1 To crSections.Count
                      Set crSection = crSections(x)
                      Set crReportObjs = crSection.ReportObjects
                          For y = 1 To crReportObjs.Count
                             If crReportObjs.Item(y).Kind = crSubreportObject Then
                                  Set crSubreportObj = crReportObjs.Item(y)
                                  If crSubreportObj.Name = "Unsuccessful_traces" Then
                                      Set crSubreport = oRpt.OpenSubreport(crReportObjs(y).Name)
                                      crSubreport.DiscardSavedData
                                      Set crDatabase = crSubreport.Database
                                      Set crTables = crDatabase.Tables
                                      Set crTable = crTables.Item(1)
                                      crTable.SetPrivateData 3, adoRS2
                                  End If
                              End If
                          Next
                  Next
              End If
    session("oRpt").ReadRecords
    If IsObject(session("oPageEngine")) Then                             
         set session("oPageEngine") = nothing
    End If
    set session("oPageEngine") = session("oRpt").PageEngine
    set Conn = nothing
    set Comm = nothing
    %>
    <!-- #include file="SmartViewerActiveX.asp" -->
    <%

  • Calculation of % on Date Differences - BW Reporting

    Hi Experts,
    I have a typical scenario where in I need to calculate the % for the no of Days difference b/t 3 dates(Statistical Date, Delivery Date, GR Date).
    As of now I just showed just the Difference b/t all the 3 dates in no of days. Now I need to acomplish the below task, Can any one plese suggest me how to proceed to resolve all the below conditions.
    Need to provide the % of orders that fall into the following buckets for each of the above 3 Dates only in Reporting.
    1. On time = +/- 5 days
    2. Greater than 6-10 days late
    3. 11-15 days late
    4. Greater than 16 days late
    5. 6-10 early
    6. 11-15 days early
    7. Greater than 16 days early
    I need to do this at Query level only as I don't have authorization to create a new Calculated Key figures or Restricted KF.
    Only I can do is play around with the New Selection or New Formula at Column area of designer, write some Macros or can access Exceptional reporting for above 3 DATE Char or Key Figure fields and do some math to accomplish.
    Thanks,
    Sam

    Hi Nagesh,
         Thanks for your quick reply, I can say I tried with couple of options and couldn't
       suceed with the minimal access which I do have.
         Now I don't have much time to respond to user, If at all you do have and time
        and if you don't mine can you please look at the conditions and just give me the
        STEP1....STEPN for any one of the 3 diff types which you mentioned in your
        reply so that I can take it up from there.
    Sample Days Difference in my spread sheet now:-
    Stat-Del Date Diff Stat-GR Date Diff Del Date-GRDate Diff
    -67             68                       -68
    -112                160                       -160
    -109                109                       -109
    -109                109                       -109
    0                1                                        -1
        Please take any one date and do write down the step1..stepN if you have time.
    Sam

Maybe you are looking for

  • How do I remove NaN values from an array?

    I'm trying to test if the values in an array are less than 0.001. All of them are...BUT the problem is that some of the elements in the array are NaN. I'd like to do one of two things: 1. Remove the NaN elements from the array and set them to zero to

  • Can I stop a Finder window from opening on a mounted volume?

    I work in an elementary school. One of the startup items on our kindergarten computers is a shared network applications volume. I have set the Finder preferences to not show connected servers or the hard drive on the desktop. However, when the comput

  • Problem with portal monitoring

    Hi, I have a question concerning portal monitoring. When I click on System Administration -> Monitoring -> Portal -> Request or Component Overview there's no data displayed. When I click on the "Display" button I get the message No request executed s

  • Fetching internal table values in a Form

    Hi, In a function module, in table interface i have declared a table. In source code this table gets values. In source code one perform statement is there. In that form, this table is not present. How can i get this table values in that form? Ezhil.

  • HP Pavilion G6 not connecting to network

    An old HP Pavilion G6 of mine has been having severe speed issues and had a virus. It had no valuable files on it, so I had wiped it clean and installed a fresh version of Windows 7 Home Premium 64 bit. The install went completely fine and I was able