Urgent : update of table QALS through transaction QA12 after save
Hello Experts ,
I need to update the table field SELHERST of standard table QALS through transaction QA12 after the save button is clicked .
I have implemented the exit QEVA0010 which is triggered after clicking the save button , and have put the update command there , followed by commit work statement .
But it is not updating the table QALS .
Thanks in advance ....
When the SAVE button is pressed, SAP execute some checks and launch the update task, if you want that your changes are not overwritten by SAP you need to submit those for execution during update task.
So you need to use instructions like
- PERFORM ON COMMIT
- CALL FUNCTION IN UPDATE TASK
and execute the update in one of these. (Reference [Updates in the R/3 System (BC-CST-UP)|http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCSTUP/BCCSTUP_PT.pdf])
You may also try to force the update in the main program, declaring a pointer (field symbol) in the calling program data '(SAPMQEVA)QALS' (But that's not very correct)
Regards
Similar Messages
-
Updating custom table using call transaction
How to update a custom table using Call Transaction method. How can we use Table control (Module Pool) for this purpose).
Vignesh,
Create a table maintenance transaction for ur custom tables. Check this link for ref...
http://allaboutsap.blogspot.com/2007/04/table-maintenance-in-sap-step-by-step.html
And create a BDC recording and code a program accordingly...
regards,
karthik -
URGENT update a table with a text that has a single quote in it
Hello, I am trying to update a table with a text that has a single quote in it. I believe I need to use two singles quotes but I am not sure how.
For example:
UPDATE TEST
SET DESCRLONG='Aux fins d'exportations'
WHERE etc...
Should I put 2 singles quotes before the quote in the text?
UPDATE TEST
SET DESCRLONG='Aux fins d'''exportations'
WHERE etc...
Thank you very much :)The best way depends on the version of Oracle.
But, the quick and universal answer is to use two single quotes
SQL> connect test/test
Connected.
SQL> create table test (descrlong varchar2(128));
Table created.
SQL> insert into test values ('This is a string with a '' single quote');
1 row created.
SQL> select * from test;
DESCRLONG
This is a string with a ' single quote
SQL> update test set descrlong='Aux fins d''exportations'
2 where descrlong like 'T%';
1 row updated.
SQL> select * from test;
DESCRLONG
Aux fins d'exportations
SQL> -
User exit/BADI for updating custom table in MB1B transaction-
Dear All,
When performing a material to material conversion in MB1B transaction for batch managed materials,system is creating a new batch by copying the characteristics of issuing material/batch.The details of the new batch created are updated in standard batch tables(MCH1,MCHA,MCHA).
The requirement is when the new batch is created,the batch details and characteristics has to be stamped in a custom table.
Kindly suggest a user exit/BAIi available for updating the same in the custom table.
Regards,
DeepakDeepak, Exits for MB1B are
MBCF0002 Customer function exit: Segment text in material doc. item
MBCF0005 Material document item for goods receipt/issue slip
MBCF0006 Customer function for WBS element
MBCF0007 Customer function exit: Updating a reservation
MBCF0009 Filling the storage location field
MBCF0010 Customer exit: Create reservation BAPI_RESERVATION_CREATE1
MBCF0011 Read from RESB and RKPF for print list in MB26
MB_CF001 Customer Function Exit in the Case of Updating a Mat. Doc. -
Updating database table from co11n transaction ?
I got a requirement to add two new addional fields and want to save it in the standard table for reporting purpose. I follwed the steps like :
1. I created new fields in the table AFRU using appending struture. and activated it using se14.
2. I created a project and entered the enhancment (CONFPP07) and i created the screen-exit. then i declared thse two fields in the include : ZXCOFTOP. once i activated the screen exit it appeared in the CO11N TCODE but when i enter some values in this fields , its getting stored in the variable but i dont know how to store this value in the table AFRU .
3. for updating i used the exit CONFPP05 and my would be like AFRUD_TAB-ZZSHIF = CAPTAIN.
but the problem is its not getting updated in the database table AFRU.
should i have to use module ...endmodule in ( SAPLCORU_S - 900 screen , exit : CONFPP07 ) and write code... , like the we follow
for ztransaction or how should i solve this issue ?So, according to your code, it means that :
1) your screen field is WA_AFRUD-ZZSHIF
2) WA_AFRUD is declared as global (in ZXCOFTOP)
Is that true?
In PAI: EXIT_SAPLCORU_S_101, you should only do:
move wa_afrud-zzshif to es_afrud-zzshif.
In Exit : EXIT_SAPLCORF_105, you have to replace 'A'
LOOP AT AFRUD_TAB.
AFRUD_TAB-ZZSHIF = *wa_afrud-zzshif.* "'A'
MODIFY AFRUD_TAB.
ENDLOOP.
Note that LOOP AT is problable not the good coding (I think that this exit has to remain empty), it was just a test to check it works
Did you think to activate your project in CMOD? (you have to activate both project, and the exits)
Are you sure your exit is called. Did you debug it?
See also Note 12831 (program SAPRSMODCHECK) to check there is no problem between project/exits
Edited by: Sandra Rossi on Oct 17, 2008 6:59 PM -
Updating a table, however I would like to save the old info in another tabl
Dear all; I have a table called table_one,
Which contains the following info
carid place
Benz New York
BMW LondonThis information is usually going to be updated in the near future, however, I would like a situation where before the information is updated, the old information will be saved in another table called table_two first. so for example, from table_one, lets say New York is being updated to Toronto, I would like
Carid place
Benz New York
saved first in table_two before the update is done. How do I go about doing that. Thanks youit should have been
CREATE OR REPLACE TRIGGER partinstance_before_update
BEFORE UPDATE
ON qc_shelf_life_part_instances
FOR EACH ROW
BEGIN
INSERT INTO auditqcshelflifepartinstances
(a_part_number,
a_instance_number,
a_mfg_part_number,
a_description,
a_revision,
a_acount_number,
a_part_quantity,
a_measurement_unit,
a_mfg_date,
a_expiry,
a_location,
a_last_updated,
a_modified_by
VALUES (:old.part_number,
:old.instance_number,
:old.mfg_part_number,
:old.description,
:old.revision,
:old.account_number,
:old.part_quantity,
:old.measurement_unit,
:old.mfg_date,
:old.expiry,
:old.LOCATION,
:old.last_updated,
:old.modified_by
END;
/ -
Problem updating a table-row (changes are commited after "prerender()")
Hi,
I hope someone can help me on this:
Background-info:
The page which gives me problems should (and is) displaying one record of a query at a time. Depending on the button which can be pressed, the page should just display the next entry ("Next->") or change one column of the current entry and jump to the next entry ("Wrong / Next->"). After the last entry, the query should be (and is) executed again and the page should display the first column, which fits the query-criterias.
The problem:
If the query just finds one record, the record is displayed on that page.
By pressing the "Next->" button, the page displays the same record again (like it should). By pressing the "Wrong / Next->" button, the page displays the same record again, although - like described above - one column was changed by that action and the query (which should and is executed again)
should not find that record anymore. By pressing the "Wrong / Next->" button again, the page is not displaying a record anymore (like I expected it from the first time pressing that button).
Technical Info:
I am using one DataProvider for the "select" and an other one for the "update".
Both are working fine.
The "select" is called in the method "prerender()" and the "update" is called in the action of the button "Wrong / Next->".
I debuged the program and found out, that the column of the database entry is changing it�s value not after processing the action of the button (like it should), but AFTER processing the method "prerender()". I tried to force the action of the button to commit the changes (xyDataProvider.commitChanges();), but without success.
Code:
public String buttonWrong_action() {
try
// Execute the Update-Statement
sessionBean1.getXyRowSet().setObject(1, "2");
sessionBean1.getXyRowSet().setObject(2, cardId);
sessionBean1.getXyRowSet().setObject(3, operatorId);
xyDataProvider.refresh();
catch(Exception e)
// Jump to the next record (set cursor)
public void prerender() {
try
// Execute the Select-Statement
sessionBean1.getZRowSet().setObject(1, operatorId);
sessionBean1.getZRowSet().setObject(4, resultId); // ResultId (1 = Right, 2 = Wrong)
zDataProvider.refresh();
zDataProvider.cursorFirst();
cardId = sessionBean1.getCardRowSet().getString("id");
catch(Exception e)
}I suggest you read and understand Joel's blogs -
http://blogs.sun.com/jfbrown
Creator's CachedRowSet is designed for SELECT statements (only) and updating the ResultSet you get from that SELECT statement.
(http://blogs.sun.com/jfbrown/entry/using_rowsets_for_crud_or )
dataprovider.refresh() does not re-execute the rowset's command. It just means to "clear the previous results".
(http://blogs.sun.com/jfbrown/entry/cachedrowsetdataprovider_and_cachedrowset_info )
So here's how cachedRowSet's are designed to work:
Set you rowset's command to:
SELECT resultid FROM cardresult
WHERE cardid = ?
AND operatorid = ?
They your code would do something like this:
dp.getCachedRowSet().setObject(1, ...) ;
dp.getCachedRowSet().setObject(2, ...) ;
dp.getCachedRowSet().release() ; // clear last results.
boolean gotOne = dp.cursorFirst() ; // will cause execution
if ( gotOne ) {
dp.setValue('resultid', '2') ;
dp.commitChanges() ;
} else {
error("can't update") ;
}You'll have to adjust that code - it's just a generic example.
Don't forget to add try/catch for a RuntimeException!
The alternative is to write your own JDBC.
You can use either.
Personally I'd just write a little helper class to assist me with using plain old JDBC for this. -
Updating Z table using BADI CUSTOMER_ADD_DATA_CS
Good morning guys,
I need to update some tables Z through some information that I put in a new tab. The problem is I do not know which method I should use.
If anyone can help me I appreciate it.Lucas,
Just a thought -- BADI CUSTOMER_ADD_DATA_CS seems to be more at a screen flow level. Need caution while updating Z table here.
I would recommend using BADI CUSTOMER_ADD_DATA-CHECK_ALL_DATA/SAVE_DATA methods.
Method CHECK_ALL_DATA will be executed right before saving and has access to all tables which are ready to be updated. Final validations before updating Z tables can be performed here. Develop a FM to update Z table and call it in an UPDATE TASK in this method.
Thanks,
VM. -
URGENT:Update multiple rows of a table as a transaction
Hi,
I am trying to update mutliple rows in one table as a transaction, but only update on the last row is commited to database. Updates on the previous rows is not committed.
I must be missing some thing which is obvious. Has any got a clueeeeeeeeeee?
code:
for (int i = 0; i < selectedFaultNumbers.length; i++) {
String nationalFaultNumber = selectedFaultNumbers;
String fault = nationalFaultNumber.substring(0,13);
national_faultsRowSet2.setCommand("SELECT national_faults.national_fault_number, national_faults.status_id, national_faults.master_fault_number FROM national_faults WHERE national_faults.national_fault_number= '"+fault+"'");
national_faultsRowSet2.execute();
if (national_faultsRowSet2.next()) {
national_faultsRowSet2.updateInt("status_id", FAULT_STATUS_ASSOCIATED);
national_faultsRowSet2.updateString("master_fault_number",nationalfltno);
national_faultsRowSet2.updateRow();
national_faultsRowSet2.execute();
Any help wil be GREATLY appreciated.
Cheers
kushHi Giri,
Thanks for getting back to me.
If I understood correct, sample example updates a rowset which is bound to datatable and changes are committed to database using datatablemodel.
In my case rowset is not bound to a datatable and user is not updating the rowset.
PageBean has to update few rows in a table when a new row is inserted in to that table.
Please correct me if I got it wrong. Is there any other solution ???
Thanks very much
kush -
How to Update crmd_customer_h TABLE Using CRMV_EVENT Through Funtion Module
Hi
How we can update customer_h table using the CRMV_EVENT Where i implemented logic below in the Funtion Module.
data: lt_doc_flow TYPE crmt_doc_flow_wrkt,
lw_cust_h_com TYPE crmt_customer_h_com,
lw_input_field_names TYPE crmt_input_field_names,
lt_input_field_names TYPE crmt_input_field_names_tab,
lt_objects_to_save TYPE crmt_object_guid_tab,
lw_guid TYPE CRMT_OBJECT_GUID.
DATA : lv_process_type TYPE crmt_process_type.
data: wa_doc_flow type CRMT_DOC_FLOW_WRK.
data: wa_customer_h type crmd_customer_h.
* Function module for retriving the Process type.
CALL FUNCTION 'CRM_ORDERADM_H_READ_OW'
EXPORTING
iv_orderadm_h_guid = iv_header_guid
IMPORTING
ev_process_type = lv_process_type
EXCEPTIONS
admin_header_not_found = 1
OTHERS = 2.
if lv_process_type eq 'ZG01'.
CALL FUNCTION 'CRM_DOC_FLOW_READ_OB'
EXPORTING
IV_HEADER_GUID = iv_header_guid
IMPORTING
ET_DOC_FLOW_WRK = lt_doc_flow.
read table lt_doc_flow with key objtype_a = 'BUS2000116' INTO wa_doc_flow. "gc_object_type-service.
if sy-subrc eq 0. "set flag for service order
lw_cust_h_com-ref_guid = wa_doc_flow-objkey_a.
lw_cust_h_com-ZZTRAIL_FLAG = 'X'.
lw_cust_h_com-mode = 'A'.
lw_cust_h_com-ref_handle = '0000000001'.
lw_guid = wa_doc_flow-objkey_a.
INSERT lw_guid INTO TABLE lt_objects_to_save.
endif.
lw_input_field_names-fieldname = 'REF_GUID'.
lw_input_field_names-fieldname = 'ZZTRAIL_FLAG'.
lw_input_field_names-changeable = ' '.
INSERT lw_input_field_names INTO TABLE lt_input_field_names.
Maintain Customer H
CALL FUNCTION 'CRM_CUSTOMER_H_MAINTAIN_OW'
EXPORTING
is_customer_h_com = lw_cust_h_com
CHANGING
ct_input_field_names = lt_input_field_names
EXCEPTIONS
header_change_error = 1
header_create_error = 2
error_occurred = 3.
ENDIF.
*endif.
*Clearing local variables
clear: lv_process_type,
lw_cust_h_com,
lw_input_field_names.
*Free internal tables
free: lt_doc_flow,
lt_input_field_names.Hi Faisal
I think your not clear with what i am saying anyhow i will again explain you my requirement
As per my requirement
1)in the service order search report i need to add a field called "Has trail order with No Follow up" with values "Yes" & "Blank"
For above Field i added using the structure CRMST_QUERY_SRVO_BTIL and through configuration i am able to display the field in webui as per (Attachement Pic 1)
2)When i search with search criteria as "Has trail order with No Follow up" with "Yes"
Then in result list i need to show the service order those having follow up as trail orders(sales order) only.if for next document trail order having any follow up then those service orders dont want to show in result list.
For above requirement i implemented F.M using CRMV_EVENT & I configured for BUS2000115 And BEFORE_SAVE The Order
The FM Will get trigger when i save the service order and for that service order if create any follow up and try to save the trail order then This FM Will trigger and in this i am doing validations.
3)Add one AET Trail Flag field is added under CUSTOMER_H Table.
4)in the FM I am validating for if the trail order having the preceding document as service order then i need to make flag as "X" For that service order in customer_h
if suppose when i delete trail order from the service order then that flag must need to be "unset" from the CUSTOMER_H.
Why bcoz we are doing above process is do show records in result list based on Flag values
these flag checks are validating in the BADI Which we implemented for search logic.
Please refer below Login for my requirement:-
Proposal to have a custom “flag” field (background at table level,
crmd_customer_h) linked to service order which gets flagged whenever at
least one Trial order is created and saved from the Service Order.
The flag value should be cleared when all the trial orders created and
saved as follow up transactions are deleted from the system.
Similarly for Trial Orders will use the same custom “flag” field
which gets activated when at least one follow up is created and saved from Trial Order.
The flag value should be cleared when all the follow up transactions from
the Trial Order are deleted from the system.
When the above search criteria “Has Trial order with no follow up”
“is” “Yes” is applied then the logic derives all the service
orders which satisfy additional search criteria applied in the search and
for these Service orders checks if the custom flag field is checked to
derive all Service orders which have Trial order. The custom flag values
values are derived from crmd_customer_h table in CRM.
4 )Further for all the Trial Orders determined in Step 3
check if the Trial Order has a follow up by checking if the custom flag field
is checked. The custom flag values are derived from crmd_customer_h table in
CRM.
5) If step 4 is not met populate the preceding Service
Orders in the Result list -
Update EKKO table for the custom field through BAPI
Hi Experts,
I need to create an Custom field in EKKO table through Include Structure.
Now I have to update that custom field in my program.
I have gone through the following but could not solve my question.
Update EKKO table
User Exit for ME21 PO Creation at the time of saving--Urgent
I don't need to update when I hit the save button or any thing
I have the PO's which needs to be updated with that field...
Any suggestions would be greatly helpful.
Thanks,
Chaithanya...
<removed_by_moderator>
Edited by: Julius Bussche on Jul 7, 2008 10:47 PMHi Patrick,
Sorry Patrick you are right.. The structure is at header level.
I have made the changes still I could not achieve it.
I have made the following
In EKKO table I have append the structure with a custom field ZZBUY.
Now I have also appended BAPI_TE_MEPOHEADER and BAPI_TE_MEPOHEADERX with the custom field
ZZBUY.
Here is my program
Data: wa_bapi_poheader type BAPIMEPOHEADER,
wa_bapi_poheaderx type BAPIMEPOHEADERX.
Data: it1_bapi_poheader like BAPI_TE_MEPOHEADER,
it1_bapi_poheaderx like BAPI_TE_MEPOHEADERX.
CALL FUNCTION 'BAPI_PO_GETDETAIL1'
EXPORTING
PURCHASEORDER = wa_DATA-ebeln
* ACCOUNT_ASSIGNMENT = ' '
* ITEM_TEXT = ' '
* HEADER_TEXT = ' '
* DELIVERY_ADDRESS = ' '
* VERSION = ' '
* SERVICES = ' '
IMPORTING
POHEADER = wa_bapi_poheader
* POEXPIMPHEADER =
TABLES
RETURN = it_bapireturn
it1_bapi_poheader-ZZBUY = 'X'.
it1_bapi_poheaderx-ZZBUY = 'X'.
it_extensionin-structure = 'BAPI_TE_MEPOHEADER'.
it_extensionin-valuepart1 = it1_bapi_poheader.
append it_extensionin.
Clear it_extensionin.
it_extensionin-structure = 'BAPI_TE_MEPOHEADERX'.
it_extensionin-valuepart1 = it1_bapi_poheaderx.
append it_extensionin.
Clear it_extensionin.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
PURCHASEORDER = wa_data-ebeln
POHEADER = wa_bapi_poheader
POHEADERX = wa_bapi_poheaderx
* POADDRVENDOR =
* TESTRUN =
* MEMORY_UNCOMPLETE =
* MEMORY_COMPLETE =
* POEXPIMPHEADER =
* POEXPIMPHEADERX =
* VERSIONS =
* NO_MESSAGING =
* NO_MESSAGE_REQ =
* NO_AUTHORITY =
* NO_PRICE_FROM_PO =
* IMPORTING
* EXPHEADER =
* EXPPOEXPIMPHEADER =
TABLES
RETURN = it_bapireturn
* POITEM =
* POITEMX =
* POADDRDELIVERY =
* POSCHEDULE =
* POSCHEDULEX =
* POACCOUNT =
* POACCOUNTPROFITSEGMENT =
* POACCOUNTX =
* POCONDHEADER =
* POCONDHEADERX =
* POCOND =
* POCONDX =
* POLIMITS =
* POCONTRACTLIMITS =
* POSERVICES =
* POSRVACCESSVALUES =
* POSERVICESTEXT =
EXTENSIONIN = it_extensionin
* EXTENSIONOUT =
* POEXPIMPITEM =
* POEXPIMPITEMX =
* POTEXTHEADER =
* POTEXTITEM =
* ALLVERSIONS =
* POPARTNER =
* POCOMPONENTS =
* POCOMPONENTSX =
* POSHIPPING =
* POSHIPPINGX =
* POSHIPPINGEXP =
* POHISTORY =
* POHISTORY_TOTALS =
* POCONFIRMATION =
It gives me messages saying that
Please also populate interface parameter POHEADERX
No data changed
Where am I going wrong..
Waiting for your replies....
Thanks,
Chaitanya -
Update LIKP table while saving the output type in VT02N transaction
Hi All,
I have a requirement where i have to update Delivery Priority(LPRIO) field in LIKP table while saving the output type in VT02N transaction. I am not able to use the BAPI "BAPI_OUTB_DELIVERY_CHANGE" or FM "WS_DELIVERY_UPDATE" because, when we save the output type the programs that are configured in NACE are triggered in update mode and hence i will get a roll back error.
Let me know other ways of updating the table at the time of saving output type for shipment transaction VT02N.This could be a result of one of the following reasons:
1: Incorrect smart form/routine assigned in the output configuration (NACE)
2: Serial number range of the delivery expired
3: The default settings of the user (SU01) processing the delivery is missing the default printer name.
Hope this is helpful
Manish -
I had an interview question that is:
How to update a table (Customer) on a server ex: Report Server with the data from the same table (Customer) From another server ex: Transaction server?
Set up steps so inset, update or delete operation takes place across the servers.
It would be great if someone please enlighten me in details about this process in MS SQL Server 2008 R2.
Also please describe would it be different for SQL Server 2012?
If so, then what are the steps?I had an interview question that is:
How to update a table (Customer) on a server ex: Report Server with the data from the same table (Customer) from another server ex: Transaction server?
Set up steps so that inset, update or delete operation gets done correctly across servers.
I was not sure about the answer, it would be great if someone please put some light on this and explain in details about this process in MS SQL Server 2008 R2.
Also it would be very helpful if you please describe would it be different for SQL Server 2012? If so, then what are the steps? -
XD02 transaction to change the customer data for updating KNA1 table?
Hi all,
How can we use XD02 transaction to change the customer data for updating KNA1 table?
Give the steps.
Thanks in advance
rkHi KR,
Why don't u use BDC to run XD02.
With Regards,
Zafar Ali -
J2ME app.: To update Oracle table by sending data through mobile phone
Hello all,
I want to develop a mobile app to update the table of oracle database by sending the data through the SMS (Short Message Service). Means I'll send a sms through my cellphone containing some data and this data will be used to update the remote oracle database. How to do that?. Plz help.
Thanx in advance.hi
My problem is here I need to update the loginfo table with the file name, count of records, table name and datetime.
For instance my dat file is XX.dat
my database table name is Mytable
Total record count is 10,00,000 records
datetime as on this date
the data in the XX.dat file I am using the controlfile (SQL*loader and dumping into the Mytable.Now my 10,00,000 records are dumped into the Mytable.
This process information I want to store it in the loginfo table. For this I need the trigger
CREATE OR REPLACE TRIGGER MYTRIGG
AFTER INSERT ON MYTABLE
Declare
V_Count Number;
Begin
Select count(*) into V_Count from Mytable;
Insert into Loginfo(TotalRecords,Date)
Values(V_Count,Sysdate);
end;
This is the trigger I have used.But in my loginfo table instead of one value as 10,00,000 it is getting each record as row by row
1
4
100
1000
10,00,000
So I need only one value to be stored and at the same time my tablename and filename must also be stored.
Kindly help me
suroop
Maybe you are looking for
-
we have 5 devices on one itunes account how do I give them each their own icloud account and still share the itunes account?
-
Error while doing Std.cost estimation.
Hallo gurus, I am facing one problem while doing Std.Cost estimation. Let me explain in detailed.. I am doing costing estimation for a Product. This product contains both Bought out Material and Customer Supplied Products.But both are coming as Mater
-
Mountain Lion install, now having hard drive issues.
Download of OS X Mountain Lion from the Mac App Store went well, but then went t install it and suddenly I have a big problem with my hard drive. Disk repair can't even solve it. All worked perfectly before this. Ugh. My MacBook Pro is now telling me
-
How can I import .doc word files into Pages from Word 2008 for Mac?
I find that if I try to insert a .doc document from the earlier version of Word for the Mac, it works fine, but if I try to insert a doc which has been saved in "compatibility mode" as a .doc in Word 2008, Pages doesn't recognise it. I didn't even kn
-
Hi all, This is about ESS - Career and Job -> my Appraisal. I have all the configuration on the Homepage Framework done for appraisal -> access using BSP. I have Portal/Webdynpro configured, where I can access other functions of ESS/MSS. What I am no