Change field value in standard table
Hello Experts,
Could you please guide me to change i.e update field CESS value in standard table j_1irg23d.
Thanks and regards,
Sirisha
Hi sirisha,
if you want to change the value in the CESS field of j_1irg23d table. ( sales tax )
since it is a standard table dont try to do it using update ot modify statsments.. standard tables are updated using standard transaction and it is not advicable to change using abap statments..
just try to find a bapi or field module to update that field in the j_1irg23d table.
1) To find a bapi or function module just do a whereused list on the table name you may get some fms or bapi
2) check the forum you may get some links on it..
Regards
Satish Boguda
Similar Messages
-
Please Help, I want to change field value in a table, based on another field value in the same row (for each added row)
I am using this code :
<HTML>
<HEAD>
<SCRIPT>
function addRow(tableID) {
var table = document.getElementById(tableID);
var rowCount = table.rows.length;
var row = table.insertRow(rowCount);
var colCount = table.rows[0].cells.length;
for(var i=0; i<colCount; i++ ) {
var newcell = row.insertCell(i);
newcell.innerHTML = table.rows[1].cells[i].innerHTML;
switch(newcell.childNodes[0].type) {
case "text":
newcell.childNodes[0].value = "";
break;
case "checkbox":
newcell.childNodes[0].checked = false;
break;
case "select-one":
newcell.childNodes[0].selectedIndex = 0;
break;}}}
function deleteRow(tableID) {
try {var table = document.getElementById(tableID);
var rowCount = table.rows.length;
for(var i=0; i<rowCount; i++) {
var row = table.rows[i];
var chkbox = row.cells[0].childNodes[0];
if(null != chkbox && true == chkbox.checked) {
if(rowCount <= 2) {
alert("Cannot delete all the rows.");
break;}
table.deleteRow(i);
rowCount--;
i--;}}}catch(e) {alert(e);}}
</SCRIPT>
</HEAD>
<BODY>
<INPUT type="button" value="Add Row" onClick="addRow('dataTable')" />
<INPUT type="button" value="Delete Row" onClick="deleteRow('dataTable')" />
<TABLE id="dataTable" width="350px" border="1">
<TR>
<TD width="32"></TD>
<TD width="119" align="center"><strong>Activity</strong></TD>
<TD width="177" align="center"><strong>Cost</strong></TD>
</TR>
<TR>
<TD><INPUT type="checkbox" name="chk"/></TD>
<TD>
<select name="s1" id="s1">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</TD>
<TD><input type="text" name="txt1" id="txt1"></TD>
</TR>
</TABLE>
</BODY>
</HTML>Hi,
Let me make sure u r working with table control.
First u have to create a event(VALIDATE) to do the validation.
Inside the event,
1. First get the current index where user has pointed the curson
2. Once u get the index read the internal table with index value.
3. Now u can compare the col1 and col2 values and populate the error message.
1. DATA : lo_elt TYPE REF TO if_wd_context_element,
l_index type i.
lo_elt = wdevent->get_context_element( name = 'CONTEXT_ELEMENT' ).
CALL METHOD LO_ELT->GET_INDEX( RECEIVING MY_INDEX = l_index.
above code should be written inside the event.
Thanks, -
How to populate custom table field value into standard DFF
Hi Gurus
I am newbie to the OAF
I have a requirement to populate the custom table field value into standard DFF. we enabled the DFF in ReqDistDFFOnAcct(po_req_distributions_all). On the requisition tab as soon as i click on the checkout button, the custom field value has to be shown in the requisition distributions DFF field along with the standard Columns like charge account, percent, qty and when we click on the next button, it has to hit the base table ie., po_req_distributions_all.
the standard columns data is showing the screen. how to acheive this requirement programatically
There is a EO for the req distributions table. please help me how to achevie this requirement.
Any help woud be greatly appreciated.
Thank You!
KrishnaThanks Aj. Finally i made some progress....but i am getting an error in the inst_top OPMN folder 10/10/08 15:37:14 Error: <connector name="OracleASjms" path="OracleASjms.rar" /> will not be bootstrapped since corresponding module declaration was not found in application.xml. I cleared the cache, bounced the webserver. Could not able to understand what is this error
Following is the code that i have written. I am not able to find out what is the error. please help me how to fix this error. there is no changes in the page and the value is not auto populating. the page is having the normal behaviour as the standard one.
Thanks in Advance for your help...
public class xxCheckoutDistsCO extends CheckoutDistsCO
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
super.processRequest(pageContext, webBean);
String UnitId="";
//First get the Application Module
OAApplicationModule am = pageContext.getApplicationModule(webBean);
OAViewObject vo = (OAViewObject)am.findViewObject("PoRequisitionLinesVO");
String Reqlineid="";
String Linenum="";
String DeliverLoc="";
if(vo.first() !=null)
Reqlineid= vo.first().getAttribute("RequisitionLineId").toString();
Linenum = vo.first().getAttribute("LineNum").toString();
DeliverLoc = vo.first().getAttribute("DeliverToLocationId").toString();
// if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
// pageContext.writeDiagnostics("TEST >", Reqlineid,1);
// pageContext.writeDiagnostics("TEST >", Linenum,2);
// pageContext.writeDiagnostics("TEST >", DeliverLoc,3);
UnitId=null;
String Querry="select amli_icx_oaf_utils.get_blding_unit_id (?,?,?) from dual";
try
PreparedStatement ps=am.getOADBTransaction().getJdbcConnection().prepareStatement(Querry);
ps.setInt(1,Integer.parseInt(Reqlineid));
ps.setInt(2,Integer.parseInt(Linenum));
ps.setInt(3,Integer.parseInt(DeliverLoc));
ResultSet rs=ps.executeQuery();
// ps.execute();
// am.getOADBTransaction().commit();
while (rs.next())
System.out.println(" Query Results ");
UnitId= rs.getString(1);
System.out.println(" first > ");
rs.close();
ps.close();
catch(SQLException a)
System.out.println(" Error "+a);
System.out.println(" Second > ");
System.out.println(" Third > "); ----the program is executing upto here...it is not setting the value after this.
OAViewObject povo = (OAViewObject)am.findViewObject("PoReqDistributionsVO");
if(povo.getCurrentRow()!=null ) --------If i remove this condition i am getting the nullpointer exception in page.....
System.out.println(" Fourth > ");
povo.getCurrentRow().setAttribute("Attribute12",UnitId);
// if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
// pageContext.writeDiagnostics("TEST >", UnitId, 1);
Thanks
krishna -
How to change the lenth of existing field in sap standard table
Hi all,
can anybody help,my requirement is, how to change the length of existing field in sap standard table....
thanks in advance..Which field are you thinking of in particular? Are you wanting to increase or decrease the length?
Some fields are used so extensively that a change to their length will mean adjusting many tables, some of them potentially very large, and hence taking a long time to adjust.
Some standard SAP programs expect certain fields to be of specific lengths and won't work if the length is changed.
Some screens could cease to work.
If you decrease length, then you could lose data.
matt -
Creating a custom change document for a standard table field
Hi
Is it possible to create a change document for a field in a standard table?
I have searched the forum and only found threads about creating change document to a custom table.
Will the creation of change documents to a standard SAP table be a modification?
Thanks.
Regards
Sowbhagya.LYes it will be a modification on standard table, but you can always create change document for any field by assigning it to custom change object.
Regards,
Krishna. -
How to change default value in a table using ALTER TABLE
Hi,
How to change default value in a table
I have a table TEST which has 2 fields CODE of Datatype VARCHAR2(10) and Indicator as VARCHAR2(1).
I want to change the default value using ALTER TABLE TEST of field Indicator to 'I'.
Any help will be needful for me
Thanks and Regardsuser598986 wrote:
Hi,
How to change default value in a table
I have a table TEST which has 2 fields CODE of Datatype VARCHAR2(10) and Indicator as VARCHAR2(1).
I want to change the default value using ALTER TABLE TEST of field Indicator to 'I'.
ALTER TABLE test
MODIFY (indicator DEFAULT 'I');
Incidentally, INDICATOR is a keyword in Oracle, so you may have problems using it as a column name. If so, you'll have to enclose the column name in double-quotes, and be careful to use capital letters inside the quotes.
Edited by: Frank Kulash on Aug 26, 2009 11:42 AM -
Modify the Field Type of standard Table fields in a Query
Hello. I have a question.
Is there a way to "modify" the field type for standard table fields that are included in a Query?
I made a simple query out of a join of tables, but several fields have a lot of decimals, and I would like to present them in the query without any decimals, just as a regular "N" field.
I tried the possibility of creating extra local fields where all I do is transfer the value to the new "N" field, but I have many fields like this, so if there's a better way; I'd prefer that.
Maybe somewhere in the InfoSet there's a way to modify the type of the standard table fields?
Thank you.Hi,
This document may help you out.
[http://help.sap.com/saphelp_erp60_sp/helpdata/en/d2/cb4468455611d189710000e8322d00/frameset.htm|http://help.sap.com/saphelp_erp60_sp/helpdata/en/d2/cb4468455611d189710000e8322d00/frameset.htm]
Cheers, -
How to get the object class field value in CDHDR table for vendor
hi
how to get the object class field value in CDHDR table for vendorTry KRED/KRED_N as object class in CDHDR for Vendor.
-
Sending custom field added in Standard table through idoc
Hello Folks,
We have a requirement where custom field of a standard table PA0002 needs to be sent through idoc only to a desired destination system.
My Approach:
I have created a custom segment having custom field from PA0002 & mapped this segment in T777D table.
But the problem with above, is all the system who are receiving PA0002 will be receiving this custom segment also including desired system.
How can it be filtered?Hi,
In BD64 you can do the segment level filtering. Go to BD64, search for your distribution model there drill down to "filter settings" the make the required segment filtering.
Thanks,
Asit Purbey. -
Processing on change of field values in internal table
I have a internal table eg
id type keyword
1 1 report
1 1 program
n02 4 event
n02 5 loop
n03 6 call
n03 6 do
No when even id changes from 1 to n02...i want to write " id id 1' similarily wenever id changes from n02 to n03 then id is " id is n02" and so on
How can do some sequential processing on change of field values in internal tablehi,
This code will resolve your purpose.
DATA:
BEGIN OF t_tab OCCURS 0,
int TYPE c,
str TYPE char10,
var TYPE char3,
END OF t_tab.
t_tab-var = '1'.
t_tab-int = 1.
t_tab-str = 'report'.
APPEND t_tab.
t_tab-var = '1'.
t_tab-int = 1.
t_tab-str = 'program'.
APPEND t_tab.
t_tab-var = 'n02'.
t_tab-int = 4.
t_tab-str = 'event'.
APPEND t_tab.
t_tab-var = 'n02'.
t_tab-int = 5.
t_tab-str = 'loop'.
APPEND t_tab.
t_tab-var = 'n03'.
t_tab-int = 6.
t_tab-str = 'call'.
APPEND t_tab.
t_tab-var = 'n03'.
t_tab-int = 6.
t_tab-str = 'do'.
APPEND t_tab.
LOOP AT t_tab.
ON CHANGE OF t_tab-var.
WRITE:
/ 'id' ,t_tab-var, t_tab-int.
ENDON.
ENDLOOP.
Thanks and regards
Sharath -
How to add value in standard table
Hi
i need to add one field in standard table VBAK so i have added one field ( for eg i have added status as field in VBAK ) in that standard table through append structure
than i used one user exit USEREXIT_SAVE_DOCUMENT_PREPARE in program MV45AFZZ
in this i get values in the structure XVBAK
than i moved the 'X' in that status field shown below
XVBAK-STATUS = 'X' .
after that sales order get generated
but when i open table VBAK and enter that VBELN or sales order no. i dont find any value in that status
so pls tell how can i find value of that field in table VBAK .
Thanks
Taranafter moving the value did u append the table.
Check it. -
Modify Key Field Values of a table through Table Maintenance Generator
Hi All,
I have created a z table with below structure. In this fields upto Valid To are all key fields. This is to ensure that consistant valid record get stored in the table.
MANDT MANDT CLNT 3 0 Client
VKORG VKORG CHAR 4 0 Sales Organization
VTWEG VTWEG CHAR 2 0 Distribution Channel
SPART SPART CHAR 2 0 Division
SKU MATNR CHAR 18 0 Material Number
LZONE LZONE CHAR 10 0 Transportation zone to or from which the goods are delivered
VALID_FROM ZVALID_FROM DATS 8 0 Valid From
VALID_TO ZVALID_TO DATS 8 0 Valid To
PLANT WERKS_D CHAR 4 0 Plant
SNP_TZONE ZSNP_TZONE CHAR 20 0 APO Transportation Zone
ERDAT ERDAT DATS 8 0 Date on Which Record Was Created
ERNAM ERNAM CHAR 12 0 Name of Person who Created the Object
AEDAT AEDAT DATS 8 0 Changed On
AENAME AENAME CHAR 12 0 Last changed by
I have created a Table Maintance program through the Table Maintenance Generator. And for that I have assigned a t code.
I can able to create new entires but i can not able to modify Valid_from and Valid_to entries of existing records.
Initially those two fields were in display mode but i went to its module pool program and made then as input enabled. But what the vales I was entering, its not getting saved in database. When we change the values of those fields and save it, the system is saying No Data Change.
Any inputs how to solve this issue. I can not make VALID_FROM and VALID_TO fields as non key.
Regards,Hi,
As you have already said that the value for valid to is a part of the key so you should not have any issues when this value is changed and the value is saved using the table maintainence generator, but in case you want to save values where the value for valid from has changed but the key is same we would not be able to save as there is already a value for the key, so if you want to save these values there are two ways 1 would either to delete the existing value value and create the new value or to have one more field as the key field like a counter so when the value is saved with a key the value is saved with counter as 1 and then ever next time for the new values increase the value of the counter.
In order to save these values use event 5 and put you code there.
You can also carry out checks for new aithorization in that event also.
Regards,
Himanshu -
COR1 create process order change field value when save(PPCO0001)
Dears
When tcode: COR1 create process order, i want to change some fields value on the tab: "Goods Recpt", for example the field: Goods Recipient: , anyone konws how to do this? now i am trying to using the exit: PPCO0001( EXIT_SAPLCOBT_001)
in thie eixt tables POSITION_TABLE : has this field: WEMPF (Goods Recipient) , i add some coding to change this field and save , but the change is not affect on the order . that is when open the order just create , this field is still empty.
do i need some other process or call some other functions or some other exit to do this?
thanks a lot for your posting.
Edited by: Jackyguoguo on Mar 11, 2010 3:51 AM
Edited by: Jackyguoguo on Mar 11, 2010 4:21 AM1. Use BADI: WORKORDER_UPDATE--> Method: BEFORE_UPDATE
2. Use ASSIGN "(SAPLCOBT)AFPO_BT[]" statement to access and modify the desired fields.
Regards,
Suraj -
Using ADF Security user in role context to change field value
Hi I was wondering if it was possible to change an input text field value depending on the ADF authentication login values.
So if the user in role is manager value is dino2dy if it's Boss its Frank Nimphius.
My idea is that I want the field user to be read only so no one could change it, but since it's a foreign key in the table I need to have values in it for committing to the database.
Since different users will be accessing the application I want every user to have his user name automatically entered into a read only field. Then commit that value into the database.
I have ran into some problems so far, as if I put in a straightforward value in a field, and make it read only, when committing I get an error User field needed. As if the field is empty even though I can see the value on the page.
Hope you guys can helpYeah I have tried that but I can only use it for true or false values, I do not know how to use it to change a value. I ve used it to make something read only or disabled depending on the user in role.
It still wont work if I change the value in the field. It has to be the database value thing in there. As soon as I change it it starts giving me the you need Korisnik error. But I cant put it as a default value in the database because it defeats the purpose. -
How to get custom field value in vbkd table using "SD_SALESDOCUMENT_CREATE" bapi
Hi Experts,
Need your help . In one program Iam using SD_SALESDOCUMENT_CREATE bapi .
i/p for my report is am excel.
excel is having below formatt.
To create salesdoc we are using SD_SALESDOC_CREATE bapi.
but After execution of the program we are unable to find the ZZFV_SBCNT (which is custom field) in VBKD w.r.t salesdocument.
Need your help what we need to do to reflect the value in vbkd table.
Here temp will contains the data from excel
1)
FORM f_move_header_data .
wg_header-doc_type = wg_temp-auart . "Order type
wg_header-sales_org = wg_temp-vkorg . "Sales Organization
wg_header-distr_chan = wg_temp-vtweg . "Distribution Channel
wg_header-division = wg_temp-spart. "Division
wg_header-sales_off = wg_temp-vkbur . "Sales Office
wg_header-sales_grp = wg_temp-vkgrp . "Sales Group
wg_header-purch_no_c = wg_temp-bstnk . "Customer purchase order number
wg_header-pymt_meth = wg_temp-zlsch . "Payment Method
wg_header-zzychan_role = wg_temp-zzychan_role_i. "Channel Role
wg_header-zzysub_role = wg_temp-zzysub_role . "Submitter Role
wg_header-zzy_inv_for_opt = wg_temp-zzinv_format . "Invoice Format Optio
wg_header-ord_reason = wg_temp-augru . "Order Reason Code
wg_header-bill_block = wg_temp-faksp. "Billing Block
wg_headerx-doc_type = c_set . "Order type
wg_headerx-sales_org = c_set . "Sales Organization
wg_headerx-distr_chan = c_set . "Distribution Channel
wg_headerx-division = c_set. "Division
wg_headerx-sales_off = c_set . "Sales Office
wg_headerx-sales_grp = c_set . "Sales Group
wg_headerx-purch_no_c = c_set . "Customer purchase order number
wg_headerx-pymt_meth = c_set . "Payment Method
wg_headerx-zzychan_role = c_set. "Channel Role
wg_headerx-zzysub_role = c_set . "Submitter Role
wg_headerx-zzy_inv_for_opt = c_set . "Invoice Format Option
wg_headerx-ord_reason = c_set . "Order Reason Code
wg_headerx-bill_block = c_set. "Billing Block
ENDFORM. " F_MOVE_HEADER_DATA
2)
FORM f_move_item_data .
wg_item-itm_number = g_itmnumber. "Item number
wg_item-material = wg_process-matnr . "Material
wg_item-target_qty = wg_process-target_qty. "Targeted Qty
wg_item-item_categ = wg_process-pstyv. "Sales document item category
wg_item-zzylegal_i = wg_process-zzlegal. "Legal Contract
**********Added this line for vbkd-ZZFV_SBCNT****************************
wg_item-zzfv_sbcnt = wg_process-zzfv_sbcnt.
APPEND wg_item TO i_item.
wg_itemx-material = c_set . "Material
wg_itemx-target_qty = c_set. "Targeted Qty
wg_itemx-item_categ = c_set. "Sales document item category
wg_itemx-zzylegal_i = c_set. "Legal Contract
wg_itemx-zzsteady_date = c_set . "Amortization Start Date
wg_itemx-zzsteady_end_dat = c_set. "Amortization Stop Date
**********Added this line for vbkd-ZZFV_SBCNT****************************
wg_itemx-ZZFV_SBCNt = c_set. "
APPEND wg_itemx TO i_itemx.
CLEAR : wg_itemx.
endform.
3)
FORM f_move_head_ext
wg_extension-structure = c_ext_vbak.
wg_ext_vbak-zzinv_format = wg_temp-zzinv_format.
wg_ext_vbak-zzychan_role = wg_temp-zzychan_role_i.
wg_ext_vbak-zzysub_role = wg_temp-zzysub_role.
wg_extension+30 = wg_ext_vbak.
APPEND wg_extension to i_extension.
CLEAR wg_extension.
wg_extensionx-structure = c_ext_vbakx.
wg_ext_vbakx-zzinv_format = c_set.
wg_ext_vbakx-zzlegal = c_set.
wg_ext_vbakx-zzychan_role = c_set.
wg_ext_vbakx-zzysub_role = c_set.
wg_extensionx+30 = wg_ext_vbakx.
APPEND wg_extensionx TO i_extensionx.
CLEAR wg_extensionx.
ENDFORM. " F_MOVE_HEAD_EXT
*& Form F_MOVE_ITEM_EXT
* Item Extension
4)
FORM f_move_item_ext .
* Structure for BAPI parameter Extension
wg_extension-structure = c_ext_vbap.
wg_ext_vbap-posnr = g_itmnumber.
wg_ext_vbap-zzsteady_date = wg_process-zzsteady_date . "Amortization Start Date
wg_ext_vbap-zzsteady_end_dat = wg_process-zzsteady_end_dat. "Amortization Stop Date
wg_ext_vbap-zzlegal = wg_process-zzlegal. "Legal Contract
wg_extension+30 = wg_ext_vbap.
APPEND wg_extension to i_extension.
* Structure for BAPI parameter Extension - Update Indicator Fields
wg_extensionx-structure = c_ext_vbapx.
wg_ext_vbapx-posnr = g_itmnumber.
wg_ext_vbapx-zzsteady_date = c_set .
wg_ext_vbapx-zzsteady_end_dat = c_set.
* wg_ext_vbapx-zzlegal = c_set.
*wg_process-zzfv_sbcnt = c_set.
wg_extensionx+30 = wg_ext_vbapx.
APPEND wg_extensionx TO i_extensionx.
CLEAR wg_extensionx.
and bapi calling is like below.
CALL FUNCTION 'SD_SALESDOCUMENT_CREATE'
EXPORTING
sales_header_in = wg_header
sales_header_inx = wg_headerx
logic_switch = wg_logic_switch
business_object = fp_bus_obj
status_buffer_refresh = 'X'
IMPORTING
salesdocument_ex = g_sorder
TABLES
return = i_return
sales_items_in = i_item
sales_items_inx = i_itemx
sales_partners = i_partner
sales_conditions_in = i_cond
sales_conditions_inx = i_condx
sales_text = i_text
extensionin = i_extension
extensionex = i_extensionx.
still we are not getting ZZFV_SBCNT value in VBKD table w.r.t created salesdoc(g_sorder)
Please help me from this issue.
Thank You..Hi,
Please let me know how to add custom fields in the characteristic list, My clients wants department and profit center grouping.
Please tell me how to solve it..
Thanks & Regards,
Reena..
Maybe you are looking for
-
PR Created with reference to Work Order
Dear Experts, We have Work Order Process where Purchase Requisition for Material & Services are created with reference to Work Order . We have chosen the Option (from release), which means PR is created once the Order is released. Our requirement is
-
Change XSD / XML dataset during runtime and display texts in field explorer
Hi there, I am changing the datasource of a report during runtime. Afterwards, I would like to change the texts of the fields appearing in the field explorer. I tried: CrystalDecisions.ReportAppServer.DataDefModel.XMLDataSetClass xmlDS = new CrystalD
-
WebLogic on Linux...
Hello, I am interested in knowing the status of WebLogic on Linux. I've heard there are some problems with multi-threading on Linux, limiting the performance of WebLogic. Any truth to this? Are many people using it? Jason Jason Rosenberg SquareTrade
-
house my issue is 1. after creating an inventory document, adding materials to this doc is streeful i have to add them 1 after the other is they no other way of selecting all the materials
-
Alert and Approval by Using DIAPI
Hi, I am creating a Purchase Order by using the DIAPI the current user is non-super user.In that company we defined approval templates for the user...But the alert and approval is not happening automatically when i am creating PO through DIAPI . Pls