Interactive reports in abap objects

Hi,
       plz send me the code of  interactive report using ABAP Objects .
Thanks,
T.Sreekanth.

Hi,
It will be similar to what you do in normal report.
Here you may create an object instance and then call some method on the object.
AT LINE-SELECTION.
create object obj.
CALL METHOD obj->method1
IMPORTING
  text = im_text.
write: im_text.
Regards,
Sesh

Similar Messages

  • Simple report on ABAP OBJECTS

    Hi Experts,
         Can any body send one simple report using abap object....
    Thanks
    kris

    Hi,
    Check this example..
    CLASS MY_CLASS DEFINITION.
    PUBLIC SECTION.
    METHODS: ADDITION IMPORTING IP_1 TYPE INT4
    IP_2 TYPE INT4
    EXPORTING OP_1 TYPE INT4,
    SUBTRACTION IMPORTING IP_1 TYPE INT4
    IP_2 TYPE INT4
    EXPORTING OP_1 TYPE INT4.
    ENDCLASS.
    CLASS MY_CLASS IMPLEMENTATION.
    METHOD ADDITION.
    OP_1 = IP_1 + IP_2.
    ENDMETHOD.
    METHOD SUBTRACTION.
    OP_1 = IP_1 - IP_2.
    ENDMETHOD.
    ENDCLASS.
    START-OF-SELECTION.
    DATA: OBJ TYPE REF TO MY_CLASS.
    CREATE OBJECT OBJ.
    DATA: V_OUTPUT TYPE INT4.
    CALL METHOD OBJ->ADDITION EXPORTING IP_1 = 1
    IP_2 = 3
    IMPORTING OP_1 = V_OUTPUT.
    WRITE: / V_OUTPUT.
    Thanks,
    Naren

  • ABAP reports to ABAP Objects

    Hi all,
    What are the steps to be taken while converting a normal ABAP report program to ABAP objects? Also, How do we write a module(of a module pool program) in ABAP objects?
    Thanks in Advance,
    Aswin

    Use methods of a class instead of subrouties wherever possible.
    Declare the global variables in the attributes section of a class.
    Make sure that your design itself is more data centric than process centric.
    Regards,
    Ravi

  • ALV Reports using Abap Objects ?

    <b>Hi All,
    I am trying to print the values in my internal table using ALV, using ABAP classes and objects. Here i am able to get the total succesfully. but i need to get subtotals also, like based on the carrid in table sflight i need subtotal of price for every carrid like 'LH' , 'SQ'.
    here is my code:</b>
    REPORT znav_report.
    DATA: alv TYPE REF TO cl_salv_table,
    value1 TYPE REF TO cl_salv_aggregations,
    value2 TYPE REF TO cl_salv_aggregation.
    DATA: BEGIN OF itab_flight OCCURS 0,
    carrid LIKE sflight-carrid,
    connid LIKE sflight-connid,
    fldate LIKE sflight-fldate,
    price LIKE sflight-price,
    paymentsum LIKE sflight-paymentsum,
    currency LIKE sflight-currency,
    END OF itab_flight.
    SELECT carrid
    connid
    fldate
    price
    paymentsum
    currency
    FROM sflight INTO TABLE itab_flight
    WHERE carrid = 'LH' OR carrid = 'SQ'.
    cl_salv_table=>factory( IMPORTING r_salv_table = alv
    CHANGING t_table = itab_flight[] ).
    CALL METHOD alv->get_aggregations
    RECEIVING
    value = value1.
    CALL METHOD value1->add_aggregation
    EXPORTING
    columnname = 'PAYMENTSUM'
    aggregation = if_salv_c_aggregation=>total
    RECEIVING
    value = value2.
    alv->display( ).
    <b>here how to get subtotals for every different carrid.
    regards,
    Navneeth.K</b>

    Hi,
    Make use of one of these statement,,,,
    <b>Either</b>
    <b>(a)</b>  select carrid connid fldate price currency planetype into table itab_flight from sflight.
    <b>or</b>
    <b>(b)</b>  select * into corresponding fields of table itab_flight from sflight.
    <b>(a)</b> is better in performace than<b> (b)</b>
    <b>But before that, please note some performance related issues with OO Context...</b>
    1. When defining an Internal table, avoid occurs specification, It is Obsolete,Make use of Initial Size n.
    2. Declare Workarea separately,since Internal table defined along with header line is Obsolete in OO Context.Its better and more robust to fill the itab and fetch the values from itab using a separate Workarea rather than the header line... So avoid header lines...
    3. When defining an internal table, follow this way ....
          Define a Linetype (Field String) using the TYPES Statement
          TYPES: begin of ty_line,
                      f1 type i,
                      f2 type i,
                      end of ty_line.
          Then define a Table type using TYPES Statement...
         TYPES: ty_lines type standard table of ty_line with default key.   
      "there is differnnce between line and lines..... make it clear..."
        Then after, define the internal table and its work area using DATA statement... as shown below..
    DATA: i_lines type ty_lines,
              wa_lines like line of i_lines
    <b>This is the standard way of defining the internal table under OO Context.,,..
    Your definition is creating a default header line....that should be avoided...</b>
    Thanks for ur patience,
    Regards..
    Mohammed Anwar..

  • Interactive reports using ABAP query

    I have developed an ABAP query which prints the sales documents in ALV list display.
    In that  list display I would do develop a functionality is , when ever i double click on the sales doc number it will directly go to the VA03 transaction for the corresponding VBELN.
    Can anybody explain how to do this?

    Hi,
    When you double-click on any cell of alv, use this code to fetch the data of the line that you currently clicked, its working:-
    When you double click on the ALV line, you will have sy-ucomm = '&IC1'.
    So when you define a i_callback_user_command for the FM reuse_alv_list_display,
         i_callback_user_command           = 'COMMAND' " for User-Command
    and create it as:-
    FORM command USING ucomm LIKE sy-ucomm selfield TYPE slis_selfield.
      DATA : ok_code TYPE sy-ucomm.
      ok_code = ucomm.
      CASE ok_code.
        WHEN '&IC1'. "for double click on alv line
          " your code
      ENDCASE.
    ENDFORM.
    As you have used selfield TYPE slis_selfield, the field selfield will hold all the values.
    To know on which row you have clicked and to retain that line, use code:-
    Suppose you are currently displaying data from internal table itab and corresponding to it you have work area wa.
    read table itab into wa index selfield-tabindex. "index value of line you clicked
    " now you have the contents of line that you double clicked currently
    Now to know the field name that you clicked, use:-
    selfield-fieldname " will fetch you the name of field that you clicked
    Now using the work-area and the name of field that you clicked, you can easily make out the details of the field i.e., field name and field value and you can code as per your requirement.
    Refer:-
    CASE selfield-fieldname.
      WHEN 'VBELN'.
        SET PARAMETER ID 'AUN' FIELD <wa-vbeln>. "value for work area for vbeln
        CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
    ENDCASE.
    Hope this helps you.
    Regards,
    Tarun

  • ABAP Interactive report

    Hi,
    What is Interactive report?
    what are the specific statements you write when do u write interactive Report??
    Thanks in advance.

    Hi,
    t helps you to create easy-to-read lists. You can display an overview list first that contains general information and provide the user with the possibility of choosing detailed information that you display on further lists.
    What are the uses of interactive reporting?
    The user can actively control data retrieval and display during the session. Instead of an extensive and detailed list, you create a basic list with condensed information from which the user can switch to detailed displays by positioning the cursor and entering commands. The detailed information appears in secondary lists.
    What are the event key words in interactive reporting?
    Event Keyword Event
    AT LINE-SELECTION Moment at which the user selects a line by double clicking on it or by positioning the cursor on it and pressing F2.
    AT USER-COMMAND Moment at which the user presses a function key.
    TOP-OF-PAGE DURING Moment during list processing of a
    LINE-SELECTION secondary list at which a new page starts.
    What is secondary list?
    It allows you to enhance the information presented in the basic list. The user can, for example, select a line of the basic list for which he wants to see more detailed information. You display these details on a secondary list. Secondary lists may either overlay the basic list completely or you can display them in an extra window on the screen. The secondary lists can themselves be interactive again.
    How to select valid lines for secondary list?
    To prevent the user from selecting invalid lines, ABAP/4 offers several possibilities. At the end of the processing block END-OF-SELECTION, delete the contents of one or more fields you previously stored for valid lines using the HIDE statement. At the event AT LINE-SELECTION, check whether the work area is initial or whether the HIDE statement stored field contents there. After processing the secondary list, clear the work area again. This prevents the user from trying to create further secondary lists from the secondary list displayed.
    How to create user interfaces for lists?
    The R/3 system automatically, generates a graphical user interface (GUI) for your lists that offers the basic functions for list processing, such as saving or printing the list. If you want to include additional functionality, such as pushbuttons, you must define your own interface status. To create a new status, the Development Workbench offers the Menu Painter. With the Menu Painter, you can create menus and application toolbars. And you can assign Function Keys to certain functions. At the beginning of the statement block of AT END-OF-SELECTION, active the status of the basic list using the statement: SET PF-STATUS ‘STATUS’.
    What is interactive reporting?
    A classical non-interactive report consists of one program that creates a single list. Instead of one extensive and detailed list, with interactive reporting you create basic list from which the user can call detailed information by positioning the cursor and entering commands. Interactive reporting thus reduces information retrieval to the data actually required.
    Can we call reports and transactions from interactive reporting lists?
    Yes. It also allows you to call transactions or other reports from lists. These programs then use values displayed in the list as input values. The user can, for example, call a transaction from within a list of change the database table whose data is displayed in the list.
    What are system fields for secondary lists?
    SY-LSIND Index of the list created during the current event (basic list = 0)
    SY-LISTI Index of the list level from which the event was triggered.
    SY-LILLI Absolute number of the line from which the event was triggered.
    SY-LISEL Contents of the line from which the event was triggered.
    SY-CUROW Position of the line in the window from which the event was triggered (counting starts with 1)
    SY-CUCOL Position of the column in the window from which the event was triggered (counting starts with 2).
    SY-CPAGE Page number of the first displayed page of the list from which the event was triggered.
    SY-STARO Number of the first line of the first page displayed of the list from which the event was triggered (counting starts with 1). Possibly, a page header occupies this line.
    SY-STACO Number of the first column displayed in the list from which the event was triggered (counting starts with 1).
    SY-UCOMM Function code that triggered the event.
    SY-PFKEY Status of the displayed list.
    How to maintain lists?
    To return from a high list level to the next-lower level (SY-LSIND), the user chooses Back on a secondary list. The system then releases the currently displayed list and activates the list created one step earlier. The system deletes the contents of the released list. To explicitly specify the list level, into which you want to place output, set the SY-lsind field. The system accepts only index values, which correspond to existing list levels. It then deletes all existing list levels whose index is greater or equal to the index specify. For example, if you set SY-LSIND to 0, the system deletes all secondary lists and overwrites the basic list with the current secondary list.
    What are the page headers for secondary lists?
    On secondary lists, the system does not display a standard page header and it does not trigger the event. TOP-OF-PAGE. To create page headers for secondary list, you must enhance TOP-OF-PAGE: Syntax TOP-OF-PAGE DURING LINE-SELECTION. The system triggers this event for each secondary list. If you want to create different page headers for different list levels, you must program the processing block of this event accordingly, for example by using system fields such as SY-LSIND or SY-PFKEY in control statements (IF, CASE).
    How to use messages in lists?
    ABAP/4 allows you to react to incorrect or doubtful user input by displaying messages that influence the program flow depending on how serious the error was. Handling messages is mainly a topic of dialog programming. You store and maintain messages in Table T100. Messages are sorted by language, by a two-character ID, and by a three-digit number. You can assign different message types to each message you output. The influence of a message on the program flow depends on the message type. In our program, use the MESSAGE statement to output messages statically or dynamically and to determine the message type.
    Syntax:REPORT <rep> MESSAGE-ID <id>.
    What are the types of messages?
    A message can have five different types. These message types have the following effects during list processing:
    .A (=Abend):
    .E (=Error) or W (=Warning):
    .I (=Information):
    .S (=Success):
    What are the user interfaces of interactive lists?
    If you want the user to communicate with the system during list display, the list must be interactive. You can define specific interactive possibilities in the status of the list’s user interface (GUI). To define the statuses of interfaces in the R/3 system, use the Menu Painter tool. In the Menu Painter, assign function codes to certain interactive functions. After an user action occurs on the completed interface, the ABAP/4 processor checks the function code and, if valid, triggers the corresponding event.
    What are the drill-down features provided by ABAP/4 in interactive lists?
    ABAP/4 provides some interactive events on lists such as AT LINE-SELECTION (double click) or AT USER-COMMAND (pressing a button). You can use these events to move through layers of information about individual items in a list.
    What is meant by stacked list?
    A stacked list is nothing but secondary list and is displayed on a full-size screen unless you have specified its coordinates using the window command.
    Is the basic list deleted when the new list is created?
    No. It is not deleted and you can return back to it using one of the standard navigation functions like clicking on the back button or the cancel button.
    What is meant by hotspots?
    A Hotspot is a list area where the mouse pointer appears as an upright hand symbol. When a user points to that area (and the hand cursor is active), a single click does the same thing as a double-click. Hotspots are supported from R/3 release 3.0c.
    What is the length of function code at user-command?
    Each menu function, push button, or function key has an associated function code of length FOUR (for example, FREE), which is available in the system field SYUCOMM after the user action.
    Can we create a gui status in a program from the object browser?
    Yes. You can create a GUI STATUS in a program using SET PF-STATUS.
    In which system field does the name of current gui status is there?
    The name of the current GUI STATUS is available in the system field SY-PFKEY.
    Can we display a list in a pop-up screen other than full-size stacked list?
    Yes, we can display a list in a pop-up screen using the command WINDOW with the additions starting at X1 Y1 and ending at X2 Y2 to set the upper-left and the lower-right corners where x1 y1 and x2 y2 are the coordinates.
    What is meant by hide area?
    The hide command temporarily stores the contents of the field at the current line in a system-controlled memory called the HIDE AREA. At an interactive event, the contents of the field are restored from the HIDE AREA.
    When the get cursor command used in interactive lists?
    If the hidden information is not sufficient to uniquely identify the selected line, the command GET CURSOR is used. The GET CURSOR command returns the name of the field at the cursor position in a field specified after the addition field, and the value of the selected field in a field specified after value.
    How can you display frames (horizontal and vertical lines) in lists?
    You can display tabular lists with horizontal and vertical lines (FRAMES) using the ULINE command and the system field SY-VLINE. The corners arising at the intersection of horizontal and vertical lines are automatically drawn by the system.
    What are the events used for page headers and footers?
    The events TOP-OF-PAGE and END-OF-PAGE are used for pager headers and footers.
    How can you access the function code from menu painter?
    From within the program, you can use the SY-UCOMM system field to access the function code. You can define individual interfaces for your report and assign them in the report to any list level. If you do not specify self-defined interfaces in the report but use at least one of the three interactive event keywords. AT LINE-SELECTION, AT PF<nn>, OR AT USER-COMMAND in the program, the system automatically uses appropriate predefined standard interfaces. These standard interfaces provide the same functions as the standard list described under the standard list.
    How the at-user command serves mainly in lists?
    The AT USER-COMMAND event serves mainly to handle own function codes. In this case, you should create an individual interface with the Menu Painter and define such function codes.
    How to pass data from list to report?
    ABAP/4 provides three ways of passing data:
    ---Passing data automatically using system fields
    ---Using statements in the program to fetch data
    ---Passing list attributes
    How can you manipulate the presentation and attributes of interactive lists?
    ---Scrolling through Interactive Lists.
    ---Setting the Cursor from within the Program.
    ---Modifying List Lines.
    How to call other programs?
    Report Transaction
    Call and return SUBMIT AND RETURN CALL TRANSACTION
    Call without return SUBMIT LEAVE TO TRANSACTION
    You can use these statements in any ABAP/4 program.
    What will exactly the hide statement do?
    For displaying the details on secondary lists requires that you have previously stored the contents of the selected line from within the program. To do this, ABAP/4 provides the HIDE statement. This statement stores the current field contents for the current list line. When calling a secondary list from a list line for which the HIDE fields are stored, the system fills the stored values back into the variables in the program. In the program code, insert the HIDE statement directly after the WRITE statement for the current line. Interactive lists provide the user with the so-called ‘INTERACTIVE REPORTING’ facility. For background processing the only possible method of picking the relevant data is through ‘NON INTERACTIVE REPORT’ . After starting a background job, there is no way of influencing the program. But whereas for dialog sessions there are no such restrictions.
    How many lists can a program can produce?
    Each program can produce up to 21 lists: one basic list and 20 secondary lists. If the user creates a list on the next level (that is, SY-LSIND increases), the system stores the previous list and displays the new one. Only one list is active, and that is always the most recently created list.
    FALSE.
    *& Report ZLAXMI_REPORT6 *
    REPORT ZLAXMI_REPORT6 .
    tables: mara,
    makt,
    marc,
    mard.
    data: begin of it_mara occurs 0,
    matnr like mara-matnr,
    end of it_mara.
    data: begin of it_makt occurs 0,
    maktx like makt-maktx,
    matnr like makt-matnr,
    end of it_makt.
    data: begin of it_marc occurs 0,
    werks like marc-werks,
    matnr like marc-matnr,
    end of it_marc.
    data: begin of it_mard occurs 0,
    lgort like mard-lgort,
    labst like mard-labst,
    speme like mard-speme,
    matnr like mard-matnr,
    end of it_mard.
    data: begin of it_final occurs 0,
    matnr like mara-matnr,
    maktx like makt-maktx,
    werks like marc-werks,
    lgort like mard-lgort,
    labst like mard-labst,
    speme like mard-speme,
    end of it_final.
    selection-screen: begin of block b1 with frame title text-001.
    select-options: s_matnr for mara-matnr.
    selection-screen: end of block b1 .
    start-of-selection.
    perform get-data.
    perform write_data.
    end-of-selection.
    at line-selection.
    perform sec_list.
    *& Form get-data
    text
    --> p1 text
    <-- p2 text
    FORM get-data .
    select matnr
    from mara
    into table it_mara
    where matnr in s_matnr.
    if sy-subrc = 0.
    select maktx
    matnr from makt
    into table it_makt
    for all entries in it_mara
    where matnr = it_mara-matnr.
    endif.
    ENDFORM. " get-data
    *& Form write_data
    text
    --> p1 text
    <-- p2 text
    FORM write_data .
    loop at it_makt.
    write:/ it_makt-matnr, it_makt-maktx.
    endloop.
    ENDFORM. " write_data
    *& Form sec_list
    text
    --> p1 text
    <-- p2 text
    FORM sec_list .
    case sy-lsind.
    when '1'.
    perform basic_1.
    endcase.
    ENDFORM. " sec_list
    *& Form basic_1
    text
    --> p1 text
    <-- p2 text
    FORM basic_1 .
    select werks
    matnr
    from marc
    into table it_marc
    for all entries in it_makt
    where matnr = it_makt-matnr.
    if sy-subrc = 0.
    select lgort
    labst
    speme
    matnr
    from mard
    into table it_mard
    for all entries in it_makt
    where matnr = it_makt-matnr.
    endif.
    *clear it_makt.
    *clear it_mard.
    read table it_marc with key matnr = it_mara-matnr binary search.
    read table it_mard with key matnr = it_mara-matnr binary search.
    clear it_marc.
    clear it_mard.
    move:it_makt-matnr to it_final-matnr,
    it_makt-maktx to it_final-maktx.
    move: it_marc-werks to it_final-werks,
    it_mard-lgort to it_final-lgort,
    it_mard-labst to it_final-labst,
    it_mard-speme to it_final-speme.
    append it_final.
    *loop at it_final.
    write:/ it_final-matnr, it_final-maktx,
    it_final-werks,
    it_final-labst, it_final-speme.
    *endloop.
    ENDFORM. " basic_1
    regards,
    Omkar.

  • Interactive report and ALV s in HR ABAP.

    hi all,
         can any one tell , how to do  Interactive reporting  and alv's in HR ABAP. with some example reports..

    Hi Rao
    Nothing changes for HR ABAP when it comes to ALV or Interactive Lists. Only the DATA fetching process is changed. To fetch HR data , you use Logical Database PNP or Clusters or just read a specific infotype using a method.
    Here is a sample program for ALV 'BALVST02_GRID'. For interactive list , use this demo program
    DEMO_LIST_INTERACTIVE_1. It is a series of Demo Programs which you can open in SE38.
    Reward Points, if helpful.
    Regards
    Waz

  • 'gReport' is null or not an object - Interactive Report

    I'm getting a "'gReport' is null or not an object" error when attempting to use the Search bar in an Interactive Report. Based on googling and searching this forum, it seems likely that the Javascript on the page is interferring w/ the Interactive report somehow. I don't know enough about APEX and Javascript (I snagged the code from another application, and made some changes) to debug it, so I was hoping you guys could help.
    Here's the Javascript on my page:
    Header Text:
    <script language="javascript">
        function OnPageLoad() {
            var cmdButton;
            cmdButton = document.getElementById('CMD_P10_BASEPRODUCT');
            cmdButton.onclick = null;
            cmdButton.attachEvent("onclick", cmdSelectBaseproduct_onClick);
            cmdButton = document.getElementById('CMD_P10_CUSTOMER');
            cmdButton.onclick = null;
            cmdButton.attachEvent("onclick", cmdSelectCustomer_onClick);
            cmdButton = document.getElementById('CMD_P10_PRODUCT');
            cmdButton.onclick = null;
            cmdButton.attachEvent("onclick", cmdSelectProducts_onClick);
            cmdButton = document.getElementById('CMD_P10_VERSION');
            cmdButton.onclick = null;
            cmdButton.attachEvent("onclick", cmdSelectVersion_onClick);
            cmdButton = document.getElementById('CMD_P10_RUNREPORT');
            DisableItems();
        function cmdSelectBaseproduct_onClick() {
            PopupCriteriaListButton1_onClick('H_P10_BASEPRODIDLIST', 'TXT_P10_BASEPRODUCT', 26, 350, 300);
            DisableItems();
            GetPageURL();
        function cmdSelectProducts_onClick() {
            PopupCriteriaListButton3_onClick('H_P10_PRODUCTIDLIST', 'TXT_P10_PRODUCT', 22, 1350, 575);
            DisableItems();
        function cmdSelectVersion_onClick() {
            PopupCriteriaListButton4_onClick('H_P10_VERSIONIDLIST', 'TXT_P10_VERSION', 21, 1550, 575);
            DisableItems();
        function cmdSelectCustomer_onClick() {
            PopupCriteriaListButton3_onClick('H_P10_CUSTOMERIDLIST', 'TXT_P10_CUSTOMER', 14, 1350, 575);
            DisableItems();
        function PopupCriteriaListButton1_onClick(hiddenInputControlName, strTextControlName, intPopupPageID,
    intWidth, intHeight) {
            var strIDList = document.getElementById(hiddenInputControlName).value.replace(new RegExp(/,/g),
    "_") + ',' + document.getElementById('CBO_P10_PRODUCTLINE').value;
            var itemVal = document.getElementById('CBO_P10_PRODUCTLINE').value;
            var returnValue = OpenDialog(intPopupPageID, true, intWidth, intHeight, 'H_P' + intPopupPageID +
    '_IDLIST,CBO_P10_PRODUCTLINE', strIDList);
            if (returnValue != undefined && returnValue != null && returnValue.length > 0) {
                document.getElementById(hiddenInputControlName).value = returnValue.split('|')[0];
                document.getElementById(strTextControlName).value = returnValue.split('|')[1];
        function PopupCriteriaListButton3_onClick(hiddenInputControlName, strTextControlName, intPopupPageID,
    intWidth, intHeight) {
            var strIDList = document.getElementById(hiddenInputControlName).value.replace(new RegExp(/,/g),
    "_") + ',' + document.getElementById('H_P10_BASEPRODIDLIST').value;
            var returnValue = OpenDialog(intPopupPageID, true, intWidth, intHeight, 'H_P' + intPopupPageID +
    '_IDLIST,H_P10_BASEPRODIDLIST', strIDList);
            if (returnValue != undefined && returnValue != null && returnValue.length > 0) {
                document.getElementById(hiddenInputControlName).value = returnValue.split('|')[0];
                document.getElementById(strTextControlName).value = returnValue.split('|')[1];
    function PopupCriteriaListButton4_onClick(hiddenInputControlName, strTextControlName, intPopupPageID,
    intWidth, intHeight) {
            var strIDList = document.getElementById(hiddenInputControlName).value.replace(new RegExp(/,/g),
    "_") + ',' + document.getElementById('H_P10_PRODUCTIDLIST').value;
            var returnValue = OpenDialog(intPopupPageID, true, intWidth, intHeight, 'H_P' + intPopupPageID +
    '_IDLIST,H_P10_PRODUCTIDLIST', strIDList);
            if (returnValue != undefined && returnValue != null && returnValue.length > 0) {
                document.getElementById(hiddenInputControlName).value = returnValue.split('|')[0];
                document.getElementById(strTextControlName).value = returnValue.split('|')[1];
    </script>
    Page HTML Body Attribute:
    onload="OnPageLoad();"

    Hi Jari,
    The below function used work perfectly in APEX 3.2 for
    Pulling Page2 IR Report into Page1 Region having
    but in APEX 4.0, I am getting "gReport is undefined" when I click on IR Toolbar/Control panel like Action or Go
    function periodRep(){
    $.ajax({
    type: "POST",
    url: "wwv_flow.show",
    data: {
    p_flow_id : $v('pFlowId'),
    p_instance : $v('pInstance'),
    p_flow_step_id : "2",
    p_request : ""
    dataType : "html",
    success : function(data){
    var startTag = '<apex2ajax>';
    var endTag = '</apex2ajax>';
    var start = data.indexOf(startTag);
    if (start > 0) {
    data = data.substring(start+startTag.length);
    var end = data.indexOf(endTag);
    data = data.substring(0,end);
    $("div#XXHOLDER").html(data);
    $x_Value('pFlowStepId', "2");
    if($('#apexir_CONTROL_PANEL_COMPLETE').length > 0){
    if(!($('#apexir_CONTROL_PANEL_COMPLETE').css('display') == 'none')){
    gReport = new apex.worksheet.ws('');
    gReport.toggle_controls($x('apexir_CONTROL_PANEL_CONTROL'));
    }); //ajax
    }//periodRep
    Please help
    Thanks
    -Senthil K

  • Is it a good idea to use ABAP objects for reports?

    Hello Experts,
    Is it a good idea to use ABAP objects instead of the traditional ABAP for coding reports?

    Hi,
    Go throught Document it will Give you eight Reasons why OOABAP Should be used.
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/37c5db90-0201-0010-3a9b-d0a5288f3c15
    Must go through
    Regards,
    Gurpreet

  • ALV Tree Report without using ABAP Objects

    Hi all,
    I want to know the name of a function module to create ALV Tree in SE38 as a report. I am required to create this ALV Tree Report without using ABAP OBJECTS. Can u pls help me as early as possible.

    Hi
    see this link
    http://www.sapdev.co.uk/reporting/alv/alvtree.htm
    *& Report  ZBCALV_TREE
    REPORT  ZBCALV_TREE.
    class cl_gui_column_tree definition load.
    class cl_gui_cfw definition load.
    data tree1  type ref to cl_gui_alv_tree.
    data mr_toolbar type ref to cl_gui_toolbar.
    include <icon>.
    include bcalv_toolbar_event_receiver.
    include bcalv_tree_event_receiver.
    data: toolbar_event_receiver type ref to lcl_toolbar_event_receiver.
    data: gt_VBAK  type VBAK occurs 0,      "Output-Table
          gt_fieldcatalog type lvc_t_fcat, "Fieldcatalog
          ok_code like sy-ucomm.           "OK-Code
    start-of-selection.
    end-of-selection.
      call screen 100.
    *&      Module  STATUS_0100  OUTPUT
          text
    module STATUS_0100 output.
      SET PF-STATUS 'MAIN'.
    if tree1 is initial.
        perform Zinit_tree.
      endif.
      call method cl_gui_cfw=>flush.
    endmodule.                 " STATUS_0100  OUTPUT
    *&      Form  Zinit_tree
          text
    -->  p1        text
    <--  p2        text
    form Zinit_tree .
    perform Zbuild_fieldcatalog.
    create container for alv-tree
    data: l_tree_container_name(30) type c,
            l_custom_container type ref to cl_gui_custom_container.
      l_tree_container_name = 'TREE1'.
    if sy-batch is initial.
        create object l_custom_container
          exporting
                container_name = l_tree_container_name
          exceptions
                cntl_error                  = 1
                cntl_system_error           = 2
                create_error                = 3
                lifetime_error              = 4
                lifetime_dynpro_dynpro_link = 5.
        if sy-subrc <> 0.
          message x208(00) with 'ERROR'.                        "#EC NOTEXT
        endif.
      endif.
    create tree control
      create object tree1
        exporting
            parent              = l_custom_container
            node_selection_mode = cl_gui_column_tree=>node_sel_mode_single
            item_selection      = 'X'
            no_html_header      = ''
            no_toolbar          = ''
        exceptions
            cntl_error                   = 1
            cntl_system_error            = 2
            create_error                 = 3
            lifetime_error               = 4
            illegal_node_selection_mode  = 5
            failed                       = 6
            illegal_column_name          = 7.
      if sy-subrc <> 0.
        message x208(00) with 'ERROR'.                          "#EC NOTEXT
      endif.
    create Hierarchy-header
      data l_hierarchy_header type treev_hhdr.
      perform zbuild_hierarchy_header changing l_hierarchy_header.
    create info-table for html-header
      data: lt_list_commentary type slis_t_listheader,
            l_logo             type sdydo_value.
      perform Zbuild_comment using
                     lt_list_commentary
                     l_logo.
    repid for saving variants
      data: ls_variant type disvariant.
      ls_variant-report = sy-repid.
    create emty tree-control
      call method tree1->set_table_for_first_display
        exporting
          is_hierarchy_header = l_hierarchy_header
          it_list_commentary  = lt_list_commentary
          i_logo              = l_logo
          i_background_id     = 'ALV_BACKGROUND'
          i_save              = 'A'
          is_variant          = ls_variant
        changing
          it_outtab           = gt_VBAK "table must be emty !!
          it_fieldcatalog     = gt_fieldcatalog.
    create hierarchy
      perform Zcreate_hierarchy.
    add own functioncodes to the toolbar
      perform zchange_toolbar.
    register events
      perform zregister_events.
    endform.                    " Zinit_tree
    *&      Form  Zbuild_fieldcatalog
          text
    -->  p1        text
    <--  p2        text
    form Zbuild_fieldcatalog .
    get fieldcatalog
      call function 'LVC_FIELDCATALOG_MERGE'
        exporting
          i_structure_name = 'VBAK'
        changing
          ct_fieldcat      = gt_fieldcatalog.
      sort gt_fieldcatalog by scrtext_l.
    change fieldcatalog
      data: ls_fieldcatalog type lvc_s_fcat.
      loop at gt_fieldcatalog into ls_fieldcatalog.
        case ls_fieldcatalog-fieldname.
          when 'AUART' .
            ls_fieldcatalog-no_out = 'X'.
            ls_fieldcatalog-key    = ''.
        endcase.
        modify gt_fieldcatalog from ls_fieldcatalog.
      endloop.
    endform.                    " Zbuild_fieldcatalog
    *&      Form  zbuild_hierarchy_header
          text
         <--P_L_HIERARCHY_HEADER  text
    form zbuild_hierarchy_header changing
                                   p_hierarchy_header type treev_hhdr.
      p_hierarchy_header-heading = 'Hierarchy Header'.          "#EC NOTEXT
      p_hierarchy_header-tooltip =
                             'This is the Hierarchy Header !'.  "#EC NOTEXT
      p_hierarchy_header-width = 30.
      p_hierarchy_header-width_pix = ''.
    endform.                    " zbuild_hierarchy_header
    *&      Form  Zbuild_comment
          text
         -->P_LT_LIST_COMMENTARY  text
         -->P_L_LOGO  text
    form Zbuild_comment   using
                           pt_list_commentary type slis_t_listheader
                           p_logo             type sdydo_value.
    data: ls_line type slis_listheader.
    LIST HEADING LINE: TYPE H
      clear ls_line.
      ls_line-typ  = 'H'.
    LS_LINE-KEY:  NOT USED FOR THIS TYPE
      ls_line-info = 'ALV-tree-demo: flight-overview'.          "#EC NOTEXT
      append ls_line to pt_list_commentary.
    STATUS LINE: TYPE S
      clear ls_line.
      ls_line-typ  = 'S'.
      ls_line-key  = 'valid until'.                             "#EC NOTEXT
      ls_line-info = 'January 29 1999'.                         "#EC NOTEXT
      append ls_line to pt_list_commentary.
      ls_line-key  = 'time'.
      ls_line-info = '2.00 pm'.                                 "#EC NOTEXT
      append ls_line to pt_list_commentary.
    ACTION LINE: TYPE A
      clear ls_line.
      ls_line-typ  = 'A'.
    LS_LINE-KEY:  NOT USED FOR THIS TYPE
      ls_line-info = 'actual data'.                             "#EC NOTEXT
      append ls_line to pt_list_commentary.
      p_logo = 'ENJOYSAP_LOGO'.
    endform.                    " Zbuild_comment
    *&      Form  Zcreate_hierarchy
          text
    -->  p1        text
    <--  p2        text
    form Zcreate_hierarchy .
    data: ls_vbak type vbak,
          lt_vbak  type vbak occurs 0.
    get data
      select * from vbak into table lt_vbak
                            up to 200 rows .                "#EC CI_NOWHERE
      sort lt_vbak by AUART.
    add data to tree
      data: l_AUART_key type lvc_nkey.
    loop at lt_vbak into ls_vbak.
        on change of ls_vbak-AUART.
          perform Zadd_AUART_line using   ls_vbak
                                  changing l_AUART_key.
        endon.
      endloop.
    calculate totals
      call method tree1->update_calculations.
    this method must be called to send the data to the frontend
      call method tree1->frontend_update.
    endform.                    " Zcreate_hierarchy
    *&      Form  Zadd_AUART_line
          text
         -->P_LS_vbak  text
         -->P_0379   text
         <--P_L_AUART_KEY  text
    form Zadd_AUART_line  using    p_ls_vbak type vbak
                                   p_relat_key type lvc_nkey
                         changing  p_node_key type lvc_nkey.
      data: l_node_text type lvc_value,
            ls_vbak type vbak.
    set item-layout
      data: lt_item_layout type lvc_t_layi,
            ls_item_layout type lvc_s_layi.
      ls_item_layout-t_image = '@3P@'.
      ls_item_layout-fieldname = tree1->c_hierarchy_column_name.
      ls_item_layout-style   =
                            cl_gui_column_tree=>style_intensifd_critical.
      append ls_item_layout to lt_item_layout.
    add node
      l_node_text =  p_ls_vbak-AUART.
      data: ls_node type lvc_s_layn.
      ls_node-n_image   = space.
      ls_node-exp_image = space.
      call method tree1->add_node
        exporting
          i_relat_node_key = p_relat_key
          i_relationship   = cl_gui_column_tree=>relat_last_child
          i_node_text      = l_node_text
          is_outtab_line   = ls_vbak
          is_node_layout   = ls_node
          it_item_layout   = lt_item_layout
        importing
          e_new_node_key   = p_node_key .
    endform.                    " Zadd_AUART_line
    *&      Form  zchange_toolbar
          text
    -->  p1        text
    <--  p2        text
    form zchange_toolbar .
    get toolbar control
      call method tree1->get_toolbar_object
        importing
          er_toolbar = mr_toolbar.
      check not mr_toolbar is initial.
    add seperator to toolbar
      call method mr_toolbar->add_button
        exporting
          fcode     = ''
          icon      = ''
          butn_type = cntb_btype_sep
          text      = ''
          quickinfo = 'This is a Seperator'.                    "#EC NOTEXT
    add Standard Button to toolbar (for Delete Subtree)
      call method mr_toolbar->add_button
        exporting
          fcode     = 'DELETE'
          icon      = '@18@'
          butn_type = cntb_btype_button
          text      = ''
          quickinfo = 'Delete subtree'.                         "#EC NOTEXT
    add Dropdown Button to toolbar (for Insert Line)
      call method mr_toolbar->add_button
        exporting
          fcode     = 'INSERT_LC'
          icon      = '@17@'
          butn_type = cntb_btype_dropdown
          text      = ''
          quickinfo = 'Insert Line'.                            "#EC NOTEXT
    set event-handler for toolbar-control
      create object toolbar_event_receiver.
      set handler toolbar_event_receiver->on_function_selected
                                                          for mr_toolbar.
      set handler toolbar_event_receiver->on_toolbar_dropdown
                                                          for mr_toolbar.
    endform.                    " zchange_toolbar
    *&      Form  zregister_events
          text
    -->  p1        text
    <--  p2        text
    form zregister_events .
    define the events which will be passed to the backend
      data: lt_events type cntl_simple_events,
              l_event type cntl_simple_event.
    define the events which will be passed to the backend
      l_event-eventid = cl_gui_column_tree=>eventid_expand_no_children.
      append l_event to lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_checkbox_change.
      append l_event to lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_header_context_men_req.
      append l_event to lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_node_context_menu_req.
      append l_event to lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_item_context_menu_req.
      append l_event to lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_header_click.
      append l_event to lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_item_keypress.
      append l_event to lt_events.
      call method tree1->set_registered_events
        exporting
          events                    = lt_events
        exceptions
          cntl_error                = 1
          cntl_system_error         = 2
          illegal_event_combination = 3.
      if sy-subrc <> 0.
        message x208(00) with 'ERROR'.                          "#EC NOTEXT
      endif.
    set Handler
      data: l_event_receiver type ref to lcl_tree_event_receiver.
      create object l_event_receiver.
      set handler l_event_receiver->handle_node_ctmenu_request
                                                            for tree1.
      set handler l_event_receiver->handle_node_ctmenu_selected
                                                            for tree1.
      set handler l_event_receiver->handle_item_ctmenu_request
                                                            for tree1.
      set handler l_event_receiver->handle_item_ctmenu_selected
                                                            for tree1.
    endform.                    " zregister_events
    *&      Module  USER_COMMAND_0100  INPUT
          text
    module USER_COMMAND_0100 input.
    ok_code  = sy-ucomm.
    clear sy-ucomm.
    case ok_code.
        when 'EXIT' or 'BACK' or 'CANC'.
          perform Zexit_program.
        when others.
          call method cl_gui_cfw=>dispatch.
      endcase.
      clear ok_code.
      call method cl_gui_cfw=>flush.
    endmodule.                 " USER_COMMAND_0100  INPUT
    *&      Form  Zexit_program
          text
    -->  p1        text
    <--  p2        text
    form Zexit_program .
      call method tree1->free.
      leave program.
    endform.                    " Zexit_program
    <b>Reward if usefull</b>

  • ABAP interactive report problem

    ABAP - Interactive Report problem.
    In Interactive report when I double click to one field a window arises (here sy-lsind = 0) displaying some required info. And again after double clicking the appeared window another window will open (here sy-lsind = 1). from the 2nd window I can't go to the previous window.
    If there is only one way to go to the previous window is to activate the RIGHT UPPER CROSS OPTION of the particular window, then please help me giving the code or idea about how to activate it. Thanks.

    Moderator message - Welcome to SCN
    Cross posting is not allowed in these forums.
    Please read [Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement], How to post code in SCN, and some things NOT to do... and [Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers] before posting again.
    Thread locked
    Rob

  • Need sample program OO abap alv using  hotspot( interactive report)

    need sample program on Object Oriented program using alv interactive report.

    *& Report Z8VM_N_PO_PRICING_CONDITION *
    REPORT Z8VM_N_PO_PRICING_CONDITION NO STANDARD PAGE HEADING
    MESSAGE-ID Z8VM.
    vivekanand meghmala
    trial assignment
    po with pricing condition interactive report with checkbox
    data declaration
    TYPES : BEGIN OF STRUCT_EKKO, "po header
    BUKRS LIKE T001-BUKRS,
    EBELN LIKE EKKO-EBELN,
    BSART LIKE EKKO-BSART,
    BEDAT LIKE EKKO-BEDAT,
    EKORG LIKE EKKO-EKORG,
    WAERS LIKE EKKO-WAERS,
    LIFNR LIKE EKKO-LIFNR,
    KNUMV LIKE EKKO-KNUMV,
    END OF STRUCT_EKKO.
    TYPES : BEGIN OF STRUCT_EKPO, "po details
    EBELN LIKE EKPO-EBELN,
    EBELP LIKE EKPO-EBELP,
    MATNR LIKE EKPO-MATNR,
    END OF STRUCT_EKPO.
    TYPES : BEGIN OF STRUCT_KONV,
    KNUMV LIKE KONV-KNUMV,
    KPOSN LIKE KONV-KPOSN,
    KSCHL LIKE KONV-KSCHL,
    KAWRT LIKE KONV-KAWRT,
    KBETR LIKE KONV-KBETR,
    END OF STRUCT_KONV.
    DATA : IT_EKKO TYPE STANDARD TABLE OF STRUCT_EKKO WITH HEADER LINE.
    DATA : IT_EKPO TYPE STANDARD TABLE OF STRUCT_EKPO WITH HEADER LINE.
    DATA : IT_KONV TYPE STANDARD TABLE OF STRUCT_KONV WITH HEADER LINE.
    PARAMETERS : T_BUKRS LIKE EKKO-BUKRS .
    SELECT-OPTIONS : S_BEDAT FOR IT_EKKO-BEDAT.
    SELECT-OPTIONS : S_EKORG FOR IT_EKKO-EKORG.
    validations
    AT SELECTION-SCREEN.
    IF T_BUKRS = ' '.
    MESSAGE E009.
    ENDIF.
    SELECT BUKRS FROM T001
    INTO CORRESPONDING FIELDS OF IT_EKKO
    WHERE BUKRS = T_BUKRS.
    EXIT.
    ENDSELECT.
    IF SY-SUBRC 0.
    MESSAGE E001.
    ENDIF.
    logic
    START-OF-SELECTION.
    SELECT BUKRS
    EBELN
    BSART
    BEDAT
    EKORG
    WAERS
    LIFNR
    KNUMV FROM EKKO INTO CORRESPONDING FIELDS OF TABLE IT_EKKO
    WHERE BUKRS = T_BUKRS
    AND BEDAT IN S_BEDAT
    AND EKORG IN S_EKORG.
    SELECT EBELN
    EBELP
    MATNR FROM EKPO INTO CORRESPONDING FIELDS OF IT_EKPO
    FOR ALL ENTRIES IN IT_EKKO WHERE EBELN = IT_EKKO-EBELN.
    APPEND IT_EKPO.
    ENDSELECT.
    LOOP AT IT_EKPO.
    SELECT KNUMV
    KPOSN
    KSCHL
    KAWRT
    KBETR FROM KONV INTO CORRESPONDING FIELDS OF IT_KONV
    WHERE KPOSN = IT_EKPO-EBELP.
    APPEND IT_KONV.
    ENDSELECT.
    ENDLOOP.
    *data printing
    LOOP AT IT_EKKO.
    WRITE :/ IT_EKKO-BUKRS,IT_EKKO-EBELN,IT_EKKO-BSART,IT_EKKO-BEDAT,
    IT_EKKO-EKORG,IT_EKKO-WAERS,IT_EKKO-LIFNR,IT_EKKO-KNUMV.
    LOOP AT IT_EKPO WHERE EBELN = IT_EKKO-EBELN.
    WRITE :/ IT_EKPO-EBELP,IT_EKPO-MATNR.
    LOOP AT IT_KONV.
    WHERE KPOSN = IT_EKPO-EBELN.
    WRITE :/ IT_KONV-KNUMV COLOR 3,IT_KONV-KPOSN COLOR 3,IT_KONV-KSCHL COLOR 3,IT_KONV-KAWRT COLOR 3,IT_KONV-KBETR COLOR 3.
    ENDLOOP.
    ENDLOOP.
    ENDLOOP.[/code]
    thanks
    reward if helpful

  • Bug - Database Object Dependencies report and Interactive Reports

    Hello,
    I think I found a bug, perhaps that not the right word, in the Database Object Dependencies report. I don't think it's including problems in Interactive Report regions.
    Regards,
    Dan
    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen

    Scott,
    Sorry, that was a useless bug report... ;)
    What I was actually referring to was the little Parsing Errors report at the bottom of the page/report. I've come to rely on this quite a bit but I had an Interactive Report that was based in part on a table that was dropped and it was not displayed in the parsing errors. I believe the main report is working fine.
    Regards,
    Dan
    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen

  • Interactive report in sap-abap

    hi experts,
    i want to know how we display the end-of-page in second secondary list? in interactive reporting.
      regards
      cnu.

    Hello dear,
    End-of-page is common for every list.
    if you have 5 pages on your basic then it will show you 1 to 5 number. when you have 2 pages on you secondary list you will have 1 to 2 page number.
    if you want to dispaly text according to list number then write case statement and and check ...
    end-of-page
    case sy-lsind
    when '1'.
      write:/ 'first page'.
    when '2'.
      write:/ 'sceond page'.
    and so on.....
    endcase.

  • Abap interactive reports

    Code to develop a sales report, which is an interactive report that gives the complete information of sales based upon the sales office, sales group and the sales area.

    Hi Lalith,
         Check this, It will help you.
    https://forums.sdn.sap.com/click.jspa?searchID=2651341&messageID=1671145.
    Thanks.

Maybe you are looking for

  • Mat doc not getting updated in AFRU table

    Hi All,   While doing the confirmation cancellation for the rework order the referance material document is not getting updated in the AFRU table.   The referance operation set is used for the rework production order and there are no component assign

  • Reporting Agent job getting cancelled

    Hi all, Jobs scheduled using Reporting Agent to load data into cache memory is getting cancelled with the below mentioned message in the job log. System error in program SAPLRRK0 and form SX_TO_BDATA_ELSE-02- (see long text) What could the possible r

  • Error during invokation of webservices: "error: unknown java type:"

    hi, I'm having issues with invoking a webservice from the "WebLogic Test Client". The webservice exposes the methods from a stateless session EJB and Weblogic Workshop was used to create the webservice controls Weblogic version: 10.0 mp1 Pls. advise.

  • Photoshop Elements 12 download issue

    Files on the download site for Adobe Photoshop Elements 12 are not complete. The installation errors out. Should be 1.6GB but only 1.13 GB downloads. I have tried it several times

  • SOA architecture

    hi all experts, Can anyone explain me one business scenario with Service oriented architecture. and some business cases. Thanks Sam