Select quantity depending on style # choosen

HI,
I have a drop down menu with 2 style numbers: 2602 and 2622
If the client choose 2602, then the number 20 gets written in the next field.
If the client choose 2622, then the number 40 gets written in the next field.
I assume the field that has the quantity (20 or 40) would have to be read only so nobody can change them.
What would be the script for that (and where should I put it)?
Thanks.

George_Johnson wrote:
You could use a custom calculate script for the text field. It would get the value of the combo box and set the value of the field (event.value) based on which item was selected.
Thanks George, but I wish I could write a script like that.
By that I mean that I don't know what the script should be.

Similar Messages

  • Select quantity depending on style # choosen – Part 2

    HI,
    I have a drop down menu with 2 style numbers: 2602 and 2622
    If the client choose 2602, then the number 20 gets written in the next field.
    If the client choose 2622, then the number 40 gets written in the next field.
    What would be the script for that (and where should I put it)?
    Thanks.

    OK, now there is a problem.
    When I hit the button to clear all fields, the combo box and the related text field don't clear.
    My script to clear the form is: 
    if (app.alert("Do you really want to clear all fields of this form?", 2, 1) == 1)
      this.resetForm();
    I've got another combo box in that Form and it clear fine (that one has no Export value attached to it).

  • Calling selection screen depends on radio buttion selection

    I need to call two selection screens (not radio buttons selection screens) depends on radio buttion selection
    Eg :
       R1-radio button
      R2- radio button
    if we select R1- we should get selection screen to enter input values like parameters, select options
       PARAMETERS:     p_abc TYPE    MARA-matnr OBLIGATORY
      SELECT-OPTIONS: s_mno  FOR   MARC- chngr OBLIGATORY.
      PARAMETERS:     p_xyz TYPE     MARA - amktxOBLIGATORY.  (just example)
    If we select R2, we should get selection screen to enter input values like parameters, select options
    PARAMETERS:         p_abcd TYPE    KNA1-matnr OBLIGATORY
      SELECT-OPTIONS:  s_mnop  FOR   VBAK- chngr OBLIGATORY.
      PARAMETERS:        p_xyza TYPE     VBAP - amktxOBLIGATORY  (just example)
    if we select 1 , other should be hide
    Madhu

    Hi,
    this is an example:
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
    PARAMETER R1 RADIOBUTTON GROUP G1 DEFAULT 'X' USER-COMMAND SET1.
    PARAMETER R2 RADIOBUTTON GROUP G1 .
    SELECTION-SCREEN BEGIN OF BLOCK B21 WITH FRAME TITLE TEXT-004.
    PARAMETER: P1 LIKE IBIPPARMS-PATH MODIF ID FPA.
    SELECTION-SCREEN END OF BLOCK B21.
    SELECTION-SCREEN BEGIN OF BLOCK B22 WITH FRAME TITLE TEXT-004.
    PARAMETER: P2 LIKE IBIPPARMS-PATH MODIF ID FPB.
    SELECTION-SCREEN END OF BLOCK B22.
    SELECTION-SCREEN END OF BLOCK B2.
    DATA: P_CHECK.
    AT SELECTION-SCREEN OUTPUT.
      IF P_CHECK <> 'X'.
        LOOP AT SCREEN.
          IF SCREEN-GROUP1 = 'FPA' OR
             SCREEN-GROUP1 = 'FPB'.
            SCREEN-INPUT = '0'.
            SCREEN-INVISIBLE = '1'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
        P_CHECK = 'X'.
      ENDIF.
      IF R1 = 'X'.
        LOOP AT SCREEN.
          IF SCREEN-GROUP1 = 'FPA'.
            SCREEN-INVISIBLE = '0'.
            SCREEN-INPUT = '1'.
            MODIFY SCREEN.
          ENDIF.
          IF SCREEN-GROUP1 = 'FPB'.
            SCREEN-INVISIBLE = '1'.
            SCREEN-INPUT = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
      IF R2 = 'X'.
        LOOP AT SCREEN.
          IF SCREEN-GROUP1 = 'FPB'.
            SCREEN-INVISIBLE = '0'.
            SCREEN-INPUT = '1'.
            MODIFY SCREEN.
          ENDIF.
          IF SCREEN-GROUP1 = 'FPA'.
            SCREEN-INVISIBLE = '1'.
            SCREEN-INPUT = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    Angelo.

  • OSS notes for MB1B in checking Amount and Quantity depending on the mat. #

    Dear All:
    Where can i download OSS notes in MB1B for  checking the amount and quantity depending on the material number?
    Thanks,
    CHOCO

    Hi ,
    We are not getting what you mean to say.
    But as far my understanding of your query I am giving the reply.
    OSS notes can be download at the tcode SNOTE.
    Pls go to the tcode SNOTE-> GOTO ->DOWNLOAD SAP NOTE.
    here you need to give the sap note number.
    To get this number you first need to search in service.sap.com and find the relevant note that is useful for ur scenario.
    And after finding that note and we need to give this number in SNOTE tcode and we need to download.
    Pls tell me your requirement clearly so that i will try to find a oss note for you.
    Pls get back to us for further assistance . Happy to help you.
    Regards,
    Viveks

  • Defining Selection-Screen Depending on Client

    Good Morning,
    I need to hide one parameter from my selection-screen depending on sy-mandt.
    Is it possible? If yes, can anyone show an example?
    Regards,
    Pedro Gaspar

    hi
    u can put ur fields in a block sepicific for a particular client.
    u check the mandt and display the corresponding block while hiding the others.
    check this sample code:
    TABLES: eban,
            SSCRFIELDS.
    SELECTION-SCREEN BEGIN OF SCREEN 100 TITLE title.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
    PARAMETER:rad1 RADIOBUTTON GROUP rad USER-COMMAND frad1 DEFAULT 'X',
              rad2 RADIOBUTTON GROUP rad .
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t02.
    PARAMETER: mtr AS CHECKBOX MODIF ID g3 USER-COMMAND chk1,
               p_matnr TYPE eban-matnr MODIF ID g1,
               sloc AS CHECKBOX MODIF ID g3 USER-COMMAND chk2,
               str_loc TYPE eban-lgort MODIF ID g4.
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-t03.
    SELECT-OPTIONS: matnr1 FOR eban-matnr MODIF ID g2.
    SELECTION-SCREEN END OF BLOCK b3.
    SELECTION-SCREEN PUSHBUTTON /20(10) name USER-COMMAND UCOM.
    SELECTION-SCREEN END OF SCREEN 100.
    name = 'FETCH'.
    title = 'Test Report'.
    CALL SELECTION-SCREEN '100'.
    TYPE-POOLS slis.
    declaration of internal tables and work areas to be used
    DATA: BEGIN OF it_pr OCCURS 0,
          banfn TYPE eban-banfn,
          bnfpo TYPE eban-bnfpo,
          loekz TYPE eban-loekz,
          statu TYPE eban-statu,
          ekgrp TYPE eban-ekgrp,
          matnr TYPE eban-matnr,
          werks TYPE eban-werks,
          lgort TYPE eban-lgort,
          preis TYPE eban-preis,
          peinh TYPE eban-peinh,
          END OF it_pr.
    DATA: BEGIN OF it_mat OCCURS 0,
          matnr TYPE eban-matnr,
          END OF it_mat.
    *DATA:BEGIN OF ITAB1 OCCURS 0,
      DATA: l_answer.
    DATA: it_fieldcat TYPE slis_t_fieldcat_alv,
          wa_fieldcat LIKE LINE OF it_fieldcat,
          it_event TYPE slis_t_event,
          wa_event TYPE slis_alv_event.
    declaration of variables to be used
    DATA: r_ucomm TYPE sy-ucomm,
          mat_no TYPE eban-matnr,
          len TYPE i VALUE 1,
          count TYPE i VALUE IS INITIAL,
          iflag TYPE i VALUE IS INITIAL,
          iflag1 TYPE i VALUE 0.
    DATA :pr_id TYPE sy-repid,
    rt_extab TYPE slis_t_extab.
    INITIALIZATION.
      pr_id = sy-repid.
    AT SELECTION-SCREEN OUTPUT.
    <b>  IF rad1 = 'X' AND SY-MANDT = <client 1></b>
        LOOP AT SCREEN.
          IF screen-group1 = 'G1' OR screen-group1 = 'G4'.
            screen-active = '1'.
            screen-input = 0.
          ELSEIF screen-group1 = 'G2'.
            screen-active = '0'.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      <b>ELSEIF rad2 = 'X'  and sy-mandt = <client 1></b>
        LOOP AT SCREEN.
          IF screen-group1 = 'G1'  OR screen-group1 = 'G4' OR screen-group1 = 'G3' OR screen-group1 = 'G5'.
            screen-active = '0'.
          ELSEIF screen-group1 = 'G2'.
            screen-active = '1'.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
      IF mtr = 'X'.
        LOOP AT SCREEN.
          IF screen-group1 = 'G1'.
            screen-input = 1 .
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
      IF sloc = 'X'.
        LOOP AT SCREEN.
          IF screen-group1 = 'G4'.
            screen-input = 1 .
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
    clear sy-ucomm.
    iflag = 1.
    endif.
    regards
    ravish
    <b>plz dont forget to reward points if helpful</b>

  • Select value depending to condition

    I need to assign a value to a query select field depending on a condition from another select field.  Please tell me that this could be posible to do within the Query Manager on SAP B1.  If so, could you help me with this?
    Thanks in advanced,

    Rodney,
    This can be achieved using the case function in SQL.  You can lookup CASE contruct in the SQL help files.  I will give you a small example below for your understanding.
    SELECT T0.DOCNUM, T0.DOCDATE, T0.CARDCODE, CASE WHEN T0.SLPCODE = -1 THEN NULL ELSE T1.SLPNAME END
    FROM ORDR T0 INNER JOIN OSLP T1 ON T0.SLPCODE = T1.SLPCODE
    In the above sample SQL, I am checking the value of the Sales Person code on the Sales Order and if it is -1 (-No Sales Employee-), I am printing blank. 
    Regards
    Suda

  • Update Styles not working, select all uses of style missing

    Two more things tha I use often are missing from 5.0.
    1. If you want to select all uses of a heading and then change attributes, it seems that you cannot.
    2 When a style appears with a asterisk it means there is an override and you have the option to click on Update Style.  Doesn't work.
    Okay, so three useful things absent in 5.0 and they bugged me in the first 10 minutes (counting the missing Outline View).  Otherwise it looks like a fabulous and simplified update. 
    One of th best additions is that Comments now track between the Desktop and iPad. Yayee! I don't have to use foot notes any more.

    I would like to see "select all uses of style" make a comeback. That was an easy way to delete things quickly.
    For #1, you can change attributes for one instance of the heading and then update the style. This will apply the changes to all instances of the heading. Which leads to...
    #2. I was able to update my styles by going here:
    Is that not working for you?

  • Why CK11N consider Scrap even if activity formula isn't quantity dependent?

    Dear guru ,
    i have a finished material that have a component in the bill of material with a component scrap. This component is a semi-finished material that have an operation in the routing with a work center with a formula key for the calculation of costs of the work center’s activity type not dependent of quantity , it’s only dependent of time machine.
    If I run CK11N for this finished material and I see the Material Cost Estimate with Quantity Structure View , for the resources involved the system consider the quantity and value added of component scrap in percent.
    But the formula key for the calculation of costs of the work center’s activity type not depend of quantity , why CK11N consider the component scrap even if activity formula is not quantity dependent ?
    Thanks for your help

    Hi ,
    System will include the cost Component scrap while doing cost estimate.
    Since u have assigned  component scrap % at BOM, u are declaring , that much amount of extra components are  need to produce FG & cost of same will be included in production also.
    Without qty dependent , how system will calculate the Total time for the operation.
    For Ex,
    Operation qty = 10 nos
    Process time = 1 hr / Nos
    Activity cost for process = 100 USD/ Hr.
    Total activity cost for that operation is = 1 * 10* 1000 = 10000 USD.
    Letus know the costing  formula u have  assigned for Activity type at workcenter.
    Pradeep

  • Selecting particular range of style using script

    HI All,
    Can anyone suggest me that how we can select the range of text using script.
    I am having some different para styles say for eg., PS1, PS2, PS3, PS4...........
    I may applyed these styles in some jumping order but except PS1, now I want to select paragraphs with applied style PS1 to stop before the next appearence of PS1 style.
    Like: In a document Para 1, 10, 14, 25 were applied with PS1, so the selection should go in the way like 1-9, 10-13, 14-24 and so on
    Regards,
    love_all

    "The" index of a paragraph is nothing special, it's the index of the first character of that paragraph inside its parent story. In particular, it does NOT tell you "this is the 5th paragraph" or something like that.
    This is because "Paragraph" is an artificial construct inside "Text", not a truly existing first class object. Same as "Line", "Word", "Character", and indeed, any text selection at all.
    Since you already have a "found text" array, "the index" of the nth entry's paragraph -- with the constraint described above -- can be simply found by using foundText[n].paragraphs[0].index (the index of the first character of your foundText is foundText[n].index).
    If you DO need to know the nth number of the paragraph, search this forum. I think Peter Kahrel answered to a post to answer that exact question.

  • Select boxes dependent on each other?

    Hi is there a way to use selectboxes / textfileds that depend on each other.
    select box 1. reads from database names
    select box 2. this one is filled when a chiose from box 1 is selected.
    (after a database question based on the result in box 1)
    inupttextfields 1 and 2 are filled after a new database request based on the choise in select box 2.
    pleased with different kind of answers. without javascripts adn also with use of
    javascripts. (Im not so used with javascripts)
    Plese give me a simple example and not just a link.
    thanks.

    Plese give me a simple example and not just a link.There is no simple example, because this is highly specific on your webpage implementation and database. search google for "javascript dynamic select box", or "javascript dynamic option lists". That should give you some examples.

  • JTextPane, Selecting Text and Applying Styles

    Hello,
    Anyone encounter this situation? I have a mini word processor application that I have written using the RTFEditor kit and a JTextPane. To change style, e.g bold, font size, font face, etc, one can select text and then click a button or select a menu item. That part works fine. The styles are primarily changed by using the Action classes provided in the javax.swing.text.* package.
    The problem is, that if a user selected text of more than one style, all of the text is automatically converted to the style of the first part of the text selected, without the user even eanting to change ANY style just yet.
    If anyone knows why this might be happening I would surely appreciate it.
    Thanks,
    acal

    Solution to the style appling problem...
    public void actionPerformed( ActionEvent e )
            if (flag) return;
            if(e.getSource() == boldButton)
                SimpleAttributeSet attrs = new SimpleAttributeSet();
                attrs.addAttribute(StyleConstants.Bold,boldButton.isSelected());
                applyStyleToSelection(attrs);
                editorPane.grabFocus();
                return;
    public void applyStyleToSelection(AttributeSet attrs)
            int start = editorPane.getSelectionStart();
            int end = editorPane.getSelectionEnd();
            DefaultStyledDocument doc = (DefaultStyledDocument) editorPane.getDocument();
            doc.setCharacterAttributes(start, end - start, attrs, false);
            StyledEditorKit styled = (StyledEditorKit) editorPane.getEditorKit();
            MutableAttributeSet mas = styled.getInputAttributes();
            mas.addAttributes(attrs);
        }Filipi Silveira
    [email protected]

  • Dynamic select list dependency

    Hello,
    I want to have two select lists populated dynamically by a query, where contents of one list depend on the choice made in the other list.
    For example I have tables CATEGORY (ID, NAME) and SUBCATEGORY (ID, NAME, CAT_ID). I created one List of Values that Category select list is based on: "select name d, id r from category order by 1". This alone works fine.
    Now for Subcategory select list I created another List of Values: "select name d, id r from subcategory where cat_id = :CAT_ID order by 1". The where clause is just my guess and it doesn't work (select list is empty). How do I pass the value selected in my first select list as a parameter for the second one?
    Nikolai

    can you take a look to my response to the second question at...
    Pop List and Developer Toolbar
    ...and let us know if you have any questions?
    thanks,
    raj

  • Can't select newly created css styles

    Help!
    After I have created a new css style, there is no way that I
    can apply it.
    The new style appears on the right-hand-side under Design -
    CSS Styles, but I can't select it in the Properties - Styles drop
    box neither if I select the text - right click - CSS Styles. It's
    not there......
    What am I doing wrong?

    What is your new style's selector, e.g,
    #foo, or .this, or what?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Slumpsum" <[email protected]> wrote in
    message
    news:ee6cfg$sg5$[email protected]..
    > Help!
    >
    > After I have created a new css style, there is no way
    that I can apply it.
    > The new style appears on the right-hand-side under
    Design - CSS Styles,
    > but I
    > can't select it in the Properties - Styles drop box
    neither if I select
    > the
    > text - right click - CSS Styles. It's not there......
    >
    > What am I doing wrong?
    >
    >
    >

  • Select list dependent on textbox

    Hi,
    I've a requirement to put together a cascading select list. The only exception is that the first select list is a textbox instead of a select list. How to create a select list that is dependent on the textbox? Is there a way to do this in APEX without resorting to AJAX? Is there an example out there?
    Thanks

    Hi
    Try this courtesy of Carl Backstrom...
    Create an hidden item called TEMPORARY_ITEM.
    Try this for the js:
      function get_AJAX_SELECT_XML(pThis,pSelect){  
         var l_Return = null; 
         var l_Select = $x(pSelect); 
         var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=ap_str_typ_lov',0);
    get.add('TEMPORARY_ITEM',pThis.value);
         gReturn = get.get('XML'); 
         if(gReturn && l_Select){ 
             var l_Count = gReturn.getElementsByTagName("option").length; 
             l_Select.length = 0; 
             for(var i=0;i<l_Count;i++){ 
                 var l_Opt_Xml = gReturn.getElementsByTagName("option");
    appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'), l_Opt_Xml.firstChild.nodeValue)
    get = null;
    function appendToSelect(pSelect, pValue, pContent) { 
    var l_Opt = document.createElement("option");
    l_Opt.value = pValue;
    if(document.all){/* why is ie different ask bill */ 
    pSelect.options.add(l_Opt);
    l_Opt.innerText = pContent;
    }else{ 
    l_Opt.appendChild(document.createTextNode(pContent));
    pSelect.appendChild(l_Opt);
    And then amend your On Demand process to this:DECLARE
    l_counter NUMBER;
    l_o_name VARCHAR2(2000);
    BEGIN
    OWA_UTIL.mime_header('text/xml', FALSE);
    HTP.p('Cache-Control: no-cache');
    HTP.p('Pragma: no-cache');
    OWA_UTIL.http_header_close;
    HTP.prn('<select>');
    FOR rec IN (select str_typ_desc from vw_dime where street_name like upper(:P7_STREET_NAME) || '%'
    ORDER BY 1)
    LOOP
    HTP.prn('<option value="' || rec.str_typ_desc || '">' || rec.str_typ_desc || '</option>');
    END LOOP;
    HTP.prn('</select>');
    END;
    Then change your javascript call to this...onKeyUp="get_AJAX_SELECT_XML(this, 'P7_STREET_NAME')"
    Let me know How you get on.
    Cheers
    Ben                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Decimal places in quantity depending on currency

    hi
    i m doing an alv list display in which i need to display a quantity field with 3 decimal places for some currencies, but for one particular currency such as 'AED'
    that field should display only 2 decimal places in the output.
    regards
    Zarina

    Hi Zarina,
    Populate decimals_out with 2 for this field while building the fieldcatalog.
      g_t_fieldcat-decimals_out = 2.
    Note: don't declare the field as currency which will overwrite above setting.
    i.e., don't use g_t_fieldcat-cfieldname in this case.
    ==============================================
      g_t_fieldcat-seltext_s =  'USD Equi'.
      g_t_fieldcat-seltext_m =  'USD Equi'.
      g_t_fieldcat-seltext_l =  'USD Equivalent'.
    g_t_fieldcat-cfieldname = ' '.
      <b>g_t_fieldcat-decimals_out = 2.</b>
      g_t_fieldcat-just      =  'R'.
      modify g_t_fieldcat index zindx.
    ==============================================
    Hope this helps you.
    Regards,
    Vicky
    PS: Award points if helpful

Maybe you are looking for

  • Need info on the approach for building admin forms for authoring

    Hi, I have a requirement to store the content in the content repository. I have two levels of data to be stored i.e. continents & countries; both continents & countries have their individual properties; continent contains countries node. I need to bu

  • Black screen with nvidia-346

    I'm trying to get my nvidia 940m working. I installed the nvidia-346 AUR package, since this is the first driver that supports the 940m. The kernel module is loading lsmod | grep nvidia ⏎ nvidia 8347648 2 drm 282624 13 i915,drm_kms_helper,nvidia i2c_

  • Return process with credit note.

    Hi Experts, I have done a sales order with quantity 9 pcs, delivered and PGI  with quantity 9 pcs and also invoiced the customer for 9 Pcs. Now customer has returned 4 pcs, in this case he has to only pay for 5 pcs. I have done return process 1. Crea

  • Transfer of Data from PSA to ODS

    Dear All,        I have been pulling data from R/3 to BW.I go to the infosource and schedule with data only to PSA.First to PSA and from PSA right click and "update immediately to ODS". When I choose that option the the data would begin to load into

  • Creating Multiple records from 1 record

    Very new to OWB and running into a problem. I have data from a reservation system that stores an arrival and departure date for a reservation. I need to be able to create a separte record for each day of the stay in order to simplify reporting. In ad