Result of report on a script

Hi all,
how can i get the result of the report on a script.
Thanks in advance
Santosh

Hi
First write the report code with proper data fetching
Don't write the WRITE statements
design a Script layout in SE71 tcode with the data fields of this internal tables data of the report
then call the script in the report using the fun module OPEN_FORM and pass the parameter of the SCript name to it.
And use the fun modules WRITE_FORM in the loop of the internal table to print the data of the report in the script
and finally after loop call the fun module CLOSE_FORM
see the sample program code and do accordingly
*& Report  ZTEST12121
*& SAPScripts Example 1
REPORT  ztest12121.
*DATABASE TABLES
TABLES: ekko,ekpo,lfa1.
*INTERNAL TABLES AND STRUCTURES
DATA i_ekko LIKE ekko.
DATA i_ekpo LIKE ekpo OCCURS 0 WITH HEADER LINE.
DATA i_lfa1 LIKE lfa1.
*PARAMETERS
PARAMETERS: p_ebeln LIKE ekko-ebeln.
*VARIABLES
DATA MAT TYPE STRING VALUE 'MAT NO'.
DATA iTe TYPE STRING VALUE 'ITEM NO'.
DATA QTY TYPE STRING VALUE 'QTY'.
DATA UOM TYPE STRING VALUE 'UOM'.
DATA NET TYPE STRING VALUE 'NET PRICE'.
Data var type integer value 0.
*DATABASE SELECTS
*Header data
SELECT SINGLE * FROM ekko INTO i_ekko WHERE ekko~ebeln = p_ebeln.
IF sy-subrc = 0.
*Item Data
  SELECT * FROM ekpo INTO  TABLE i_ekpo WHERE ekpo~ebeln = p_ebeln.
  IF sy-subrc NE 0.
    WRITE 'PURCHASE DOCUMENT ITEM DATA ERROR'.
  ELSE.
*Vendor Details
    SELECT SINGLE * FROM lfa1 INTO i_lfa1 WHERE lfa1~lifnr = i_ekko-lifnr.
    IF sy-subrc NE 0.
      WRITE 'VENDOR DOCUMENT ITEM DATA ERROR'.
    ENDIF.
  ENDIF.
ELSE.
  WRITE 'THIS PURCHASE DOCUMENT NUMBER DOESNOT EXISTS'.
ENDIF.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
  APPLICATION                       = 'TX'
  ARCHIVE_INDEX                     =
  ARCHIVE_PARAMS                    =
  DEVICE                            = 'PRINTER'
  DIALOG                            = 'X'
    form                              = 'ZSCRIPT_1'
    language                          = sy-langu
  OPTIONS                           =
  MAIL_SENDER                       =
  MAIL_RECIPIENT                    =
  MAIL_APPL_OBJECT                  =
  RAW_DATA_INTERFACE                = '*'
  SPONUMIV                          =
IMPORTING
  LANGUAGE                          =
  NEW_ARCHIVE_PARAMS                =
  RESULT                            =
EXCEPTIONS
  CANCELED                          = 1
  DEVICE                            = 2
  FORM                              = 3
  OPTIONS                           = 4
  UNCLOSED                          = 5
  MAIL_OPTIONS                      = 6
  ARCHIVE_ERROR                     = 7
  INVALID_FAX_NUMBER                = 8
  MORE_PARAMS_NEEDED_IN_BATCH       = 9
  SPOOL_ERROR                       = 10
  CODEPAGE                          = 11
  OTHERS                            = 12
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
   ELEMENT                        = 'OFFICEAD'
   FUNCTION                       = 'SET'
   TYPE                           = 'BODY'
   WINDOW                         = 'OFFICEAD'
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
   ELEMENT                        = 'PODET'
   FUNCTION                       = 'SET'
   TYPE                           = 'BODY'
   WINDOW                         = 'PODET'
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
   ELEMENT                        = 'TOP'
   FUNCTION                       = 'SET'
   TYPE                           = 'TOP'
   WINDOW                         = 'MAIN'
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT I_EKPO.
var = i_ekpo-netpr * i_ekpo-menge.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
   ELEMENT                        = 'BODY'
   FUNCTION                       = 'SET'
   TYPE                           = 'BODY'
   WINDOW                         = 'MAIN'
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDLOOP.
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
  RESULT                         =
  RDI_RESULT                     =
TABLES
  OTFDATA                        =
EXCEPTIONS
  UNOPENED                       = 1
  BAD_PAGEFORMAT_FOR_PRINT       = 2
  SEND_ERROR                     = 3
  SPOOL_ERROR                    = 4
  CODEPAGE                       = 5
  OTHERS                         = 6
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
<b>Reward points for useful Answers</b>
Regards
Anji

Similar Messages

  • Question on reporting on Assessment Script

    Hi
    How is it possible to create reporting on assessment scripts defined for opportunities ?
    Thanks & Regards,
    Mehdi

    Assessment scripts are not available in Reports. But you should be able to run a report from the associated parent object based on the results.
    from help
    "you can map fields used during the assessment to the parent record and, later, run reports and analyses, based on those fields."
    and
    "The answers to the questions are mapped as field values in the record, so that the answers are easily accessible, and available for reporting. "

  • By default, Teststand will not include the test step result in subsequence, is there any way to include these step result in report?

    By default, Teststand will not include the test step result in subsequence, is there any way to include these step results in report?
    Thanks
    Jacky

    Hi,
    If your subsequence is in a separate sequencefile, then check the properties of the sequencefile to make sure that the record has not been disabled.
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • How can we generate result set report?

    how can we generate result set report ?means the out put of one query be the input of another query?how it is?

    Hi
    You have to use APD ( analysis process designer) to use results of one query as the input for the other queries.
    Check this link
    http://help.sap.com/saphelp_nw70/helpdata/en/49/7e960481916448b20134d471d36a6b/frameset.htm
    Regards

  • Result Analysis Report

    Hi Friends..
    Pls tell me how to produce Result Analysis Report.
    By
    PARI VENDHAN.R

    Hi Pari,
    The Results Analysis Report is an analysis of the results of running tests. The results analysis provide management and the development team with a readout of the product quality.
    http://www.acomtech.com/resultsa.html
    Do reward if useful.
    Regards
    Harish

  • Howto define report B based on result of Report A without manual triggering

    Hello
    I would like to create two reports which contains the following:
    1. Report A with defined and closed set of filters, after report A finishes to run and retrieve results ->
    2. Report B should start running filtered by one column which is result of report A (for example report A retrieved a set of names in column 'employee', I would like report B to start running only based on the result of that column 'employee' of report A), without the need of manual trigger / navigation.
    both reports should be presented in the same page.
    is it possible ?
    can it also been created as iBot (email) ?
    thanks
    Haim

    Hi, thanks
    +@haimz :+
    Use a filter in report B with "filter based on another request".
    That should work.
    Also for not displaying B, you can have a condition, where B section doesn't show up until you have rows returned by A.
    I am not sure how to perform the second part of your answer (can you elaborate, please) ?
    also is there a way to present the two report together (not in a dashboard) and then to define Report B wait for report A to answer.
    Haim

  • BW report for interactive scripts in CRM 4.0 webclient

    Hi, experts,
    good day,
    currently we have a requirement to develop interctive scripts in webclient environment , and developing in Interactive scripting editor,
    after developing the scripts we attch the profile  and  when we run it in the webclient , scripts runs automatically, so far all these functionalities working ,
    but i want to generate a report for , where i want to see the the number of scripts used perday, most frequently used scripts in the day  ,
    , where i can do this report,
    as i know that , i can generate a report for survey scripts, but these interactive scripts developed in external editor  and all we will do in the SPRO is attch the script name in the profile with the valid date , thats all,
    i am suspecting about a custome development , if am not wrong ????
    urgent help needed ,
    full point will be awarded, becuse, this is a limited functionality in SAP , across the projects in the world,
    thanks regards
    sree

    Hi, john
    thanks for the info,
    Yes i know that scripting evolution,
    but i dont know where i can see that screen with the statistics.
    can you please tell me which TR code i need to use , to run the evolution screen, or which BSP i need to run to see that type of report, i went through the CR410_Col42_ICWEB document
    but i didnt find any clue, all i got is only explanation of scripting evolution,
    currently  scripts are storing at crmc_ic_SCRIPTS table , and it is storing the profile,name  script ID, date valid from, date valid to, fields
    when i run the above table i got a option on menu bar "" check table"" when i click this  system taking me to the below table called CRMD_IC_SCATTR  table, this table have fields like  objuect type ,object name , catogory,begin date , end date , logged by, fileds,
    I am confusing about these 2 tables, 1st table can not serve my need , 2nd table can serve my need a bit ,
    but it has another type of transactions like object name , object type....
    and in scripting profile , i have a field called ""History "" in this i have  2 options ""record script data in BW"" and ""Do not record"",
    can i use this to generate a report ??? as a standard format
    so i am planning like, i can go for a custom table, with the required fields like, user , date of run, time of run, department name , average time to run the script, ... etc
    this table record the data from actions in the webclient where CRA runs the scripts daily ,
    then we can generate a report from the BW or can run in CRM ,
    i think if you want i can write a new functionality  document for SAP AG , to add this functionality ,
    but please guide me in the above issue,
    regards
    sree

  • Can we Save BQY without result set/data through dashboard script

    Hi All,
    Can we save a BQY without result set/data through dashboard script?
    Thanks,
    Soumitra

    Hi Soumitra,
    Its happy that you resolved it by yourself. But if you post your solution here then it will be helpful for everyone else looking for the same solution.
    Thanks,
    karthick

  • I am using Diadem V10.1. I am trying to Export the pdf report through my script.

    I am using Diadem V10.1. I am trying to Export the pdf report through my script. When I try to export individual report manullayFile -> Pdf Export it creates a proper plot in pdf. But I try to get multiple reports from script it, I can see only 1 quarter of the plot as shown in attachment. Can somebody help me how to resolve it.. FYI, I can see Diadem PDF Export Printer enabled in my machine
    Attachments:
    Capture.JPG ‏60 KB

    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''Start''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    PrintName = "winspool,DIAdem PDF Export,LPT1:"
    PDFResolution = "150 DPI"  '  "2400 DPI" ,  "default"
    PDFOptimization = TRUE
    PDFFontsEmbedded = FALSE
    PDFJPGCompressed = "high"
    Call PrintMaxScale("REPORT")
    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''End''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    Call PicPrint("WinPrint")

  • How to manage projects in TFS for better results in reports ?

    Hello,
    I have 5 team projects in TFS which is being managed by 5 team members.All the projects have been developed and currently there are up coming small level development task for enhancements or change requests.
    I require to know best rules/practices points to manage the projects in such scenario so that I can get better results in reports.
    Notes: There are no predefined sprints as we do not have information about upcoming module/task estimations.
    Would you please help me to understand the rules/best practicies to follow in order to succefully manage the projects in TFS for betterment of the project growth ?
    your help will be much appreciated.
    Thanks and Regards,
    Dipti Chhatrapati

    Hi Dipti,
    Thanks for your reply.
    If you want create burn down report(or other reports) in team projects, you should configure the Reporting Service for your TFS Server first, then we can create team project using the
    TFS default process templates, the default burn down report and other default reports will be generated after team project created successfully:
    https://msdn.microsoft.com/en-us/library/dd380714.aspx.
    Whether the team project created using which default TFS process templates, we can create work item query in team project filter work items:
    https://msdn.microsoft.com/en-us/library/dd286705.aspx.
    You can create these 5 team projects using the same process template, and create them in the same one TFS collection.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Passing flexfield from report wrapper to seeded report using shell script

    I am unable to pass flexfield values from report wrapper to seeded report using shell script
    below is the shell script that i am using to transfer GL Account High and GL Account Low to the seeded program Receipt Journal Report (ARXRJR). the flex fields get passed through the parameter v_param_12 and v_param_13. but all i am getting in the seeded report log file is the reporting level,reporting context,set_of_books,period, gl_date_low/high .
    #TEST Program for Passing GL Account High and GL Account Low
    v_user_name=`echo $3`
    v_login_pwd=`echo $FCP_LOGIN`
    v_prog_name=`echo TESTARXRJR`
    echo 'v_prog_name: '$v_prog_name
    # testing for passing the arguments from CM ...
    if [ -z "$1" ]
    then
    echo "Please pass the first argument...."
    exit 1
    fi
    v_request_id=`echo $4`
    echo 'v_request_id: '$v_request_id
    v_param_1=`echo $5`
    echo 'v_param_1: '$v_param_1
    v_param_2=`echo $6`
    echo 'v_param_2: '$v_param_2
    v_param_3=`echo $7`
    echo 'v_param_3: '$v_param_3
    v_param_4=`echo $8`
    echo 'v_param_4: '$v_param_4
    v_param_5="$9"
    echo 'v_param_5: '$v_param_5
    shift
    v_param_6=`echo $9`
    echo 'v_param_6: '$v_param_6
    shift
    v_param_7=`echo $9'`
    echo 'v_param_7: '$v_param_7
    shift
    v_param_8=`echo "$9"`
    echo 'v_param_8: '$v_param_8
    shift
    v_param_9=`echo $9`
    echo 'v_param_9: '$v_param_9
    shift
    v_param_10=`echo $9`
    echo 'v_param_10: '$v_param_10
    shift
    v_param_11=`echo $9`
    echo 'v_param_11: '$v_param_11
    shift
    v_param_12=`echo $9`
    echo 'v_param_12: '$v_param_12
    shift
    v_param_13=`echo $9`
    echo 'v_param_13: '$v_param_13
    shift
    v_param_14=`echo $9`
    echo 'v_param_14: '$v_param_14
    shift
    v_param_15=`echo $9`
    echo 'v_param_15: '$v_param_15
    shift
    v_param_16=`echo $9`
    echo 'v_param_16: '$v_param_16
    shift
    v_param_17=`echo $9`
    echo 'v_param_17: '$v_param_17
    shift
    v_param_18=`echo $9`
    echo 'v_param_18: '$v_param_18
    shift
    v_param_19=`echo $9`
    echo 'v_param_19: '$v_param_19
    shift
    v_param_20=`echo $9`
    echo 'v_param_20: '$v_param_20
    shift
    v_param_21=`echo $9`
    echo 'v_param_21: '$v_param_21
    shift
    v_param_22=`echo $9`
    echo 'v_param_22: '$v_param_22
    shift
    v_param_23=`echo $9`
    echo 'v_param_23: '$v_param_23
    echo "Executiong SQL to obtain org id and responsibility name"
    (sqlplus -s /nolog <<end_of_sql
    conn $v_login_pwd
    set heading off
    set echo off
    set feedback off
    SELECT 'ORGID:'||b.profile_option_value || ':' ||e.responsibility_name
    FROM fnd_profile_options a,
    fnd_profile_option_values b,
    fnd_concurrent_requests c,
    fnd_responsibility d,
    fnd_responsibility_tl e
    WHERE c.request_id = $v_request_id
    AND c.responsibility_id = b.level_value
    AND b.profile_option_id = a.profile_option_id
    AND a.application_id = b.application_id
    AND c.responsibility_application_id = d.application_id
    AND d.application_id = e.application_id
    AND a.profile_option_name = 'ORG_ID'
    AND c.responsibility_id = d.responsibility_id
    AND d.responsibility_id = e.responsibility_id;
    exit
    end_of_sql
    ) > a.log
    v_var=`grep -iv "ORG_ID" a.log|sed 's/Connected.//'`
    echo 'v_var: ' $v_var
    v_org=`echo $v_var| awk 'FS=":" {print $2 }'`
    v_resp_name=`echo $v_var | awk 'FS=":" {print $3}'`
    echo 'v_org :'$v_org
    echo 'v_resp_name :'$v_resp_name
    echo 'Sumitting Receipt Journal Report...'
    user_request=`CONCSUB $v_login_pwd GL "$v_resp_name" $v_user_name WAIT=Y CONCURRENT AR ARXRJR \
              \"$v_param_3\"\
              \"$v_param_4\"\
              \"$v_param_5\"\
              \"$v_param_6\"\
              \"$v_param_7\"\
              \"$v_param_8\"\
              \"$v_param_9\"\
              \"$v_param_10\"\
              \"$v_param_11\"\
              \"$v_param_12\"\
              \"$v_param_13\"\
              \"$v_param_14\"\
              \"$v_param_15\"\
              \"$v_param_16\"\
              \"$v_param_17\"\
              \"$v_param_18\"\
              \"$v_param_19\"\
              \"$v_param_20\"\
              \"$v_param_21\"\
              \"$v_param_22\"\
              \"$v_param_23\"`
    user_request=`echo $user_request|awk '{print $3}'`
    echo Request is $user_request
    trx_rep_file="$user_request"
    echo 'trx_rep_file: '$trx_rep_file
    sleep 10
    for i in 1 2 3 4 5
    do
    if test -f $APPLCSF/$APPLLOG/l$user_request.req
    then
    if test [`grep -i '"Concurrent process completed successfully"' $APPLCSF/$APPLLOG/l$user_request.req`]
    then
    if test -f $APPLCSF/$APPLOUT/o$trx_rep_file.out
    then
    echo +++++++++++++++++++++++++++++++++
                   echo 'output file found'
                   echo ++++++++++++++++++++++++++++++++++++++
    else
    echo +++++++++++++++++++++++++++++++++++++++++
              echo failure in Report listing production
              echo +++++++++++++++++++++++++++++++++++++++
    fi
    break
    else
    echo +++++++++++++++++++++++++++++++++++++++
    echo Job not Over Yet
         echo +++++++++++++++++++++++++++++++++++++++++++++
    fi
    echo +++++++++++++++++++++++++++++++++++++++
    echo File not found yet
    echo ++++++++++++++++++++++++++++++++++++++
    fi
    sleep 10
    done
    echo ----------------------------------------------------------
    echo Transaction Listing process over
    echo ---------------------------------------------------------
    echo ----------------------------------------------------------
    echo Executing SQL to derive Search Pattern
    echo ----------------------------------------------------------
    v_pattern=`sqlplus -s /nolog <<EOF1
    conn $v_login_pwd
         set heading off
         set echo off
         set feedback off
         SELECT 'SEARCH^'||meaning||'^'||attribute1||'^'||attribute2||'^'||attribute3
         FROM fnd_lookup_values
         WHERE lookup_type = '$v_param_2'
         AND lookup_code = '$v_prog_name';
    exit
         EOF1`
    echo 'v_pattern: '$v_pattern
    v_pattern_n1=`echo $v_pattern|sed 's/Connected.//'|awk 'FS="^" {print $2}'`
    echo 'v_pattern_n1: '$v_pattern_n1
    v_pattern_n2=`echo $v_pattern|sed 's/Connected.//'|awk 'FS="^" {print $3}'`
    echo 'v_pattern_n2: '$v_pattern_n2
    v_pattern_n3=`echo $v_pattern|sed 's/Connected.//'|awk 'FS="^" {print $4}'`
    echo 'v_pattern_n3: '$v_pattern_n3
    v_pattern_n4=`echo $v_pattern|sed 's/Connected.//'|awk 'FS="^" {print $4}'|sed 's/ //'`
    echo 'v_pattern_n4: '$v_pattern_n4
    echo 'v_param_12: '$v_param_12
    echo 'v_param_13: '$v_param_13
    echo -----------------------------------
    echo Deriving final output
    echo ----------------------------------
    v_var=`cat $APPLCSF/$APPLOUT/o$trx_rep_file.out | grep -i "$v_pattern_n1"|\
                   sed "s/(/-/g"|sed "s/)/ /g"|\
                   sed "s/$v_pattern_n1/$v_pattern_n2/g"|\
              sed 's/ /~/g'|\
    sed 's/~~*/~/g'|\
                   sed 's/ *//g'|\
                   sed 's/,//g'`
    echo 'v_var: '$v_var
    v_var_2=`cat $APPLCSF/$APPLOUT/o$trx_rep_file.out|grep -i "$v_pattern_n3"|\
                   uniq`
    v_out_1=`echo "$v_var"|grep -i "$v_pattern_n2"|awk 'FS="~" {print $3}'`
    echo 'v_out_1: '$v_out_1
    echo 'v_var_2: '$v_var_2
    echo ------------------------------------------------------------
    v_out_2=`echo "$v_var_2"|grep -i "$v_pattern_n3"|awk 'FS=":" {print $2}'`
    echo 'v_out_2: '$v_out_2
    echo ----------------------------------------------
    echo Process comleted
    echo ----------------------------------------------------
    echo ================================================================================
    #---------------------------------------------------------------------------------------------------

    The name of this OTN group is "Database - General"
    Your question relates to an unnamed application that might be E-Business Suite, or PeopleSoft, or Siebel, who can say.
    Please re-ask your question in the appropriate applications forum and be sure to clearly name the full product name and version. We are not mind readers and we can not look over your shoulder.

  • How to find out existing Reports and sap scripts and smartforms ?

    Dear Friends ,
    How to find out existing Reports and sap scripts and smartforms ?
    ( e.g: how many existing reports and SAP scripts are available in MM or SD module , What is the procedure to find out ? )
    Thanking you.
    Regards,
    Subash.

    scripts r stored in TNAPR TABLES

  • Report output in script

    hi to all my querry is sas follows
    i have one report program in that iam displaying all the  order details  of the selected customers .i have one button in thelike  "print" in the gui of the report output . when  i click this button  ouput of that report should be printed in the main window of the script . pls  give coding for this . how to call the script from report .
    points will be rewarde d for good answers.
      pls give coding.

    Hi Kumar
    check this sample code it will help u
    CALL FUNCTION 'OPEN_FORM'
    * EXPORTING
    *   APPLICATION                       = 'TX'
    *   ARCHIVE_INDEX                     =
    *   ARCHIVE_PARAMS                    =
    *   DEVICE                            = 'PRINTER'
    *   DIALOG                            = 'X'
    *   FORM                              = 'ZSCRIPT1'
    *   LANGUAGE                          = SY-LANGU
    *   OPTIONS                           =
    *   MAIL_SENDER                       =
    *   MAIL_RECIPIENT                    =
    *   MAIL_APPL_OBJECT                  =
    *   RAW_DATA_INTERFACE                = '*'
    *   SPONUMIV                          =
    * IMPORTING
    *   LANGUAGE                          =
    *   NEW_ARCHIVE_PARAMS                =
    *   RESULT                            =
    EXCEPTIONS
       CANCELED                          = 1
       DEVICE                            = 2
       FORM                              = 3
       OPTIONS                           = 4
       UNCLOSED                          = 5
       MAIL_OPTIONS                      = 6
       ARCHIVE_ERROR                     = 7
       INVALID_FAX_NUMBER                = 8
       MORE_PARAMS_NEEDED_IN_BATCH       = 9
       SPOOL_ERROR                       = 10
       CODEPAGE                          = 11
       OTHERS                            = 12
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'START_FORM'
    EXPORTING
    *   ARCHIVE_INDEX          =
       FORM                   = 'ZFORM1'
    *   LANGUAGE               = ' '
    *   STARTPAGE              = 'X'
       PROGRAM                = 'ZSCRIPT1'
    *   MAIL_APPL_OBJECT       =
    * IMPORTING
    *   LANGUAGE               =
    * EXCEPTIONS
    *   FORM                   = 1
    *   FORMAT                 = 2
    *   UNENDED                = 3
    *   UNOPENED               = 4
    *   UNUSED                 = 5
    *   SPOOL_ERROR            = 6
    *   CODEPAGE               = 7
    *   OTHERS                 = 8
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    *   ELEMENT                        = ' '
    *   FUNCTION                       = 'SET'
    *   TYPE                           = 'BODY'
       WINDOW                         = 'HEADER'
    * IMPORTING
    *   PENDING_LINES                  =
    EXCEPTIONS
       ELEMENT                        = 1
       FUNCTION                       = 2
       TYPE                           = 3
       UNOPENED                       = 4
       UNSTARTED                      = 5
       WINDOW                         = 6
       BAD_PAGEFORMAT_FOR_PRINT       = 7
       SPOOL_ERROR                    = 8
       OTHERS                         = 9
    IF SY-SUBRC <> 0.
    write:/ 'ERROR IN HEADER'.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    *   ELEMENT                        = ' '
    *   FUNCTION                       = 'SET'
    *   TYPE                           = 'BODY'
       WINDOW                         = 'MAIN'
    * IMPORTING
    *   PENDING_LINES                  =
    EXCEPTIONS
       ELEMENT                        = 1
       FUNCTION                       = 2
       TYPE                           = 3
       UNOPENED                       = 4
       UNSTARTED                      = 5
       WINDOW                         = 6
       BAD_PAGEFORMAT_FOR_PRINT       = 7
       SPOOL_ERROR                    = 8
       OTHERS                         = 9
    IF SY-SUBRC <> 0.
    write:/ 'ERROR IN HEADER'.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    *   ELEMENT                        = ' '
    *   FUNCTION                       = 'SET'
    *   TYPE                           = 'BODY'
       WINDOW                         = 'FOOTER'
    * IMPORTING
    *   PENDING_LINES                  =
    EXCEPTIONS
       ELEMENT                        = 1
       FUNCTION                       = 2
       TYPE                           = 3
       UNOPENED                       = 4
       UNSTARTED                      = 5
       WINDOW                         = 6
       BAD_PAGEFORMAT_FOR_PRINT       = 7
       SPOOL_ERROR                    = 8
       OTHERS                         = 9
    IF SY-SUBRC <> 0.
    write:/ 'ERROR IN HEADER'.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'END_FORM'
    * IMPORTING
    *   RESULT                         =
    * EXCEPTIONS
    *   UNOPENED                       = 1
    *   BAD_PAGEFORMAT_FOR_PRINT       = 2
    *   SPOOL_ERROR                    = 3
    *   CODEPAGE                       = 4
    *   OTHERS                         = 5
    CALL FUNCTION 'CLOSE_FORM'
    * IMPORTING
    *   RESULT                         =
    *   RDI_RESULT                     =
    * TABLES
    *   OTFDATA                        =
    * EXCEPTIONS
    *   UNOPENED                       = 1
    *   BAD_PAGEFORMAT_FOR_PRINT       = 2
    *   SEND_ERROR                     = 3
    *   SPOOL_ERROR                    = 4
    *   CODEPAGE                       = 5
    *   OTHERS                         = 6
    <b>difference between</b> 
    1<b><u>.open_form and Start form
    2.end_form and Close_form.</u></b>
    Open_form => It assign the form and printer, It should be first.
    Start_form =>  It start Writing mode. You can use write_form  in loop to write more than one lines befor End_form. 
    End_form => It end writing mode of current page and will require to start again through Start_form.
    Close_form=> it end the Form. After this you can not start again for created file.
    Reward if helpfull
    Regards
    Pavan

  • Write results to report file once per minute

    Hello All,
    If I understand correctly, the standard setup for report creation is to save all results to the report at the end of the test. I am running a Teststand script over several days, there is a chance power could be lost or the machine could fail. For this reason it makes sense to save results (typically the last minutes results) to the report file regularly. Is there any way to do this?
    Regards
    Chris

    Hey Guys! On the fly reporting is definately the way forward. Here is a great KB which explains it in more detail...
    On-The-Fly Reporting and Logging in TestStand
    http://digital.ni.com/public.nsf/allkb/C9113BE0E55F22EE86256D82005E7DDB?OpenDocument
    Rich R
    Applications Engineer
    National Instruments UK & Ireland

  • IR: aggregation result in report footer

    Hello!
    This quote from "Beginning Oracle Application Express 4.2" at page 174 (about aggregation in IR):
    "The results are displayed at the end of the report."
    There is a simple method to print the results of aggregation to the report footer on each page?

    I asked - and I answered
    For making this I create on-Demand process for calculation results of aggregation (using APEX_IR_PKG) and make ajax request to him in "After Refresh" event of IR.
    There is the detailed manual with sample http://devsonia.ru/2013/11/14/oracle-apex-aggregation-in-interactive-report-on-each-page-en/.

Maybe you are looking for