Quotation is %22

Where can I find the developer's tool that tells me the codes
for characters other than numbers and letters when translating from
.txt to .html using a dynamic text box in flash?? I used to know
where this was... and it used to be easier to find.
For example
%26 is &
or
%22 is "

In fact, it is ASCII, only it's the ASCII value expressed in
hexadecimal.
$20 = 32 = ASCII space
$22 = 34 = double quote (")
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"David Powers" <[email protected]> wrote in message
news:fkj59s$sm2$[email protected]..
> Murray *ACE* wrote:
>> Those are just ASCII values for the characters.
>
> Actually, they're not ASCII values. They're URL-encoded
values:
>
>
http://www.w3schools.com/tags/ref_urlencode.asp
>
> --
> David Powers, Adobe Community Expert
> Author, "The Essential Guide to Dreamweaver CS3"
(friends of ED)
> Author, "PHP Solutions" (friends of ED)
>
http://foundationphp.com/

Similar Messages

  • Error while creating a Quotation in dp81 with simulation

    hi Guys,
    My client has a simulation for an operative project. First a quotation was created through sales pricing in dp81. its rejected. now he wants to create another quotation with simulation. when the inputs are given its gives error as " The reference has already been completely copied or rejected".  Can anyone explain why this is happening and what is the solution.

    Hi,
    This is might be due the completion rule of the item category of the inquiry.
    Check first the item category of the inquiry sales document you are using. Second go to Tcode VOV7, completion rule field of the item category you are using should be empty in order to be able to create more than one quotation from dp81.
    Regards

  • Error while creating a quotation in SD

    i am creating a quotation referring an inquiry of type ZINO and the quotation type is ZQTO. while saving the doc i am getting a error
    Pricing error: Mandatory condition ZQOE is missing.
    I am not able to fix it kindly help asap.
    Nikhil

    Hi Nikhil,
    U check for which condition type U have created condition record in VK11.
    Also check for the table while creating condition record (fields in condition table)
    Check once while manually entering the value for the condition in sales order, If it works.....create condition record for the same combination in VK11.
    Regards,
    Praveen.

  • Allow certain users to capture quotation after bid end date

    Hi
    Is it possible to allow certain users to be able to capture quotation on behalf of suppliers using surrogate bid after the end date has been reached but before the opening date? How would I do this?
    Regards

    Hi
    As the end date and opening date are at the header level common to all bidders/vendors, we cannot manually capture quotation for specific suppliers using surrogate bidding. I dont think there is even a BADI for this.
    Rgds
    Reddy

  • Error while adding custom fields in ERP quotation

    I am trying to add custom fields to ERP quotation. So picked up ERP_H and added view BTCUSTOMER_H/CustomerH to its views. I have added the relevant custom fields to BTCUSTOMER_H/CustomerH. Now when I try displaying this, I get the following error..
    Context generation failed in view BTCUSTOMER_H/CustomerH of UI Component ERP_H
    An exception has occurred Exception Class  CX_BSP_WD_INCORRECT_IMPLEMENT - There is no node text 'BTAdminH' in controller ''. 
    Method:  CL_BSP_WD_CONTROLLER=>DO_CONTEXT_NODE_BINDING 
    Source Text Row:  39
    Initialization of view BTCUSTOMER_H/CustomerH of UI Component ERP_H failed
    An exception has occurred Exception Class  CX_BSP_WD_INCORRECT_IMPLEMENT - There is no node text 'BTAdminH' in controller ''. 
    Method:  CL_BSP_WD_CONTROLLER=>DO_CONTEXT_NODE_BINDING 
    Source Text Row:  39
    Cannot display view ERP_H/HeaderOverviewpage of UI Component ERP_H
    An exception has occurred Exception Class  CX_BSP_WD_INCORRECT_IMPLEMENT - There is no node text 'BTAdminH' in controller ''. 
    Method:  CL_BSP_WD_CONTROLLER=>DO_CONTEXT_NODE_BINDING 
    Source Text Row:  39
    Window ERP_H/MainWindow of UI Component ERP_H cannot be displayed
    An exception has occurred Exception Class  CX_BSP_WD_RUNTIME_ERROR - View BTCUSTOMER_H/CustomerH in component ERP_H could not be bound 
    Method:  CL_BSP_WD_VIEW_CONTROLLER=>BIND_VIEW 
    Source Text Row:  165
    I have no prior experiance in UI development. Could someone explain me this error and how to fix this?
    Regards,
    Amar.

    closing this unresolved

  • Changing quantities in sales order with reference to quotation

    Hi,
    Quotation has been created for Product -- A, 10 quantities.
    Sales order created with reference to quotation, system copies 10 quantity in sales order.
    How do you restrict in sales order end user should not change quantities, system should not allow for changes by end user. If end user changes Qty system should give an "Error message", so that sales can not be saved.
    Could you suggest solution ASAP.
    Thanks in Advance.
    Regards,
    vamsi.

    Normally You will have a warning message set for this. under class V1. if you want the error to be hard error then you would have to hard code it in a user exit under mv45afzz "userexit_save_document_prepare" where u can check if the quantities in the quote and sales order are different and create a hard error.
    the other option which I am not sure if it is possible is to propose the eror in message class v4 which you can control thru customisation under SPRO>SD>message settings
    reward points if it helps
    regards
    Biju

  • Restrict manual change in sales order with respect to quotation

    Hi All,
    The user use to create sales order with respect to quotation.  The user can able to change pricing as well as some header and item fields.  How can I restrict user for manual change in sales order expect some specific fields.
    Thanks.

    Hi Sunil,
    It is possible through configuration better you can post in sd forums.
    For the condition type settings , ensure that the manual entries is 'D'. it wont allow any changes in the order.
    Regards,
    Madhu.
    Edited by: madhurao123 on Aug 1, 2011 1:08 PM

  • Free goods from Quotation to Contract to Sales Order

    Hi SAP Gurus,
    I have questions regarding Free Goods. This is the scenario.
    Doc flow as:
    Quotation 123
         Contract 456
               Sales Order (zmor) 789
               Sales order (zkal) 101
    In the quotation 123 & contract 456, the quantity of the item is 50pcs. However, when creating sales order (zmor), if we input 50 pcs as the quantity, the free goods were not determined. What we did was, we lessen the quantity to 30pcs. From there, Free goods were now shown. And then we created another sales order (zkal) for the remaining 20 pcs.
    Questions:
    1.- why is it on the 1st sales order w/ same quantity(50pcs), free goods were not determined?
    2.- i believe that in standard SAP, free goods were not determined in quotation or in contract. Is there a way to determine the free goods on those doc types?
    3.- how about free goods determination in:
    A. Stock transfer order
    B. Product diversion
    C. Consignments
    D. Virtual return
    I am really hoping for feedback on this. Thanks in advance!
    Erza

    Hi,
    Free goods can only be supported on a 1:1 ratio. This means that an order item can lead to a free goods item. Agreements in the following form are not supported: u2018With material 1, material 2 and material 3 are free of chargeu2018 or u2018If material 1 and material 2 are ordered at the same time, then material 3 is free of chargeu2018.
    - Free goods are not supported in combinations with material structures (for example, product selection, BOM, variants with BOM explosion).
    - Free goods are only supported for sales orders with document category C (for example, not quotations).
    - Free goods are not supported for deliveries without reference to a sales order.
    - Free goods cannot be used in make-to-order production, third-party order processing and scheduling agreements.
    Regards,
    Saju.S

  • User can not create the quotation in PCUI

    Dear All,
    User salesrep is not able to create the quotation in PCUI. When he select the quotation tab and click on create button one pop up appears but no quotation appears in it and he can not select it for creating the quotation.
    I have checked the authorization objects for this user. Seems everything is ok from authorization point of view.
    User has authorization to create, display and delete for quotation in object CRM_ORD_LP.
    Please help me regarding this.
    Regards
    Pankaj Vispute

    Hi,
    Please check whether u have assign transaction type of quotation and iviews to salesrep user from Portal admin and related portal role to u r User.
    Regards,
    DD's

  • Unable to Create Quotations in Oracle Apps with named PL/SQL Block

    Dear All,
    I got struced while creating Qotations from the backend using oracle API in a Procedure.But the same API working fine in Anonymous block and creating Qutations in apps.But the in parameters are same in anonymous and named bolck.i have done Debugging also and its returning in parameter values.but quotations not created in apps.
    I am sending the both scripts(named plsql and anonymous blocks) please anybody knows about this correct me where iam doing mistake.
    *******anonymous bolck*********
    DECLARE
    X_ROWID VARCHAR2(200) :=NULL;
    X_PO_HEADER_ID NUMBER :=NULL;
    X_AGENT_ID NUMBER :=25;
    X_TYPE_LOOKUP_CODE VARCHAR2(200) :='QUOTATION';
    X_LAST_UPDATE_DATE DATE :=SYSDATE;
    X_LAST_UPDATED_BY NUMBER :=1318;
    X_SEGMENT1 VARCHAR2(200) :=2477;
    X_SUMMARY_FLAG VARCHAR2(200) :='N';
    X_ENABLED_FLAG VARCHAR2(200) :='Y';
    X_SEGMENT2 VARCHAR2(200);
    X_SEGMENT3 VARCHAR2(200);
    X_SEGMENT4 VARCHAR2(200);
    X_SEGMENT5 VARCHAR2(200);
    X_START_DATE_ACTIVE DATE;
    X_END_DATE_ACTIVE DATE;
    X_LAST_UPDATE_LOGIN NUMBER :=45786;
    X_CREATION_DATE DATE :=SYSDATE;
    X_CREATED_BY NUMBER :=1318;
    X_VENDOR_ID NUMBER :=5;
    X_VENDOR_SITE_ID NUMBER :=6;
    X_VENDOR_CONTACT_ID NUMBER :=181;
    X_SHIP_TO_LOCATION_ID NUMBER :=204;
    X_BILL_TO_LOCATION_ID NUMBER :=207;
    X_TERMS_ID NUMBER :=10013;
    X_SHIP_VIA_LOOKUP_CODE VARCHAR2(200) :='UPS';
    X_FOB_LOOKUP_CODE VARCHAR2(200) :='Origin';
    X_PAY_ON_CODE VARCHAR2(200);
    X_FREIGHT_TERMS_LOOKUP_CODE VARCHAR2(200) :='Due';
    X_STATUS_LOOKUP_CODE VARCHAR2(200) :='A';
    X_CURRENCY_CODE VARCHAR2(200) :='USD';
    X_RATE_TYPE VARCHAR2(200);
    X_RATE_DATE DATE;
    X_RATE NUMBER;
    X_FROM_HEADER_ID NUMBER;
    X_FROM_TYPE_LOOKUP_CODE VARCHAR2(200);
    X_START_DATE DATE;
    X_END_DATE DATE;
    X_BLANKET_TOTAL_AMOUNT NUMBER;
    X_AUTHORIZATION_STATUS VARCHAR2(200);
    X_REVISION_NUM NUMBER;
    X_REVISED_DATE DATE;
    X_APPROVED_FLAG VARCHAR2(200);
    X_APPROVED_DATE DATE;
    X_AMOUNT_LIMIT NUMBER;
    X_MIN_RELEASE_AMOUNT NUMBER;
    X_NOTE_TO_AUTHORIZER VARCHAR2(200);
    X_NOTE_TO_VENDOR VARCHAR2(200);
    X_NOTE_TO_RECEIVER VARCHAR2(200);
    X_PRINT_COUNT NUMBER;
    X_PRINTED_DATE DATE;
    X_VENDOR_ORDER_NUM VARCHAR2(200);
    X_CONFIRMING_ORDER_FLAG VARCHAR2(200);
    X_COMMENTS VARCHAR2(200);
    X_REPLY_DATE DATE;
    X_REPLY_METHOD_LOOKUP_CODE VARCHAR2(200);
    X_RFQ_CLOSE_DATE DATE;
    X_QUOTE_TYPE_LOOKUP_CODE VARCHAR2(200) :='CATALOG';
    X_QUOTATION_CLASS_CODE VARCHAR2(200) :='CATALOG';
    X_QUOTE_WARNING_DELAY_UNIT VARCHAR2(200);
    X_QUOTE_WARNING_DELAY NUMBER :=7;
    X_QUOTE_VENDOR_QUOTE_NUMBER VARCHAR2(200);
    X_ACCEPTANCE_REQUIRED_FLAG VARCHAR2(200);
    X_ACCEPTANCE_DUE_DATE DATE;
    X_CLOSED_DATE DATE;
    X_USER_HOLD_FLAG VARCHAR2(200);
    X_APPROVAL_REQUIRED_FLAG VARCHAR2(200);
    X_CANCEL_FLAG VARCHAR2(200);
    X_FIRM_STATUS_LOOKUP_CODE VARCHAR2(200);
    X_FIRM_DATE DATE;
    X_FROZEN_FLAG VARCHAR2(200);
    X_SUPPLY_AGREEMENT_FLAG VARCHAR2(200) :='L';
    X_GLOBAL_AGREEMENT_FLAG VARCHAR2(200);
    X_ATTRIBUTE_CATEGORY VARCHAR2(200);
    X_ATTRIBUTE1 VARCHAR2(200);
    X_ATTRIBUTE2 VARCHAR2(200);
    X_ATTRIBUTE3 VARCHAR2(200);
    X_ATTRIBUTE4 VARCHAR2(200);
    X_ATTRIBUTE5 VARCHAR2(200);
    X_ATTRIBUTE6 VARCHAR2(200);
    X_ATTRIBUTE7 VARCHAR2(200);
    X_ATTRIBUTE8 VARCHAR2(200);
    X_ATTRIBUTE9 VARCHAR2(200);
    X_ATTRIBUTE10 VARCHAR2(200);
    X_ATTRIBUTE11 VARCHAR2(200);
    X_ATTRIBUTE12 VARCHAR2(200);
    X_ATTRIBUTE13 VARCHAR2(200);
    X_ATTRIBUTE14 VARCHAR2(200);
    X_ATTRIBUTE15 VARCHAR2(200);
    X_CLOSED_CODE VARCHAR2(200);
    X_USSGL_TRANSACTION_CODE VARCHAR2(200);
    X_GOVERNMENT_CONTEXT VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE_CATEGORY VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE1 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE2 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE3 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE4 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE5 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE6 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE7 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE8 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE9 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE10 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE11 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE12 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE13 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE14 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE15 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE16 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE17 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE18 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE19 VARCHAR2(200);
    X_GLOBAL_ATTRIBUTE20 VARCHAR2(200);
    X_MANUAL BOOLEAN;
    X_PRICE_UPDATE_TOLERANCE NUMBER;
    P_SHIPPING_CONTROL VARCHAR2(200);
    P_ENCUMBRANCE_REQUIRED_FLAG VARCHAR2(200);
    BEGIN
    APPS.PO_HEADERS_SV11.INSERT_PO(X_ROWID ,
    X_PO_HEADER_ID ,
    X_AGENT_ID ,
    X_TYPE_LOOKUP_CODE ,
    X_LAST_UPDATE_DATE ,
    X_LAST_UPDATED_BY ,
    X_SEGMENT1 ,
    X_SUMMARY_FLAG ,
    X_ENABLED_FLAG ,
    X_SEGMENT2 ,
    X_SEGMENT3 ,
    X_SEGMENT4 ,
    X_SEGMENT5 ,
    X_START_DATE_ACTIVE ,
    X_END_DATE_ACTIVE ,
    X_LAST_UPDATE_LOGIN ,
    X_CREATION_DATE ,
    X_CREATED_BY ,
    X_VENDOR_ID ,
    X_VENDOR_SITE_ID ,
    X_VENDOR_CONTACT_ID ,
    X_SHIP_TO_LOCATION_ID ,
    X_BILL_TO_LOCATION_ID ,
    X_TERMS_ID ,
    X_SHIP_VIA_LOOKUP_CODE ,
    X_FOB_LOOKUP_CODE ,
    X_PAY_ON_CODE ,
    X_FREIGHT_TERMS_LOOKUP_CODE ,
    X_STATUS_LOOKUP_CODE ,
    X_CURRENCY_CODE ,
    X_RATE_TYPE ,
    X_RATE_DATE ,
    X_RATE ,
    X_FROM_HEADER_ID ,
    X_FROM_TYPE_LOOKUP_CODE ,
    X_START_DATE ,
    X_END_DATE ,
    X_BLANKET_TOTAL_AMOUNT ,
    X_AUTHORIZATION_STATUS ,
    X_REVISION_NUM ,
    X_REVISED_DATE ,
    X_APPROVED_FLAG ,
    X_APPROVED_DATE ,
    X_AMOUNT_LIMIT ,
    X_MIN_RELEASE_AMOUNT ,
    X_NOTE_TO_AUTHORIZER ,
    X_NOTE_TO_VENDOR ,
    X_NOTE_TO_RECEIVER ,
    X_PRINT_COUNT ,
    X_PRINTED_DATE ,
    X_VENDOR_ORDER_NUM ,
    X_CONFIRMING_ORDER_FLAG ,
    X_COMMENTS ,
    X_REPLY_DATE ,
    X_REPLY_METHOD_LOOKUP_CODE ,
    X_RFQ_CLOSE_DATE ,
    X_QUOTE_TYPE_LOOKUP_CODE ,
    X_QUOTATION_CLASS_CODE ,
    X_QUOTE_WARNING_DELAY_UNIT ,
    X_QUOTE_WARNING_DELAY ,
    X_QUOTE_VENDOR_QUOTE_NUMBER ,
    X_ACCEPTANCE_REQUIRED_FLAG ,
    X_ACCEPTANCE_DUE_DATE ,
    X_CLOSED_DATE ,
    X_USER_HOLD_FLAG ,
    X_APPROVAL_REQUIRED_FLAG ,
    X_CANCEL_FLAG ,
    X_FIRM_STATUS_LOOKUP_CODE ,
    X_FIRM_DATE ,
    X_FROZEN_FLAG ,
    X_SUPPLY_AGREEMENT_FLAG ,
    X_GLOBAL_AGREEMENT_FLAG ,
    X_ATTRIBUTE_CATEGORY ,
    X_ATTRIBUTE1 ,
    X_ATTRIBUTE2 ,
    X_ATTRIBUTE3 ,
    X_ATTRIBUTE4 ,
    X_ATTRIBUTE5 ,
    X_ATTRIBUTE6 ,
    X_ATTRIBUTE7 ,
    X_ATTRIBUTE8 ,
    X_ATTRIBUTE9 ,
    X_ATTRIBUTE10 ,
    X_ATTRIBUTE11 ,
    X_ATTRIBUTE12 ,
    X_ATTRIBUTE13 ,
    X_ATTRIBUTE14 ,
    X_ATTRIBUTE15 ,
    X_CLOSED_CODE ,
    X_USSGL_TRANSACTION_CODE ,
    X_GOVERNMENT_CONTEXT ,
    X_GLOBAL_ATTRIBUTE_CATEGORY ,
    X_GLOBAL_ATTRIBUTE1 ,
    X_GLOBAL_ATTRIBUTE2 ,
    X_GLOBAL_ATTRIBUTE3 ,
    X_GLOBAL_ATTRIBUTE4 ,
    X_GLOBAL_ATTRIBUTE5 ,
    X_GLOBAL_ATTRIBUTE6 ,
    X_GLOBAL_ATTRIBUTE7 ,
    X_GLOBAL_ATTRIBUTE8 ,
    X_GLOBAL_ATTRIBUTE9 ,
    X_GLOBAL_ATTRIBUTE10 ,
    X_GLOBAL_ATTRIBUTE11 ,
    X_GLOBAL_ATTRIBUTE12 ,
    X_GLOBAL_ATTRIBUTE13 ,
    X_GLOBAL_ATTRIBUTE14 ,
    X_GLOBAL_ATTRIBUTE15 ,
    X_GLOBAL_ATTRIBUTE16 ,
    X_GLOBAL_ATTRIBUTE17 ,
    X_GLOBAL_ATTRIBUTE18 ,
    X_GLOBAL_ATTRIBUTE19 ,
    X_GLOBAL_ATTRIBUTE20 ,
    X_MANUAL ,
    X_PRICE_UPDATE_TOLERANCE ,
    P_SHIPPING_CONTROL ,
    P_ENCUMBRANCE_REQUIRED_FLAG );
    END;
    ***************************plsql named block****************
    CREATE OR REPLACE Procedure p6(p_row_id IN OUT VARCHAR2
    ,p_po_header_id IN OUT NUMBER
    ,p_segment1 IN OUT VARCHAR2
    ,p_Type_Lookup_Code IN VARCHAR2
                             ,p_agent_id IN NUMBER
    ,p_vendor_id IN NUMBER
    ,p_vendor_site_id IN NUMBER
    ,p_Ship_To_Location_Id IN NUMBER
    ,p_Bill_To_Location_Id IN NUMBER
    ,p_terms_id IN NUMBER
    ,p_fob_lookup_code IN VARCHAR2
    ,p_Freight_Terms_Lookup_Code IN VARCHAR2
    ,p_Currency_Code IN VARCHAR2
    --,p_Start_Date IN DATE
                             ,p_Quote_Type_Lookup_Code IN VARCHAR2
    --,p_quote_warning_delay IN VARCHAR2
    --,p_Vendor_Quote_Number IN VARCHAR2
    ,p_last_update_date IN DATE
    ,p_last_updated_by IN NUMBER
    ,p_last_update_login IN NUMBER
    ,p_creation_date IN DATE
    ,p_created_by IN NUMBER
    ,p_Ship_Via_Lookup_Code IN varchar2
                             ,p_Vendor_Contact_Id IN NUMBER
    --,p_res_ship_via IN VARCHAR2
    ,p_Comments IN VARCHAR2
    ,P_Supply_Agreement_Flag IN VARCHAR2
    ,p_organization_id IN VARCHAR2
    --,p_procurement_channel IN VARCHAR2
    --,p_Manual IN BOOLEAN
    --,p_return_status OUT VARCHAR2
    ,P_Authorization_Status IN VARCHAR2
                             -- ,p_error_msg OUT VARCHAR2
                        ,p_Summary_Flag in varchar2
                        ,p_Enabled_Flag in varchar2
                        ,p_Status_Lookup_Code in varchar2
                        ,p_Quotation_Class_Code in varchar2
                        ,p_Approval_Required_Flag in varchar2
                        --,X_shipping_control VARCHAR2 -- <INBOUND LOGISTICS FPJ>
    --,X_encumbrance_required_flag VARCHAR2
                        ) AS
    v_segment1 varchar2(50):=null;
    v_po_header_id number:=null;
    v_row_id varchar2(50):=null;
    BEGIN
    po_headers_sv11.insert_po(X_Rowid => v_row_id --VARCHAR2
    ,X_Po_Header_Id => v_po_header_id --NUMBER
    ,X_Agent_Id => p_agent_id --NUMBER
    ,X_Type_Lookup_Code => p_Type_Lookup_Code
    ,X_Segment1 => v_segment1 --VARCAHR2
    ,X_Summary_Flag => p_Summary_Flag
    ,X_Enabled_Flag => p_Enabled_Flag
    ,X_Vendor_Id => p_vendor_id --NUMBER
    ,X_Vendor_Site_Id => p_vendor_site_id --NUMBER
    ,X_Ship_To_Location_Id => p_Ship_To_Location_Id --NUMBER
    ,X_Bill_To_Location_Id => p_Bill_To_Location_Id --NUMBER
    ,X_Terms_Id => p_terms_id --NUMBER
    ,X_Fob_Lookup_Code => p_fob_lookup_code --VARCHAR
    ,X_Freight_Terms_Lookup_Code => p_Freight_Terms_Lookup_Code --VARCHAR
    ,X_Status_Lookup_Code => p_Status_Lookup_Code -- Active
    ,X_Currency_Code => p_Currency_Code --VARCHAR
    ,X_Start_Date =>NULL--p_start_date --DATE
    ,X_Reply_Date => NULL--p_Start_Date --DATE
    ,X_Quote_Type_Lookup_Code => p_Quote_Type_Lookup_Code --VARCHAR
    ,X_Quotation_Class_Code => p_Quotation_Class_Code
    ,X_Quote_Warning_Delay => NULL--p_quote_warning_delay --VARCHAR
    ,X_Quote_Vendor_Quote_Number => NULL--p_Vendor_Quote_Number --VARCHAR
    ,X_Approval_Required_Flag => p_Approval_Required_Flag
    ,X_Last_Update_Date => p_last_update_date --DATE
    ,X_Last_Updated_By => p_last_updated_by --NUMBER
    ,X_Segment2 => NULL
    ,X_Segment3 => NULL
    ,X_Segment4 => NULL
    ,X_Segment5 => NULL
    ,X_Start_Date_Active => NULL
    ,X_End_Date_Active => NULL
    ,X_Last_Update_Login => p_last_update_login --NUMBER
    ,X_Creation_Date => p_creation_date --DATE
    ,X_Created_By => p_created_by --NUMBER
    ,X_Vendor_Contact_Id => p_vendor_contact_id --NUMBER
    ,X_Ship_Via_Lookup_Code => p_Ship_Via_Lookup_Code
    ,X_Pay_On_Code => NULL
    ,X_Rate_Type => NULL
    ,X_Rate_Date => NULL
    ,X_Rate => NULL
    ,X_From_Header_Id => NULL
    ,X_From_Type_Lookup_Code => NULL
    ,X_End_Date => NULL
    ,X_Blanket_Total_Amount => NULL
    ,X_Authorization_Status => P_Authorization_Status
    ,X_Revision_Num => NULL
    ,X_Revised_Date => NULL
    ,X_Approved_Flag => NULL
    ,X_Approved_Date => NULL
    ,X_Amount_Limit => NULL
    ,X_Min_Release_Amount => NULL
    ,X_Note_To_Authorizer => NULL
    ,X_Note_To_Vendor => NULL
    ,X_Note_To_Receiver => NULL
    ,X_Print_Count => NULL
    ,X_Printed_Date => NULL
    ,X_Vendor_Order_Num => NULL
    ,X_Confirming_Order_Flag => NULL
    ,X_Comments => NULL
    ,X_Reply_Method_Lookup_Code => NULL
    ,X_Rfq_Close_Date => NULL
    ,X_Quote_Warning_Delay_Unit => NULL
    ,X_Acceptance_Required_Flag => NULL
    ,X_Acceptance_Due_Date => NULL
    ,X_Closed_Date => NULL
    ,X_User_Hold_Flag => NULL
    ,X_Cancel_Flag => 'N'
    ,X_Firm_Status_Lookup_Code => NULL
    ,X_Firm_Date => NULL
    ,X_Frozen_Flag => NULL
    ,X_Supply_Agreement_Flag => P_Supply_Agreement_Flag
    ,X_Global_Agreement_Flag => NULL
    ,X_Attribute_Category => NULL
    ,X_Attribute1 => NULL
    ,X_Attribute2 => NULL
    ,X_Attribute3 => p_organization_id
    ,X_Attribute4 => NULL
    ,X_Attribute5 => NULL
    ,X_Attribute6 => NULL
    ,X_Attribute7 => NULL
    ,X_Attribute8 => NULL
    ,X_Attribute9 => NULL
    ,X_Attribute10 => NULL
    ,X_Attribute11 => NULL
    ,X_Attribute12 => NULL
    ,X_Attribute13 => NULL
    ,X_Attribute14 => NULL
    ,X_Attribute15 => NULL
    ,X_Closed_Code => NULL
    ,X_Ussgl_Transaction_Code => NULL
    ,X_Government_Context => NULL
    ,X_Global_Attribute_Category => NULL
    ,X_Global_Attribute1 => NULL
    ,X_Global_Attribute2 => NULL
    ,X_Global_Attribute3 => NULL
    ,X_Global_Attribute4 => NULL
    ,X_Global_Attribute5 => NULL
    ,X_Global_Attribute6 => NULL
    ,X_Global_Attribute7 => NULL
    ,X_Global_Attribute8 => NULL
    ,X_Global_Attribute9 => NULL
    ,X_Global_Attribute10 => NULL
    ,X_Global_Attribute11 => NULL
    ,X_Global_Attribute12 => NULL
    ,X_Global_Attribute13 => NULL
    ,X_Global_Attribute14 => NULL
    ,X_Global_Attribute15 => NULL
    ,X_Global_Attribute16 => NULL
    ,X_Global_Attribute17 => NULL
    ,X_Global_Attribute18 => NULL
    ,X_Global_Attribute19 => NULL
    ,X_Global_Attribute20 => NULL
    ,X_Manual => NULL
    ,X_Price_Update_Tolerance => NULL
                             ,p_shipping_control=> NULL--X_shipping_control -- <INBOUND LOGISTICS FPJ>
    ,p_encumbrance_required_flag=> NULL--X_encumbrance_required_flag
                             commit;
    dbms_output.put_line('agent_id:'||p_agent_id);
    dbms_output.put_line('segment1:'||P_segment1);
    dbms_output.put_line('SHIP_TO_LOCATION_ID:'||P_SHIP_TO_LOCATION_ID);
    dbms_output.put_line('BILL_TO_LOCATION_ID:'||P_BILL_TO_LOCATION_ID);
    dbms_output.put_line('VENDOR_SITE_ID:'||P_VENDOR_ID);
    dbms_output.put_line('VENDOR_SITE_ID:'||P_VENDOR_SITE_ID);
    dbms_output.put_line('SUPPLY_AGREEMENT_FLAG:'||P_SUPPLY_AGREEMENT_FLAG);
    dbms_output.put_line('QUOTE_TYPE_LOOKUP_CODE:'||p_QUOTE_TYPE_LOOKUP_CODE);
    dbms_output.put_line('FREIGHT_TERMS_LOOKUP_CODE:'||P_FREIGHT_TERMS_LOOKUP_CODE);
    dbms_output.put_line('AUTHORIZATION_STATUS:'||P_AUTHORIZATION_STATUS);
    dbms_output.put_line('ORGANIZATION_ID:'||p_ORGANIZATION_ID);
    dbms_output.put_line('VENDOR_CONTACT_ID:'||P_VENDOR_CONTACT_ID);
    dbms_output.put_line('Type_Lookup_Code:'||p_Type_Lookup_Code);
    dbms_output.put_line('Summary_Flag:'||p_Summary_Flag);
    dbms_output.put_line('Enabled_Flag:'||p_Enabled_Flag);
    dbms_output.put_line('Comments:'||p_Comments);
    dbms_output.put_line('Currency_Code:'||p_Currency_Code);
    dbms_output.put_line('Authorization_Status:'||P_Authorization_Status);
    dbms_output.put_line('Status_Lookup_Code:'||p_Status_Lookup_Code);
    dbms_output.put_line('Quotation_Class_Code:'||p_Quotation_Class_Code);
    dbms_output.put_line('Approval_Required_Flag:'||p_Approval_Required_Flag);
    dbms_output.put_line('last_update_login:'||p_last_update_login);
    dbms_output.put_line('created_by:'||p_created_by);
    dbms_output.put_line('last_update_date:'||p_last_update_date);
    dbms_output.put_line('Vendor_Contact_Id:'||p_Vendor_Contact_Id);
    dbms_output.put_line('fob_lookup_code:'||p_fob_lookup_code);
    EXCEPTION
    WHEN OTHERS THEN
    --p_return_status :='E';
    --p_error_msg     :='ERROR during Insert in PO_HEADERS.'||CHR(10)||SQLERRM;
    raise;
    END p6;
    Regards,
    YellaGoud

    What is your current Oracle user ?
    show userTry to identify the table owner:
    select owner from dba_tables where table_name='CE1LAOC';And add <table owner> as prefix to table name:
    CREATE INDEX Z05 ON <table_owner>.CE1LAOC (MANDT, PALEDGER, BUKRS, PERIO, VRGAR, VKORG, HZDAT);

  • Using gross price instead of net price at Quotation

    Hi,
    I'm working at a company that just bought SAP ERP ECC 6.0. Our consultants told us that SAP only works with Net price in MM. It sounds a little bit weird for us, because here in Brazil we usually use Gross price in all our transactions.
    Here in Brazil we have some taxes that are included in gross price and it's a hard work ask the final user to calculate the taxes out of SAP and input net Price in the system.
    I read a little bit some documentation provided by SAP at Internet called SAP Library and I found an article titled:Entering a Quotation Against an RFQ
    In this article says the following: " You enter the net price per unit in the Net price field. This price includes the vendor's normal discounts and surcharges only. Cash discounts (for prompt payment) and taxes (e.g. value-added tax) are calculated separately.
    You enter the gross price in the Net price field, and maintain the conditions for the item. Then the system automatically replaces the entered gross price with the calculated net price (see Maintaining Conditions)."
    As we can see, there are two ways to input the price. Gross price and Net price. I'd like to know if is there the possibility to configure the "mentioned conditions" for a group material and at the moment I type the gross price in Quotation the system automatically calculate the net price?
    Our consultant told us that this procedure should be done for each item in quotation, in my opinion I guess that SAP can link the applicable taxes for the material based on its group material. If something like that is possible, our daily work will be simplified so much because the system will know the taxes that should be discounted for the material and calculate automatically the net price.
    If this possibility exists, could you please tell me in technique terms (transactions) that should be set?
    Another question is about Taxable Income, is there any place in SAP where I can configure the Taxable Income for a material or group material for the taxes set at "mentioned conditions"?
    Thanks in advance,
    Sorry about my English.
    Best Regards,
    Amorim, Rodrigo.

    What you need is a new pricing procedure design to fit your requirements. The standard pricing procedure allows you to enter the net price. Then the gross price is calculated after taking into account the discounts, taxes etc. These discounts and taxes can be designed to determined automatically through material group also. So to achieve your requirement the pricing procedure has to be changed accordingly to calculate the net price from gross price entered. While this can be done, but all other impacts on pricing reports and accounting document posting with correce valuation price etc. have to be tested in detail.

  • No quotation found even after message "Quotation 20000051 has been saved"

    Dear SAP friends
    I am trying to createa  quote using the bapi (BAPI_QUOTATION_CREATEFROMDATA2).
    It runs with the following message
    233 SALES_HEADER_IN has been processed successfully
    233 SALES_ITEM_IN has been processed succesfully
    555 The sales document is not yet complete: Edit data
    311 Quotation 20000051 has been saved.
    However when I goto transaction VA23, the field is automatically populated by '200000051'.
    When I click on Search, I get a message
    "SD document 20000051 is not in the database or has been archived"
    What am I doing wrong? Atleast if I can see this quote, I can go to Edit and look for incomplete log, but unfortunately I can't see the Quote at all.
    Any feedback will be highly appreciated
    Tks
    Ram

    Dear Ram Prasad,
    T. Code: SE11
    You may check the Tables: CDHDR (Header-Change Details) & CDPOS (Item-Change Details) for your Sales Doc. No.: 20000051
    A similar Problem for your reference, Might be Helpful:
    [SD Doc. not in DB or Archieved|BAPI_CUSTOMERRETURN_CREATE don't save number in vbak]
    Best Regards,
    Amit

  • How can i get the correct text from a string like it show in the original source with the quotation marks in the right place ?

    The text is in hebrew so the problem is that sometimes the quotation marks not in the right place.
    For example i have this text: תווית
    על בגד: ''תן לאישה לכבס. זה תפקידה''
    This is the source original text you can see the quotations marks and they are not in the right place and all i did is copy paste.
    And this is a screenshot of how this text looks like in the website in the original:
    You can see now where the quotations marks should be.
    Now this is how i'm using the text in my program:
    First of all i'm using a webclient to download the page from the website and i'm also encoding it to windows-1255 since it's in hebrew.
    using (var webClient = new WebClient())
    webClient.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)");
    byte[] myDataBuffer = webClient.DownloadData("http://rotter.net/scoopscache.html");
    page = Encoding.GetEncoding("windows-1255").GetString(myDataBuffer);
    Then i'm extracting the places i need by reading the html file lines and parsing the right text and it's link.
    string loc;
    List<string> metas = new List<string>();
    List<string> metas1 = new List<string>();
    List<string> lockedLinks1 = new List<string>();
    string text = "";
    string mys = "";
    public List<string> LockedThreads(string filename)
    lockedThreads = new List<string>();
    lockedLinks = new List<string>();
    Regex textRegex = new Regex("ToolTip.*?(?=','<)");
    string[] fall = File.ReadAllLines(filename);
    for (int i = 0; i < fall.Length; i++)
    if (fall[i].Contains("http://rotter.net") && fall[i].Contains("locked")||
    fall[i].Contains("locked_icon_general") ||
    fall[i].Contains("locked_icon_anchor") ||
    fall[i].Contains("icon_anchor") ||
    fall[i].Contains("locked_icon_fire") ||
    fall[i].Contains("locked_icon_sport") ||
    fall[i].Contains("locked_icon_camera") ||
    fall[i].Contains("locked_icon_movie"))
    Regex linkParser = new Regex(@"\b(?:https?://|www\.)\S+\b", RegexOptions.Compiled | RegexOptions.IgnoreCase);
    foreach (Match m in linkParser.Matches(fall[i + 2]))
    if (m.Value.Contains("><b"))
    loc = m.Value.Replace("\"><b", string.Empty);
    lockedLinks.Add(loc);
    string txt = fall[i - 1];
    string text = textRegex.Match(txt).Value.Replace("ToolTip','", String.Empty);
    if (text.Contains("&rsquo;"))
    text = text.Replace("&rsquo;", string.Empty);
    lockedThreads.Add(text);
    Already here on the List lockedThreads you can see the quotation marks not in the right place as in the original:
    After i'm parsing the text and links and adding them to the Lists in another class i'm doing a comparison using this Lists:
    foreach (List<string> l_branch in ListsExtractions.responsers)
    TreeNode l_node = treeView1.Nodes.Add(l_branch[l_branch.Count - 1]);
    if (ListsExtractions.lockedThreads.Contains(l_node.Text))
    l_node.ImageIndex = 0;
    l_node.SelectedImageIndex = 0;
    for (int l_count = 0; l_count < l_branch.Count - 1; l_count++)
    TreeNode l_subnode = l_node.Nodes.Add(l_branch[l_count]);
    if (ListsExtractions.lockedThreads.Contains(l_subnode.Text))
    l_subnode.ImageIndex = 0;
    l_subnode.SelectedImageIndex = 0;
    The problem is in the line:
    if (ListsExtractions.lockedThreads.Contains(l_node.Text))
    When it's getting to the line with the quotation marks it's never equal.
    Now there are more quotation marks.
    In general the problem when comparing both text if it's having quotation marks it's not the same.
    So i have two options:
    1. To fix it somehow so the quotation marks will be the same in both variables when comparing and also the same like in the original as they show in the html page.
    2. To remove the quotation marks from both variables.
    What should i do ? And how ? I was prefer to use the original quotation marks like in the original since they have a meaning in the place they should be. The question is how can i do it ?
    This is example of the block from the html file where the text with the quotation marks is:
    <TD ALIGN="RIGHT" VALIGN="TOP">&nbsp;<font size=-1 color=#ff9933><b>9418</b></font>&nbsp;</TD></TR><TR BGCOLOR="#eeeeee">
    <TD ALIGN="RIGHT" VALIGN="TOP">
    <body onmousemove="overhere()">
    <a onmouseover="EnterContent('ToolTip','תווית על בגד: &rsquo;&rsquo;תן לאישה לכבס. זה תפקידה&rsquo;&rsquo;','<u><span style=color:#000099;>כתב: Spook בתאריך: 08.03.15 שעה: 22:11</span></u><br>מחאת טוויטר קמה בעקבות תוויות שוביניסטיות שהדפיסה חברת אופנה באינדונזיה לפיהן תפקיד הכביסה מוטל על האישה. החברה התנצלה אך כנראה רק עשתה רק יותר נזק לע...'); Activate();" onmouseout="deActivate()" href="javascript:void(0)">
    <img src="http://rotter.net/forum/Images/new_locked_icon_general.gif" border="0"></a></TD><TD ALIGN="right" VALIGN="TOP" WIDTH="55%">
    <FONT CLASS='text15bn'><FONT FACE="Arial">
    <a href="http://rotter.net/cgi-bin/forum/dcboard.cgi?az=read_count&om=189696&forum=scoops1"><b>
    <font color="898A8E">תווית על בגד: ''תן לאישה לכבס. זה תפקידה''</b>
    </a></font></TD>

    Ok, it is unclear on what is happening here.
    Are you saying that when the webclient gets the data that it is not honoring the quote characters? Or the processing of the data buffer is causing issues?
    This is what I see the of your example text which is trying to be parse out:
    <a onmouseover="EnterContent('ToolTip','תווית על בגד: &rsquo;&rsquo;תן לאישה לכבס. זה תפקידה&rsquo;&rsquo;','<u><span style=color:#000099;>כתב: Spook בתאריך: 08.03.15 שעה: 22:11</span></u><br>מחאת טוויטר קמה בעקבות תוויות שוביניסטיות שהדפיסה חברת אופנה באינדונזיה לפיהן תפקיד הכביסה מוטל על האישה. החברה התנצלה אך כנראה רק עשתה רק יותר נזק לע...'); Activate();">";
    It appears to me that the  escapes `&rsquo;` does not have matching `&ldquo;` anywhere within the tooltip. So it appears that the page properly places left quotes in when processing the page, but the raw html has broken text.
    Hence a garbage in, garbage out situation.
    William Wegerson (www.OmegaCoder.Com)

  • IPC Pricing routine for Product Family Margin in Quotation is not working

    Hi,
    I am working on the IPC Pricing Routine to calculate Item's Product Family Margin in the Quotation. 
    Process followed:
    Step 1:  Created a Group condition ZPFM for Product Family Margin and assigned to the pricing procedure. 
    Step 2:  Created a Value Routine to determine ZPFM's Condition Rate and Condition Value.
    Logic: 
              1.  Collect (Sum Of)  the Cost (ZSVC) and the Subtotal 3 of the items which are in same Material Group.
               2.  Assign the ZPFM Condition Value = Sum of Subtotal 3 - Cost.
    Issue:  The condition value for ZPFM is calculating correct for all line items except the last item.  I am getting some junk value always to the last item. If I delete the last time, again next last item is giving wrong value.  The calculation value in the routine debugging log (SM53) is showing correct value.  However, assigning the wrong value.  No other routines have been assigned to this condition type in the pricing procedure. 
    Routine Code:
    package stanley.pricing.userexits.val;
    import java.math.BigDecimal;
    import com.sap.spe.pricing.customizing.PricingCustomizingConstants;
    import com.sap.spe.pricing.transactiondata.PricingTransactiondataConstants;
    import com.sap.spe.pricing.transactiondata.userexit.IPricingConditionUserExit;
    import com.sap.spe.pricing.transactiondata.userexit.IPricingItemUserExit;
    import com.sap.spe.base.logging.UserexitLogger;
    import com.sap.spe.pricing.transactiondata.userexit.ValueFormulaAdapter;
    //import com.sap.spe.pricing.transactiondata.userexit.IPricingCondition;
    public class Z_CondValueRoutine730 extends  ValueFormulaAdapter{
       private static UserexitLogger uelogger =
              new UserexitLogger(Z_CondValueRoutine730.class);
      public BigDecimal overwriteConditionValue(IPricingItemUserExit pricingItem,
             IPricingConditionUserExit pricingCondition) {
      // Variable Declarations.
      BigDecimal conditionValueZCVC=PricingTransactiondataConstants.ZERO;
      BigDecimal conditionValueZCVCAccrual=PricingTransactiondataConstants.ZERO;
      BigDecimal subTotal3=PricingTransactiondataConstants.ZERO;
      BigDecimal subTotal3Accrual=PricingTransactiondataConstants.ZERO;
      if(pricingCondition.getConditionTypeName().equalsIgnoreCase("ZPFM")){
                IPricingItemUserExit[] prItems;
                prItems = pricingItem.getUserExitDocument().getUserExitItems();
                String materialGroup = pricingItem.getAttributeValue("MATL_GRP");
                uelogger.writeLogDebug("  Material Group  :"+materialGroup);
                for (int i=0;i<prItems.length;i++){
                     String materialGroup1 = prItems[i].getAttributeValue("MATL_GRP");
                     if (materialGroup1.equalsIgnoreCase(materialGroup)){
                          subTotal3 = prItems[i].getSubtotal(PricingCustomizingConstants.ConditionSubtotal.SUBTOTAL_3).getValue();
                          subTotal3Accrual = subTotal3Accrual.add(subTotal3);
                          IPricingConditionUserExit[] conditionsForCumulation = prItems[i].getUserExitConditions();
                          for (int j = 0; j < conditionsForCumulation.length; j++) {
                               if(conditionsForCumulation[j].getConditionTypeName()==null) {
                                   continue;
                               else if ( conditionsForCumulation[j].getConditionTypeName().equalsIgnoreCase("ZCVC")){
                                    conditionValueZCVC = conditionsForCumulation[j].getConditionValue().getValue();
                                    conditionValueZCVCAccrual = conditionValueZCVCAccrual.add(conditionValueZCVC);
                BigDecimal conditionValueZPFM=PricingTransactiondataConstants.ZERO;
                conditionValueZPFM = subTotal3Accrual.subtract(conditionValueZCVCAccrual);
               BigDecimal conditionRateZPFM=PricingTransactiondataConstants.ZERO;
               conditionRateZPFM = conditionValueZPFM.multiply(new BigDecimal ("100"));
              conditionRateZPFM = conditionRateZPFM.divide(subTotal3Accrual,7,BigDecimal.ROUND_FLOOR);
             uelogger.writeLogDebug(subTotal3Accrual+"-"+conditionValueZCVCAccrual+" = "+conditionValueZPFM);
             uelogger.writeLogDebug("Condition Rate  :"+conditionRateZPFM);
           pricingCondition.setConditionRateValue(conditionRateZPFM.setScale(2,BigDecimal.ROUND_HALF_UP));
           pricingCondition.setConditionValue(conditionValueZPFM.setScale(2,BigDecimal.ROUND_HALF_UP));
              return null;
           return null;

    Hi,
    I think you should change xkwert variable instead of komv-kwert.
    Standard routines does the same.
    Aslo check in SPRO settings that routine is attached and
    getting triggered by putting break-point.
    Regards,
    Vishal

  • Addon for RFQ and vendor quotation

    Hi ,
    We are looking for an addon for RFQ and vendor quotation .
    Pls let us know about the same.

    To my knowlege there are no addons available in India for RFQ, Vendor Quotation Management.
    You may contact the Local Product Experts of B1 available in India for further information.
    You can find their contact from the following link:
    [https://websmp210.sap-ag.de/~sapidb/011000358700001455542004#India]

  • CRM ONLINE 2013: On Approval Of Quotation, Run Report, Generate PDF and Send an Email With PDF as attachment

    Hi,
    I am using CRM ONLINE 2013.
    How to automate below process?
    1. On Approval Of Quotation, Run Report.
    2. Generate PDF.
    3. Send an Email With PDF as attachment.
    As i have gone through many forums for this topic, but creating a plugin code for generating Report PDF is not possible in CRM ONLINE.
    So, What is the alternate way to do this..?
    Thanks.

    This is my entire code mentioned below:-
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title></title>
        <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
        <script type="text/javascript">
            if (typeof (SDK) == "undefined")
            { SDK = { __namespace: true }; }
            SDK.JScriptRESTDataOperations = {
                _context: function () {
                    if (typeof GetGlobalContext != "undefined")
                    { return GetGlobalContext(); }
                    else {
                        if (typeof Xrm != "undefined") {
                            return Xrm.Page.context;
                        else { return new Error("Context is not available."); }
                _getServerUrl: function () {
                    var serverUrl = this._context().getServerUrl()
                    if (serverUrl.match(/\/$/)) {
                        serverUrl = serverUrl.substring(0, serverUrl.length - 1);
                    return serverUrl;
                _ODataPath: function () {
                    return this._getServerUrl() + "/XRMServices/2011/OrganizationData.svc/";
                _errorHandler: function (req) {
                    return new Error("Error : " +
      req.status + ": " +
      req.statusText + ": " +
      JSON.parse(req.responseText).error.message.value);
                _dateReviver: function (key, value) {
                    var a;
                    if (typeof value === 'string') {
                        a = /Date\(([-+]?\d+)\)/.exec(value);
                        if (a) {
                            return new Date(parseInt(value.replace("/Date(", "").replace(")/", ""), 10));
                    return value;
                Create: function (object, type, successCallback, errorCallback) {
                    var req = new XMLHttpRequest();
                    req.open("POST", this._ODataPath() + type + "Set", true);
                    req.setRequestHeader("Accept", "application/json");
                    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
                    req.onreadystatechange = function () {
                        if (this.readyState == 4 /* complete */) {
                            if (this.status == 201) {
                                successCallback(JSON.parse(this.responseText, SDK.JScriptRESTDataOperations._dateReviver).d);
                            else {
                                errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
                    req.send(JSON.stringify(object));
                Retrieve: function (id, type, successCallback, errorCallback) {
                    var req = new XMLHttpRequest();
                    req.open("GET", this._ODataPath() + type + "Set(guid'" + id + "')", true);
                    req.setRequestHeader("Accept", "application/json");
                    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
                    req.onreadystatechange = function () {
                        if (this.readyState == 4 /* complete */) {
                            if (this.status == 200) {
                                successCallback(JSON.parse(this.responseText, SDK.JScriptRESTDataOperations._dateReviver).d);
                            else {
                                errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
                    req.send();
                Update: function (id, object, type, successCallback, errorCallback) {
                    var req = new XMLHttpRequest();
                    req.open("POST", this._ODataPath() + type + "Set(guid'" + id + "')", true);
                    req.setRequestHeader("Accept", "application/json");
                    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
                    req.setRequestHeader("X-HTTP-Method", "MERGE");
                    req.onreadystatechange = function () {
                        if (this.readyState == 4 /* complete */) {
                            if (this.status == 204 || this.status == 1223) {
                                successCallback();
                            else {
                                errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
                    req.send(JSON.stringify(object));
                Delete: function (id, type, successCallback, errorCallback) {
                    var req = new XMLHttpRequest();
                    req.open("POST", this._ODataPath() + type + "Set(guid'" + id + "')", true);
                    req.setRequestHeader("Accept", "application/json");
                    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
                    req.setRequestHeader("X-HTTP-Method", "DELETE");
                    req.onreadystatechange = function () {
                        if (this.readyState == 4 /* complete */) {
                            if (this.status == 204 || this.status == 1223) {
                                successCallback();
                            else {
                                errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
                    req.send();
                RetrieveMultiple: function (type, filter, successCallback, errorCallback) {
                    if (filter != null) {
                        filter = "?" + filter;
                    else { filter = ""; }
                    var req = new XMLHttpRequest();
                    req.open("GET", this._ODataPath() + type + "Set" + filter, true);
                    req.setRequestHeader("Accept", "application/json");
                    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
                    req.onreadystatechange = function () {
                        if (this.readyState == 4 /* complete */) {
                            if (this.status == 200) {
                                successCallback(JSON.parse(this.responseText, SDK.JScriptRESTDataOperations._dateReviver).d.results);
                            else {
                                errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
                    req.send();
                __namespace: true
        </script>
        <script type="text/javascript">
            //Create Email and link it with Order as Regarding field
            var Xrm;
            var email = new Object();
            var ownerID = "";
            var CustomerId = "";
            if (window.opener) { Xrm = window.opener.Xrm; }
            else if (window.parent) { Xrm = window.parent.Xrm; }
            //Get ownerid who send email of quotation to customer
            function GetOwnerID() {
                var owner = Xrm.Page.getAttribute("ownerid").getValue();
                ownerID = owner[0].id;
                var ownerName = owner[0].name;
                var entityType = owner[0].entityType;
                GetToEmailGUID();
            //Get customerid who receive email of quotation from owner
            function GetToEmailGUID() {
                var Customer = Xrm.Page.getAttribute('customerid').getValue();
                CustomerId = Customer[0].id;
                var CustomerName = Customer[0].name;
                var entityType = Customer[0].entityType;
                //if CustomerId is type of "Account" then get Primary Contact id of that account
                if (entityType == "account") {
                    var contact = Xrm.Page.getAttribute("customerid").getValue();
                    if (contact === null) return;
                    var serverUrl = Xrm.Page.context.getClientUrl();
                    var oDataSelect = serverUrl + "/XRMServices/2011/OrganizationData.svc/AccountSet(guid'" + contact[0].id + "')?$select=PrimaryContactId";
                    var req = new XMLHttpRequest();
                    req.open("GET", oDataSelect, false);
                    req.setRequestHeader("Accept", "application/json");
                    req.setRequestHeader("Content-Type", "application/json;charset=utf-8");
                    req.onreadystatechange = function () {
                        if (req.readyState === 4) {
                            if (req.status === 200) {
                                var retrieved = JSON.parse(req.responseText).d;
                                CustomerId = retrieved.PrimaryContactId.Id;
                            else {
                                alert(this.statusText);
                    req.send();
            function CreateEmail() {
                GetOwnerID();
                email.Subject = "Email with Report Attachment";
                //Set The current order as the Regarding object
                email.RegardingObjectId = {
                    Id: Xrm.Page.data.entity.getId(),    //Get the current entity Id , here OrderId
                    LogicalName: Xrm.Page.data.entity.getEntityName()//Get the current entity name, here it will be “salesOrder”
                //Create Email Activity
                SDK.JScriptRESTDataOperations.Create(email, "Email", EmailCallBack, function (error) { alert(error.message); });
            // Email Call Back function
            function EmailCallBack(result) {
                email = result; // Set the email to result to use it later in email attachment for retrieving activity Id
                var activityPartyFrom = new Object();
                // Set the From party of the ActivityParty to relate an entity with Email From field
                activityPartyFrom.PartyId = {
                    Id: CustomerId, //"79EBDD26-FDBE-E311-8986-D89D6765B238",  // id of entity you want to associate this activity with.        
                    LogicalName: "contact"
                // Set the "activity" of the ActivityParty
                activityPartyFrom.ActivityId = {
                    Id: result.ActivityId,
                    LogicalName: "email"
                // Now set the participation type that describes the role of the party on the activity).
                activityPartyFrom.ParticipationTypeMask = { Value: 2 }; // 2 means ToRecipients
                // Create the from ActivityParty for the email
                SDK.JScriptRESTDataOperations.Create(activityPartyFrom, "ActivityParty", ActivityPartyFromCallBack, function (error) { alert(error.message); });
                var activityPartyTo = new Object();
                // Set the From party of the ActivityParty to relate an entity with Email From field
                activityPartyTo.PartyId = {
                    Id: ownerID, //"79EBDD26-FDBE-E311-8986-D89D6765B238",  // id of entity you want to associate this activity with.        
                    LogicalName: "systemuser"
                // Set the "activity" of the ActivityParty  
                activityPartyTo.ActivityId = {
                    Id: result.ActivityId,
                    LogicalName: "email"
                // Now set the participation type that describes the role of the party on the activity).    
                activityPartyTo.ParticipationTypeMask = { Value: 1 }; // 1 means Sender
                // Create the from ActivityParty
                SDK.JScriptRESTDataOperations.Create(activityPartyTo, "ActivityParty", ActivityPartyToCallBack, function (error) { alert(error.message); });
            //ActivityParty From Callback
            function ActivityPartyFromCallBack(result) {
            //ActivityParty To Callback
            function ActivityPartyToCallBack(result) {
                GetReportId('ABM_Infotech_SalesQuote');
            //Create attachment for the created email
            function CreateEmailAttachment() {
                //get reporting session and use the params to convert a report in PDF
                var params = getReportingSession();
                //Email attachment parameters
                var activitymimeattachment = Object();
                activitymimeattachment.ObjectId = Object();
                activitymimeattachment.ObjectId.LogicalName = "email";
                activitymimeattachment.ObjectId.Id = email.ActivityId;
                activitymimeattachment.ObjectTypeCode = "email",
                    activitymimeattachment.Subject = "File Attachment";
                activitymimeattachment.Body = encodePdf(params);
                activitymimeattachment.FileName = "Report1.pdf";
                activitymimeattachment.MimeType = "application/pdf";
                //Attachment call
                SDK.JScriptRESTDataOperations.Create(activitymimeattachment, "ActivityMimeAttachment", ActivityMimeAttachmentCallBack, function (error) { alert(error.message); });
            //ActivityMimeAttachment CallBack function
            function ActivityMimeAttachmentCallBack(result) {
                var features = "location=no,menubar=no,status=no,toolbar=no,resizable=yes";
                var width = "800px";
                var height = "600px";
                window.open(Xrm.Page.context.getServerUrl() + "main.aspx?etc=" + 4202 + "&pagetype=entityrecord&id=" + email.ActivityId, "_blank", features);
                // To open window which works in outlook and IE both
                //openStdWin(Xrm.Page.context.getServerUrl() + "main.aspx?etc=" + 4202 + "&pagetype=entityrecord&id=" + email.ActivityId, "_blank", width,
    height, features);
            //This method will get the reportId based on a report name that will be used in            getReportingSession() function
            function GetReportId(reportName) {
                var oDataSetName = "ReportSet";
                var columns = "ReportId";
                var filter = "Name eq '" + reportName + "'";
                retrieveMultiple(oDataSetName, columns, filter, onSuccess);
            function retrieveMultiple(odataSetName, select, filter, successCallback) {
                var serverUrl = Xrm.Page.context.getServerUrl();
                var ODATA_ENDPOINT = "/XRMServices/2011/OrganizationData.svc";
                var odataUri = serverUrl + ODATA_ENDPOINT + "/" + odataSetName + "?";
                if (select) {
                    odataUri += "$select=" + select + "&";
                if (filter) {
                    odataUri += "$filter=" + filter;
                $.ajax({
                    type: "GET",
                    contentType: "application/json; charset=utf-8",
                    datatype: "json",
                    url: odataUri,
                    beforeSend: function (XMLHttpRequest) {
                        XMLHttpRequest.setRequestHeader("Accept", "application/json");
                    success: function (data) {
                        if (successCallback) {
                            if (data && data.d && data.d.results) {
                                successCallback(data.d.results);
                            else if (data && data.d) {
                                successCallback(data.d);
                            else {
                                successCallback(data);
                    error: function (XmlHttpRequest, errorThrown) {
                        if (XmlHttpRequest && XmlHttpRequest.responseText) {
                            alert("Error while retrieval ; Error – " + XmlHttpRequest.responseText);
            function onSuccess(data) {
                reportId = data[0].ReportId.replace('{', ").replace('}', ");
                CreateEmailAttachment(); // Create Email Attachment
            //Gets the report contents
            function getReportingSession() {
                var pth = Xrm.Page.context.getServerUrl() + "/CRMReports/rsviewer/reportviewer.aspx";
                var retrieveEntityReq = new XMLHttpRequest();
                var Id = Xrm.Page.data.entity.getId();
                var quotationGUID = Id.replace('{', ""); //set this to selected quotation GUID
                quotationGUID = quotationGUID.replace('}', "");
                var reportName = "ABM_Infotech_SalesQuote"; //set this to the report you are trying to download
                var reportID = "751089AA-74B8-E211-B52F-D8D3855B253B"; //set this to the guid of the report you are trying to download
                var rptPathString = ""; //set this to the CRMF_Filtered parameter
                var strParameterXML = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'><entity name='quote'><all-attributes /><filter type='and'><condition
    attribute='quoteid' operator='eq' uitype='quote' value='" + quotationGUID + "' /> </filter></entity></fetch>";
                retrieveEntityReq.open("POST", pth, false);
                retrieveEntityReq.setRequestHeader("Accept", "*/*");
                retrieveEntityReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
                rptPathString = "id=%7B" + reportID + "%7D&uniquename=" + Xrm.Page.context.getOrgUniqueName() + "&iscustomreport=true&reportnameonsrs=&reportName="
    +
                                reportName + "&isScheduledReport=false&p:ABMFilteredQuote=" + strParameterXML;
                //remove the part starting from &p:salesorderid if your report has no parameters
                retrieveEntityReq.send(rptPathString);
                var x = retrieveEntityReq.responseText.indexOf("ReportSession=");
                var ret = new Array();
                ret[0] = retrieveEntityReq.responseText.substr(x + 14, retrieveEntityReq.responseText.indexOf("&", x) - x - 14); //the session id
                x = retrieveEntityReq.responseText.indexOf("ControlID=");
                ret[1] = retrieveEntityReq.responseText.substr(x + 10, retrieveEntityReq.responseText.indexOf("&", x) - x - 10); //the control id
                return ret;
            var bdy = new Array();
            var bdyLen = 0;
            function concat2Bdy(x) {
                bdy[bdyLen] = x;
                bdyLen++;
            function encodePdf(params) {
                bdy = new Array();
                bdyLen = 0;
                var retrieveEntityReq = new XMLHttpRequest();
                var pth = Xrm.Page.context.getServerUrl() + "/Reserved.ReportViewerWebControl.axd?ReportSession=" + params[0] +
                "&Culture=1033&CultureOverrides=True&UICulture=1033&UICultureOverrides=True&ReportStack=1&ControlID=" + params[1] +
                "&OpType=Export&FileName=Public&ContentDisposition=OnlyHtmlInline&Format=PDF";
                retrieveEntityReq.open("GET", pth, false);
                retrieveEntityReq.setRequestHeader("Accept", "*/*");
                retrieveEntityReq.send();
                BinaryToArray(retrieveEntityReq.responseBody);
                return encode64(bdy);
            var StringMaker = function () {
                this.parts = [];
                this.length = 0;
                this.append = function (s) {
                    this.parts.push(s);
                    this.length += s.length;
                this.prepend = function (s) {
                    this.parts.unshift(s);
                    this.length += s.length;
                this.toString = function () {
                    return this.parts.join('');
            var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
            function encode64(input) {
                var output = new StringMaker();
                var chr1, chr2, chr3;
                var enc1, enc2, enc3, enc4;
                var i = 0;
                while (i < input.length) {
                    chr1 = input[i++];
                    chr2 = input[i++];
                    chr3 = input[i++];
                    enc1 = chr1 >> 2;
                    enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
                    enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
                    enc4 = chr3 & 63;
                    if (isNaN(chr2)) {
                        enc3 = enc4 = 64;
                    } else if (isNaN(chr3)) {
                        enc4 = 64;
                    output.append(keyStr.charAt(enc1) + keyStr.charAt(enc2) + keyStr.charAt(enc3) + keyStr.charAt(enc4));
                return output.toString();
        </script>
        <script type="text/vbscript">
        Function BinaryToArray(Binary)
               Dim i
               ReDim byteArray(LenB(Binary))
               For i = 1 To LenB(Binary)
                     byteArray(i-1) = AscB(MidB(Binary, i, 1))
                     concat2Bdy(AscB(MidB(Binary, i, 1)))
             Next
              BinaryToArray = byteArray
       End Function     
        </script>
    </head>
    <body>
        <input type="button" onclick="CreateEmail();" value="Attach Report" />
    </body>
    </html>

Maybe you are looking for