Report program

hi,
i am able to get the preview for the below program..But i am not getting the spool list..and want to check whether the following mail has been successfully sent to the receiver in sost transaction..kindly resolve this problem...i am also getting the runtime error for this..which is causing more problem..kindly try this program and suggest me a solution
**& Report  ZKP_SAPSCRIPT                                               *
REPORT  zkp_sapscript.
DATA : x_itcpo   TYPE itcpo,   "SAPscript output interface
       x_itcpp1   TYPE itcpp,  "SAPscript output parameters
       x_itcpp2   TYPE itcpp,
       c_std_text(8)         TYPE c VALUE 'STD_TEXT', "variable that is used in SAP SCRIPT
       it_packing_list TYPE TABLE OF sopcklsti1 INITIAL SIZE 0 WITH HEADER LINE,
       it_objtxt     TYPE TABLE OF solisti1  INITIAL SIZE 0 WITH HEADER LINE,
       s_spool    TYPE tsp01-rqident,
   it_spool_file     TYPE TABLE OF soli      INITIAL SIZE 0 WITH HEADER LINE,
       v_sender TYPE soextreci1-receiver VALUE '[email protected]',
       c_addr_type           TYPE soextreci1-adr_typ VALUE 'INT',
       it_reclist    TYPE TABLE OF somlreci1 INITIAL SIZE 0 WITH HEADER LINE,
       v_receiver TYPE somlreci1-receiver VALUE '[email protected]',
       x_docdata TYPE sodocchgi1,
       tab_lines  TYPE sy-tabix,
       lin1 TYPE i.
------ Printer settings structure  -
x_itcpo-tddest = ''.
x_itcpo-tdrdidev = ''.
x_itcpo-tdnewid = 'x'.
x_itcpo-tdsenddate = sy-datum.
x_itcpo-tdsendtime = sy-uzeit.
x_itcpo-tdschedule = 'imm'.
x_itcpo-tdimmed = ' '.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
  APPLICATION                       = 'TX'
  ARCHIVE_INDEX                     =
  ARCHIVE_PARAMS                    =
   device                            = 'PRINTER'
   dialog                            = 'X'
   form                              = 'ZTEST_FORM7 '
   language                          = sy-langu
   options                           = x_itcpo
  MAIL_SENDER                       =
  MAIL_RECIPIENT                    =
  MAIL_APPL_OBJECT                  =
  RAW_DATA_INTERFACE                = '*'
  SPONUMIV                          =
IMPORTING
  LANGUAGE                          =
  NEW_ARCHIVE_PARAMS                =
  RESULT                            =  X_ITCPP1
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.
*Assigning the standard text name
CALL FUNCTION 'TEXT_SYMBOL_SETVALUE'
  EXPORTING
    name            = c_std_text
    value           = 'ZTEST_STD1'
    value_length    = 0
    replace_symbols = 'x'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
   element                        = 'E05_HEADER '
   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
  CODEPAGE                       = 9
  OTHERS                         = 10
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                        = 'ELEMENT1'
   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
  CODEPAGE                       = 9
  OTHERS                         = 10
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                        = 'E05_FOOTER '
   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
  CODEPAGE                       = 9
  OTHERS                         = 10
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 'CLOSE_FORM'
IMPORTING
   RESULT                         =  x_itcpp2
  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.
***********************EXECUTES SUCCESSFULLY UNTIL THIS*********************************
------- spool no. of the spool generated -
s_spool = x_itcpp2-tdspoolid.
------- Fetching of the spool contents -
IF NOT s_spool IS INITIAL.
  CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
    EXPORTING
      rqident                    = s_spool
     first_line                 = 1
     last_line                  = 1000
     desired_type               = 'RAW'
IMPORTING
  REAL_TYPE                  =
  SP_LANG                    =
    TABLES
      buffer                     = it_spool_file "mail content
  BUFFER_PDF                 =
EXCEPTIONS
  NO_SUCH_JOB                = 1
  JOB_CONTAINS_NO_DATA       = 2
  SELECTION_EMPTY            = 3
  NO_PERMISSION              = 4
  CAN_NOT_ACCESS             = 5
  READ_ERROR                 = 6
  TYPE_NO_MATCH              = 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.
ENDIF.
CALCULATING THE NO OF RECORDS IN IT_SPOOL_FILE************
DESCRIBE TABLE it_spool_file LINES lin1.
*------ Filling the spool contents into internal table obtxt,-----
*------ whose contents will be displayed as the body of email -
IF lin1 GT 0.
  LOOP AT it_spool_file.
    it_objtxt-line = it_spool_file-line.
    APPEND it_objtxt.
    CLEAR it_objtxt.
    CLEAR it_spool_file-line.
  ENDLOOP.
ENDIF.
DESCRIBE TABLE it_objtxt LINES tab_lines.
READ TABLE it_objtxt INDEX tab_lines.
*------ Calculating doc. size which is email -
x_docdata-obj_name  = 'ZTEST_STD1'.
x_docdata-obj_descr = 'HAI TEST'.
x_docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( it_objtxt ).
*THIS SET OF CODE IS TO UPDATE THE RECEIVER EMAIL ADDRESS
CLEAR it_reclist.
REFRESH it_reclist.
it_reclist-receiver = v_receiver.
it_reclist-rec_type = 'U'.
it_reclist-copy = ' '.
it_reclist-blind_copy = ' '.
APPEND it_reclist.
*contains the document description
CLEAR it_packing_list.
REFRESH it_packing_list.
it_packing_list-transf_bin = space.
it_packing_list-head_start = 1.
it_packing_list-head_num = 0.
it_packing_list-body_start = 1.
DESCRIBE TABLE it_objtxt LINES it_packing_list-body_num.
it_packing_list-doc_type = 'RAW'.
APPEND it_packing_list.
*this is the function module which sends the mail
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
  EXPORTING
    document_data                   = x_docdata
   put_in_outbox                    = 'X'
   sender_address                   =  v_sender  "senders mail address
   sender_address_type              = 'INT'
   commit_work                      = 'X'
IMPORTING
  SENT_TO_ALL                      =
  NEW_OBJECT_ID                    =
  SENDER_ID                        =
  TABLES
    packing_list                     = it_packing_list
  OBJECT_HEADER                    =
  CONTENTS_BIN                     =
   contents_txt                     = it_objtxt  "this is the table which contains the content of the mail
  CONTENTS_HEX                     =
  OBJECT_PARA                      =
  OBJECT_PARB                      =
    receivers                        = it_reclist        "contains the receivers mail id
EXCEPTIONS
  TOO_MANY_RECEIVERS               = 1
  DOCUMENT_NOT_SENT                = 2
  DOCUMENT_TYPE_NOT_EXIST          = 3
  OPERATION_NO_AUTHORIZATION       = 4
  PARAMETER_ERROR                  = 5
  X_ERROR                          = 6
  ENQUEUE_ERROR                    = 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.
Message was edited by: rajkumar shanmuganathan

Hi
Use SCOT trx to check if your message was sent succeffully.
Which error do you get?
Max

Similar Messages

  • Help needed in report programming

    Hi All
    I am processing some data on first screen of a report transaction and an output is displayed on second screen. My requirement is that when I press back, I have to come to SAP initial screen.
    I have tried all options with 'LEAVE'. Problem is that control doesnt come even once in report, it goes into some standard code so I am unable to make changes..
    Kindly help.
    Thanks
    Dinesh
    <LOCKED BY MODERATOR - USE APPROPRIATE TITLES>
    <LOCKED BY MODERATOR - URGENT, PLEASE HELP OR SIMILAR ARE FORBIDDEN>
    Edited by: Alvaro Tejada Galindo on Aug 18, 2008 5:17 PM

    Hi,
    Since it is a report program. U have to set PF status in ur output page (either ALV or any other output format).
    In GUI status, triger the function code for BACK.
    Then, inside the event AT USER-COMMAND, code LEAVE PROGRAM for the BACK function.
    If it is an ALV output, the PF-status and User-command event should be called in the ALV function module.
    Regards,
    Prem

  • What is difference between report programming and dialog programming?

    hi,
    what is difference between report programming and dialog programming? plz provide some example code
    bye

    ABAP programming
    Basically reports are used to read database and represent the results in lists.
    Reports are collections of processing blocks that the system calls depending on events.
    We can use reports to evaluate data from database tables.
    Reports are stand alone programs and controlled by events.
    A report itself never creates events
    steps in report:
    Processing the selection screen
    Reading the database
    Evaluating the data and creating lists
    Outputting a list.
    1st u write simple logics, after that u can enhance the code as step by step.
    http://venus.imp.mx/hilario/Libros/TeachYrslfAbap4/index.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/d1/802cfc454211d189710000e8322d00/frameset.htm
    http://www.sapdev.co.uk/reporting/reportinghome.htm
    Dialog Programming
    Structure of a Dialog Program
    A dialog program consists of the following basic components:
    Screens (dynpros)
    Each dialog in an SAP system is controlled by dynpros. A dynpro (DYnamic PROgram) consists of a screen and its flow logic and controls exactly one dialog step. The flow logic determines which processing takes place before displaying the screen (PBO-Process Before Output) and after receiving the entries the user made on the screen (PAI-Process After Input).
    The screen layout fixed in the Screen Painter determines the positions of input/output fields, text fields, and graphical elements such as radio buttons and checkboxes. In addition, the Menu Painter allows to store menus, icons, pushbuttons, and function keys in one or more GUI statuses. Dynpros and GUI statuses refer to the ABAP/4 program that control the sequence of the dynpros and GUI statuses at runtime.
    ABAP/4 module pool
    Each dynpro refers to exactly one ABAP/4 dialog program. Such a dialog program is also called a module pool, since it consists of interactive modules. The flow logic of a dynpro contains calls of modules from the corresponding module pool. Interactive modules called at the PBO event are used to prepare the screen template in accordance to the context, for example by setting field contents or by suppressing fields from the display that are not needed. Interactive modules called at the PAI event are used to check the user input and to trigger appropriate dialog steps, such as the update task.
    All dynpros to be called from within one transaction refer to a common module pool. The dynpros of a module pool are numbered. By default, the system stores for each dynpro the dynpro to be displayed next. This dynpro sequence or chain can be linear as well as cyclic. From within a dynpro chain, you can even call another dynpro chain and, after processing it, return to the original chain.
    Check this link for basics.
    http://sap.mis.cmich.edu/sap-abap/abap09/index.htm
    Check this link for Dialog Programming/Table Control
    http://www.planetsap.com/Tips_and_Tricks.htm#dialog
    Check this SAP Help for Dialog Program doc.
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/content.htm
    Check this SAP Help link for Subscreens.
    http://help.sap.com/saphelp_nw70/helpdata/en/9f/dbabfe35c111d1829f0000e829fbfe/content.htm
    Check this link for subscreen demo program.
    http://abapcode.blogspot.com/2007/05/demo-program-to-create-subscreen-in.html
    Also check this link too.
    http://abapcode.blogspot.com/2007/06/dialog-programming-faq.html
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/frameset.htm
    http://sap.mis.cmich.edu/sap-abap/abap09/sld004.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/52/670ba2439b11d1896f0000e8322d00/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/52/670c17439b11d1896f0000e8322d00/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/52/670c17439b11d1896f0000e8322d00/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9ccf35c111d1829f0000e829fbfe/frameset.htm
    http://abapprogramming.blogspot.com/

  • Problem WIth Variant in a report program

    I have a z report program with couple of variants , the problem is the varaints display onlt name of the variant and description when the varaint button is pressed.
    The changed by , date etc details are not getting displayed.
    Thanks
    Arun

    Hi Arun,
    You will not get those data directly from the program execution screen. If you want to get those details, please check table VARID for that variant or program.
    Regards,
    Sourav

  • Can we create purchase order through report programming?

    hi experts.....
    can we create purchase order through report programming?If yes plz give me the thread details?

    Hi,
    Use this code in a program by using a BAPI function module
    Anothe rway is using classical/ALV report using call transaction from a report for changing the PO
    loop at i_header.
        header-ref_1         = i_header-legacy.
        headerx-ref_1        = c_x.
        header-doc_type      = i_header-bsart.
        headerx-doc_type     = c_x.
        header-comp_code     = i_header-bukrs.
        headerx-comp_code    = c_x.
        header-purch_org     = i_header-ekorg.
        headerx-purch_org    = c_x.
        header-pur_group     = i_header-ekgrp.
        headerx-pur_group    = c_x.
        header-vendor        = i_header-lifnr.
        headerx-vendor       = c_x.
        concatenate i_header-bedat+4(4)
                    i_header-bedat+0(2)
                    i_header-bedat+2(2)
                    into header-doc_date.
        headerx-doc_date     = c_x.
        header-created_by    = i_header-ernam.
        headerx-created_by   = c_x.
        header-currency      = i_header-waers.
        headerx-currency     = c_x.
        concatenate i_header-kdatb+4(4)
                    i_header-kdatb+0(2)
                    i_header-kdatb+2(2)
                    into header-vper_start.
        headerx-vper_start   = c_x.
        loop at i_items where legacy = i_header-legacy.
          item-po_item            =  i_items-ebelp.
          itemx-po_item           =  i_items-ebelp.
          itemx-po_itemx          =  c_x.
          if i_header-bsart = 'NB'.
            item-material            =  i_items-ematn.
            itemx-material           =  c_x.
            schedule-quantity        =  i_items-menge * 1000.
            schedulex-quantity       =  c_x.
          else.
            item-short_text          = i_items-ematn.
            itemx-short_text         = c_x.
            item-matl_group          = '1000'.
            itemx-matl_group         = c_x.
            schedule-quantity        =  '1'.
            schedulex-quantity       =  c_x.
          endif.
          item-plant               =  i_items-werks.
          itemx-plant              =  c_x.
          schedule-po_item         = i_items-ebelp.
          schedule-sched_line      = '1'.
          schedulex-po_item        = i_items-ebelp.
          schedulex-sched_line     = '1'.
          schedulex-po_itemx       = c_x.
          schedulex-sched_linex    = c_x.
          concatenate  i_items-eildt+0(2)
                       i_items-eildt+2(2)
                       i_items-eildt+4(4)
                       into schedule-delivery_date.
          schedulex-delivery_date  =  c_x.
          item-price_unit          =  i_items-peinh * 100.
          itemx-price_unit         =  c_x.
          item-tax_code            =  i_items-mwskz.
          itemx-tax_code           =  c_x.
          item-shipping            =  i_items-evers.
          itemx-shipping           =  c_x.
          account-po_item          = i_items-ebelp.
          accountx-po_item         = i_items-ebelp.
          accountx-po_itemx        = c_x.
          if i_header-bsart = 'FO'.
            item-pckg_no  = sy-tabix.
            itemx-pckg_no = 'X'.
            limits-pckg_no        = sy-tabix.
            limits-limit          = i_items-overalllimit.
            limits-exp_value      = i_items-expectedoverall.
            posrvaccessvalues-pckg_no    = sy-tabix.
            posrvaccessvalues-line_no    = '0'.
            posrvaccessvalues-serno_line = '00'.
            posrvaccessvalues-percentage = '100.0'.
            posrvaccessvalues-serial_no  = '01'.
            account-serial_no     = '1'.
            accountx-serial_no    = '1'.
            accountx-serial_nox   = c_x.
            account-quantity  = '1'.
            accountx-quantity = c_x.
            call function 'CONVERSION_EXIT_ALPHA_INPUT'
              exporting
                input  = i_items-kostl
              importing
                output = account-costcenter.
            accountx-costcenter   = c_x.
            call function 'CONVERSION_EXIT_ALPHA_INPUT'
              exporting
                input  = i_items-sakto
              importing
                output = account-gl_account.
            accountx-gl_account   = c_x.
            item-acctasscat       = i_items-knttp.
            itemx-acctasscat      = c_x.
            item-item_cat         = i_items-epstp.
            itemx-item_cat        = c_x.
          endif.
          append:item,itemx,schedule,schedulex,account,accountx,limits,posrvaccessvalues.
          clear :item,itemx,schedule,schedulex,account,accountx,limits,posrvaccessvalues.
        endloop.
        call function 'BAPI_PO_CREATE1'
          exporting
            poheader                     = header
            poheaderx                    = headerx
    *   POADDRVENDOR                 =
    *   TESTRUN                      =
    *   MEMORY_UNCOMPLETE            =
    *   MEMORY_COMPLETE              =
    *   POEXPIMPHEADER               =
    *   POEXPIMPHEADERX              =
    *   VERSIONS                     =
    *   NO_MESSAGING                 =
    *   NO_MESSAGE_REQ               =
    *   NO_AUTHORITY                 =
    *   NO_PRICE_FROM_PO             =
            importing
            exppurchaseorder             = ponumber
    *   EXPHEADER                    =
    *   EXPPOEXPIMPHEADER            =
            tables
            return                       = return
            poitem                       = item
            poitemx                      = itemx
    *   POADDRDELIVERY               =
            poschedule                   = schedule
            poschedulex                  = schedulex
            poaccount                    = account
    *   POACCOUNTPROFITSEGMENT       =
            poaccountx                   = accountx
    *   POCONDHEADER                 =
    *   POCONDHEADERX                =
    *   POCOND                       =
    *   POCONDX                      =
            polimits                     = limits
    *   POCONTRACTLIMITS             =
    *   POSERVICES                   =
       posrvaccessvalues            = posrvaccessvalues.
    *   POSERVICESTEXT               =
    *   EXTENSIONIN                  =
    *   EXTENSIONOUT                 =
    *   POEXPIMPITEM                 =
    *   POEXPIMPITEMX                =
    *   POTEXTHEADER                 =
    *   POTEXTITEM                   =
    *   ALLVERSIONS                  =
    *   POPARTNER                    =
        if ponumber eq space.
          loop at return where type = 'E'.
            clear buffer.
            move-corresponding return to e_return.
            concatenate i_header-legacy e_return into buffer.
            transfer buffer to p2_file.
          endloop.
          move-corresponding i_header to i_eheader.
          transfer i_eheader to p3_file.
          loop at i_items where legacy = i_header-legacy.
            move-corresponding i_items to i_eitems.
            transfer i_eitems to p4_file.
          endloop.
        else.
          commit work and wait.
        endif.
        clear:ponumber,header,headerx,item,itemx,account,accountx,limits,return,schedule,schedulex,posrvaccessvalues.
        refresh:item,itemx,account,accountx,limits,return,schedule,schedulex,posrvaccessvalues.
      endloop.
      close dataset p2_file.
      close dataset p3_file.
      close dataset p4_file.
    Regards
    Krishna

  • Calling a ALV Report program via a Remote Function module.

    H All,
         The thing which I am looking out for is ,to know a technique to acheive this,
      To start with,
    For the transaction MB51-(Material Document List),which is a Report Program "RM07DOCS",I also observed that this uses a ALV to display the output.
    Now what I actually require is another extra field (from MARA table )  along with the standard output that is displayed from this report.
    Also this needs to be passed to a different UI system(build using VC ).
    So I have a RFC eg DisplayList(),where in I need to exeucte this report program ,get the output what it gives ,add my additional information what I want to and pass it as a export parameter,
    So this is the structure which I can visualise,
    FUNCTION ZFUN_MB51TXN.
    I would get all the import parameters here ,from who ever is calling my fun module,
    *Call the report program,pass the input  parameters required
    *get the output from this report program
    *send the output to the caller through export parameters
    ENDFUNCTION.
    So Here I need to know ,Can this be achieved something using Submit report or anything,Any guidelines to move further would be really of great help!

    Hi All,
    It would really be great if you can explain with the reference to the same report program,the same selection screen elemetns or something.
    Thanks,
    Archies!

  • How to generage pop up screen on selection screen of report program?

    Hi Guys,
            I am having a requirement to generate the <b>pop up screen on the selection screen</b> of the report program.
           Suggest me the best one with model program

    Hi Chakradhar,
                             Refer this code :
    SELECTION-SCREEN BEGIN OF BLOCK BL2 WITH FRAME TITLE TEXT-456.
    PARAMETERS PO RADIOBUTTON GROUP RADI USER-COMMAND R.
    SELECTION-SCREEN END OF BLOCK BL2.
    AT SELECTION-SCREEN OUTPUT.
    CALL SCREEN 100.
    when user will click on this radio button , a pop up screen will appear dynamically.
    Reward points if helpful.
    Regards,
    Hemant

  • Create a url from a report program

    Hi All,
    Could anyone please suggest me how do i generate a url from a report program. I need to use this generated url then, as a link in an excel sheet.
    Thanks in advance,
    Warm Regards,
    Preethi.

    Hi Preethi,
    REPORT  ZAZUURL                                 .
    DATA: BEGIN OF URL_TABLE OCCURS 10,
    L(25),
    END OF URL_TABLE.
    URL_TABLE-L = 'http://www.lycos.com'.APPEND URL_TABLE.
    URL_TABLE-L = 'http://www.hotbot.com'.APPEND URL_TABLE.
    URL_TABLE-L = 'http://www.sap.com'.APPEND URL_TABLE.
    LOOP AT URL_TABLE.
      SKIP. FORMAT INTENSIFIED OFF.
      WRITE: / 'Single click on '.
      FORMAT HOTSPOT ON.FORMAT INTENSIFIED ON.
      WRITE: URL_TABLE. HIDE URL_TABLE.
      FORMAT HOTSPOT OFF.FORMAT INTENSIFIED OFF.
      WRITE: 'to go to', URL_TABLE.
    ENDLOOP.
    CLEAR URL_TABLE.
    AT LINE-SELECTION.
    IF NOT URL_TABLE IS INITIAL.
      CALL FUNCTION 'WS_EXECUTE'
           EXPORTING
                program = 'C:\Program Files\Internet Explorer\IEXPLORE.EXE'
                commandline     = URL_TABLE
                INFORM         = ''
              EXCEPTIONS
                PROG_NOT_FOUND = 1.
      IF SY-SUBRC <> 0.
         WRITE:/ 'Cannot find program to open Internet'.
      ENDIF.
    ENDIF.
    <b>Regards,
    Azhar</b>

  • How to find Transaction code from Report/program name ?

    Dear all,
    How to find Transaction code if i know Report/program name ?

    Hi,
    In se 38 when u open ur program,in the application toolbar u have a button beside the where-used list button as display object list.on clicking this button,a window will be opened at the left most corner for repository browser,in this u can find any tranasctions,fileds,screens,dictionary structures defined for the program.
    if any transaction is created for the program u can find it under the transaction folder.
    revert back for further queries.
    Regards,
    Sravanthi

  • SAP Query - Report program generation

    Hello all,
    Now I'm developing SAP queries through Tr-cd:SQ01.
    As you know, every time (re)defining queries, we have to (re)generate the selection screen report programs, containing the input parameter for output format along with other input parameters.
    The problems are:
    1.
    I CAN select other layout formats on the selection screen in one system(Dev System) when I define the output format as "SAP List Viewer" in Tr-cd:SQ01 and generate the report program  (,while I CANNOT select other layout formats on another system, QA System.)
    2.
    When selecting other formats than "SAP List Viewer"
    in Tr-cd:SQ01, so difference between these two systems, that is, I can select all formats options on the selection screen.
    3.
    After redefining the formats as "SAP List Viewer" on the QA System, We CANNOT select other layout formats again while I remain to be able to select all options on the DEV system.
    I think the report program generation function in QA system operates normally, while there is somthing wrong with DEV system.
    Do you have any idea about this phenomenon?

    Hello Thomas, I appreciate your quick response and apologize for my late reply.
    After recieving your sugestion I continued process of trial & error only to find that the setting to generate the report program had been changed to old one for some reason.
    You can change the setting in the following way:
    Tr-cd:SQ02
    Settings -> Global Settings
    Check (or Uncheck) the box of "Always use the old report structure."

  • Getting the variant name when the report program is run in background

    Hi All,
    How to get the variant name for the report program when run in background? My requirement is to create an email attachement with the name 'variant.XLS', where variant = selection screen variant, when the report program is run in background. The system field SY-SLSET holds the variant name only when run online.
    Any pointers to this will be highly appreciated.
    Thanks and regards,
    Nilesh.

    Hello Nilesh,
    Please find the algo:
    1. Call the FM: GET_JOB_RUNTIME_INFO to get the background job details.
    2. Select data from TBTCP using these details:
    DATA:
    FP_EVENTID   TYPE BTCEVENTID
    FP_EVTPARM   TYPE BTCEVTPARM
    FP_ACTIVE    TYPE BTCXPGFLAG
    FP_JOBCNT    TYPE BTCJOBCNT
    FP_JOBNM     TYPE BTCJOB
    FP_STEPCNT   TYPE BTCSTEPCNT.
      CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
        IMPORTING
          EVENTID                 = FP_EVENTID
          EVENTPARM               = FP_EVTPARM
          EXTERNAL_PROGRAM_ACTIVE = FP_ACTIVE
          JOBCOUNT                = FP_JOBCNT
          JOBNAME                 = FP_JOBNM
          STEPCOUNT               = FP_STEPCNT
        EXCEPTIONS
          NO_RUNTIME_INFO         = 1
          OTHERS                  = 2.
      IF SY-SUBRC <> 0.
    *   Error calling FM: GET_JOB_RUNTIME_INFO
      ENDIF.
    DATA: FP_VARIANT TYPE BTCVARIANT.
      SELECT JOBNAME JOBCOUNT STEPCOUNT VARIANT
      FROM   TBTCP
      INTO TABLE L_IT_TBTCP
      WHERE  JOBNAME   = FP_JOBNM
      AND    JOBCOUNT  = FP_JOBCNT
      AND    STEPCOUNT = FP_STEPCNT.
      IF SY-SUBRC = 0.
        SORT L_IT_TBTCP BY JOBNM JOBCNT STEPCNT.
        READ TABLE L_IT_TBTCP INTO L_WA_TBTCP INDEX 1.
        IF SY-SUBRC = 0.
          FP_VARIANT = L_WA_TBTCP-VARIANT.
        ENDIF.
      ENDIF.
    Hope this helps.
    BR,
    Suhas

  • Few questions on Report programming

    Hi guys,
    I have few questions on report programming.
    1. What is the purpose of the statement REPORT zxxx. Even if i gave a name other than my report name i don't find any difference in syntax check/Functionality.
    2. What is the purpose of list headings in report program? This option will come along with the text elements and selection texts.
    3. What is the purpose of logical data base. Even if it is efficient why don't we use it frequently in our reports? Is there any limitations?
    All usefull answers will be rewarded as usuall:-)
    Thanks,
    Vinod.

    1. As u told that you dint get any syntax errors even after changing the Report Name,there are chances of getting Runtime errors.
    2. The usage of List Headings is when you create a list in a program, you can also create your own list and column headings.
    Refer this link for further info.
    http://help.sap.com/saphelp_nw70/helpdata/en/e3/960a05eb0711d194d100a0c94260a5/content.htm
    3. The Limitation of LDB  is the usage of GET statements which act similar to SELECT - ENDSELECT And also if you dont choose the proper LDB,a  single LDB may contain data retrieval from so many tables ,that it would make the entire process very slow and it is very hard to find LDBs for other modules than HR.
    Only in HR module the data is organized in such a way thatusing LDBs would be much simpler.
    Reward points if useful.

  • A report program

    hello,
    i hav created report program ....in which i hav printing data in two colums(sections)
    of a page....im printing first 'first column'...n then 'second one' ( i.e. im printing left side of page and then right side of page )  n  i hav declaired <b>line-count 60</b> ...while printing on left side if page ends due to line-count is set.....im not able to print on right of that page because page is set to next page( and it start printing from next page on right side as it is changed)...i want know that .... is it posiible to come back to previous page while printing in report program .....(as i hav mentioned problem ).....i want to know the code for that if possible....
    Regards,
    Gajanan Galande

    You can print first the right and then the left, using the BACK or  SKIP TO LINE <n>.  BACK can be used with or without RESERVE.   Also don't forget about POSITION <n> to set the output column.
    BACK returns to the first line of the current page after TOP-OF-PAGE
    You will have to monitor the number lines you print because once you overflow, you cannot BACK to a prior page.
    I hope this helps. 
    Look up in the ABAP help for examples of using these.
    Bob
    (Points are appreciated)

  • How to submit a  report program to a standard program.

    I want to submit a report program to a slection screen program which is standard with some values. can any one help me out.
    here is the code.
    CONSTANTS:  w_object(10)   type c value  'ZCOST2',
               k_projet(10)   TYPE c VALUE 'AIN_AUSA2',
               k_ssprojet(10) TYPE c VALUE 'ZCOST2'.
    SUBMIT /sapdmc/sap_lsmw_bi_recording
                     via selection-screen
                     WITH p_keep = 'X'
                     WITH p_object = w_object
                     WITH p_projec = k_projet
                     WITH p_subpro = k_ssprojet and return.

    Hi
    Try this...
    SUBMIT /sapdmc/sap_lsmw_bi_recording
                 WITH p_keep = 'X'
                 WITH p_object = w_object
                 WITH p_projec = k_projet
                 WITH p_subpro = k_ssprojet
                  AND return.
    Note:  No need to mention 'VIA Selection Screen', it's not a mandatory.....

  • Bursting Program PDF Fonts different from Report Program PDF

    We have designed a new XML Publisher report which uses bursting mecahnism to send out the output pdf to supplier. The report rdf completes successfully and generates the pdf with right fonts (Font Mapping configured in XML Publisher Administrator). AfterReport trigger of this report triggers the bursting program. This program sends out the pdf to the right recepients. But this pdf that comes through mail has different fonts then what it was in the output of first program. Can some one guide on how to get the same pdf fonts through bursting email file that is similar to the one that was generated through Report Program. Any help will be highly appreciated.
    Thanks,
    Mohammadi

    Anyone who can throw light on this?
    Thx

  • Use abap report program to print bar code instead of smartforms

    Do anyone know how to use abap report program to print bar code?

    Hi Celina,
    http://searchsap.techtarget.com/tip/1,289483,sid21_gci839063,00.html
    I hope this will help, also it depends on the barcode type like ARTNR-code 128...
    Regards,
    Sudhi

Maybe you are looking for

  • FB05 All open items are not displayed

    Hi, We are trying to clear invoices on customer XXXX but it does not show all invoices in transaction FB05. We used all Special GL indicators and with normal items tab seperately as well as simultaneously but not all items are displayed What could be

  • Unable to generate the XML file through SQL script. getting error PLS-00306

    I am fetching the data from cursor and generating the xml output I am getting the below error. When I have checked the cursor query it is fetching the data in to single column. Input truncated to 1 characters Enter value for 7: EXEC FND_CONC_STAT.COL

  • Windows 8 can not connect RemoteApp on W2K12 RDS, but Windows 7 can connect. Why?

    Hi! Windows 8 can not connect RemoteApp (W2K12 RDS), but Windows 7 can connect. Why? External and internal DNS name is different, the public Cert is mapped to RD Web Access and a RD GateWay Role. The internal cert (issued by enterprise ca) is mapped

  • Key figures with currency conversion showing weird values.

    Hi Experts, I have a variable screen, User can key in Target Currency, and Month. Say, (Scenario 1) User keys in Target Currency "MYR", and Month "4" The report will show Jan| Feb| March| April| May| June| ... 2| 3| 5| 7| 0| 0| 0 ... This is correct.

  • Invoice price

    Hi how to create invoice price more than grn price.which place settings available,plz help, Regards mohan