A report with functionality

Hello all, I need to create a report with an additional column named "Remove" so that each record in the report has a check box beside it. In addition to the check boxes, there is a submit button at the end of the report for submission. The goal is to remove all those records with marked check boxes when user clicks on the submit button. I have searched through the forum, and I did not find anything like this. Hence, I wonder is it possible to do the above? Thanks in advance.

Hello, in the process of creating a report based on a SQL query,
portal asks for the table/view this report would be built from.
It means that table/view must have a table column to store
checkboxes, right? How can I build a table/view with a checkbox
column using sql? <INPUT TYPE= ....> is for forms. I know how
to build it with a form, but I cannot understand how I can have
a column of checkboxes in a report. I tried the following:
select PID, FIRSTNAME, LASTNAME, DOB, STATUS, '<INPUT TYPE
= "checkbox" NAME="PID" VALUE="PID">' as Remove from
NYANG123.STUDENT_VIEW
It returned me a string <INPUT TYPE = "checkbox" NAME="PID"
VALUE="PID"> instead of a checkbox for each record. By the way,
PID is a number/integer. Please clarify. Thanks again.
Hi
What you really need is a good book on JavaScript and HTML.
I refer a lot to Danny Goodmans "JavaScript Bible".
In a report based on a SQL query you need a column that selects:
'<INPUT TYPE=checkbox NAME="'||TABLE.ID||'">'
This will give you a checkbox in a column of your report.
I think that the code to get the selected values is different for Netscape and IE.
>
now create a procedure to:
htp.p() out an HTML FORM, and the JavaScript code to loop through all of the INPUT elements on the page and if they are
CHECKED, put NAME and a ',' into the field to be submitted.
then, if the field to be submitted has a value, submit the form.
this procedure will also htp.p() out an INPUT type button to call the JavaScript function to submit the checked items.
Thit procedure is run in the PL/SQL code to be run AFTER displaying the report.
>
You will obviously need the procedure that accepts the comma separated id numbers to exist on the database, otherwise the
form will not work when it is submitted.
>
I hope that this helps
Regards Michael

Similar Messages

  • Interactive Report with PL/SQL Function Source

    Is it possible to create interactive report with PL/SQL function source returing a query? If not, has anyone done any work to simulate the interactive reporting feature for a normal report using API?

    I haven't tried that before but you could:
    1. create a collection from your result set returned by a dynamic query,
    2. create a view on that collection,
    3. use the view in your interactive report.
    The usability of this proposal depends from a question how "dynamic" your query is - does it always have the same number of columns or not.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Discoverer report with parameters and functions

    I am new to Discoverer. Is there a way to create a report (with parameters) of one line per customer such that the following data will be displayed for each customer?
    Among the parameters is: from_date (month & year) ,to_date
    The basic query gives totals for each date (month & year) for every customer.
    Among the fields displayed:
    1-customer_id,
    2-balance until from_date,
    3-total activity between from_date and to_date
    I have a function to calculate the total balance until from_date, but then I cannot get the total activity on the same line. I tried using another function and I tried using a total calculation but to no success.
    Is this possible?
    Thanks.

    Hi Markus
    You need to determine whether you can in fact call a Discoverer report using a URL before linking it in Portal. You need to run the report in Viewer first and then see copy the URL from the address line of the browser. Then you open another browser and paste the URL. You may well be prompted for a username and password but hopefully the correct report with the right parameters will then execute.
    Assuming this works you then paste the same URL link into Portal and you should be able to get the report to run.
    Best wishes
    Michael

  • SSRS report with tabular model – MDX query CoalesceEmpty function does not return the provided string value

    Hello everyone,
    I created following calculated member in MDX query. I am using it in one of the report parameter in dataset (single select dropdown list as report parameter).
    WITH MEMBER [Measures].[ParameterCaption] AS
    CoalesceEmpty([Customer].[National Account Code].CURRENTMEMBER.MEMBER_CAPTION,'None')
    I would like to display 'None' text at the top of the dropdown list values. So that when user selects 'None' then this parameter will not considered in MDX query else the selected National Account Code will be considered to filter report data. But,
    the above return blank/empty value for  [Customer].[National Account Code].&  member though I specified 'None' as text in CoalesceEmpty function. Any advice would be appreciated.
    Thanks, Ankit Shah
    Inkey Solutions, India.
    Microsoft Certified Business Management Solutions Professionals
    http://www.inkeysolutions.com/MicrosoftDynamicsCRM.html

    Hi Ankit,
    It seems that you issue had been solved in your another thread.
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/5a5becac-226f-428a-95b0-aaaa22733818/ssrs-report-with-tabular-model-create-a-dropdown-report-parameter-with-none-option-as-the-top?forum=sqlanalysisservices#0e51bf8c-a66c-4df5-a244-0147728fdfdb
    iif([Customer].[National Account Code].CURRENTMEMBER.MEMBER_CAPTION="","None",[Customer].[National
    Account Code].CURRENTMEMBER.MEMBER_CAPTION)
    I marked this reply as answer, it will benefit to other members who have the similar issue.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Aggregrate function in report with group by

    I have SQL report with all the records and Total of some of the fields in end.
    I wanted to group them by item1 and than show the Total for the fields for each Item

    In your report have a break formatting section, select the column you wish to break (sub-total on).. make sur eto set the sum checkbox on the column you ar edoing the break on too! It will then build the sub-total line for you..
    Thank you,
    Tony Miller
    Webster, TX
    Never argue with an idiot. They drag you down to their level, then beat you with experience.
    If this question is answered, please mark the thread as closed and assign points where earned..

  • Open report with "Save as" and "Open with" dialogue

    Hi,
    I'm using jasper reports within my application. I manage to open them in a new window but in that case the url containing JasperServer username and password is shown. I would like to open the report without showing the url.
    I tryed using a database procedure (http://sqlcur.blogspot.com/2009/02/jasperreports-in-apex.html) but all I get is a alert window saying "file does not begin with ' pdf-'". Couldn't see what is the problem (I used the same procedure as Ino has in his example) so I thought of another way. Is it possible, when someone clicks a button to open a report, to open that report with a "Save as" and "Open with" pop up window?
    The javascript function that I use:
    <script language="JavaScript" type="text/javascript">
    function openLAPopUpJasper(url){
    w = open(url,"winLov","toolbar=false,menubar=false,location=false,resizable=yes, //scrollbars=yes,status=yes,fullscreen=true");
    if (w.opener == null)
    w.opener = self;
    w.focus();
    </script>
    Thanks in advance!
    Edited by: Josip on Oct 29, 2009 2:55 AM

    Anyone?

  • Creation of report with the help of report painter

    Dear Experts,
                         I need report painter material, if any body have  pls  farward to me.
    my intension to create controlling report with the help of report painter.
    I am ready to award full points.
    Thanks in advance
    Regards
    avudaiappan
    Moderator - Please read this:
    /thread/931177 [original link is broken]
    Thread locked

    Hello Chinasammy,
    Report Painter allows you to create reports using data from SAP application components, which you can adapt to meet your individual requirements.
    Many of your reporting requirements can already be met by using the standard reports provided by various SAP application components. If these SAP standard reports do not meet your reporting needs, Report Painter enables you to define your specific reports quickly and easily.
    When executing a Report Painter report, it is displayed by the system in Report Writer format. You thus have access to the same functions as for Report Writer reports defined in the same way, and can combine Report Painter and Report Writer reports together in a report group.
    Report Painter uses a graphical report structure, which forms the basis for your report definition and displays the rows and columns as they appear in the final report output.
    To facilitate report definition, you can use many of the standard reporting objects provided by SAP (such as libraries, row/column models, and standard layouts) in your own specific reports. When you define a Report Painter report you can use groups (sets). You can also enter characteristic values directly.
    Advantages of Report Painter include:
    Flexible and simple report definition
    Report definition without using sets
    Direct layout control: The rows and columns are displayed in the report definition as they appear in the final report output, making test runs unnecessary.
    =============================================
    Below mentioned is the process for creating reports using Report Painter as a tool.
    Selecting and maintaining a library for your report: As the transfer structure to Report Painter you use a report table, which is defaulted by SAP and can not be maintained. This table contains characteristics, key figures and predefined columns. In a library, you collect the characteristics, key figures, and predefined columns from the report table, which you need for your Report Painter reports.
    When you define a Report Painter report, you assign it to a library. Reports assigned to one library can only use the characteristics, key figures, and predefined columns selected for that library.
    When you create or maintain a library, the Position field determines the sequence in which the characteristics, key figures or (predefined) key figures appear in the Report Painter selection lists when you define a report. This allows you to position the objects that you use regularly in your reports at the beginning of the selection lists. If you do not make an entry in the Position field, you will not be able to use this object in Report Painter reports.
    You can use either the standard SAP libraries for your reports or define your own.
    (ii) Selecting or maintaining a standard layout for your report: Standard layouts determine report layout features and the format of your report data.If the SAP standard layouts do not meet your reporting requirements, you can create a new  standard layout or change an existing one.
    (iii) Defining row and column models: A model is a one-dimensional, predefined reporting structure that you can insert in either the rows or columns of your report.If you often use the same or similar row or column definitions in your reports, it is recommended that you create row or column models.
    You must define the row and/or column models that you want to include in your report definition before you define the report.
    You can also use the standard column models supplied by SAP.
    (iv) Defining the report: Defining a Report Painter report involves the following steps.
    (a) Define the report columns: You define the report columns using the characteristics, key figures, and predefined columns selected for the library that the report uses. Alternatively, you can use a column model for column definition. Column models are predefined column structures which you insert into your entire column definition, instead of defining each individual column.
    (b) Define the report rows: You define the report rows using the characteristics selected for the library selected for the report.
    Alternatively, you can use a row model for your row definition. Row models serve the same purpose as column models, but are used to define a report row.
    Edit and format the report rows and columns in line with your requirements. (For example, you can hide rows or columns, define the column width or define colors for your report rows).
    (iii)Define general data selection criteria for the selection of your report data: Selection criteria are the characteristics used to select data for the entire report. You cannot enter characteristics as data selection criteria if they are already being used in the report rows or columns.
    (iv) Assigning the report to a report group: Once you have defined a report, you must assign it to a report group. A report group can contain one or more reports from the same library. However, reports that share the same data will select data more quickly and improve processing time.
    Hopw this helps you. Please let me know if you need anything more and assign points.
    Rgds
    Manish

  • How to create a report with dynamic columns

    Hi all,
    I am using Apex 4.0 with Oracle 10g
    I am creating a report and I need to display columns dynamically based on the item values.
    example:
    I have a table employee with columns name, designation, sal
    In the report page i have a select list with designations and when I select a designation from the select list,
    I need to display the names of the employees horizontally,
    like each name as a new column in the report with that particular designation. and same has to continue when I select different designations.
    Can some one help me how we can do that.
    I appreciate your answer
    Thanks,
    Rik

    Essentially you want to write a pl/sql function which returns a varchar2 string. The contents of the string must be a valid sql statement.
    Once you have done this, you need to add a report region as type sql report and you will have the option of writing it as a query or as a function returning query. Choose function returning query and enter in the function call.
    Note your function must be valid, and must be executable by your apex parsing schema.
    example:
    create or replace
    function test_report(   p1_tablename       in varchar2)
    return varchar2
    is
    v_query varchar2(4000);
    begin
    v_query  :=
    'SELECT * from '||p_tablename;
    return v_query;
    end test_report;Edited by: Keith Jamieson on Aug 15, 2011 4:50 PM

  • Report with Checkbox

    I am trying to follow the example shown at the below link but it is not working. I am modifying some of the code since I am using version 1.6. Any ideas as to what I may be doing wrong. The checkbox appears and I can select and deselect items but I cannot get P6_HOLDER to hold any of the values of the selected items. Thanks!
    http://apex-smb.blogspot.com/2009/01/apex-report-with-checkboxes-advanced.html
    First I created a page item called P6_HOLDER.
    Next I created a report region (sequence 40) with the below code.
    select htmldb_item.checkbox (1, dev_obj_id, 'onchange="spCheckChange(this);"',
    :P6_HOLDER, ':') checkbox, dev_id, dev_obj_desc from edm_dev_obj where
    dev_id = :P6_TEMP_DEV_ID
    **I then created a html region (sequence 1) with the below code**
    <SCRIPT src="http://www.google.com/jsapi"></SCRIPT>
    <SCRIPT>
    // Load jQuery
    google.load("jquery", "1.2.6", {uncompressed:true});
    function spCheckChange(pThis){
    var get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=CHECKBOX_CHANGE',$v('pFlowStepId'));
    get.addParam('f01',pThis.value); //Value that was checked
    get.addParam('f02',pThis.checked ? 'Y':'N'); // Checked Flag
    gReturn = get.get();
    $f('checkListDisp').innerHTML=gReturn;
    </SCRIPT>
    CHECKBOX List:
    <DIV id=checkListDisp>&P6_HOLDER.</DIV>
    I then created an application process on Demand called CHECKBOX_CHANGE with the below code
    DECLARE
    v_item_val NUMBER := htmldb_application.g_f01;
    v_checked_flag VARCHAR2 (1) := htmldb_application.g_f02;
    BEGIN
    IF v_checked_flag = 'Y' THEN
    -- Add to the list
    IF :P6_HOLDER IS NULL THEN
    :P6_HOLDER := ':' || v_item_val || ':';
    ELSE
    :P6_HOLDER := :P6_HOLDER || v_item_val || ':';
    END IF;
    ELSE
    -- Remove from the list
    :P6_HOLDER := REPLACE (:P6_HOLDER, ':' || v_item_val || ':', ':');
    END IF;
    -- Just for testing
    HTP.p (:P6_HOLDER);
    END;

    Hi
    Create a page level validation (fucntion returning boolean) and write code similar to following
    DECLARE
    v_count NUMBER := 0;
    BEGIN
    FOR i IN 1..APEX_APPLICATION.G_F01.COUNT LOOP
    IF APEX_APPLICATION.G_F01(i) IS NOT NULL THEN
    v_count := v_count + 1;
    END IF;
    END LOOP;
    IF v_count = 0 THEN
    RETURN TRUE;
    ELSE
    RETURN FALSE;
    END IF;
    END;I take it your report query is similar to following
    select apex_item.checkbox(1,"PK_CLMN") Tick, col2, col3 FROM tbl_nameCheers,
    Hari

  • Showing Duplicate records in a report with the count of their occurrence

    Hi Members,
    I am novice to BI. i need your suggestion to achiever one of the functionality. A report is required to be built with columns Incident ID, Task ID, Task Name. The Original report is below:-
    In the above report I have to display only duplicated records once. Distincat records are not required to be shown. That is, if the same no. of Task Name is associated with the same Incident ID then it should be displayed once with the count of their occurrences in a separate column say , Count. For example, the Task 'TASK_MANUAL_KCI'  got 4 times associated with the same Incident ID INC000000001434. Then the report should display this task one time in a report with count 4. Similarly, for INC000000000943 where task 'IPCG Diagnostic Template' got associated 2 times. The Count is 2 for this task.
    Other records should not be displayed in a report.
    Would highly appreciate quick response. Please suggest.
    Thanks,
    Neha Pateria

    I tried this Gill, but result is bit different :-
    Seems some little modifications are needed. Report should be displayed like the below one where it says how many times the same Task is associated with the same incident. Eg. Task 'TASK_CIRCUIT_RESOLVER' is associated with the incident 'INC000000001434' 4 times. 'IPCG Diagnostic Template' is associated with  'INC000000000943' 2 times. Similarly for other records.
    But I really thankful to you for giving me the logic proceed further. I tried  '=RunningCount([Task Name]; Row; ([Task Name]; [Incident ID]))'. It gave me desired results. :-
    But the only thing that needs to be done is to bring the single Task associated with the Incident..
    Thanks,
    Neha Pateria

  • Pl-sql report with parameter

    Hi
    I have created report with region source as pl-sql. In pl-sql block, calling package where i am passing query. In query's where clause i want to pass paramter value which user had selected.
    There are two regions on page. On upper part, there is select list, on lower part there is report with pl-sql region but value of select list is not found in query. I am trying to access with bind variable, select list of item :SL_TEXT. But it is not showing any value in it.
    How to use select list value in query of report? Or let me know how to use parameter in pl-sql report which is selected in other region?
    Thanks in advance

    I am attempting to define the variable as a date variable through Oracle BI and yes it does use a colon to signal variable substitution.
    So thank you the first way you stated should work.
    The only problem I'm running into now I believe steems from the date format that column that I am trying to filter on. It is in what appears to be the worst format possible.
    Is it common for dates to be stored in a DD-MON-YY format? (e.g. 01-JAN-08) I thought we as a community had moved past that post Y2K scare. lol.
    When I set up the bind variable in BI it allows me to define the date format, much similar to the TO_DATE function but then it says (must be java date format). So I'm thinking that maybe DD-MON-YY is not a java date format.
    In that case is there a way to cast or convert my date format in the sql so that it is a supported java date format?
    Or should I just give up and pass it as a varchar2?

  • REPORT WITH CHANGING ITEM ON THE SAME COLUMN

    Hi to all,
    i'm trying to build a report with different item in the same column.
    Is that possible in any way using other Oracle technique?
    i'm not doing anything specific here, only i would like to know if the following possibility exist or not and how can i let apex render the htmldb_item fields 'dynamically'.
    Using this CODE inside a PL/SQL function body returning sql query I obtain the following report content. Such the code of htmldb_item.fields is written, as a field value the HTML_ITEM is not rendered, so only the description of them appear in the report.
    Does somebody know some tricks to make it work?
    Thanx a lot
    1     2     LAST_CALL     htmldb_item.date_popup (4, ROWNUM, FLD_VALUE,'dd/mon/yyyy') VALUE
    21     1     AGE     htmldb_item.text(4,FLD_VALUE,10,10) VALUE
    create or replace FUNCTION FNC_GEN_GUI_ITEM(ITEM_TYPE NUMBER) RETURN VARCHAR2 AS
    STRHTMLDITEM VARCHAR2(4000);
    BEGIN
    CASE ITEM_TYPE
    WHEN 1 THEN STRHTMLDITEM:=' htmldb_item.text(4,FLD_VALUE,10,10) VALUE ';
    WHEN 2 THEN STRHTMLDITEM:=' htmldb_item.date_popup (4, ROWNUM, FLD_VALUE,''dd/mon/yyyy'') VALUE ';
    END CASE;
    RETURN STRHTMLDITEM;
    END FNC_GEN_GUI_ITEM;
    MY TABLE AS FOLLOWS:
    CREATE TABLE "NEWPROJ"."DINFIELDGUI"
    (     "ID" NUMBER NOT NULL ENABLE,
         "FLD_TYPE" NUMBER,
         "FLD_NAME" VARCHAR2(4000 BYTE),
         "FLD_VALUE" VARCHAR2(4000 BYTE),
         CONSTRAINT "DINFIELDGUI_PK" PRIMARY KEY ("ID"));
    Message was edited by:
    Marcello Nocito

    Hi to all,
    i've solved, is very simple using decode inside the select:
    SELECT
    ID,
    FK_HTMLDB_ITEM, DECODE(FK_HTMLDB_ITEM,1,HTMLDB_ITEM.DATE_POPUP(3,rownum,VAL,'dd-mon-yyyy'),2,HTMLDB_ITEM.TEXT(3,VAL)) VALORE
    FROM TESTID
    my table is:
    CREATE TABLE "DEV"."TESTID"
    (     "ID" NUMBER NOT NULL ENABLE,
         "FK_HTMLDB_ITEM" NUMBER,
         "VAL" VARCHAR2(4000 BYTE))
    Bye Bye

  • Apex IR report with Heading label

    i have IR report with 15 column with heading..
    The end user can accessing from different department, when the user can see the report shown only their particular department rows only. each department have different column value and Header label .how can display the column header depend on the department user.
    e.g. IR report view
    Seq# -- Department -- date -- Subject/Customer Message
    1                          Communication done with Jony(from HR department)
    2                          low sales from East region(from Sales Department)IN the IR report Table data structure.Heading_code value as LOV in IR form(1.Subject/2.Customer Message/ect...) and Column_value as Text Field.
    Seq# -- Dept_name -- Heading_code --  Column_value
    1        HR              1           Communication done with Jony
    2        Sales           2           low sales from East regionApex have limitation of one IR report in one page. so i could not create different Report region even i don’t want create another page due to the further functionality issue.
    Thanx,
    Ram

    I'm glad you could apply that approach. I'm not crystal clear on what is needed but I have a few general ideas.
    1) If there will only have 3 or 4 classes (types) of users, you might try using a CASE statement in a Before Header process:
    BEGIN;
      CASE
        WHEN condition for 'KAC' THEN
             SELECT [first label constant or variable], [second label], ...
                  INTO &Px_COL_HEAD1., &Px_COL_HEAD2, ... FROM ... ;
        WHEN condition for 'MIS' THEN
             SELECT [first label constant or variable], [second label], ...
                  INTO &Px_COL_HEAD1., &Px_COL_HEAD2, ... FROM ... ;
        WHEN  condition for "ADMIN"  THEN
             SELECT [first ADMIN label constant], [second ADMIN label constant], ...  
                  INTO &Px_COL_HEAD1., &Px_COL_HEAD2, ... FROM ... ;
        ELSE -- default case
             SELECT [default first label constant or variable],
                         [default second label constant or variable], ...  
                  INTO &Px_COL_HEAD1., &Px_COL_HEAD2, ... FROM ... ;
        END;
    END; NOTE: Do not make the "ADMIN" case the default. That seems like a security hole. I would always want a data check for the ADMIN case.
    2) Or put the above code in an Application Process rather than a Page (Before Header) Process so it's only computed once.
    Does that give you some ideas?
    Regards,
    Howard

  • In need help: Analytic Report with Group by

    Good morning,
    I am trying to create a report with subtotal and grand total, which of couse goes to the group by clause, with rollup, cube, grouping... etc. I'd like to use rollup, then some columns in the Select list have to be put into the Group By clause, which is not supposed to be. So I had to use one of SUM, AVG, MIN and MAX functions, to make those columns as *aggregated, which is wrong.
    Another alternative I tried is to use Cube and Grouping_id to be the filter. However, that is still very cumbentsome and error-prone, also the order of the display is absolutely out of control.
    I am trying hard to stick to the first option of using the Rollup, since the result is very close to what I want, but avoid the usage of aggregation functions. For example, if I want to display column A, which should not be grouped. Other than using those aggregation functions, what I can do?
    Thanks in advance.

    Luc,
    this is a simple and a good reference for analytic functions:
    http://www.orafaq.com/node/55
    It takes some time to understand how they work and also it takes some time to understand how to utilize them. I have solved some issues in reporting using them, avoiding the overkill of aggregates.
    Denes Kubicek

  • Create a Procedural ALV Report with editable fields and save the changes

    Hi,
    I am new to ABAP. I have created a Procedural ALV Report with 3 fields. I want to make 2 fields editable. When executed, if the fields are modified, I want to save the changes. All this I want to do without using OO concepts. Please help . Also, I checked out the forum and also the examples
    BCALV_TEST_GRID_EDIT_01
    BCALV_TEST_GRID_EDIT_02
    BCALV_TEST_GRID_EDIT_04_FORMS
    BCALV_TEST_GRID_EDITABLE
    BCALV_EDIT_01
    BCALV_EDIT_02
    BCALV_EDIT_03
    BCALV_EDIT_04
    BCALV_EDIT_05
    BCALV_EDIT_06
    BCALV_EDIT_07
    BCALV_EDIT_08
    BCALV_FULLSCREEN_GRID_EDIT
    But all these are using OO Concepts.
    Please help.
    Regards,
    Smruthi

    TABLES:     ekko.
    TYPE-POOLS: slis.                                 "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
      line_color(4) TYPE c,     "Used to store row color attributes
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    *ALV data declarations
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
          gd_tab_group TYPE slis_t_sp_group_alv,
          gd_layout    TYPE slis_layout_alv,
          gd_repid     LIKE sy-repid.
    START-OF-SELECTION.
      PERFORM data_retrieval.
      PERFORM build_fieldcatalog.
      PERFORM build_layout.
      PERFORM display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
          Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      fieldcatalog-key         = 'X'.
    fieldcatalog-do_sum      = 'X'.
    fieldcatalog-no_zero     = 'X'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 1.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      fieldcatalog-col_pos     = 2.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 3.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      fieldcatalog-col_pos     = 4.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
    fieldcatalog-edit             = 'X'
      fieldcatalog-col_pos     = 5.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      fieldcatalog-col_pos     = 6.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-datatype     = 'CURR'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      fieldcatalog-col_pos     = 8.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
          Build layout for ALV grid report
    FORM build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
      gd_layout-info_fieldname =      'LINE_COLOR'.
    ENDFORM.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
          Display report using ALV grid
    FORM display_alv_report.
      gd_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program      = gd_repid
                i_callback_pf_status_set = 'STATUS'
                i_callback_top_of_page   = 'TOP-OF-PAGE'
               i_callback_user_command = 'USER_COMMAND'
               i_grid_title           = outtext
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
               it_special_groups       = gd_tabgroup
               IT_EVENTS                = GT_XEVENTS
                i_save                  = 'X'
               is_variant              = z_template
           TABLES
                t_outtab                = it_ekko
           EXCEPTIONS
                program_error           = 1
                OTHERS                  = 2.
    ENDFORM.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      DATA: ld_color(1) TYPE c.
      SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
       UP TO 10 ROWS
        FROM ekpo
        INTO TABLE it_ekko.
      LOOP AT it_ekko INTO wa_ekko.
        ld_color = ld_color + 1.
        IF ld_color = 8.
          ld_color = 1.
        ENDIF.
        CONCATENATE 'C' ld_color '10' INTO wa_ekko-line_color.
        MODIFY it_ekko FROM wa_ekko.
      ENDLOOP.
    ENDFORM.                    " DATA_RETRIEVAL
          FORM top-of-page                                              *
    FORM top-of-page.
      WRITE:/ 'This is First Line of the Page'.
    ENDFORM.
          FORM status                                                   *
    FORM status USING rt_extab TYPE slis_t_extab.  .
      SET PF-STATUS 'ALV'.
    ENDFORM.
          FORM USER_COMMAND                                          *
    -->  RF_UCOMM                                                      *
    -->  RS                                                            *
    FORM user_command USING rf_ucomm LIKE sy-ucomm
                             rs TYPE slis_selfield.            
      DATA ref1 TYPE REF TO cl_gui_alv_grid.
      CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
        IMPORTING
          e_grid = ref1.
      CALL METHOD ref1->check_changed_data.
      CASE rf_ucomm.
    when 'SAVE'.
    get all the modified entries and store them in an internal table and udpate them in to the required transaction or your custom table.
    endcase.
    endform.
    ENDFORM.
    here u need to 2 performs for PF status and USER_COMMAND in the ALV parameters.
    create a custom PF status and create push buttons and assign your ok codes in your PF status.
    if the field has to be edited in the ALV then pass EDIT = 'X' for that field in the fieldcatlog preparation.
    Hope this will help you.
    Regards,
    phani.

Maybe you are looking for

  • How do I set an action for a window's load event in Xcode?

    Brand new to Mac development, have a strong background in C++ on the Windows platform. This is really basic, but I haven't been able to find it anywhere (maybe I'm Googling the wrong things). I need an application to execute certain commands when its

  • Condition records not copied from order to invoice

    Hi, I created an order and it has contion types for Frieght cost and packing cost...for both condition rocrds were found and triggered in order but whn cheked in invoice...records are not copied to invocie level..and when checked in analysis it says

  • RSS Viewer not working with the BBC Weather Service

    Hi all   I  am unable to display an anonymous RSS feed on my  publishing site. I have checked similar posts but mine seems subtly different  in ULS Cannot find site lookup info for request Uri http://open.live.bbc.co.uk/weather/feeds/en/??????/3dayfo

  • Evince 3.14.1-2 crashes shortly after opening pdf files

    Hi, my evince 3.14.1-2 (up to date version from stable repo) crashes if I try to open pdf files without any error message. The only way to get some error output is stating it from a terminal: (evince:2655): GLib-GObject-WARNING **: The property GtkSe

  • Error: Crash in progress 2524 unconstrain fpsif appropriate

    Hi All, I've been searching the help forums but have been unsuccessful in finding the same error that I have been getting and a possible solution. This is the error I get: AE error: Crash in progress. Last logged message was <2524><unconstrainFPSifAp