Plz check the code and tell me necessary  modifications

report Z_PHANIBDC2
       no standard page heading line-size 255.
include bdcrecx1.
PARAMETERS:P_FILE   LIKE RLGRAP-FILENAME DEFAULT
'C:Documents and Settingssarath.vempatiDesktopphani1.TXT' OBLIGATORY
DATA: BEGIN OF RECORD1 OCCURS 0,
        LIFNR(018),
        BURKS(011),
        KTOKK(014),
        ANRED(014),
        NAME1(014),
        SURTL(014),
        STRAS(012),
        ORT01(040),
        LAND1(013),
        SPRAS(019),
        KUNNR(015),
        BANKL(012),
        BANKS(018),
        AKONT(022),
        ZTERM(012),
        MAHNA(016),
END OF RECORD1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
   DEF_FILENAME           = 'P_FILE '
*   DEF_PATH               = ' '
   MASK                   = ',*.*,*.*. '
   MODE                   = 'O'
   TITLE                  = 'GET FILENAME '
IMPORTING
   FILENAME               = P_FILE
*   RC                     =
EXCEPTIONS
   INV_WINSYS             = 1
   NO_BATCH               = 2
   SELECTION_CANCEL       = 3
   SELECTION_ERROR        = 4
   OTHERS                 = 5
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
START-OF-SELECTION.
*LOOP AT RECORD1 FROM 2.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
*   CODEPAGE                      = ' '
   FILENAME                      = 'P_FILE '
   FILETYPE                      = 'DAT'
*   HEADLEN                       = ' '
*   LINE_EXIT                     = ' '
*   TRUNCLEN                      = ' '
*   USER_FORM                     = ' '
*   USER_PROG                     = ' '
*   DAT_D_FORMAT                  = ' '
* IMPORTING
*   FILELENGTH                    =
  TABLES
    DATA_TAB                      = RECORD1
EXCEPTIONS
   CONVERSION_ERROR              = 1
   FILE_OPEN_ERROR               = 2
   FILE_READ_ERROR               = 3
   INVALID_TYPE                  = 4
   NO_BATCH                      = 5
   UNKNOWN_ERROR                 = 6
   INVALID_TABLE_WIDTH           = 7
   GUI_REFUSE_FILETRANSFER       = 8
   CUSTOMER_ERROR                = 9
   NO_AUTHORITY                  = 10
   OTHERS                        = 11
  DATA : RECORD LIKE RECORD1 OCCURS 0 WITH HEADER LINE.
  DATA : RECORD3 LIKE RECORD1 OCCURS 0 WITH HEADER LINE.
  DATA : LIFNR1 LIKE LFA1-LIFNR.
  LOOP AT RECORD1.
    IF RECORD1-LIFNR <> ''.
      LIFNR1 = RECORD1-LIFNR.
      RECORD3-LIFNR = RECORD1-LIFNR.
      RECORD3-BURKS = record1-BURKS.
      APPEND RECORD3.
    ELSE.
      RECORD3-LIFNR = LIFNR1.
      RECORD3-BURKS = record1-BURKS.
      APPEND RECORD3.
    ENDIF.
  ENDLOOP.
  DELETE RECORD1 WHERE LIFNR = ''.
  RECORD[] = RECORD1[].
  DATA VAR1(15).
  DATA VAR2(15).
  DATA COUNT(2).
  DATA COUNT1(2) VALUE 1.
  DATA VAR3(16).
  DATA VAR4(16).
  DATA VAR5(16).
  DELETE ADJACENT DUPLICATES FROM RECORD COMPARING LIFNR BURKS.
write:/ 'phani'.
*IF SY-SUBRC <> 0.
** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
**         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
perform open_group.
perform bdc_dynpro      using 'SAPMF02K' '0100'.
perform bdc_field       using 'BDC_CURSOR'
                              'RF02K-KTOKK'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'RF02K-LIFNR'
                              record1-lifnr.
perform bdc_field       using 'RF02K-BUKRS'
                              RECORD1-BURKS.
perform bdc_field       using 'RF02K-KTOKK'
                              RECORD1-KTOKK.
perform bdc_field       using 'RF02K-REF_LIFNR'
                              RECORD1-LIFNR.
perform bdc_field       using 'RF02K-REF_BUKRS'
                              RECORD1-BURKS.
perform bdc_dynpro      using 'SAPMF02K' '0110'.
perform bdc_field       using 'BDC_CURSOR'
                              'LFA1-TELX1'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'LFA1-ANRED'
                              'RECORD1-ANRED'.
perform bdc_field       using 'LFA1-NAME1'
                              'RECORD1-NAME1'.
perform bdc_field       using 'LFA1-SORTL'
                              'RECORD1-SORTL'.
perform bdc_field       using 'record1-STRAS'
                              'RECORD1-STRAS'.
perform bdc_field       using 'LFA1-ORT01'
                              'RECORD1-ORT01'.
perform bdc_field       using 'LFA1-LAND1'
                              'RECORD1-LAND1'.
perform bdc_field       using 'LFA1-SPRAS'
                              'RECORD1-SPRAS'.
perform bdc_dynpro      using 'SAPMF02K' '0120'.
perform bdc_field       using 'BDC_CURSOR'
                              'LFA1-KUNNR'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'LFA1-KUNNR'
perform bdc_dynpro      using 'SAPMF02K' '0130'.
perform bdc_field       using 'BDC_CURSOR'
                              'LFBK-BANKL(01)'.
perform bdc_field       using 'BDC_OKCODE'
                              '=ENTR'.
perform bdc_field       using 'LFBK-BANKS(01)'
                              'IN'.
perform bdc_field       using 'LFBK-BANKL(01)'
                              'RECORD1-BANKL'.
perform bdc_dynpro      using 'SAPMF02K' '0130'.
perform bdc_field       using 'BDC_CURSOR'
                              'record1-BANKS(01)'.
perform bdc_field       using 'BDC_OKCODE'
                              '=ENTR'.
perform bdc_dynpro      using 'SAPMF02K' '0210'.
perform bdc_field       using 'BDC_CURSOR'
                              'record1-AKONT'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_dynpro      using 'SAPMF02K' '0215'.
perform bdc_field       using 'BDC_CURSOR'
                              'record1-ZTERM'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_dynpro      using 'SAPMF02K' '0220'.
perform bdc_field       using 'BDC_CURSOR'
                              'record1-MAHNA'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_dynpro      using 'SAPLSPO1' '0300'.
perform bdc_field       using 'BDC_OKCODE'
                              '=YES'.
perform bdc_transaction using 'XK01'.
perform close_group.

report Z_PHANIBDC2
       no standard page heading line-size 255.
include bdcrecx1.
DATA: BEGIN OF RECORD1 OCCURS 0,
        LIFNR(018),
        BURKS(011),
        KTOKK(014),
        ANRED(014),
        NAME1(014),
        SURTL(014),
        STRAS(012),
        ORT01(040),
        LAND1(013),
        SPRAS(019),
        KUNNR(015),
        BANKL(012),
        BANKS(018),
        AKONT(022),
        ZTERM(012),
        MAHNA(016),
END OF RECORD1.
<b>perform upload.</b>
perform open_group.
loop at recored.
perform bdc_dynpro      using 'SAPMF02K' '0100'.
perform bdc_field       using 'BDC_CURSOR'
                              'RF02K-KTOKK'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'RF02K-LIFNR'
                              record1-lifnr.
perform bdc_field       using 'RF02K-BUKRS'
                              RECORD1-BURKS.
perform bdc_field       using 'RF02K-KTOKK'
                              RECORD1-KTOKK.
perform bdc_field       using 'RF02K-REF_LIFNR'
                              RECORD1-LIFNR.
perform bdc_field       using 'RF02K-REF_BUKRS'
                              RECORD1-BURKS.
perform bdc_dynpro      using 'SAPMF02K' '0110'.
perform bdc_field       using 'BDC_CURSOR'
                              'LFA1-TELX1'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'LFA1-ANRED'
                              'RECORD1-ANRED'.
perform bdc_field       using 'LFA1-NAME1'
                              'RECORD1-NAME1'.
perform bdc_field       using 'LFA1-SORTL'
                              'RECORD1-SORTL'.
perform bdc_field       using 'record1-STRAS'
                              'RECORD1-STRAS'.
perform bdc_field       using 'LFA1-ORT01'
                              'RECORD1-ORT01'.
perform bdc_field       using 'LFA1-LAND1'
                              'RECORD1-LAND1'.
perform bdc_field       using 'LFA1-SPRAS'
                              'RECORD1-SPRAS'.
perform bdc_dynpro      using 'SAPMF02K' '0120'.
perform bdc_field       using 'BDC_CURSOR'
                              'LFA1-KUNNR'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'LFA1-KUNNR'
perform bdc_dynpro      using 'SAPMF02K' '0130'.
perform bdc_field       using 'BDC_CURSOR'
                              'LFBK-BANKL(01)'.
perform bdc_field       using 'BDC_OKCODE'
                              '=ENTR'.
perform bdc_field       using 'LFBK-BANKS(01)'
                              'IN'.
perform bdc_field       using 'LFBK-BANKL(01)'
                              'RECORD1-BANKL'.
perform bdc_dynpro      using 'SAPMF02K' '0130'.
perform bdc_field       using 'BDC_CURSOR'
                              'record1-BANKS(01)'.
perform bdc_field       using 'BDC_OKCODE'
                              '=ENTR'.
perform bdc_dynpro      using 'SAPMF02K' '0210'.
perform bdc_field       using 'BDC_CURSOR'
                              'record1-AKONT'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_dynpro      using 'SAPMF02K' '0215'.
perform bdc_field       using 'BDC_CURSOR'
                              'record1-ZTERM'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_dynpro      using 'SAPMF02K' '0220'.
perform bdc_field       using 'BDC_CURSOR'
                              'record1-MAHNA'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_dynpro      using 'SAPLSPO1' '0300'.
perform bdc_field       using 'BDC_OKCODE'
                              '=YES'.
perform bdc_transaction using 'XK01'.
endloop.
perform close_group.
<b>form upload.</b>
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
  CODEPAGE                      = ' '
   FILENAME                       = ' '
   FILETYPE                      = 'DAT'
  HEADLEN                       = ' '
  LINE_EXIT                     = ' '
  TRUNCLEN                      = ' '
  USER_FORM                     = ' '
  USER_PROG                     = ' '
  DAT_D_FORMAT                  = ' '
IMPORTING
  FILELENGTH                    =
  TABLES
    DATA_TAB                      = RECORD1
EXCEPTIONS
   CONVERSION_ERROR              = 1
   FILE_OPEN_ERROR               = 2
   FILE_READ_ERROR               = 3
   INVALID_TYPE                  = 4
   NO_BATCH                      = 5
   UNKNOWN_ERROR                 = 6
   INVALID_TABLE_WIDTH           = 7
   GUI_REFUSE_FILETRANSFER       = 8
   CUSTOMER_ERROR                = 9
   NO_AUTHORITY                  = 10
   OTHERS                        = 11
  DATA : RECORD LIKE RECORD1 OCCURS 0 WITH HEADER LINE.
  DATA : RECORD3 LIKE RECORD1 OCCURS 0 WITH HEADER LINE.
  DATA : LIFNR1 LIKE LFA1-LIFNR.
  LOOP AT RECORD1.
    IF RECORD1-LIFNR <> ''.
      LIFNR1 = RECORD1-LIFNR.
      RECORD3-LIFNR = RECORD1-LIFNR.
      RECORD3-BURKS = record1-BURKS.
      APPEND RECORD3.
    ELSE.
      RECORD3-LIFNR = LIFNR1.
      RECORD3-BURKS = record1-BURKS.
      APPEND RECORD3.
    ENDIF.
  ENDLOOP.
  DELETE RECORD1 WHERE LIFNR = ''.
  RECORD[] = RECORD1[].
  DATA VAR1(15).
  DATA VAR2(15).
  DATA COUNT(2).
  DATA COUNT1(2) VALUE 1.
  DATA VAR3(16).
  DATA VAR4(16).
  DATA VAR5(16).
  DELETE ADJACENT DUPLICATES FROM RECORD COMPARING LIFNR BURKS.
write:/ 'phani'.
*IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
endform.

Similar Messages

  • I didnt konw how to make a new account for my iTues card so i did it with a diffrent email but that email doesnt exist and when i tried to make it on a real email i just sai invalid code check the code and try again and can u please help me

    please help me it is a card of 25 dollars and i dont want it to go to waist i by mistake thought you used a frake email so i made one up i thought i was going to have a new one but then it said it was going to send a verifaction to my email so then i tried to use a real email and put in the code but it just kept on saying invalid code. check the code and try again. and i dont know what to do can u please please help me it was a gift and i really dont want it to go to waist please i need help

    for #1
    Frequently asked questions about Apple ID - Apple Support
    I have multiple Apple IDs. Is there a way for me to merge them into a single Apple ID?
    Apple IDs cannot be merged. You should use your preferred Apple ID from now on, but you can still access your purchased items such as music, movies, or software using your other Apple IDs.
    If you are wondering how using multiple Apple IDs relate to iCloud, see Apple IDs and iCloud.
    for #2
    Apple does not accept unsolicited ideas see Apple - Legal - Unsolicited Idea Submission Policy

  • Plz check the code

    Hi all,
    Friends please tell me what is the problem with this code.....
    It is not giving what i want.......
    I want only that row in the table to have orange background which contains the value 'check'..
    but what it does is that it sets all the other rows as orange too....
    but when i select all the rows in the table.....it does show the color of the cell which contains 'check' and the color of the rest of the cells which are set to highlight color...
    please chk the following code and let me know if there is any error...
    public class ErrorEntryCellRenderer extends DefaultTableCellRenderer {
        /** Creates a new instance of ErrorEntryCellRenderer */
        public ErrorEntryCellRenderer() {
        public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
            Component retValue;
            retValue = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
            if(value instanceof String) {
                if(((String)value).equalsIgnoreCase("check")) {
                    setBackground(Color.ORANGE);
                    validate();
            return retValue;
    }Thank you..
    Message was edited by:
    vaibhavpingle

    it doesnt work then...it does not paint any thing......
    i did the following changes
    public Component getTableCellRendererComponent(JTable table, Color c, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
            Component retValue;
            retValue = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
            if(value instanceof String) {
                if(((String)value).equalsIgnoreCase("check")) {
                    setBackground(Color.ORANGE);
                    validate();
                } else {
                    setBackground(c);
                    validate();
            return retValue;
        }

  • How to stop the encoding ?plz see the code and correct it

    public class NewClass
        /** Creates a new instance of NewClass */
        public NewClass ()
            StateHelper sh=null;
            Processor p=null;
            try
                p=Manager.createProcessor (new URL ("file:///ring.wav"));
                sh = new StateHelper (p);
                p.configure ();
            catch (NoProcessorException ex)
                ex.printStackTrace ();
            catch (IOException ex)
                ex.printStackTrace ();
            p.setContentDescriptor (new FileTypeDescriptor (FileTypeDescriptor.MPEG_AUDIO));       
            TrackControl track[] = p.getTrackControls ();
            boolean encodingPossible = false;
            for (int i = 0; i < track.length; i++)
                try
                    track.setFormat (new AudioFormat (AudioFormat.MPEG));
    encodingPossible = true;
    catch (Exception e)
    track[i].setEnabled (false);
    if (!sh.realize (10000))
    System.exit (-1);
    DataSource source = p.getDataOutput ();
    MediaLocator dest = new MediaLocator ("file://ring1.mpg");
    DataSink filewriter = null;
    try
    filewriter = Manager.createDataSink (source, dest);
    filewriter.open ();
    filewriter.addDataSinkListener (new DataSinkListener ()
    public void dataSinkUpdate (DataSinkEvent e)
    if(e instanceof javax.media.datasink.EndOfStreamEvent)
    DataSink ds=e.getSourceDataSink ();
    try
    ds.stop ();
    System.out.println ("finished write");
    catch (IOException ex)
    ex.printStackTrace ();
    filewriter.start ();
    catch (NoDataSinkException e)
    System.exit (-1);
    catch (IOException e)
    System.exit (-1);
    catch (SecurityException e)
    System.exit (-1);
    p.start ();
    p.addControllerListener (new ControllerAdapter ()
    public void endOfMedia (EndOfMediaEvent e)
    Controller controller = (Controller) e.getSource ();
    controller.stop ();
    controller.deallocate ();
    System.out.println ("finished run through");
    public static void main (String[] args)
    new NewClass ();
    o/p is "finished run through",the EndOfStreamEvent never occurs.please correct if anything is wrong.when i manually stop the program then only the encoded file appears on the disk. this has to used from the other class and i cannot afford to use exit().help me.

    Try this - it seems to work
    public class NewClass
        Processor p = null;
        DataSink sink = null;
         /** Creates a new instance of NewClass */
        public NewClass ()
            try{
                p = Manager.createProcessor (new URL ("file:C:/WINDOWS/Media/Windows XP Startup.wav"));
                p.addControllerListener (new ControllerAdapter ()
                     public void configureComplete(ConfigureCompleteEvent e){
                        System.out.println ("ConfigureCompleteEvent");
                        Processor p = (Processor)e.getSourceController();
                        processConfigured(p);
                     public void realizeComplete(RealizeCompleteEvent e){
                        System.out.println ("RealizeCompleteEvent");
                        Processor p = (Processor)e.getSourceController();
                        processrealized(p);
                     public void controllerClosed(ControllerClosedEvent e){
                        System.out.println ("ControllerClosedEvent");
                     public void endOfMedia (EndOfMediaEvent e)
                        System.out.println ("EndOfMediaEvent");
                        Processor p = (Processor)e.getSourceController();
                        p.stop();
                     public void stop(StopEvent e){
                        System.out.println ("StopEvent");
                        Processor p = (Processor)e.getSourceController();
                        p.close();
                p.configure();
            }catch (NoProcessorException ex){
                 ex.printStackTrace ();
            }catch (IOException ex){
                 ex.printStackTrace ();
        private void processrealized(Processor p){
             MediaLocator dest = new MediaLocator("file:C:/Workspace/ring1.mpg");
             try{
                  sink = Manager.createDataSink(p.getDataOutput(), dest);
                 sink.addDataSinkListener(new DataSinkListener(){
                      public void dataSinkUpdate(DataSinkEvent e){
                           if(e instanceof EndOfStreamEvent){
                            System.out.println ("EndOfStreamEvent");
                                sink.close();
                  sink.open();
                  sink.start();
             }catch(Exception eX){
             p.start();
        private void processConfigured(Processor p){
            p.setContentDescriptor (new FileTypeDescriptor (FileTypeDescriptor.MPEG_AUDIO));       
            TrackControl track[] = p.getTrackControls ();
            boolean encodingPossible = false;
            for (int i = 0; i < track.length; i++){
                 try{
                      track.setFormat (new AudioFormat (AudioFormat.MPEG));
              encodingPossible = true;
         }catch (Exception e){
              track[i].setEnabled (false);
    p.realize();
    public static void main (String[] args)
    new NewClass ();
    `

  • Please check the code

    I AM TRYING TO REPLICATE THE ADDRESS OF EQUIPMENT FROM ECC TO CRM.
    I AM ABLE TO REPLICATE THE IDENTIFICATION NUMBER.
    WHILE USING THE SAME FUNCTION MODULE FOR ADDRESS, THE ADDRESS IS NOT GETTING REPLICATED.
    PLEASE CHECK THE CODE AND TELL ME WHAT PRE-REQUISITES MUST BE TAKEN INTO CONSIDERATION AND IS THERE ANY MISTAKE FROM ME.
    FULL POINTS WILL BE REWARDED.
    ITS VERY VERY URGENT.
    METHOD IF_EX_CRM_EQUI_LOAD~ENLARGE_COMPONENT_DATA.
    **Data declarations
    DATA:
        ls_equi          type crmt_equi_mess,
        ls_comp          type ibap_dat1,
        ls_comp_det1     TYPE IBAP_COMP3,
        ls_address_data  type ADDR1_DATA,
        ls_object      type comt_product_maintain_api,
        ls_object1     type comt_product,
        lv_object_id   type IB_DEVICEID,
        lv_object_guid type IB_OBJNR_GUID16.
    **Map Sort field from ECC to CRM
    Read table it_equi_dmbdoc-equi into ls_equi index 1.
    lv_object_id  = ls_equi-equnr.
    move is_object to ls_object.
    move ls_object-com_product to ls_object1.
    lv_object_guid = ls_object1-product_guid.
    move is_component to ls_comp.
    ls_comp_det1-deviceid    = lv_object_id.
    ls_comp_det1-object_guid = lv_object_guid.
    ls_comp_det1-EXTOBJTYP   = 'CRM_OBJECT'.
    ls_comp_det1-ibase       = ls_comp-ibase.
    ls_address_data-roomnumber = '1000'.
    ls_address_data-floor = '10'.
    ls_address_data-country = 'US'.
    CALL FUNCTION 'CRM_IBASE_COMP_CHANGE'
      EXPORTING
       i_comp                       = ls_comp
       I_COMP_DET             = ls_comp_det1
       I_ADDRESS_DATA     = ls_address_data
      I_ADDRESS_ADMIN           =
      I_PARTNER                 =
      I_DATE                    =
      I_TIME                    =
    EXCEPTIONS
      DATA_NOT_CONSISTENT       = 1
      IBASE_LOCKED              = 2
      NOT_SUCCESFUL             = 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.
    *ENDIF.
    ENDMETHOD.

    Hi S B,
    May I the procedure for the replication of serialnumber into device ID that is Identification field In Ibase.
    And one more thing need this to be codded in the standard badi or needed an copy of the implementation .
    plz help me as u already have done the requirement.
    u will be twice rewarded.
    Thanking u in advance for the reply.
    Sree.

  • Please check the code reg mail implementation and give guide lines to me

    Hi experts
    I written some code for implementing the mail in webdynpro using java mail API,i did not get the out put ,Is any configuration i have to do in webdynpro or WAS
    Can any body review my code and tell me where i mistaken in the implementation .Is there any thing i want to configure .Here with i am sending my code in the action of Send button
    public void onActionSendMail(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionSendMail(ServerEvent)
        // get the values entered by the user  in the form
        try{
        String toAddress=wdContext.currentContextElement().getTo();
        String ccAddress=wdContext.currentContextElement().getCC();
        String bccAddress=wdContext.currentContextElement().getBCC();
        String subject=wdContext.currentContextElement().getSubject();
        String messageBody=wdContext.currentContextElement().getMessage();
        //set the properties of host and port no
        Properties p = new Properties();
        p.put("mail.transport.protocol","smtp");
        p.put("mail.smtp.host","12.38.145.108");
         p.put("mail.smtp.port","25");
         //get the session object or connection to the mail server or host
         Session sess=Session.getDefaultInstance(p,null);
         //create a MimeMessage and add recipients
         MimeMessage message = new MimeMessage(sess);
         if(toAddress !=null && toAddress.length()>0){
              message.addRecipient(Message.RecipientType.TO, new InternetAddress(toAddress));
         }else
              wdComponentAPI.getMessageManager().reportSuccess("Please Enter the To Address");
         if(bccAddress !=null && bccAddress.length()>0)
         message.addRecipient(Message.RecipientType.BCC, new InternetAddress(bccAddress));
         if(ccAddress !=null && ccAddress.length()>0)
         message.addRecipient(Message.RecipientType.CC, new InternetAddress(ccAddress));
        if(subject!=null && subject.length()>0)
         message.setSubject(subject);
         message.setFrom(new InternetAddress("[email protected]"));
         if((messageBody!=null) && (messageBody.length()>0))
              message.setContent(messageBody,"text/plain");
         }else
              message.setContent("","text/plain"); 
         Transport.send(message);
        catch(Exception e)
             e.printStackTrace();
    Please mail to :  [email protected]
    Thanks and regards
    kalyan

    Hi Venkat,
       The code seems ok to me. you don't need to configure WAS to use JavaMail APIs. However, if this code doesnot work then check with the code given below as this is working fine.
    Properties prop = new Properties();
              prop.put("mail.smtp.host", host);
              prop.put("mail.smtp.auth", "false");
              Session session = Session.getInstance(prop, null);
              session.setDebug(true);
              try {
                   MimeMessage msg = new MimeMessage(session);
                   msg.setFrom(new InternetAddress(from));
                   InternetAddress[] address =
                        { new InternetAddress(to1)};
                   msg.setRecipients(Message.RecipientType.TO, address);
                   msg.setSubject(subject);
                   msg.setSentDate(new Date());
                   MimeBodyPart msg1Body = new MimeBodyPart();
                   msg1Body.setText(msg1);
                   MimeBodyPart msg2Body = new MimeBodyPart();
                   msg2Body.setText(msg2);
                   Multipart mp = new MimeMultipart();
                   mp.addBodyPart(msg1Body);
                   mp.addBodyPart(msg2Body);
                   msg.setContent(mp);
                   Transport.send(msg);
              } catch (AddressException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
                   System.out.print("AddressException : " + e.getMessage());
              } catch (MessagingException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
                   System.out.print("MessagingException : " + e.getMessage());
              } catch (Exception e) {
                   System.out.print("Exception : " + e.getMessage());
    where host is 12.38.145.108 in your case. May be you chk if your mail server  is using another port. 25 is the default port for the smtp. This may be the case that your code is not working.
    Regards:
    Abhinav Sharma
    PS : Do reward points if it helps

  • Apple TV keeps asking my for my Credit Card verification code and I punch it in, still asks me for it, and restarted everything, went to my computer, checked the code, all is set, still can't rent a movie. Please help!

    Apple TV keeps asking my for my 3digit  Credit Card verification code and I punch it in, it still asks me for it, and went to my computer on iTunes store, checked the code, all is set and saved, go back to Apple TV still can't rent a movie, I still get the same Verification Required message without any further information after I punch in my 3digits. When I hit submit, the page goes back to the same place to type the code again, and yes the code is 100% accurate. I tried restoring the apple tv, every thing is up to date on all devices and signed in and out of my itunes store on my Mac, still no luck. Please help!

    This issue actually started a week ago... see: https://discussions.apple.com/message/23399558#23399558
    to determine if there are the same problems you are experiencing.  I have spent over 6 hours on this issue trying to isolate if it is a hardware, software, network, iTunes account, or Apple device issue.  My initial results indicate it is a software specific issue related to the Apply TV hardware device.

  • HT201363 I but a reedem card of $15 dollars I put the code and star asking security questions I put the answer and the systems tell me is incorect. I need help

    I but a reedem card of $15 dollars to buy music and I put the code and star asking security questions I put the answer and the systems tell me is incorect. I need help

    Click here for information. If you can't reset them through the method described in that article or by sending yourself a rescue email(the email may take a few hours to arrive), contact the iTunes Store staff via the link in the 'Additional Information' section.
    It isn't possible to create a rescue email address without correctly answering two of the questions.
    (99350)

  • Im trying to redeem my prepaid illustrator card and it keeps coming up with an 'invalid code" I've check the code but I've typed the right code in. Help?

    Im trying to redeem my prepaid illustrator card and it keeps coming up with an 'invalid code" I've check the code but I've typed the right code in. Help?

    Redemption Code http://helpx.adobe.com/x-productkb/global/redemption-code-help.html

  • How to check the code source of some function in the portal.

    hi all.
    i have some problem  in the portal.
    i use the ESS in the portal, and now some people can not check their salary.
    i want to check the code source, but i do not know it uses which program.
    can some one tell me the way to check the program.
    best regards.

    If you want to access the source code of any ESS component, you will need access to NWDI. NWDI NWDI = NetWeaver Development Infrastructure, it provide the tools and process to build new / modify existing applications built using NWDS. There are plenty of threads discussing how to set up NWDI, you may search for the same.
    However if the payslip problem is only for some users, it could also be a pdf issue, have you tried running the payslip for those select users within ECC?
    Thanks,
    GLM

  • How to check the code of spawned report

    Hi All,
    I've to modify a standard report from PA module.The report name is "PRC: Distribute Usage and Miscellaneous Costs"
    The executable method is SPAWNED.The executable name is PASDUC.
    Please let me know how to check the code of this report and in which path can I locate the report.
    Regards,
    Mahi.

    Does this mean can I tell to my client that "This is being a spawned program, any customizations to this report needs full report development efforts"?I believe yes.
    Before I state this to my client I want to verify with this forum. Please suggest me in either case.Would your client trust my reply on here :) ?
    I would suggest you log a SR and confirm this with Oracle support, that would be a better proof.
    Thanks,
    Hussein

  • How to check the date and time when a material is blocked

    Hello,
       Please tell me how can i check the date and time when a material is blocked or unblocked.
    Regards,
    Priyanka

    Hi Pryianka,
    Are you speaking about blocked status of material master ('X-plant matl status' > MM03 > Basioc view 1; 'Plant-sp. matl status' > MM03 > MRP 1) or your problem is to find out the date when your material was booked into blocked state (stock category).
    If your problem is about mmr you can use the above mentioned MM04 (or MM03 > menu > Environment > Display changes).
    If your problem is to find out when your goods were posted to blocked stock you have to use MB51 + relevant movement types (e.g. 103, 344) + batch + etc. ()
    BR
    Csaba

  • PO creation-ME21n-Why SAP does not check company code and Plant relation

    Hi All,
    Does someone know, why SAP does not check Plant and company code relation at the time of PO creation or how can we put validation between plant and company code at the time of PO creation.
    <b>Example:</b> Suppose i have a company 0001 which is assinged to Plant 0001. when i am creating a PO with another company code 0002(Entering at header level-Org, data) and using Plant 0001 at line item level. SAP does not do this validation.
    How can we put this check in place?
    Thanks in advance.
    Deepak

    Hello Deepak,
    There are three types of purchasing
    - Company code specific :You need to assign company code to Pur organization
    - Plant specific : You must assign plant to pur organization
    - Cross company purchasing: No assignment between company code and pur organization.
    In the case 3, the system will not check company code and plant relationship, but it will check plant and pur organization specific.
    The following is the copy of sap help text:
    You can assign a purchasing organization to one company code. This is company-specific purchasing.
    You can assign a purchasing organization to no company code. This purchasing organization can then procure for all plants assigned to it, irrespective of the company code to which the plant belongs.
    Since each plant must be assigned to a company code, the company code can be determined via the plant in each procurement transaction, even if the procuring purchasing organization is not assigned to a company code.
    A purchasing organization must be assigned to one or more plants. This is plant-specific purchasing.
    Now, check your company-code and purchase organization assignment.
    Hope this helps.
    Regards
    Arif Mansuri

  • CS2, I loved it but now after a computer death and a new install on a new PC the registration program won't take the code and continually needs to bee registered, how do I fix it without buying a new version.

    Some time back I was in college and purchased a copy of CS2, I loved it but now after a computer death and a new install on a new PC the registration program won't take the code and continually needs to bee registered, how do I fix it without buying a new version.

    Oh, for Pete's sake, folks!  The forum FAQs state very clearly that posters should always perform a forum search BEFORE POSTING.
    This question has been asked and answered here ad nauseam here.  I'll bet there are dozens of such questions here in the last few months.
    How To Get Help Quickly
    Before you Post:
    Firstly - have you really checked the 'help' option in the program? Many problems can be solved far faster by getting the answer from the Help File.
    Secondly - check the Forum FAQ folder. There's advice there on many common questions and problems
    Thirdly - use the 'Knowledgebase Search' option near the top of this page. Or you can click here to go to the relevant page and enter your search words there - or just search for 'Photoshop' there to see summaries of all the relevant items.

  • TS1368 My account keeps asking for Region but the drop down menu lists Cities in China. I can,'t cange the region in my account because it asks me to check the date and time but these are correct. Any answers please?

    My account keeps asking for Region but the drop down menu lists Cities in China. I can,'t cange the region in my account because it asks me to check the date and time but these are correct. Any answers please?

    Look, I understand I still need a card attached to the account. The problem is, it won't accept my card because I only have 87 cents in my bank account right now.
    If I had known there would be so much trouble with the iTunes card, I would have just put the cash in my bank account in the morning instead of buying an iTunes card (I didn't expect the banks to be open on Thanksgiving of course).
    Apple will only accept cards that have a balance. The balance is so small in my account that it won't accept it as a valid card.
    I'm going to have to contact Apple anyway to reset the security questions. That's obvious. Your answers were not exactly helpful. You didn't tell me anything I don't already know, but thanks for trying to be helpful.

Maybe you are looking for

  • IPC pricing userexits in AP 7.0

    Hi, There is an issue in the custom Userexits in AP 7.0 we are using CRM 5.0 with AP 7.0 for IPC The issue is: we a have a Z pricing condition (configured as a manual entry).upon adding in the GUI for the Sales orders products, the value is deleted a

  • Running OAF page from JDeveloper

    Hi, For customizing an existing page , I have to load the current OAF page in JDeveloper. I have already transfered all the contents from JAVA_TOP and other files in necessary folders. When I run the page from JDeveloper, I am getting error page like

  • Echo a variable in a form based on user selection

    Ok I am very very new to java to the point were I only know how to use pre-made javascripts in my php code so be gentle. :) First, here is part of a form I have: <select name = "pulmonologist" > <option selected="" value="">---Select--- <option value

  • RF LM07 Return Transfer Order

    We are currently using LM07 in one of our warehouse operations for system guided picking and it is working well, but I have having challenges with the return transfer.  When doing a full stock removal from a storage bin with a return transfer to anot

  • No encuentro el application builder en mi lb 8.2

    Reading this thread http://zone.ni.com/devzone/cda/tut/p/id/3063 found this: Creating a DLL in LabVIEW Complete the following steps to create a DLL from the VI you built. Open a new VI and select Tools»Build Application or Shared Library (DLL). but w