Purchase order sample - drop down list populating another drop down list

hello, when i use this sample script, it works fine. but when i add additional arrays to it, it doesn't work at all. please let me know what i need to change in this script in order to add additional items into the drop down lists. here is the script that works (displays 3 options in first drop down list (blank, option, another option)):
// This script object controls the interaction between the carrier and plan Drop-down lists.
// The array contains the carriers and the corresponding plans.
var myCarriers = new Array(new Array(2), new Array(14), new Array(17)); // Create a two-dimensional array.
// For each carrier, add a 'new Array(number of plan +1)'.
// Define the carrier and the corresponding plans.
// The array syntax is arrayName[index][index].
// The first index number represents the carrier,
// the second index number is the actual data value.
myCarriers[0][0] = " "; // The first items in the Drop-dowm Lists should be blank.
myCarriers[0][1] = " ";
myCarriers[1][0] = "ANERT"; // The first data value is the carrier name,
myCarriers[1][1] = "MC250"; // the rest are plans.
myCarriers[1][2] = "MC2501";
myCarriers[1][3] = "MC5002";
myCarriers[1][4] = "MC5003";
myCarriers[1][5] = "MC1000";
myCarriers[1][6] = "MC2000";
myCarriers[1][7] = "MCHC2300";
myCarriers[1][8] = "MCHC3000";
myCarriers[1][9] = "MC2500";
myCarriers[1][10] = "MB";
myCarriers[1][11] = "P500";
myCarriers[1][12] = "MHH3000";
myCarriers[1][13] = "MHH5000";
myCarriers[2][0] = "BCCA"; // This is a new carrier, see how the first number is now [1].
myCarriers[2][1] = "S Plan";
myCarriers[2][2] = "BPlan";
myCarriers[2][3] = "P40";
myCarriers[2][4] = "P30";
myCarriers[2][5] = "P35*";
myCarriers[2][6] = "P45*";
myCarriers[2][7] = "Ad25*";
myCarriers[2][8] = "Pr20";
myCarriers[2][9] = "Pr10";
myCarriers[2][10] = "PH750*";
myCarriers[2][11] = "PH500*";
myCarriers[2][12] = "2400HD";
myCarriers[2][13] = "3500HD";
myCarriers[2][14] = "2000HD";
myCarriers[2][15] = "LH1500";
myCarriers[2][16] = "LH3000";
// This function will populate the carrier Drop-down List.
// This function is called from the initialize event of the carrier Drop-down List.
function getCarriers(dropdownField)
dropdownField.clearItems();
for (var i=0; i < myCarriers.length; i++)
dropdownField.addItem(myCarriers[i][0]);
// This function will populate the plans Drop-down List for any event EXCEPT the change event.
// This function is called by the initialize event of the plan Drop-down List.
function getPlans(carrierField, dropdownField)
dropdownField.clearItems(); // Clear the items of the Drop-down List.
for (var i=0; i < myCarriers.length; i++) // Look through all the carriers until we find the one that matches the carrier selected.
if(myCarriers[i][0] == carrierField.rawValue) // Check to see if they match.
for (var j=1; j < myCarriers[i].length; j++) // When they match, add the plans to the Drop-down List.
dropdownField.addItem(myCarriers[i][j]);
dropdownField.rawValue = myCarriers[i][1]; // Display the first item in the list.
// This function will populate the plans Drop-down List for the change event.
// This function is called by the change event of the carrier Drop-down List.
// The first parameter is simply a pointer to the xfa object model.
function getPlansOther(myXfa, dropdownField)
dropdownField.clearItems(); // Clear the items of the Drop-down list.
for (var i=0; i < myCarriers.length; i++) // Look through all the carriers until we find the one that matches the carrier selected.
if(myCarriers[i][0] == myXfa.event.newText) // Check to see if they match. Note: we have to use the event.newText in this case because
{ // the ch

continued...
change hasn't been committed yet.
for (var j=1; j < myCarriers[i].length; j++) // When they match, add the states/provinces to the Drop-down List.
dropdownField.addItem(myCarriers[i][j]);
dropdownField.rawValue = myCarriers[i][1]; // Display the first item in the list.
when i try to add 4 more arrays (add items to first drop down list and second drop down list), nothing displays in either drop down lists. please let me know the items that need to be changed - besides these items (i know i need to add arrays and add myCarriers[1][0],[2][0],[3][0] to [6][0] --- for 4 additional items in the first drop down):
var myCarriers = new Array(new Array(2), new Array(14), new Array(17)); // Create a two-dimensional array.
// For each carrier, add a 'new Array(number of plan +1)'.
// Define the carrier and the corresponding plans.
// The array syntax is arrayName[index][index].
// The first index number represents the carrier,
// the second index number is the actual data value.
myCarriers[0][0] = " "; // The first items in the Drop-dowm Lists should be blank.
myCarriers[0][1] = " ";
myCarriers[1][0] = "ANERT"; // The first data value is the carrier name,
myCarriers[1][1] = "MC250"; // the rest are plans.
myCarriers[1][2] = "MC2501";
myCarriers[1][3] = "MC5002";
any help would be greatly appreciated. thank you!

Similar Messages

  • How to get the Purchase Order sample form to have 2 detail regions?

    I would like to use the "Purchase Order" sample form as the base, and add one more "detail header" and "detail" subform to it.
    So I copy and paste the "detail header" + "detail" subforms, and position them right beneath the first "detail" subform.
    It works to certain extend.  I can click the "Add Item" button(s), and it would expand the respective "detail" region.
    The problem comes when things get expanded to the 2nd page.
    Say, I first add 5 rows to the 2nd "detail" region, everything still fits in one page;
    then I keep adding rows to the 1st "detail" region, and it begins to expand to the 2nd page....
    everything in the first "detail" region can still fit in the first page,
    the rows in the 2nd "detail" region should get pushed to the 2nd page...
    but when I look at the 2nd page of the form, the "detail header" on the 2nd page is that of the "FIRST" detail header, not the 2nd detail header!!
    So, when you look at the entire form, you have
    First Detail Header
    some First Detail Rows
    2nd Detail Header
    some 2nd Detail rows
    --- end of page 1---
    --- page 2---
    First Detail Header
    some detail rows (can't tell if they belong to the first detail region or 2nd detail region)
    This obviously is not right.
    So, how do I fix it such that the Detail Header on the 2nd page is that of the 2nd Detail header???

    an update:
    I have found out that the detail rows on the 2nd page are all that of the 2nd detail region.
    so, it's like this:
    when you look at the entire form, you have
    First Detail Header
    all the First Detail Rows
    2nd Detail Header
    some 2nd Detail rows
    --- end of page 1---
    --- page 2---
    First Detail Header
    some 2nd detail rows

  • How to drag and drop item from list to another item in list and change their positions

    I have a list field with multiple items. I want to select one item from list and drag and drop to another item in the list
     after drop item on another item the position of items should be change. (Example:- if I select 1st item from list and drag and drop this item to 4th item in list after drop that item position of both item should be changed 1st item on 4th position and 4th item on 1st position)
    I don't know how to do this.Please help me to find the solution.

    Hello Zoltan,
    I do not believe that kind of option is built into the listboxes, but I was able to have similiar functionalities using property nodes. I have included an example program that I put together.
    The big difference is that instead of dragging, you double click on the item you want to transfer. To highlight items as you go down the list, all you need to do is set the value to that list number.
    Hope this helps you out!
    Attachments:
    Temp.vi ‏33 KB

  • Purchase Orders with outstanding invoice - How to clear these down?

    Hi,
    We have a large number of purchase orders with an outstanding invoice which will never be fulfilled. I would like to know what is the process for clearing these down so the purchase orders will be marked for archiving, and so they will not be visible when running me2m with selection parameter RECHNUNG. I've tried setting the final invoice flag but I can still see the order.
    Thanks,
    Steph.

    you have to clear the GR/IR account with MR11.

  • How do I use one drop down list to refresh the list in another drop down?

    I am using a drop down list full of years (i.e. 2008, 2009..etc). When I make my selection from this drop down list (say for instance I select 2009) I want it to update the available data in the second drop down list. I have the query statement set up within the JSP page but it needs to be a dynamic SQL statement based off the value I selected in the first drop down.
    String sql = "SELECT GameId, GameDescription FROM Games WHERE Year = " + year;
    The variable "year" is the value I need to figure out how to assign. Now this variable is a Java variable (attribute) and Im unsure how to get the value from the previous drop down and assign it to that. Basically I need the JavaScript value from the first drop down assigned to the Java attribute "year".
    Anyone able to help me with this???
    Thanks,
    Jed

    Here are my two drop down lists. As you can see I build the second list dynamically based off the value of the year. I want to be able to assign my year to the value I select in this first drop down. How do I do that?? I only want to show games for the year I select. I currently have the year hardcoded to "2009" as you see below. How can i change that to be assigned to the JavaScript value i extract from the first select box?
    <select name="season">
    <option value='2009' selected>2009</option>
    <option value='2008'>2008</option>
    </select>
    <select name="gameselect">
    <%
    try
    String year = "2009";
    String connectionURL = "jdbc:mysql://localhost:3306/ElmwoodExpos";
    Class.forName("com.mysql.jdbc.Driver");
    Connection con = DriverManager.getConnection(connectionURL, "root", "thejedster");
    String sql = "SELECT GameId, GameDescription FROM Games WHERE Year = " + year;
    Statement s = con.createStatement();
    s.executeQuery(sql);
    ResultSet rs = s.getResultSet();
    while(rs.next())
    %>
    <option value="1"><% out.print(rs.getString("GameDescription"));%></option>
    <%
    catch(Exception e)
    %>
    </select>
    Thanks,
    Jed

  • Following the Purchase Order sample

    and I'm stuck on this line of script:
    partNoScript.populatePartNo(
    this);
    What does PartNo refer to?
    Thanks,
    MDawn

    PartNo is an array defined in the PartNoScript script object. It contains the values that are loaded into the drop-down.
    // Array of part numbers.
    var partNo = new Array(" ",
       "580463116",
       "25906311C",
       "25129637J",
       "771128",
       "11198262A",
       "57251",
       "25906312A",
       "51615223D",
       "51615224D",
       "516154CAC");

  • Populateing a drop down list in a repeating sub form

    I have been using the scripts from the Purchase Order sample that work with the Country and States/Provinces drop down lists and have modified them to fit my needs. The scripts work great. However I have a drop down list that is in a repeating sub form and the only the drop down list in the first occurance of the sub form works. The others don't.
    I put this line of code in a field called drpOrderedByTeam.
    JobsScript.getJobsOther(xfa, xfa.resolveNode("form1.TimeSheetSF.DetailsSF[*].DetailsTable.DetailsRow.ItemNumber"));
    I thought I just needed to add an "[*]" to the name of the sub form and it would work with all occurances but it doesn't seem so and I'm not sure what else to do.

    Based on your explanations, I've attempted to re-create your form and I think I've got it working the way you'd like it to.
    There are some difficulties with using fields in table headers which are replicated on subsequent pages because while new instances of the header subform and the fields it contains are created, you don't have access to these instances using the header's Instance Manager (I think this is a bug but I'm not sure). This means that you can't iterate through the instances of the header in order to populate the task lists depending on the selection in the team list. One solution for this is to make all header fields Global (select each field and, in the Object palette's Binding tab, set the
    Default Binding property to
    Global). This means that all instances of these fields will share the same value. The effect is that when you change the value of a field on an instance of a header on any page, the change will be replicated on all instances on all pages. The catch, though, is when you use lists in the header. Making list fields global doesn't mean that their item lists are global -- which causes other headaches.
    In the end, because of the problems I've described, I had to resort to cheating a little but if you think about it, it's not really cheating. What the form does is whenever the team list value changes, it removes all instances of the DetailsSF rows. This has the effect of also removing all instances of the DetailTitlesSF headers accross the current page set (and removes all pages but the first one). Then 6 new instances of the DetailsSF row are generated and the DetailTitlesSF header is re-populated using the new selection in the team list. After that, if a new page gets generated because of the number of instances of the DetailsSF rows, the new instances of the task lists in the new instances of the DetailTitlesSF header will have the correct list of items based on the current value of the team list. In the end, even though I'm cheating by removing all instances of the DetailsSF row in order to reset the lists in the DetailTitlesSF header, it's not really cheating because if you change teams, then it should be assumed that all data entered doesn't apply anymore because the tasks change as well... Convinced?
    The best way to understand this is to check-out the sample form.
    Let me know if you have any questions.
    Stefan
    Adobe Systems

  • Unable to change make a down payment using Purchase order

    Hello Experts,
    I created a purchase order and used that purchase order in f-47 and f-48 (created down payment for the P.O).
    When i tried to execute the good receipt i encountered an error that said profit center not mentioned in line item 001. I understood that the profit center was not given in the material masters. I tried to give the profit center in the material masters. However, it says that there are purchase orders existing and cannot save for that reason.
    Now i am unable to delete the Purchase order and the material masters is not saving because the p.o is existing. I am not able to come out of this.
    Any help is highly appreciated
    Regards
    Raghuveer

    Hi
    If you have stocks you cannot change the profit center. The only way I can think of is to write a substitution rule to populate the profit center, so that you can do the GRN. You will have to do a profit center substitution probably by reading the plant.
    Another way is to set the message MM335 in T Code OMT4 as a warning and than try updating the profit center in material master itself.
    Thanks & Regards
    Sanil Bhandari

  • RoboHelp 10 - Missing numbers in the Numbered List within a drop-down hotspot

    I have applied a numbered list style to a paragraph which is written in a drop-down hotspot within another drop-down hotspot in RoboHelp 10. But I observed, though the 'numbers' are displayed in the editor, they are missing from the generated output. Please suggest a solution.

    This is a known issue. Please file a bug report with Adobe: https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform&product=38
    The only workaround I know of is to use regular lists instead in nested dropdowns.

  • Down Payment for Assets Purchase Order and depreciation

    I have created one purchase order for assets now when i am making down payment against purchase order it pick up asset and post down payment correctly without depreciation. But when i am clearing down payment against the vendor invoice it is reversing downpayment in asset explorer [AW01N] with Transaction Type 180 and calculating depreciation on reversal amount. I am using down payment spl G/l indicate "M" even i tried with "A".
    Can anyone tell me why it is reversing depreciation on downpayment cleared against invoice when original down payment is not calculating depreciation.

    Hi,
       As per as my knowledge is concerned, you should treat the cost element as " Category 90 " , this is a balance sheet account.
       Please check at your end.
    Thanks
    Dasa

  • RE: issue with sample watermark apperaring in purchase order

    Hi Team,
    our client is facing an issue when Purchase order is got created from production and when it is released an email notification is been send to vendor and today in the purchase order sample watermark is appearing in the background when i crosschecked in the print preview i can't able to see the sample watermark and also when user gets an email notification for release the PO i cross checked Purchase order attachement there also i can't able to see the sample watermark also there is no change in PO output type.Kinldy can you please suugest the root cause of the issue.
    Thanks in advance

    Had you logged into the wrong system? e.g. QA system instead of Production?
    It is usually not appearing by itself, something must have been changed in your environment. Are you sure the form or the print program was not modified? was the printer exchanged?

  • Migration of Purchase Order History using RM06EEI1

    Hi
    I have migrated Open Purchase Orders from one SAP system to another SAP system.
    I have loaded the Purchase Order details using business object BUS2012  and the PO History using program RM06EEI1.
    Only open quantities were loaded to facilitate subsequent Goods Receipts and Invoice Receipts.
    The records were loaded without errors.
    The Material Ledger was inactive during the migration and activated after the migration.
    Everything looks ok from a migration perspective.  The correct quantities are created on the PO, the GR shows on the History tab, and the correct GL Accounts were posted to i.e the GRIR Clearing Account and the IR Account.
    However, I am unable to perform Invoice Verification (MIRO) and Reversal of Goods Receipts (MIGO) on these records.
    The error message is "No (suitable) item found for purchase order".
    Has anyone encountered this scenario and can shed some light on this issue?
    Regards
    Magan

    Hi,
    I think the best solution would be,
    Identify the open POs in legacy system
    Migrate the data for these POs for table EKKO, EKPO, EKET and long texts.
    Once migrated run tcode OMQ5. this will generate the correct file so that you can upload correct PO history.
    Susequently, upload this file through the tcode OMQ2.
    Check that you provide correct conversion accounts..
    you will get correct Open POs and PO history of open POs from legacy to new system.

  • Custom vendor,freight vendor in case of import purchase order

    Hi all,
    I make the purchase order for imported goods and provide the insurance vendor,custom vendor & clearing charges vendor in PO itself. But when i was go for MIRO for planned delivery cose system show me message as:
    Different invoicing party 1000055 planned for del. costs item in PO
    4500000280
        Message no. M8287
    Diagnosis
        You entered an invoice for delivery costs.
        In a delivery costs item for purchase order 4500000280, the invoicing
        party is 1000055. You are now posting the invoice to 1000040. This can
        be for one of two reasons:
        o   You entered 4500000280 in the field Purchase order, and 1000040 in
            the field Invoicing party.
        o   You entered a multiple allocation. The first item refers to a
            purchase order with invoicing party 1000040. Another item refers to
            purchase order 4500000280. The system copies the invoicing party
            from the first delivery costs item to all items, in this case
    Note:
    The category of this message can be changed in Customizing for Invoice
    Verification. This means that you can receive a message as an error
    message even though it is defined as a warning message in the standard
    system.
    The following documentation deals with the case applicable to the
    standard system only.
    cedure
    Check your entries and make any necessary corrections.
    If you want to allow delivery costs with different invoicing parties to
    be selected, change the system message to W in Customizing. To do this,
    you work through the step Define Attributes of System Messages in the
    Implementation Guide for Invoice Verification.
    The message is set as an error message in the standard system. In this
    case, the delivery costs are not selected.
    regards,
    dinesh

    Import Vendor return is like re export from business point of view.
    You can follow export sales process in sap.
    What i suggest is for example if it is raw material you can create a bom with parent material as X-01,child material as Y what
    you are returning to vendor.
    Note: Create parent material as HALB with sales view & accounting view with valuation of raw material.
    Do production goods receipt,it willl bring stock to parent material.
    Create customer for vendor.
    Adopt export sales process,create a sales order,delivery,billing,invoice,excise invoice,ARE1.
    Note : Discuss with FI consultant/core team take care of accounting effects in billing.
    Clear balances for customer or vendor using F-53 or F-58.
    Note : You need to tell excise/submit documents telling it is not actual export.
    or
    If you opt for purchasing route,then there is lot of customs formalities to be completed & also need to pay duties taken credit,depends on value of goods if it is high, you can opt for import vendor returns or ask vendor for debit memo which will be adjusted with future purchases against same vendor
    I also asked same question in forum, refer link for solution [ Import material - Vendor returned(Indian scenario)  |Import material - Vendor returned(Indian scenario);

  • Error of PO - "Purchase Order Does not exists"

    Dear Experts,
    Here i am facing one error of Purchase Order Creation and its further processing.
    I have created purchase order and saved it, system issued message that, Purchase Order XYZ is created. (I have taken trial for 2-3 Purchase orders).
    When, i am posting Goods Receipt for the PO, system is issuing the error message, Purchase Order does not exists.
    Also in ME2M (PO list display) and Me23N (Display PO),
    system is issuing the same message - Purchase Order Does not exists, but in PO Creation it is generating Purchase order normally.
    Here is no matter of release strategy, because, PO release is not configured.
    Dear Experts, Please guide me on the issue !
    Thanks in advance !!!!

    there can be hundred of different reason for a failure. Most common reason is a problem with the number ranges, e.g. system tries to create a record with a number that is already there.
    This can happen if the number range was reset (or transported from a developement system).
    But transaction SM13 gives you all the details.
    There you see a line for each posting failure. Double click this  line again to get more details.
    There you will certainly find a line in red that indicates in which function the failure ocured.
    Double click this red line to get more info. Use the buttons above to see the content of the posting. For some failures you can create a dump that gives you much more details.
    Best you sit together with an ABAPer who can certainly tell you more how to read a dump and how to find the reason.

  • Purchase order create problem

    Hi Reiner,
    I am testing out a scenario with BAPI_PO_CREATE, encountered a few problems:
    1. Errors with Date field in some structures.
    --> I changed the date field name to ZDATE and that
        fixed it, I remember this was also a problem in
        Connector 1.0. I can only imagine that the Date
        name used clashes with some reserved system date
        field in VB.Net
    2. Purchase order schedule lines are being populated
       via structure BAPIEKET and into a table. I have
       declared a BAPIEKET structure and a table but i seem
       to have errors trying to even populate the first field
       of the BAPIEKET structure. The error is as follows:
    An unhandled exception of type 'System.NullReferenceException' occurred in <application>
    Additional information: Object reference not set to an instance of an object.
    The code is:
            Dim strPoItem_Schedules As BAPIEKET
            Dim tblPoItem_Schedules As New BAPIEKETTable
            'schedule lines
            strPoItem_Schedules.Po_Item = "00001"
            strPoItem_Schedules.Serial_No = "0001"
            strPoItem_Schedules.Deliv_Date = "20040407"
            strPoItem_Schedules.Quantity = CLng(1.0)
            tblPoItem_Schedules.Add(strPoItem_Schedules)
    Hope you can help coz I did the same with the PO line items table and it is fine...not sure why it is behaving like this for the PO SChedule lines.
    Cheers

    Reiner, no worries. I fixed it. My bad....careless, I  declared the BAPIEKET structure wrongly.
    Cheers

Maybe you are looking for