Help in using APEX_ITEM.RADIOGROUP!

Hi frenz,
I have 4 rows in the table employees,and the rows changes dynamically as the user keeps adding the users.I also have a Grade table where Grades named A B and C are stored.My requirement is,In the UI when i display the employees,each row of employee should display the grades acoordingly in the same row
say
output on the screen should be
Jeffry radiobutton1 A radiobutton2 B radiobutton3 C
Jessica radiobutton1 A radiobutton2 B radiobutton3 C
Eliza radiobutton1 A radiobutton2 B radiobutton3 C
Joe radiobutton1 A radiobutton2 B radiobutton3 C
can anyone help me hw to do this?
I'm using
APEX version - 4.0.0.00.46
DB version and edition - 10.2.0.1.0
Web server architecture - APEX listener
Browser - IE
Theme -20
Thanks in advance

Already my page(pl/sql) has a region souce
DECLARE
cursor itemCur is
select CATEGORY_ID,
PARAMETER_ID,
PARAMETER_VALUE,
MAX_MARK,
IS_ACTIVE,
ID,
TEST_NUMBER from MES_CATEGORY_PARAMETERS;
BEGIN
htp.p('<table>');
htp.p('<tr>');
for aRow in itemCur
LOOP
htp.p('<tr>');
htp.p('<td>'||APEX_ITEM.hidden(1,aRow.PARAMETER_ID)||aRow.PARAMETER_VALUE||'</td>');
htp.p('</tr>');
END LOOP;
htp.p('</tr></table>');
END;This displayes me 12 parameters on the page
My page luks like dis,,
Parmeters
The names of all classes should start with upper case letters
The names of all members of classes should start with lower case letters
The names of all local variables and parameters should start with lower case letters
All the names should be in camel case format
The names of all constants should be in upper case
All source code files (.java, .xml etc) should contain proper comments/javadocs
The base exception class has been defined
There is an abstraction in exceptions
There is a funneling of exceptions across the layers
The main flow has been developed as per the specifiations
The exception and alternate flows have been developed as per the specifiations
The business rules and data validations have been devleloped as per the specifiations
Check the variable names
Now i have grades A,B,C in my grades table.and I want to display the grades for each of the parameter row so that user can rate the parameter by selecting grades.radio button along with grades should get displayed beside the parameter.Can I achieve this using APEX_ITEM.RADIOGROUP?How?
Thanks

Similar Messages

  • Is this possible using APEX_ITEM.RADIOGROUP

    Hi,
    Just wondering if this can be achieved using APEX_ITEM.RADIOGROUP, i.e using radio buttons that gives the user three options:
    <br><br>
    Clothing/Size     S           M           L
    ===========================
    T-Shirt-Red        O           O           O
    <br>
    etcCan someone please provide me if possible an example of achieving this.
    <br><br>
    Thanks.<br>
    Tony.

    1. Create a text item for the main heading (Clothing / Size etc). You may want to embed some HTML to change colours, underline etc.
    2. Create a radiogroup for each item as follows;
    Label = T-Shirt-Red , etc
    ELEMENT
    Form Element Options Attributes => style="padding-left:100px" (assuming spacing of 100 px)
    LIST OF VALUES
    Columns => 3
    Display Null => No
    List of values definition => STATIC2:;S,;M,;L (assuming you want to pass back S, M or L)
    You may need to muck around with the heading and spacing but this should do the trick

  • Apex_item.radiogroup

    Hi,
    I need help regarding the apex_item.radiogroup.
    I am fetching the data from table in report region. There is one status column which has either 'A' active or 'I' inactive. corresponding to one unique record we can have multiple subrecord and
    only one is active. In the report region i am trying to show the active and inactive radiobutton per row. and if select any row as active in the report other rows radiobutton should be inactive so once i hit the update button i don't have to think which all other went to inactive.
    my query looks like
    select apex_item.hidden(10, primary_key) || record,
    apex_item.radiogroup(3, h.status,'A', 'Active')||apex_item.radiogroup(3, h.status, 'I', 'Inactive'),
    case when rec_flag = 'N' then 'NO' else 'YES' end "flag"
    from table
    If there is 4 rows selected based on this query only one row radio button is highlighted.
    I am new to apex and need your help.

    Hi,
    For the select list issue - the fourth parameter of the APEX_ITEM.SELECT_LIST function allows for attributes, so you can do:
    apex_item.select_list(3, h.status, 'Active;A,Inactive;I','onchange="javascript:myfunction(this);"') "Status"Then you create a function called myfunction(ss) that is triggered by the value of the select list changing - onclick is not used here. As we are passing "this" into the function, we can loop through all select lists, except for the current one and change their values where needed:
    function myfunction(ss)
    if (ss.value == 'A')
      var sLists = document.getElementsByName('f03');
      var k;
      if (sLists)
       for (k = 0; k &lt; sLists.length; k++)
        if (sLists[k] != ss)
         sLists[k].value = 'I';
    }So, as long as we change the current list to A, then we change all the others to I.
    For the radio buttons, if you need to use two buttons per row, you should have a radiogroup that is for each row separately. Your use of "pk_table" for the Inactive button should also be used for the Active button. When the user clicks on either Active or Inactive, you would then have to loop through all the radiogroups and set the appropriate value.
    To get to all the buttons, you have to do something like:
    var x = document.getElementsByTagName("INPUT");
    var k;
    if (x)
    for (k = 0; k &lt; x.length; k++)
      if (k.type == 'RADIO')
       do something herre
    }Andy

  • Apex_item.radiogroup using an LOV in a manual tabular form

    I'm on APEX 4.0.0.00.46 and I'm sure there must be an obvious solution that I'm missing here, but I'm having a problem setting up an apex_item.radiogroup on a manual tabular form. This is the basic query that I'm using:
    select apex_item.radiogroup(37,my_field) as my_field
    from my_table
    When I use the above query as my Region Source, it compiles fine. However, it seems as though the query won't pull in the value that currently exists in the table unless I set the Column Attribute called 'Display As' for the field to 'Standard Report Column'. When I do this, it seems to remove the capability to incorporate a LOV into the radio group. I'm attempting to incorporate a query like this into the radiogroup:
    select 'YES' d, 'Y' r
    from dual
    UNION ALL
    select 'NO' d, 'N' r
    from dual
    So, to recap, I can set up a Radio Group (query based LOV), but if I do, the query of the table will not pull in the current value from the table. If I change the 'Display As' Column Attribute to 'Standard Report Column', I can no longer incorporate the LOV. Please help if you have any ideas.

    I am not 100% sure what you are trying to do but I think I am close. Try using
    SELECT apex_item.radio_group_from_query
              (37,
               my_field,
               'SELECT ''YES'' d, ''Y'' r FROM dual
                UNION ALL
                SELECT  ''NO'' d, ''N'' r FROM dual'
              ) AS my_field
      FROM my_tableDenes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    http://apex.oracle.com/pls/otn/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • Help converting 3 apex_item.checkbox into one apex_item.radiogroup?

    Hi Everyone,
    I am trying to simplify a tabular form based on a collection.  Currently, I have three checkboxes with javascript behind the scenes so that when one checkbox is selected, the others are rendered null and a flag is set.  I would like to eliminate all that processing and just use a radiogroup.   I am a little uncertain how to proceed.
    My three checkboxes are c021 finsattached, c022 finsNotAttached, and c023 FinsUnknown.   Dependent on the checkbox selected, the value will be stored in a 4th field called c020 HMS_FLAG.
    If c021 is checked, then c020 = Y
    if co22 is checked, then c020 = N
    if c023 is checked then c020 = U
    The current selection is:
    select....
    decode(c050,'Y',apex_item.checkbox(21,'Y','id="f21_'||seq_id||'" style="background-color:#FBEC5D; " onClick="alterYes('||seq_id||');" onKeyPress="alterYes('||seq_id||');"',c021),'N','N/A') FinsAttached,
    decode(c050,'Y',apex_item.checkbox(22,'N','id="f22_'||seq_id||'" style="background-color:#FBEC5D;" onClick="alterNo('||seq_id||');" onKeyPress="alterNo('||seq_id||');"',c022),'N','N/A') FinsNotAttached,
    decode(c050,'Y',apex_item.checkbox(23,'U','id="f23_'||seq_id||'" style="background-color:#FBEC5D;" onClick="alterUnk('||seq_id||');" onKeyPress="alterUnk('||seq_id||');"',c023),'N','N/A') FinsUnknown,
    So far, to convert it to a radiogroup I have:
    decode(c050,'Y',apex_item.radiogroup(20,'Y','Fins Attached','N','Fins NOT Attached','U','Unknown','id="f20_'||seq_id||'" style="background-color:#FBEC5D; );"',c020),'N','N/A') HMS_FLAG
    but I am really uncertain of this.
    thanks for your help!
    Karen

    Only checked checkboxes are submitted, so there are only <tt>wwv_flow.g_f09</tt> entries for checked rows: the subscripts do not correspond to rows in other <tt>wwv_flow.g_fnn</tt> associative arrays. Use checkbox values that allow the source row to be determined in your process, such as the PK for a corresponding database row. The existence of a entry with this value in the array indicates a checked checkbox.

  • Store APEX_ITEM.RADIOGROUP value into the database!

    Hi All,
    I am using the following query to display questions from a table. Does anyone know how we can insert the value of APEX_ITEM.RADIOGROUP(if it is a radiogroup with static LOV ie. Static2: very poor;1,good;2,very good;3,excellent;4) into the database.
    select question_id,
    question_desc,
    APEX_ITEM.RADIOGROUP(1) as rating
    from table_name
    Thanks,
    Parveen Sehrawat

    Also tried it this way:
    function reviewerID() {
    var reviewer =html_RadioValue('f01');
    if (reviewer == 1){
    html_GetElement('P1_CUSTOMER_ID').value = 1;
    if (reviewer == 2){
    html_GetElement('P1_CUSTOMER_ID').value = 2;
    if (reviewer == 3){
    html_GetElement('P1_CUSTOMER_ID').value = 3;
    if (reviewer == 4){
    html_GetElement('P1_CUSTOMER_ID').value = 4;
    if (reviewer == 5){
    html_GetElement('P1_CUSTOMER_ID').value = 5;
    its clumbsy but i thought it would do the job... am still gettin the same error trying it this way though....
    l_This has no properties
    l_Selects = l_This.getElementsByTagName('SELECT');
    Help from anyone much appreciated!!

  • Ajax Autocomplete Tabular does not work using apex_item.text in SQL Query.

    Hello,
    Is it possible to use the search function which is used in, Dennis Kubicek example, ENAME topic Ajax Autocomplete Tabular
    in a sql query using apex_items?
    Query line :
    , apex_item.text(17,xp.part_nr,null,null,'onfocus="f_register(this);" autocomplete="off"') PART
    At first I followed the example by adding 'onfocus="f_register(this);" autocomplete="off" in the element attributes in the report field.
    This didn't work... so tried to add the it in the attirbutes parameter of the apex_item.
    But this still doesn't work. No errors are given, it does not respond.
    Could somebody please help me?
    Thx!
    Astrid

    Well, I'm trying to take this one step further, but I seem to be having some difficulty.
    I'm trying to make a Filter screen to create a dynamic where clause filter screen.
    This is a page I made with Popup LOVS, just to show you my goal (now trying to use autofilters)
    http://apex.oracle.com/pls/otn/f?p=29989:5
    I have a table on my system that tells you where the field is, and I'm using that to get the table (didn't want to change the javascript, so I pass in a static value).
    This is the javascript code I used
    <pre>
    <script language="JavaScript" type="text/javascript">
    function f_register(p_this,p_name)
    var p_registered = $x('P5_ITEM_ID').value;
         var p_this_name = $x(p_this).id;
    //alert(p_this_name);
    if (p_registered != p_this_name)
    register(p_this_name, "COSTING_M", p_name, "blue", "red");
    $x('P5_ITEM_ID').value = p_this_name;
    </script>
    </pre>
    This is my query
    <pre>
    select column_name || apex_item.hidden(1,column_name) Col_name,
    apex_item.SELECT_LIST_FROM_lov(2,'=','OPERATOR') OPERATOR,
    apex_item.text (3,
    NULL,
    20,
    200,
    'onfocus="f_register(this,''' || column_name || ''');" autocomplete="off"',
    'f3_' || '#ROWNUM#',
    NULL
    ) value,column_id
    from user_tab_cols
    where table_name = 'COSTING_M'
    ORDER BY ROWNUM
    </pre>
    and here is my on-demand process
    <pre>
    declare
    TYPE CurTyp IS REF CURSOR;
    v_row varchar2(4000);
    rec CurTyp;
    V_TABLENAME NKW.UTFIELD_M.TABLE_NAME%TYPE;
    begin
    BEGIN
    SELECT TABLENAME INTO V_TABLENAME
    FROM NKW.UTFIELD_M
    WHERE FIELD_NAME = :TF_SL_COLUMN;
    EXCEPTION WHEN NO_DATA_FOUND THEN RETURN; END;
    :TF_SL_SEARCH := replace(:TF_SL_SEARCH, '&amp;','&');
    :TF_SL_SEARCH := replace(:TF_SL_SEARCH, '&lt;','<');
    :TF_SL_SEARCH := replace(:TF_SL_SEARCH, '&gt;','>');
    :TF_SL_SEARCH := replace(:TF_SL_SEARCH, '&quot;','"');
    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('<rowset>');
    open rec for
    'select distinct ' || :TF_SL_COLUMN || ' ' ||
    'from NKW.' || V_TABLE_NAME || ' ' ||
    'where '||:TF_SL_COLUMN||' like :1||''%'' ' ||
    'and rownum < 100 ' ||
    'order by '||:TF_SL_COLUMN
    using :TF_SL_SEARCH;
    loop
    fetch rec into v_row;
    exit when rec%NOTFOUND;
    htp.prn('<row>' || htf.escape_sc(v_row) || '</row>');
    end loop;
    htp.prn('</rowset>');
    end;
    </PRE>
    I made some slight mods to make the table dynamic from my source table (this is to grab master files when they exist and not to when they don't).
    I get my select list, but it's blank on all fields, any suggestions?
    thanks,
    Scott

  • APEX: Store Values of fields which are created dynamically(Using APEX_ITEM)

    Hello All,
    I am creating one application in which i create one report with dynamic fields(using APEX_ITEM Package) and non-dynamic fields(Taking from table). Now i want to store the value of the dynamic fields into table. So please help me on that.
    I want to store value of APEX_ITEM.TEXT fields in a table, but i don't have names of it so how to store value in table?
    select APEX_ITEM.CHECKBOX2(1,HC.S_ID) "SELECT",
    HC.ACT_NAME,HC.REBOOT_DATE,
    APEX_ITEM.TEXT(2,00) "Start Time",
    APEX_ITEM.TEXT(3,00) "End Time",
    APEX_ITEM.TEXTAREA(4,'Enter Remarks',2,40) "Remarks" FROM HWC_CHK_SCHEDUELE HC;
    Thanks,
    Jiten

    Let me clarify a finer point. The APEX_ITEM API provides for value , which can come from a table.
    You need to add APEX_ITEM to your columns selected from the table as well.
    Once you have done that then the p_idx value , the first numeric, in the APEX_ITEM, is accessing in DOM as well as PL/SQL.
    In DOM, for JavaScritps, the p_idx 1 becomes f01, 2 becomes f02 ,etc.
    In PLSQL the same are APEX_APPLICATION.G_F01, APEX_APPLICATION.G_F02, etc.
    Hope that explains what you need to do.
    select APEX_ITEM.CHECKBOX2(1,HC.S_ID) "SELECT",
    APEX_ITEM.TEXT(2,HC.ACT_NAME) "ACT_NAME",
    APEX_ITEM.DATE_POPUP(3,HC.REBOOT_DATE) "REBOOT_DATE",
    APEX_ITEM.DATE_POPUP(4,SYSDATE) "Start Time",
    APEX_ITEM.DATE_POPUP(5,SYSDATE) "End Time",
    APEX_ITEM.TEXTAREA(4,'Enter Remarks',2,40) "Remarks"
    FROM HWC_CHK_SCHEDUELE HC  /* no semi colon in SQL; */In the OnSubmit process
    FOR I IN APEX_APPLICATION.G_F02.COUNT LOOP
      -- LOGIC HERE.
    END LOOP;Note I have not used Check box F01 in the above code. Look up the documentation for checkbox in Referencing Arrays. Checkbox behaves different as compared to other item types.
    BTW, why are you not using Tabular form for this?
    Regards,
    Edited by: Prabodh on May 9, 2012 5:32 PM

  • Apex_Item.radiogroup in a Tabular Form (Update Only, no Insert)

    Hi,
    I'd like to use a radiogroup on a tabular Form. The Form will modify only existing records.
    I've seen some more elaborate examples for Tab Forms that allow Insert.
    But I am trying to use the APEX_Item.radiogroup function for an example like:
    "Select Chairperson_Name, Approve_Status FROM Chairperson_Approval"
    The Approve_Status column can be 'A' for Accept, or 'R' for Reject, and is the only updateable column in the Tabular Form.
    So I should be able to create a Tabular Form (for Update Only) on the table Chairperson_Approval with the wizard.
    Then I want to be able to go into the Source and change the SELECT statement to something like:
    "Select Chairperson_Name, APEX_Item.radiogroup(1,approve_status,.....) FROM Chairperson_Approval"
    and then let the automatic APEX processing (generated by the wizard) do the rest. Right? Can
    anybody give me an exact example for APEX_Item.radiogroup. My documentation is not clear enough on this function.
    Thank you very much, in advance.
    Carol

    Hi Andy,
    Why do you get & set TEST attribute of the radiobutton?
    What is a TEST attribute?
    getAttribute("TEST") == 'Y')
    setAttribute("TEST","Y");So I was thinking I should incorporate this toggle me function with my radiobutton and have the following inside the toggleMe function.
    $x(''P24_SECONDARY_TASK'').value=' || ad.task_id || '"')
    {code}
    Am I right?
    Cheers
    -Joel                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Storing the value of apex_item.radiogroup!

    Hi All,
    I am using an APEX_ITEM.RADIOGROUP api to display the rating from 1 to 5.
    In order to store the value of radio button selected, I am using a textbox item.
    e.g.
    P2_ques_1 = rating value from 1-5( coming from radio group)
    P2_ques_2 = rating value from 1-5
    Now I want to save the value of P2_ques_1... into the database through a loop.
    for i in 1..4 loop
    l_rating := :P2_QUES_||i;
    INSERT INTO org_feedback(feedback_id,question_id,rating,org_contact_id)
    VALUES(ORGFEEDBACKSQ.NEXTVAL,i,l_rating,:P2_CONTACT_ID);
    end loop;
    The above loop is storing the value of "i" instead of values of : P2_QUES_1,: P2_QUES_2....
    Is there any way or suggestion I can achieve this?
    Thanks,
    - Parveen Sehrawat

    I can't catch you.
    Let me explain what i want to do...
    I have radio button in forms as well as in reports.
    In FORMS i created a RADIO GROUP using STATIC LOV
    Like,
    STATIC:GOOD;3,NOTBAD;2,BAD;1
    So at runtime i can easily get this radio group values.
    In REPORTS i created RADIO GROUP using SELECT QUERY
    Like,
    with t as(
    select 'problem_sol' as others, 1 as num from cand_performance
    union
    select 'communication' as others, 2 as num from cand_performance
    union
    select 'attitude' as others, 3 as num from cand_performance)
    select others,
    apex_item.radiogroup(num) as good,
    apex_item.radiogroup(num) as notbad,
    apex_item.radiogroup(num) as bad
    from t
    Now i want to define values for those radio button like what i define in STATIC LOV radio buttons and i want to know how to get the selected value when user submit the page... Again i'm telling i have radio button in REPORTS.
    Edited by: Nagappan_19 on May 20, 2013 4:48 AM

  • Apex_item.radiogroup in updateable Report

    How can i build up an updateable Report with a radiogroup created by apex_item.radiogroup?
    i know the syntax like
    APEX_ITEM.RADIOGROUP (1,deptno,'20',dname)
    but i wanna have 5 different options in 1 radiogroup.
    How can i manage this?
    thx so far
    P.S.: I know that you can define a column to be a radiogroup but in my case it must defined with the apex_item package.

    Hi,
    Have a look at: Re: User Radiogroup in Tabular Form - there are several methods that you could use - the details for each are shown in the app pages themselves rather than the thread
    Andy

  • Need help in using FM BAPI_MATERIAL_SAVEDATA

    Gurus,
    I need help in using the FM BAPI_MATERIAL_SAVEDATA. The FM is returning a message that says "The field MARA-MEINS/BAPI_MARA-BASE_UOM(_ISO) is defined as a required field; it does not contain an entry".
    I have supplied the necessary details and yet the FM won't push through.
    If possible, please post sample codes.
    Below is my sample code:
    ===============================================
    REPORT  zmm_materialupload.
    eject
    $$******************************************************************************
    $$    TYPES
    $$******************************************************************************
    eject
    $$******************************************************************************
    $$    INTERNAL TABLES (custom structure
    $$******************************************************************************
    eject
    $$******************************************************************************
    $$    RANGES
    $$******************************************************************************
    eject
    $$******************************************************************************
    $$    FIELD-SYMBOLS
    $$******************************************************************************
    eject
    $$******************************************************************************
    $$    PARAMETERS & SELECT-OPTIONS
    $$******************************************************************************
    SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE text-001.
    *SELECT-OPTIONS: s_matnr FOR mara-matnr.
    SELECT-OPTIONS: s_mtart FOR mara-mtart.
    SELECT-OPTIONS: s_mbrsh FOR mara-mbrsh DEFAULT 'P'.
    SELECT-OPTIONS: s_werks FOR marc-werks DEFAULT '1000' OBLIGATORY.
    SELECT-OPTIONS: s_lgort FOR marc-lgpro DEFAULT 'OPSL' OBLIGATORY.
    PARAMETERS: p_path  LIKE rlgrap-filename DEFAULT 'C:\Documents and Settings\training_11\Desktop\Book4 (2ITEMS).txt' OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK 1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_path.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          field_name = 'P_FNAME'
        IMPORTING
          file_name  = p_path.
    eject
    $$******************************************************************************
    $$    START-OF-SELECTION
    $$******************************************************************************
    START-OF-SELECTION.
      PERFORM check_input.
      PERFORM get_file.
      PERFORM filter_input.
    PERFORM populate_tabs.
      PERFORM bapi_mat.
    eject
    $$******************************************************************************
    $$    FORMS
    $$******************************************************************************
    FORM bapi_mat.
      LOOP AT it_tab INTO wa_tab.
        CALL FUNCTION 'BAPI_MATERIAL_GETINTNUMBER'
          EXPORTING
            material_type    = wa_tab-mtart
            industry_sector  = wa_tab-mbrsh
            required_numbers = 1
          TABLES
            material_number  = it_matnr.
      ENDLOOP.
      LOOP AT it_matnr INTO wa_matnr.
        READ TABLE it_tab INTO wa_tab INDEX sy-tabix.
        wa_tab-matnr = wa_matnr-material.
        MODIFY it_tab FROM wa_tab INDEX sy-tabix.
      ENDLOOP.
      PERFORM populate_tabs.
      CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
        EXPORTING
         headdata                   = it_headdata
        clientdata                 = it_clientdata
        clientdatax                = it_clientdatax
        plantdata                  = it_plantdata
        plantdatax                 = it_plantdatax
        FORECASTPARAMETERS         =
        FORECASTPARAMETERSX        =
        PLANNINGDATA               =
        PLANNINGDATAX              =
        STORAGELOCATIONDATA        =
        STORAGELOCATIONDATAX       =
        valuationdata              = it_valuationdata
        valuationdatax             = it_valuationdatax
         WAREHOUSENUMBERDATA        =
        WAREHOUSENUMBERDATAX       =
        SALESDATA                  =
        SALESDATAX                 =
        STORAGETYPEDATA            =
        STORAGETYPEDATAX           =
        flag_online                = ' '
        flag_cad_call              = ' '
        NO_DEQUEUE                 = ' '
        NO_ROLLBACK_WORK           = ' '
       IMPORTING
         return                     = it_return
       TABLES
         materialdescription        = it_materialdescription
         unitsofmeasure             = it_unitsofmeasure
         unitsofmeasurex            = it_unitsofmeasurex
         internationalartnos        = it_internationalartnos
         materiallongtext           = it_materiallongtext
         taxclassifications         = it_taxclassifications
         returnmessages             = it_returnmessages
        PRTDATA                    =
        PRTDATAX                   =
        EXTENSIONIN                =
        EXTENSIONINX               =
      IF sy-subrc = 0.
      ENDIF.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait   = 'X'
        IMPORTING
          return = it_return.
    ENDFORM.                    "bapi_mat
    *&      Form  GET_FILE
          text
    FORM get_file.
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
        EXPORTING
          text = 'Getting data from file...'.
      MOVE: p_path TO gv_file.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                = gv_file
          filetype                = 'ASC'
          has_field_separator     = 'X'
          read_by_line            = 'X'
        TABLES
          data_tab                = it_tab
        EXCEPTIONS
          file_open_error         = 1
          file_read_error         = 2
          no_batch                = 3
          gui_refuse_filetransfer = 4
          invalid_type            = 5
          no_authority            = 6
          unknown_error           = 7
          bad_data_format         = 8
          header_not_allowed      = 9
          separator_not_allowed   = 10
          header_too_long         = 11
          unknown_dp_error        = 12
          access_denied           = 13
          dp_out_of_memory        = 14
          disk_full               = 15
          dp_timeout              = 16
          OTHERS                  = 17.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    "GET_FILE
    *&      Form  check_input
          text
    FORM check_input.
    Material Type
      IF s_mtart-low IS INITIAL AND s_mtart-high IS INITIAL.
       s_mtart = 'IEQ'.
       s_mtart-low = 'ABF'.        "Waste
       s_mtart-high = 'ZTRD'.      "Stock Items
       APPEND s_mtart.
      ENDIF.
      IF s_mtart-low IS NOT INITIAL AND s_mtart-high IS INITIAL.
        MOVE: s_mtart-low TO s_mtart-high.
      ENDIF.
    Industry Sector
      IF s_mbrsh-low IS INITIAL AND s_mbrsh-high IS INITIAL.
       s_mbrsh = 'IEQ'.
       SELECT mbrsh
       FROM mara
       INTO TABLE it_mbrsh.
       s_mbrsh-low = wa_mbrsh-mbrsh.
       LOOP AT it_mbrsh INTO wa_mbrsh.
         s_mbrsh-high = wa_mbrsh-mbrsh.
       ENDLOOP.
       APPEND s_mbrsh.
      ENDIF.
      IF s_mbrsh-low IS NOT INITIAL AND s_mbrsh-high IS INITIAL.
        MOVE: s_mbrsh-low TO s_mbrsh-high.
      ENDIF.
    Plant
      IF s_werks-low IS INITIAL AND s_werks-high IS INITIAL.
        s_werks = 'IEQ'.
        s_werks-low = '1000'.
        s_werks-high = '2000'.
      ENDIF.
      IF s_werks-low IS NOT INITIAL AND s_werks-high IS INITIAL.
        MOVE: s_werks-low TO s_werks-high.
      ENDIF.
    Storage Location
      IF s_lgort-low IS NOT INITIAL AND s_lgort-high IS INITIAL.
        MOVE: s_lgort-low TO s_lgort-high.
      ENDIF.
    ENDFORM.                    "check_input
    *&      Form  Filter_input
          text
    FORM filter_input.
      SORT it_tab BY matnr mtart mbrsh werks lgort.
      LOOP AT it_tab INTO wa_tab.
       IF wa_tab-mtart NOT IN s_mtart.
         DELETE it_tab WHERE mtart NOT IN s_mtart.
       ENDIF.
       IF wa_tab-mbrsh NOT IN s_mbrsh.
         DELETE it_tab WHERE mbrsh NOT IN s_mbrsh.
       ENDIF.
        IF wa_tab-werks NOT IN s_werks.
          DELETE it_tab WHERE werks NOT IN s_werks.
        ENDIF.
        IF wa_tab-lgort NOT IN s_lgort.
          DELETE it_tab WHERE lgort NOT IN s_lgort.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    "Filter_input
    *&      Form  populate_tabs
          text
    FORM    populate_tabs.
      LOOP AT it_tab INTO wa_tab.
        MOVE: wa_tab-matnr TO wa_headdata-material,
              wa_tab-mbrsh TO wa_headdata-ind_sector,
              wa_tab-mtart TO wa_headdata-matl_type,
                       'X' TO wa_headdata-basic_view,
                       'X' TO wa_headdata-sales_view,
                       'X' TO wa_headdata-purchase_view,
                       'X' TO wa_headdata-mrp_view,
                       'X' TO wa_headdata-account_view.
             wa_tab-matkl TO wa_clientdata-matl_group,
             wa_tab-meins TO wa_clientdata-base_uom,
             wa_tab-groes TO wa_clientdata-size_dim,
             wa_tab-gewei TO wa_clientdata-unit_of_wt,
             wa_tab-ntgew TO wa_clientdata-net_weight,
                      'X' TO wa_clientdatax-matl_group,
                      'X' TO wa_clientdatax-base_uom,
                      'X' TO wa_clientdata-size_dim,
                      'X' TO wa_clientdatax-unit_of_wt,
                      'X' TO wa_clientdatax-net_weight,
             wa_tab-werks TO wa_plantdata-plant,
             wa_tab-ekgrp TO wa_plantdata-pur_group,
             wa_tab-prctr TO wa_plantdata-profit_ctr,
             wa_tab-werks TO wa_plantdatax-plant,
                      'X' TO wa_plantdatax-pur_group,
                      'X' TO wa_plantdatax-profit_ctr,
             wa_tab-werks TO wa_valuationdata-val_area,
             wa_tab-bklas TO wa_valuationdata-val_class,
             wa_tab-peinh TO wa_valuationdata-price_unit,
             wa_tab-verpr TO wa_valuationdata-moving_pr,
             wa_tab-stprs TO wa_valuationdata-std_price,
             wa_tab-xlifo TO wa_valuationdata-lifo_fifo,
             wa_tab-werks TO wa_valuationdatax-val_area,
                      'X' TO wa_valuationdatax-val_class,
                      'X' TO wa_valuationdatax-price_unit,
                      'X' TO wa_valuationdatax-moving_pr,
                      'X' TO wa_valuationdatax-std_price,
                      'X' TO wa_valuationdatax-lifo_fifo.
        APPEND wa_headdata TO it_headdata.
       APPEND wa_clientdata TO it_clientdata.
       APPEND wa_plantdata TO it_plantdata.
       APPEND wa_valuationdata TO it_valuationdata.
       MODIFY it_tab FROM wa_tab TRANSPORTING matnr.
      ENDLOOP.
    ENDFORM.                    "populate_tabs
    $$******************************************************************************

    Hai.
    check the below example.
    REPORT z34332_bdc_create_material .
    data: la_headdata type BAPIMATHEAD,
    la_clientdata type BAPI_MARA,
    la_CLIENTDATAX type BAPI_MARAX,
    la_return type BAPIRET2.
    data: i_materialdescription type table of BAPI_MAKT,
    wa_materialdescription like line of i_materialdescription.
    la_headdata-MATERIAL = '000000000000000004'.
    la_headdata-IND_SECTOR = 'M'.
    la_headdata-MATL_TYPE = 'FERT'.
    la_clientdata-BASE_UOM = 'FT3'.
    la_CLIENTDATAX-BASE_UOM = 'X'.
    la_clientdata-MATL_GROUP = '01'.
    la_CLIENTDATAX-MATL_GROUP = 'X'.
    wa_materialdescription = 'TEST'.
    append wa_materialdescription to i_materialdescription.
    clear: wa_materialdescription.
    CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
    EXPORTING
    headdata = la_headdata
    CLIENTDATA = la_clientdata
    CLIENTDATAX = la_CLIENTDATAX
    PLANTDATA =
    PLANTDATAX =
    FORECASTPARAMETERS =
    FORECASTPARAMETERSX =
    PLANNINGDATA =
    PLANNINGDATAX =
    STORAGELOCATIONDATA =
    STORAGELOCATIONDATAX =
    VALUATIONDATA =
    VALUATIONDATAX =
    WAREHOUSENUMBERDATA =
    WAREHOUSENUMBERDATAX =
    SALESDATA =
    SALESDATAX =
    STORAGETYPEDATA =
    STORAGETYPEDATAX =
    FLAG_ONLINE = ' '
    FLAG_CAD_CALL = ' '
    IMPORTING
    RETURN = la_return
    TABLES
    MATERIALDESCRIPTION = i_materialdescription
    UNITSOFMEASURE =
    UNITSOFMEASUREX =
    INTERNATIONALARTNOS =
    MATERIALLONGTEXT =
    TAXCLASSIFICATIONS =
    RETURNMESSAGES =
    PRTDATA =
    PRTDATAX =
    EXTENSIONIN =
    EXTENSIONINX =
    write: la_return-TYPE, ',', la_return-MESSAGE.
    clear: la_headdata, la_return, la_clientdata, la_clientdatax.
    regards.
    sowjanya.b.

  • Need help in using ActiveX to retrieve a VARIANT

    Need help in using ActiveX to retrieve a VARIANT.
    Variant is shown as       var{VT_Ul1,1}  in debug
    Using the following
    hr = CA_VariantGetShort (&var, &value);
    I get 0 for my answer instead of 1.
    Solved!
    Go to Solution.

    Answered my own question.
    VT_Ul1 is an unsigned char and not a short.

  • TS1506 I just updated my IOS to 7.1 and now I can't open Microsoft attachments - I used to always do it. Help - I use my iPad for work and now can't see any attachments.

    I just updated my IOS to 7.1 and now I can't open Microsoft attachments - I used to always do it. Help - I use my iPad for work and now can't see any attachments. I've tried opening straight into other apps and just get error messages, and I the mail preview there is just a grey screen telling me the file name and size. It worked fine until I did the IOS upgrade

    Troubleshooting apps purchased from the App Store
    http://support.apple.com/kb/TS1702
    Delete the app and redownload.
    Downloading Past Purchases from the iTunes Store, App Store and iBooks Store
    http://support.apple.com/kb/ht2519
     Cheers, Tom 

  • How to add a new record in updatable report using apex_item

    Hi,
    i am using an updatable report using the following select
    select
    aPEX_ITEM.POPUP_FROM_QUERY(2,emp_code,
    ' SELECT emp_surname, emp_code FROM hrm_employee ' ,null,null,null,null,null,'onchange="f_set_multi_items_tabular(this.value ''#ROWNUM#'''
    || ')"',null,null,null) PF_No,
    apex_item.text (32,
    NULL,
    80,
    100,
    'style="width:190px" ',
    'f11_' || '#ROWNUM#'
    ) Name,
    " REST_DATE",
    "REMARKS",
    from "roster"
    when i click on the button add row , only the column rest_date and the remarks are enable.
    why is the apex_item.text and apex_item_popup_from_query is disable ? and how i can make it enable.
    thanks
    regards
    jerry

    I could see that you are using the addRow() function to generate new blank row.
    I guess, this function(used by the builtin tabular form s) , identifies editable columns when they are marked so at the report column attributes.
    When you use apex_item API, it expects the columns to be standard report column and hence render the new rows as such.
    Some one from the development team might be able to give a better answer on that.
    As for avoiding this issue
    <li>One method , would be to define the columns editable(and display types) in report column attributes.
    <li> You can duplicate the last row using jQuery( *$('tr.highlight-row:last).after( $('tr.highlight-row:last).clone() )* ) and removing the field values, but events(for example datepicker) would remain attached to the original row , so it isn't very straightforward either.
    <li>If you want to use apex_item you would have to use a pseudo union to DUAL for generating a blank row and re-render the report either by a page load or a Dynamic Action. Sounds like a nice idea for a plugin.
    Now , if you want to add rows multiple times without saving them, then you would need to store the values in a collection at load and update the collection before adding the row.

Maybe you are looking for

  • Replaced hard drive can't install OSX

    A friend gave me an iBook G3 500 MgHz. I want it to coordinate with my iMac G5 to be able to use same Tiger software. I put in 640 MB of Ram, then installed OSX 10.4. Everything OK but the modem was broke and there was not much room on HD. So I bough

  • TIME_OUT Short Dump for SAPLDSVAS_PROC report - BPM activation

    Hello SOLMAN Experts, I'm trying to activate BPM Business Process Monitoring and getting the following short dump: Runtime Errors         TIME_OUT Short text      Time limit exceeded. What happened?      The program "SAPLDSVAS_PROC" has exceeded the

  • What do I do if I get a blue screen following boot up?

    I have a MacBook air pre - Yosemite OS. When I boot it up I get the apple badge and the loading circle and then it switches to a blue screen with the cursor in the top left. I have tried booting and holding D for the hardware test but I get no errors

  • OpenWorld 2007 - Industrial Manufacturing Focus

    Monday •2pm Configure to Order, Demand Driven Mfg •3:15 Solutions for Rapidly Growing Markets •4:45 Driving Innovation with PLM/Agile Tuesday •8am Single Global Process in Industrial Mfg •10:45 Change Mgmt & Best Practices •3:15pm Growing Revenues wi

  • PFAL missing data idoc

    Hi Data is being transferred from HR system to SRM system using PFAL but idocs in SRM system are getting failed with error ' missing data' detailed desc shows that infotype 1001 subtype A209 data is missing and Business partner cannot be created. How