Problem in Populating a listbox

hello everyone,
In my report prog, there are two parameters:
p_matno LIKE mara-matnr OBLIGATORY,
p_s_loc TYPE mard-lgort AS LISTBOX VISIBLE LENGTH 8.
When I input p_matno and press enter, the listbox P_S_LOC is populated with the corresponding values by triggering followingselect query:
SELECT lgort FROM mard INTO CORRESPONDING FIELDS OF TABLE it_storeloc WHERE matnr = p_matno AND werks = '1501'.
This works fine .. But now the condition is, if I dont select any value populated in the listbox and execute the prog(press F8), it should give an error msg ..
I wrote that piece of code as this in the STARTt-OF-SELECTION
IF P_S_LOC is INITIAL.
    message 'Storage Location Needs to be Entered.' type 'S'.
ENDIF:
but when the error message is generated, the values in the listbox go away and it becomes empty .. How can i retain this values in the listbox ??
Kindly help .. any input will be apprecitaed ..

Hey Venkat,
Here is the code:Do check out the comments beside every line for better understanding.
*---------for drop down list --------------------*
TYPE-POOLS: vrm.
DATA: it_val TYPE vrm_values,
      w_line LIKE LINE OF it_val,
      it_storeloc TYPE TABLE OF mard,
      w_storeloc LIKE LINE OF it_storeloc,
      v_name TYPE vrm_id VALUE 'P_S_LOC'.
// List of Parameters
PARAMETERS :  p_matno LIKE mara-matnr OBLIGATORY,
              p_werks LIKE marc-werks OBLIGATORY DEFAULT '1501',
              p_s_loc TYPE mard-lgort AS LISTBOX VISIBLE LENGTH 8,
              p_erdat TYPE vbap-erdat,
              p_netwr TYPE lips-netwr,
              p_qty TYPE i.
AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.  "Only Material Number is to be inputted. Other ields will be populated on the basis of material number.
    IF screen-name = 'P_ERDAT' OR screen-name = 'P_NETWR' OR screen-name = 'P_QTY'.
       screen-input = 0.
    ENDIF.
    MODIFY SCREEN.
  ENDLOOP.
AT SELECTION-SCREEN.
*  CLEAR : p_erdat,p_netwr,p_qty.
  PERFORM matnr_validation. "Validation of Material Number
  PERFORM fetch_mat_description. "Getting material description
  PERFORM fetch_data. "fetching data - here I have called the FM to populate the listbox
  PERFORM fetch_mrp_value. "Fetching MRP value nad putting it on the p_netwr
START-OF-SELECTION.
  PERFORM call_smartform. "here I'm calling the smartform
FORM fetch_data .
SELECT lgort FROM mard INTO CORRESPONDING FIELDS OF TABLE it_storeloc WHERE matnr = p_matno AND werks = '1501'.
  LOOP AT it_storeloc INTO w_storeloc.
    w_line-key = w_storeloc-lgort.
    APPEND w_line TO it_val.
  ENDLOOP.
  CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
      id                    = v_name
      values                = it_val
  p_erdat = sy-datum.
  clear: it_val.
ENDFORM.                    " FETCH_DATA
FORM Call_smartform
IF P_S_LOC is INITIAL.
*MESSAGE s000(zwm_msg) with 'Storage Location Needs to be Entered.'.
    message 'Storage Location is missing : Enter the material again and choose the storage location.' type 'S'.
ELSE.
  output_options-tdcopies = p_labels.
  CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
      formname           = v_layout
    IMPORTING
      fm_name            = v_form_name
    EXCEPTIONS
      no_form            = 1
      no_function_module = 2
      OTHERS             = 3.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
       WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
  CALL FUNCTION v_form_name
    EXPORTING
      control_parameters = control_parameters
      output_options     = output_options
            p_exp            = p_exp
    EXCEPTIONS
      formatting_error = 1
      internal_error   = 2
      send_error       = 3
      user_canceled    = 4
      OTHERS           = 5.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
             WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
ENDIF.
ENDFORM.                    "
Edited by: sohamshah on Sep 30, 2009 12:00 PM

Similar Messages

  • Problem in populating lookup values based on the lookup query from database

    HI all
    I have problem of population look-up values based on look-up query
    I am giving the details what i am trying
    I need to populate the values from the UD_LDAP_USR table into the field of UD_USRGRPC_NisNetTriple of type lookup
    i planned to set the properties of lookup as like this
    look up query as select UD_LDAP_USR_COMMON_NAME as NisNetTriple from UD_LDAP_USR
    ColumnNames as UD_LDAP_USR_COMMON_NAME
    Column captions as UD_LDAP_USR_COMMON_NAME
    Column width as 30
    Lookup Column Name as UD_LDAP_USR_COMMON_NAME
    But when i try to add ColumnName as wht i mentioned above i m getting invalid property exception,update failed
    I am not sure about that are we able to use other Connector table prefix with UD into the another processFrom
    Let me give update on this issue
    Urgent,struck my work here
    thanks
    Nagaraj

    Thanks for the reply raghav
    I tried but it was not working
    I gave like what u specified but no use
    It is throwing exception like set look-up query for the field
    Any one help me out on this issue
    Edited by: Nagaraju Chowdary on Jan 21, 2013 3:41 AM
    Edited by: Nagaraju Chowdary on Jan 21, 2013 3:42 AM

  • Problem pre-populating a combo box

    Hello,
    I am having problems pre-populating a combo box from a process.
    This combo box field exists in the OIM User Form and in another process form.
    Both combo box fields are populated from the same Lookup Definition: Lookup.Jazztel.TipoDeDocumento which looks like this:
    Code Key Decode
    1      DNI (NIF)
    2     Pasaporte
    4     Visado
    6     Nº Identificación de Extranjero
    9     C.I.F.
    I've tried these methods to pre-populate the combo box:
    * Using an adapter with a SET VARIABLE Logic Task (this adapter returns the code key that is selected in the OIM User form).
    * Using an adapter that returns the decode field from the code key and pass it to the Process combo box.
    In these cases, the process form combo box is not pre-populated correctly. It always shows C.I.F.
    I tried modifying the combo box in the following way:
    Code Key Decode
    DNI (NIF)      DNI (NIF)
    Pasaporte      Pasaporte
    Visado     Visado
    Nº Identificación de Extranjero Nº Identificación de Extranjero
    C.I.F. C.I.F.
    and it get pre-populated correctly.
    I need the code keys to be numbers. Does anyone know how can a combo like this be pre-populated?
    Moreover and curiously, the process form combo box appears ordered alphabetically (according to the decode fields):
    Code Key Decode
    9     C.I.F.
    1      DNI (NIF)
    6     Nº Identificación de Extranjero
    2     Pasaporte
    4     Visado
    and the OIM User Form Combo box, appears ordered numerically (according to the code key numerical order):
    Code Key Decode
    1      DNI (NIF)
    2     Pasaporte
    4     Visado
    6     Nº Identificación de Extranjero
    9     C.I.F.
    Does anyone know why?
    Thank you very much

    Try prepopulate combobox by lookup code.
    But it must displayed as decode.

  • Populating JSF ListBox from DataBase

    Hi,
    im new to JSF and i have a problem populating Listboxes with database values.
    i have 3 listboxes and the 3 are populated from tables in my database.
    I would like to filter the returned(from database) values in the 2nd listbox depending on the value selected in the 1st listox.
    I dont know how to do this.
    BTW i'm usis Ibatis Abator to map the database.
    tnx

    Here is what I think you are wanting to do:
    1. Have the list box show values from a database table.
    2. Have the user make selections. Should the user return to that page later in the session, have the previous selection still selected.
    Normally, you would bind the listbox to the database table, as is shown in http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/databoundcomponents.html. The only reason I can think of for not binding directly to the database table is if there is a possiblity that the database table can change (additions, updates, deletes) during the user's session.
    Are you able to emulate the above tutorial using the Postgress database? It might be good to pinpoint whether the problem is with the Postgress driver or with the code you are writing.
    By the way, if you use a data provider to access the database, as shown in the tutorial, here is how you iterate through the data
            try {
                myDataProvider.cursorFirst();
                do {
                    [build your options list here]
                } while (myDataProvider.cursorNext());
            } catch (Exception ex) {
                error("put your message here" +
                        ex.getMessage());
                log("put your message here: " +
                        ex.getMessage(), ex);
            }You are correct to bind the selected property to a session bean property in order to perserve the user selecitons through the user's s session.

  • Problem while populating a field on process form- Values truncated

    Hi,
    I am facing a strange problem.
    I have a requirement to populate Country field on AD process form based on the value of country code on the same process form which should eventually go to 'co' attribute in AD. So for eg. if the Country Code has value- 'US' then the Country field should be populated with 'United States'. This value is picked from lookup- Lookup.Locations.Country.
    My adapter code works perfectly fine (checked using sysouts) it gets the proper values from the lookup but the country filed gets populated only with partial value. So instead of United States it only shows 'UNIT'. Same is for any country having more than 4 charatcters. It truncates the rest of the string and populates the field with only first 4 characters. I tried manually populating the Country field with complete country name on the process form and it works fine and the same value goes to AD also but when I run the adapter it only populates it with 4 charactetrs.
    This is strange and I have no clue what could be stopping it. Any idea/experiences?
    Thanks in advance,
    -Abhi

    Hi Abhi,
    Can you tell me how you have implemented populating an UDF based on Prepopulation of another UDF. I have a similar kind of requirement. It would be great if you share your code or relevant part of it.
    Regards,
    Sunny Ajmera

  • Populating cascading listboxes without processing the query in HIR 8.3

    I have 2 listboxes. First listbox populated using Group Number. Second Listbox should contain all account numbers corresponding to the Group Number selected in the first listbox, I need to do this without processing the query. I tried this way :
    1.     Created a query section “Query” and in that created a limit Group Number. Through this limit I am populating the first lisbox.
    2.     Created another query section “Query2”. In that created Group Number as first limit and Account Numbers as another listbox.
    3.     After selecting the Group Number from listbox1, I am passing this value to the first limit of “Query2”.
    4.     I am doing RefreshAvailableValues on the second limit of “Query2”. Now I am expecting the records corresponding the selected account number in the second limit of “Query2”. But I’m getting all the available values.
    What is wrong in the above or any better solution is available please suggest.
    Edited by: user13386590 on Jul 12, 2010 9:32 PM

    Why do you want to do this without processing a query.
    Each time you execute the script RefreshAvailableValues you are essentially executing a query...look at the Query log.
    As for the issue in # 4 you will want to change the properties on the Data Model. From menu select
    DataModel
    - Data Model Options
    check the Filter/Limit tab and try out different options
    --- below is from 11.1.1.1 help
    Data Model Options: Filters
    Use the Filters tab to specify filter browse level preferences and to select global filter options.
    When you use Show Values to set filters, you may sometimes need to sift through a lot of data to find the particular values you need. Filter preferences enable you to dictate the way existing filters reduce the values available through the Show Values command.
    For example, you want to retrieve customer information only from selected cities in Ohio. However, the database table of customer addresses is very large. Because Interactive Reporting applies a default filter preference, once you place the initial filter on State, the Show Values set returned for City is automatically narrowed to those cities located in Ohio. This saves you from returning thousands of customers, states, and from all sales regions.
    You can adjust this preference so that the initial filter selection has no effect on the potential values returned for the second filter (all cities are returned regardless of state).
    Filter Options
    Show Minimum Value Set—Displays only values that are applicable given all existing filters. This preference takes into account filters on all tables and related through all joins in the data model (which could be potentially a very large and long running query).
    Show Values Within Topic—Displays values applicable given existing filters in the same topic. This preference does not take into account filters associated by joins in the data model.
    Show All Values—Displays all values associated with an item, regardless of any established filters.
    Tip:
    When setting these preferences for metatopics, be sure to display the data model in Original view.
    Global Filter Options (Designer only)
    Show Values—Globally restricts use of the Show Values command in the Filter dialog box, which is used to retrieve values from the server.
    Custom Values—Globally restricts use of the Custom Values command in the Filter dialog box, which is used to access a custom values list saved with the Interactive Reporting document file or in a flat file.
    Custom SQL—Enables the user to code a filter directly using SQL.
    Note:
    The Topic Priority dialog box is displayed only if you first select join in the data model.
    Note:
    Since most data models do not have the same set of topics, you cannot save changes to the topic priority as default user preferences. (For more information on default user preferences, see Saving Data Model Options as User Preferences.)Often times if I am trying to load controls for parameter screen I will have a seperate query and results section for that purpose. Then I use the Filter/Limit on the Results section to control the cascade feature you are trying to accomplish. In your case your results would contain the distinct list of Group Number and Account Number.
    Wayne

  • Problem in populating field of same name in main & sub screen

    Hi Guys,
    I have a problem in my BDC program where the same field name appear in main screen and subscreen. Everytime i run the BDC program it will only populate to the field in main screen but not in the subscreen.
    Below are the result of my BDC recording: Where PKHD-LGNUM, PKHD-LGTYP and PKHD-LGPLA exist in main screen 0110 and also sub screen.
    SAPMMPKR    0110    X
                           BDC_OKCODE       =SAVE
    <b><i>                       PKHD-LGPLA       KB
                           PKHD-LGNUM       100
                           PKHD-LGTYP       150</i></b>
                           PKHD-BEHAZ       10
                           PKHD-SIGAZ       8
                           PKHD-BEHMG       50
                           BDC_SUBSCR       SAPMMPKR                                0813INCLUDE8XX
                           PKHD-UMLGO       S020
    <b><i>                       PKHD-LGNUM       100
                           PKHD-LGTYP       150
                           PKHD-LGPLA       KB</i></b>
                           BDC_SUBSCR       SAPMMPKR                                0820INCLUDE820
                           BDC_CURSOR       PKHD-KOSTL
                           PKHD-KOSTL       8441
                           BDC_SUBSCR       SAPMMPKR                                0830INCLUDE830
    This is the actual extract from SAP standard recording program, i even re-run the recording and it is not able to populate the value back into the subscreen fields of the same.
    Any one encounter the same problem and solve it? please help me please.
    Many thanks,
    Jay

    The transaction i'm dealing with is PK01, control cycle creation. There is a screen where we specified the control cycle data and there is a subscreen to specify stock transfer location. Problem when both these main and subscreen have fields tied to the same name and structure.
    If the screen fields name are the same, logically the BDC suppose to populate both field at the same time, however in my case the BDC only populate to the one in the main screen while the fields in subscreen are left empty. I have tried to specify the subscreen before populating the screen field, the value just won;t go in. I suspect it is still the problem in specifying the subscreen in populating the BDCDATA. I just dont know how, i have tried every possible way of specifying the subscreen.

  • Problem in populating 2nd combo box depending upon the selection of 1st

    Hi all,
    I have 2 combo boxes on my jsp page ,say continent and country . obviously the data in 2nd box is dependant on selection made in the 1st . I'm using MySQL with tomcat 5.0.7 . and JSP.
    The first combo box in one form and the 2nd in another. After submitting first i 'm populating the second combo also.
    But the problem is after submitting the first form the page gets refreshing and i can't see the selected continent in the first combo box.
    The javascript code used follows:
    function callCapture(form)
    var item = continent.cmbContinent.selectedIndex;
    document.country.hidContId.value=continent.cmbContinent.options[item].value;
    document.continent.action="country.jsp?hidContId="+document.country.hidContId.value+"&buttName="+document.country.buttName.value+"";
    document.continent.target="_self";
    document.continent.submit();
    some one pls help me asap !

    Hi Reegz,
    that's what i'm also doing and i'm successfull till populating the second combo box but how do I keep the previous inputs on the page and reload the page based on the change of a selection box?
    Is their any mistake in the javascript code:
    Here is the code:
    function callCapture(form)
    var item = continent.cmbContinent.selectedIndex;
    document.country.hidContId.value=continent.cmbContinent.options[item].value;
    document.continent.action="country.jsp?hidContId="+document.country.hidContId.value+"&buttName="+document.country.buttName.value+"";
    document.continent.target="_self";
    document.continent.submit();
    Pls help me...

  • Problem with populating setup tables for purchasing

    I'm working on NW2004s.
    Problem: Setup tables are not getting populated for 2lis_02_hdr, 2lis_02_item..
    what all i've done so far:
    1. Activated Data Sources in RSA5.
    2. In LO Data Extraction, all the extract structure are active. (btw in job control i'm not sure what it does, i did make job parameter start date immediate, didnt set the print parms, schedule job gives an error.. anything here i may be messing it up?)
    3. In SBIW initialization Deleted the contents of setup table and executed the 'Purchasing - perform setup'.
    4. In NPRT i can see the log, the name of the source table EKKO, duration of run is 0.0 and no of docs 130.
    5. In RSA3 for 2lis_02_hdr extraction process 0 records.
    6. I look at SE11 for 'MC02M_0HDRSETUP' and table contents gives 0 records.
    Any help is appreciated what i'm missing why the setup tables are not populating. I went thru the forum and did what was said but no sucess yet. I'm not an expert in SAP BW just been working for a year so pl dont be cryptic, explain u'r answers. Thanks for your time
    Mayil

    Hi,
    All the active datasources will be available in RSA6, after that go to LBWE ,maintain Ex Stru, Maintain DS and make that active, then we go for statistical setup
    have you done these things?
    Did you put any filters while filling up the setup tables?
    what is the transaction you used for Setup.
    cheers
    RK

  • Problem while populating table dynamically

    Hi,
    I am facing a strange problem when I execute a search component (custom developed component).
    <b>Problem summary:</b>
    I am getting first 5 empty rows (default visible row count, when I set the table's visible row count to "n" then the data in the first "n" rows are not visible) from the SAP R/3 when we fetch the data using this component. The data is available for the next consecutive rows starting 6th  {(n+1)th} row. Here I am facing another strange behavior, I moved the table row position using the table paginator and viewing the data in the next consecutive rows and reset the view (invalidating the context and setting the visibility of the table to NONE), when I invoke the search again the data is missing in the 6-10 rows(the table data is paginated to the 6-10 records automatically), now the data is visible in the first 5 rows.
    <b>The details of softwares:</b>
    SAP WebAS 6.40 SP9
    SAP NetWeaver Developer Studio Version: 2.0.9
    JDK version - j2sdk1.4.2_06
    <i>Note:</i>
    1. The table creation and data population are done dynamically.
    2. The same code works fine for SAP WebAS 6.40 SP8
    3. When I tried fetching some data from SAP R/3 and displaying it in a table (table is created during design time and data population is achieved through standard context binding), it works fine.
    If any of you get any clue in solving this issue, please do let me know.
    Thanks in advance.
    Thanks & Regards,
    Santhosh.C

    Hi Thomas,
    I am running the application from the NDS and the URL look like the below URL
    http://<<machine_name>>:50000/webdynpro/dispatcher/sap.com/parentgenericsearchhelpcomponent/PerentSearchDemo?SAPtestId=1
    I am using IE6.0 SP2
    Yes the application is working fine in SP8 and giving problem in SP9.
    I have a parent component which calls another component(childcomponent), which has this dynamically populated table. I am using window.open() to open the window in the child component.
    To answer your last question,
    I don't see full of empty rows, I see empty rows for the first visble row counts(5 or 10, if the total fetched row count might atleast 1 more than the visble row count). The data is available from the first visible row count+1. If I come back and see the first vible row count, still the rows are blank.
    Thanks & Regards,
    Santhosh.C

  • Problem with populating ROWSET

    Hi ,
    I have a problem with ROWSET.
    I have a table with 6 columns and approximately more than 200 records.
    I reterive them in a ResultSet and resultset gets populated.
    But I populate Rowset with that ResultSet then it hangs for atleast 1 minuate and then it comes back to its original state.
    Can anyone have thge idea why it happens....?
    Is therer any issue with the Rowset ?
    Why it takes too much time to populate the rowset..?
    Thanks
    Tariq

    Here it is....
    CachedRowSetImpl crs = new CachedRowSetImpl();
    Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
    ResultSet result = stmt.executeQuery(sql); // Here we have 250 records in ResultSet
    crs.populate(result); // This is the problem. This line takes atleast 1min to executeAny solution u gurus have ....

  • Problem with Checkbox and Listbox

    Hi,
    I have a jsp page named auth_Roles.jsp which has an empty Listbox and a hyperlink,on clicking the hyperlink a popup window opens up,which is a jsp page named roleSelect.jsp.In that jsp page there is a textBox and two buttons named "Search" and "Cancel".By typing something in the checkbox when you press Search button Some checkboxes get generated dynamically matching with the Search criteria in the Textbox.These textboxes are generated in a nother JSP named findRoles.jsp.this findRoles.jsp also contains two buttons of type="submit"
    Which are Save and Cancel buttons.
    Now what i need to do is when i check some of the checkboxes that are generated in findRoles.jsp and click on Save.After that the values that are checked should be there in the listbox of the first JSP page that is auth_Roles.jsp.
    Thing is that the whole thing is working but after selecting and saving some checkBox values in the first attempt(i.e when the checked values are reflecting in the ListBox of auth_Roles.jsp) if you try to select something again using the hyperlink in auth_Roles.jsp(Using the sequence of actions i have allready mentioned) the newly checked values are occupying the ListBox in auth_Roles.jsp excluding the values i have allready selected in the first attempt(i.e values selected in the latest attempts are only getting reflected and the previous values are lost from the ListBox).
    I want to retain the previously selected values,can anyone provide any code or any suggestion,am very new in java.

    Sorry,in the roleselect.jsp page i have to type a string as a search criteria in the textBox not a CheckBox.
    Apologise for the error in information.

  • Problem with populating a fact table from dimension tables

    my aim is there are 5 dimensional tables that are created
    Student->s_id primary key,upn(unique pupil no),name
    Grade->g_id primary key,grade,exam_level,values
    Subject->sb_id primary key,subjectid,subname
    School->sc_id primary key,schoolno,school_name
    year->y_id primary key,year(like 2008)
    s_id,g_id,sb_id,sc_id,y_id are sequences
    select * from student;
    S_ID UPN FNAME COMMONNAME GENDER DOB
    ==============================
    9062 1027 MELISSA ANNE       f  13-OCT-81
    9000 rows selected
    select * from grade;
          G_ID GRADE      E_LEVEL         VALUE
            73 A          a                 120
            74 B          a                 100
            75 C          a                  80
            76 D          a                  60
            77 E          a                  40
            78 F          a                  20
            79 U          a                   0
            80 X          a                   0
    18 rows selectedThese are basically the dimensional views
    Now according to the specification given, need to create a fact table as facts_table which contains all the dim tables primary keys as foreign keys in it.
    The problem is when i say,I am going to consider a smaller example than the actual no of dimension tables 5 lets say there are 2 dim tables student,grade with s_id,g_id as p key.
    create materialized view facts_table(s_id,g_id)
    as
    select  s.s_id,g.g_id
    from   (select distinct s_id from student)s
    ,         (select distinct g_id from grade)gThis results in massive duplication as there is no join between the two tables.But basically there are no common things between the two tables to join,how to solve it?
    Consider it when i do it for 5 tables the amount of duplication being involved, thats why there is not enough tablespace.
    I was hoping if there is no other way then create a fact table with just one column initially
    create materialized view facts_table(s_id)
    as
    select s_id
    from student;then
    alter materialized view facts_table add column g_id number;Then populate this g_id column by fetching all the g_id values from the grade table using some sort of loop even though we should not use pl/sql i dont know if this works?
    Any suggestions.

    Basically your quite right to say that without any logical common columns between the dimension tables it will produce results that every student studied every sibject and got every grade and its very rubbish,
    I am confused at to whether the dimension tables can contain duplicated columns i.e column like upn(unique pupil no) i will also copy in another table so that when writing queries a join can be placed. i dont know whether thats right
    These are the required queries from the star schema
    Design a conformed star schema which will support the following queries:
    a. For each year give the actual number of students entered for at A-level in the whole country / in each LEA / in each school.
    b. For each A-level subject, and for each year, give the percentage of students who gained each grade.
    c. For the most recent 3 years, show the 5 most popular A-level subjects in that year over the whole country (measure popularity as the number of entries for that subject as a percentage of the total number of exam entries).
    I written the queries earlier based on dimesnion tables which were highly duplicated they were like
    student
    =======
    upn
    school
    school
    ======
    school(this column substr gives lea,school and the whole is country)
    id(id of school)
    student_group
    =============
    upn(unique pupil no)
    gid(group id)
    grade
    year_col
    ========
    year
    sid(subject id)
    gid(group id)
    exam_level
    id(school id)
    grades_list
    ===========
    exam_level
    grade
    value
    subject
    ========
    sid
    subject
    compulsory
    These were the dimension table si created earlier and as you can see many columns are duplicated in other tables like upn and this structure effectively gets the data out of the schema as there are common column upon which we can link
    But a collegue suggested that these dimension tables are wrong and they should not be this way and should not contain dupliated columns.
    select      distinct count(s.upn) as st_count
    ,     y.year
    ,     c.sn
    from      student_info s
    ,     student_group sg
    ,     year_col y
    ,     subject sb
    ,     grades_list g
    ,     country c
    where      s.upn=sg.upn
    and     sb.sid=y.sid
    and     sg.gid=y.gid
    and     c.id=y.id
    and     c.id=s.school
    and      y.exam_lev=g.exam_level
    and      g.exam_level='a'
    group by y.year,c.sn
    order by y.year;This is the code for the 1st query
    I am confused now which structure is right.Are my earlier dimension tables which i am describing here or the new dimension tables which i explained above are right.
    If what i am describing now is right i mean the dimension tables and the columns are allright then i just need to create a fact table with foreign keys of all the dimension tables.

  • Problem in populating data to Logical System field

    Hi All,
    I am extracting GR data through Generic extraction. I am created a view using four tables MSEG, EKBE, EKKO and T001. I have a field LOGSY (Logical System). This field is in EKKO table. My problem is LOGSY field have no any data. I have to write a routine to populate data to this field. Can anybody plz tell me the code?
    Edited by: Kasi Viswanath Aurangabad on Jun 18, 2008 7:50 AM

    Hello,
    the code is:
    SELECT SINGLE logsys
    FROM T000
    INTO your_variable
    WHERE mandt = sy-mandt.
    Assign points if useful,
    Best Regards,
    Maciej

  • Problem in populating PO item text using FM:SAVE_TEXT

    Hi All,
    I am having an issue with SAVE_TEXT FM,
    I need to populate the item text field:
    This FM works fine if the Item text field is blank and i am populating it with text, say "This is a test case",
    How ever if the text field is already populated say the item text field has "Testing", my requirement is i will append the new text to the previously existing, in this case it should come as "Testing This is a test case",
    For doing this i am reading the existing text using READ_TEXT FM and concatenating both the texts separated by space, and passing this to i_lines, how ever the O/P which i get in the text field is "Testing".
    Please advice.
    The cod is shown below:
    CALL FUNCTION 'SAVE_TEXT'
        EXPORTING
        CLIENT                = SY-MANDT
         header                = t_head
         insert                = 'X'
         savemode_direct       = 'X'
        OWNER_SPECIFIED       = ' '
        LOCAL_CAT             = ' '
      IMPORTING
        FUNCTION              =
        NEWHEADER             =
        TABLES
          lines                 = i_lines
       EXCEPTIONS
         id                    = 1
         language              = 2
         name                  = 3
         object                = 4
         OTHERS                = 5.

    hi,
    once u use the save_text also
    with save_text u are updating the STXH table .
    there is one field in stxh table which is once updated shows the text in the sceen.
    or u can run a bdc put the default text where u want to put and afterwards when u use create_text and commit_text,u ll be able to see the text in the screen.
    regards
    kanishak

Maybe you are looking for

  • Payment done, still shows as open item

    SAP experts, Last week, the User did a payment run (F110), paid the due invoices and printed the checks. But then realized that the wrong printer was used so she reprinted the checks with correct printer info (she doesnt know how, but she did). Now w

  • Web Services Problem

    Hi, we have a SAP HR ECC6 (EhP3) (ABAP stack) and an EP and we need to use WEB SERVICES both inbound and outbound. Our developers have created the Web Service with the wizard, else it was made with SOAMANAGER, but when I try to test the WS with the "

  • Pages to iweb

    Hi, I am wondering if it is possible to export pages created files and put them on to my website using iweb whilst still maintaing the pages format? Thanks

  • How do I print from my iPad 2?

    I have a wireless printer but haven't been able to print from my iPad. Is it even possible to do this??

  • Newsflash from Computex 2014/ Queen of StarCraft (II) Ga Young Kim at MSI Gaming Notebook Booth

    Kim "Aphrodite" Ga Young, the MSI sponsored world champion of StarCraft (II) from South Korea, is best known for her participation in the female-only tournament Zowie Divina 2011. The beauty showed up at MSI Gaming Laptop booth during the Computex 20