Quotation replacement conundrum

I have some data stored in a database (user inputted data). I
need to display this data within xml, and I need all the quotation
marks removed (since that would mess up the xml). The logical
replacement (to make it look roughly as the user intended) is to
replace the quotation marks with apostrophes. But I run into a
problem when I try to use REPLACE (see code below). You'll note I
end up with 3 apostrophes in a row in my code. Any ideas on how to
handle this?

First, take away the octothorps, you don't need them.
Next, surround the apostrophe with double quotes instead of
single quotes.

Similar Messages

  • How do I replace quotation marks with double angle quotation marks, still keeping the word in the mi

    Hi,
    Does anyone know how to replace quotation marks with double angle quotation marks, still keeping the word in the middle?
    For example: I search for a word with quotation marks by typing in: (")(\w+)(") in the "find what" field. What should I type in the "change to" field?
    I'd be very grateful for answers!

    It's much simpler: find " and replace with " (make sure that 'Use typographer's quotes' is enabled in the preferences).
    Peter

  • Find and replace smart quotes with straight quotes?

    I understand I can turn off smart quotes so that I can type straight quotes, but I need to replace hundreds of curly smart quotes with straight quotes, is there a feature that will let me do this? I am using FM8.
    Thanx,
    Willian

    I am using FM9....so I don't know if the same shortcuts apply, but this is what I found out last week.
    Use the Find and Replace tool:
    With smart quotes turned off and the Num Lock key turned on:
    Alt0147 will give you beginning quotation marks
    Alt0148 will give you ending quotation marks
    In the Find box use ALT0147 or ALT0148 for the beginning or ending quotes. When you click in the box and type
    one of the shortcuts the correct quote will be shown in the box.
    In the replace box type the regular straight quotes on your keyboard.
    I was thrilled that it would work!...course you do have to do them separately and be careful not to replace the curly quotes
    that you want to leave in your document.
    Hope this helps using FM8....
    ls

  • 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.

  • 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)

  • 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>

  • Sales Order/Quotation, Delivery, Returns.  Need a way to search by zipcode

    Using 2007a SP0 PL49.
    In Sales Quotation, Sales Order, Delivery and Return submenus.
    We can have 100s of shipto on our major accounts.
    Users typically search by postal codes, we haven't migrated to SBO yet, this is a road block for it.
    So far, I have a query to a UDF LookupPostalCode that feeds into the Shipto, it works under the content tab's rows but in logistics tab where it's really needed, I can't put my UDF, can't seem to find a spot or a field I can replace.
    I've been using this query and it works in the rows for content...
    SELECT Address FROM CRD1
    Where AdresType = 'S'
    AND CARDCODE = $[$4.CardCode]
    AND ZipCode = $[$38.U_LookupPostalCode.STRING]
    Any suggestions to make this happen in logistics without sdk?
    Note: the postal codes are unique per site in this case.
    Thanks,
    Marc

    See the ZoomSearch page on my site.
    Sorry to give such a short answer but I think it is the right one.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • How to change quotation marks throughout document?

    Hello, so all my quotations in my document are like this
    “It’s a nasty thing to do”
    I want to change them to
    'It’s a nasty thing to do'
    Is there any easy way of doing this? I tried doing them separately but it always made them both the same direction...if that makes sense? So two 66s or 99s.
    Thanks
    Dan

    Find-and-change should work just fine, but there are a couple of special issues with quote marks.
    FIRST: If you put a straight single or double quote in FIND, it will match straight, curly open, and curly closed. (But only for its own 'kind', a single straight quote will never match a double curly one).
    SECOND: if you put a straight single or double quote in REPLACE, it will be replaced with a straight, curly open or curly closed according to the active RULES. Rule #1 is, of course, "Use Typographer's Quotes" -- if this is checked, they will be curly, otherwise they will be straight. Rule #2 is only for curlies: if there is a non-word character to the left, the quote will be "Open", otherwise it will be a "Close" one. Rule #3 is: the style of these quotes will be taken from the language of the text that it's applied to.
    THIRD: to override any of the above, use the Meta-characters for the various quotes. You can use them both in Find and in Change, and you can find the meta-characters in the Online help for your version of InDesign, and in the pop-down menus next to the Find and Change fields. Some that I regularly use:
    ^' in FIND will only match straight quotes, no curlies. Same for ^"
    ^[ will FIND only curly single opens, and in REPLACE will only insert curly single opens
    ^] same for curly single closes.
    In your example, you seem to change double quotes to single ones (why not simply say so? ), but you say they change to two 66s or 99s. Perhaps that's a language thing? In Finnish, for example, both open and close are 99s.

  • Looking for way to replace " with \" inside of coldFusion created array for JSFL

    I am trying to figure out the best way to fix data coming from a database table through the use of ColdFusion, in which there are some quotation marks that JavaScript Flash doesn't want in the array before adding the text content to a quiz.
    At the moment, if there are any quotation marks in the elements of the array, even though each element is surrounded by quotation marks, I have to add a backslash to escape them.
    I was wondering what would be the regular expression to use to do this, not for the quotation marks surrounding each element, but for those used inside of them.
    For example,
    ["08 Working with Flash Forms_16",
    "The syntax for the submit button was .",
    "name="submit" type="submit"",
    "name="submit"action="submit"",
    "id="submit" type="submit"",
    "id="submit"action="submit"",
    "No, name="submit" type="submit" is correct.",
    "true",
    "false",
    "false",
    "false",
    "897"] ,
    is an example of an element created that has quotation marks inside of the quotation marks for each element.
    I am debating about handling this either with XML by writing code to do that with ColdFusion instead of using the code I generated with ColdFusion to create this.
    I am also debating about writing the regular expression in a way that I could use it from either ActionScript 2 or 3.0, going at it at the file level maybe.
    At the moment I am opening the file and experimenting with writing a Find expression that uses regular expression to select what I want to change before changing it.

    I figured this out already. You can use the either the ColdFusion function, Replace, or REReplace if you want to use regular expressions. But I just wrote an actionscript prototype function inside the superclass called replace to fix it using split and join array methods.

  • Passing quotation mark in parameter

    Hi,
    I have one query which I migrated from sql server database. It is given below. I am passing single quote mark as a parameter to this query but it always retrieves 0 as count. But I have 1 record in table. As a solution to this I have resolved this issue for sql server by passing two quotation mark (replacing single quotation mark with double quotation mark). This same solution applies here too. when I pass any parameter with single quote in it, it will replace single quote with double quote and then pass it to the below given procedure. But still it is not working correctly. I have similar query for retrieving that record and it is working fine. Any idea why the below query is not working correctly?
    PROCEDURE GetEntUserGroupCountWithOther
    ppGroupName IN VARCHAR2 DEFAULT '%' ,
    cp1 IN OUT SYS_REFCURSOR
    AS
    BEGIN
    OPEN cp1 FOR
    SELECT COUNT(*) TotalRecords
    FROM ( SELECT Id EnterpriseUserGroupId,
    Name NAME,
    Description DESCRIPTION,
    IsDefault
    FROM EnterpriseUserGroup ) T1
    WHERE UPPER(NAME) LIKE +UPPER('%' || ppGroupName || '%');
    END;
    Thanks,
    Edited by: user10768079 on Jul 14, 2009 10:56 PM

    not sure what your question is, seems to work
    create table EnterpriseUserGroup
    (name varchar2(10))
    insert into EnterpriseUserGroup values ('Hello');
    insert into EnterpriseUserGroup values ('World');
    insert into EnterpriseUserGroup values ('''');
    commit;
    create or replace
    PROCEDURE GetEntUserGroupCountWithOther
    (ppGroupName IN VARCHAR2 DEFAULT '%'
    ,cp1 IN OUT SYS_REFCURSOR
    AS
    BEGIN
       OPEN cp1 FOR
          SELECT COUNT(*) TotalRecords
            FROM EnterpriseUserGroup T1
           WHERE UPPER(NAME) LIKE UPPER('%' || ppGroupName || '%');
    end;
    /and to test it
    SQL> var rc refcursor
    SQL>
    SQL>
    SQL> begin
      2     GetEntUserGroupCountWithOther ('''', :rc);
      3  end;
      4  /
    PL/SQL procedure successfully completed.
    SQL> print
    TOTALRECORDS
               1
    SQL> begin
      2     GetEntUserGroupCountWithOther ('hello',  :rc);
      3  end;
      4  /
    PL/SQL procedure successfully completed.
    SQL> print
    TOTALRECORDS
               1
    SQL> begin
      2     GetEntUserGroupCountWithOther ('not there',  :rc);
      3  end;
      4  /
    PL/SQL procedure successfully completed.
    SQL> print
    TOTALRECORDS
               0

  • MacBook Conundrum

    So I have a MacBook that I acquired with the common problem of not turning on. However it is a conundrum I have not found the specific answer to in the forums. When I got it the power button didn't work, but it would go to sleep and wake up. It would also only run on the power cord. I noticed it kept losing the date so I assumed it was the pram battery. Bought one, replace it and....wouldn't turn on at all. When I looked at the battery I removed, I noticed that one of the wires was disconnected. So here is where I am at:
    Situation #1.
    Pram battery disconnected.
    System will start with power cord and no battery. Put battery in and system shuts down.
    Power button does not work
    Situation #2
    pram battery disconnected with battery in.
    System will not start.
    Power button does not work
    Situation #3
    pram battery connected with no battery or battery in.
    system will not start.
    Power button does not work
    When the pram is connected I can't reset the pram because the system won't start.
    I live no where near an apple store. Any suggestions, thoughts? Is this the logic board? If so, why will the system function in situation #1?
    Thanks.

    Network 23 wrote:
    Then get the 13" and put 16GB RAM in it.
    The trick is to not buy the RAM upgrade from Apple. Order the MacBook Pro with the minimum amount of RAM, then buy a 16GB kit from OWC or Crucial. These are very reputable companies that often research and then make available reliable kits that can go beyond the RAM limit Apple goes by.
    OWC/MacSales 16GB kit
    Cruclal 16GB kit
    The only reason Apple RAM configurations may be less than others is because Apple does not test newer, larger RAM modules with existing machines. Apple only tests modules available at the time the machines were first shipped and that was last year.
    The newest 13" has 8GB on board memory and no slots. It is not upgradable.

  • SAPscript for Quotations ?

    Hi,
    I need to make some changes in the Quotation layout.
    I did look in NACE--> V1 --> AN00 and the form name shown there is not actually the one which is getting printed. How do I find out which form/script is been used.
    Is there any other way / table having this information?
    Please help !
    Regards
    Hrishi

    HI,
    Whenever the output type AN00 will be used, the form which is linked in NACE setitngs will be invoked.
    The standard is RVORDER01 and the print program is RVADOR01.
    Now if you want to have other form, you can edit these settings and add your form mane there replacing the standard.
    Alternatively you can create your own z output type and link your form and print prog there.
    Hope this clarifies.
    pelase reward if useful.
    reagrds,
    Sachin D

  • Question Mark and Quotation Marks Stopped Working

    Hi, I was working away and then my computer just up and restarted. I then relaunched my application now I notice my quotation marks, and question marks dont work in any application, but they are replaced by these letters: Double Quotation is: È, Single Quotation is: è and Question mark is: É.
    I opened my System Preferences and reset the keyboard to default and the quotations and question marks still dont work. I know I have had memory problems but what can I do to fix this.
    Thanks

    Paint Guy,
    What keyboards do you have selected in System Preferences>International>Keyboards? Make sure that US is at the top of the list and uncheck any unwanted keyboard inputs. It sounds as if you might have Canadian input selected.
    littleshoulders

  • Quotation marks under some contact names

    So I have this issue that's been bugging me for a while. Under some of my contact names there are quotations (ie ""). I know where they are coming from, they are from the field "Nick Name." The problem is that I do not have any nick names for any of my contacts. Whenever I go to edit a contact on my iphone, the "Nick Name" field is always there, but it is blank (and there is no way for me to get rid of it). Unlike other fields such as "Prefix" or "Suffix", if I add them, but then do not fill in that field with anything when I edit the name, the field automatically goes away. I have checked Address Book and none of my contacts have a "Nick Name" field. The same is true for my MobileMe Account. This is really annoying!!! It seems as though my iPhone is randomly deciding to add the field "Nick Name" to some of my contacts, and does not give me the option the delete that field. Does anyone else have this issue and know what to do?
    Also, I have checked and there is no space or anything in that field (it is completely blank) and I have tried replacing all my contacts on my iPhone and even restored my iPhone to factory settings and then synced everything back. (No Workie)
    Message was edited by: Ed Jackson

    Hi,
    I have not worked out why but if the Contacts apps on both devices are not Synced then what you describe happens.
    It seems worse if the Mac (System Preferences > iCloud > Contacts option) has been on in the past and then turned Off.
    This seems to "lose" whatever was the Address Book/Contacts info before hand (even if it started on the Mac and was used to populate the iPhone's version).
    Whilst iCloud is the listed choice here it also works with other method  (System Preferences > Internet Accounts such as Facebook or Google)
    To check open the Contacts app and go to Preferences > Accounts and see what it list for Syncing.
    it can get confused if two are listed.
    9:28 pm      Thursday; March 5, 2015
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

Maybe you are looking for