UDO - Update and Add Data

Hi everybody,
I have some weeks killing my brain trying to write an UDO through code but I don't know how to...
Here is my situation:
I need to write an UDO when an invoice is added, this is going to be like an historic about some UDF and some invoice information. I need an UDO because the client can't edit this information.
I'm tired, I tried UDT but this give me a error (You have to chose the series from the menu....), I have no way with the UDO object because it is only for metadata, I can't execute an Insert or update (update after adding data with the default form) and I need this process automatically.
I need some urgent Help.... D:
Thanks.
Enriquillo Guigni

Hello:
You have to do it through RecordSet. It is not posible with UDT. The problem is that you have to be sure the docentry and the docnum when you are going to maKe the insert. Later you cant add new entries by the default form because the information in ONNM is not correct because this information is updated automatically by SBO when you add a new entry and what you are doing is by recordset and it is not autorized by SAP that you update the information of your UDO Docentry.
Best Regards
Guillermo

Similar Messages

  • Nsert/Update and Add Column at the same Table and at the "same" Time

    Hello,
    I want Insert/Update and Add Column at the same Table and at the "same" Time but in different sessions.
    Example:
    At first the "insert/update" statement:
    Insert into TestTable (Testid,Value) values (1,5105);
    After that the "add" statement:
    Alter table TestTable add TestColumn number;
    - sadly now I get the message: ORA-00054: resource busy and acquire with NOWAIT specified
    "insert/update" statement:
    Insert into TestTable (Testid,Value) values (2,1135);
    After that the execute commit.
    I don't know when the first session set the commit statement so I want that the DB the "Alter Table..." statement execute if it's possible.
    If it's possible I want to save a repeat loop with the "Alter Table..." statemtent.
    Thanks for ideas

    Well I want to walk in the rain without and umbrella and still stay dry, but it ain't gonna happen.
    You can't run a DDL statement against a table with transactions pending. Session 2 has to wait until session commits or rollbacks (or until the session is killed). That's just the way it is.
    This makes sense if you think about it. The data dictionary has to be consistent across all sessions. If session 2 was allowed to change the table structure whilst session 1 has a pending transaction then the database is in an inconsistent state. This is easier to see if you consider the reverse situation - the ALTER TABLE statement run by session 2 does a DROP COLUMN TESTID rather than adding a column: now what should happen to session 1's INSERT statement? You have retrospectively invalidated a statement that was perfectly legal when it was executed.
    If it's possible I want to save a repeat loop with the "Alter Table..." statemtent.Fnord.
    Cheers, APC

  • Get-Content and add Date and Time in a new file

    Hello,
    in a existing file I have data like:
    1;Idle
    5;chrome
    1;spoolsv
    Now I need to grab the content and add date and time in front of each line and save it to another file like:
    07.04.2015;10:18;1;Idle
    07.04.2015;10:18;5;chrome
    07.04.2015;10:18;1;spoolsv
    But I don't have any idea how I could solve this challange. Does anyone have a helping hand for me?
    Greetings

    Hello,
    If you need a new file with the desired output try this
    get-content .\current.txt | Foreach-Object{ $dntv = (get-date) ; "$dntv" + $_} | Out-File newfile.txt
    regards,
    V
    Venu

  • Update and transfer data via BADI LE_SHP_TAB_CUST_HEAD

    Greetings All,
    I've a requirement to create a custom tab in the VL01N/VL02N/VL03N header record displaying custom fields.
    I've successfully implemented BADI LE_SHP_TAB_CUST_HEAD, created a subscreen, appended my custom fields to the LIKP table via append structure, and can now view my fields in the transactions listed above.
    I'm having trouble updating the fields in the subscreen and save the values back to the LIKP table.  First question is a) do I do this via the PBO PAI modules in my subscreen, or should I be doing this in the BADI?
    Second question is, if I shuodl be doing this in the BADI, how do I do it.  A simple example is that I have created a field called ZZ_CUST_TIME in LIKP, added it to my sub-screen using data dictionary linking.
    How do I pass a value entered into this field via VL02N back to the transaction for update?
    Any suggestions would be greatfully appreciated.
    Regards,
    Steve

    Dear Abhishek,  can you explain the step..in this step screen is comming but custom fields value is not coming and also likp table is not updated
    Correct AnswerRe: Update and transfer data via BADI LE_SHP_TAB_CUST_HEAD
    Abhisek Biswas Jan 21, 2009 7:28 AM (in response to Stephen Keam)
    Hi Stephen,
    You can do it by using PBO and PAI modules of the screen that you created. But you have to transfer the data from subscreen to the BADI method TRANSFER_DATA_FROM_SUBSCREEN and aslo from method TRANSFER_DATA_TO_SUBSCREEN to the subscreen. This will update the screen field data to LIKP.
    You can aceive this by two ways.
    1) You can use EXPORT in method TRANSFER_DATA_TO_SUBSCREEN and then IMPORT the value in the screen PBO. And You can EXPORT data from screen PAI and IMPORT data in method TRANSFER_DATA_FROM_SUBSCREEN.
    2) Anither way to do it is by using Function modules and Function Group instead of EXPORT/IMPORT.
    Create a Function group. In the global data define a structure/Work Area of type LIKP.
    DATA w_likp TYPE likp.
    Then create two Function modules, one to export data and another to import data.
    Let us assume that the export FM takes in IS_LIKP as input and the import FM outputs the value of LIKP into ES_LIKP.
    Then pass the value is_likp to the export FM in the BADI method TRANSFER_DATA_TO_SUBSCREEN and in the screen PAI pass the LIKP data to the export FM.
    In the export Function module write the following code:
    MOVE is_likp TO w_likp
    Then in the Import FM write the following code:
    MOVE w_likp TO es_likp.
    The import FM is called from method TRANSFER_DATA_FROM_SUBSCREEN and from screen PBO.
    This will solve your problem.
    Regards,
    Abhisek.
    Alert Moderator
    Like (0)
    Reply

  • RFC enabled function module to insert , update and delete data in a ZTABLE

    friends..
    Is there any standatd RFC enabled function module to insert , update and delete data in a custom database-table (Ztable)?
    if not how can we create it? plz give me the details steps..
    what are the import, export parameters and how to code and process it.. (for example: suppose fields in the table is Emp_Id, Name, Address. I need to develop a RFM which does the 3 tasks, insert update delete in the same RFM)
    Thanks and Regards

    create a f.n mod in se37 and make it rfc enabled.  ur import parameters are Emp_Id, Name, Address and TASK and u can have an export parameter like result which gives the status of the update. based on task u can insert using keyword INSERT....and update using UPDATE or MODIFY and delete using DELETE. these keyword are not compelte with syntax but need to refer the SAP documentation.

  • Insert,update and delete data in a table using webdynpro for abap

    Dear All,
    I have a requirement to create a table allowing the user to add rows in it and update a row as well as delete a row from that table.To do this I guess I have to make use of ALV.But using ALV I am not able to enter data to a table where as I can make a column editable delete a row etc. please guide me to perform these operations(insert,update and delete) on table.
    Thanks,
    Reddy.

    Hi Sridhar,
    By using ALV you can do all insert delete etc things. if you want to edit i mean you can yenter data in ALV.
    Check this...
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3133474a-0801-0010-d692-81827814a5a1
    Editing alv in web dynpro
    editing rows in alv reports
    Re: editing rows and columns in alv reports in webdynpro abap
    Cheers,
    Kris.

  • UPDATING AND DELETING DATA IN A TEXTFILE

    Hi Guys,
    I am using textfiles a database to store data for a travel agent and have ran into a problem with updating the textfile with out replace the entire data in the file. I am using StringTokenizer to read and place the relevant data in the correct textField so heres the problem if I try to update a field the entry select is updated and the other entries are deleted. Heres part of my code:
    code1 to add entries:
    if(event.getSource() == addButton) {
                        try {
                        outFile1 = new PrintWriter ( new FileWriter("flight.txt",true));
                        outFile1.print(cityField.getText()+", ");
                        outFile1.print(departdateField.getText()+", ");
                        outFile1.print(departtimeField.getText()+", ");
                        outFile1.print(returndateField.getText()+", ");
                        outFile1.print(returntimeField.getText()+", ");
                        outFile1.print(priceField.getText()+", ");
                        outFile1.print(referenceField.getText()+", " + "\r\n");     
                        outFile1.flush();
                        outFile1.close();
                        JOptionPane.showMessageDialog(null,"Data have been Saved");
                        cityField.setText("");
                        departdateField.setText("" );
                        departtimeField.setText("");
                        returndateField.setText("");
                        returntimeField.setText("");
                        priceField.setText("");
                        referenceField.setText("");
                   catch (IOException e) {
                        JOptionPane.showMessageDialog(null,"Search Not Found");
                        return;
    code2 update entries:
    if(event.getSource()==updateButton){
                        try {
                        outFile1 = new PrintWriter ( new FileWriter("flight.txt"));
                        outFile1.print(cityField.getText()+", ");
                        outFile1.print(departdateField.getText()+", ");
                        outFile1.print(departtimeField.getText()+", ");
                        outFile1.print(returndateField.getText()+", ");
                        outFile1.print(returntimeField.getText()+", ");
                        outFile1.print(priceField.getText()+", ");
                        outFile1.print(referenceField.getText()+", ");     
                        outFile1.flush();
                        outFile1.close();
                        JOptionPane.showMessageDialog(null,"Data have been Saved");
                        cityField.setText("");
                        departdateField.setText("" );
                        departtimeField.setText("");
                        returndateField.setText("");
                        returntimeField.setText("");
                        priceField.setText("");
                        referenceField.setText("");
                   catch (IOException e) {
                        JOptionPane.showMessageDialog(null,"Search Not Found");
                        return;
    Can anyone help!!

    I think there are ways to open a file for appending, and maybe using Random Access File you can remove / change certain parts of the file. But honestly these days file data throughput is very very high (certainly 100s of megabytes / sec, maybe gigabytes / sec), but file latency (the time it takes for the HD to get to the right sector) is the key performance stopper. So writing the whole file to disk again doesn't cost you anything. I rewrite the whole file with all of my changing files.

  • How to save, update and retrieve data from two diffrent table

    Hi,
    I can save and retrieve data into an user defined SBO form from one database table only. How can I save retrieve and update records from two or more different tables in a single screen?
    Regards,
    Sudeshna.

    Sudeshna,
    Are these tables external to SAP Business One and do not have a Business Object?  If there is a Business Object available such as if you were to enter an order, that order would use the Documents object which abstracts you, the programmer, from the underlying tables that need to be updated.  If you are handling multiple business objects you would need to wrap the transaction with the StartTransaction - EndTransaction methods.  This information is detailed in the SAP Business One SDK Help Center that comes with the SDK.
    HTH,
    Eddy

  • Ios 7.1.2 update and lost data

    I have updated my iphone 5s to ios 7.1.2 then it frooze completely so I had to restore my iphone to scratch important and I lost an app (kind of passwords and info vault ) with important notes and private datas , I have been searching in icloud : no luck ...I am desperate to retrieve it , what should I do ? please can someone help ,shall I download one of this data recovery programs ?

    Restore from your last backup file.

  • I try to update and backup data from iphone to iMac but keep fail

    Hi, I have problem with updating and backup my iphone to imac. If you can help me about my problem that will be great.

    Hello jennywijaya,
    I would be concerned too if I was not able to backup my iPhone.  I recommend the following article for troubleshooting backup issues with iTunes:
    iOS: Troubleshooting backup issues in iTunes
    http://support.apple.com/kb/TS2529
    If you are still unable to update after creating the backup, I recommend the following article:
    iOS: Unable to update or restore
    http://support.apple.com/kb/HT1808
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • How to add a new column to a existing table and add data to this column?

    I have a table with about 10 millions row and I want to add a new column to this table, then fill this new column with prepared data.
    How to do it ?
    Thank you

    Can I use insert statement to add the data to new-added column?No.
    07:19:37 oracle >create table test (x number);
    Table created.
    Elapsed: 00:00:03.05
    07:19:53 oracle >
    07:19:53 oracle >
    07:19:53 oracle >insert into test values (1);
    1 row created.
    Elapsed: 00:00:00.00
    07:20:01 oracle >insert into test values (2);
    1 row created.
    Elapsed: 00:00:00.00
    07:20:10 oracle >insert into test values (3);
    1 row created.
    Elapsed: 00:00:00.00
    07:20:12 oracle >
    07:20:13 oracle >commit;
    Commit complete.
    Elapsed: 00:00:00.00
    07:20:14 oracle >
    07:20:19 oracle >select * from test;
             X
             1
             2
             3
    Elapsed: 00:00:00.00
    07:20:22 oracle >
    07:20:36 oracle >alter table test add (y number);
    Table altered.
    Elapsed: 00:00:00.05
    07:20:41 oracle >
    07:20:41 oracle >
    07:20:41 oracle >
    07:20:41 oracle >select * from test;
             X          Y
             1
             2
             3
    Elapsed: 00:00:00.00
    07:20:43 oracle >
    07:20:44 oracle >
    07:20:44 oracle >update test set y=1;
    3 rows updated.
    Elapsed: 00:00:00.02
    07:20:52 oracle >commit;
    Commit complete.
    Elapsed: 00:00:00.00
    07:20:56 oracle >select * from test;
             X          Y
             1          1
             2          1
             3          1
    Elapsed: 00:00:00.00
    07:20:58 oracle >Anand

  • Track of Addition , Updation and Deletion data in SAP system

    Hi,
    I am working on extracting data from SAP using 3rd party language into DB, now scenario is as follow everytime i do extraction i have to pull all data again and again which is time consuming now what i am thing of getting only updated data or new , delated data into my DB, say for example
    1 . I have created vendor or updated vendor info does SAP keep the information of this record that this record has been added or updated if yes the which table does i will get the info.?
    2. if i delete some info. of vendor does SAP store this info. that this vendor is deleted subsequently i will updata my data into  my DB.
    if i get this info. i can extract only extra data added or modified data into my DB
    any help / suggestion will be appriciated.
    Thanks,
    John.

    Most of the transactional data and almost all the master data are tracked for changes in SAP. So instead of asking such a generic question, maybe if you please let us know exactly which objects that you are extracting, then we can verify this. As pointed out earlier, There are function modules, tables and programs that track changes or reads them for you.
    Apart from these, config table changes are also tracked using table logging.
    Rob, just a small correction, if I may do so. For vendors the field is LFA1-LOEVM not KNA1-LOEVM which is for customers. But Rob is correct in saying that there are certain master data objects that are not physically deleted but are only marked for deletion and a subsequent archiving will delete them permenantly.
    To make it short, yes SAP does keep track of changes for many critical objects. If it is missing on some, which are of interest to you, there are ways. Please let the forum know which data you are interested in downloading.
    Srinivas

  • Problem while update and insert data in table

    Hi All,
    I have problem while save line data....
    I have an advance table.I take remove and duplicate line in message choice of advance table action layout.
    Also there is one temp table to save Po number data which is populated in advance table according to PO Number search.And In Temp table record number is column which use
    to insert and update data in temp table which mention in procedure
    Problem is that : When i Searched PO Number and duplicate line and save that record it insert a new line always and it insert record according to duplicate line no .It not update previous line,insert new line always according to duplicate line no.
    Please tell me what is solution?
    Thanks,
    Neil

    Hi,
    I am not cleared with your requirement.
    If possible send me the screenshots for the same.
    --Sushant
    [email protected]

  • Manual ios update and all data lost?

    I updated my ipad manually and everything went well but when i updated my dads ipod touch 3g all data was LOST!!!!!! My dad went mad!! He had tonnes of songs in his collection especially old songs and he didnt make any back up.......please suggest how i can recover these songs my dad is sooooo upset!
    THanks in advance!!!

    If they are not on the iPod or computer they are gone. However, iTunes purchases can be redownload by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    If the synced items like music and apps are not in the iTunes library on which you do an update they well be lost since the backup that iTunes makes does not included synced media like aps or music.
    See:
    iOS 5: Updating your device to iOS 5

  • UDO MasterData and Deails Data

    Hi,
    I've a UDO linked with a custom form designed with Screen Painter. In order to add a new record I press CTRL+A keys so the Form's Mode is changed to fm_ADD_MODE.
    Ok!
    On the custom form I've a EDIT field where I should write manually an Item Code. But If I don't know that code, I would like to search it through an Items list (for example writing the * (asterisk) on that field I would like to show the form which allow me to look for the Item code).
    How can I do this?
    Thanks in advance.
    Piero

    Hi Piero,
    If you want to display a list like in B1 then you have to create a UDO containing this list of records.
    After that you only have to use the ChooseFromList object, new in the 2005 version.
    Here you have a sample on how to use it:
    ' Add ChooseFromList to the form
    oCFLCPuo = SB1_App.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
    oCFLCPuo.ObjectType = "TTT_UDOMD" 'Code of your UDO containing the list
    oCFLCPuo.UniqueID = "NM_UOCFL" 'String that you fix
    oCFLuo = oForm.ChooseFromLists.Add(oCFLCPuo)
    'Add your EditText to the form as usual   
    oItem = oForm.Items.Add("EdTxtUO", SAPbouiCOM.BoFormItemTypes.it_EDIT)
    oItem.Left = 50
    oItem.Top = 50
    oEdit = oItem.Specific
    'Bind your EditText as you need (here UDS for example)
    oEdit.DataBind.SetBound(True, "", "ET_UDS_UO")
    'Link CFL to EditText
    oEdit.ChooseFromListUID = "NM_UOCFL"
    oEdit.ChooseFromListAlias = "Code"
    Don't forget to listen the event et_CHOOSE_FROM_LIST and copy the value selected into the DataSource of your EditText:
    oForm.DataSources.UserDataSources.Item("ET_UDS_UO").Value = eventCFL.SelectedObjects.GetValue(0, 0)
    Hope it helps
    Trinidad.

Maybe you are looking for

  • Please help me, my iphone wont connect to my computer

    ive used several different cords to connect it adn evertime i do, some error message always pops up and says something like "because a usb device was drawing too much power from your computer, one or more of your usb devices has been disabled" how do

  • Error While running WLST script to create SOA Domain in Clustered Environme

    Hi, I am trying to run WLST script to create SOA Domain in clustered environment.The script is as follows. import sys print "@@@ Starting the script ..." global props from wlstModule import *#@UnusedWildImport from java.io import FileInputStream from

  • Macbook gone to reset mode

    Seems like my macbook has gone to reset mode except that files and applications are intact. I tried to rearrange the icons but it came back to reset mode again whenever it is restarted. Basically, the icons are messed up, the dock was like what it wa

  • MaxDB instance error sap netweaver trial version 7.0

    I installed sap netweaver trial version 7.0 in e drive which has got 60 GB.netweaver and sap logon front end installed and max db also installed suscessfully when configuring maxdb database i.e adding new instance  the following error appears. <b>-4

  • Getting error message when connecting with DI

    Hi all i'm getting error code -8006 and error message: Resource Error. when i try to connect to the company db using the method connect() of the object Company. does anyone knows what causes the problem and if so how to fix it? appreciate the help Yo