How to send output to a specific field?

Can someone point me in the right direction to get an output from a caculation to go into a specific Jtext field? What I want it to do is gather the info from what the user puts in the fields, then the program does the calculation, then out put the calculation to another text field.
thanks!
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
public class Mortgage5 extends JFrame implements ItemListener, ActionListener {
    // set up row 1
    JPanel row1 = new JPanel();
    JLabel principleLabel = new JLabel("Please enter your Principle with no commas: ", JLabel.RIGHT);
    JTextField principle = new JTextField(10);
    //set up row 2
    JPanel row2 = new JPanel();
    JLabel termLabel = new JLabel("Please enter the term of the loan in years: ", JLabel.RIGHT);
    JTextField term = new JTextField(10);
    //set up row 3
    JPanel row3 = new JPanel();
    JLabel aprLabel = new JLabel("Please enter your interest rate then press the enter key: ", JLabel.RIGHT);
    JTextField apr = new JTextField(10);
    //set up row 4 the monthly payment output
    JPanel row4 = new JPanel();
    JLabel paymentLabel = new JLabel("Here is your monthly payment: ", JLabel.RIGHT);
    JTextField payment = new JTextField(10);
    //setup row 5 clear or exit
    JPanel row5 = new JPanel();
    JButton calculate = new JButton("Caculate Monthly Payments");
    JButton clear = new JButton("Clear Fields");
    JButton quit = new JButton("Quit");
    public Mortgage5() {
        super("Mortgage Calculator");
        setSize(600, 500);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        GridLayout layout = new GridLayout(5, 1, 10, 5);
        Container pane = getContentPane();
        pane.setLayout(layout);
        FlowLayout layout1 = new FlowLayout(FlowLayout.LEFT, 10, 10);
        row1.setLayout(layout1);
        row1.add(principleLabel);
        row1.add(principle);
        pane.add(row1);
        FlowLayout layout2 = new FlowLayout(FlowLayout.LEFT, 10, 10);
        row2.setLayout(layout2);
        row2.add(termLabel);
        row2.add(term);
        pane.add(row2);
        FlowLayout layout3 = new FlowLayout(FlowLayout.LEFT, 10, 10);
        row3.setLayout(layout3);
        row3.add(aprLabel);
        row3.add(apr);
        pane.add(row3);
        FlowLayout layout4 = new FlowLayout(FlowLayout.LEFT, 10, 10);
        row4.setLayout(layout4);
        row4.add(paymentLabel);
        row4.add(payment);
        pane.add(row4);
        FlowLayout layout5 = new FlowLayout(FlowLayout.CENTER, 10, 10);
        row5.setLayout(layout5);
        row5.add(calculate);
        row5.add(clear);
        row5.add(quit);
        Mortgage5.this.setVisible(false);
        pane.add(row5);
        setVisible(true);
        //Add Listeners
        calculate.addActionListener(this);
        clear.addActionListener(this);
        quit.addActionListener(this);
        principle.addActionListener(this);
        term.addActionListener(this);
        apr.addActionListener(this);     
    public static void main(String[] arguments) {
        Mortgage5 frame = new Mortgage5();
    public void actionPerformed(ActionEvent event) {
        if (event.getSource().equals(clear)) {
            principle.setText(null);
            term.setText(null);
            apr.setText(null);
            payment.setText(null);
        if (event.getSource().equals(quit)) {
            System.exit(0);
        if (event.getSource().equals(calculate)) {    
            double interestRate = Integer.parseInt(apr.getText());
            int loanYears = Integer.parseInt(term.getText());
            double prin = Integer.parseInt(principle.getText());
            //double principle;
            double month_payment;
            double monthlyinterest;
            int months;
            //allows for currency format
            //NumberFormat formatter = NumberFormat.getCurrencyInstance(Locale.US);
            monthlyinterest = (interestRate / 12)/100;          //monthly interest
            months = (loanYears * 12);
            //monthly payment calculation
            month_payment = (prin * monthlyinterest) / (1-Math.pow(1 + monthlyinterest, - months));      
    public void itemStateChanged(ItemEvent event) {
}

payment.setText(""+month_payment);
or
payment.setText(Double.toString(month_payment));
or
payment.setText(new DecimalFormat("###,###.##").format(month_payment));

Similar Messages

  • How to send output of smartform in pdf format as an attachment to email

    how to send output of smartform in pdf format as an attachment to email
    search before posting further and follow Forum rules
    Edited by: Vijay Babu Dudla on Jan 15, 2009 4:50 AM

    Did u check on sdn?
    i dont think so or else there are many posts on this topic and good wikis too.
    look at one of these code tutorial wiki
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/mail%2bsend%2bthrough%2boutput%2bcontrols
    So next time do use the search functionality.
    кu03B1ятu03B9к
    Edited by: kartik tarla on Jan 15, 2009 12:33 PM

  • Urgent ...how to send output of sap through mail

    Could you please guide me how to send output of SAP Script  through mail in PDF format.
    Thanks in Advance....
    Regards,
    Kumar.

    *& Report  ZSPOOLTOPDF                                                 *
    *& Converts spool request into PDF document and emails it to           *
    *& recipicant.                                                         *
    *& Execution                                                           *
    *& This program must be run as a background job in-order for the write *
    *& commands to create a Spool request rather than be displayed on      *
    *& screen                                                              *
    REPORT  zspooltopdf.
    PARAMETER: p_email1 LIKE somlreci1-receiver,
               p_sender LIKE somlreci1-receiver,
                   p_delspl  AS CHECKBOX.
    *DATA DECLARATION
    DATA: gd_recsize TYPE i.
    Spool IDs
    TYPES: BEGIN OF t_tbtcp.
            INCLUDE STRUCTURE tbtcp.
    TYPES: END OF t_tbtcp.
    DATA: it_tbtcp TYPE STANDARD TABLE OF t_tbtcp INITIAL SIZE 0,
          wa_tbtcp TYPE t_tbtcp.
    Job Runtime Parameters
    DATA: gd_eventid LIKE tbtcm-eventid,
          gd_eventparm LIKE tbtcm-eventparm,
          gd_external_program_active LIKE tbtcm-xpgactive,
          gd_jobcount LIKE tbtcm-jobcount,
          gd_jobname LIKE tbtcm-jobname,
          gd_stepcount LIKE tbtcm-stepcount,
          gd_error    TYPE sy-subrc,
          gd_reciever TYPE sy-subrc.
    DATA:  w_recsize TYPE i.
    DATA: gd_subject   LIKE sodocchgi1-obj_descr,
          it_mess_bod LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          gd_sender_type     LIKE soextreci1-adr_typ,
          gd_attachment_desc TYPE so_obj_nam,
          gd_attachment_name TYPE so_obj_des.
    Spool to PDF conversions
    DATA: gd_spool_nr LIKE tsp01-rqident,
          gd_destination LIKE rlgrap-filename,
          gd_bytecount LIKE tst01-dsize,
          gd_buffer TYPE string.
    Binary store for PDF
    DATA: BEGIN OF it_pdf_output OCCURS 0.
            INCLUDE STRUCTURE tline.
    DATA: END OF it_pdf_output.
    CONSTANTS: c_dev LIKE  sy-sysid VALUE 'DEV',
               c_no(1)     TYPE c   VALUE ' ',
               c_device(4) TYPE c   VALUE 'LOCL'.
    *START-OF-SELECTION.
    START-OF-SELECTION.
    Write statement to represent report output. Spool request is created
    if write statement is executed in background. This could also be an
    ALV grid which would be converted to PDF without any extra effort
      WRITE 'Hello World'.
      new-page.
      commit work.
      new-page print off.
      IF sy-batch EQ 'X'.
        PERFORM get_job_details.
        PERFORM obtain_spool_id.
    Alternative way could be to submit another program and store spool
    id into memory, will be stored in sy-spono.
    *submit ZSPOOLTOPDF2
           to sap-spool
           spool parameters   %_print
           archive parameters %_print
           without spool dynpro
           and return.
    Get spool id from program called above
    IMPORT w_spool_nr FROM MEMORY ID 'SPOOLTOPDF'.
        PERFORM convert_spool_to_pdf.
        PERFORM process_email.
        if p_delspl EQ 'X'.
          PERFORM delete_spool.
        endif.
        IF sy-sysid = c_dev.
          wait up to 5 seconds.
          SUBMIT rsconn01 WITH mode   = 'INT'
                          WITH output = 'X'
                          AND RETURN.
        ENDIF.
      ELSE.
        SKIP.
        WRITE:/ 'Program must be executed in background in-order for spool',
                'request to be created.'.
      ENDIF.
          FORM obtain_spool_id                                          *
    FORM obtain_spool_id.
      CHECK NOT ( gd_jobname IS INITIAL ).
      CHECK NOT ( gd_jobcount IS INITIAL ).
      SELECT * FROM  tbtcp
                     INTO TABLE it_tbtcp
                     WHERE      jobname     = gd_jobname
                     AND        jobcount    = gd_jobcount
                     AND        stepcount   = gd_stepcount
                     AND        listident   <> '0000000000'
                     ORDER BY   jobname
                                jobcount
                                stepcount.
      READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
      IF sy-subrc = 0.
        message s004(zdd) with gd_spool_nr.
        gd_spool_nr = wa_tbtcp-listident.
        MESSAGE s004(zdd) WITH gd_spool_nr.
      ELSE.
        MESSAGE s005(zdd).
      ENDIF.
    ENDFORM.
          FORM get_job_details                                          *
    FORM get_job_details.
    Get current job details
      CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
           IMPORTING
                eventid                 = gd_eventid
                eventparm               = gd_eventparm
                external_program_active = gd_external_program_active
                jobcount                = gd_jobcount
                jobname                 = gd_jobname
                stepcount               = gd_stepcount
           EXCEPTIONS
                no_runtime_info         = 1
                OTHERS                  = 2.
    ENDFORM.
          FORM convert_spool_to_pdf                                     *
    FORM convert_spool_to_pdf.
      CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
           EXPORTING
                src_spoolid              = gd_spool_nr
                no_dialog                = c_no
                dst_device               = c_device
           IMPORTING
                pdf_bytecount            = gd_bytecount
           TABLES
                pdf                      = it_pdf_output
           EXCEPTIONS
                err_no_abap_spooljob     = 1
                err_no_spooljob          = 2
                err_no_permission        = 3
                err_conv_not_possible    = 4
                err_bad_destdevice       = 5
                user_cancelled           = 6
                err_spoolerror           = 7
                err_temseerror           = 8
                err_btcjob_open_failed   = 9
                err_btcjob_submit_failed = 10
                err_btcjob_close_failed  = 11
                OTHERS                   = 12.
      CHECK sy-subrc = 0.
    Transfer the 132-long strings to 255-long strings
      LOOP AT it_pdf_output.
        TRANSLATE it_pdf_output USING ' ~'.
        CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
      ENDLOOP.
      TRANSLATE gd_buffer USING '~ '.
      DO.
        it_mess_att = gd_buffer.
        APPEND it_mess_att.
        SHIFT gd_buffer LEFT BY 255 PLACES.
        IF gd_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    ENDFORM.
          FORM process_email                                            *
    FORM process_email.
      DESCRIBE TABLE it_mess_att LINES gd_recsize.
      CHECK gd_recsize > 0.
      PERFORM send_email USING p_email1.
    perform send_email using p_email2.
    ENDFORM.
          FORM send_email                                               *
    -->  p_email                                                       *
    FORM send_email USING p_email.
      CHECK NOT ( p_email IS INITIAL ).
      REFRESH it_mess_bod.
    Default subject matter
      gd_subject         = 'Subject'.
      gd_attachment_desc = 'Attachname'.
    CONCATENATE 'attach_name' ' ' INTO gd_attachment_name.
      it_mess_bod        = 'Message Body text, line 1'.
      APPEND it_mess_bod.
      it_mess_bod        = 'Message Body text, line 2...'.
      APPEND it_mess_bod.
    If no sender specified - default blank
      IF p_sender EQ space.
        gd_sender_type  = space.
      ELSE.
        gd_sender_type  = 'INT'.
      ENDIF.
    Send file by email as .xls speadsheet
      PERFORM send_file_as_email_attachment
                                   tables it_mess_bod
                                          it_mess_att
                                    using p_email
                                          'Example .xls documnet attachment'
                                          'PDF'
                                          gd_attachment_name
                                          gd_attachment_desc
                                          p_sender
                                          gd_sender_type
                                 changing gd_error
                                          gd_reciever.
    ENDFORM.
          FORM delete_spool                                             *
    FORM delete_spool.
      DATA: ld_spool_nr TYPE tsp01_sp0r-rqid_char.
      ld_spool_nr = gd_spool_nr.
      CHECK p_delspl <> c_no.
      CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
           EXPORTING
                spoolid = ld_spool_nr.
    ENDFORM.
    *&      Form  SEND_FILE_AS_EMAIL_ATTACHMENT
          Send email
    FORM send_file_as_email_attachment tables it_message
                                              it_attach
                                        using p_email
                                              p_mtitle
                                              p_format
                                              p_filename
                                              p_attdescription
                                              p_sender_address
                                              p_sender_addres_type
                                     changing p_error
                                              p_reciever.
      DATA: ld_error    TYPE sy-subrc,
            ld_reciever TYPE sy-subrc,
            ld_mtitle LIKE sodocchgi1-obj_descr,
            ld_email LIKE  somlreci1-receiver,
            ld_format TYPE  so_obj_tp ,
            ld_attdescription TYPE  so_obj_nam ,
            ld_attfilename TYPE  so_obj_des ,
            ld_sender_address LIKE  soextreci1-receiver,
            ld_sender_address_type LIKE  soextreci1-adr_typ,
            ld_receiver LIKE  sy-subrc.
    data:   t_packing_list like sopcklsti1 occurs 0 with header line,
            t_contents like solisti1 occurs 0 with header line,
            t_receivers like somlreci1 occurs 0 with header line,
            t_attachment like solisti1 occurs 0 with header line,
            t_object_header like solisti1 occurs 0 with header line,
            w_cnt type i,
            w_sent_all(1) type c,
            w_doc_data like sodocchgi1.
      ld_email   = p_email.
      ld_mtitle = p_mtitle.
      ld_format              = p_format.
      ld_attdescription      = p_attdescription.
      ld_attfilename         = p_filename.
      ld_sender_address      = p_sender_address.
      ld_sender_address_type = p_sender_addres_type.
    Fill the document data.
      w_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      w_doc_data-obj_langu = sy-langu.
      w_doc_data-obj_name  = 'SAPRPT'.
      w_doc_data-obj_descr = ld_mtitle .
      w_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
      CLEAR w_doc_data.
      READ TABLE it_attach INDEX w_cnt.
      w_doc_data-doc_size =
         ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
      w_doc_data-obj_langu  = sy-langu.
      w_doc_data-obj_name   = 'SAPRPT'.
      w_doc_data-obj_descr  = ld_mtitle.
      w_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
      t_attachment[] = it_attach[].
    Describe the body of the message
      CLEAR t_packing_list.
      REFRESH t_packing_list.
      t_packing_list-transf_bin = space.
      t_packing_list-head_start = 1.
      t_packing_list-head_num = 0.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES t_packing_list-body_num.
      t_packing_list-doc_type = 'RAW'.
      APPEND t_packing_list.
    Create attachment notification
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num   = 1.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
      t_packing_list-doc_type   =  ld_format.
      t_packing_list-obj_descr  =  ld_attdescription.
      t_packing_list-obj_name   =  ld_attfilename.
      t_packing_list-doc_size   =  t_packing_list-body_num * 255.
      APPEND t_packing_list.
    Add the recipients email address
      CLEAR t_receivers.
      REFRESH t_receivers.
      t_receivers-receiver = ld_email.
      t_receivers-rec_type = 'U'.
      t_receivers-com_type = 'INT'.
      t_receivers-notif_del = 'X'.
      t_receivers-notif_ndel = 'X'.
      APPEND t_receivers.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
           EXPORTING
                document_data              = w_doc_data
                put_in_outbox              = 'X'
                sender_address             = ld_sender_address
                sender_address_type        = ld_sender_address_type
                commit_work                = 'X'
           IMPORTING
                sent_to_all                = w_sent_all
           TABLES
                packing_list               = t_packing_list
                contents_bin               = t_attachment
                contents_txt               = it_message
                receivers                  = t_receivers
           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.
    Populate zerror return code
      ld_error = sy-subrc.
    Populate zreceiver return code
      LOOP AT t_receivers.
        ld_receiver = t_receivers-retrn_code.
      ENDLOOP.
    ENDFORM.
    regards,
    venkat

  • How to send output by mail?

    Hi Experts,
    Current output type in our system:
    Document: SD delivey note
    Output type: LD00
    Medium: 1
    Form:  Smartforms.
    Now we are printing delivery note by LD00 and Medium 1.
    In the future, we need to send ducument output to customer by mail, format still as original smartforms.
    Would you please give me a guide line to do this?
    Thank you.
    Richard.

    Hi Richard,
    you need to do following things to send output as an email.
    The output type should have medium 5. thats to send an email. Along with this you need to check following two things.
    if you are using a copy of a standard program it should have code to send an email. Then  you just need to configure following output type with medium '5' to send an email.
    If you dont have code to send it as an email  you can use FM to send it as an email.
    you can use following FM if its an adobe form.
    CALL FUNCTION 'SD_PDF_SEND_DATA'
        EXPORTING
          iv_device        = p_w_device
          iv_email_subject = w_lv_subject
          it_email_text    = w_mail_text
          is_main_data     = p_wa_fp_formoutput
          iv_language      = w_langu
          is_address       = w_ls_address
        IMPORTING
          ev_send_to_all   = w_lv_send_to_all
        EXCEPTIONS
          exc_document     = 1
          exc_send_request = 2
          exc_address      = 3
          OTHERS           = 4.
    Else  for smart form you need to convert it to PDF format first and send it as an email. Refer below code.
    Call Smartform function module.
    CALL FUNCTION fm_name
    EXPORTING
    control_parameters = ssfctrlop
    output_options = ssfcompop
    IMPORTING
    job_output_info = it_otf_data
    TABLES
    it_nfal = it_nfal.
    ***********appending the otf data into the final table*********************
    it_otf_final[] = it_otf_data-otfdata[].
    converting OTF data into pdf data**************************
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
    format = 'PDF'
    IMPORTING
    bin_filesize = bin_filesize
    bin_file =
    TABLES
    otf = it_otf_final
    lines = it_pdfdata[]
    EXCEPTIONS
    err_max_linewidth = 1
    err_format = 2
    err_conv_not_possible = 3
    err_bad_otf = 4
    OTHERS = 5.
    To send data as email attachment, we need to have a table of SOLISTI1.
    This table contains line size of 255 characters. Below function module
    does the trick of changing the table from X character sized lines into
    any given Y character sized lines.
    REFRESH it_pdf[].
    CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
    EXPORTING
    line_width_dst = '255'
    TABLES
    content_in = it_pdfdata[]
    content_out = it_pdf[]
    EXCEPTIONS
    err_line_width_src_too_long = 1
    err_line_width_dst_too_long = 2
    err_conv_failed = 3
    OTHERS = 4.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ELSE.
    "Subject of the mail.
    w_document_data-obj_name = 'MAIL_TO_HEAD'.
    w_document_data-obj_descr = 'Regarding Mail Program by SAP ABAP'.
    "Body of the mail
    w_body_msg = 'This is body of mail msg.'.
    APPEND w_body_msg TO i_body_msg.
    CLEAR w_body_msg.
    "Write Packing List for Body
    DESCRIBE TABLE i_body_msg LINES g_tab_lines.
    w_packing_list-head_start = 1.
    w_packing_list-head_num = 0.
    w_packing_list-body_start = 1.
    w_packing_list-body_num = g_tab_lines.
    w_packing_list-doc_type = 'RAW'.
    APPEND w_packing_list TO i_packing_list.
    CLEAR w_packing_list.
    "Write Packing List for Attachment
    w_packing_list-transf_bin = 'X'.
    w_packing_list-head_start = 1.
    w_packing_list-head_num = 1.
    w_packing_list-body_start = 1.
    DESCRIBE TABLE it_pdf LINES w_packing_list-body_num.
    w_packing_list-doc_type = 'PDF'.
    w_packing_list-obj_descr = 'PDF Attachment'.
    w_packing_list-obj_name = 'PDF_ATTACHMENT'.
    w_packing_list-doc_size = w_packing_list-body_num * 255.
    APPEND w_packing_list TO i_packing_list.
    CLEAR w_packing_list.
    "Fill the document data and get size of attachment
    w_document_data-obj_langu = sy-langu.
    READ TABLE it_pdf INTO w_pdf INDEX g_tab_lines.
    w_document_data-doc_size = ( g_tab_lines - 1 ) * 255 + STRLEN( w_attachment ).
    "Receivers List.
    w_receivers-rec_type = 'U'."Internet address
    w_receivers-receiver = p_mail.
    w_receivers-com_type = 'INT'.
    w_receivers-notif_del = 'X'.
    w_receivers-notif_ndel = 'X'.
    APPEND w_receivers TO i_receivers .
    CLEAR:w_receivers.
    "Function module to send mail to Recipients
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = w_document_data
    put_in_outbox = 'X'
    commit_work = 'X'
    IMPORTING
    sent_to_all = g_sent_to_all
    TABLES
    packing_list = i_packing_list
    contents_bin = it_pdf
    contents_txt = i_body_msg
    receivers = i_receivers
    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 i303(me) WITH 'Mail has been Successfully Sent.'.
    ENDIF.
    ENDIF.
    Edited by: Sumit Naik on Oct 13, 2010 11:20 PM

  • How to send output of one Bapi to another Bapi??

    dear all,
               I am having two BAPIs. From one Bapi I am getting value(Output) in one dropdown box.
               Now my problem is how to give output of first BAPI(in drop down box) as input to second BAPI which should display in second drop down.
                Am I clear???
                I have two drop down boxes and two BAPIs. I am able to get output of first BAPI into first drop down box. Now i have to use the data in first drop down box as input to second BAPI(second drop down box).
                The second BAPI takes first BAPI output as its Input.
                As I am new to Web Dynpro please help me in this regard detailly.

    Hi Pradeep,
    Consider you have dropdown1 displays all the countryNames which is output of BAPI1..
    Now you want to input this to BAPI2.Am i right ?
    If so
    1. create model instance of BAPI2 as you did for BAPI1.
    2. get the value from outputnode of BAPI1 by
        wdCOntext.outputNode().getXXX()
        and set this value to the input model  instance of BAPI2 and call execute method on the model.
    Regards, ANilkumar

  • How to send output of a print  to a single pool in smartforms

    Hi,
    when iam taking a an out put from the invoice all the output has to be send to a single pool .means if we give an invoice number in vf03 and issue the output and if we choose print then it will directly got to spool.but requirement is to store all the spool numbers on application server and finall we have to convert all these into single pdf and then we have to print that.
    can any body tell me where to store these spool numbers and how we can send at a time to print
    help me pleases
    sasi

    Hi Sasi,
    Check the following:
    Exporting the Contents of a Spool Request as a PDF File
    Use
    You want to export the contents of a spool request as a PDF file to a directory of your choice, and print the file as required. The PDF file contains the print data in the format in which it would be output by the printer.
    The following procedure is irrelevant for the PDF-based form printing integrated as of SAP Web Application Server 6.40, since a PDF file is already returned. See also Displaying and Printing PDF-Based Forms.
    Procedure
    The PDF file is generated as follows with report RSTXPDFT4:
    1. Generate a spool request from the document to be printed.
    2. In transaction SE38, start report rstxpdft4.
    3. In the displayed window, enter the spool request number and the directory in which the PDF file is to be stored.
    Leave the Download PDF File option selected.
    Choose Execute.
    4. In the next window, you can confirm or change the path in which the file is be stored.
    Save your entries.
    5. The system displays a log from which you can see whether the report was successfully performed.
    You can then open the file from the directory and print it as required.
    Constraints·        The PDF conversion only supports true bar codes for Smart Forms, which were generated with the new bar code technology. In all other cases, the bar code is only simulated.  
    ·        PDF conversion, especially of ABAP lists, is slower and is therefore not suitable for mass printing. However, you can speed up the conversion to PDF using the FASTLISTCONV option in report RSTXPDF3.
    ·        The font selection for ABAP lists is predefined in the PDF converter and cannot be changed.
    For more information about constraints, see SAP Note 323736 in the SAP Service Marketplace.
    For further reference check the SAP documentation...
    http://help.sap.com/saphelp_erp2005/helpdata/en/94/45c53bcc422d42e10000000a114084/frameset.htm
    Thanks and Regards,
    Bharat Kumare Reddy.V

  • How to send Outputs from orders to multiple recipients

    Hi,
    I have a requirement to send the same output (order confirmations) to multiple contacts of the same customer. the contacts are set up in VAP1 and linked to the sold to but what is the configuration needed to enable this functionality? At the time the order is confirmed, we need to trigger these outputs by emails or by fax (can be any combination here) as required.
    Appreciate any help and glad to provide nay clarifications if needed.
    Thanks!

    Wouldn't it make more sense if the customers actually maintained their own distribution lists? They could then give you an email address of the distribution list, which they would maintain internally.
    Otherwise imagine what would happen if the customer's employee leaves the company. First of all - how would you know? Second, you would need to make changes on your side (x 500 customers). In the best case you would just end up with an undeliverable email but in the worst you could expose the customer's private information. This is just a lawsuit waiting to happen IMHO.
    If you still want to go ahead with this idea, this would require some ABAPing. Actually the same question has already been asked (with the same result):
    Re: Output to more than 1 email

  • How to delete duplicates of some specific fields in internal table

    i am having internal table of it_ekko.
    in that i am having some data of PO no, Line Item,IR value and IR qty......
    i am having data like below.
    PO                        Line Item   IR Value    IR QTY 
    200310051          0010         1500           4500
    200310051          0010        1500           4500
    200310052         0010           0                   0
    200310052          0010       0               0
    now where ever IR value and IR qty is present i wanted that to display only once against that PO and line item
    i wanted like below
    PO                        Line Item   IR Value    IR QTY 
    200310051          0010         1500           4500
    200310051          0010            0              0
    200310052         0010             0                0
    200310052          0010            0               0
    Field names for IR value and IR Qty are Menge2 and dmbtr2.
    How to do that.........
    I cant use
    Delete adjacent duplicates of it_ekko by ebeln = wa_ekko-ebeln and
                                                                          ebelp = wa_ekko-ebelp.
    because i wanted that po and same line items , how many times it is like that only.....
    in it_ekko table i only wanted to delete duplicates of menge2 and dmbtr2.
    Pls suggest the code

    sort itab by po item ascending.
    loop at itab into wa.
    at new wa-item.
    if wa-qty1 ne 0 and wa-qty2 ne 0.
    move wa to wa_final.
    append wa_final to i_final.
    endat.
    endloop.
    or
    loop at itab into wa.
    at new wa-item.
    if wa-qty1 ne 0 and wa-qty2 ne 0.
    write wa.
    endat.
    endloop.
    make sure that the qty1 and qty2 is not character type , then in control statement it will replaced by *.

  • How to send output of alv report as mail

    Hi Experts,
    I Have retrieved data from USER tables and i need to send the output of the list through mail.
    could you please help me in completing this task
    Moderator message: FAQ, please search for previous discussions of this topic.
    Edited by: Thomas Zloch on Mar 16, 2011 9:41 AM

    Hi,
    You can send the report data as an either excel sheet ot txt attachment in side the email. for this you can use  the function module . for this refer to program BCS_EXAMPLE_7 .

  • How can i point to a specific field in DEEP structure and populate it?

    Hello,
    I have declared a internal table as below,
    DATA: BEGIN OF wa_data,
                  vkorg TYPE vkorg
                  vtweg TYPE vtweg
                  spartTYPE spart
                  field_name TYPE CHAR30
                   value TYPE CHAR50
                END OF wa_data
    DATA: ls_data TYPE wa_data,
                lt_data TYPE STANDARD TABLE OF wa_data.
    The lt_data is populated as below,
    VKORG-------VTWEG-------SPART-------FIELD_NAME-------VALUE
    1000-----------10-------------01------------KALKS---------------ZP00 "Pricing procedure
    1000-----------10-------------01------------ZTERM---------------15 days "Payment terms
    1000-----------10-------------01------------MAHNA---------------09 "Dunning
    Fine.
    Now, i have a DEEP DEEP DEEP structure as belowm
    DATA: ls_deep TYPE cmds_ei_extern. "Pls. see this deep structure 'cmds_ei_extern' in SAP DDIC / SE11
    This deep structure is part of Customer master creation. Now, i would like to POPULATE this deep structure from my lt_data itab DYNAMICALLy, i mean, with out mentioning the field names (like, ZTERM, KALKS, MAHNA etc etc), bcz its these i am pulling this lt_data from a custom table, so going further business may also ADD a new record / field like BUSAB (Accouting clerk) with a value of AL (Allen Christi), hence i want to hv dynamic and its less tediuos also bcz,
    We can LOOP lt_data INTO ls_data (for example, the ls_data-field_name = KALKS)
    Now, point the KALKS in the deep deep deep structure and populate it with a value of ls_data-value (= 15 days)
    ENDLLOOP.
    Pls. let me know How can i do this, i guess, we need to use field symbols, pls. let me know the code to achieve my requirement
    Thank you

    Hi,
    Please refer below code.This will populate field kunnr of the deep structure. Once you select the data as per your requirement,you can write similar code to populate rest of the fields in the deep strucure.
    TYPES : BEGIN OF ty_data,
                 kunnr TYPE kunnr,
                 END OF ty_data.
    FIELD-SYMBOLS : <lfs_cmds_ei_header>   TYPE cmds_ei_header,
                    <lfs_cmds_ei_instance>              TYPE cmds_ei_instance,
                    <lfs_kunnr>                                   TYPE kunnr.
    DATA:  lfs_cmds_ei_extern  TYPE cmds_ei_extern,
                 lr_dytable                  TYPE REF TO data,
                 lr_dytable_wa           TYPE REF TO data,
                 lt_data                       TYPE STANDARD TABLE of ty_data ,
                 wa_data                   TYPE ty_data.
      SELECT kunnr
      FROM yalb_kunde
      UP TO 1 ROWS
      INTO TABLE lt_data.
      IF sy-subrc = 0.
        LOOP AT lt_data INTO lwa_data.
          ASSIGN COMPONENT 'HEADER' OF STRUCTURE lfs_cmds_ei_extern TO <lfs_cmds_ei_header>.
          IF sy-subrc = 0.
            ASSIGN COMPONENT 'OBJECT_INSTANCE' OF STRUCTURE <lfs_cmds_ei_header> TO <lfs_cmds_ei_instance>.
            IF sy-subrc = 0.
              ASSIGN COMPONENT 'KUNNR' OF STRUCTURE <lfs_cmds_ei_instance> TO <lfs_kunnr>.
              IF sy-subrc = 0.
                <lfs_kunnr> = lwa_data-kunnr.
              ENDIF.
            ENDIF.
          ENDIF.
        ENDLOOP.
      ENDIF.
    Thanks,
    Priya

  • How to get keyboard cursor on specific field with a condition

    I am using forms6i. i have two fields 1st field1 and field2. I want that when field1='A' then keyboard cursor go to field2 else it must automatically skip the field2. and the condition is that the trigger must not be key-next-item, because if this process completed or not we have to go to next record and to save it.How is this possible???

    Depending on how your users navigate your application (mostly keyboard or combination of keyboard and mouse) the Key-Next-Item (KNI) trigger will not file if the user uses the mouse to leave Field1. Rather than use the KNI trigger I suggest you use a combination of the When-Validate-Item (WVI) and the Module/Form level When-Timer-Expired (WTE) triggers. This ensures no matter how your user leaves Field1 that the navigation cursor will go to Field2 if the value of field1 is 'A'. For example:
    /* Sample WVI trigger */
    DECLARE
       timer_id   TIMER;
    BEGIN
       IF ( :FIELD1 = 'A' ) THEN
          Create_Timer('GOTO_FIELDB',1,NO_REPEAT);
       END IF;
    END;This code creates a 1 millisecond timer which will execute immediately so there is no lag in your application. Also, since it is a 1 millisecond timer, it will not cause a network trip to the application server.
    /* Sample WTE trigger */
    /* This is a Module/Form level trigger */
    DECLARE
       v_Timer   VARCHAR2(30) := Get_Application_Property(TIMER_NAME);
    BEGIN
       IF ( v_timer = 'GOTO_FIELDB' ) THEN
          Go_Item('FIELDB');
       END IF;
    END;Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • How to send output of  my query in Excel to  inbox  .

    hi,
    1. I have created a query
    2. executed the in RSRT Tcode and set the broad casting setting.
    3. execute the broadcasted settings .
    I got that to my inbox also (only hyperlinlk).
    Now my doubt how to get the output in excel format to my inbox directly .
    I checked the braod caste settings.it only show me MHTML,HTML ,Online link to Current Data
    i do not find an excel option there in broad cast settings.
    Can any one help me...or even docu's......
    Regards
    Laxman

    Hi,
    Goto Transaction :RSRD_ADMIN
    click on "Settings"
    Enter the Technical Name and Descreption of the broadcasting
    in the Basis Object
    type - BQ - query
    technical name - Query Technical name
    Content
    Distribution type - MAIL
    Outputformat - XLS
    and click on F8(Execute).
    Next goback and select Schedule and enter the scheduling parameters and check.
    Regards
    KP

  • How to send output from an invoked service in BusinessConnector to Xi.

    Hi,
    I have configured BC sender adapter.
    My scenario is such that when BC service is invoked, it's output must be forwarded to XI interface.
    But when i invoke BC service there is no any message in the sxmb_moni,means no message is received from BC.
    What parameters should i supply while configuring BC sender adapter?
    Is there any naming convention restrictions on the XI interfaces while configuring BC sender adapter?
    Has anyone an idea?

    Hi Shweta,
    These docs will help you out..
    http://help.sap.com/saphelp_nw04/helpdata/en/ed/319640c80b3528e10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/61/4193404f673028e10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/6a/3f93404f673028e10000000a1550b0/frameset.htm
    cheers,
    Prashanth

  • How to send output of a XML report to certain email Ids

    Hi,
    I have used rdf as well as rtf file and created my xml report. Now i want to send my report output(pdf or excel) to certain email ids and i donot want to use email bursting technique for this. So please tell me the other ways to do this thing.
    Thanks,
    ST

    Hi;
    Please also check:
    concurrent ouput to email
    Re: concurrent ouput to email
    Regard
    Helios

  • How to send output from SQL script to the specified log file (not *.sql)

    ## 1 -I write sql command into sql file
    echo "SELECT * FROM DBA_USERS;">results.sql
    echo "quit;">>results.sql
    ##2- RUN sqlplus, run sql file and get output/results into jo.log file
    %ORACLE_HOME/bin/sqlplus / as sysdba<results.sql>>jo.log
    It doesn't work please advise

    $ echo "set pages 9999" >results.sql ### this is only to make the output more readable
    $ echo "SELECT * FROM DBA_USERS;" >>results.sql
    $ echo "quit" >>results.sql
    $ cat results.sql
    set pages 9999
    SELECT * FROM DBA_USERS;
    quit
    $ sqlplus -s "/ as sysdba" @results >jo.log
    $ cat jo.log
    USERNAME                          USER_ID PASSWORD
    ACCOUNT_STATUS                   LOCK_DATE  EXPIRY_DAT
    DEFAULT_TABLESPACE             TEMPORARY_TABLESPACE           CREATED
    PROFILE                        INITIAL_RSRC_CONSUMER_GROUP
    EXTERNAL_NAME
    SYS                                     0 D4C5016086B2DC6A
    OPEN
    SYSTEM                         TEMP                           06/12/2003
    DEFAULT                        SYS_GROUP
    SYSTEM                                  5 D4DF7931AB130E37
    OPEN
    SYSTEM                         TEMP                           06/12/2003
    DEFAULT                        SYS_GROUP
    DBSNMP                                 19 E066D214D5421CCC
    OPEN
    SYSTEM                         TEMP                           06/12/2003
    DEFAULT                        DEFAULT_CONSUMER_GROUP
    SCOTT                                  60 F894844C34402B67
    OPEN
    USERS                          TEMP                           06/12/2003
    DEFAULT                        DEFAULT_CONSUMER_GROUP
    HR                                     47 4C6D73C3E8B0F0DA
    OPEN
    EXAMPLE                        TEMP                           06/12/2003
    DEFAULT                        DEFAULT_CONSUMER_GROUPThat's only a part of the file, it's too long :-)

Maybe you are looking for

  • Can no longer print from iphone or ipad?

    Recently, Early Feb 20012, I lost ability to print from I phone or I pad.  I cloud no longer asks for my password? What happened.  Both devices lost airprint ability at same time.  I have an air print capable printer (Officejet pro 8500A)  and had no

  • Version of PeopleToolsTables stored in DB Depends on Peopletools Ver or els

    Hi All, I am is in a very strange problem!!!! I have installed DB oracle 11g, weblogic 9.2, tuxedo 9.1, peopletools 8.49, HRMS&CS 9.0 Revision 1 Demo on my Laptop(all server on single Machine). When i see my peopletools version with AD and Data Mover

  • Export in Excel, Password Protection

    Although I don't use Excel much, I understand it is commonplace when sending an Excel spreadsheet as an email attachment to Password Protect it. I just converted a Numbers document to Excel via Export, but can't send it if I can't password protect it

  • About the canvas color

    Hiii, i had made a visual attribute, changing the background color property at runtime by set_va_property(). suppose i am changing the background color value R0G0B100 by set_va_property(). when this value set at design time of visual attribute gives

  • Using symbaloo when I try to edit tiles, I am instead taken to site in FF Yet i can edit in IE & Chrome

    Symbaloo & FF are my #1's. Suddenly when I try to edit a tile in Symbaloo I find myself at the site yet Symbaloo works just fine with all other browsers. I have emptied my cache, history and cookies, disabled and updated all add-ons changed them all