Read Report

Dear All,
I have a requirement where i need to read the source code of a report into an internal table along with the line number.
We have READ REPORT programname INTO tablename but in this case i will get only the source code.
Ex : If the source code of programname is
       DATA : a TYPE c,                              
              b TYPE c,                              
              c TYPE c.                              
       a = 'A'.                                      
       b = 'B'.                                      
       CONCATENATE a b INTO C.                       
       WRITE: c.                                     
If i do a read report for the above program i will get output in my table as
       TEXT                                          LINENO
       DATA : a TYPE c,                              
              b TYPE c,                              
              c TYPE c.                              
       a = 'A'.                                      
       b = 'B'.                                      
       CONCATENATE a b INTO C.                       
       WRITE: c.                                     
What i need is something like the below.
       TEXT                                          LINENO
       DATA : a TYPE c,                               1
              b TYPE c,                               2
              c TYPE c.                               3
       a = 'A'.                                       4
       b = 'B'.                                       5
       CONCATENATE a b INTO C.                        6
       WRITE: c.                                      7
I dont want to do a loop and add line numbers to each line as it may take time when the souce code is large.
Thanks,
Hari Prasad

>
rajesh kumar wrote:
> Hi ,
>
> Check out this prog , we can easily display the line no .
>
>
REPORT  ZDEMO                                   .
>
> TYPES: BEGIN OF T_TYPE,
>          LINE(72),
>        END OF T_TYPE.
>
> DATA: PROGRAM LIKE SY-REPID VALUE 'YSCR_RPTRD00006_HOT_PICK',
>       ITAB    TYPE STANDARD TABLE OF T_TYPE WITH
>                             NON-UNIQUE DEFAULT KEY INITIAL SIZE 500 ,
>       WA      TYPE T_TYPE.
>
> READ REPORT PROGRAM INTO ITAB.
> IF SY-SUBRC = 0.
> LOOP AT ITAB INTO WA.
> WRITE :/ sy-tabix ,WA-LINE .
> ENDLOOP.
> ENDIF.
>
>
> Regards ,
> Rajesh .
You are anyway looping the full report. Which he does not want.

Similar Messages

  • READ REPORT for specific version

    I'm using function module RPY_PROGRAM_READ that calls READ REPORT.
    However I'd like to get the code for a previous version. The READ REPORT is very limited with it's options and I can't find a function module (RFC enabled) that does this. Any suggestions?
    Thank you and best regards!

    Check the Standard Program RSVRSRS1
    OBJNAME = <Program Name>
    OBJTYPE = REPS
    VERSNO = <Version Number>
    Kanagaraja L

  • Regarding Read report

    Hi all,
    I have to read a report code along with all include files.
    Is there any other way besides
    Read report prg_name into itab.
    As this is just providing main program source code.
    I need main program source code along with include file code
    so that i can perform a syntax check on a include file at runtime.
    Thanks,
    Smita

    Hi,
    Use this FM.
    CALL FUNCTION 'RPY_PROGRAM_READ'
          EXPORTING
            LANGUAGE            = SY-LANGU
            PROGRAM_NAME        = ITAB-PROGNAME
            WITH_INCLUDELIST    = 'X'
            ONLY_SOURCE         = ' '
            ONLY_TEXTS          = ' '
            READ_LATEST_VERSION = ' '
            WITH_LOWERCASE      = ' '
          IMPORTING
            PROG_INF            = WS_RPY_PROG
          TABLES
            INCLUDE_TAB         = ITAB_INCLUDE
            SOURCE_EXTENDED     = ITAB_SOURCE
            TEXTELEMENTS        = ITAB_TEXTS
          EXCEPTIONS
            CANCELLED           = 1
            NOT_FOUND           = 2
            PERMISSION_ERROR    = 3
            OTHERS              = 4.
    Hope it will help.
    Issa

  • "Error reading reporting point information" message no. RM111

    Hello friends,
    I am doing the Reporting point backflush for a material and getting the error "Error reading reporting point information", message no. RM111.
    i have given the milestone confirmation for the last operation in the rate routing for that material.
    Even in REM Profile, Mandatory Reporting time backflush is activated.
    In the production version of that material i have given the group of rate routing created for that material in Rate Routing field.
    I have created the product cost collector for that material and production version. With costing lot size 1, even i have calculated the cost for that product cost collector. Though regarding costing couple of errors came, than also i saved it.
    I am not sure whether system has created the reporting point while creating the product cost collector.How to check it?
    Now for that material we have created the planned order.
    Now when i am doing the backflush in MFBF t.c  by giving the material code,plant and production version, system is throwing the error " Error reading reporting point information.
    Thanks and Regards,
    Jitendra

    Hello siva,
    i executed the transaction MF30 as suggested by you, there system displayed following costing errors:
    "No control record for Activity type PLVD/1301/ASBY in version 000 / 2010 activity planning/qty planning
    Message no. KL023
    Diagnosis
    No activity planning or quantity planning has been carried out for Activity type PLVD/1301/ASBY in version 000 and fiscal year 2010.
    Procedure
    Activity Type Planning for cost centers or
    Planning Quantities and Prices for business processes.
    Even system is not picking the component prices, system throwing the error NO price could be determined for the material and  batch so and so.
    We are using the Preliminary cost estinmate.
    is because of this system is not able to create reporting point in product cost collector?
    Please Replay

  • Error: Could not read reports properties.  java.lang.NullPointerException

    Hi All,
    I am facing Could not read reports properties. java.lang.NullPointerException while trying to run the report using below string
    String:_
    /rcrmap2/weblogic/bea/ORA_PFRD/bin/rwrun module=/rcrmkr1/exe_dir/CA_PG1_T.rdf CUSTGRPID=''001139'' CANO=104 CACOPY=''F'' OPTION=''W'' CCODE=''KR'' USERID=apl_D_RCRMNIU3/Q5e3C4l1FPjrG6epG6f3C4dqFMgsDP@krcrmd DESTYPE=FILE DESNAME=/rcrmkr1/crms_RG/rep_dir/gcapg1_to_test_20110112_121902.rep BATCH=YES MODE=CHARACTER DESFORMAT=/rcrmap2/weblogic/bea/ORA_PFRD/reports/printers/wide.prt pagesize=132x80
    Environment Variables :*
    export ORACLE_LOCALPREFERENCE=/rcrmap2/weblogic/bea/rcrms/config/FRComponent/frcommon/tools/admin/
    export WIDE_DEF=/rcrmap2/weblogic/bea/ORA_PFRD/reports/printers/hplwide.prt
    export WIDE_VIW=/rcrmap2/weblogic/bea/ORA_PFRD/reports/printers/wide.prt
    export REPORTS_FONT_DIRECTORY=/rcrmap2/weblogic/bea/rcrms/reports/fonts
    export REPORTS_TAGLIB_URI=/WEB-INF/lib/reports_tld.jar
    export REPORTS_NO_DUMMY_PRINTER=TRUE
    export REPORTS_TMP=/tmp
    export RW=/rcrmap2/weblogic/bea/ORA_PFRD/reports
    export LD_LIBRARY_PATH=/rcrmap2/weblogic/bea/ORA_PFRD/jdk/jre/lib/ppc64:/rcrmap2/weblogic/bea/ORA_PFRD/jdk/jre/lib/ppc64/classic:/rcrmap2/weblogic/bea/ORA_PFRD/lib:/usr/dt/lib:
    export LIBPATH=/rcrmap2/weblogic/bea/ORA_PFRD/lib:/usr/dt/lib:/rcrmap2/weblogic/bea/ORA_PFRD/jdk/jre/lib/ppc64:/rcrmap2/weblogic/bea/ORA_PFRD/jdk/jre/lib/ppc64/classic:/usr/lpp/cobol/lib:/oracle/oracle/11.1.0.7/lib:/oracle/oracle/11.1.0.7/lib32:/rcrmkr1/exe_dir/pvcs_12july/pco:.
    export LDR_CNTRL=USERREGS@MAXDATA=0x80000000
    export TK_ICON=/rcrmap2/weblogic/bea/ORA_PFRD/reports/plugins/resource
    export REPORTS_DEFAULT_DISPLAY=NO
    export REPORTS_CLASSPATH=/rcrmkr1/exe_dir:/rcrmap2/weblogic/bea/ORA_PFRD/reports/jlib/rwbuilder.jar:/rcrmap2/weblogic/bea/ORA_PFRD/reports/jlib/rwrun.jar:/rcrmap2/weblogic/bea/ORA_PFRD/jlib/zrclient.jar:/rcrmap2/weblogic/bea/ORA_PFRD/modules/oracle.jsp_11.1.1/ojsp.jar:/rcrmap2/weblogic/bea/ORA_PFRD/javacache/lib/cache.jar:/rcrmap2/weblogic/bea/ORA_PFRD/modules/oracle.javacache_11.1.1/cache.jar
    Please help to provide your inputs
    Regards,
    Harish

    Hi,
    The problem was resolved by setting proper acl's to the corresponding directories (cache directory) in the application server
    Regards,
    Harish

  • Use of READ REPORT and INSERT REPORT

    Hi Guys,
    i need a small help from u guys.......
    i want to know the use of READ REPORT and INSERT REPORT  with Example
    the requirement is...
    i want to declare an internal table with fields from custom table.
    if any field is aded in the custum table then that field also should get populated in the program.
    Ex: custom table fields are
    MANDT
    BUKRS
    MATNR
    LIFNR
    field1
    field2
    field3
    now suppose if a new field field4 is added in the Table
    then the Program should automatically pick-up the fields from FIELD1...FIELD4.
    i heard by using READ and INSERT report we can do it
    plz help me ...
    Thanks
    Sunil.:-)

    If you're on 46C or above, you can use the following to generate tables dynamically.
    CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
    EXPORTING
    IT_FIELDCATALOG = GT_FIELDCAT
    IMPORTING
    EP_TABLE = GS_DATA_HEAD
    EXCEPTIONS
    GENERATE_SUBPOOL_DIR_FULL = 1
    OTHERS = 2.
    But you are restricted to 32 calls, if I remember correctly.  If you are in a later release, you can use the RTTS classes to create internal tables dynamically, without the restriction on subroutine pools.
    These classes are CL_ABAP_TYPEDESCR and subclasses.
    There are a few blogs on SDN that give examples of their use.
    Matt

  • Read report line too long error ?

    hi friends.
    my program allowed this error.
    read_report_line_too_long
    what do I do ?
    help me please

    Don't do any setting changes, try to modify the code if it is custom namespace.
    assume this the code with more than 72chars..
    read table itab into wa_itab with key matnr = v_matnr  vbeln = vbeln transporting something binary search
    you have to break that into two lines like the below..
    read table itab into wa_itab with key matnr = v_matnr
                                                  vbeln = vbeln
                               transporting something binary search
    where ever you find the line more than 72 chars you change it. not event comment lines should not exceed more than 72 chars.
    what are you doing exactly can you let me know..
    if you are using READ REPORT if you have a program with more than 72 chars length then you will end up with that error. see the standard SAP documentation
    DATA prog TYPE c LENGTH 30.
    DATA itab TYPE TABLE OF string.
    prog = '...'.
    READ REPORT prog INTO itab.
    Catchable Exceptions
    CX_SY_READ_SRC_LINE_TOO_LONG
    Cause: At least one line of the source code is longer than the rows of the internal table itab.
    Runtime Error: READ_REPORT_LINE_TOO_LONG

  • Unable to read report metadata

    I have a report from SSRS2008R2 in user in PP2007 which works there properly.
    When I try to use it in PP2010 I get "Unable to read report metadata" every time I try to change the default value of the parameters.
    In PP2007 it all works properly.
    thanks

    After analysing network traffic, I found that Report server returns an error to dashboard designer because a parameter is set as "read only".
    This means that there is a parameter that has been set to internal in the report.
    The important thing is :
    Note: Publishing a report over an existing report on the report server does not overwrite the parameter information.
    To update parameters for an existing report, either delete the report on the report server and republish, or update the parameter information for the report in Report Manager.
    To modify the parameters information, open the report server. Go to your report, and select Manage, then Parameters ( on the left panel).
    Internal parameters appears with unselected textbox for Hide and Prompt. Select Hide and then Apply.
    Go back to Dashboard designer, you can now update the parameter values.
    Regard,
    Franck

  • Error reading reporting point information

    Dear All,
    While i m  doing backflashing with the tcode mfbf recving a error messge in reporting piont this -
      Error reading reporting point information    kindlly update me how can i resolve this
    regards
    pritpal

    Dear pritpal.
    Check the rem profile at MRP view of Material master (MM02). the correct profile has been selected  sotaht it allows the RP backflush.
    To check  Rem profile allows RP back flush at OPS2.
    For Milestone confirmation  check wth controlkey which has  assigned at Routing operation (CA02)
    For Product cost collecter check with KKF6N.
    Regards
    Pradeep

  • Could not read reports properties

    I am compiling reports with 11.1.1.3.0 on Solaris and keep getting the message: "Could not read reports properties". The RDFs do get to converted to REP files, so it appears to be just a warning message.
    The error appears to be a file privilege issue since if I use the oracle account the message goes away, but if I use my personal account I get the message.
    So what is the name of the file it is looking for? I had assumed prefs.ora; but I have already granted my personal account access to all of them.
    Thanks

    I will tell you that I had several errors when I migrated to 11g last month, the solution for all of my problems was upgrade to:
    Forms & Reports 11.1.1.4 and weblogic 10.3.4.
    its not difficult, it takes me 70 minutes to do it. after you do upgrade I bet you wont have this problem.
    cheers.

  • How to make "Read Report" pick up enhancement code as well

    I want to enhance a SAP ECC6 program - H99CWTR0 (Wage type reporter). I need to add some more master data objects from other HR tables.
    I have succesfully applied implicit enhancements to this program to allow my users to select extra data objects and to retrieve the relevant data from the database. However, the program reads a subroutine pool called H99CWTR0_ALV_TEMPLATE and makes dynamic run time changes and generates a temporary subroutine pool. I have also had to apply implicit enhancements to the template but this is not read by H99CWTR0. So I am unable to to keep the shared data segment in line with the driver program H99CWTR0 which leads to an ABAP dump.
    I would prefer to make all changes to SAP programs using the enhancement framework rather than having to clone SAP programs into the "Z" namespace.
    Is there a way of making the "Read report" pick up the implicit enhancement code as well as all the other includes in the template?

    Hi Prabhu
    The dump text said -
    "The length of COMMON PART "DRIVER_DATA_EXCHANGE" in program "%_T0DYT0" is different from the corresponding area in the calling program "H99CWTR0".
    Length of the COMMON PART in program %_T0DYT0: 1224 bytes
    Length of the COMMON PART in program H99CWTR0: 1232 bytes
    There is probably an error in the program "H99CWTR0"."
    My enhancement to H99CWTR0 is being accessed, but the equivalent enhancement to H99CWTR0_ALV_TEMPLATE is not. Hence the discrepancy in the length of common shared data segment.
    The ABAP line "read report iv_template into lt_code." in include H99CWTR0_FORMS is not reading the implicit ehancement code I added. So when the ABAP line "generate subroutine pool lt_code name ov_driver message mm line ll" is called to generate the temporary subroutine code my code is lost.
    Regards
    Phil Smith

  • OSS note for READ REPORT CX_SY_READ_SRC_LINE_TOO_LONG

    Hi Guys
    I am sure many of us have faced this problem before while using classical ALV display func modules.
    I am pasting the error analysis
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CXSY_READ_SRC_LINE_TOO_LONG', was_
      not caught in
    procedure "KKKB_FIELDCAT_MERGE" "(FUNCTION)", nor was it propagated by a_
      RAISING clause.
    Since the caller of the procedure could not have anticipated that the
    exception would occur, the current program is terminated.
    The reason for the exception is:
    There was an attempt to read program "ZU1HAP_IC_REVAL" from the database._
    The READ REPORT statement allows you to copy a program text into an
    internal table. The occupied line length in the program text must not
    exceed the width of the internal table.
    The internal table "\FUNCTION=KKKB_FIELDCAT_MERGE\DATA=L_ABAP_SOURCE[]" is 72_
      characters wide. The program line is
    84 characters wide.
    The Question is , is someone aware of an oss note that take care of this problem? I am looking in the marketplace but havent found something usefull as of now.
    Thanks for reading
    Rgds
    Sameer

    If the length of line in the abap code exceeds 72 characters you will get that error.
    i could see that in your code a line has 84 characters.
    do this,system will automatically format the exceeded lines.
    Utitlites ->Settings->ABAP editor ->editor
    Check  Downwards-comp line length 72.

  • Read report - deleted without reading

    Sent a letter with the "read report", and Icamethe message status.
    "was delivered and not
    read" - in Outlook
    and
    "was deleted without reading"
    - in the mail client Iphone, Windows Phone
    In this case, the recipient has not read
    the letter, and it was not removed.
    Moreover, if I send the same email to other
    recipients, such messages do not come
    only after reading the notice of the reading.
    If I send another letter to the same
    recipient, no notifications are also absent.
    Also disturbs formulation posts
    when viewed through the operating system IOS (Iphone, Windows Phone),
    since changing the meaning of the notice.
    Person receiving such a message might think that
    the recipient has deleted the message
    without reading.
    Help to understand why only one letter has come
    to such a notification, and whether it is possible
    to change the text messages to mobile devices?

    Hi,
    I would like to collect some information.
    What’s the client version on the recipient’s side?
    Does the recipient use AutoArchive to save the outlook data?
     When a message is archived, it's copied to the archive file, then deleted from the server.
    If the message was not saved to the Archive, where the message go to?
    Please update the exchange server to latest patch.
    What’s more, do you mean change the text message of ‘was deleted without reading’ to the mobile devices? If yes, I couldn’t find a way to change the text messages.
    Thanks.

  • Can I get a read report in iCloud mail?

    Hi
    How can I get a read report in iCloud Mail?
    Lander

    The following article(s) may help you.
    iCloud BackUp and Restore

  • Message read report

    I can't get the Read report for my messages even though it's turned on

    Not working. Like other features

Maybe you are looking for