How to fecth the contents of a mail from the server by using jsp

hi
Can any body tell me how to fetch the contents of mail from the server by using javamail api...please send me code if some one have
bye.

hi
Can any body tell me how to fetch the contents of mail from the server by using javamail api...please send me code if some one have
bye.

Similar Messages

  • How to find the server path using servlet API.

    Hi All,
    I have an requirement like uploading certain files in my server path.
    rightnow i am getting the path now using as
    <%=application.getRealPath("/")%> and its giving me the "D:\bea\user_projects\domains\Testdomain\TestmanagedServer\stage\nextgen\nextgen.war".
    but i want to get the D:\bea\weblogic81 or atleast D:\Bea
    Is there anyway to get this through API or its the only way through string parse.
    Thanks in advance.

    Hello,
    I have:
    DG URL Internal;https://OCS.ad.xxxxxx.xxxx.xxx/GroupExpansion/Int/service.asmx;--;
    DG URL External;;--;
    Quality Metrics URI;;--;
    URL Internal From Server;https://OCS.ad.xxxxxx.xxxx.xxx/Abs/Int/Handler;--;
    URL External From Server;;--;
    Voice mail URI;sip:[email protected];opaque=app:voicemail;--;
    MRAS Server;;Not Configured;
    GAL Status;https://OCS.ad.xxxxxx.xxxx.xxx/Abs/Int/Handler;--;
    Controlled Phones;TRUE;--;
    PC to PC AV Encryption;AV Encryption Enforced;--;
    Focus Factory;sip:[email protected];gruu;opaque=app:conf:focusfactory;--;
    Telephony Mode;Telephony Mode Disabled;--;
    Line;;--;
    Line Configured From;Auto Line Configuration;--;
    Location Profile;;--;
    Local Log Folder;C:\Users\me\tracing;;
    MAPI Information;MAPI Status OK;MAPI Status OK;
    Inside User Status;TRUE;;
    Auto Update Download Started;--;--;
    Auto Update Download Completed;--;--;
    Last Auto Update Request;--;--;
    Pairing State;Communicator cannot connect to your desk phone because the USB cable is not plugged in. Make sure that you connect the cable.;Enabled;
    I see my email on the sip line but no server... what do I miss?
    Is it by the URL?
    Thanks,
    Dom

  • How can i import my sent e-mails from before i started using thunderbird so that they can all be viewed in thunderbird?

    I would like to import all my sent items from before i started using thunderbird into thunderbird. I never used an "outlook" programme before this, so all my previously sent emails are on a web-based server. Is there anyway in which i can import all these?
    == i tried to import all my sent mails into thunderbird

    Thunderbird support is over here.
    [http://www.mozillamessaging.com/en-US/support/]
    or here:
    http://forums.mozillazine.org/viewforum.php?f=39

  • Composing mail from email web application using jsp and custom tags

    here is the send.jsp file
    <%@ page language="java" %>
    <%@ page errorPage="errorpage.jsp" %>
    <%@ taglib uri="http://java.sun.com/products/javamail/demo/webapp"
    prefix="javamail" %>
    <html>
    <head>
         <title>JavaMail send</title>
    </head>
    <body bgcolor="white">
    hi
    <javamail:sendmail
    recipients="<%= request.getParameter(\"to\") %>"
    sender="<%= request.getParameter(\"from\") %>"
    subject="<%= request.getParameter(\"subject\") %>">
    <%= request.getParameter("text") %>
    </javamail:sendmail>
    <h1>Message sent successfully</h1>
    </body>
    </html>
    Here is the java file i.e used to refer to this custom tag
    package taglib;
    import java.util.*;
    import java.net.*;
    import javax.mail.*;
    import javax.mail.Authenticator;
    import javax.mail.internet.*;
    import javax.servlet.jsp.*;
    import javax.servlet.jsp.tagext.*;
    * Custom tag for sending messages.
    public class SendTag extends BodyTagSupport {
    private String body;
    private String cc;
    private String host;
    private String recipients;
    private String sender;
    private String subject;
    * host attribute setter method.
    public void setHost(String host) {
    this.host = host;
    System.out.println("Host is : " +host);
    * recipient attribute setter method.
    public void setRecipients(String recipients) {
    this.recipients = recipients;
    System.out.println("recipients is " +recipients );
    * sender attribute setter method.
    public void setSender(String sender) {
    this.sender = sender;
    System.out.println("Sender is : " +sender);
    * cc attribute setter method.
    public void setCc(String cc) {
    this.cc = cc;
    * subject attribute setter method.
    public void setSubject(String subject) {
    this.subject = subject;
    System.out.println("subject is : " +subject);
    * Method for processing the end of the tag.
    public int doEndTag() throws JspException {
         System.out.println(" ** In do end tag");
    Properties props = System.getProperties();
    try {
    if (host != null)
    props.put("mail.smtp.host", host);
    else if (props.getProperty("mail.smtp.host") == null)
    props.put("mail.smtp.host", InetAddress.getLocalHost().
    getHostName());
    } catch (Exception ex) {
    throw new JspException(ex.getMessage());
    Session session = Session.getDefaultInstance(props,null);
         Message msg = new MimeMessage(session);
         InternetAddress[] toAddrs = null, ccAddrs = null;
    try {
         if (recipients != null) {
         toAddrs = InternetAddress.parse(recipients, false);
         msg.setRecipients(Message.RecipientType.TO, toAddrs);
         } else
         throw new JspException("No recipient address specified");
    if (sender != null)
    msg.setFrom(new InternetAddress(sender));
    else
    throw new JspException("No sender address specified");
         if (cc != null) {
    ccAddrs = InternetAddress.parse(cc, false);
         msg.setRecipients(Message.RecipientType.CC, ccAddrs);
         if (subject != null)
         msg.setSubject(subject);
         if ((body = getBodyContent().getString()) != null)
         msg.setText(body);
    else
    msg.setText("");
    Transport.send(msg);
    } catch (Exception ex) {
    throw new JspException(ex.getMessage());
    return(EVAL_PAGE);
    all the entries in taglib.tld and web.xml are correct.
    It is one of the article given at this url:
    http://java.sun.com/developer/technicalArticles/javaserverpages/emailapps/

    First, you should not take copyrighted code and post it without a copyright.
    The code you posted is copyright Sun Microsystems.
    Second, why did you post it? Did you have a question?

  • Error in reading the mails from POP3 server

    Hi,
    I am reading mails from the POP3 server using UTL_TCP package. I am able to retrieve .txt & .doc attachments successfully.
    I am facing an error when I try to retrieve an attachment with a very long name (irrespective of the file type). Also, I am unable to retrieve .docx, .xls, .xlsx file types. I noticed similarity in the reasons for the error I am getting. I realized that if I try to retrieve an attachment with a very long file name or any of the above mentioned file formats (.docx, .xls, etc.), the "name" attribute of the attachment goes to the next line and hence I am going wrong somewhere in parsing that line.(The complete line comprises of : Content-Type: application/vnd.openxmlformatsofficedocument.wordprocessingml.document; name="test_attachment.docx")
    I realized this pattern by doing executing Telnet commands to retrieve emails from POP3 server.
    I am trying to parse the line I am talking about in the following manner:
    IF line LIKE 'Content-Type: %;'
                   THEN
                        IF line LIKE 'Content-Type: %; name=%'
                        THEN
                             PIPE ROW (line);
                        ELSE
    -- This should only print the "Content-Type". But I get an error (pasted below) at this point
                             PIPE ROW (line);
    -- To read the "name" attribute which comes on the next line. But this line never gets executed since I get an error in the previous statement
                             BYTES := UTL_TCP.available (socket);
                             BYTES := UTL_TCP.read_line (socket, line);
                             PIPE ROW (line);
                        END IF;
    The error I get is :
    ERROR:
    ORA-29261: bad argument
    ORA-06512: at "SYS.UTL_ENCODE", line 29
    ORA-06512: at "SYS.UTL_ENCODE", line 251
    ORA-06512: at "SCOTT.POP3", line 117
    Message was edited by:
    Monk
    Message was edited by:
    Monk

    Hi,
    Try to manually download the file from application server using standard transactions, and than check how many records are you able to download from app. server.
    I guess there might be something wrong with the format of 583rd record, which makes sap assume that the file has come to an end.
    Hope this will help you.
    Regards,
    Vinit...

  • How to schedule the background job using current selection screen field val

    Hello Friends,
    How to schedule the background job using current selection screen field values.
    after completion of the job the spool should be sent as a mail to SAP Inbox.
    Is there any way to create the variant dynamically by reading the current selection screen values.
    Thanks,
    Ravi

    Hi,
    To get the variant details you can use teh following FM.
    'RS_VARIANT_CONTENTS'.
    Regards,
    Ankur Parab

  • How to retrieve the server IP address

    Hi Experts,
    In my scenario, if some problem occur, then the XSLT mapping sends a mail to some one,subject is 'PRD', if we execute this from production or quality or development server.
    But now i want to know this mail from which server, so i want to change the subject line as 'PRD' if it is only from production system otherwise 'OTH', how to achieve this ? No hard code allow at any where.
    I have one thought, if we find the server ip address then we can recognize, but how to get the server IP address ? Is it possible ?
    Thanks
    Ramesh

    Hi,
    My source is some WSDL file, this is more than 15000 characters so i am unable to send the full file.
    <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
         <wsdl:types>
              <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
                   <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd" />
                   <xsd:element name="Pip3A4PurchaseOrderRequest" type="Pip3A4PurchaseOrderRequest" />
                   <xsd:complexType name="Pip3A4PurchaseOrderRequest">
                        <xsd:sequence>
                             <xsd:element name="fromRole" type="fromRole" />
                             <xsd:element name="GlobalDocumentFunctionCode" type="xsd:string" />
                             <xsd:element name="PurchaseOrder" type="PurchaseOrder" />
                             <xsd:element name="thisDocumentGenerationDateTime" type="thisDocumentGenerationDateTime" />
                             <xsd:element name="thisDocumentIdentifier" type="thisDocumentIdentifier" />
                             <xsd:element name="toRole" type="toRole" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="fromRole">
                        <xsd:sequence>
                             <xsd:element name="PartnerRoleDescription" type="PartnerRoleDescription" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="PartnerRoleDescription">
                        <xsd:sequence>
                             <xsd:element name="ContactInformation" type="ContactInformation" minOccurs="0" />
                             <xsd:element name="GlobalPartnerRoleClassificationCode" type="xsd:string" />
                             <xsd:element name="PartnerDescription" type="PartnerDescription" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="ContactInformation">
                        <xsd:sequence>
                             <xsd:element name="contactName" type="contactName" minOccurs="0" />
                             <xsd:element name="EmailAddress" type="xsd:string" minOccurs="0" />
                             <xsd:element name="facsimileNumber" type="facsimileNumber" minOccurs="0" />
                             <xsd:element name="telephoneNumber" type="telephoneNumber" minOccurs="0" />
                             <xsd:element name="PhysicalAddress" type="PhysicalAddress" minOccurs="0" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="contactName">
                        <xsd:sequence>
                             <xsd:element name="FreeFormText" type="FreeFormText" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="FreeFormText">
                        <xsd:simpleContent>
                             <xsd:extension base="xsd:string">
                                  <xsd:attribute ref="xml:lang" />
                             </xsd:extension>
                        </xsd:simpleContent>
                   </xsd:complexType>
                   <xsd:complexType name="facsimileNumber">
                        <xsd:sequence>
                             <xsd:element name="CommunicationsNumber" type="xsd:string" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="telephoneNumber">
                        <xsd:sequence>
                             <xsd:element name="CommunicationsNumber" type="xsd:string" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="PartnerDescription">
                        <xsd:sequence>
                             <xsd:element name="BusinessDescription" type="BusinessDescription" />
                             <xsd:element name="GlobalPartnerClassificationCode" type="xsd:string" minOccurs="0" />
                             <xsd:element name="PhysicalAddress" type="PhysicalAddress" minOccurs="0" />
                             <xsd:element name="ContactInformation" type="ContactInformation" minOccurs="0" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="BusinessDescription">
                        <xsd:sequence>
                             <xsd:element name="GlobalBusinessIdentifier" type="xsd:string" minOccurs="0" />
                             <xsd:element name="GlobalSupplyChainCode" type="xsd:string" minOccurs="0" />
                             <xsd:element name="businessName" type="businessName" minOccurs="0" />
                             <xsd:element name="NationalBusinessTaxIdentifier" type="NationalBusinessTaxIdentifier" minOccurs="0" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="PurchaseOrder">
                        <xsd:sequence>
                             <xsd:element name="AccountDescription" type="AccountDescription" minOccurs="0" />
                             <xsd:element name="comments" type="comments" minOccurs="0" />
                             <xsd:element name="ContractInformation" type="ContractInformation" minOccurs="0" maxOccurs="unbounded" />
                             <xsd:element name="DocumentReference" type="DocumentReference" minOccurs="0" maxOccurs="unbounded" />
                             <xsd:element name="FinancingTerms" type="FinancingTerms" minOccurs="0" maxOccurs="unbounded" />
                             <xsd:element name="generalServicesAdministrationNumber" type="generalServicesAdministrationNumber" minOccurs="0" />
                             <xsd:element name="GlobalGovernmentPriorityRatingCode" type="xsd:string" minOccurs="0" />
                             <xsd:element name="GlobalPurchaseOrderFillPriorityCode" type="xsd:string" minOccurs="0" />
                             <xsd:element name="GlobalPurchaseOrderTypeCode" type="xsd:string" maxOccurs="unbounded" />
                             <xsd:element name="governmentContractIdentifier" type="governmentContractIdentifier" minOccurs="0" />
                             <xsd:element name="installAt" type="installAt" minOccurs="0" />
                             <xsd:element name="isDropShip" type="isDropShip" />
                             <xsd:element name="OrderShippingInformation" type="OrderShippingInformation" minOccurs="0" />
                             <xsd:element name="ProductLineItem" type="ProductLineItem" maxOccurs="unbounded" />
                             <xsd:element name="proprietaryInformation" type="proprietaryInformation" minOccurs="0" />
                             <xsd:element name="requestedEvent" type="requestedEvent" minOccurs="0" />
                             <xsd:element name="requestedShipFrom" type="requestedShipFrom" minOccurs="0" maxOccurs="unbounded" />
                             <xsd:element name="SecondaryBuyer" type="SecondaryBuyer" minOccurs="0" />
                             <xsd:element name="shipTo" type="shipTo" minOccurs="0" />
                             <xsd:element name="TaxExemptStatus" type="TaxExemptStatus" minOccurs="0" />
                             <xsd:element name="totalAmount" type="totalAmount" minOccurs="0" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="AccountDescription">
                        <xsd:sequence>
                             <xsd:element name="accountName" type="accountName" />
                             <xsd:element name="AccountNumber" type="xsd:string" minOccurs="0" />
                             <xsd:element name="billTo" type="billTo" minOccurs="0" />
                             <xsd:element name="CreditCard" type="CreditCard" minOccurs="0" />
                             <xsd:element name="financedBy" type="financedBy" minOccurs="0" />
                             <xsd:element name="GlobalAccountClassificationCode" type="xsd:string" minOccurs="0" />
                             <xsd:element name="prePaymentCheckNumber" type="prePaymentCheckNumber" minOccurs="0" />
                             <xsd:element name="WireTransferIdentifier" type="xsd:string" minOccurs="0" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="accountName">
                        <xsd:sequence>
                             <xsd:element name="FreeFormText" type="FreeFormText" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="billTo">
                        <xsd:sequence>
                             <xsd:element name="PartnerRoleDescription" type="PartnerRoleDescription" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="PhysicalAddress">
                        <xsd:sequence>
                             <xsd:element name="addressLine1" type="addressLine1" minOccurs="0" />
                             <xsd:element name="addressLine2" type="addressLine2" minOccurs="0" />
                             <xsd:element name="addressLine3" type="addressLine3" minOccurs="0" />
                             <xsd:element name="cityName" type="cityName" minOccurs="0" />
                             <xsd:element name="GlobalCountryCode" type="xsd:string" minOccurs="0" />
                             <xsd:element name="GlobalLocationIdentifier" type="xsd:string" minOccurs="0" />
                             <xsd:element name="NationalPostalCode" type="xsd:string" minOccurs="0" />
                             <xsd:element name="postOfficeBoxIdentifier" type="postOfficeBoxIdentifier" minOccurs="0" />
                             <xsd:element name="regionName" type="regionName" minOccurs="0" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="addressLine1">
                        <xsd:sequence>
                             <xsd:element name="FreeFormText" type="FreeFormText" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="addressLine2">
                        <xsd:sequence>
                             <xsd:element name="FreeFormText" type="FreeFormText" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="addressLine3">
                        <xsd:sequence>
                             <xsd:element name="FreeFormText" type="FreeFormText" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="cityName">
                        <xsd:sequence>
                             <xsd:element name="FreeFormText" type="FreeFormText" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="postOfficeBoxIdentifier">
                        <xsd:sequence>
                             <xsd:element name="FreeFormText" type="FreeFormText" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="regionName">
                        <xsd:sequence>
                             <xsd:element name="FreeFormText" type="FreeFormText" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="businessName">
                        <xsd:sequence>
                             <xsd:element name="FreeFormText" type="FreeFormText" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="CreditCard">
                        <xsd:sequence>
                             <xsd:element name="cardHolderName" type="cardHolderName" />
                             <xsd:element name="creditCardIdentifier" type="creditCardIdentifier" />
                             <xsd:element name="expiryDate" type="expiryDate" />
                             <xsd:element name="GlobalCreditCardClassificationCode" type="xsd:string">

  • How can I download content of wiki pages from Office 365 online Sharepoint site using c#?

    How can I download content of wiki pages from Office 365 online Sharepoint site using c#?
    Ratnesh[MSFT]

    Hi,
    According to your post, my understanding is that you want to download content of wiki pages on SharePoint Online.
    If just for getting the text of the page, I suggest you convert page to PDF file first and then download the PDF file via a Visual Web Part as a Sandboxed solution.
    A sample about export HTML to PDF:
    http://hamang.net/2008/08/14/html-to-pdf-in-net/
    Thanks
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Patrick Liang
    TechNet Community Support

  • How to remove my icloud mail from icloud server ?

    how to remove my icloud mail from icloud server ?

    If you don't want to keep it, select it, on the iCloud website Mail page click the Trash icon in the toolbar to move it to the Trash, then click the cogwheel icon at top right and choose 'Empty Trash'. Or in the Mail application drag the messages to the Trash and from the Mailbox menu choose 'Erase deleted items' then 'iCloud'.
    If you want to keep it, in the Mail application drag the messages to another mailbox under 'On My Mac'.

  • How to change the number im using on my messages?

    how to change the number im using on my messages?

    If you are asking about the telephone number, Messages/Preferences/Accounts/Messages account - click add e-mail and enter it.

  • How to find the server hosting office communication ?

    Hello
    How to find the server hosting office communication ?
    Thanks,
    Dom
    System Center Operations Manager 2007 / System Center Configuration Manager 2007 R2 / Forefront Client Security / Forefront Identity Manager

    Hello,
    I have:
    DG URL Internal;https://OCS.ad.xxxxxx.xxxx.xxx/GroupExpansion/Int/service.asmx;--;
    DG URL External;;--;
    Quality Metrics URI;;--;
    URL Internal From Server;https://OCS.ad.xxxxxx.xxxx.xxx/Abs/Int/Handler;--;
    URL External From Server;;--;
    Voice mail URI;sip:[email protected];opaque=app:voicemail;--;
    MRAS Server;;Not Configured;
    GAL Status;https://OCS.ad.xxxxxx.xxxx.xxx/Abs/Int/Handler;--;
    Controlled Phones;TRUE;--;
    PC to PC AV Encryption;AV Encryption Enforced;--;
    Focus Factory;sip:[email protected];gruu;opaque=app:conf:focusfactory;--;
    Telephony Mode;Telephony Mode Disabled;--;
    Line;;--;
    Line Configured From;Auto Line Configuration;--;
    Location Profile;;--;
    Local Log Folder;C:\Users\me\tracing;;
    MAPI Information;MAPI Status OK;MAPI Status OK;
    Inside User Status;TRUE;;
    Auto Update Download Started;--;--;
    Auto Update Download Completed;--;--;
    Last Auto Update Request;--;--;
    Pairing State;Communicator cannot connect to your desk phone because the USB cable is not plugged in. Make sure that you connect the cable.;Enabled;
    I see my email on the sip line but no server... what do I miss?
    Is it by the URL?
    Thanks,
    Dom

  • How to create the sales order using BAPI's ....?

    Hi Guru's,
    could you please provide how to create the sales order using BAPI's .....i need step by step process and please provide the details from scratch....basically  i don't have basic knowledge on this....please provide required inputs ....:)
    thanks in advance
    Srinivas......

    Hi Guru's thanks for your inouts and your valuble time...
    please find the program logic below...
    *& Report  ZAREPAS30
    REPORT  zarepas30.
    DATA : gs_vbeln                   TYPE  vbak-vbeln,
           gs_order_header_in         TYPE  bapisdhd1,
           gs_order_header_inx        TYPE  bapisdhd1x,
           gt_order_items_in          TYPE  STANDARD TABLE OF bapisditm,
           gwa_itab1                  TYPE  bapisditm,
           gt_order_items_inx         TYPE  STANDARD TABLE OF bapisditmx,
           gwa_itab2                  TYPE  bapisditmx,
           gt_order_partners          TYPE  STANDARD TABLE OF bapiparnr,
           gwa_itab3                  TYPE  bapiparnr,
           gt_return                  TYPE  STANDARD TABLE OF bapiret2,
           gwa_itab4                  TYPE  bapiret2.
    Sales document type
      PARAMETERS: p_auart TYPE auart OBLIGATORY.
    Sales organization
      PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY.
    Distribution channel
      PARAMETERS: p_vtweg TYPE vtweg OBLIGATORY.
    Division.
      PARAMETERS: p_spart TYPE spart OBLIGATORY.
    Requested Delivery Date
      PARAMETERS: p_edatu  TYPE edatu OBLIGATORY.
    Sold-to
      PARAMETERS: p_sold  TYPE kunnr OBLIGATORY.
    Ship-to
      PARAMETERS: p_ship  TYPE kunnr OBLIGATORY.
    Material
      PARAMETERS: p_matnr TYPE matnr   OBLIGATORY.
    Quantity.
      PARAMETERS: p_menge TYPE kwmeng  OBLIGATORY.
    Plant
      PARAMETERS: p_plant TYPE werks_d OBLIGATORY.
    Start-of-selection.
      START-OF-SELECTION.
    Header data
    Sales document type
      gs_order_header_in-doc_type = p_auart.
      gs_order_header_inx-doc_type = 'X'.
    Sales organization
      gs_order_header_in-sales_org = p_vkorg.
      gs_order_header_inx-sales_org = 'X'.
    Distribution channel
      gs_order_header_in-distr_chan  = p_vtweg.
      gs_order_header_inx-distr_chan = 'X'.
    Division
      gs_order_header_in-division = p_spart.
      gs_order_header_inx-division = 'X'.
    Reguested Delivery Date
      gs_order_header_in-req_date_h = p_edatu.
      gs_order_header_inx-req_date_h = 'X'.
      gs_order_header_inx-updateflag = 'I'.
    Partner data
    Sold to
      gwa_itab3-partn_role = 'AG'.
      gwa_itab3-partn_numb = p_sold.
      APPEND gwa_itab3 TO  gt_order_partners .
    ship to
      gwa_itab3-partn_role = 'WE'.
      gwa_itab3-partn_numb = p_ship.
      APPEND gwa_itab3 TO  gt_order_partners .
    ITEM DATA
      gwa_itab2-updateflag = 'I'.
    Line item number.
      gwa_itab1-itm_number = '000010'.
      gwa_itab2-itm_number = 'X'.
    Material
      gwa_itab1-material = p_matnr.
      gwa_itab2-material = 'X'.
    Plant
      gwa_itab1-plant    = p_plant.
      gwa_itab2-plant   = 'X'.
    Quantity
      gwa_itab1-target_qty = p_menge.
      gwa_itab2-target_qty = 'X'.
      APPEND gwa_itab1 TO gt_order_items_in.
      APPEND gwa_itab2 TO gt_order_items_inx.
    Line item number.
      gwa_itab1-itm_number = '000020'.
      gwa_itab2-itm_number = 'X'.
    Material
      gwa_itab1-material = p_matnr.
      gwa_itab2-material = 'X'.
    Plant
      gwa_itab1-plant    = p_plant.
      gwa_itab2-plant   = 'X'.
    Quantity
      gwa_itab1-target_qty = p_menge.
      gwa_itab2-target_qty = 'X'.
      APPEND gwa_itab1 TO gt_order_items_in.
      APPEND gwa_itab2 TO gt_order_items_inx.
    CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
      EXPORTING
        order_header_in               = gs_order_header_in
        ORDER_HEADER_INX              = gs_order_header_inx
      IMPORTING
        SALESDOCUMENT                 = gs_vbeln
      tables
        RETURN                        = gt_return
        ORDER_ITEMS_IN                = gt_order_items_in
        ORDER_ITEMS_INX               = gt_order_items_inx
        order_partners                = gt_order_partners.
    Check the return table.
      LOOP AT gt_return into gwa_itab4 WHERE type = 'E' OR type = 'A'.
        EXIT.
      ENDLOOP.
      IF sy-subrc = 0.
        WRITE: / 'Error occured while creating sales order '.
      ELSE.
    Commit the work.
      CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
        WRITE: / 'Document ', gs_vbeln, ' created'.
      ENDIF.

  • How to get the context data using java script in interactive forms

    Hi All,
    How to get the context data using java script in interactive forms by adobe,  am using web dynpro java
    thanks.

    Hi venkat,
    Please Refer this link.
      Populating one Drop-Down list from the selection of another Drop-down list
    Thanks,
    Raju.

  • How to list the uploaded files  in jsp

    hello every body .
    I wanted to request to plese let me know the method as to how get the uploaded files on the server to a jsp page . i am able to upload the files but not able to get those files listed on the web page . please help me ...........

    i tried this also and it didn't wok instead my page got filled with these lines
    The file named CSAJSP-Chapter12.pdf is successfully uploaded [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0 [Ljava.lang.String;@1ab11b0
    . I am not able to make out any thing . plese  suggest me  some solution                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to update the FB01L transaction using the FM  bapi_acc_document_post

    Hi All,
            How to update the FB01L transaction using the bapi_acc_document_post but there is no ledger group field in the bapi function module.
    Please help me how to do it.

    hi,
    use batch input method for the same.
    check this.
    [https://forums.sdn.sap.com/click.jspa?searchID=19107237&messageID=884744]

Maybe you are looking for

  • Ipod Nano do not turn on?

    Recently I bought a Ipod Nano from ebay.I charge it and upload a song it was worked perfectly then i turn off by press down Pause button for a few second.Now i try to turn it on its not turning on, not even when i connect it with a laptop.What should

  • Adobe Reader Fullscreen Preferences Second Monitor Only

    Hey, I'm trying to set adobe reader to open in fullscreen mode on my second monitor instead of whatever monitor it's currently displayed on. I've looked through preferences, but the options for which monitor to use are descriptors like this monitor,

  • ICM custom function

    Hi, I am using ICM vestion 9.0. I have a requirement to route calls depending on keyword from sentense. Say for example system retunrs a sentense "I need information on foreign exchange" and I am saving the data in PV1. Now if the sentense has a word

  • MAP don´t login in the clients when the pcs don't connect with a domain

    I have a network with a normal pcs (as home pcs) with out domain; but i try audit the network but always launch the same error "Failed - Access Denied". I read in the internet and this problem is present when the netlogon service is down , but this s

  • Is there a beter program than Itunes to work on the Ipad with

    Itunes may be a good music player but as a front end for the Ipad it *****!!! no easy way to see files and work with them.