Classical report coding

can anybody send coding for classical report?

hi,
check the code below
*& Report  ZWK12346
REPORT  zwk12346 LINE-SIZE 160 LINE-COUNT 35(3) NO STANDARD PAGE HEADING.
...............DECLARATION OF TABLES..................................
TABLES: mkpf,
        mseg,
        makt.
.............AT SELECTION SCREEN.....................................*
SELECT-OPTIONS b FOR mkpf-mblnr. "Document no.
PARAMETERS: a TYPE mkpf-mjahr. "Document year.
DATA: am TYPE mseg-dmbtr VALUE 0.
.................DECLARATION OF WORK AREA.............................
DATA: BEGIN OF wa,
      mblnr TYPE mkpf-mblnr,
      mjahr TYPE mkpf-mjahr,
      budat TYPE mkpf-budat,
      matnr TYPE mseg-matnr,
      maktx TYPE makt-maktx,
      werks TYPE mseg-werks,
      dmbtr TYPE mseg-dmbtr,
      END OF wa.
..............INTERNAL TABLE DELARATION..............................*
DATA: itab LIKE STANDARD TABLE OF wa.
...............CONSTANT...............................................
...............GLOBAL VARIABLES.......................................
..............TOP-OF-PAGE.............................................
TOP-OF-PAGE.
  FORMAT COLOR COL_HEADING.
  WRITE: / sy-uline(150).
  WRITE:/ sy-vline,
         3 'Document No.',
         17 sy-vline,
         20 'Document Year',
         37 sy-vline,
         38 'Posting Date',
         54 sy-vline,
         56 'Material No.',
         72 sy-vline,
         74 'Description',
         118 sy-vline,
         120 'Plant',
         130 sy-vline,
         132 'Amount',
         150 sy-vline.
  WRITE: / sy-uline(150).
  FORMAT RESET.
.............END-OF-PAGE.............................................
END-OF-PAGE.
  WRITE: / sy-uline(150).
  FORMAT COLOR COL_TOTAL.
  WRITE: /128 'Total', am.
......................START OF SELECTION.............................
START-OF-SELECTION.
  SELECT mmblnr mmjahr mbudat qmatnr pmaktx qwerks q~dmbtr INTO CORRESPONDING FIELDS OF TABLE itab
         FROM ( ( mkpf AS m INNER JOIN mseg AS q ON mmblnr = qmblnr )
                  INNER JOIN makt AS p ON pmatnr = qmatnr )
                   WHERE m~mjahr = a.
..............Exit if Data is not fetched............................
  IF sy-subrc NE 0.
    WRITE: / 'No data selected'.
    EXIT.
  ENDIF.
.....................END OF SELECTION................................
  LOOP AT itab INTO wa.
    WRITE:/ sy-vline,
           3 wa-mblnr COLOR COL_KEY,
           17 sy-vline COLOR COL_KEY,
            20 wa-mjahr COLOR COL_KEY,
            37 sy-vline,
             38 wa-budat,54 sy-vline,
             56 wa-matnr COLOR COL_KEY,
             72 sy-vline,
             74 wa-maktx,
            118 sy-vline,
             120 wa-werks,
             130 sy-vline,
             132 wa-dmbtr,
             150 sy-vline.
  ENDLOOP.
  WRITE: / sy-uline(150).
regards,
Navneeth.K

Similar Messages

  • How to update the table when change list item in classic report

    hi ,
    i worked with apex 4.2 and i create normal classic report with one select list(named loved)Column ,now i want to update table when user change the list with new value ,i can't create dynamic action to do this,i create check box with primary key and loop for check item to update the table but i can't get the value of list item. and for more speed the user want to do this when change the list value.
    my question
    1- how to do this by javascript and get the value from list item and update the table with new value
    2- is i must use API to create list item so i can get the value of item in report or what.
    Thanks
    Ahmed

    I coded the following to give you direction:
    1. In the "Element Attributes" section of the DEPTNO column, I call a javascript function as:
    onchange = "javascript:updateTable(this);"2. I wrote a simple javascript function that shows an alert when the user changes the select list as:
    <script language="JavaScript" type="text/javascript">
    function updateTable(pThis)
        var vRow = pThis.id.substr(pThis.id.indexOf('_')+1);
        alert('Row# - '+ vRow + ' has the value - ' + pThis.value);
    </script>Now, you can call a AJAX on-demand process inside the javascript function to update the database value.

  • Regarding classical report

    Hi Experts,
    I have made a classical report having delivery no, sales order no and shipment no and many other details. Now I want to make three hot keys in this i.e
    Delivery no (VBELN)
    Sales order no (VBELV)
    and Shipment no (TKNUM)
    I did coding like this
    at LINE-SELECTION.
      DATA: l_vbeln TYPE VBELN_VL,
            l_vbelv type VBELV,
            l_tknum type TKNUM.
      get CURSOR FIELD likp-vbeln VALUE l_vbeln.
      set PARAMETER ID 'VL' FIELD l_vbeln.
      CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN.
    get CURSOR FIELD lips-vbelv VALUE l_vbelv.
      set PARAMETER ID 'AUN' FIELD l_vbeln.
      CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
    get CURSOR FIELD vttp-tknum VALUE l_tknum.
      set PARAMETER ID 'TNR' FIELD l_tknum.
      CALL TRANSACTION 'VT03N' AND SKIP FIRST SCREEN.
    But I am facing a probelm in this:
    Whichever hot key i am clicking,it's opening all the transaction with that key for exam say I am clicking vbeln with value 'A' it's first opening VL03N. After this when i am clicking back, It's opening VAL0 with same key A (It's shoing Invalid Sales order no) and after that it's opeing VT03N with the same key.
    Please tell me how I can open only the trancation for which user is clicking.
    Thanks a lot
    Regards
    Krishan

    Hi,
    Pl. check this sample code..may be it will help u.
    *& Report  Z_DEMO_JG
    *& Download graphics from BDS
    REPORT  z_demo_jg.
    data: i_mara type standard table of mara.
    data: w_mara type mara.
    data: i_vbak type standard table of vbak.
    data: w_vbak type vbak.
    start-of-selection.
    select * from mara
    into table i_mara
    up to 10 rows.
    select * from vbak
    into table i_vbak
    up to 10 rows.
    loop at i_mara into w_mara.
    write : / w_mara-matnr.
    hide w_mara-matnr.
    endloop.
    loop at i_vbak into w_vbak.
    write : / w_vbak-vbeln.
    hide w_vbak-vbeln.
    endloop.
    clear : w_vbak,
            w_mara.
    at LINE-SELECTION.
    if not w_vbak-vbeln is initial.
    set PARAMETER ID 'VL' FIELD w_vbak-vbeln.
    CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN.
    clear w_vbak-vbeln.
    endif.
    if not w_mara-matnr is initial.
    set PARAMETER ID 'MAT' FIELD w_mara-matnr.
    CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
    clear w_mara-matnr.
    endif.
    Regards,
    JOy.

  • Viewing a BLOB Data (Including Compressed Data) in Classic Report APEX 3.2

    Hi All,
    I have a table with a BLOB field.
    That blob field is containing image with .tiff format.
    I need to display those images in APEX 3.2 Classic Report.
    Am able to achieve this by following the instructions in the below link.
    http://st-curriculum.oracle.com/obe/db/apex/r31/apex31nf/apex31blob.htm#t4
    Now my problem is, Some of the image in my table is in compressed format.
    So those images are not displaying in the report, rather it is giving a message called 'No Preview Available'.
    How can i extract those images and display in the Classic Report.
    Please help me to achieve this.
    Thanks & Regards,
    Sakthi.

    What kind of compression are we talking about here ?
    <li>If its some kind of native image compression methods, then you could try the ORDImage utlity, here's a thread which discusses that : {thread:id=1048248}
    If its compressed using zip or some file compression utility, you may need to load the java code(into the DB) that can uncompress it for you and then call it from procedure which then uncompress'es it(using java class) and then send it back as an image(programmatic way way of showing images in apex).
    There posts should be of assistance
    <li>Extract XML from docx . Forget the post title , this post has some code which uncompresses a zip file in the database(ignore the rest of the post, if irrelevant).
    <li>Another posting about the same requirement, but with code for unzipping which you can adapt
    <li>If you are not in a hurry, this Oracle-Sun Java documentation explains the whole process of compression/uncompression with code that you can process within the database(from PLSQL using java wrapper)
    <li>The simplest is the PLSQL Package UTL_COMPRESS utility (also ) , which wouldn't need any extra coding for compressing/uncompressing binary data.this<a/>) , which wouldn't need any extra coding for compressing/uncompressing binary data.

  • 'under' in classical report

    Hi,
    I'm developing a classical report and have following requirement,
    My header contains following line
    Order Type        A                   B                 C            D
    Now in line details depending on order type i have to position the order quantity under any of the above 4 columns (i.e. under A or B or C or D)
    i tried passing value 'D' to variable var1 and writing following statement,
    write:/ qty under var1.
    i was expecting that the abap would 'understand' that since var1 contains 'D' the quantity has to be printed under 'D' buit it didnt do so.
    Can anyone suggest any alternate method (i dont want to specify the offset...is there any programmatic approach other than hard-coding)
    Bye

    hi,
    use formatting techniques in classical report.
    check this link
    http://help.sap.com/saphelp_47x200/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm
    thanks

  • Classic report - Condition evaluated for every row

    APEX 4.2.2
    I am seeing something strange in a classic report region. A report started to fail at run-time with a strange error about bad syntax. When I run the page in debug mode, I see the following
    print column headings
    rows loop: 30 row(s)
    ...Execute Statement: begin wwv_flow.g_boolean := '' is not null;
    end;
    ......Result = false
    ...Execute Statement: begin wwv_flow.g_boolean := '' is not null;
    end;
    ......Result = false
    ...Execute Statement: begin wwv_flow.g_boolean := 'string with a embedded ' single quote' is not null;
    end;
    ......Result = true
    Looks like the APEX engine is evaluating a boolean expression after rendering and each and every row in the report. And for some strange reason, it is using a piece of data from my query's resultset and failing because of the bad syntax introduced due to the single-quote in the string.
    I have never seen this before. Any idea what is going on?
    Thanks

    Howdy Paul, sorry should have provided all the details. No, this is a standard generic column template. Ah, you are right, drat I should have looked closer. The template has use a condition to show either a highlighted row or normal one. Sorry for the false alarm, I can take it from here. Enjoy your flight :-)

  • How to Print a text in bold format in a classic report ??

    How to Print a text in bold format in a classic report ??

    hi
    u can use
    <b>FORMAT  INTENSIFIED ON.</b>
    regards
    ravish
    reward if useful

  • How to set the number of rows displayed in a classical report at runtime?

    Hi,
    Our customer has several standard client hardware configuration and would like to enable end users to choose their 'display profile' at login time. This 'display profile' would contain predefined values for these hardware configurations and supposed to set various paramters that should define the number of rows displayed in a classical report region.
    I tried to provide parameters on the report region but it refused to accept anything but numerical values. Is it possible to do this?
    Regards, Tamas

    The link is to the closest linkable point in the documentation to the description of the Number of Rows (Item) attribute.
    It sounds like you have been trying to enter&mdash;unsuccessfully&mdash;an item name or substitution string into the Number of Rows attribute. The Number of Rows (Item) attribute is the one that actually allows you to do this. Click on the flashlight icon beside it to get a list of items from the application.

  • END-OF-PAGE not displayed in the last page of the classical report.

    Hi all..
    The END-OF-PAGE is not displayed in the last page of the classical report.
    SY-LINCT value is 30.
    Lines displayed in the report per page is 24.
    [3 for TOP-OF-PAGE and 3 for END-OF-PAGE]
    My Internal table has 6942 records.
    It comes 289 pages with 24 records in a page and 290 th page with 6 records.
    The END-OF-PAGE is not coming for the 290 th page.
    Please help.
    Thank You.
    Karthi M R.

    There are multiple links in SDN on this subject; Please search,
    end-of-page

  • Need help in sorting a column in classic report

    Hi I am trying to create and classic report and I need to do sorting on the columns. Also I am using a select list to filter the records in the column. When I am not using the select list the sorting is working but when I am using the selcet list and select the sort option then it is showing error. Can anyone help...
    Thnaks,
    Rik

    Select lists prior to v4 will sort on the return value. In v4, it sorts on the display value (as you're probably expecting). There's nothing really for you to fix here except if it's really important, see if you can get upgraded to v4.

  • Classical Report for linking/applying the goods receipts transaction

    Classical Report for linking/applying the goods receipts transaction quantities against oldest schedule line item dates and then downloading the file to Excel.
    o        Classical Interactive Reports for calculating average Day Payable Outstanding. Option 1) in summary by company code, vendor, currency. (w/ DPO calc) Option 2) in detail (w/o DPO calc) Option 3) special summary by vendor and roughly convert different currency into one currency of choice, using current YEARLY rate.
    thow to do these objects
    plz assist me
    and how to transfer the data from from one server to other like 3.1 to 5.0
    plz assist me
    Edited by: Alvaro Tejada Galindo on Feb 21, 2008 5:28 PM

    Hi,
    You can use Call Transcation tcode
    for calling the transaction u can pass values to the transaction by using SET PARAMETER ID and GET PARAMETER ID
    technique.
    For downloading use function module LIST_DOWNLOAD
    or GUI_DOWNLOAD.

  • Mixing of interactive report and classic report fails the RESET PAGINATION process.

    I have a tab page where i got 3 different reports REPORT_A (classic), REPORT_B(interactive)  and REPORT_C (CLASSIC) in the same alphabetic order. I have a reset pagination page process which will always fire (without any condition) when you visit the page via tab.
    The reset pagination process which exists in the before header stage is firing but not resetting the interactive report. It does affect the subsequent classic report REPORT_C as well. The REPORT_A would reset pagination fine since it exists before the interactive report. Is this a know bug in apex?
    I created a test demo application with exact steps to reproduce the problem. The steps are in the demo website itself.
    http://apex.oracle.com/pls/apex/f?p=56638
    U: testuser
    P: password
    Apex Version: 4.2.4.00.08
    In my real application i would have a dropdownlist in the page based on which I would filter the data. The dropdownlist will have a corresponding after-submit branch which will handle the reset pagination & RIR absolutely fine. But when we visit the website through tab the above problem would crash the page.
    I tried solutions like gReport.search('SEARCH') but that will fix only the interactive report, not the classic REPORT_C. That is just a hack anyway.
    Any ideas.?

    Ramani_vadakadu wrote:
    in classic report pagination need to be make it up max rows in APEX_SCHEMA(APEX_040200) itself. i was fixed this issue long back myself,but right now i don't remember which table! so please check the schema and track it.
    This makes very little sense to me. Please explain this in detail. Are you advocating making changes to APEX metadata by executing DML on tables in the APEX_040200 schema? Doing so will leave your APEX instance in an unsupported an possibly inoperable state.

  • Display image in classical report

    Experts,
    Please share how to display image stored in SO10 in to a  classical report??

    Hi
    check this
    In the transaction OAOR, you should be able to insert your company Logo.
    GOTO - OAOR (Business Document Navigator)
    Give Class Name - PICTURES Class Type - OT..... then Execute
    It will show you the list, then select ENJOYSAP_LOGO.
    On that list, you will find one control with a "create" tab.
    Click std. doc types.
    Select SCREEN and double-click.
    It will push FILE selection screen.
    Select your company logo (.gif) and press OK.
    It will ask for a description- for instance: "company logo".
    It will let you know your doc has been stored successfully.
    You can find your logo under ENJOYSAP_LOGO->Screen->company logo.
    Just run your ALV program, you should find your company logo in place of the EnjoySAP logo.
    FORM TOP-OF-PAGE.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    IT_LIST_COMMENTARY = HEADING[]
    I_LOGO = 'ENJOYSAP_LOGO'
    I_END_OF_LIST_GRID ='GT_LIST_TOP_OF_PAGE'.
    ENDFORM. "TOP-OF-PAGE
    Here 'ENJOYSAP_LOGO' will replace by ur created logo.
    Refer this link
    http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_enhanced.htm
    http://www.sap-img.com/abap/alv-logo.htm
    http://www.sap-img.com/fu002.htm
    Re: Logo on Login screen
    Re: To change image into main menu of sap
    Regards
    Anji

  • How to get add/edit button in classic report

    Hi,
    Iam trying to built a classic report,but here i need to have add/edit button.How can i achieve this in classic reports?
    I know this add/edit button with a pencil on note will come through the interactive report.
    But here iam trying to build a page same as the sample application Orders tab i.e. My Orders page.Here he created a classic report with alternating rows but has an add/edit button to it.How could that be achieved??
    Can Anyone help me in this regard to built the My orders page including the add/edit navigation getting to order for items.How can tat sample application of My orders built?
    TIA,
    Regards,
    Kranthi.
    Edited by: Kranthi.K on Sep 29, 2009 12:38 AM

    One more doubt is
    But here iam trying to build a page same as the sample application Orders tab i.e. My Orders page and when we hit add/edit image it directs us to the My orders info and order items.
    How can we build that page of My orders info and order items.Can anyone guide me through the steps the sample is created.
    I tried many times with master detail,but dint achieve what the default Sample Application has been done.
    Thanks in Advance
    Edited by: Kranthi.K on Sep 29, 2009 4:54 AM

  • How to create a dynamic action from link column in classic report

    I Have an apex page that display a modal window utilizing jquery. In the modal window I have a classic report with a link column that I want to capture its click event.
    I was thinking I could create a dynamic action with selection type=jquery selector. Not for sure if I need to do anything on link column and do not know the syntax
    for jquery selector. Would appreciate any help or direction???

    Thank you for your response. I am very new to Jquery so don't understand all that well.
    What I did:
    I created a dynamic action
    Event: Click
    Selection Type: jQuery Selector
    jQuery Selector: tdheaders
    Created True Actions
    I created an alert to see if this is being executed.
    Alert 'I made it here'
    What I have:
    I created a report region with the following query:
    Select empno, ename, 'SELECT' from emp
    where (ename like '%'||ltrim(rtrim(:P2_SEARCHPU))||'%'
    or :P2_SEARCHPU is null)
    I created 'SELECT' column as Link Column
    Report Attributes
    Link Text Select
    Target Page in this Application
    Page 2
    Region Header
    <div id="ModalForm2" title="Employee List" style="display:none">
    Region Footer
    </div>
    This report is displayed in a modal form when a button is clicked.
    Code for modal window in Page Header
    <script type="text/javascript">
    $( function() {
    $('#ModalForm2').dialog(
    { modal : true ,
    autoOpen : false ,
    buttons : {
    Cancel : function() {
    closeForm2();
    function openForm2()
    $('#ModalForm2').dialog('open');
    function closeForm2()
    $('#ModalForm2 input[type="text"]').val('');
    $('#ModalForm2').dialog('close');
    </script>
    I am trying to capture the click event on the link column of the report in the modal form. I want to pass a couple of column values
    back to the main form and close the modal window. I do not want to do the submit that happens if I click on the link column and link back to the main page(2)
    If I let the submit to happen, all other entered fields are cleared on my main form.
    Just don't understand the jQuery selector. I have no problem catching the button clicks on the modal form.

Maybe you are looking for