Update to VBAK table
hi Gurus ,
i am facing a very strange problem
i have update couple of z fields in master table VBAK i am writing a normal update statements
but it is not updating the value of that field and setting the sy-subrc to 4 . i am passing just the vbeln in the where clause for updating.
can anyone suggest me why my updating failing.
thanks in advance
regarsd,
khushi
Hi,
Try the both way to update the Db table.
1.
DATA wa TYPE scustom.
SELECT SINGLE *
FROM scustom
INTO wa
WHERE id = '00017777'.
wa-discount = '003'.
UPDATE scustom FROM wa.
2. UPDATE VBAK SET Zfield1 = <value> ZFIELD2 = <Value> where VBELN = <VBELN>.
Similar Messages
-
Reference field is not updating in VBAK table
Hi Experts,
I am using SD_SALESDOCUMENT_CREATE bapi for Credit Memo Creation .
but the field XBLNR is not updating in the table vbak.
Kindly help me to sort out this issue.
Thanks in advance.
In which field i should pass the value to update in the table vbak.
Regards,
Ajay.
Edited by: srinivasan12345 on Nov 14, 2011 9:21 AMHi,
follow this,may help u..
Re: Credit Memo Creation
thanks & regards. -
The currency is not getting updated in the table VBAP
Hi ,
The currency is not getting updated in the table VBAP. The currency was suppossed to be copied from the header table VBAK for a Sales Order. When the user creating a Sales Order the currency WAERK is not shown in VBAP table. VBAK-WAERk is in EUR . Does anyone know why is this happenning?
Currency is maintained in the Customer Master, Material Master and Sales Org. Any suggestions?.
Also it is happened for only one line item in a set of line items , Other line items did display the currency field.
The net Value has data in it .
The system is ECC 5.0
Regards,
SenthilDear Senthil,
Please apply the following notes (if they apply to your support pack level) and retest:
1460621 VBAP-WAERK is deleted after the sold-to party is changed
1426441 VBAP-WAERK deleted for subitems
1493998 VBAP-WAERK deleted for subitems
This should resolve the issue. I hope this helps.
Best regards,
Ian Kehoe -
Hi,
I have created an append on the tables RBKP_V and RBKP.
I am parking a vendor invoice in transaction MIR7.
I'm using the BADI BADI_FDCB_SUBBAS04 to enhance MIR7 transaction. I have followed the BADI documentation.
When I click on 'Save as completed' button :
The customer fields are not updated in the table RBKP.
Whats the solution ?
Best Regards,
Ramesh.SHi, In my opinion, some of Custom fields should move to corresponding field in user exit to update to table.
Example . you have add a field that zzabb into vbak , you should add code like move struct-zzabb to xvbak-zzabb.
**"struct" is from screen field you be inputed -
Update the custom table by using Custom Function module.
Hi Experts,
My requirement is ,
1) To create the Custom Z table with fields
vbak-vbeln
likp-vbeln
vbuk-vbeln
After creating this Z table.
2) I have to create one custom function module.
Based on this function module i have to update that Z table.
3) Before these steps i have to write down an ALV report based on the tables vbak and vbeln, in that table i have to print vbak-vbeln. and also in report i generated check box and one custom button in application toolbar. after the report will displayed , when ever i click the button in application tollbar , this function module will executed and the table will be updated.
But I developed the ALV report with custom button and check box successfully.
My doubt is how to write the function module and based on that function module how to update the table.
Please suggest me on this requirement.
Thanks in Advance.
Thanks and Regards
Srihari.HI ,
Can any one help me out on my above requiremnet..
Thanks and Regards
Srihari. -
Urgent: Customized Routine Problem: Not updating related databse tables.
Hi Gurus,
We made some changes in customized routine of pricing condition type.
Requirement :
"A" condition type which is appearing in pricing of sales order which we want to be split into Billing document i.e.in Invoice. The amount should split as per the invoiced quantity,. Earlier it was redeterminig from condition master"
Logic in routine:
"we are checking respective sales order for Invoice. From Sales order value we are finding out document condition number in VBAK table. then in KONV table for respective value we are checking "A" condition type is available or not.
If it is available we are just copying the value and depending upon the Invoiced qty, We are passing to the same condition type.
Problem:
Value is appearing in Invoice document but it is not updating the related database tables e.g. KONV for(Invoice document condition No.)Hi Gurus,
We made some changes in customized routine of pricing condition type.
Requirement :
"A" condition type which is appearing in pricing of sales order which we want to be split into Billing document i.e.in Invoice. The amount should split as per the invoiced quantity,. Earlier it was redeterminig from condition master"
Logic in routine:
"we are checking respective sales order for Invoice. From Sales order value we are finding out document condition number in VBAK table. then in KONV table for respective value we are checking "A" condition type is available or not.
If it is available we are just copying the value and depending upon the Invoiced qty, We are passing to the same condition type.
Problem:
Value is appearing in Invoice document but it is not updating the related database tables e.g. KONV for(Invoice document condition No.) -
Jython error while updating a oracle table based on file count
Hi,
i have jython procedure for counting counting records in a flat file
Here is the code(took from odiexperts) modified and am getting errors, somebody take a look and let me know what is the sql exception in this code
COMMAND on target: Jython
Command on source : Oracle --and specified the logical schema
Without connecting to the database using the jdbc connection i can see the output successfully, but i want to update the oracle table with count. any help is greatly appreciated
---------------------------------Error-----------------------------
org.apache.bsf.BSFException: exception from Jython:
Traceback (innermost last):
File "<string>", line 45, in ?
java.sql.SQLException: ORA-00936: missing expression
---------------------------------------Code--------------------------------------------------
import java.sql.Connection
import java.sql.Statement
import java.sql.DriverManager
import java.sql.ResultSet
import java.sql.ResultSetMetaData
import os
import string
import java.sql as sql
import java.lang as lang
import re
filesrc = open('c:\mm\xyz.csv','r')
first=filesrc.readline()
lines = 0
while first:
#get the no of lines in the file
lines += 1
first=filesrc.readline()
#print lines
## THE ABOVE PART OF THE PROGRAM IS TO COUNT THE NUMBER OF LINES
## AND STORE IT INTO THE VARIABLE `LINES `
def intWithCommas(x):
if type(x) not in [type(0), type(0L)]:
raise TypeError("Parameter must be an integer.")
if x < 0:
return '-' + intWithCommas(-x)
result = ''
while x >= 1000:
x, r = divmod(x, 1000)
result = ",%03d%s" % (r, result)
return "%d%s" % (x, result)
## THE ABOVE PROGRAM IS TO DISPLAY THE NUMBERS
sourceConnection = odiRef.getJDBCConnection("SRC")
sqlstring = sourceConnection.createStatement()
sqlstmt="update tab1 set tot_coll_amt = to_number( "#lines ") where load_audit_key=418507"
sqlstring.executeQuery(sqlstmt)
sourceConnection.close()
s0=' \n\nThe Number of Lines in the File are ->> '
s1=str(intWithCommas(lines))
s2=' \n\nand the First Line of the File is ->> '
filesrc.seek(0)
s3=str(filesrc.readline())
final=s0 + s1 + s2 + s3
filesrc.close()
raise finali changed as you adviced ankit
am getting the following error now
org.apache.bsf.BSFException: exception from Jython:
Traceback (innermost last):
File "<string>", line 37, in ?
java.sql.SQLException: ORA-00911: invalid character
here is the modified code
sourceConnection = odiRef.getJDBCConnection("SRC")
sqlstring = sourceConnection.createStatement()
sqlstmt="update tab1 set tot_coll_amt = to_number('#lines') where load_audit_key=418507;"
result=sqlstring.executeUpdate(sqlstmt)
sourceConnection.close()
Any ideas
Edited by: Sunny on Dec 3, 2010 1:04 PM -
Data is not getting updated in DB table
hi all
i am doing IDOC to jdbc scenario
i am triggering idoc from R/3 and the data is going into DB table
sender side: ZVendorIdoc
receiver side:
DT_testVendor
Table
tblVendor
action UPDATE_INSERT
access 1:unbounded
cVendorName 1
cVendorCode 1
fromdate 1
todate 1
Key
cVendorName 1
if i trigger idoc for example vendor 2005,2006 and 2010 data is getting updated in the table
but again if i trigger idoc for same vendor nos data does not get updated in DB table while message is successfull in moni and RWB both
plz suggest if any change need to be done to update the data
Regards
sandeep sharmaHi Ravi
you are right, vendor no is my key field . problem is when i send data again then it should Update the data but it's not updating the data again
i did on exp with this : i deleted all the record from the table and then triggered idoc for vendor 2005 , 2006,2010 after this data is updated in the table i deleted the rows for vendor no 2006 and 2010 and kept the row for vendor 2005
then i again trigered the idoc for vendor no 2005,2006 and 2010 now this should update and it should insert rows for vendor no 2006 and 2010 but i am surprised its not updating the data
Thanks
sandeep -
TDS amount not getting updated in the table under the field QBSHB
Dear Friends,
The TDS amount entered while booking the vendor invoices through MIRO T-cde, is not getting updated in the table BSEG under the field QBSHB.
Kindly let me know the reason for the same and guide me to correct it
TIA.
Regards,
VincentHI Vincent,
Bseg-QBSHB field is relavent for classic WT.
I hope you are using the EWT.
Hence if you post a document through MIRO it will not update
(but if you post document FB60 it will update but wrongly).
Reason is Miro document is posted through interface.
Hence SAP is suggested to not refer the Bseg-QBSHB and etc., fields.
refer only with_item table.
Please refer the below replay from SAP
Please refer the below note .363309
Please review attached note 363309 for detailed explanation
BSEG-QBSHB is designed to fill for the classic withholding tax. And
extended withholding tax information is stored exclusive in table
WITH_ITEM.
You can check in table BSEG for the fields and will find that system
do NOT update field BSEG-QBSHB.
In your line layout,you define a field BSEG-QBSHB. But actully the field
of vendor/customer line item is filled with zero from FI. Thus,it shows
zero in line item display.
And as note 363309 says,
"Remove the field which contains the withholding tax information
from your display variant.
If you want to display the withholding tax information, double-click on
the document number and subsequently choose 'Withholding tax' button."
(BSEG-QSSKZ, BSEG-QSSHB, BSEG-QBSHB) field is not relavent for
Extended withholding tax and not suppose to use in report FBL1N.
It basically does not make any sense to use the withholding tax fields
of the document line items (BSEG-QSSKZ, BSEG-QSSHB, BSEG-QBSHB) with the
activated extended withholding tax.
regards
Madhu M
Edited by: M Madhu on Jan 31, 2011 1:19 PM -
Can't update a sql-table with a space
Hello,
In a transaktion I'm getting some Values from a SAP-ERP System via JCO.
I update a sql-table with this values with a sql-query command.
But sometimes the values I get from SAP-ERP are empty (space) and I'm not able to update the sql-table because of a null-value exception. (The column doesn't allow null-values). It seems that MII thinks null and space are the same.
I tried to something like this when passing the value to the sql-query parameter but it didn't work:
stringif( Repeater_Result.Output{/item/SCHGT} == "X", "X", " ")
stringif( Repeater_Result.Output{/item/SCHGT} == "X", "X", " ")
this works but I don't want to have a "_"
stringif( Repeater_Result.Output{/item/SCHGT} == "X", "X", "_")
Any suggestions?
thank you.
MatthiasThe problem is Oracle doesn't know the space function. But it knows a similar function: NVL --> replaces a null value with something else. So this statement works fine for me:
update marc set
LGort = '[Param.3]',
dispo = '[Param.4]',
schgt = NVL('[Param.5]', ' '),
dismm = '[Param.6]',
sobsl = NVL('[Param.7]',' '),
fevor = '[Param.8]'
where matnr = '[Param.1]' and werks = '[Param.2]'
If Param.5 or Param.7 is null Oracle replaces it with a space in every other case it is the parameter itself.
Christian, thank you for your hint with the space function. So I remembered the NVL-function.
Regards
Matthias -
Update or delete table from XML
Is it possible to update or delete table's row from XML file?
Thanks
Prasanta DeHi Steve,
Thanks for your reply but I could not find any example from the documentation for update-request or delete-request. I need your help in this regards.
1. I have emp table with many rows and the simple structure like this
DEPTNO NUMBER(2)
EMPNO NUMBER(2)
EMPNAME VARCHAR2(20)
EMPSAL NUMBER(8,2)
Key is defined on deptno and empno
2. I have a xml file like this
<?xml version = '1.0'?>
<ROWSET>
<ROW num="1">
<DEPTNO>1</DEPTNO>
<EMPNO>11</EMPNO>
<EMPSAL>1111.11</EMPSAL>
</ROW>
<ROW num="2">
<DEPTNO>1</DEPTNO>
<EMPNO>12</EMPNO>
<EMPSAL>2222.22</EMPSAL>
</ROW>
<ROW num="3">
<DEPTNO>1</DEPTNO>
<EMPNO>13</EMPNO>
<EMPSAL>3333.33</EMPSAL>
</ROW>
</ROWSET>
3. I want that xsql servlet will read this xml file and update EMPSAL column depending upon the value of DEPTNO and EMPNO from xml file.
Please let me know how I should use update-request in xsql page.
Thanks
Prasanta De
null -
Automatic payment program (F110) document are not update in PAYR table
Hi all,
I have make payment in F110 (automatic payment) to customer
But it is not update in PAYR table
Please guide me what I have to do for documents update in PAYR table
Thanks and Regards,
PrudhviHi,
It is possible to enter multiple documents.
You can enter a list of single documents or in intervals.
Enter the document number in ascending order.
Ex:
Individual documents.
10001,10003,10011
If the documents are in a sequence you can enter the Interval like this
(10001,10011)
Hope it helps you
Regards
Andrew
Edited by: Andrew J on May 28, 2009 4:26 PM -
How does CLOSED_CODE updated in PO_LINES_ARCHIVE_ALL table
Hi,
How does CLOSED_CODE column will be updated in PO_LINES_ARCHIVE_ALL table. We have setup "Archive On Approve" for archiving.
Does below is a valid check to verify the line count between lines table and archive table?
We are comparing the line count in Lines table and Archive table, and if there is difference in count, then it is assumed to be change in the Lines,
so then direct the PO Approval Worfkflow for re-approval.
Kindly suggest if below check is correct or not, especially check on CLOSED_CODE='OPEN'.
In few cases, the lines in PO_LINES_ALL table has CLOSED_CODE = 'CLOSED' but, PO_LINES_ARCHIVE_ALL table has lines with CLOSED_CODE = 'OPEN' even after PO approval.
Is this expected behavior? When Does CLOSED_CODE will get updated in archive table?
SELECT COUNT(*)
INTO x_lines_count
FROM po_lines_all
WHERE closed_code = 'OPEN'
AND po_header_id = x_po_header_id;
SELECT COUNT(*)
INTO x_ar_line_count
from po_lines_archive_all
where closed_code = 'OPEN'
and latest_external_flag = 'Y'
and po_header_id = x_po_header_id;
IF x_lines_count <> x_ar_line_count THEN
RESULT: "Change in PO Lines";
Regards,
RamSathyaseelan wrote:
Hi All,
After creating requisition from R12 iProcurement , the column document_type_code in the table PO_REQUISITION_LINES_ALL got updated as BLANKET or CONTRACT.
Need to know how these values was defaulting in the requisition.
I am able to see the values soon after added the item to shopping cart.
Regards,
SathyaI think whatever the item is in the requistion..It should be associated with the blanket or contract agreement..that the reason why you are seeing that document type code
HTH
Mahendra -
Field TSABR is not getting updated in MHIS table.
Hi All,
The field TSABR (Scheduling Status: New Start Called) is not getting updated in MHIS table.
Please do tell me how it will get updated.
What is a logic behind it.
Many Thanks in advance.
Regards,
Sanjay TiwariHi,
I checked it my system and that field was getting updated ..
For calls with status "New start called " will get updated in MHIS and for these call you will only have the field scheduling status :planned date called " as marked . pls check
regrds
pushpa -
Excise Base amount not updated in J_1iexcdtl table -reg
Dear Gurus,
We have used SAP Ecc 5.0 Patch level 21. In patch level 20, SAP admit without delivery , can do commercial billing and excise billing in foreground. After batch update SAP not support excise invoice creation in foreground. It support only background. We have 2 senario. 1 is capex sales . ie. without material stock we have raise the comm.billing and excise billing. 2 is supplimentary billing. both the senario now getting effected because of no delivery. Asper SAP advise we have setting for background process excise invoice creation. Excise invoice created. but excise base amount not updated in j_1iexcdtl table. Using J_1I7_USEREXIT_CALC_EXC_BASE user exit we are trying to update the same. For single material it works fine. But more than one material for the first material's base amount is updated in all materials. for your reference i have mentioned the codding . SAP advise it is possible to update excise base amount. But not possible to do. pl.adivse if any correct or guide to solve it.
FUNCTION J_1I7_USEREXIT_CALC_EXC_BASE.
""Local Interface:
*" IMPORTING
*" VALUE(EXCITM_BASE) TYPE KOMV-KAWRT
*" VALUE(POSNR) TYPE VBRP-POSNR
*" EXPORTING
*" VALUE(EXCITM_BASE) TYPE KOMV-KAWRT
*" TABLES
*" KONV STRUCTURE KONV
*{ INSERT RDSK925285 1
TABLES : KONV.
data : W_INDEX LIKE SY-TABIX.
DATA :ITAB LIKE TABLE OF KONV WITH HEADER LINE.
DATA :ITAB1 LIKE TABLE OF KOmV WITH HEADER LINE.
ITAB1[] = KONV[].
DATA : BEGIN OF I_TAB OCCURS 0,
KAWRT LIKE KONV-KAWRT,
POSNR LIKE VBRP-POSNR,
END OF I_TAB.
LOOP AT ITAB1.
READ TABLE ITAB1 WITH KEY KSCHL = 'JMOD' KPOSN = ITAB1-KPOSN.
IF SY-SUBRC EQ 0.
EXCITM_BASE = ITAB1-KAWRT.
POSNR = ITAB1-KPOSN.
ENDIF.
ENDLOOP.
*} INSERT
ENDFUNCTION.
Thanks & Regards
R.Udayakumarsolved with the same user exit
Maybe you are looking for
-
OS X doesn't load after battery failure
Hi! I have a mid 2009 MacBook Pro and my battery is almost dead, today I forgot to connect my Mac to the plug and the Mac just shut down due lack of battery (i don't get my warning anymore). When I tried to boot again, it gets stuck with the Apple lo
-
Hi i have a urgent requirement in which i have to create a link in content server like administration etc. in left side for my new customised component like bex huff Hello-world component . IS it possible to create link by changes in resource.htm. pl
-
How do I open up collapsed version sets in Photoshop Elements 13?
How do you open up collapsed version sets in Photoshop 13?
-
Scripting with Aperture to select images
I am trying to create an Applescript and need a little help. It needs to read filenames from a text file and then select those images in Aperture and change their rating to 3 stars. I have the first part worked out, I think, but am having trouble get
-
I know the files were vital to iPhoto because I can't open it now. Can you restore these files?