Help with Sample 'Purchase Order' form

HI Guys,
Have been playing around with the supplied sample file 'Purchase Order'
At the bottom of the form is a Part No., Description and Cost field that populate from a PartNoScript routine.
Have been trying to copy this routine into my own form as its nearly the same.
Question is  - There is a line 2/3rds down
  -  function getDesc(partNumber, descField, itemPrice)
Where is the partName, DescField, ItemPrice store or located. I've looked in all the scripts, looked at the form fields and cannot find what these three relate too.
I'm assume it must be the field name somehow but just cant seem to find them.
Any help much appreciated.
Dave
( With each passing day my knowlage grows stronger - One day I'll take over the world. !! )
var partNo = new Array(" ",
                                                     "580463116",
    "25906311C",
                                                     "25129637J",
                                                     "771128",
                                                     "11198262A",
                                                     "57251",
                                                     "25906312A",
                                                     "51615223D",
                                                     "51615224D",
                                                     "516154CAC");
  // Array of part descriptions.
var partDesc = new Array(null,
                                                            "Electric Fuel Pump",
                                                            "Air Flow Meter",
                                                            "Air Intake Sleeve",
                                                            "Fuel Filter",
                                                            "Fuel Injector Seal Set",
                                                            "Oxygen Sensor",
                                                            "Wiring Harness Upgrade",
                                                            "Brake Caliper left",
                                                            "Brake Caliper right",
                                                            "Brake Master Cylinder right");
// Array of part prices.
var partPrice = new Array(null,
                                                              149.95,
                                                              145.95,
                                                              98.95,
                                                              10.95,
                                                              5.95,
                                                              69.95,
                                                              109.95,
                                                              59.95,
                                                              59.95,
                                                              49.95);
// Populate the part number Drop-down List.
function populatePartNo(dropdownField)
      var i;
      for (i=0; i < partNo.length; i++)
         dropdownField.addItem(partNo[i]);
// Populate the description and unit price fields.
function getDesc(partNumber, descField, itemPrice)   -------------Where are these items/fields, defined or located. ?
   var i;
   for (i = 0; i < partNo.length; i++)                    // Go through the entire list of part numbers to find the one that is currently selected.
      if (partNo[i] == partNumber)                              // When we find the part number currently selected.
        descField.rawValue = partDesc[i];          // Put the description in the description field
              itemPrice.rawValue = partPrice[i];          // and put the unit price in the unit price field.
              break;                                                                                // No need to go further if there is a match.

Hi Dave,
Just to recap:
There is script in the change event of the dropdown that calls the getDesc() function:
// Populate the description and the unit price when we change the part number.
partNoScript.getDesc(xfa.event.newText, txtDescription, numUnitPrice);
This passes three parameters into the function:
xfa.event.newText is the new item in the list that the user has just selected.
txtDescription is the name of the Description object in the same Row that the user has selected from the dropdown.
numUnitPrice is the name of the Unit Price object in the same Row that the user has selected from the dropdown.
So the function is going to be receiving three pieces of information: the new value of the dropdown; the object deference for Description; and the object reference for Unit Price.
Now if we look at the first line of the function:
function getDesc(partNumber, descField, itemPrice)
You can see that the function assigns the incoming parameters to new variables: partNumber; descField; and itemPrice. These variables only live within the function.
For the purpose of the script in the function:
partNumber = the value of the txtPartNum dropdown.
descField = the object reference for the txtDesciption object in the Row that called the function.
itemPrice = the object reference for the numUnitPrice object in the Row that called the function.
Passing the value of the dropdown into the function is fairly straightforward (txtPartNum/partNumber). The clever bit is passing the object reference for the other objects in the Row into the function (eg txtDescription/descField).
The script in the function includes a loop, which looks at the array. If the selected part number is in the array, then it sets the value of the txtDescription object in the same Row, by referencing the descField variable:
descField.rawValue = partDesc[i];
Does that make sense?
In relation to the dropdowns:
You can access the scripts in the Script Editor (5), including enter event, exit event, etc.
You can access most of the dropdown properties in the various palettes (6).
Hope that helps,
Niall

Similar Messages

  • Help with Sample 'Purchase Order'

    Hi All,
    My brain is starting to reject my body looking at the sample 'purchase Order' form that ships with Livecycle.
    I have a form very similar to Purchase Order and I am trying to use the same format as the Purchase order on my form.
    What I have been tring to figure out is where are the stored values kept for the drop down lists.
    Namely the Text Part Number field.- Use name (txtPartNum) .  when you click on the drop down list there are several part numbers to which you can click and it autofills adjactent fields with the part Name and costs
    What I can not find is where those values are stored and how to change them. I dont think they are external from the form.
    If somebody could explain how this section of the form works and how it auto populates the adjacent fileds, I should be able to intergrate it into my form. ( Please remeber to speak slow as I'm still finding my way around )
    Many Thanks in advance.
    Dave

    Post your questions in the forum for LiveCycle Designer.

  • Purchase order form: external send (mail)

    Hi experts
    when creating a purchase order, if the medium used is external  send, the system generates a mail with the purchase order form. What I would like to know if it is possible to customize the system in order to specify the subject of the mail and the body of the mail (like a brief introduction).
    Best regards

    Yes, it is possible by doinng small config change.

  • Creating a purchase order form that has a flowable layout" Help Tutorial

    Regarding the "Creating a purchase order form that has a flowable layout" Help Tutorial,  I can't seem to get the data to pull in for just the PO in question, is there a secret?
    Ideally, it should create one form for each PO with the detail lines for each PO on the individual forms.  Can we do this?
    Many thanks!

    Hi
    If the smartform purchase order is not available in your system
    means you can download the form IDES and you can upload the form in ur ecc 6.0 system.we faced a similar kind of problem in our system and we did as i said.
    Once you uploaded the things you can easily view the form interface and rest of the things related to smartforms.
    Thanks and Regards
    Arun Joseph

  • Purchase Order Form Personalization Help

    I am new to form personalizations and I am trying to create a personalization that will automatically display the "last price paid" in the Price field in a Purchase Order form for an Item once the Item No. is entered. Also once the data is pulled up, they need to be able to edit the 'Price' field to enter the current price.
    I am not sure how to setup my form personalization using the SQL view to I have that contains the "last price paid" data. I would really appreciate some help on how to do this in personalizations.
    Thanks
    KG

    Forms Personalization is a feature of the Oracle Enterprise Business Suite (EBS) not a feature of Oracle Forms. Please post your question in the General EBS Discussion forum. If you have a general Forms question, by all means, ask it here! ;-)
    Craig...

  • Need help on purchase order form

    Hi friends,
    Is it possible to put one folder ( tab) in purchase order form. I am trying to put folder in po screen. if i put any button object in po form it works. but when i put folder it is not showing folder and no errors.
    can anybody help me.....

    Hi Manish,
    it is possible to add the folder to purchase order form.
    you get the reference to Tax Folder of Purchase Order as Item.
    oItem=poForm.Items,Item("2013")
    then set the properties for your folder
    oFolderItem.visible=true
    oFolderItem.left=oItem.Right
    oFolderItem.top=oItem.Top
    oFolderItem.height=oItem.height
    oFolderItem.Width=oItem.width
    oFolderItem.frompane=0
    oFolderItem.topane=0
    oFolderItem.Specific.caption="asdf"
    oFolderItem.Specific.GroupWith("2013")
    Hope it helps you
    Regards
    Vishnu

  • Problem with Purchase Order Form - SAPscript

    I have a custom purchase order form (Z_MEDRUCK) created using SAPscript. The address paragraph looks like this:
    ADDRESS PARAGRAPH AS
       TITLE        &LFA1-ANRED&
       NAME         &LFA1-NAME1&, &LFA1-NAME2&
       STREET       &LFA1-STRAS&
       LOCATION     &STR_SUPPL1&
       POBOX        &LFA1-PFACH& CODE &LFA1-PSTL2&
       CITY         &LFA1-ORT01&, &LFA1-ORT02&
       POSTCODE     &LFA1-PSTLZ&
       COUNTRY      &LFA1-LAND1&
       REGION       &LFA1-REGIO&
       FROMCOUNTRY  &T001-LAND1&
    ENDADDRESS
    When the Purchase Order Form is printed, if a POBOX exists, it is used instead of the STREET.  I did not write the SAPscript or any code involved with it.  I would like the POBOX to only be used if a STREET does not exist. 
    Where would the logic to use POBOX exist?  I have stepped through ME_PRINT_PO and have found nothing. Any ideas?
    Thank You.

    After the word ADDRESS, add DELIVERY.  This should make a physical street address take priority.
    ADDRESS DELIVERY PARAGRAPH AS

  • Purchase order form printing is required in preprinted stationary format

    Dear All,
    I need one VERY URGENT HELP from you.
    Client wants to do printing Purchase order form in preprinted stationary format i.e. using this format they want to print PO document only for certain variable fields each time in our Laser printer,but some fields (which are already) lying will not be printed. (But in the PDF Download of the form for each document number all the fields must appear).
    Could you please guide me what are the sequential steps need to be followed, where & how in order to incorporate "preprinted stationary format" scenario in my
    Purchase order form. Also, if possible, please tell me in brief what is the meaning of preprinted stationary format & why we are using it / purpose of it.
    Awaiting your favorable reply at the earliest.
    FYI. Anyways, I have convinced Client that we will provide PDF attachment of form only to them, not Excel attachment. Thanks very much for encouraging me.
    Thanks & Regards
    Sudipta

    Hi,
    Thank you for your valuable input.
    Please tell me what should be my approach i.e. sequential steps need to be followed & where ( with the related configuration / settings changes, necessary coding changes & where, if possible, please send me one realtime scenario and its related documentation related to my concerned issues at the earliest as it will be very beneficial for mine. I have come across this scenario for the 1st time. Kindly guide me with your documents) in order the incorporate the below requirement:
    After modication of standard Purchase order form using SAPSCRIPT I / Client want to download it into PDF attachment individually corresponding to each PO number. In this PDF attachment all the fields will appear.
    But when I / Client will take Printout of this modified PO form (say for example ZMEDRUCK) only certain important information / certain field values will be getting printed, not all.
    User will be able to give ranges of PO document numbers for printing at a time based on their requirement, here all documents as specified by the user will be getting printed at a time, but one document printout followed by another document printout , and so on.
    We want to print PO sapscript form in "Print output" only. Also, please guide me how many & which output types, message type etc we need to configure & how for the above requirement ( i.e. download of the ZMEDRUCK form into PDF with its all the fields values + printing this ZMEDRUCK form for printing certain important information using "preprinted stationary format".)
    FYI. We are using Laser Printer for printing SAPSCRIPT forms.
    Awaiting your valuable fruitful feedback with necessary documents at the earliest.
    Thanks a lot.
    Have a very nice time ahead.
    Thanks & Regards
    Sudipta

  • Purchase Order Form design

    Hi Friends,
    Please help to me to get the information of below requirement,
    List of all the fields we'll need to include in the Purchase Order Form (start with the standard fields). List to contain the Label Name of the Field on the Form with its appropriate technical name (eg.  PO Number = MEPO_TOPLINE-EBELN). where can i find all the field and technical name of Purchase Order?.
    I would assume that we can get most of this information from the standard Smart Form program. Could you please tell me the Smart Form Program name?
    Thanks
    Abdul

    Hi,
    You can refer to the standard form MEDRUCK via t-code SE71 in SAP system, normally in the standard SAP system use the standard form to print out document, not smart form!
    Of course, you can define your own smart form and printout program for the local request, the table EKKO, EKPO can provide enough information for the smart form.
    Good luck
    Tao

  • Purchase Order form printing error.

    Hi all experts,
    I am not sure which category I should put this question to. Please guide me if I have raised the question in the wrong category, so that I can raise it at the right category. Sorry!
    I am having some problems in printing Purchase Order form using Simple Mail, let's say I am using output type MAHN. Whenever the PO is generated in Simple Mail, a print preview screen with Output Device is pop up, and require me to key in the details like printer name in order to proceed to next step (which is not necessary for my case).
    Whereas, in normal print preview, there is no such pop up display.
    I am suspecting of it is caused of the setting. But I do not know how to solve it.
    Anyone experienced this before? Please help.
    Thanks in advance.

    Hi Sachin D C,
    I am sorry for the confusing query. Actually what I wanted to say is: -
    1) printing the PO - maintain condition records for output type NEU (working fine)
    2) printing Dunning Deliv Remind - output type MAHN (working fine in manual print out)
    3) printing Dunning Deliv Remind - output type MAHN (not working in simple mail)
    Whenever the Dunning Deliv Remind is generated in Simple Mail, a print preview screen with Output Device is pop up and following by another pop up screen Output Processing analysis.
    Do you have better understanding now?
    Please help.

  • Purchase Order form printout error.

    Hi all experts,
    I am not sure which category I should put this question to. Please guide me if I have raised the question in the wrong category, so that I can raise it at the right category. Sorry!
    I am having some problems in printing Purchase Order form using Simple Mail, let's say I am using output type MAHN. Whenever the PO is generated in Simple Mail, a print preview screen with Output Device is pop up, and require me to key in the details like printer name in order to proceed to next step (which is not necessary for my case).
    Whereas, in normal print preview, there is no such pop up display.
    I am suspecting of it is caused of the setting. But I do not know how to solve it.
    Anyone experienced this before? Please help.
    Thanks in advance.

    Hi Sachin D C,
    I am sorry for the confusing query. Actually what I wanted to say is: -
    1) printing the PO - maintain condition records for output type NEU (working fine)
    2) printing Dunning Deliv Remind - output type MAHN (working fine in manual print out)
    3) printing Dunning Deliv Remind - output type MAHN (not working in simple mail)
    Whenever the Dunning Deliv Remind is generated in Simple Mail, a print preview screen with Output Device is pop up and following by another pop up screen Output Processing analysis.
    Do you have better understanding now?
    Please help.

  • Change the address in the right hand side of purchase order form

    Hi all,
    I am new to forms and scripts. I have to modify the output of Purchase Order form/script such that the Ship to and Bill to address that they have now on top right corner must be modified with the address that I have.
    How should i be doing this?
    I found that they copied the program SAPFM06P into ZSAPFM06P and the form name is some thing called ZABC_PURCHASEORDER . Now I want to figure out how should i be changing the purchase order form so that the Ship to and Bill to address that they have now on top right corner must be modified with the address that I have.
    the output type is named as ZNE7.
    Some one please direct me how to figure out. i dont even know if it is a sap script or smart form.
    also please help me in whihc places i should look to change the the Ship to and Bill to address that they have now on top right corner must be modified with the address that I have.
    Regards,
    Jessica Sam

    Ok karthik..i found that there is a windo called ship to where they have stored the following in Text Elements
    HEADER_DELADDRESS
    * <B> ABC Corporation </>
    *DDRESS DELIVERY PARAGRAPH AS PRIORITY
    *   TITLE                  &SADR-NAME2&
    *   NAME                 &SADR-NAME1&,    &SADR-NAME2&
    *   STREET              &SADR-STRAS&
    *   CITY                   &SADR-ORT01&,     &SADR-PSTLZ&
    *   POSTCODE        &SADR-PSTLZ&
    *   REGION             &SADR-REGIO&
    *   COUNTRTY        &SADR-LAND1&
    *ENDADDRESS
    *   FROMCOUNTRY &LFA1-LAND1&
    *   POSTCODE        &SADR-PSTLZ&
    *   CITY                   &SADR-ORT02&,    &SADR-ORT01&
    *   POSTCODE                                     &SADR-PSTLZ&
    *   COUNTRY          &SADR-LAND1&,   &SADR-PSTLZ&
    *   REGION             &SADR-REGIO&
    *   FROMCOUNTRY &LFA1-LAND1&
    *   ENDADDRESS
    BILL TO:
    ABC Corporation Inc,
    6000 Street1
    SUITE # 700, City1
    Country1   789045
    +1 (999) 999-9999(Phone)
       (999) 999-9999(Fax)
    * ABC Company     "AS
    * 5678 Street2        "AS
    * CITY1, State1, 99999 " AS
    * 999 999 9999 " AS
    SHIP TO:
    HEADER_DELADDRESS
    * <B> ABC Corporation </>
    *ADDRESS DELIVERY PARAGRAPH AS PRIORITY
    *   TITLE                  &SADR-ANRED&
    *   NAME                 &SADR-NAME1&,    &SADR-NAME2&, &S
    *   STREET              &SADR-STRAS&
    *   POBOX               &SADR-PSTLZ&
    *   COUNTRY          &SADR-LAND1&
    *   REGION             &SADR-REGIO&
    *   FROMCOUNTRY  &SADR-LAND1&
    *   ENDADDRESS
    HEADER_DELADDRESS_3RDPARTY
    BILL TO:
    ABC Corporation Inc,
    6000 Street1
    SUITE # 700, City1
    Country1   789045
    +1 (999) 999-9999(Phone)
       (999) 999-9999(Fax)
    SHIP TO
    *ADDRESS DELIVERY PARAGRAPH AS
    ABC Corporation Inc,
    6000 Street1
    SUITE # 700, City1
    Country1   789045
    +1 (999) 999-9999(Phone)
       (999) 999-9999(Fax)
    BILL TO:
    ABC Corporation Inc,
    6000 Street1
    SUITE # 700, City1
    Country1   789045
    +1 (999) 999-9999(Phone)
       (999) 999-9999(Fax)
    SHIP TO:
    So to chjange the Bill to and Ship top address that appear in the right hand side top most corner of the purchase order, what should i be changing in the text elements of the PO?
    please guide me..i am very new to sapscripts and i have to finish this task as soon as possible as this is a production support issue.
    Will be waiting for some clues
    Regards,
    Jessica Sam

  • RAISE form_trigger_failure not working in purchase order form

    Hi,
    I am working on a customization in Purchase Order Form (poxpoepo)
    This is what I tried to do.
    CURSOR 1_cur IS
    SELECT pol.LINE_NUM v_line
    ,gcc.segment1 v_seg
    FROM gl_code_combinations gcc
    ,PO_DISTRIBUTIONS_ALL pod
    ,po_lines_all pol
    WHERE SUBSTR(gcc.SEGMENT1,1,1) = 'X'
    AND gcc.code_combination_id = pod.code_combination_id
    AND pod.PO_LINE_ID = pol.PO_LINE_ID
    AND pol.po_line_id = v_po_line
    AND pol.PO_HEADER_ID = v_po_header;
    CURSOR 2_cur IS
    SELECT pol.LINE_NUM v_line
    ,gcc.segment1 v_seg
    FROM gl_code_combinations gcc
    ,PO_DISTRIBUTIONS_ALL pod
    ,po_lines_all pol
    WHERE SUBSTR(gcc.SEGMENT1,1,1) = 'X'
    AND gcc.code_combination_id = pod.code_combination_id
    AND pod.PO_LINE_ID = pol.PO_LINE_ID
    AND pol.PO_HEADER_ID = v_po_header;
    BEGIN
    v_error_found := false ;
    IF (form_name = 'POXPOEPO' AND
    (block_name IN ('PO_LINES' ,
    'PO_SHIPMENTS',
    'PO_DISTRIBUTIONS') AND
    event_name = 'WHEN-NEW-ITEM-INSTANCE') OR
    (block_name = 'PO_HEADERS' AND
    event_name = 'WHEN-NEW-RECORD-INSTANCE' AND
    name_in('SYSTEM.BLOCK_STATUS') = 'QUERY' ) OR
    (block_name = 'PO_APPROVE' AND
    event_name = 'WHEN-NEW-BLOCK-INSTANCE' )
    ) AND
    NAME_IN('PO_LINES.PO_HEADER_ID') IS NOT NULL AND
    NAME_IN('PO_LINES.PO_LINE_ID') IS NOT NULL AND
    name_in('PO_LINES.LINE_NUM') >= 1 ) THEN
    v_po_header_id := NAME_IN('PO_LINES.PO_HEADER_ID');
    v_po_line_id := NAME_IN('PO_LINES.PO_LINE_ID');
    v_line_num := NAME_IN('PO_LINES.LINE_NUM');
    IF block_name in ('PO_LINES' , 'PO_SHIPMENTS', 'PO_DISTRIBUTIONS') THEN
    v_seg := null;
    FOR cursor1 in 1_cur
    LOOP
    if cursor1.v_seg = 'X' THEN
    v_seg := 'X';
    v_line_num := cursor1.v_line;
    EXIT;
    end if;
    END LOOP;
    ELSIF block_name in ('PO_HEADERS','PO_APPROVE') THEN
    FOR cursor2 in 2_cur
    LOOP
    if cursor2.v_seg = 'X' THEN
    v_seg := 'X';
    v_line_num := cursor2.v_line;
    EXIT;
    end if;
    END LOOP;
    END IF;
    IF v_seg = 'X' then
    fnd_message.set_string('custom message to be displayed.');
    FND_MESSAGE.ERROR;
    IF block_name = 'PO_APPROVE' THEN
    go_block('PO_HEADERS');
    raise form_trigger_failure;
    END IF;
    END IF;
    END IF;
    END;
    I actually want to achieve somewhat like this. When ever the charge account field start with 'X' or in other words if segment1 is 'X' and if changes are made to that line like note to supplier is changed and saved then the user should not be allowed to approve/reapprove the order and it shall pop up the message and ONLY restrict from going further if the user hits the APPROVE button. Highlighted in bold should have actually taken care of the requirement from proceeding to the next level of approval but it is not. I have had several debug messages and I am pretty sure that it is satisfying the condition of going to the PO_APPROVE block and still not raising form trigger failure. Could you please help me handle this scenario?

    Your Raise works -- it will terminate your procedure, Change_Detail_Block_Status.
    But, how are you calling the procedure? It is in THAT place that you should look for your problem.
    If you call the procedure, and then have coded EXCEPTION WHEN OTHERS THEN.... or something similar, you might be ignoring the "Raise FTF".
    In addition, you probably need to add these lines in your form where navigation or a commit or similar code causes a trigger to call your procedure:
    If not Form_Success then
    Raise Form_Trigger_Failure;
    End if;

  • Open Purchase Order Form in Find Mode

    Hi,
    I have to open the Purchase Order Form in Find Mode.How to open in Find mode?.
    I Used the Following Code in Form_Load  && Action_Success=true
    if(oForm.Mode = SAPbouiCOM.BoFormMode.fm_ADD_MODE)
            oForm.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE
    But it is not working.Please help me to solve this.
    Regards,
    M.Dhivya

    call
    ActivateMenuItem( "1281")
    in application object.

  • MM - Purchase Order Form Setup

    Hi Experts,
    I am from FICO area but unfortunately my client wants me to support on MM module (only in small areas) and I need support on below:
    Currently we are printing Purchase Order form for vendors but now there was change in purchase order form so I copied old form and created new form (used SE71 for form development).
    My current issue is I do not know where to setup to form in MM so that printing is done with new form.
    Looking for your assistance
    thanks & regards,
    prashant rane

    hi..
    Go to
    SPRO- > MM -> Puchasing- > Purchase Order ->Forms for Messages ->Assign Form and Output Program for Purchase Order
    open this and assign the programs name and form name for any particular output type which you want to use for your PO output.
    After that go to me21n. then Goto menu and messages..
    here in the output column assing your output type and ente the communication method button...assign output device there..
    It will work..
    And if you using ouw defind output type then you have to do lot of congig like defien message type and message determination schema....
    Thanks..

Maybe you are looking for