Problem in using /SAPAPO/OM_ORDER_CHANGE to update characteristics
Hi all
I am having problem in updating orders in the live cache using FM /SAPAPO/OM_ORDER_CHANGE .
The FM is used to update the one of the characteristics of the orders from eg A -> B .
I have populated values in the FM as such
CALL FUNCTION '/SAPAPO/OM_ORDER_CHANGE'
EXPORTING
is_gen_params = gs_gen_params
iv_simsession = g_simsession
is_atp_info = gs_atp_info
it_order_method = gt_order_method
it_ordmaps = gt_ordmap_tab
it_ordkeys = gt_ordkey_tab
it_charact_req_inpnode = gt_char_req
it_charact_val_outnode = gt_char_val
IMPORTING
et_rc = gt_rc
et_changed_orders = lt_changed_ord
EXCEPTIONS
lc_connect_failed = 1
lc_com_error = 2
lc_appl_error = 3
OTHERS = 4.
H/w, i am not getting any errors (gt_rc is initial) and the characteristics of my orders are not updated
And I am at my wits ends to figure out what I didnt do or need to do .
Anyone got any ideas ?
Thanks so much
Hello Lina ,
it depends on what params u are passing to that FM , can u get details by using /SAPAPO/OM_ORDER_DISPLAY/** or some FMs by passing the same params,if u are able to get the detaills then u are able to change details as well.
regards
prabhu
Similar Messages
-
Problem when using Call FM IN UPDATE TASK.
we plan to update ztable using Call FM in update task, and write the success/error message into log.
Does below is right?? I found the commit work can not be used here. Thanks..
CALL FUNCTION 'ENQUEUE_ETABLE'.
IF sy-subrc = 0.
CALL FUNCTION 'update_ztable'' IN UPDATE TASK.
Endif.
COMMIT WORK and wait.
IF sy-subrc <> 0.
ROLLBACK WORK.
write error log.
Else.
Write successful log.
Endif.
CALL FUNCTION 'DNQUEUE_ALL'.Hi ,
Please see the refernce of UPDATE FUNCTION MODULES:
UPDATE FUNCTION MODULE
-In the attributes tab, under processing type, choose Update Module,
Start Immediately. Define your import parameters, enter the source
code, All validations should have been done prior to the call to this
function module, so all you need in the source, is the updating of the
database, INSERT, MODIFY, UPDATE, whatever.
-When you call you function module, use IN UPDATE TASK, after the call,
COMMIT WORK. The commit work will trigger the db update.
Why do we use this " In Update Task " ??
The main update technique for bundling database changes in a single
database LUW is to use CALL FUNCTION... IN UPDATE TASK.
How do we Use ??
A typical R/3 installation contains dialog work processes and at least one update work process. The update work processes are responsible for updating the database. When an ABAP program reaches a COMMIT WORK statement, any function modules from CALL FUNCTION... IN UPDATE TASK statements are released for processing in an update work process. The dialog process does not wait for the update to finish. This kind of update is called asynchronous update.
What is the Use... ??
Asynchronous update is useful when response time from the transaction is critical, and the database updates themselves are so complex that they justify the extra system load
Real time scenario.
Suppose a user wants to change an entry in a database table, or add a new one. He or she enters the necessary data, and then starts the update process by choosing Save. This starts the following procedure in the ABAP program:
Firstly, the program locks the database entry against other users, using the enqueue work process (or the message server in the case of a distributed system). This generates an entry in the lock table. The user is informed whether the update was successful, or whether the lock could not be set because of other users.
If the lock is set, the program reads the entry that is to be changed and modifies it. If the user has created a new entry, the program checks whether a record with the same key values already exists.
In the current dialog work process, the program calls a function module using CALL FUNCTION... IN UPDATE TASK, and this writes the change details as an entry in table VBLOG.
When the program is finished (maybe after further dialog steps), a COMMIT WORK statement starts the final part of the SAP LUW. The work process that is processing the current dialog step starts an update work process.
Based on the information passed to it from the dialog work process, the update work process reads the log entries belonging to the SAP LUW from table VBLOG.
The update work process passes this data to the database for updating, and analyzes the return message from the database. If the update was successful, the update work process triggers a database commit after the last database change and deletes the log entries from table VBLOG.
If an error occurred, the update work process triggers a database rollback, leaves the log entries in table VBLOG, flags them as containing errors, and sends a SAPoffice message to the user, who should then inform the system administrator.
The corresponding entries in the lock table are reset by the update work process.
Q:We are calling Sales Order Change in update task inside the user Exit MV50FZ1. We can see that the FM is called in update task after the commit work and the return of the FM shows the success message. But still the changes are not saved to the DB.
A: check sm21 or sm13 to see if the update was successful .. In SM21 I checked. It is giving me the error Transaction Failed
Reward if useful
Thanks
Jagadeesh.G -
Problem in using JDBC Execute commands(Update & Delete Only) with af:Table
HI Everyone,
I have one issue with Updating and Deleting Row Data using JDBC Execute commands.
Suppose In My Application i have two pages, in Page 1 I have Two Command Buttons(Delete and Save) and One Input TextBox to write the String to be stored in the Database. and Page 2 where the result Table is shown and table is binded with a ViewObject, Now When User Types some String in InTB and click Save then By Programmatically I'm searching, that string is already present in database or not, if it is already exist then Save button converts in Update button and instead of inserting it allows user to Update the String already exist in database.
Everything is working fine but the problem comes when i put those all buttons on the same page where result table is present.After putting all things on the same page and When i click save button to insert new String it is Successfully inserting but when any of other action is performed like updating or Deleting the existing one.. then my application just hanged and then nothing I able to do.
Please Help me to understand this problem and give me the solution for this..
Thanks
Fizzz...Hi frank,
Thanks to reply me...
I'm refreshing table's iterator on each command button's action to reflect the changed result... and i'm sorry i mentioned two pages in my project.. actually these are two forms in the same page..which conditionally changed its renderer properties.. its working fine when only one form is renderred and the otherside when both are rendered then it is not working.
Hope this change will help you to understand the problem.. if something else you are looking for then please tell me..
Thanks
Fizzz... -
Guys i have a problem, I used to download apps from one of my friends apple id, now i created my new account, but when i was about to update my apps its asks for my friends id and password. now how could i update my old apps from my new apple id?
The_Tonmoy wrote:
I have no communication with my that friend :/ So it means i need to delete those apps? There's no other solution to update those apps?
No. purchases are forever tied to the apple ID used to buy them. Delete them and buy your own copies. -
i have a big problem why is it i cant update my ipod touch 2g into ios 4! im using the latest version of itunes and everytime i click "update" it stucks on the "contacting server" please help i want to update it now
Maybe here:
iTunes for Windows: iTunes cannot contact the iPhone, iPad, or iPod software update server -
I created a new ID for my Iphone, because the old ID was an email address I no longer have. Also, the phone wouldn't recognize the password I have always used. Now the problem is when I try to update my apps, it automatically wants to use the old ID. I've set the new ID for the phone, but it defaults to the old one when asking for a password to update apps.
That's because all apps are forever tied to the Apple ID used to obtain them, & can only be updated using that ID.
To use your new ID with these apps, you'll have to delete them, then repurchase. Or, contact iTunes support, explain the situation, & ask that they add these apps to the download queue of your new ID. -
4S ios updated to 7 is giving me problems for using wifi Thus it is difficult for me to use internet. The wifi comes ON for a while and goes off in a few minutes The phone is unable to scan networks available for use
Am having ipad2, ipad mini and iphone 4 with family of two persons. One hp laptop and a DELL professional computer also in operation
Myself an engineer for projects
Looks the company apple cannot grow if they do not support solving the problems of their existing customers
Ashok Dhingra
IndiaYou are not addressing Apple here. If you have a problem, describe it and someone might be able to help. Just to be sure, the wi-fi on the phone will go off after the phone goes into sleep mode unless it is actively being used. This is a battery saving measure. If you are actively using the internet, and the phone is still awake, then the wi-fi should remain connected.
What troubleshooting steps have you tried. -
i have bought a iphone 4s from uk. but i face problem in using sim on it. this is updated with 6.0.1 version. this phone also have a chip in sim plate. now how could i use it?
Where did you purchase in UK and is the iPhone carrier locked ??
-
i have 10.5.8 and i'd like to update to Lion but I haven't the app store avaiable to my sistem and I can find the atualization. At the software update doesn't have any atualization... I updated my iphone4 to IOS5 and having problems to use ICloud
As Retired Engineer indicated, you will need to install Snow Leopard first. After you install Snow Leopard, you need to go into Software Update and perform the updates. 10.6.6 will install the App Store. You should continue to update to 10.6.8 before purchasing and installing Lion from the App Store.
Be sure your machine meets the minimum requirements. Basically, any Mac with a Core 2 Duo processor or later and at least 2GB of RAM (but 4 is highly recommended). If you have a first generation MacBook Pro with a Core Duo, you will not be able to upgrade to Lion. -
There's a billing problem with a previous purchase. please update your payment method. I need a help on how to clean up all my last records for me to use another Visa card again or Master Card.
Contact iTunes Customer Service and request assistance.
Apple Support iTunes Store Contact Us -
Update problem when using reflection
We have an issue when updating objects. The values are not updated in the DB when we set the values in the domain class using reflection. However when we explicitly set the values using the setter methods, update is ok.
Here is the code for the reflection mechanism:
UnitOfWork uow = session.acquireUnitOfWork();
//domain class which needs to be persisted
Student student = new Student();
//get the clone
Student studentClone = (Student) uow.registerObject(student);
//copy the values from the value object into the
// domain class using reflection
studentClone.setVo(studentVo);
uow.commit();
The setVo method uses reflection to set the values (using invokeMethod). The values are set properly in the domain object. But the values are not updated when we do the commit.
However, if we explicitly set the values in the clone using the "setter" methods, update is okay. So this code works fine.
UnitOfWork uow = session.acquireUnitOfWork();
Student student = new Student();
Student studentClone = (Student) uow.registerObject(student);
studentClone.setName("NBA"); //set the value of name
uow.commit();
Any ideas would be appreciated...
Thanks muchTopLink 10.1.3 tracks changes through working and backup copies by default, so even if you set your changes through reflection they should be picked up. If you were using CMP 2 or EJB 3 or explicitly enabled AttributeChangeTracking, then changes set through reflective field access could be missed. In this case you should use the set methods through reflection, instead of the field directly.
I would check your code that set the changes through reflection, perhaps it is not working as you expect. Check the state of the object after applying the changes and verify they were actually set. Also ensure that you are changing the UnitOfWork clone, not the original object. -
How to update characteristics of DMS document
Hello, I have a requirement to update characteristics right after document creation.
I use BAPI_DOCUMENT_CREATE2 to create the document:
CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
EXPORTING
documentdata = ls_doc
IMPORTING
documenttype = lv_document_type
documentnumber = lv_document_number
documentpart = lv_document_part
documentversion = lv_document_version
return = ls_return.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = abap_true.
And then when I try to change it:
CALL FUNCTION 'BAPI_DOCUMENT_CHANGE2'
EXPORTING
documenttype = iv_document_type
documentnumber = cv_document_number
documentpart = iv_document_part
documentversion = iv_document_version
documentdata = ls_document_data
documentdatax = ls_document_data_x
IMPORTING
return = ls_return
TABLES
classallocations = lt_cl_alloc
characteristicvalues = lt_char.
The following error is raised: Object TYPE/NUMBER/PART/VERSION does not exist.
I pass the type, number, part and version right from BAPI_DOCUMENT_CREATE into corresponding arguments for the second call, and into documentdata fields as well. ClassAllocations table contains a single row with class type and name for characteristics in CharacteristicValues table.
Could you suggest me, what can be wrong here?I found a solution for my problem. In a short, everything is OK except one thing:
Field STATUS=1 should be also filled in CLASSALLOCATIONS table in addition to CLASSTYPE and CLASSNAME.
In total I had to make my call conform to the following points:
Document type, number, version and part must be filled into DOCUMENTDATA structure and not only in direct parameters of the BAPI
CHARACTERISTICSVALUES must include class name and class type, these can be found from tcode CL03
CLASSALLOCATIONS must include the same CLASSNAME and CLASSTYPE as from previous point, plus STATUS field set to «1» -
I changed my AppleID a long time ago to an email that I no longer use and I have updates for apps that I can't update because my old email is filled in to where i sign in and it wont let me change it to my new one???
The problem with those two apps is that they are supposed to be in your Apple ID and you didn't set up the Mac properly/completely when you got it.
You might try deleteing them and using OS X Recovery to install them again.
OS X Recovery -
http://support.apple.com/kb/HT4718
After that, before you open any iLife apps go to your Mac App Store account, to the Purchased pane and Accept them into your account. -
Problem with "SELECT...FOR UPDATE OF..." and "POST command" combination
Problem in committing transactions in Multiple Forms (Oracle Forms) with POST built-in command:
Consider that the following statements are written in WHEN-WINDOW-CLOSED trigger of a called form.
Statements in called form (Form name: FORM_CHILD):
go_block('display_block') ;
do_key('execute_query') ;
-- Data from table_b will be populated in this block, based on the value of COLUMN_1 obtained
-- from TABLE_A.
-- Example: If the value of COLUMN_1 is 10, then all the matching records from TABLE_B, which
-- are inserted with value 10 in TABLE_B.COLUMN_1 will be fetched and shown here.
if user_choice = 'YES' then
commit ;
else
rollback ;
end if ;
Statements in calling forms:
There are two calling forms having following statements and it is going to call the above said called form.
CALLING FORM 1
Statements in KEY-COMMIT trigger:
post;
call_form(form_child, no_activate) ;
Statements in ON-INSERT trigger:
select column_1
from table_a
for update of column_1
where column_2 = 'X' ;
update table_a
set column_1 = column_1 + 1
where column_2 = 'X' ;
insert into table_b ...;
insert into table_b ...; Statements in KEY-COMMIT trigger:
post;
call_form(form_child, no_activate) ;
CALLING FORM 2:
Statements in ON-INSERT trigger:
select column_1
from table_a
for update of column_1
where column_2 = 'X' ;
update table_a
set column_1 = column_1 + 1
where column_2 = 'X' ;
insert into table_b ...;
insert into table_b ...;
insert into table_b ...;
Our understanding:
Assume that both the forms are running from two different machines/instances, issuing commit at the same time. In this case, forms will start executing the statements written in ON-INSERT trigger, the moment POST command is executed. Though the commit is issued at the same time, according to oracle, only one of the request will be taken for processing first. Assume that calling form 1 is getting processed first.
So, it fetches the value available in COLUMN_1 of TABLE_A and locks the row from further select, update, etc. as SELECT...FOR UPDATE command is used (note that NOWAIT is not given, hence the lock will be released only when COMMIT or ROLLBACK happens) and proceed executing further INSERT statements. Because of the lock provided by the SELECT...FOR UPDATE command, the statements in calling form 2 will wait for the resource.
After executing the INSERT statements, the FORM_CHILD is called. The rows inserted in to TABLE_A will be queried and shown. The database changes will be committed when user closes the window (as COMMIT is issued in its WHEN-WINDOW-CLOSED trigger). Then the SELECT...FOR UPDATE lock will be released and calling form 2's statements will be executed.
Actual happenings or Mis-behavior:
Calling form 2 starts executing INSERT statements instead of waiting for SELECT...FOR UPDATE lock. Also, the value selected from TABLE_A.COLUMN_1 is same in both the calling forms, which is wrong.
The rows inserted into TABLE_B are having similar COLUMN_1 values in calling form 2 and they are fetched and shown in the called form FORM_CHILD.
Note that in calling form 2 also POST only is issued, but the changes posted there are accessible in calling form 1 also, which is wrong.
Kindly suggest us as to how to fix above problem. It will be much use, if you can send us the information regarding the behavior of Oracle Forms POST built-in also.
Our mail ID: [email protected]
Thanks a lot in advance.You have several problems:
1. On-Insert will ONLY run if you have created a new record in a base-table block. If you haven't done that, then the POST command will not cause it to run.
2. Select for update without a "no wait" will lock records for the first form, but when the second form tries this, it will hit the ORA-00054 exception, and will NOT wait. The only way you could make it wait is to issue an UPDATE sql command, which is not such a good way to go.
All POST does is issues SQL insert or update commands for any changes the user has made to records in a form's base-table blocks, without following with a Commit command.
Also understand that Commit is the same as Commit_Form, and Rollback is the same as Clear_Form. You should read up on these in the Forms help topics. -
Can we use both INSERT and UPDATE at the same time in JDBC Receiver
Hi All,
I would like to know is it possible to use both INSERT and UPDATE at the same time in one interface because I have a requirement in which I have to perform both the task.
user send the file which contains both new and old record and I need to save those in MS SQL database.
If the record exist then use UPDATE otherwise use INSERT.
I looked on sdn but didn't find any blog which perform both the things at the same time.
Interface Requirement
FILE -
> PI -
> JDBC(INSERT & UPDATE)
I am thinking to use JDBC Lookup but not sure if it good to use for bulk record.
Can somebody please suggest me something or send me the link of any blog or anything to solve this problem.
Thanks,Hi ,
If I have understood properly the scenario properly,you are not performing insert and update together. As you posted
"If the record exist then use UPDATE otherwise use INSERT."
Thus you are performing either an insert or an update which depends on outcome of a search if the records already exist in database or not. Obviously to search the tables you need " select * from ... where ...." query. If your query returns some results you proceed with update since this means there are some old records already in database. If your query returns no rows you proceed with "insert into tablename....." since there are no old records present in database.
Now perhaps the best method to do the searching, taking a decision to insert or update, and finally insert or update operation is to be done by a stored procedure in MS SQL database. A stored procedure is a subroutine available to applications accessing a relational database system. Here the application is PI server. If you need further help on how to write and call stored procedure in MS SQL you can look into these links
http://www.daniweb.com/web-development/databases/ms-sql/threads/146829
http://www.sqlteam.com/article/stored-procedures-parameters-inserts-and-updates
[ This part you can ignore, Since its not sure that you will face this situation
Still you might face some problems while your scenario runs. Lets consider this scenario, after the stored procedure searches the database it found no rows. Thus you proceed with an insert operation. If your database table is being accessed by multiple applications (or users) other than yours then it is very well possible that after the search operation completed with a null result, an insert/update operation has been performed by some other application with the same primary key. Now when you are trying to insert another row with same primary key you get an error message like "duplicate entry not possible for same primary key value". Thus you need to be careful in this respect. MS SQL has a feature called "exclusive locks ". Look into these links for more details on the subject
http://msdn.microsoft.com/en-us/library/aa213039(v=sql.80).aspx
http://www.mssqlcity.com/Articles/Adm/SQL70Locks.htm
http://www.faqs.org/docs/ppbook/r27479.htm
http://msdn.microsoft.com/en-US/library/ms187373.aspx
http://msdn.microsoft.com/en-US/library/ms173763.aspx
http://msdn.microsoft.com/en-us/library/e7z8d5hf(v=vs.80).aspx
http://mssqlserver.wordpress.com/2006/11/08/locks-in-sql/
http://www.mollerus.net/tom/blog/2008/03/using_mssqls_nolock_for_faster_queries.html
There must be other methods to avoid this problem. But the point is you need to be sure that all access to database for insert/update operations are isolated.
regards
Anupam
Maybe you are looking for
-
Error while creating Web Dynpro DC
Hi, I created a track with the wizard and I chose "Web Dynpro NetWeaver 7.0" as template. Now, when I create a Web Dynpro DC, I get the following error: Development Component Creation completed with some problem. Reason: Some used DCs are not availab
-
Why is my Mountain Lion download hanging after 53 MB
I am trying to download Mountain Lion from the AppStore and am unable to complete the download. I have a MacBook Pro from early 2011 with OS 10.6.8 (Snow Leopard). I have done the partial download multiple times, trying to pause and resume as well
-
Hardware raid boot disks on m5000
Is it possible to configure a raid 1 on boot disks to this machine? The M5000 has the LSI 1064 controller and it seems to be possible.. After booting from dvd (boot cdrom -s): # raidctl -c -r 1 c0t0d0 c0t1d0 Creating RAID volume will destroy all data
-
Cleanup job to remove archive logs automatically through OEM Grid control
Hi All, I am working on 11gR2 3node RAC database. we have enabled archivelog mode for the databases and don't have any backup processes (like rman) and not using ASM. Please let me know how to cleanup the old archivelogs automatically through oem Gri
-
Flash Pro CS6 (mac) bug -- breaks library item
Hi, After migrating to CS6 faced a big show stopper. In big FLA (was not able to reproduce), clicking on item in library changes it name to full path to it. (e.g. folder/mc --> folder/folder/mc) Saving the document produce same on file system. It