HELP bout EXTENSIONIN in BAPI_PO_CHANGE

I want to use 'BAPI_PO_CHANGE' to update PO items by passing EXTENSIONIN in unicode system ECC6.0. I have update the structure of BAPI_TE_MEPOITEMX and CI_EKPODBX.
Here's my code, no error, but the value didn't change.Is anything wrong with my code?
Thanks.
DATA:
  it_extensionin TYPE STANDARD TABLE OF BAPIPAREX,
  wa_extensionin TYPE BAPIPAREX,
  BAPI_TE_MEPOITEM LIKE BAPI_TE_MEPOITEM,
  BAPI_TE_MEPOITEMX LIKE BAPI_TE_MEPOITEMX.
  BAPI_TE_MEPOITEM-ZZ_COMM_STO_NUM = '111'.
  wa_extensionin-structure = 'BAPI_TE_MEPOITEM'.
  wa_extensionin-valuepart1(5) = '00010'.
*that's the value i want to update
  wa_extensionin-valuepart1+5(10) = BAPI_TE_MEPOITEM-ZZ_COMM_STO_NUM.
  wa_extensionin- valuepart1+15(10) = ''.
  wa_extensionin-valuepart1+25(8) = ''.
  wa_extensionin-valuepart1+33(8) = ''.
  wa_extensionin-valuepart1+41(8) = ''.
  wa_extensionin-valuepart1+49(8) = ''.
  wa_extensionin-valuepart1+57(1) = ''.
  APPEND wa_extensionin to it_extensionin.
  wa_extensionin-structure = 'BAPI_TE_MEPOITEMX'.
  wa_extensionin-valuepart1(5) = '00010'.
  wa_extensionin-valuepart1+5(1) = 'X'.
  wa_extensionin-valuepart1+6(1) = ''.
  wa_extensionin-valuepart1+7(1) = ''.
  wa_extensionin-valuepart1+8(1) = ''.
  wa_extensionin-valuepart1+9(1) = ''.
  wa_extensionin-valuepart1+10(1) = ''.
  APPEND wa_extensionin to it_extensionin.
  CALL FUNCTION 'BAPI_PO_CHANGE'
    EXPORTING
      PURCHASEORDER = '4100000533'
    TABLES
      RETURN        = IT_RETURN
      EXTENSIONIN   = it_extensionin.
Edited by: yang Aiolos on Oct 10, 2008 2:54 AM
Edited by: yang Aiolos on Oct 10, 2008 2:59 AM

Hi..
I am not sure if you have missed something in the extension structure.... what you can do is check by trial and error method by passing values to other fields also.. many times it so happens that you may need to pass values  to some particular fields to update values of some other field....
regards,
Madan...

Similar Messages

  • Need Help'bout Sort with Comparator!!

    First of all, the object that Im using is named as "Node". This object has String name, int Value and some kinda things.
    In the code below, I made one demantion object array ( Node[]) and filled it with unordered objects. And now I want to sort it by "int Value". There is a function "getVal()" which returns int Value.
    Node[] arrlist = new Node[size];
    Collect(current, arrlist); <-- this one collects unordered objects
    java.util.Collections.sort(arrlist, new Comp());
    and the class Comp is below
    import java.util.*;
    class Comp implements Comparator {
         public int compare(Object o, Object p){
              int answer = 0;
              if (o == p) {
                   return 0;
              int node1 = ((Node)o).getVal();
              int node2 = ((Node)p).getVal();
              return node1 - node2;
    I dont know much about the comparator. I dont even know what to return in thecomparator class. please help me guys!

    You are on the right track. In the compartor, you have to return a negative value, 0 or a possitive value depending on the two values you compare..
    some thing like this
    public int compare(Object o, Object p){
    //.... your codes here
    int node1 = ((Node)o).getVal();
    int node2 = ((Node)p).getVal();
    if( node1 < node2 )
    return -1
    else
    if( node1 > node2 )
      return 1;
    else
    return 0;
    [url http://www.feedfeeds.com/feedtv]FeedTV

  • Need help bout a query that will print data in matrix format..

    solved
    null

    SQL> create table mytable
      2  as
      3  select 'pranita' consultant_name, 'manager' designation, 'sohan' salesman from dual union all
      4  select 'pradeep', 'ceo', 'nick' from dual union all
      5  select 'sham', 'developer', 'prasad' from dual union all
      6  select 'john', 'designer', 'sohan' from dual union all
      7  select 'sam', 'developer', 'rajesh' from dual union all
      8  select 'pranita', 'manager', 'sohan' from dual union all
      9  select 'john', 'designer', 'anand' from dual union all
    10  select 'pradeep', 'ceo', 'rohit' from dual union all
    11  select 'sam', 'developer', 'nick' from dual
    12  /
    Tabel is aangemaakt.
    SQL> select consultant_name
      2       , designation
      3       , count(decode(salesman,'sohan',1)) "sohan"
      4       , count(decode(salesman,'nick',1)) "nick"
      5       , count(decode(salesman,'prasad',1)) "prasad"
      6       , count(decode(salesman,'rajesh',1)) "rajesh"
      7       , count(decode(salesman,'anand',1)) "anand"
      8       , count(decode(salesman,'rohit',1)) "rohit"
      9    from mytable
    10   group by consultant_name
    11       , designation
    12  /
    CONSULT DESIGNATI      sohan       nick     prasad     rajesh      anand      rohit
    sam     developer          0          1          0          1          0          0
    john    designer           1          0          0          0          1          0
    pradeep ceo                0          1          0          0          0          1
    sham    developer          0          0          1          0          0          0
    pranita manager            2          0          0          0          0          0
    5 rijen zijn geselecteerd.Regards,
    Rob.

  • Need Some Help Bout Burning Cd's

    Hi everyone!!!
    In my computer class, myself and a teacher, had a debate over some copyright laws. Let's say I buy some songs off of Itunes. Then I burn them onto a CD and give them to my friend. Then my friend imports the music onto their computer and even adds the music to their ipod. IS that illegal?? Or are we stealing music? I told my teacher that Itunes allows that, but my teacher disagrees. I'm pretty sure they do, for a few different reasons. For one, obviously Itunes is a very complicated and smart system. If they considered that stealing music, then they could probably prevent that from happening in one way or another. For instance, not allowing the music to play on the computer, or just skipping over the song, if its added onto an ipod. But we havent had those problems. So please please please respond, as soon as possible. Thank you!!!

    wolf_mother,
    Welcome to Discussions.
    In my computer class, myself and a teacher, had a debate over some copyright laws. Let's say I buy some songs off of Itunes. Then I burn them onto a CD and give them to my friend. Then my friend imports the music onto their computer and even adds the music to their ipod. IS that illegal??
    That's illegal indeed. Your teacher is right, iTunes doesn't allow that.
    The iTunes Store - Terms of Service tells you all about what's allowed and what not.
    One of those rules:
    "You shall be entitled to export, burn (if applicable) or copy Products solely for personal, noncommercial use. You shall not be entitled to burn Video Products."
    Giving them away clearly violates this rule.
    Printing the Terms of Service and discussing them in the classroom might be a good idea
    M
    17' iMac 800 MHz, 768 MB RAM, 200 GB HD, DL burner   Mac OS X (10.4.8)   iTunes 7.0.1

  • BAPI_PO_CHANGE taking default values for zaro value Condition update

    Hi,
    I am using std BAPI_PO_CHANGE for line item condition type value update.
    I want to update the condition value with zero, however it is picking some default value 10 $.
    I want to know from where it is picking that value.
          wa_item-po_item   = ls_po_detail-line_item_number.
                  wa_item-final_inv = c_x.
                  APPEND wa_item TO lt_item.
                  wa_itemx-po_item      = ls_po_detail-line_item_number.
                  wa_itemx-po_itemx     = c_x.
                  wa_itemx-final_inv    = c_x.
                  APPEND wa_itemx TO lt_itemx.
                wa_cond-itm_number = ls_po_detail-line_item_number.
                wa_cond-cond_type  = ls_po_detail-condition_type.
                wa_cond-cond_value = ls_po_detail-unit_price .
                wa_cond-currency   = c_curr.
                wa_cond-change_id  = c_insert.       
                APPEND wa_cond TO lt_cond.
                wa_condx-itm_number   = ls_po_detail-line_item_number.
                wa_condx-itm_numberx  = c_x.
                wa_condx-cond_type    = c_x.
                wa_condx-cond_value   = c_x.
                wa_condx-currency     = c_x.
                wa_condx-change_id    = c_x.
                APPEND wa_condx TO lt_condx.
       CALL FUNCTION 'BAPI_PO_CHANGE'
                EXPORTING
                  purchaseorder = wa_po_no-ebeln
                TABLES
                  return        = lt_return
                  poitem        = lt_item
                  poitemx       = lt_itemx
                  pocond        = lt_cond
                  pocondx       = lt_condx.

    Hi,
    Did you check what is there in  ls_po_detail-unit_price ??
    Check this links might help you.
    Re: BAPI_PO_CHANGE not updating Condition Price
    http://www.sap-img.com/abap/sample-abap-code-on-bapi-po-change.htm
    Regards and Best wishes.

  • 'BAPI_GOODSMVT_CREATE'  for ExtensionIN in documentation tab no structures

    Hello Friends,
    I am doing GR posting with BAPI 'BAPI_GOODSMVT_CREATE' but i need to enhance this BAPI to add some custom field with the help of EXTENSIONIN... kindly help me if any one have already work on that.
    For this bapi in the documentation tab there are no axulliray structures given as i early worked with bapi_po_create1 where they provided the structure names in the bapi documentation based on that i filled all the necessary data.
    If you can send to some sample code it would be highly appreciate.
    Thanks.

    Hi,
    I think that SAP Note 143580 - Information on SD BAPIs and customer enhancement concept will help you
    Regards,
    Eduardo
    PD: I'm sorry, I forgot the SAP Note 700795 - Enhancement category of BAPI enhancement structures
    Edited by: E_Hinojosa on Nov 9, 2010 6:29 PM

  • Row_number query - need help ASAP

    Hi ,
    Need some help bout query
    I need a query for display output like below
    DATE          CODE     MAC_NO BATCH_NO
    01-OCT-07     1119     02     1
    20-OCT-07     1210     01     2
    01-NOV-07     1209     01     3
    01-NOV-07     1510     01     4
    01-NOV-07     4025     01     5
    01-NOV-07     4025     01     5
    01-NOV-07     4051     03     6
    02-NOV-07     1209     01     7
    i hv no idea how to do it. My query doesn't work for tat requirement.Tis is my query
    SELECT date
    ,code
    ,mac_no
    ,ROW_NUMBER()
    OVER (PARTITION by date,code,mac_no
    ORDER by date,code,mac_no)
    as batch_no
    FROM PAYMENT
    WHERE npcs_cycle_num = 27
    AND txn_insert_seq_num > 0;
    The output juz like below.I need everybody help ASAP.
    DATE          CODE     MAC_NO BATCH_NO
    01-OCT-07     1119     02     1
    20-OCT-07     1210     01     1
    01-NOV-07     1209     01     1
    01-NOV-07     1510     01     1
    01-NOV-07     4025     01     1
    01-NOV-07     4025     01     2
    01-NOV-07     4051     03     1
    02-NOV-07     1209     01     1
    Thanks
    CT

    I'm sorry..Maybe my words it not that clear enough. You were right about how ROW_NUMBER works (it
    assigns a numeric value and resets based on the grouping you specify in the PARTITION clause).
    What I want actually is the row number increment based on the txn_date,poc_code and machine_no.
    I'm not sure whether using the row_number() can solve my solutions. I really hope that you could help me.
    I thought of using row_number() may help. Do you have any other solution?
    Here is my table description.
    DESC PAYMENT;
    Name Null? Type
    TXN_ID_NUM NOT NULL NUMBER(12)
    ACCT_NO NOT NULL VARCHAR2(14)
    CANCEL_CODE VARCHAR2(5)
    ADJ_TYPE_NO VARCHAR2(2)
    REASON_CODE VARCHAR2(5)
    CASHIER_ID_NO VARCHAR2(10)
    SUPERVISOR_ID_NO VARCHAR2(10)
    REV_CODE VARCHAR2(5)
    TXN_DATE DATE
    PAY_ADJ_DATE DATE
    POC_CODE VARCHAR2(10)
    MACHINE_NO VARCHAR2(3)
    PAY_MODE_CODE VARCHAR2(5)
    ORIG_ACCT_NO VARCHAR2(14)
    PAY_AMT NUMBER(12,2)
    INVOICE_NO VARCHAR2(20)
    PAY_RECEIPT_NO VARCHAR2(24)
    PAY_BATCH_NO VARCHAR2(20)
    NPCS_CYCLE_NUM NUMBER(4)
    TXN_INSERT_SEQ_NUM NOT NULL NUMBER(12)
    2) Below is the query before assigning the row number:
    SQL> SELECT TXN_DATE,POC_CODE,MACHINE_NO,PAY_BATCH_NO,PAY_AMT,REV_CODE,ADJ_TYPE_NO,PAY_MODE_CODE
    2 FROM PAYMENT
    3 WHERE NPCS_CYCLE_NUM=27
    4 AND REV_CODE IN (SELECT rev_code
    5 FROM OUTBND_REV_CODE
    6 WHERE outbnd_agen_file_code = 'TMB'
    7 AND sys_appl_id ='CCC')
    8 ORDER BY TXN_DATE,POC_CODE,MACHINE_NO;
    TXN_DATE POC_CODE MAC PAY_BATCH_NO PAY_AMT REV_C AD PAY_M
    01-OCT-07 1119 02 20071101120900000000 154.25 017 85 1
    20-OCT-07 1210 01 20071101402501400000 444.02 017 00 5
    01-NOV-07 1209 01 20071101120901100000 585.32 017 85 1
    01-NOV-07 1510 01 20071101402501100000 493 014 00 1
    01-NOV-07 4025 01 20071101402501100000 203.85 016 00 3     
    01-NOV-07 4025 01 20071101402501100000 487.96 017 00 1
    01-NOV-07 4051 03 20071101402501100000 109.26 016 00 3
    02-NOV-07 1209 01 20071102120900000000 105.76 014 00 1
    3)This is my query and the result:
    SQL> SELECT /* SQL_ID 2703 */
    2 txn_date
    3 ,poc_code
    4 ,machine_no
    5 ,pay_batch_no
    6 ,pay_amt
    7 ,rev_code
    8 ,adj_type_no
    9 ,pay_mode_code
    10 ,ROW_NUMBER()
    11 OVER (PARTITION by txn_date,poc_code,machine_no
    12 ORDER by txn_date,poc_code,machine_no)
    13 as row_number
    14 FROM PAYMENT
    15 WHERE npcs_cycle_num = 27
    16 AND txn_insert_seq_num > 0
    17 AND rev_code IN (SELECT rev_code
    18 FROM OUTBND_REV_CODE
    19 WHERE outbnd_agen_file_code = 'TMB'
    20 AND sys_appl_id ='CCC');
    TXN_DATE POC_CODE MAC PAY_BATCH_NO PAY_AMT REV_C AD PAY_M ROW_NUMBER
    01-OCT-07 1119 02 20071101120900000000 154.25 017 85 1 1 (1)
    20-OCT-07 1210 01 20071101402501400000 444.02 017 00 5 1 (2)
    01-NOV-07 1209 01 20071101120901100000 585.32 017 85 1 1 (3)
    01-NOV-07 1510 01 20071101402501100000 493 014 00 1 1 (4)
    01-NOV-07 4025 01 20071101402501100000 203.85 016 00 3 1 (5)
    01-NOV-07 4025 01 20071101402501100000 487.96 017 00 1 2 (5)
    01-NOV-07 4051 03 20071101402501100000 109.26 016 00 3 1 (6)
    02-NOV-07 1209 01 20071102120900000000 105.76 014 00 1 1 (7)
    8 rows selected.
    What I want actually as in the bracket (group by three fields which are txn_date,poc_code and machine_no)
    .I hope this is clearer.

  • Info on how to update my iOS

    I need help bout iOS 7 on iPad it's saying I gotta visit http:support.apple.com I went in there n still no help

    Update using iTune (computer)
    http://support.apple.com/kb/HT4972

  • Urgent: Bapi_po_change Extensionin Parameter...

    Hi ,
    I want to update a Zfield created in Database using BAPI_PO_CHANGE.
    It would be more helpfull. IF any one can give a sample code for that ...
    i have done the coding but the field is not getting updated ..
    It will helpfull..if i can get the steps and any additional things to be done ....
    i have used Extensionin parameter....

    Hi Gokul,
    Check the following link on Bapi_po_change, It's a sample program.
    http://www.sap-img.com/abap/sample-abap-code-on-bapi-po-change.htm
    reward points if helpful.

  • HT1454 HELP! ITook loads of photos on my ipod touch, and when i went to look at them they were just black images , and then out of 50 bout 7 of them came out?anyone know how to get the black pictures turn out ?

    HELP! ITook loads of photos on my ipod touch, and when i went to look at them they were just black images , and then out of 50 bout 7 of them came out?anyone know how to get the black pictures turn out ?

    Try the following:
    - A reset. Nothing is lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Restore from backup

  • Need some Help in BAPI_PO_CHANGE

    Hi experts,
    I'm using BAPI_PO_CHANGE to upload service numbers for 1 framework order, but it is not working, so does anybody can give me some codes for me as reference? I couldn't remember the error message becoz im at home now.
    Thanks & regards

    Ok, this is the message : Price without service not allowed
    So, anyone could help me? here are my codes:
    which are the fields that i must enter some more? please help.. thanks..
    FORM bapi_process.
      DATA n TYPE i.
      READ TABLE it_frame INDEX 1.
      g_ebeln = it_frame-ebeln.
      CALL FUNCTION 'BAPI_PO_GETDETAIL'
           EXPORTING
                purchaseorder    = g_ebeln
                items            = 'X'
                services         = 'X'
           IMPORTING
                po_header        = bapi_header_get
                po_address       = bapi_addr_get
           TABLES
                po_items         = bapi_items_get
                po_item_services = bapi_services_get
                retrurn          = bapi_return.
      bapi_head-po_number = bapi_header_get-po_number.
      bapi_headx-po_number = 'X'.
    bapi_item_chg-po_number = bapi_items_get-po_number.
      bapi_item_chg-po_item = bapi_items_get-po_item.
      bapi_item_chg-quantity = bapi_items_get-quantity.
      bapi_item_chg-pckg_no = bapi_items_get-pckg_no.
      bapi_item_chg-net_price = bapi_items_get-net_price.
      bapi_item_chg-po_price = '1'.
      APPEND bapi_item_chg.
      bapi_item_chgx-po_item = bapi_items_get-po_item.
      bapi_item_chgx-po_itemx = 'X'.
      bapi_item_chgx-quantity = 'X'.
      bapi_item_chgx-pckg_no = 'X'.
      bapi_item_chgx-net_price = 'X'.
      bapi_item_chgx-po_price = 'X'.
      APPEND bapi_item_chgx.
      LOOP AT bapi_services_get.
        bapi_serv_chg-pckg_no = bapi_services_get-pckg_no.
        bapi_serv_chg-outl_ind = bapi_services_get-outl_ind.
        bapi_serv_chg-service = bapi_services_get-service.
        bapi_serv_chg-subpckg_no = bapi_services_get-subpckg_no.
        bapi_serv_chg-quantity = bapi_services_get-quantity.
        bapi_serv_chg-gr_price = bapi_services_get-gr_price.
        bapi_serv_chg-line_no = bapi_services_get-line_no.
        bapi_serv_chg-ext_line = bapi_services_get-ext_line.
        APPEND bapi_serv_chg.
      ENDLOOP.
      DESCRIBE TABLE bapi_serv_chg LINES n.
      READ TABLE bapi_serv_chg INDEX n.
    CLEAR bapi_serv_chg.
      LOOP AT bapi_services_get WHERE outl_ind = 'X'
      AND NOT subpckg_no IS initial.
        LOOP AT it_frame.
          bapi_serv_chg-line_no = bapi_serv_chg-line_no + 1.
          bapi_serv_chg-ext_line = bapi_serv_chg-ext_line + 10.
          bapi_serv_chg-pckg_no = bapi_services_get-subpckg_no.
          bapi_serv_chg-price_unit = '1'.
          PERFORM convert CHANGING it_frame-srvpos.
          bapi_serv_chg-service = it_frame-srvpos.
          bapi_serv_chg-quantity = it_frame-menge.
          bapi_serv_chg-gr_price = it_frame-tbtwr.
          APPEND bapi_serv_chg.
        ENDLOOP.
      ENDLOOP.
      CALL FUNCTION 'BAPI_PO_CHANGE'
           EXPORTING
                purchaseorder = g_ebeln
                poheader      = bapi_head
                poheaderx     = bapi_headx
           IMPORTING
                expheader     = bapi_headret
           TABLES
                poitem        = bapi_item_chg
                poitemx       = bapi_item_chgx
                poservices    = bapi_serv_chg
                return        = bapi_msg.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
           EXPORTING
                wait = 'X'.
    ENDFORM.                    " bapi_process
    Thank you & regards

  • Some question bout URLConnection anyone can help me

    First Of all, i want to ask something bout URL connection
    1. Is it possible to Modifying some files that i accessed via URLConnection without using CGI files ?
    2. What is the limitation of URLConnection Class
    As far as i know URLConnection Class only providing connection to resources, we can read it directly, but we cannot modify it directly.
    Maybe someone Can help me with these class
    package TKI.FileBuilder;
    import java.io.*;
    import java.net.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class GetData extends HttpServlet
    private static final String CONTENT_TYPE = "text/xml; charset=windows-1252";
    private static final String DOC_TYPE;
    public static String getFilename(String Judul)
    { /*Fungsi untuk mengembalikan lokasi file tempat record akan disimpan */
    String Filename= "";
    String opener = Judul.substring(0,1);
    opener = opener.toLowerCase();
    if ((opener.equals("a")) || (opener.equals("b")) || (opener.equals("c")) || (opener.equals("d"))
    || (opener.equals("e")))
    Filename = "http://127.0.0.1:8988/Final_Project-Project1-context-root/Admin/flatfiles/flatfileA-E.txt";
    else if ((opener.equals("f")) || (opener.equals("g")) || (opener.equals("h")) || (opener.equals("i"))
    || (opener.equals("j")))
    Filename = "http://127.0.0.1:8988/Final_Project-Project1-context-root/Admin/flatfiles/flatfileF-J";
    else if ((opener.equals("k")) || (opener.equals("l")) || (opener.equals("m")) || (opener.equals("n"))
    || (opener.equals("o")))
    Filename = "http://127.0.0.1:8988/Final_Project-Project1-context-root/Admin/flatfiles/flatfileK-O";
    else if ((opener.equals("p")) || (opener.equals("q")) || (opener.equals("r")) || (opener.equals("s"))
    || (opener.equals("t")) )
    Filename = "http://127.0.0.1:8988/Final_Project-Project1-context-root/Admin/flatfiles/flatfileP-T";
    else if ((opener.equals("u")) ||(opener.equals("v")) || (opener.equals("w")) || (opener.equals("x")) || (opener.equals("y"))
    || (opener.equals("z")))
    Filename = "http://127.0.0.1:8988/Final_Project-Project1-context-root/Admin/flatfiles/flatfileV-Z";
    return Filename;
    public void saveWritten(String title, String ID, String name, String Abstract, PrintWriter File)
    try
    // save data
    System.out.println("****\n");
    System.out.println(title+"\n");
    System.out.println(name+"\n");
    System.out.println(ID+"\n");
    System.out.println(Abstract+"\n");
    System.out.println("****");
    File.println("****\n");
    File.println(title+"\n");
    File.println(name+"\n");
    File.println(ID+"\n");
    File.println(Abstract+"\n");
    File.println("****");
    }catch(Exception ae)
    ae.printStackTrace();
    public void getFile(String Judul,String nama, String Id, String Abstract, HttpServletResponse response)
    {/* mengambil dan membuka file dari sisi server
    berdasarkan huruf pertama dari judul Tugas akhir
    File di Server di bedakan menjadi
    - flatfileA-E
    - flatfileF-J
    - fletfileK-O
    - flatfileP-S
    - flatfileT-Z
    // Memilah String dengan melihat huruf terdepan dari Judul untuk menentukan
    // Flatfile mana yang akan dibuka
    String Filename = "";
    try
    // open files
    Filename = getFilename(Judul);
    URL flatfile = new URL(Filename);
    // open URL connection
    URLConnection connection = flatfile.openConnection();
    // set output True
    connection.setDoOutput(true);
    // set Write data properties to files via socket connection
    PrintWriter Aen = new PrintWriter(connection.getOutputStream());
    // save inserted data into flatfile
    saveWritten(Judul,Id,nama,Abstract,Aen);
    Aen.close();
    //view Inserted File
    BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
    while(in.readLine()!= null)
    System.out.println(in.readLine());
    }catch( Exception ae)
    ae.printStackTrace();
    public void postData(String Judul, String Nama, String Id, String Abstraksi,HttpServletResponse response)
    /*Ambil file sesuaikan dengan judul data masukan ke flatfile*/
    getFile(Judul, Nama, Id, Abstraksi,response);
    public void init(ServletConfig config) throws ServletException
    super.init(config);
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    String J_Ta = "";
    String N_Pem = "";
    String ID_Pem = "";
    String Abs = "";
    try
    { // requesting object parameter and variables
    J_Ta = request.getParameter("Judul");
    N_Pem = request.getParameter("Nama");
    ID_Pem = request.getParameter("IDPembuat");
    Abs = request.getParameter("Abstraksi");
    catch(Exception e)
    e.printStackTrace();
    // Masukkan semua data ke dalam flat file
    postData(J_Ta,N_Pem,ID_Pem,Abs,response);
    I'm trying to modify flatfiles using socket connection
    But what comes out
    No error comes out, but none inserted to the files

    This is a simple edit and replace the existing file:
    import java.io.*;
    import java.text.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    * Example of file modification via servlet
    public class FileEditExample extends HttpServlet {
      File file_ = new File("borg.txt");
      public void doGet(HttpServletRequest request,
                        HttpServletResponse response)
        throws IOException, ServletException {
          response.setContentType("text/html");
          PrintWriter out = response.getWriter();
          out.println("<html>");
          out.println("<head>");
          out.println("<title>Example file edit servlet</title>");
          out.println("</head>");
          out.println("<body bgcolor='linen'>");
          out.println("<h1>Edit me!</h1>");
          out.println("<form action='" + request.getRequestURI() + "' method='POST'>");
          out.println("<textarea rows='20' cols='80' name='text'>");
          synchronized (file_) {
            BufferedReader reader = null;
            try {
              reader = new BufferedReader(new FileReader(file_));
              String line;
              if ((line=reader.readLine())!=null) {
                while(true) {
                  out.print(line);
                  line = reader.readLine();
                  if (line==null) break;
                  out.println();
            } catch (IOException ioe) {
              ioe.printStackTrace(out);
            } finally {
              if (reader!=null) {
                reader.close();
          out.println("</textarea>");
          out.println("<br>");
          out.println("<input type='submit' value='resistance is futile'>");
          out.println("</form>");
          out.println();
          out.println("</body>");
          out.println("</html>");
      public void doPost(HttpServletRequest request,
                        HttpServletResponse response)
        throws IOException, ServletException {
          response.setContentType("text/html");
          PrintWriter out = response.getWriter();
          out.println("<html>");
          out.println("<head>");
          out.println("<title>Example file edit servlet</title>");
          out.println("</head>");
          out.println("<body bgcolor=\"white\">");
          out.println("<h1>Now you've done it!</h1>");
          out.println("<pre>");
          synchronized (file_) {
            BufferedReader reader = null;
            PrintWriter writer = null;
            try {
              reader = new BufferedReader(request.getReader());
              writer = new PrintWriter(new FileWriter(file_));
              String line;
              while ((line=reader.readLine())!=null) {
                if (line.startsWith("text=")) {
                  line = line.substring(5);
                  while (true) {
                    line = deMimify(line);
                    out.print(line);
                    writer.print(line);
                    line = reader.readLine();
                    if (line==null) {
                      break;
                    out.println();
                    writer.println();
                  break;
            } catch (IOException ioe) {
              ioe.printStackTrace(out);
            } finally {
              if (reader!=null) {
                writer.close();
              if (reader!=null) {
                writer.close();
          out.println("</pre>");
          out.println("<a href='" + request.getRequestURI() + "'>Back again</a>");
          out.println("</body>");
          out.println("</html>");
      // decodes mime encoding (probably there's been a utility to do this
      // added at some point, but I wrote this first in '96 and have never
      // bothered to check) 
      static String deMimify (String data) {
        int length = data.length();
        StringBuffer buffer = new StringBuffer(length);
        char ch;
        for (int i=0; i<length; i++) {
          switch (ch=data.charAt(i)) {
            case '+' :
              buffer.append(' ');
              break;
            case '%':
              ch = (char)( Character.digit(data.charAt(i+1), 16) * 16 +
                           Character.digit(data.charAt(i+2), 16) );
              i+=2;
            default:
              buffer.append(ch);
        return buffer.toString();
    }Pete

  • [HELP] ExtensionIn ---- BAPI_CATIMESHEETMGR_INSERT

    Hi All,
    Kindly please help me on BAPI_CATIMESHEETMGR_INSERT. I already inserted my custom field COUNTRY to Table CATSDB.  I would like to post my entries with my inserted field COUNTRY. I already read the BAPI manual :
    ExtensionIn
    Customer enhancement import
    Description
    If you defined additional customer fields in your external application or external system as well as in the SAP System and you want to transfer data from them to the SAP System, you can use this import table. The additional customer fields are reproduced in the customer-specific fields in the CATSDB table using the BAPI_TE_CATSDB structure.
    You should enter the name of the structure in the STRUCTURE field. The contents of the BAPI_TE_CATSDB structure is contained in the data part. The data part of this table must be structured analogously to the BAPI_TE_CATSDB structure. The first 10 characters of the data part are for the line numbers. The customer fields are linked to the corresponding data record in the CATSRECORDS_IN table using the line numbers.
    >>What are the first 10 characters that I should input? Please. Please help me on this.
    Thanks.

    Well this is what I think on this.
    You have to pass name of the table (say t1) of type BAPI_TE_CATSDB to the Structure EXTENSIONIN
    so now t1 will contain the data which will obviously have the corresponding Extension data for the main table CATSDB. But there has to be some way to identify which row of CATSRECORDS_IN matches to row of BAPI_TE_CATSDB record. The first 10 char are supposed to do this linking.

  • How do i get my wifi to work again on my ipod touch . it says no wifi and wont let me turn it on .. says something bout the VPN error, please anyone help

    my wifi dont work or even trys to find or turn on ... something bout the VPN error .. how do i connect to VPN? thinking that will let my wifi work?

    See:
    iOS: Wi-Fi or Bluetooth settings grayed out or dim
    One user reported that placing the iPod in the freezer fixed the problem.
    If not successful, an appointment at the Genius Bar of an Apple store is usually in order.
    Apple Retail Store - Genius Bar

  • Just bout my iPad2 and not holding a charge? Help

    This is my second iPad2 wifi. It is not holding a charge. I tured off location services and it ran down 30% in 2 hours with no usage. overnight it ran down dead after a full charge with no use. please help.

    restore the device as new

Maybe you are looking for

  • Error while creating settlement rule

    We are trying to create a Settlement Rule for a Production Order for material 900010001 with following details: Cat:MAT Settlement Receiver:900010001 % :100 Settlement Type:FUL System is giving an error msg. no.KD063 'Distribution rule for an Article

  • Toshiba Canvio 3.0 1TB not recognized by Windows 7

    This external HD used to work with no problem.  Now I can't get Windows 7 to see its connected.  Here are all the solutions I have tried: Tried on multiple laptops including Dell Inspiron and HP Pavilion dv7 Tried every USB port on all those computer

  • Problem linking with OCI

    Hi, I am using Oracle 8.0.5.0 and am trying to compile a C++ program using the OCI. I am using RedHat Linux v5.1 with g++ egcs version 2.90.27. This is my library and object list from the makefile: ORALIBS = -lnetwork -lclient -lnetv2 -lncr -lgeneric

  • I would like to change my online UK number to a fr...

    I have just bought a Uk online number and then realised it would make more sense to buy a french online number. Can I swap?

  • End action will not execute because of end action on the final chapter point

    I will be referring to this video: http://tv.adobe.com/watch/learn-encore-cs4/creating-an-event-dvd/ I followed this exactly, except for the slide show (and I made a DVD instead of flash), but when I checked the project, I get the error message "End