Doc is not defined

Hello,
I am submitting a string of numbers delimited with commas from a form to be utilized by a JavaScript function.
Here is the string of number I am submitting:
7.4%,0.1%,0.4%,9.7%,53.1%,0.5%,15.5%,4.8%,1.6%,5.7%,1.0%
Here is the function:
function searchArray(doc, arrStr, startPage, endPage) {
var arr = arrStr.replace(/\s/g,"").split(",");
if (startPage==-1) startPage = 0;
if (endPage==-1) endPage = doc.numPages-1;
var results = [];
for (var i in arr) results.push(false);
pagesLoop:
for (var p=startPage; p<=endPage; p++) {
  var numWords = doc.getPageNumWords(p);
  for (var i=0; i<numWords; i++) {
   var word = trim2(doc.getPageNthWord(p,i,false));
   var matchIndex = arr.indexOf(word);
   if (matchIndex!=-1) {
    if (results[matchIndex]==false) {
     results[matchIndex] = true;
     var allFound = true;
     for (var j in results) {
      if (results[j]==false) {
       allFound = false;
       break;
     if (allFound) break pagesLoop;
return results;
function trim2(s) {
  if (typeof s != "string") return s;
  return s.replace(/^\s+/,"").replace(/\s+$/,"");
Here is the code that makes the button under "Add-On Tools":
app.addToolButton({ cName: "LnchSrchPM", cLabel: "EMB-PM to BO Compare", cTooltext: "EMB-PM to BO Compare",
cExec: "lnchSrchPM(false)", cEnable: "event.rc = (event.target!=null)"});
Here is the function that takes the string of numbers and sends it to the searchArray function:
function subSrchValPM() {
var searchThis = " ";
searchThis = this.getField(1).valueAsString;
console.println(searchThis);
All I want to do at this point is to make the string of numbers that I am submitting appear in the debugging console.
I can't seem to do that.
I get the following error message:
doc is not defined
25:AcroForm:SubmitButton:Annot1:MouseUp:Action1Exception in line 25 of function subSrchValPM, script 0
Line 25 is the following:
searchThis = this.getField(1).valueAsString;
Can someone tell me what I am doing wrong?
Thanks!
Linda

I have added the following three lines of code...
  console.println(p);
  console.println(i);
  console.println(word);
right before this line to see what values I was getting.
  var word = trim3(doc.getPageNthWord(p,i,false));
I got the following results in the debugging console:
0
0
undefined
0
1
EMB
0
2
0
3
PM
0
4
to
0
5
B.
0
6
O.
0
7
Compare
0
8
17
0
9
18
0
10
SUBMIT
0
11
7.4%,
0
12
0.1%,
0
13
0.4%,
0
14
9.7%,
0
15
53.1%,
0
16
0.5%,
0
17
15.5%,
0
18
4.8%,
0
19
1.6%,
0
20
5.7%,
TypeError: Invalid argument type.
Doc.getPageNumWords:188:Field SubmitButton:Mouse Up
===> Parameter nPage.
I did notice that when submitted, the form does not go away and it looks like the script does not get to search the actual document.
It appears that the script searches the form.  When I looked for the value of the variable "word", it was actually picking up the words on the form such as EMB, PM, to, B., O., Compare, SUBMIT,  and all the numbers in the text field of the form.
Something is preventing the form from submitting properly and this is causing the script to not work.
Please tell me how I can send you a copy of my form so that you can look at it.
Thanks
Linda

Similar Messages

  • Vendor payment doc type KZ looking for account type A which is not defined

    Hi Experts
    We are processing a Vendor payment where discount is received, howeve,  the message "For document type KZ, account type A is not defined'  in the job log.
    Can anyone please put some light on this error.
    Many thanks
    Kind regards
    Dawn

    Hi,
    T-code OBA7: there it is defined which doc. type is allowed to use which acount types.
    SAP standard for KZ is to use vendor + GL account types.
    So check your document that you are going tro post or, if you think its ok, post the same document in a test client and enable doc. type KZ in OBA7 to be used with asset account types to view the result of your posting.
    Best regards, Christian

  • Pricing doc. does not exist in CRM Sales Doc Creation

    Hello gurus
    I am new to Sales within CRM and recently have set up the IPC.
    The IPC communicates with the CRM Server without any issues.  I have download all data required in the IPC.
    When I create a new sales order in CRM all is ok apart from the conditions tab, this shows Pricing doc. does not exist.  - Diagnosis
    You tried to access pricing information. However, a valid pricing document is not available.
    Any ideas?
    System Details
    CRM 4.0
    IPC 4.0 SP16
    Regards
    Barry

    Hi Barry,
    Please check first whether a pricing procrdure is correctly defined under Spro->CustomerRelationship Management->Basic Functions -> Pricing ->Determine Pricing Procedures.
    Here please check whether for the Sales Area(that you use in your order) an procing procedure is correctly defined. Otherewise pricing will not happen.
    To explain about Customer Pricing Procedure and Document Pricing Procedure
    The pricing procedure defined here in the above path is generaly a combination of 1)Document Procing  procedure and 2)Customer Pricing Procedure.
    Document Pricing Procedure - This is assocaited with the transaction type. Goto the transaction type details in spro and there you will find the association.
    Customer Pricing Procedure - This is associated with thh Business Partner. Select the BP(in sold to party role) and select "Sales Area" tab and in the "Billing" tab you will find this information.
    Note that the pricing procedure need not have both the Document Pricing Procedure and Customer Pricing Procedure defined.Any one can also be present. It depends on the business requirement.
    In your case can you please check whether the Pricing Procedure is prsent at all.
    Regards,
    Abishek

  • Creating Sales Order- Item Category TAN is not defined.

    Hello all,
    I am working on Creating sales order for Global Bike Inc case. But when I enter the material and quantity number and click check mark it says "Item category TAN is not defined". Can some body help me how can we define TAN or why it is giving me that error.
    Thanks in advance.
    Sujan

    Hi SujanB,
    As your question is already answered. An indicator that defines the characteristics of a document item.
    For example, the item category controls the type and scope of:
    Pricing
    Billing
    Delivery
    Inventory posting
    Transfer of requirements
    Providing further deatils ;--
    01. How item category is determined :--
    Depending on the item category group that you apply & the sales doc type you are processing the system automatically proposes an item category in the document.
    1.sales document type (source: order type)
    2.item category group (source: material master)
    3.item category of the higher-level item (source: user defined)
    4.item category usage (The usage is defined by SAP and is hard coded in the programs)
    SPRO- IMG- SD- Sales- Sales Document- Sales Document Item- Assign Item Category (VOV4)
    Pls refer following link for furter details ;--
    general item category group
    item category usage  in item category determination
    http://help.sap.com/saphelp_46c/helpdata/en/dd/55fb13545a11d1a7020000e829fd11/content.htm
    http://www.slideshare.net/magnatraining/item-category
    Hope it helps....
    Thanks/Rajesh

  • Item Category not Defined Error message when deleting a batch item in Deliv

    Hi,
    I am trying with a Intercompany transfer . So after creating Interco. Transfer we have followed with a delivery document.
    Now,we would like to delete the delivery document. For your info. Del. doc is still open. We haven't gone for Goods issue or anything else.
    So,we tried removing the batch line item in batchsplit tab of the delivery and then deleting the delivery document.
    But we get the error message "Item catgeory Not defined". but we could see entries for Item category Determination with the particular Delivery typeItem Category Group from Material MasterItem Usage+Item Category.
    Why does system throw "Item catgeory Not defined".  when there are entries for particular determination available .
    And this seems to be Syste
    Thanks,
    Dhilipan

    Hello Sandy,
    Thanks for ur update. But its ticked already.. We checked it.
    But we still face this issue. And we are not able to replicate the same issue in QA..What cud be the reason.
    But Config..seems exactly similar to Pro. and QA
    Thanks,
    Dhilipan

  • From DRFOUT not able to replicate the material, I-doc is not triggering

    Hello Experts,
    I am implementing SAP MDG for Material. I have done all the required confiration for Data replication as per the standard configuration document.
    I want to replicate to another SAP system from SAP MDG hub.I have created the Data replication model and all the required configuration for maintain    logical system, Distribution and generated partner profile with the necessary message types. But when I am executing DRFOUT no i-doc is generated even though it found material successfully depending on the filter criteria.
    From BD10 I am able to replicate the Material and I-doc has been gererated and I can see from WE02 that the i-doc has been sent successfully.
    Please help me out to get the answer why the i-doc is not creating while I am executing DRFOUT.
    Regards,
    Soumya De

    Hi Soumya,
    It is important that you complete the config and setup the technical settings for business systems in both the sending and receiving systems. Config :Masterdata Governance - General Settings - Data Replication - Define custom settings for data replication - Define Technical settings - Define Technical settings for business systems.
    The business system, Logical system and RFC destination must be the same value in all of the 3 fields and must have at least the same entry for the 3 fields with the sending system as well as an entry for the receiving system. Please note both systems should have the same entries to be a sending and receiving system. Make sure you complete the second part of the config for your BO types.
    So what we did, we added all systems in our config client and transported it to all our other clients.
    Hope this will help you
    Regards
    Riaan

  • Payment term issue "error payment term is not defined"

    I have created a new payment term, and incorporated in customer master and created sales order . payment term is getting populated in sales order with an error "payment term is not defined". Please help to resolve.'
    David

    There can be many possibilities for this error,  in tcode OBB8,
    - the terms of payment is not marked for customer.
    - date limits are not mention properly.
    - if the installments are not config properly
    Or
    Try it putting manually in to the sales doc.
    If problem persists, take assistance of FI team member to sort out the error.
    Also, refer following SAP Notes:
    - 66529  F5839 Payment term & not defined
    - 598025  Work method terms of payment for condition records
    - 1180397 enterprise SOA conversion/Supplement to Note 117317
    - 311514 No payment method for installment terms of payment
    - 649567      EDI: incorrect baseline date for payment
    - 208023      Posting bill doc ->FI:incor cash discount rate used
    - 391939      Entries ignored with warning messages in sales document
    Thanks & Regards
    JP

  • Transfer Purchase Order - Error message "Field selection ZTR not defined"

    Hi all,
    I've customized a new transfer purchase order type : TRA.
    When I go to ME21N and choose TRA type, SAP displays this error message :
    "Field selection ZTR not defined
    Message no. ME028
    The field selection required by the system is not defined in table 162.
    Further processing is currently not possible."
    How can I fix that please ?
    Regards,
    Bahia.

    Hello,
    Check in IMG - MM - Purchasing - Purchase order -define screen layout - Check any field selction ZTR has been configured. And also check in Purchasing - purchase order - define document types - your PO doc type has reference to field selection group ZTR - if yes change it..
    Regards
    Mahesh Naik

  • Operation specified in binding is not defined 4 PortType, but it is, help..

    Hi guys...
    this thing is driving me crazy...
    Whenever I try to validate it.. it gives me error at
    <wsdl:operation name="ComposedClassOpt">complete definition is below...
    that "The operation specified for the 'Binding' binding is not defined for port type 'ComposedClassPortType'. All operations specified in this binding must be defined in port type 'ComposedClassPortType'."
    But the operation is in the PortType
    plz thank you.
    <?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitions name="compose" targetNamespace="http://composeWsdl/"
         xmlns:wsdl2="http://BookService2/" xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
         xmlns:wsdl1="http://BookService1/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
         xmlns:tns="http://composeWsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
         xmlns:vprop="http://docs.oasis-open.org/wsbpel/2.0/varprop" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
         xmlns:xsdcomp="http://ComposedClass/">
         <wsdl:import namespace="http://BookService1/"
              location="/Users/adnan/Documents/workspace/TestBpel/BookService1.wsdl">
         </wsdl:import>
         <wsdl:import namespace="http://ComposedClass/"
              location="/Users/adnan/Documents/workspace/wsdlparse/ComposedClass.xsd">
         </wsdl:import>
         <wsdl:import namespace="http://BookService2/"
              location="/Users/adnan/Documents/workspace/TestBpel/BookService2.wsdl">
         </wsdl:import>
         <wsdl:message name="ComposedClassINMsg">
              <wsdl:part name="ComposedClassINMsgPayload" element="xsdcomp:ComposedClassIN">
              </wsdl:part>
         </wsdl:message>
         <wsdl:message name="fault">
              <wsdl:part name="FaultPayload" type="xsd:string">
              </wsdl:part>
         </wsdl:message>
         <wsdl:message name="ComposedClassResponseMsg">
              <wsdl:part name="ComposedClassResponseMsgPayload" element="xsdcomp:ComposedClassResponse">
              </wsdl:part>
         </wsdl:message>
         <wsdl:portType name="ComposedClassPortType">
              <wsdl:operation name="ComposedClassOpt">
                   <wsdl:input name="ComposedClassINMsg" message="tns:ComposedClassINMsg">
                   </wsdl:input>
                   <wsdl:output name="ComposedClassResponseMsg" message="tns:ComposedClassResponseMsg">
                   </wsdl:output>
                   <wsdl:fault name="generalFault" message="tns:fault">
                   </wsdl:fault>
              </wsdl:operation>
         </wsdl:portType>
         <wsdl:binding name="Binding" type="tns:ComposedClassPortType">
              <soap:binding style="rpc"
                   transport="http://schemas.xmlsoap.org/soap/http" />
              <wsdl:operation name="ComposedClassOpt">
                   <wsdl:input name="ComposedClassbindIn">
                        <soap:body use="literal" />
                   </wsdl:input>
                   <wsdl:output name="ComposedClassbindOut">
                        <soap:body use="literal" />
                   </wsdl:output>
                   <wsdl:fault name="BindingFault">
                   </wsdl:fault>
              </wsdl:operation>
         </wsdl:binding>
         <wsdl:service name="service">
              <wsdl:port name="BindingPort" binding="tns:Binding">
                   <soap:address location="http://localhost:8181/ode/processes/BindingPort" />
              </wsdl:port>
         </wsdl:service>
         <plnk:partnerLinkType name="BookServicePLT">
              <plnk:role name="BookServiceRole" portType="tns:ComposedClassPortType">
              </plnk:role>
         </plnk:partnerLinkType>
    </wsdl:definitions>Edited by: Bandit on Apr 28, 2010 1:21 PM

    come on ppl ....

  • GLIBC_2.0 not defined in file libc.so.6

    I am attempting to install the patch 11I.ATG.PF.H Detla 7, got errors at the end with 7 reports not compiling successfully. I went to recompile one report and got the following error message
    Error Message:
    /finora/product/10222/8.0.6/bin/rwcon60: relocation error: /finora/product/10222/8.0.6/network/jre11/lib/i686/native_threads/libjava.so: symbol __libc_wait, version GLIBC_2.0 not defined in file libc.so.6 with link time reference
    Some articles state that LD_ASSUME_KERNEL needs to be set which is untrue for Redhat Linux 5.5. In fact things break if this is set in RHEL5.5.
    Not sure why this is not working.....any one else have issues with this?

    I am attempting to install the patch 11I.ATG.PF.H Detla 7, got errors at the end with 7 reports not compiling successfully. I went to recompile one report and got the following error message
    Error Message:
    /finora/product/10222/8.0.6/bin/rwcon60: relocation error: /finora/product/10222/8.0.6/network/jre11/lib/i686/native_threads/libjava.so: symbol __libc_wait, version GLIBC_2.0 not defined in file libc.so.6 with link time referencePlease see these docs.
    ar60runb Relocation Error 'Version Glibc_2.0 Not Defined In File libc.so.6' When Running Concurrent Requests [ID 284535.1]
    Concurrent Requests Getting Error: ar60run: Relocation Error [ID 389698.1]
    Running Concurren Request Causes ar60run: relocation error libjava.so: symbol__libc_wait, version GLIBC_2.0 not defined in file libc.so.6 with link time reference [ID 404500.1]
    Concurrent Requests Produce Zero Byte Output Files [ID 415196.1]
    Standard Concurrent Requests Fail After Fresh Install or Clone on Linux [ID 264951.1]
    rwcon60 Fails With 'Symbol __libc_wait, Version Glibc_2.0 Not Defined' Error Generating Reports [ID 371344.1]
    Concurrent Manager Jobs Fail After Reinstallation of the Operating System [ID 464960.1]
    > Some articles state that LD_ASSUME_KERNEL needs to be set which is untrue for Redhat Linux 5.5. In fact things break if this is set in RHEL5.5.
    Not sure why this is not working.....any one else have issues with this?Do not set LD_ASSUME_KERNEL on OEL5/RHEL5 -- What should the value of LD_ASSUME_KERNEL be set to for Linux? [ID 377217.1]
    Thanks,
    Hussein

  • The attributes of the user are inconsistent or not defined. See PPOMA_BBP

    Hi all,
    I created a free text SC and after approval by the manager, the SC was routed to the Sourcing cockpit as I had activated sourcing for the product category that was ordered.
    Now in the SOCO, when I select my SC and click on the 'Next' button, I get an error : "The attributes of the user are inconsistent or not defined. See transaction PPOMA_BBP."
    I have defined the following attributes for my purchaser
    Acct assgnmnt Categry --- (Cost centre)
    Acct system for vendor --- (ECC logical system)
    Company code --- (XXX)
    Cost centre --- (XXXXX)
    Del address --- (XXXXX)
    Doc type in R/3 --- (ECPO)
    Local currency  --- (EUR)
    Mov type --- (201)
    System Alias --- (ECC logical system)
    System alias for accounting system --- (ECC logical system)
    System alias for vendor --- (ECC logical system)
    User role --- (employee/op purchaser/st purchaser)
    Which other attribute do I need to define? Is there something that I have missed?
    Strangely it works fine if I give my user SAP_ALL profile!!
    Regards

    Hitesh & Velu,
    I did regenerate the role and it is in green now. Still it does not work.
    However I noticed that when I ran the attribute check for Purchaser's position, I got the following errors.
    Application 'RFx': Assign purchaser PURCHASER1 to a purchasing organization
    Message no. BBP_ATTR_CHECK151
    Diagnosis
    User PURCHASER1 has a purchaser's authorizations but is not assigned to any purchasing organization.
    System Response
    Purchaser PURCHASER1 (position S 50000015) cannot run the EBP applications RFx without encountering errors.
    Procedure
    Assign a purchasing organization to purchaser PURCHASER1 (position S 50000015). Select an organization unit above the purchaser and select the property 'purchasing organization' on the 'Function' tab.
    I have already done the above, all org units have a function that links them to backend ECC. Why is it still prompting me with the same error?
    Regards

  • Ship.condition 01 loading grp 0003 plant MCP1 StLoc not defined Message no.

    Dear all
    Why I am getting this message when i try to add shipping point at item level in Quotation "Ship.condition 01 loading grp 0003 plant MCP1 StLoc not defined Message no.V1358"
    Kindly help me to resolve this error.
    Thanks and Regards
    M.Dheerendar Jain

    Hi
    check the following
    Check your shipping conditions in sales order header shipping tab + loading group in material master + plant in sales order,
    verify the same in OVL2, whether its mainatined or not.
    1. Shipping condition maintain in Sold to party of ur customer master,
    2. Loading group should be maitained for perticular Sales area and plant in Material Master for Sales: General/Plant Data.
    3. Plant should be available in sales order
    IMG -> Logistics Execution -> Shipping -> Basic shipping functions -> Shipping point and Goos receiving point determination -> Assign Shipping Points.In that determine the storage location, loading group, plant, proposed shipping point and manual shipping point.
    Combination of Shipping Point Determination=
    Loading Group - (1-Material Master Record)
    Shipping COnditions (1- Sales doc type , 2- Customer Master Data - Sold to Party)
    Delivering Plant - (1-Customer Material Info record , 2- Customer Master Record & 3-material master record)
    If you have done Copy of existing Shipping Point & renamed it. Then all the shippig Point determination Combinations will be copied.
    If not, then you need to maintain manually in Shipping point determination customization

  • Vendor X in  not defined in Company code  Y

    Hi Guys,
    I did the setting in OBYA (intercompany settings) for the two company codes X and Y. However, when I am psoting the doc by FB01 getting the error
    "Vendor X in  not defined in Company code  Y". In OBYA, it show the setting.
    thnks

    hi,
    getting this error. What to do
    Consolidated companies 64 and 000065 are different
    Message no. F5080
    Diagnosis
    The number of the affiliated company must be clear for the selected document type for all line items. In this case at least two different companies or a company in connection with a business partner who does not belong to a company are stated.
    Procedure
    If you selected the correct accounts, you must enter the document with a document type that allows cross-company posting. Otherwise, please correct the entered account.

  • UWL displaying workflow NOT defined in the XML

    Can someone tell me why/how some workflows are displaying in UWL even though the workflows are not defined in the XML file?

    Hi Daniel,
    This is the case for many "legacy" workflows launching SAP(Web)GUI transactions or BSPs.
    It works like this: if the UWL cannot find a corresponding task type for an arriving work item from Business Workflow in its XML configuration, it assigns the task type "uwl.webflow.default". In the standard uwl xml file you can see that tasks of this type are launched using the SAPTransactionLauncher (not specifying the TransactionCode parameter).
    As you can see in the documentation (https://help.sap.com/javadocs/NW04S/SPS09/uw/com/sap/netweaver/bc/uwl/config/doc-files/ActionHandlers.html), if the TransactionCode is empty, the action handler defaults to the Business Workflow transaction "SWK1". This transaction (the UWL is now out of the picture) just redirects to the target transactions defined in the workflow itself.
    Any matching entry in the UWL XML configuration will however override this default behavior.
    Good question though. Hope this clarifies it to some extend...
    Best,
    Matthias

  • Error in Jco Destination Create (MsgServerName is not defined).

    Hi,
    When I try to create a Metadata Jco Destination, the system show the message "MsgServerName is not defined" and cancel the operation.
    I can create Modeldata Jco Destination correctly. The problem is only on Metadata Jco Destination.
    Thanks.
    Ariel.

    Hi Alex,
    Please see the below link in which discussed the issue for "MsgServerName is not defined". 
    JCo Destinations: Message Server connection not defined
    /message/8658127#8658127 [original link is broken]
    Maintain JCO Destination, cannot set the server and logon group
    Also check the [System Landscape Directory Process and JCo Configuration|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c0c1d495-048e-2b10-babd-924a136f56b5?quicklink=index&overridelayout=true]
    Hope it helps
    Regards,
    Arun

Maybe you are looking for

  • Help with OS 10.4.7 on Beige G3

    Here's the problem: I upgraded Panther (10.3.9) on my G3 box (Rev A, XLR8 G4 upgrade CPU, Sonnet tempo trio usb/fw/ata133, 640M RAM) to Tiger 10.4 with the help of Xpostfacto 4.0. Upgraded great and ran 10.4.0 just fine. Software update ran and insta

  • All of a sudden, for no apparent reason, it takes up to 5 minutes for the prompt for my password to come come on screen?

    When I open Thunderbird it takes up to 5 minutes for the prompt to come up to enter my password. This has just started happening-for no apparent reason. I opened the program in 'safe mode' and it made no difference. Please advise.

  • Ni 5640R drivers

    Hi Sir, I am vasu.I have started working on your  NI-5640R(version 1.1) LabVIEW card with LabVIEW 8.2. i have some doubts on this card. i seen in C:\Program Files\National Instruments\LabVIEW 8.2\examples\instr\ni5640R\Driver four VIs. how can use th

  • Types of subcontracting

    dear gurus,             what are all the types of subcontracting in sap?how it has been mapped in standard sap system?            what is mean by internal and external subcontarcting/      in which subontracting we will be using special procurement k

  • Registry settings on 64-bit Windows 7

    We are currently trying out TestStand 4.1 as well as 4.5 (the 2010 beta) on a 64-bit Windows 7. We have the following problem (not knowing whether this has to do with Windows 7 or with 64-bit, actually). We always set the TestStand configuration and