Error in Query transports

Hi experts,
I have face an error stating that "R3TRELEM3U9HDF8LLE8RUUZZK035MNT3B original object cannot be replaced" while transporting a query from One BW Dev to Other BW Dev system.
I also have ckecked this element is a reusable Variable element and also checked there is no request in target system in modifiable state in target system.
please help me out to resolve it.
Thanks in advance
Jitendra

Hi Jit,
Pls do the following.
1. Try re collecting the BEx dependent objects including the missed variable objects in new request.
2. While grouping the objects consider only necessary objects and the again re check whether the missed objects has been checked with tick mark.
3. Make sure that this missed object has not been locked by other owner.Since this variables are re-usable component which is based on infoobject.
4. Pls check this locking in SE03

Similar Messages

  • Error in Query View Saving -The standard transport system is active.You can

    Hi,
    I have a query in Dev system which is moved to production and i am able to edit the query in dev.But my problem is when i tried to create a view on that query and save the view, it is throwing me a error
    "The standard transport system is active.You cannot save"
    Any pointers on this.
    Regards,
    Pra

    Hi
    Did you get any feedback on this one?? Im facing the same message when saving a query view..
    Thanks
    Willem

  • Query Transportation Problem?

    Hi Guru's,
    We are working in Bw 3.5 Version
    Query: We have observed that there was a problem with Query in Dev & Quality Server?
    as per the regular activities we have modeled the entire process in Dev
    from data Source to Data target
    then we have developed a report on this data target.
    all this was saved under one Request  and transported to Quality.
    then there was some modifications in update rules & and also in Bex report
    for this also we have sent under one request to Quality
    there we have observed that the modifications in update rules have been applied
    & in report this modifications did nnot apply in Quality server
    Can any one help in this ............
    advance thanks ,very  very urgent..
    Points will be rewarded >
    Hari

    Hi,
    I have the same problem. I have a query in production and I need to change it. I changed it in dev, transported the query with no error, but I don't see the changes in prod.
    There is any configuration error? Normal transports work fine.
    Thanks

  • ABAP Query transports not handled by CHARM

    Hi,
    How should ABAP query transports be handled in CHARM??
    The ABAP query transport tool doesn't allow picking a transport that is already created (Own transport), it creates a new transports which is outside of CHARM. I had to assign the objects in the transport manually to the appropriate CHARM transport.
    Any ideas???
    ABAP query don't seem to be using the standard transport tool.
    Thanks
    Stephane

    Hi
    Instead of assigning the objects you can directly assign the trasnports to the charm task list of the project
    check q22 (registerting transport created outside of charm)
    Change Request Management scenario: Usual questions and known errors
    hope it clarifies
    regards
    prakhar

  • ABAP Query Transport request related

    Hi,
    I have created a Abap query,
    1) User group
    2)Infoset
    3) Query
    But when i transport the request in to Quality, I can see only Infoset, not able to see User group and query which i created in the
    Development
    Please suggest, is this std behaviour or is anything missed
    Rgds,
    Jai

    Thanks to all,
    I just created TR with new package for user group and included ifoset and query in the same TR
    and imported, issue is resolved
    But my question is,where we can utilize below help material, I have spent much time to understand below given explaination and finally left without any conclusion
    Short text
    SAP Query: Transport tool
    Description
    The report RSAQR3TR handles all tasks concerning the transport of queries, InfoSets and user groups.
    General information
    Queries, InfoSets and user groups are stored in the table AQDB. This table is client-specific. For the transport of queries, InfoSets and user groups, there is a special client-independent transport table called TAQTS. You can carry out transports either
    ·     from a client (source client) of an SAP system to another client (target client) in the same SAP system or
    ·     from a client (source client) of an SAP system (source system) to a client (target client) in another SAP system (target system).
    In both cases, you have to perform similar actions.
    The objects to be transported must first be copied from the source client using an export from the table AQDB into the transport table TAQTS. At the same time, a transport request is created for the transport system that includes all entries created by the export from table TATQS (transport dataset). The name of this transport request conforms to the transport system naming conventions (sysKnnnnnn) and is included in the export log. The transport dataset is stored in the table TAQTS under a key which matches the name of the transport request.
    If you are transporting within one SAP system (from one client to another), you can import the transport dataset from the target client. The name of the transport request to use for this purpose is that specified during the export, since it should match the key of the transport dataset in the table TAQTS. With this import, the transport dataset is read from the transport table TAQTS and inserted into the table AQDB, where extensive checks ensure that there are no inconsistent statuses in the table AQDB.
    If you are transporting from one SAP system to another, you must first use the transport system to release and export the transport request generated by the export. This transports the transport dataset from the transport table TAQTS into the target system. Then, you can import from the target client of the target system, as described above.
    The transport datasets generated by exports in the transport table TAQTS are not deleted after successful import unless this is explicitly requested. Therefore, you can import a transport dataset several times (when copying a functional area to several different clients, for example).
    This report handles exports (generation of transport datasets), imports (reading of transport datasets) as well as the management (display and deletion) of transport datasets.
    As transport action, you must specify one of the values EXPO (export), IMPO (import), SHOW (display transport dataset) or DELE (delete transport dataset).
    Transport action EXPO (exports)
    If you select the 'Test only' parameter when exporting (no blank characters), the system determines only those queries, InfoSets and user groups that would be selected according to the selections for transport described below and generates an appropriate log. A transport dataset is not generated in the table TAQTS. This allows you to check whether a selection really includes the queries, InfoSets and user groups to be transported.
    With exports, there are four different options for selecting objects (user groups, InfoSets, queries) to be transported. These are 'Transport of user groups', 'Transport of InfoSets', 'Transport of InfoSets and queries' and 'Transport of queries'. You must choose exactly one of these transport types.
    In each case, you can also define an import option depending on the transport type. This allows you to determine how the transport dataset is inserted in the table AQDB of the target client during a later import.
    The import options, each of which has an abbreviated syntax,
    are as follows:
    REPLACE  or R
    MERGE    or M
    GROUP=ug or G=ug    (ug = name of a user group)
    UNASSIGN or U
    If you use the transport type 'Transport of user groups', all user groups are transported according to the select option 'user groups' and the selected import option. The import options REPLACE and MERGE are allowed.
    If you use the transport type 'Transport of InfoSets', all InfoSets are transported according to the select option 'InfoSet' and the selected import option. The import options REPLACE, MERGE, GROUP=ug and UNASSIGN are allowed.
    If you select the transport type 'Transport of InfoSets and queries', all InfoSets are transported according to the select option 'InfoSets' and the selected import option. The import options REPLACE and MERGE are allowed. Also, all queries are transported for each functional area selected, according to the select option 'queries'. In this case, the user groups of the queries are irrelevant and only the import option REPLACE is allowed.
    This transport type allows you to transport a modified InfoSet and all the associated queries.
    For the transport type 'Transport of queries', all queries are transported according to the select option 'User groups' and the select option 'Queries' as well as the selected import option. The import options REPLACE and GROUP=ug are allowed.
    The export log displays which user groups, which InfoSets and which queries are transported, as well as the import options used.
    Transporting a user group
    Transporting a user group means transporting all members of the group from the source client. However, the InfoSet assignment to the user group in the source client is NOT transported.
    The import option REPLACE first deletes all members of the group in the target client and then enters the members from the source client.
    The import option MERGE leaves all members of the group assigned in the target client and adds the members of the group from the source client.
    Entering a new member in a user group in the target client is possible only if a user master record exists.
    In the target client, the assignment of InfoSets to this user group remains.
    Transporting an InfoSet
    Transporting an InfoSet means transporting the InfoSet and the InfoSet assignment to user groups in the source client.
    Importing an InfoSet is possible only if the same logical database exists in the target client. Extensive checking is also performed to ensure that there are no inconsistencies between the InfoSet and the logical database.
    The import option REPLACE first deletes the assignment of the InfoSet to user groups in the target client, provided there are no queries dependent on the InfoSet. The InfoSet is then transported to the target client and the assignment of the InfoSet to user groups is copied from the source client, if user groups also exist in the target client.
    The import option GROUP=ug first deletes the assignment of the InfoSet to user groups in the target client, provided there are no queries referring to the InfoSet. The InfoSet is then transported to the target client and assigned to the user group ug of the target client, if such a user group exists.
    The import option MERGE leaves the assignment of the InfoSet to user groups in the target client and transports it to the target client. It then copies the assignment of the InfoSet to user groups from the source client if user groups also exist in the target client.
    The import option UNASSIGN first deletes the assignment of the InfoSet to user groups in the target client, provided there are no queries referring to the InfoSet. The InfoSet is then transported to the target client. No assignment of the InfoSet to user groups is performed.
    Transporting a query
    Transporting a query means only the query itself is transported.
    Importing a query is possible only if a corresponding user group (see below) and a corresponding InfoSet exist in the target client and if the InfoSet is assigned to the user group. To demonstrate the effect of the import options, suppose that the query has the name QU and belongs to the user group BQ in the source client.
    The import option REPLACE overwrites the query QU of the user group BQ in the target client if the user group exists.
    The import option GROUP=ug overwrites the query QU of the user group UG in the target client if the user group exists. In this case, the query is explicitly assigned to a user group in the target client. This target user group may be differnet from the user group in the source client.
    Transport action IMPO (imports)
    If you choose the 'Test only' parameter with imports, only a test import is performed. This means that the system performs checks as for a real import and generates an import log. The import log contains information on the locks that have to be set. With a test import, you can check whether a transport dataset can be imported without any problem and which changes it would make in the table AQDB of the target client. A test import itself never makes changes in the table AQDB of the target client.
    All transport datasets are imported according to the select option 'transport request'. In this case, the system outputs a detailed log of all checks carried out and all changes made in the table AQDB.
    If you select the parameter 'Delete after successful import', the transport dataset in the table TAQTS is deleted after the import of each transport dataset if no errors occur during the import.
    Transport action SHOW (display)
    All transport datasets included in the transport table TAQTS are output with name (also the name of the transport request) and contents in the form of an overview.
    Transport action DELE (delete)
    All transport datasets are deleted according to the select option 'transport request'. To avoid unintentional deletion, the select option 'transport request' must contain values, meaning that the transport action DELE is not performed if this select option is empty.
    Transport of ABAP Query
    I am involved in this upgrade project to 4.7 
    The users are not able to find any reports (in QA System) which were there before the upgrade in SQ01. But they can see them in production which is not yet upgraded. They want me to copy all the reports to the QA system now....I dont have any idea how to do that. 
    I remember a similar problem upgrading to 4.6C from 4.5B ...... 
    Take a look at OOS note 672784. 
    You can transport queries between systems in SQ02 (hit the lorry button) or run program RSAQR3TR. 
    You download the infosets, queries etc into a file and load them into whichever system you wish.
    Just wanted to share my experience of transporting queries:
    I needed to move a user group, 2 infosets and 3 queries from a 4.6 system to a 4.7 system. 
    When I tried doing this via the SQ* transactions I did not get the import/export option, so instead ran RSAQR3TR. 
    Step 1. Run RSAQR3TR in 'old' system. Select EXPORT and specify the objects to be transported. 
    (System includes these in an automatically created transport request) 
    Step 2. Release this transport and request it be transported to 'new' system. 
    (This results in the entries being populated in transport table AQTDB in 'new' system). 
    Step 3. Run RSAQR3TR in 'new' system. Select IMPORT and tick the Overwrite checkbox. Specify the transport number in the field labelled 'dataset with imports'. 
    (RSAQR3TR gives the message that stuff has been imported OK). 
    Step 4. In my example I still couldn't find the queries, so ran RSAQR3TR one more time, this time specifying 'Copy Standard Area -> Global Area'. 
    (Now my queries etc were available in new system). 
    Perhaps there are better ways, but after 1.5 days of struggling I was glad to get this far.  
    regards,
    Jai

  • Error when generating transport dataset (transfering queries with RSAQR3TR)

    Hi!
    I try to transfer queries from one system to other.
    Systems are not connected with each other, so no transports are available.
    I am doing like this:
    - running program RSAQR3TR in "old" system
    - downloading a query as TXT file into my PC
    - running program RSAQR3TR in "new" system
    - uploading TXT file into "new" system and get a message - "Error when generating transport dataset"
    I have only query and user group in "old" system. Is this information enough to transfer them to "new" system?
    <b><REMOVED BY MODERATOR></b>
    Mindaugas
    Message was edited by:
            Alvaro Tejada Galindo

    Hi,
    Step 1. Run RSAQR3TR in 'old' system. Select EXPORT and specify the objects to be transported. 
    (System includes these in an automatically created transport request) 
    Step 2. Release this transport and request it be transported to 'new' system. 
    (This results in the entries being populated in transport table AQTDB in 'new' system). 
    Step 3. Run RSAQR3TR in 'new' system. Select IMPORT and tick the Overwrite checkbox. Specify the transport number in the field labelled 'dataset with imports'. 
    (RSAQR3TR gives the message that stuff has been imported OK). 
    Step 4. if you still couldn't find the queries, so ran RSAQR3TR one more time, this time specifying 'Copy Standard Area -> Global Area'
    Regards
    Sudheer

  • Query transport

    HI SDN,
    A query transport is failed due to missing of Query object(Query name) and a variable. I have collected those those two elements in differerent request and transported sucessfully. Now in which sequence these transports should be sent to PRD?
    Thanks

    hi,
    i think this failure normally happened to the query that has been transported when we add a new variable to the query, since the transported query changes will be recorded in BEx request and the new variable won't be recorded anywhere.
    we transport the BEx request before the new variable, then we find out error,
    and send a new request to transport the new variable, and re-import again in PRD the BEx request (you can mark to let the request can be transported again)
    so i think if you remember to transport the variable first then it's fine but if you forget, still you can re-import BEx again.
    hope this helps.

  • Download / Upload queries gives "Error when generating transport dataset"

    Hi!
    I need to transfer some queries from one system to other.
    Systems are not connected with each other, so no TRs are available!
    I am doing like this:
    - running program RSAQR3TR in "old" system
    - downloading a query as TXT file into my local PC
    - running program RSAQR3TR in "new" system
    - uploading TXT file into "new" system and get a message - "Error when generating transport dataset"
    Any ideas?
    Will reward,
    Mindaugas

    Check whether this info is useful,
    Transporting a query
    Transporting a query means only the query itself is transported.
    Importing a query is possible only if a corresponding user group (see below) and a corresponding InfoSet exist in the target client and if the InfoSet is assigned to the user group. To demonstrate the effect of the import options, suppose that the query has the name QU and belongs to the user group BQ in the source client.
    The import option REPLACE overwrites the query QU of the user group BQ in the target client if the user group exists.
    The import option GROUP=ug overwrites the query QU of the user group UG in the target client if the user group exists. In this case, the query is explicitly assigned to a user group in the target client. This target user group may be differnet from the user group in the source client.
    Rgds,
    SaiRam

  • Error while uploading Transport request

    Hi friends,
    Error while uploading transport request to the transport directory,
    we downloaded the trasnport request from one sap system which have a set of developments
    for example downloaded files are;
    control file: K900470.SAD and Data file: R900470.SAD fronm transport directory.
    we are trying to upload the transport to another Sap system
    we have
    Uploaded  the controlling file K900470.sad to the location  /usr/sap/transpad/cofiles/
    Uploaded the controlling file R900470.sad to the location  /usr/sap/transpad/data/
    we tried tro  add in the import queues using  TCODE: STMS
    and trying to import.
    During import we get
    error:
    HALT: unknown dynpro format: d021s_length() returned 0 Please contactthe SAP support.
    End with rc : 16
    Please help me with the problem.
    Thanks in advance
    Deepak

    Hi,
       Check the versions of the two sap systems you are downloading and uploading the transport requests

  • 5200:Error Executing Query

    Hi,
    I am getting below error while running a report in FR.
    5200:Error Executing Query:
    Could you please let me know what is the problem and how to resolve it.
    Thanks,

    Hi,
    This might be due to corrupt POV this can be resolved by just deleting POV for the use and again setting it up.
    Regards,
    Gyan

  • SPP Error - No valid transportation lane between Supplier and LOC1

    Hi
    While running the EOQ and SFT planning service, we get the following error
    "No valid transportation lane between Supplier and LOC1". LOC1 is the entry location for our BOD.
    We have not created any procurement relationships as we are working on a standalone SCM trialbox.
    Appreciate any help/suggestions to resolve this issue.
    Thanks & Best Regds
    Mitesh

    Hi Mitesh,
    You need to have valid transportation lanes from the supplier. Maintain it manually. If I remember correctly it is possible to have External Procurement Relationships in APO only (type 4) and not just contracts, purchasing inforecords or scheduling agreements CIFed from ECC.
    Hope this helps.
    Thanks,
    Somnath

  • JavaMail application hanged with no error throwed at Transport.send

    JavaMail application hanged with no error throwed at Transport.send,even though I set the timeout property
    import java.util.Date;
    import java.util.Properties;
    import javax.mail.Authenticator;
    import javax.mail.Message;
    import javax.mail.PasswordAuthentication;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeBodyPart;
    import javax.mail.internet.MimeMessage;
    import javax.mail.internet.MimeMultipart;
    import javax.mail.internet.MimeUtility;
    public class tt {
         static Properties props=null;
         static boolean needAuth=true;
         static MailAuthenticator authenticator = null;
         static String host="host";
         static String account="account";
         static String password="pwd";
         static String sender="sender";
          * @param args
          * @throws Exception
         public static void main(String[] args) throws Exception{
               if (props == null) {
                     props = new Properties();
                     props.put("mail.smtp.host", host);
                     props.put("mail.smtp.timeout      ", "1000");
                     props.put("mail.smtp.connectiontimeout      ", "1000");
    //                 props.put("mail.debug", "true");
                     props.put("mail.smtp.auth", String.valueOf(needAuth));
                     authenticator = new MailAuthenticator(account, password);
                 MailData mailData = new MailData();
                 mailData.setSubject("altireport mail configuration");
                 mailData.setContent("mail server has been configured successfully.");
                 mailData.setRecipients(new String[]{"[email protected]"});
                 final Session session = Session.getInstance(props, authenticator);
                 final MimeMessage msg = new MimeMessage(session);
                 InternetAddress from = new InternetAddress(sender);
                 msg.setFrom(from);
                 //        msg.setSender(from);
                final InternetAddress[] addressTo = new InternetAddress[mailData.getRecipients().length];
                 for (int i = 0; i < mailData.getRecipients().length; i++) {
                     addressTo[i] = new InternetAddress(mailData.getRecipients());
         msg.addRecipients(Message.RecipientType.TO, addressTo);
         //msg.setSubject(mailData.getSubject());
         msg.setSubject(MimeUtility.encodeText(mailData.getSubject(), "UTF-8", "B"));
         MimeBodyPart bodyPart1 = new MimeBodyPart();
         bodyPart1.setContent(mailData.getContent(), "text/plain; charset=UTF-8");
         MimeMultipart multipart = new MimeMultipart();
         multipart.addBodyPart(bodyPart1);
         msg.setContent(multipart);
         msg.setSentDate(new Date());
    //     msg.saveChanges();
         for(int i=0;i<10;i++){
              new Thread(new Runnable(){
                             public void run() {
                             try {
                                  System.out.println("send...");                                   
                                  Transport.send(msg);
                                  } catch (Exception e) {
                                       e.printStackTrace(System.out);
                        System.out.println("end!");
              }).start();
    class MailData {
    private String[] recipients = null;
    private String subject = null;
    private String content = null;
    private String attachment = null;
    private String attachmentName = null;
    * @return the attachment
    public String getAttachment() {
    return attachment;
    * @param attachment the attachment to set
    public void setAttachment(String attachment) {
    this.attachment = attachment;
    * @return the content
    public String getContent() {
    return content;
    * @param content the content to set
    public void setContent(String content) {
    this.content = content;
    * @return the recipients
    public String[] getRecipients() {
    return recipients;
    * @param recipients the recipients to set
    public void setRecipients(String[] recipients) {
    this.recipients = recipients;
    * @return the subject
    public String getSubject() {
    return subject;
    * @param subject the subject to set
    public void setSubject(String subject) {
    this.subject = subject;
    * @return the attachmentName
    public String getAttachmentName()
    return attachmentName;
    * @param attachmentName the attachmentName to set
    public void setAttachmentName(String attachmentName)
    this.attachmentName = attachmentName;
    class MailAuthenticator extends Authenticator {
    private PasswordAuthentication authentication;
    public MailAuthenticator(String account, String password) {
    authentication = new PasswordAuthentication(account, password);
    protected PasswordAuthentication getPasswordAuthentication() {
    return authentication;
    I have tried use session to get a SMTPTransport instance to use sendMessage ,but still have the same problem.No exception ,No error.
    This problem doesn't appear always. It appears sometimes.
    I hope get help for someone who has the solution for this problem.
    Thanks in advanced.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Ok, I think I see the problem:
         props.put("mail.smtp.timeout      ", "1000");
         props.put("mail.smtp.connectiontimeout      ", "1000");
    Why do you have spaces at the end of the property names?
    Those spaces are not being ignored, which means you've
    set the wrong properties.

  • Error in Query Execution : SQL Error: 1110

    Dear Experts,
         We did the system copy from production to Sandbox system. Executing one query got terminated with the following error.
         Error SQL Error: 1110
         Abort System error in program SAPLRRK0 and form RSRDR;SRRK0F30-01-
         I copy this query to the new one and remove all the filter. It works!!!
         Any suggestion on this issue?
    Regards

    Hi,
    check these threads
    BEx query error
    BEx Query Error
    Regards
    harikrishna N

  • Error  in query definition

    Hi all,
    I am getting the following error when accessing HR payroll quires
    "Formal error in query definition ( DIM <-> from[NAV]) ?
    Can any body help me ?
    KK

    I am getting the same error. Could you pls post the solution. I am on the following level (from the error message.
    BI Java Release: 7 - Patch level: 0000000011 - Description: BI Web Applications Java - Additional info: - Production mode: true
    BI ABAP Release: 700 - Patch level: 0012 - Description: SAP NetWeaver BI 7.0 (SAP_BW) - Additional info: - Production mode: true
    Java Virtual Machine IBM J9 VM - IBM Corporation - 2.3
    Operating System AIX - ppc64 - 5.3
    I searched the OSS and found a note 1001621 which said apply support package: SAP_BW_VIRTUAL_COMP - Rel 700 - Pkg name SAPK70012NVCBWTECH
    But, our basis guys came back with the reply that the solution suggested in OSS note is for SAPKW70011, but our system is already on SAPKW70012. So, this note cannot be applied.
    Any help would be appreciated.

  • Error in query: [Microsoft][SQL Server Native Client 10.0][SQL Server]Must specify table to select from. '' (SWEI)

    Hi All
    below query giving me error in query generator but working well in Sql server.
    error: [Microsoft][SQL Server Native Client 10.0][SQL Server]Must specify table to select from. '' (SWEI)
    Select
    T1.U_grp01 As 'BA',T3.DocDate As 'Posting Date',Month(T3.DocDate) As 'PostMonth',Year(T3.DocDate) As 'PostYear',
    'AR Invoice' As 'Type',T3.DocNum As 'Doc No',T3.CardCode As 'Cust. Code',T3.CardName As 'Cust. Name',T5.SlpName As 'Sale Emp. Name',
    T4.IndustryC As 'Channel Type',T6.CityB As 'BillToCity',T7.Name As 'BillToState',T6.CityS As 'ShipToCity',T8.Name As 'ShipToState',
    T4.U_Une_Zone As 'Zone',
    T2.ItmsGrpNam As 'L1',T0.LineNum As 'Row No',T0.ItemCode As 'ItemCode',T0.Dscription As 'Item Name',t0.whscode,
    T0.Quantity As 'Quantity',T0.StockPrice As 'COGS Price',IsNull(Sum(T0.Quantity * T0.StockPrice),0) As 'COGS Value',T0.VatSum As 'Tax Amount',
    IsNull((Case When T3.DocType='I' Then (Case  When T0.Currency = 'INR' Then T0.PriceBefDi Else (T0.PriceBefDi * T0.Rate) End) Else T0.Price End) ,0) As 'Sales Price',
    IsNull((Case When T3.DocType='I' Then (Case  When T0.Currency = 'INR' Then T0.INMPrice Else (T0.INMPrice * T0.Rate) End) Else T0.Price End) ,0) As 'Sales Price',
    IsNull((Case When T3.DocType='I' Then (Case  When T0.Currency = 'INR' Then Sum(T0.Quantity * T0.INMPrice) Else Sum(T0.Quantity * T0.INMPrice * T0.Rate) End) Else T0.LineTotal End) ,0) As 'Sales Value',t9.linetotal as 'Freight',
    T3.DocType As 'DocType',
    (SELECT DISTINCT ISNULL (SUM(INV4.TaxSum),0)
    FROM INV4
    WHERE INV4.StaType = -90
    AND INV4.DocEntry = T3.DocEntry
    AND INV4.LineNum = T0.LineNum) AS 'BED',
    (SELECT DISTINCT ISNULL (SUM(INV4.TaxSum),0)
    FROM INV4
    WHERE INV4.StaType = -60
    AND INV4.DocEntry = T3.DocEntry
    AND INV4.LineNum = T0.LineNum) AS 'Cess',
    (SELECT DISTINCT ISNULL (SUM(INV4.TaxSum),0)
    FROM INV4
    WHERE INV4.StaType = 9
    AND INV4.DocEntry = T3.DocEntry
    AND INV4.LineNum = T0.LineNum) AS 'HeCess',
    (SELECT DISTINCT ISNULL (SUM(INV4.TaxSum),0)
    FROM INV4
    WHERE (INV4.StaType = 1 or inv4.staType = 8)
    AND INV4.DocEntry = T3.DocEntry
    AND INV4.LineNum = T0.LineNum) AS 'VAT',
    (SELECT DISTINCT ISNULL (SUM(INV4.TaxSum),0)
    FROM INV4
    WHERE INV4.StaType = 8
    AND INV4.DocEntry = T3.DocEntry
    AND INV4.LineNum = T0.LineNum) AS 'CST'
    From INV1 T0
    Left Join OITM T1 On T1.ItemCode=T0.ItemCode
    Left Join OITB T2 On T2.ItmsGrpCod=T1.ItmsGrpCod
    Left Join OINV T3 On T3.DocEntry=T0.DocEntry
    Left Join OCRD T4 On T4.CardCode=T3.CardCode
    Left Join OSLP T5 On T5.SlpCode=T4.SlpCode
    Left Join INV12 T6 On T6.DocEntry=T0.DocEntry
    Left Join OCST T7 On T7.Code=T6.StateB and T7.Country='IN'
    Left Join OCST T8 On T8.Code=T6.StateS and T8.Country='IN'
    left join inv3 t9 on t9.docentry = t3.docentry
    WHERE T3.[DocDate] >= [%0] and T3.[DocDate] <= [%1] and t3.U_UNE_GCAT = '2'
    Group By T1.U_grp01,T3.DocEntry,T3.DocNum,T3.DocDate,T0.LineNum,T3.CardCode,T3.CardName,T5.SlpName,T4.IndustryC,T4.U_Une_Zone,
    T6.CityB,T7.Name,T6.CityS,T8.Name,T0.VatSum,T0.Currency,T0.Rate,T3.DocType,T0.Price,T0.LineTotal,
    T2.ItmsGrpNam,T0.ItemCode,T0.Dscription,T0.StockPrice,T0.INMPrice,T0.PriceBefDi,T0.Quantity,t9.linetotal,t0.WhsCode
    Union All
    Select
    T1.U_grp01 As 'BA',T3.DocDate As 'Posting Date',Month(T3.DocDate) As 'PostMonth',Year(T3.DocDate) As 'PostYear',
    'AR Invoice' As 'Type',T3.DocNum As 'Doc No',T3.CardCode As 'Cust. Code',T3.CardName As 'Cust. Name',T5.SlpName As 'Sale Emp. Name',
    T4.IndustryC As 'Channel Type',T6.CityB As 'BillToCity',T7.Name As 'BillToState',T6.CityS As 'ShipToCity',T8.Name As 'ShipToState',
    T4.U_Une_Zone As 'Zone',
    T2.ItmsGrpNam As 'L1',T0.LineNum As 'Row No',T0.ItemCode As 'ItemCode',T0.Dscription As 'Item Name',t0.whscode,
    T0.Quantity As 'Quantity',T0.StockPrice As 'COGS Price',IsNull(Sum(T0.Quantity * T0.StockPrice),0) As 'COGS Value',T0.VatSum As 'Tax Amount',
    IsNull((Case When T3.DocType='I' Then (Case  When T0.Currency = 'INR' Then T0.PriceBefDi Else (T0.PriceBefDi * T0.Rate) End) Else T0.Price End) ,0) As 'Sales Price',
    IsNull((Case When T3.DocType='I' Then (Case  When T0.Currency = 'INR' Then T0.INMPrice Else (T0.INMPrice * T0.Rate) End) Else T0.Price End) ,0) As 'Sales Price',
    IsNull((Case When T3.DocType='I' Then (Case  When T0.Currency = 'INR' Then Sum(T0.Quantity * T0.INMPrice) Else Sum(T0.Quantity * T0.INMPrice * T0.Rate) End) Else T0.LineTotal End) ,0) As 'Sales Value',t9.linetotal as 'Freight',
    T3.DocType As 'DocType',
    (SELECT DISTINCT ISNULL (SUM(rin4.TaxSum),0)
    FROM rin4
    WHERE rin4.StaType = -90
    AND rin4.DocEntry = T3.DocEntry
    AND rin4.LineNum = T0.LineNum) AS 'BED',
    (SELECT DISTINCT ISNULL (SUM(rin4.TaxSum),0)
    FROM rin4
    WHERE rin4.StaType = -60
    AND rin4.DocEntry = T3.DocEntry
    AND rin4.LineNum = T0.LineNum) AS 'Cess',
    (SELECT DISTINCT ISNULL (SUM(rin4.TaxSum),0)
    FROM rin4
    WHERE rin4.StaType = 9
    AND rin4.DocEntry = T3.DocEntry
    AND rin4.LineNum = T0.LineNum) AS 'HeCess',
    (SELECT DISTINCT ISNULL (SUM(rin4.TaxSum),0)
    FROM rin4
    WHERE (rin4.StaType = 1 or rin4.staType = 8)
    AND rin4.DocEntry = T3.DocEntry
    AND rin4.LineNum = T0.LineNum) AS 'VAT',
    (SELECT DISTINCT ISNULL (SUM(rin4.TaxSum),0)
    FROM rin4
    WHERE rin4.StaType = 8
    AND rin4.DocEntry = T3.DocEntry
    AND rin4.LineNum = T0.LineNum) AS 'CST'
    From rin1 T0
    Left Join OITM T1 On T1.ItemCode=T0.ItemCode
    Left Join OITB T2 On T2.ItmsGrpCod=T1.ItmsGrpCod
    Left Join Orin T3 On T3.DocEntry=T0.DocEntry
    Left Join OCRD T4 On T4.CardCode=T3.CardCode
    Left Join OSLP T5 On T5.SlpCode=T4.SlpCode
    Left Join rin12 T6 On T6.DocEntry=T0.DocEntry
    Left Join OCST T7 On T7.Code=T6.StateB and T7.Country='IN'
    Left Join OCST T8 On T8.Code=T6.StateS and T8.Country='IN'
    left join rin3 t9 on t9.docentry = t3.docentry
    WHERE T3.[DocDate] >= [%0] and T3.[DocDate] <= [%1] and t3.U_UNE_GCAT = '2'
    Group By T1.U_grp01,T3.DocEntry,T3.DocNum,T3.DocDate,T0.LineNum,T3.CardCode,T3.CardName,T5.SlpName,T4.IndustryC,T4.U_Une_Zone,
    T6.CityB,T7.Name,T6.CityS,T8.Name,T0.VatSum,T0.Currency,T0.Rate,T3.DocType,T0.Price,T0.LineTotal,
    T2.ItmsGrpNam,T0.ItemCode,T0.Dscription,T0.StockPrice,T0.INMPrice,T0.PriceBefDi,T0.Quantity,t9.linetotal,t0.WhsCode
    Thanks in Advance

    Hi deepak..
    try this
    /* SELECT FROM OSRT P1 */
    DECLARE @FROM AS DATE
    /* WHERE */
    SET @FROM = /* P1.FromDate */ '[%1]'
    /* SELECT FROM OSRT P2 */
    DECLARE @TO AS DATE
    /* WHERE */
    SET @TO = /* P2.ToDate */ '[%2]';
    SELECT T1.U_grp01 AS 'BA',
           T3.DocDate AS 'Posting Date',
           MONTH(T3.DocDate) AS 'PostMonth',
           YEAR(T3.DocDate) AS 'PostYear',
           'AR Invoice' AS 'Type',
           T3.DocNum AS 'Doc No',
           T3.CardCode AS 'Cust. Code',
           T3.CardName AS 'Cust. Name',
           T5.SlpName AS 'Sale Emp. Name',
           T4.IndustryC AS 'Channel Type',
           T6.CityB AS 'BillToCity',
           T7.Name AS 'BillToState',
           T6.CityS AS 'ShipToCity',
           T8.Name AS 'ShipToState',
           T4.U_Une_Zone AS 'Zone',
           T2.ItmsGrpNam AS 'L1',
           T0.LineNum AS 'Row No',
           T0.ItemCode AS 'ItemCode',
           T0.Dscription AS 'Item Name',
           t0.whscode,
           T0.Quantity AS 'Quantity',
           T0.StockPrice AS 'COGS Price',
           ISNULL(SUM(T0.Quantity * T0.StockPrice), 0) AS 'COGS Value',
           T0.VatSum AS 'Tax Amount',
           ISNULL(
                   CASE
                        WHEN T3.DocType = 'I' THEN (
                                 CASE
                                      WHEN T0.Currency = 'INR' THEN T0.PriceBefDi
                                      ELSE (T0.PriceBefDi * T0.Rate)
                                 END
                        ELSE T0.Price
                   END
               0
           ) AS 'Sales Price',
           ISNULL(
                   CASE
                        WHEN T3.DocType = 'I' THEN (
                                 CASE
                                      WHEN T0.Currency = 'INR' THEN T0.INMPrice
                                      ELSE (T0.INMPrice * T0.Rate)
                                 END
                        ELSE T0.Price
                   END
               0
           ) AS 'Sales Price',
           ISNULL(
                   CASE
                        WHEN T3.DocType = 'I' THEN (
                                 CASE
                                      WHEN T0.Currency = 'INR' THEN SUM(T0.Quantity * T0.INMPrice)
                                      ELSE SUM(T0.Quantity * T0.INMPrice * T0.Rate)
                                 END
                        ELSE T0.LineTotal
                   END
               0
           ) AS 'Sales Value',
           t9.linetotal AS 'Freight',
           T3.DocType AS 'DocType',
               SELECT DISTINCT ISNULL(SUM(INV4.TaxSum), 0)
               FROM   INV4
               WHERE  INV4.StaType = -90
                      AND INV4.DocEntry = T3.DocEntry
                      AND INV4.LineNum = T0.LineNum
           ) AS 'BED',
               SELECT DISTINCT ISNULL(SUM(INV4.TaxSum), 0)
               FROM   INV4
               WHERE  INV4.StaType = -60
                      AND INV4.DocEntry = T3.DocEntry
                      AND INV4.LineNum = T0.LineNum
           ) AS 'Cess',
               SELECT DISTINCT ISNULL(SUM(INV4.TaxSum), 0)
               FROM   INV4
               WHERE  INV4.StaType = 9
                      AND INV4.DocEntry = T3.DocEntry
                      AND INV4.LineNum = T0.LineNum
           ) AS 'HeCess',
               SELECT DISTINCT ISNULL(SUM(INV4.TaxSum), 0)
               FROM   INV4
               WHERE  (INV4.StaType = 1 OR inv4.staType = 8)
                      AND INV4.DocEntry = T3.DocEntry
                      AND INV4.LineNum = T0.LineNum
           ) AS 'VAT',
               SELECT DISTINCT ISNULL(SUM(INV4.TaxSum), 0)
               FROM   INV4
               WHERE  INV4.StaType = 8
                      AND INV4.DocEntry = T3.DocEntry
                      AND INV4.LineNum = T0.LineNum
           ) AS 'CST'
    FROM   INV1 T0
           LEFT JOIN OITM T1
                ON  T1.ItemCode = T0.ItemCode
           LEFT JOIN OITB T2
                ON  T2.ItmsGrpCod = T1.ItmsGrpCod
           LEFT JOIN OINV T3
                ON  T3.DocEntry = T0.DocEntry
           LEFT JOIN OCRD T4
                ON  T4.CardCode = T3.CardCode
           LEFT JOIN OSLP T5
                ON  T5.SlpCode = T4.SlpCode
           LEFT JOIN INV12 T6
                ON  T6.DocEntry = T0.DocEntry
           LEFT JOIN OCST T7
                ON  T7.Code = T6.StateB
                AND T7.Country = 'IN'
           LEFT JOIN OCST T8
                ON  T8.Code = T6.StateS
                AND T8.Country = 'IN'
           LEFT JOIN inv3 t9
                ON  t9.docentry = t3.docentry
    WHERE  T3.[DocDate] >= @FROM
           AND T3.[DocDate] <= @TO
           AND t3.U_UNE_GCAT = '2'
    GROUP BY
           T1.U_grp01,
           T3.DocEntry,
           T3.DocNum,
           T3.DocDate,
           T0.LineNum,
           T3.CardCode,
           T3.CardName,
           T5.SlpName,
           T4.IndustryC,
           T4.U_Une_Zone,
           T6.CityB,
           T7.Name,
           T6.CityS,
           T8.Name,
           T0.VatSum,
           T0.Currency,
           T0.Rate,
           T3.DocType,
           T0.Price,
           T0.LineTotal,
           T2.ItmsGrpNam,
           T0.ItemCode,
           T0.Dscription,
           T0.StockPrice,
           T0.INMPrice,
           T0.PriceBefDi,
           T0.Quantity,
           t9.linetotal,
           t0.WhsCode
    UNION ALL
    SELECT T1.U_grp01 AS 'BA',
           T3.DocDate AS 'Posting Date',
           MONTH(T3.DocDate) AS 'PostMonth',
           YEAR(T3.DocDate) AS 'PostYear',
           'AR Invoice' AS 'Type',
           T3.DocNum AS 'Doc No',
           T3.CardCode AS 'Cust. Code',
           T3.CardName AS 'Cust. Name',
           T5.SlpName AS 'Sale Emp. Name',
           T4.IndustryC AS 'Channel Type',
           T6.CityB AS 'BillToCity',
           T7.Name AS 'BillToState',
           T6.CityS AS 'ShipToCity',
           T8.Name AS 'ShipToState',
           T4.U_Une_Zone AS 'Zone',
           T2.ItmsGrpNam AS 'L1',
           T0.LineNum AS 'Row No',
           T0.ItemCode AS 'ItemCode',
           T0.Dscription AS 'Item Name',
           t0.whscode,
           T0.Quantity AS 'Quantity',
           T0.StockPrice AS 'COGS Price',
           ISNULL(SUM(T0.Quantity * T0.StockPrice), 0) AS 'COGS Value',
           T0.VatSum AS 'Tax Amount',
           ISNULL(
                   CASE
                        WHEN T3.DocType = 'I' THEN (
                                 CASE
                                      WHEN T0.Currency = 'INR' THEN T0.PriceBefDi
                                      ELSE (T0.PriceBefDi * T0.Rate)
                                 END
                        ELSE T0.Price
                   END
               0
           ) AS 'Sales Price',
           ISNULL(
                   CASE
                        WHEN T3.DocType = 'I' THEN (
                                 CASE
                                      WHEN T0.Currency = 'INR' THEN T0.INMPrice
                                      ELSE (T0.INMPrice * T0.Rate)
                                 END
                        ELSE T0.Price
                   END
               0
           ) AS 'Sales Price',
           ISNULL(
                   CASE
                        WHEN T3.DocType = 'I' THEN (
                                 CASE
                                      WHEN T0.Currency = 'INR' THEN SUM(T0.Quantity * T0.INMPrice)
                                      ELSE SUM(T0.Quantity * T0.INMPrice * T0.Rate)
                                 END
                        ELSE T0.LineTotal
                   END
               0
           ) AS 'Sales Value',
           t9.linetotal AS 'Freight',
           T3.DocType AS 'DocType',
               SELECT DISTINCT ISNULL(SUM(rin4.TaxSum), 0)
               FROM   rin4
               WHERE  rin4.StaType = -90
                      AND rin4.DocEntry = T3.DocEntry
                      AND rin4.LineNum = T0.LineNum
           ) AS 'BED',
               SELECT DISTINCT ISNULL(SUM(rin4.TaxSum), 0)
               FROM   rin4
               WHERE  rin4.StaType = -60
                      AND rin4.DocEntry = T3.DocEntry
                      AND rin4.LineNum = T0.LineNum
           ) AS 'Cess',
               SELECT DISTINCT ISNULL(SUM(rin4.TaxSum), 0)
               FROM   rin4
               WHERE  rin4.StaType = 9
                      AND rin4.DocEntry = T3.DocEntry
                      AND rin4.LineNum = T0.LineNum
           ) AS 'HeCess',
               SELECT DISTINCT ISNULL(SUM(rin4.TaxSum), 0)
               FROM   rin4
               WHERE  (rin4.StaType = 1 OR rin4.staType = 8)
                      AND rin4.DocEntry = T3.DocEntry
                      AND rin4.LineNum = T0.LineNum
           ) AS 'VAT',
               SELECT DISTINCT ISNULL(SUM(rin4.TaxSum), 0)
               FROM   rin4
               WHERE  rin4.StaType = 8
                      AND rin4.DocEntry = T3.DocEntry
                      AND rin4.LineNum = T0.LineNum
           ) AS 'CST'
    FROM   rin1 T0
           LEFT JOIN OITM T1
                ON  T1.ItemCode = T0.ItemCode
           LEFT JOIN OITB T2
                ON  T2.ItmsGrpCod = T1.ItmsGrpCod
           LEFT JOIN [dbo].[Orin] T3
                ON  T3.DocEntry = T0.DocEntry
           LEFT JOIN OCRD T4
                ON  T4.CardCode = T3.CardCode
           LEFT JOIN OSLP T5
                ON  T5.SlpCode = T4.SlpCode
           LEFT JOIN rin12 T6
                ON  T6.DocEntry = T0.DocEntry
           LEFT JOIN OCST T7
                ON  T7.Code = T6.StateB
                AND T7.Country = 'IN'
           LEFT JOIN OCST T8
                ON  T8.Code = T6.StateS
                AND T8.Country = 'IN'
           LEFT JOIN rin3 t9
                ON  t9.docentry = t3.docentry
    WHERE  T3.[DocDate] >= @FROM
           AND T3.[DocDate] <= @TO
           AND t3.U_UNE_GCAT = '2'
    GROUP BY
           T1.U_grp01,
           T3.DocEntry,
           T3.DocNum,
           T3.DocDate,
           T0.LineNum,
           T3.CardCode,
           T3.CardName,
           T5.SlpName,
           T4.IndustryC,
           T4.U_Une_Zone,
           T6.CityB,
           T7.Name,
           T6.CityS,
           T8.Name,
           T0.VatSum,
           T0.Currency,
           T0.Rate,
           T3.DocType,
           T0.Price,
           T0.LineTotal,
           T2.ItmsGrpNam,
           T0.ItemCode,
           T0.Dscription,
           T0.StockPrice,
           T0.INMPrice,
           T0.PriceBefDi,
           T0.Quantity,
           t9.linetotal,
           t0.WhsCode
    rgds
    Kennedy

Maybe you are looking for