Reading of particular lines from appl. server

hi all,
i have different types of record types in the application server
i need to read the line like
i have one header in that i have two line items and the cycle goes on for n number of headers to post with the transaction fb60
so i need to read the record type of the line and by using that i should post the details into fb60 transaction.
the condition is like this
•     Read the data file into an internal table.
•      Loop the internal table.
•     For each ‘A’ Record
o     The company code values entered on the selection screen will be validated with the values in the Flat file. Data for Company codes other than the values on selection screen will not be processed
Condition: if company code not found fill response file    data and exit
o     Fill Company code, Vendor number into document header segment from internal table.
Condition: if company code not found fill response file    data and exit
o     Fill variables of invoice number, CR flag, currency code, invoice amount from internal table.
Condition : if length of invoice number is less than 16 then move invoice number to reference document number else move invoice number to header text.
o     Select belnr from table BKPF into an internal table with  company code, fiscal year and invoice number.
o     Check for CR flag. If CR flag is initial then header document type is of type KR (Vendor invoice) else header document type is of type KG (Credit memo).
o     Fill vendor line items( itemno_acc, vendor_no ) of i_accountpayable from internal table.
o     Fill the currency line( item no, currency) of bapiaccr01  for vendor line item.
o     Format total amount with two decimal places.
Condition: if CR flag equals CR then document is    Credit memo and amount in document currency is positive  else document is vendor invoice amount in document currency is negative.
     Whenever new Header record (‘A’ record) is encountered calculate taxes using following steps.
     Calculate tax for all line items except vendor line item using function module   ‘CALCULATE_TAX_FROM_NET_AMOUNT’
             Exporting                Company code
                                      Tax code
                              Tax jurisdiction
                             Currency key
                                      Amount
             Importing                 Tax calculated (total) 
                    Tables              Tax values and percentage rates
Condition: if tax calculated is zero then fill field Amount in Line Item Currency Fields table of BAPI with line item amount. If tax calculated is not zero then check the table (tax values and percentages). For each line in the table, If the G/L account field is initial then add the tax amount to the line item Amount in Line Item Currency Fields table of BAPI. Else add a new line to the Tax Line Items table with the tax amount and Line item amount to Amount field in Line Item Currency Fields table of BAPI. If the tax code contains similar type of tax, modify (itemno_acc, currency, doccur, amt_base) of Line item currency fields , else do an append.
     Check for tolerance limit
                                                      Add the Line item amounts and tax line item amounts into a variable and compare with the header amount.
                    Condition: The difference between Header amount and (sum of Tax line item amounts & line item amounts) should be between +5 or -5 of document currency in order to be processed for tolerance limit factor. If the difference is within tolerance and If difference is negative, subtract the Difference amount from maximum tax line item. If difference is positive, add the difference amount from maximum tax line item.
•     For each ‘D’ Record
o     Fill  the fields ( itemno_acc, gl_account, pstng_date, costcenter) of  G/L Account Line Items table .
o     Select tax jurisdiction code from table CSKS where ( cost center) equals G/L Account Line Items-costcenter
Condition: if no tax jurisdiction code found then fill the response fill with message ‘Tax jurisdiction code could not be determined’ else fill tax jurisdiction code of G/L Account Line Items with jurisdiction code.
  Fill (posnr ,bukrs, txjcd, hkont,budat,waers) of i_taxitem_in .
•     For each ‘DX’ Record
o     Read internal table i_taxitem_in  with key posnr = item number.
               Condition: if success  fill tax code from internal table.
               Modify tax line item i_taxitem_in  with tax code.
o     Read internal table i_accountgl with key itemno_acc   = item number.
If success modify GL account line items of i_accountgl with tax code.
•     Check whether the vendor has an alternate vendor either in LFA1 or LFB1 Table.
•     For all entries in i_belnr Select single  lifnr from table BSEG  with company code, fiscal year, account type ( ‘k’), vendor number and document number(belnr).  Company code, vendor number, fiscal year data is available in Document Header. Document number is in table i_belnr.
Condition: if select statement  is success then a duplicate entry found, fill the response  file with message ‘ Duplicate entry found‘.
                          If flag is initial(if no error is found till this stage)
•     Call ‘BAPI_ACC_INVOICE_RECEIPT_POST’
                                   Exporting
                                    documentheader = work area doc header
                                   Importing
                              obj_key   = objkey (invoice number)
                                  Tables
                                              accountpayable     =  i_accountpayable  
                                accountgl               =  i_accountgl
                                      accounttax             =  i_accounttax
      currencyamount     =  i_currencyamount                                 
        return                   =  i_return
•     Check whether the BAPI call is successful or not:
If successful, then do a commit using function module              
                       'BAPI_TRANSACTION_COMMIT'
                  Fill the response file with  vendor number, document number, company code, success message.
     Else
Fill the response file with BAPI return message
4.     Repeat step 3 till all the lines are processed in the flat file.
5.     Once the flat file is processed, the format the response according to the format specified in Appendix B  and then create a file at ‘celestica/interface/am/out/comm' and transfer all the response into that file.
6.     Run the FTP program ZUIGFTPV5_2 with a variant ‘NON_PO_INVOICE’ and return back ( refer 13.1.1 for variant details). This Step transfers the file to the FTP Location and also archives the file at path specified in the variant.
7.     Repeat steps 2-7 till all files are processed.
if you can help me out then pls respond by mentioning the internal tables that i am supposed to use.
thanks and regards,
ibrahim

Hi,
     First you can download the excel file to internal table form by using TEXT_CONVERT_XLS_TO_SAP.Then use the below logic LOOP AT itab INTO watab.
   if watab-col01 = 'H' OR watab-col01 = 'I' .
AT END OF col01.
      IF watab-col01 EQ 'I'.                             "Counter reset for next document
      ENDIF.
    ENDAT.
Endif.
ENDLOOP.
*Reward points
regards

Similar Messages

  • To load the image from appl. server to FORM

    Hi all,
    i have to fetch the image from Application server and Print in a form. i don't know how to load the image from appl. server to FORM.Through SE78 i guess we can load the image only from presentation server,,,,can anyone help on this????

    Hi Bhuvaneshwari ,
    Through <b>SE78</b> you can fetch the image from application server.
    Goto><b>Graphics</b>><b>BMAP(Bit map images)</b>>In <b>Name</b> parameter click <b>F4</b> for input help.>click on <b>execute</b> button.
    These images are stored on document server.
    There you can find images of application server.
    Those images you can import.
    Reward if helpful.
    Regards,
    Sandhya.

  • Reading a Random Line from a Text File

    Hello,
    I have a program that reads from a text file words. I currently have a text file around 800KB of words. The problem is, if I try to load this into an arraylist so I can use it in my application, it takes wayy long to load. I was wondering if there was a way to just read a random line from the text file.
    Here is my code, and the text file that the program reads from is called 'wordFile'
    import java.awt.*;
    import java.awt.geom.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.io.*;
    import java.util.*;
    public class WordColor extends JFrame{
         public WordColor(){
              super("WordColor");
              setSize(1000,500);
              setVisible(true);
              add(new WordPanel());
         public static void main(String[]r){
              JFrame f = new WordColor();
    class WordPanel extends JPanel implements KeyListener{
         private Graphics2D pane;
         private Image img;
         private char[]characterList;
         private CharacterPosition[]positions;
         private int charcounter = 0;
         private String initialWord;
         private File wordFile = new File("C:\\Documents and Settings\\My Documents\\Java\\projects\\WordColorWords.txt");
         private FontMetrics fm;
         private javax.swing.Timer timer;
         public final static int START = 20;
         public final static int delay = 10;
         public final static int BOTTOMLINE = 375;
         public final static int buffer = 15;
         public final static int distance = 4;
         public final static Color[] colors = new Color[]{Color.red,Color.blue,Color.green,Color.yellow,Color.cyan,
                                                                          Color.magenta,Color.orange,Color.pink};
         public static String[] words;
         public static int descent;
         public static int YAXIS = 75;
         public static int SIZE = 72;
         public WordPanel(){
              words = readWords();
              setLayout(new BorderLayout());
              initialWord = getWord();
              characterList = new char[initialWord.length()];
              for (int i=0; i<initialWord.length();i++){
                   characterList[i] = initialWord.charAt(i);
              setFocusable(true);
              addKeyListener(this);
              timer = new javax.swing.Timer(delay,new ActionListener(){
                   public void actionPerformed(ActionEvent evt){
                        YAXIS += 1;
                        drawWords();
                        if (YAXIS + descent - buffer >= BOTTOMLINE) lose();
                        if (allColorsOn()) win();
         public void paintComponent(Graphics g){
              super.paintComponent(g);
              if (img == null){
                   img = createImage(getWidth(),getHeight());
                   pane = (Graphics2D)img.getGraphics();
                   pane.setColor(Color.white);
                   pane.fillRect(0,0,getWidth(),getHeight());
                   pane.setFont(new Font("Arial",Font.BOLD,SIZE));
                   pane.setColor(Color.black);
                   drawThickLine(pane,getWidth(),5);
                   fm = g.getFontMetrics(new Font("Arial",Font.BOLD,SIZE));
                   descent = fm.getDescent();
                   distributePositions();
                   drawWords();
                   timer.start();
              g.drawImage(img,0,0,this);
         private void distributePositions(){
              int xaxis = START;
              positions = new CharacterPosition[characterList.length];
              int counter = 0;
              for (char c: characterList){
                   CharacterPosition cp = new CharacterPosition(c,xaxis, Color.black);
                   positions[counter] = cp;
                   counter++;
                   xaxis += fm.charWidth(c)+distance;
         private void drawThickLine(Graphics2D pane, int width, int thickness){
              pane.setColor(Color.black);
              for (int j = BOTTOMLINE;j<BOTTOMLINE+1+thickness;j++){
                   pane.drawLine(0,j,width,j);
         private void drawWords(){
              pane.setColor(Color.white);
              pane.fillRect(0,0,getWidth(),getHeight());
              drawThickLine(pane,getWidth(),5);
              for (CharacterPosition cp: positions){
                   int x = cp.getX();
                   char print = cp.getChar();
                   pane.setColor(cp.getColor());
                   pane.drawString(""+print,x,YAXIS);
              repaint();
         private boolean allColorsOn(){
              for (CharacterPosition cp: positions){
                   if (cp.getColor() == Color.black) return false;
              return true;
         private Color randomColor(){
              int rand = (int)(Math.random()*colors.length);
              return colors[rand];
         private void restart(){
              charcounter = 0;
              for (CharacterPosition cp: positions){
                   cp.setColor(Color.black);
         private void win(){
              timer.stop();
              newWord();
         private void newWord(){
              pane.setColor(Color.white);
              pane.fillRect(0,0,getWidth(),getHeight());
              repaint();
              drawThickLine(pane,getWidth(),5);
              YAXIS = 75;
              initialWord = getWord();
              characterList = new char[initialWord.length()];
              for (int i=0; i<initialWord.length();i++){
                   characterList[i] = initialWord.charAt(i);
              distributePositions();
              charcounter = 0;
              drawWords();
              timer.start();
         private void lose(){
              timer.stop();
              pane.setColor(Color.white);
              pane.fillRect(0,0,getWidth(),getHeight());
              pane.setColor(Color.red);
              pane.drawString("Sorry, You Lose!",50,150);
              repaint();
              removeKeyListener(this);
              final JPanel p1 = new JPanel();
              JButton again = new JButton("Play Again?");
              p1.add(again);
              add(p1,"South");
              p1.setBackground(Color.white);
              validate();
              again.addActionListener(new ActionListener(){
                   public void actionPerformed(ActionEvent evt){
                        remove(p1);
                        addKeyListener(WordPanel.this);
                        newWord();
         private String getWord(){
              int rand = (int)(Math.random()*words.length);
              return words[rand];
         private String[] readWords(){
              ArrayList<String> arr = new ArrayList<String>();
              try{
                   BufferedReader buff = new BufferedReader(new FileReader(wordFile));
                   try{
                        String line = null;
                        while (( line = buff.readLine()) != null){
                             line = line.toUpperCase();
                             arr.add(line);
                   finally{
                        buff.close();
              catch(Exception e){e.printStackTrace();}
              Object[] objects = arr.toArray();
              String[] words = new String[objects.length];
              int count = 0;
              for (Object o: objects){
                   words[count] = (String)o;
                   count++;
              return words;
         public void keyPressed(KeyEvent evt){
              char tempchar = evt.getKeyChar();
              String character = ""+tempchar;
              if (character.equalsIgnoreCase(""+positions[charcounter].getChar())){
                   positions[charcounter].setColor(randomColor());
                   charcounter++;
              else if (evt.isShiftDown()){
                   evt.consume();
              else{
                   restart();
              drawWords();
         public void keyTyped(KeyEvent evt){}
         public void keyReleased(KeyEvent evt){}
    class CharacterPosition{
         private int xaxis;
         private char character;
         private Color color;
         public CharacterPosition(char c, int x, Color col){
              xaxis = x;
              character = c;
              color = col;
         public int getX(){
              return xaxis;
         public char getChar(){
              return character;
         public Color getColor(){
              return color;
         public void setColor(Color c){
              color = c;
    }

    I thought that maybe serializing the ArrayList might be faster than creating the ArrayList by iterating over each line in the text file. But alas, I was wrong. Here's my code anyway:
    class WordList extends ArrayList<String>{
      long updated;
    WordList readWordList(File file) throws Exception{
      WordList list = new WordList();
      BufferedReader in = new BufferedReader(new FileReader(file));
      String line = null;
      while ((line = in.readLine()) != null){
        list.add(line);
      in.close();
      list.updated = file.lastModified();
      return list;
    WordList wordList;
    File datFile = new File("words.dat");
    File txtFile = new File("input.txt");
    if (datFile.exists()){
      ObjectInputStream input = new ObjectInputStream(new FileInputStream(datFile));
      wordList = (WordList)input.readObject();
      if (wordList.updated < txtFile.lastModified()){
        //if the text file has been updated, re-read it
        wordList = readWordList(txtFile);
        ObjectOutputStream output = new ObjectOutputStream(new FileOutputStream(datFile));
        output.writeObject(wordList);
        output.close();
    } else {
      //serialized list does not exist--create it
      wordList = readWordList(txtFile);
      ObjectOutputStream output = new ObjectOutputStream(new FileOutputStream(datFile));
      output.writeObject(wordList);
      output.close();
    }The text file contained one random sequence of letters per line. For example:
    hwnuu
    nhpgaucah
    zfbylzt
    hwnc
    gicgwkhStats:
    Text file size: 892K
    Serialized file size: 1.1MB
    Time to read from text file: 795ms
    Time to read from serialized file: 1216ms

  • How to read the particular line in a file !!!

    i want to read the 5th , 8th or some other line number of the file. This file is consists of many data arranged by line number. I'm able to retrieve the LineNumber of the file but i'm not able to point the curser to that particular line so it can read that line only.
    i'm pointing the cursor to that particular linenumber as in.setLineNumber(5) it moves to that particular line but after that when i try to read that particular line i'm not able to read that line.
    could any one tell me which is the other way to read that particular line or in this only where i'm doing wrong...
    i need this urgent....

    As is typical of people who claim their problem is urgent, you posted this in the wrong forum (it doesn't have anything to do with JSP) and you left out any details that might help us understand what you are blathering about.
    So take a deep breath. It isn't urgent. There is no rush. Now formulate a proper description of your problem and post it in the proper forum.

  • Read a zip file from Application server.

    Hi,
    Is there a way to read a zip file from the applicatoin server to internal table in ABAP program?  The operation system is running MS windows server.  The zip file contains only 1 text file.  I tried to use open dataset 'uncompress', and use read dataset, but read dataset gave me sy-subrc = 4.  Any feedback is greatly appreciated.
    Thanks.

    hi,
    to convert xstring to text you can use this:
    DATA unzipped_data TYPE xstring.
    DATA text_data TYPE string.
    DATA conv_x2c TYPE REF TO cl_abap_conv_in_ce.
    conv_x2c = cl_abap_conv_in_ce=>create( ).
    conv_x2c->convert( EXPORTING input = unzipped_data IMPORTING data = text_data ).
    moreover, if you want to split your text at "end of line" (CR LF in microsoft windows) into lines:
    DATA text_lines TYPE TABLE OF string.
    SPLIT text_data AT cl_abap_char_utilities=>cr_lf INTO TABLE text_lines.

  • Read an EXCEL file from application server

    Hi all
    I have to read an excel file from applicatin sever and update my custom tablels.
    The problem is when the file is uploaded into the application server .
    the fields it has are
    name age gender
    xyz    67  m.
    when seeing the file using al11 tcode :
    its showing the following:
    ###&#2161;##################>#######################################################################################################################
    #################################################################O#b#j#I#n#f#o################################################################
    How do i read this and put in my internal table
    Pleaes help.
    Thanks and Regards,

    Hi,
    I am using ECC6.0.
    I think the EXCEL file is stored in compressed format to save space.
    Please let me know how to decompress etc.
    I tried using the function moduel
    text_convert_xls_to_sap.
    How do I pass the parameter to I_filename.
    Regards,

  • Reading tab delimited file from application server

    Hi All,
    I do know that we need to use Open data set to read a file from application server, but my question is when you use  read DATASET v_file into wa_final -  this wa_final is an work area and also i have mentione an internal table. so do we need to Split the record at tab into the corresponding fields. Append the records into an internal table i_input.????
    Please let me know on this....
    thanks in advance....
    Poonam....

    Hi,
    first see the file contents in application server, how the contents whether the contents seperated by any symbol or not, if the contents seperated by any symbol then you have to split the data before appending to internal table.
    check this code.
    DATA: l_data_string TYPE string.
      filename = p_file.
      OPEN DATASET p_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
      IF sy-subrc EQ 0.
        DO.
          READ DATASET filename INTO l_data_string.
          IF sy-subrc NE 0.
            EXIT.
          ENDIF.
          CLEAR k_input.
          SPLIT l_data_string AT '#' INTO k_input-agreement k_input-suffix k_input-status
                k_input-first_name k_input-last_name k_input-job_title k_input-tel k_input-fax k_input-email_address k_input-mob_number.
          APPEND k_input TO i_input.
        ENDDO.
      ENDIF.
    Regards,
    Venu

  • Read Tilda separated file from Application Server

    I have a requirement to read a tilda separated file from application server and write a tilda separeted output to application server. Please suggest how to to get data from tilda separated file to internal table ? and also How to create a tilda separated file from internal table to application server.

    Hi again,
    This some sample code for outputing data on application server with tilda separator.
      OPEN DATASET p_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT. " MESSAGE msg.
      IF sy-subrc <> 0.
         message i812(LQ).
         LEAVE LIST-PROCESSING.
      ENDIF.
      LOOP AT gs_input INTO wa_input.
        CONCATENATE wa_input-wadat_ist
                    wa_input-sort2
                    wa_input-name1
                    wa_input-street
                    wa_input-region
                    wa_input-post_code1
                    wa_input-zzchep
                    wa_input-vbeln
                    wa_input-bstkd
                    wa_input-zfrom
                    wa_input-zland
                    wa_input-zccode
                    wa_input-zrcvd
                    wa_input-zfref
                    wa_input-znorc
                    wa_input-zsepr
                    wa_input-zvers
                    wa_input-zlout
                    wa_input-zinfo
                    wa_input-zinco
                    wa_input-zsqal
                    wa_input-zscod
                    wa_input-zrqal
                    wa_input-zeqal
                    wa_input-zecod
                    wa_input-zcust
                    wa_input-ztran INTO g_path SEPARATED BY '~'.
        TRANSFER g_path TO p_file.
        CLEAR : g_path, wa_input.
      ENDLOOP.
      CLOSE DATASET p_file.
    Hope this will be helpful for you.
    Regards,
    Vijay

  • Read Tab delimited File from Application server

    Hi Experts,
    I am facing problem while reading file from Application server.
    File in Application server is stored as follows, The below file is a tab delimited file.
    ##K#U#N#N#R###T#I#T#L#E###N#A#M#E#1###N#A#M#E#2###N#A#M#E#3###N#A#M#E#4###S#O#R#T#1###S#O#R#T#2###N#A#M#E#_#C#O###S#T#R#_#S#U#P#P#L#1###S#T#R#_#S#U#P#P#L#2###S#T#R#E#E#T###H#O#U#S#E#_#N#U#M#1
    i have downloaded this file from Application server using Transaction CG3Y. the Downloaded file is a tab delimited file and i could not see "#' in the file,
    The code is as Below.
    c_split  TYPE abap_char1 VALUE cl_abap_char_utilities=>horizontal_tab.
    here i am using IGNORING CONVERSION ERRORS in order to avoid Conversion Error Short Dump.
    OPEN DATASET wa_filename-file FOR INPUT IN TEXT MODE ENCODING DEFAULT IGNORING CONVERSION ERRORS.
          IF sy-subrc = 0.
            WRITE : /,'...Processing file - ', wa_filename-file.   
           DO.
          Read the contents of file
              READ DATASET wa_filename-file INTO wa_file-data.
              IF sy-subrc = 0.
                SPLIT wa_file-data AT c_split INTO wa_adrc_2-kunnr
                                                   wa_adrc_2-title
                                                   wa_adrc_2-name1
                                                   wa_adrc_2-name2
                                                   wa_adrc_2-name3
                                                   wa_adrc_2-name4
                                                   wa_adrc_2-name_co
                                                   wa_adrc_2-city1
                                                   wa_adrc_2-city2
                                                   wa_adrc_2-regiogroup
                                                   wa_adrc_2-post_code1
                                                   wa_adrc_2-post_code2
                                                   wa_adrc_2-po_box
                                                   wa_adrc_2-po_box_loc
                                                   wa_adrc_2-transpzone
                                                   wa_adrc_2-street
                                                   wa_adrc_2-house_num1
                                                   wa_adrc_2-house_num2
                                                   wa_adrc_2-str_suppl1
                                                   wa_adrc_2-str_suppl2
                                                   wa_adrc_2-country
                                                   wa_adrc_2-langu
                                                   wa_adrc_2-region
                                                   wa_adrc_2-sort1
                                                   wa_adrc_2-sort2
                                                   wa_adrc_2-deflt_comm
                                                   wa_adrc_2-tel_number
                                                   wa_adrc_2-tel_extens
                                                   wa_adrc_2-fax_number
                                                   wa_adrc_2-fax_extens
                                                   wa_adrc_2-taxjurcode.
    WA_FILE-DATA is having below values
    ##K#U#N#N#R###T#I#T#L#E###N#A#M#E#1###N#A#M#E#2###N#A#M#E#3###N#A#M#E#4###S#O#R#T#1###S#O#R#T#2###N#A#M#E#_#C#O###S#T#R#_#S#U#P#P#L#1###S#T#R#_#S#U#P#P#L#2###S#T#R#E#E#T###H#O#U#S#E#_#N#U#M#1
    And this is split by tab delimited and moved to other variables as shown above.
    Please guide me how to read the contents without "#' from the file.
    I have tried all possible ways and unable to get solution.
    Thanks,
    Shrikanth

    Hi ,
    In ECC 6 if all the unicode patches are applied then UTF 16 will defintly work..
    More over i would suggest you to ist replace # with some other  * or , and then try to see in debugging if any further  # appears..
    and no # appears then try to split now.
    if even now the # appears after replace statement then try to find out what exactly is it... wheather it is a horizantal tab etc....
    and then again try to replace it and then split..
    Please follow the process untill all the # are replaced...
    This should work for you..
    Let me know if you further face any issue...
    Regards
    Satish Boguda

  • HT4061 I have lost my ITouch and I cant get the serial # to ask for help. I purchased it on line from Apple. Would they have a record of the number? If so, how do I get help without the number?

    Oh no. I lost my ITouch. How can I get my serial #. Would Apple have it on record since I bought it on line from them about two years ago. I no longer have the box

    See the bottom of this reply:
    - If you previously turned on FIndMyiPod on the iPod in Settings>iCloud and wifi is on and connected go to iCloud: Find My iPhone, sign in and go to FIndMyiPhone. If the iPod has been restored it will never show up.
    iCloud: Find My iPhone
    - You can also wipe/erase the iPod and have the iPod play a sound via iCloud.
    - If not shown, then you will have to use the old fashioned way, like if you lost a wallet or purse.
    - Change the passwords for all accounts used on the iPod and report to police
    - There is no way to prevent someone from restoring the iPod (it erases it) using it unless you had iOS 7 on the device. With iOS 7, one has to enter the Apple ID and password to restore the device.
    - Apple will do nothing without a court order                                                        
    Reporting a lost or stolen Apple product                                               
    - iOS: How to find the serial number, IMEI, MEID, CDN, and ICCID number

  • Find SAPGui patch level from Appl Server

    Hi,
    I have requirement to write a program to find what will be patch level applied in the each presentation server that login into server.
    This will be my requirement. We have around 6000 terminals, some of terminals giving short  dump in server due to non applying of latest GUI patch in the presentation server, requirement is to find what will be patch level of presentation server from application server.
    I like to know whether it is possible to find what will be patch level applied in the
    presentation server from Application server.
    Thanks
    aRs

    Hi,
    Please try this FM RFC_GET_SYSTEM_INFO.
    Also you can use class CL_GUI_FRONTEND_SERVICES=>GET_GUI_VERSION.
    data: v_tab type  filetable,
          v_info type file_table,
          rc type i.
    call method cl_gui_frontend_services=>get_gui_version
      changing
        version_table            = v_tab
        rc                       = rc
      exceptions
        get_gui_version_failed   = 1
        cant_write_version_table = 2
        gui_no_version           = 3
        cntl_error               = 4
        error_no_gui             = 5
        not_supported_by_gui     = 6
        others                   = 7.
    if sy-subrc <> 0.
      message id sy-msgid type sy-msgty number sy-msgno
                 with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    else.
      read table v_tab into v_info index 3.
      write:/ 'Patch level:', v_info(2).
    endif.
    Regards,
    Ferry Lianto

  • Reading file in pattern from Application server

    Hello Experts,
    I want to search file from Application server.
    I have certain pattern for the file. eg. OEDERS_.DAT or ORDERS_OPEN..
    How can I search the file for pattern from the application server?
    Ex.
    Suppose my file name is ORDER_SENT.DAT, this file should be returned.
    Suppose my file name is ORDER+SENT.DAT, this file should be returned with error.
    Regards,
    RH

    The FM  EPS_GET_DIRECTORY_LISTING is not resulting result properly.
    I have below files on server.
    AMODPROT.PC1
    AMODPROT.PC6
    CMODACT.PC1
    CMODACT.PC6
    IMODPROT.PC1
    IMODPROT.PC6
    N070703.PC2
    SAPRUPGM.PC6
    TMS_TEST.PC1
    TMS_TEST.PC2
    TMS_TEST.PC6
    UMODPROT.PC6
    I use *.PC6 in mask parameter of FM  EPS_GET_DIRECTORY_LISTING , And it returned 0 files, where as there are 6 files.
    Did I missed anything in mask parameter?
    Regards,
    RH

  • What is the future for the enterprise server line from Apple?

    Hi.
    I work at a company that is looking at several choices for our services. We've had a Xserve G5 for quite a while and we've been very pleased with it. Although it hasn't been a smooth ride, there haven't been any major issues that have blocked the evaluation.
    However, now we are currently comming to an end of our evaluation period of different systems, and now we have to decide. The Xserve/MacOSX have it's advantages, but one issue that currently is a major questionmark is the future for the Apple enterprise line.
    I'd really apreciate feedback regarding what you think will be the future for Apple's enterprise line, will it die slowly or get a new boost with the Intel switch, as I've read that Steve has stated time upon time that Apple is not an enterprise based business. Is it worth investing in Xserve/Xraid hardware or should one steer clear of Apple and choose other enterprise platforms such as Sun products based on Solaris for example.
    Thx,
    /Mysteron

    Unfortunately, speculation pertaining Apple's future directions and unannounced products are forbidden here, as is discussion of their policies and procedures.
    Also, it's hard to really give you a solid answer without knowing more about your particular situation.

  • TO READ FILES IN A PARTICULAR DIRECTORY FROM APPLICATION SERVER

    Hi all,
    Is there any function module which gives the list of files in a specific directory ??
    for eg ;i want to fetch all files in a particular directory say */interf/sy-mandt/reports....*
    I need a function module which will give all filenames in an internal table ,if i give the directory name as input.
    Thanks in advance,
    Aakash.
    Edited by: Aakash Neelaperumal on Apr 25, 2008 11:06 PM

    Hi,
    You can use WS_FILENAME_GET but understand it is obsolete. Search for a FM in function group SFES. I saw quite a few and one of them should meet your requirement.
    Cheers !

  • How to read a particular word from the middle of the line from a .txt file

    BufferedReader reader = new BufferedReader(new FileReader("D:\\kiran.txt")); //given as a input
    String line = reader.readLine();
    StringBuffer sb=new StringBuffer();
    while(line!=null){
    sb.append(line);//appended to line
    line=reader.readLine();
    line=sb.toString();
    StringTokenizer st=new StringTokenizer(line); //Input to String Tokenizer
    while(st.nextToken()!=null){
    String ln=st.nextToken();
    System.out.println(ln);
    if(ln.equals("Time:")){
    System.out.println(st.nextToken());
    can any help me regarding this

    either refer this:-
    http://forum.java.sun.com/thread.jspa?threadID=5276606
    Or
    try this:-
    String str=null;
                   DataInputStream di=new DataInputStream(new FileInputStream("D:\\Test.txt"));
                   while((str=di.readLine())!=null)
                        if(str.contains("Time"))
                             int index=str.indexOf("Time");
                             str=str.substring(index,str.length());
                        System.out.println(str);
                   }

Maybe you are looking for