Updating CPS script tables
Hi all,
Beginner question.
What is the syntax/appropriate method to update an entry in a self-defined CPS table? I am able to insert values, but the method/syntax for updating specific columns is not clear.
Thanks to some helpful posts I have the following already that simply checks my test table ( a table defined under the scripting section as a table with a single string column called "Description") for the existence of a value that matches the key. If this is found, an update should be triggered (this fails), if not found, then an insert is done (this works).
Table table = jcsSession.getTableByName("TEST_TABLE");
String searchKey = "1000";
String key = "1000";
boolean boolFound = false;
if (table != null) {
for (Iterator it = table.getTableRowByKey(searchKey); it.hasNext();) {
TableValue tv = (TableValue)it.next();
bFound = true;
if (boolFound) {
// Updating value
jcsOut.println("Found an entry, updating");
TableValue tv = table.createTableValue();
tv.setSearchKey(key);
tv.setColumnName("DESCRIPTION");
tv.setColumnValue("Updated description");
jcsSession.persist();
else {
// Insert value
jcsOut.println("Inserting new entry");
TableValue tv = table.createTableValue();
tv.setColumnName("DESCRIPTION");
tv.setKey(key);
tv.setColumnValue("New description");
tv.setSearchKey(key);
jcsSession.persist();
Error is then:
Caused by: JCS-102313: SearchKey: 1000 can not be different than: null
If using the setKey method, the failure raised relates to a duplicate key field, asn the createTableValue() seems to be intended only to insert new values into tables.
Thanks in advance.
Edited by: JoStew on Nov 28, 2011 1:45 PM
It`s me again. I read you coding again and I'am sure I found your problem.
You have a TableValue with key 1000
String searchKey = "1000";
String key = "1000";
Table table = jcsSession.getTableByName("TEST_TABLE");
String searchKey = "1000";
String key = "1000";
boolean boolFound = false;
if (table != null) {
for (Iterator it = table.getTableRowByKey(searchKey); it.hasNext();) {
TableValue tv = (TableValue)it.next();
bFound = true;
And now you will create another Dataset with Key 1000
if (boolFound) {
// Updating value
jcsOut.println("Found an entry, updating");
TableValue tv = table.createTableValue();
tv.setSearchKey(key);
tv.setColumnName("DESCRIPTION");
tv.setColumnValue("Updated description");
jcsSession.persist();
Try something like this:
if (table != null) {
for (Iterator it = table.getTableRowByKey(searchKey); it.hasNext();) {
TableValue tv = (TableValue)it.next();
// You have found the Dataset by SearchKey and Searchkey == DatasetKey, so only one dataset will be found.
// now
tv.setColumnName("DESCRIPTION");
tv.setColumnValue("Updated description");
boolFound = true;
jcsSession.persist();
if(!boolFound)
// It`s a new Dataset
jcsOut.println("Inserting new entry");
TableValue tv = table.createTableValue();
tv.setColumnName("DESCRIPTION");
tv.setKey(key);
tv.setColumnValue("New description");
tv.setSearchKey(key);
jcsSession.persist();
}else ....
I hope this will help. I will check my coding tomorrow, but it looks ok. At the moment I haven't a SAPCPS to check it out.
Kind Regards
Marc
Similar Messages
-
10g Express Edition; Problem saving updates in Script Editor
I'm running 10g Express Edition on Windows XP Media Center with SP3 with Internet Explorer 7.
I start with 'Go to Database Home Page'.
Then take the path Home>SQL>SQL Scripts>Script Editor;
I've created a Script called HW.
I make some changes to the script
Then I click the 'Save' button.
Then I click the icon for my HW script.
But when I look at my script my updates are not there.
This does not happen all the time.
Sometimes the save seems to work, and sometimes it doesn't.
I've noticed the same thing with Run. Sometimes my changes
will appear in the script that got Run. Sometimes they won't.
Any ideas on what I need to be doing to consistently Save my
updates in Script Editor? fwiw, I like Script Editor for what I need
to do - create scripts, export them as .sql files, etc. But I'm not
opposed to using another tool to do this.
Thanks.SQL> select owner,object_type,status from all_objects where lower(object_name) = 'dbms_xdb';
select owner,object_type,status from all_objects where lower(object_name) = 'dbms_xdb'
ERROR at line 1:
ORA-01219: database not open: queries allowed on fixed tables/views only
So, I have tried the following:
->
SQL> alter database open;
alter database open
ERROR at line 1:
ORA-01507: database not mounted
SQL> alter database mount;
alter database mount
ERROR at line 1:
ORA-00205: error in identifying control file, check alert log for more info
SQL> alter database create standby controlfile as 'ora_control1' reuse;
alter database create standby controlfile as 'ora_control1' reuse
ERROR at line 1:
ORA-01507: database not mounted
I'm quite confused right now. -
Update columns in Table A based on columns in Table B for more than 500K rows
Guys,
I need to update 9 columns in table A based on value from table B for for more than 500K rows.
So what is best way to achieve this. I am thinking of writing a Procedure with cursor to update the rows of table A.
When i googled about it, they say cursor will decrease the performance. So i have no clue how to go for this.
Rough code which i though
1) Procedure with no parameter
2) Will declare 9 variable to store value from cursor
3) cursor will fetch row by row based on join condition between table a and table b
4) i will pass column values from table B to variables
5) will make an update statement for table A
Please let me know if above method is correct or is there any other way to do this without using cursor.Guys,
Below is the rough code i wrote as per my requirement. Does it look correct? As of now i dont have any platform to test it so any help with the below code is highly appreciated. As i said i need to update more than 500K rows by matching Table
A and Table B. One more thing which i would like to add in below code, is to get log of all the rows that are in table B but not exist in table A. Table A already has more than million data in it.
Also not sure how the loop in below code willl run when @rowcount is become to zero?
Please let me know if i need to consider performance related impact while running the script.
GO
SET SERVEROUTPUT ON
CREATE PROCEDURE ONETIMEUPDATE
DECLARE @cnt INT;
SET @cnt = 1;
DECLARE @MSG varchar(255);
DECLARE @COUNT_VAR INT;
SET @COUNT_VAR=0;
WHILE @cnt > 0
BEGIN
Update TOP (50000) A
Set A.Col1=B.Col1,
A.COL2=B.COL2,
A.COL3=B.COL3,
A.COL4=B.COL4,
A.COL5=B.COL5,
A.COL6=B.COL6,
A.COL7=B.COL7
From TableA A
Inner Join TableB B
on A.ID = B.ID--ID
WHERE A.Col1 <> B.Col1
OR A.Col2 <> B.Col2;
SET @cnt = @@ROWCOUNT;
IF @@ROWCOUNT=25000
@COUNT_VAR=@COUNT_VAR + @@ROWCOUNT
SELECT @MSG = CONVERT(varchar, @COUNT_VAR) + "Rows Updated" -- I WANT TO DISPLAY UPDATE after EVERY 25000 ROWS
PRINT @MSG
IF @@ROWCOUNT=0
BEGIN
COMMIT
END
WAITFOR DELAY '00:00:01' --wait for a second before the next update
END;
END; -
Updating a Base Table through a View having UNPIVOT function.
Hi,
I have a requirement of updating a Base Table through a View.
This View has the query using a UNPIVOT function for displaying the columns of the Base tables in rows.
I need to update/insert into/delete the Base Table by accessing the View (The user doesn't have an access to the Base Table, hence the DML's on the View).
Following is the table I've created:-
CREATE TABLE PERSON_DETAILS
PID VARCHAR2(10 BYTE),
FIRSTNAME VARCHAR2(1000 BYTE),
LASTNAME VARCHAR2(1000 BYTE),
PHONENUMBER VARCHAR2(1000 BYTE),
ADDRESS1 VARCHAR2(1000 BYTE),
ADDRESS2 VARCHAR2(1000 BYTE),
COUNTRY_CODE VARCHAR2(1000 BYTE),
LANGUAGE_CODE VARCHAR2(1000 BYTE),
EMAIL VARCHAR2(1000 BYTE)
)The sample values are inserted in this table through the below script:-
insert into person_details values ('1','XYZ','ABC','1234567890','India','Asia','IN','EN','[email protected]');
insert into person_details values ('2','XYZ2','ABC2','1234567890','India','Asia','IN','EN','[email protected]');The code for the view is as below:-
CREATE OR REPLACE FORCE VIEW PERSON_DETAILS_VIEW
PID,
CD_NAME,
CD_VALUE
AS
SELECT "PID", "CD_NAME", "CD_VALUE"
FROM person_details UNPIVOT INCLUDE NULLS (cd_value
FOR cd_name
IN (firstname AS 'First Name',
lastname AS 'Last Name',
phonenumber AS 'Phonenumber',
address1 AS 'address1',
address2 AS 'address2',
country_code AS 'Country Code',
language_code AS 'Language Code',
email AS 'Email') );Below are the values from the view:-
PID CD_NAME CD_VALUE
1 First Name XYZ
1 Last Name ABC
1 Phonenumber 1234567890
1 address1 India
1 address2 Asia
1 Country Code IN
1 Language Code EN
1 Email [email protected]
2 First Name XYZ2
2 Last Name ABC2
2 Phonenumber 1234567890
2 address1 India
2 address2 Asia
2 Country Code IN
2 Language Code EN
2 Email [email protected] user would fire some statement like below:-
update person_details_view
set cd_value = 'US' where CD_NAME = 'IN'The above statement should update the base table PERSON_DETAILS.
I understand I can write an INSTEAD OF trigger but I do not know what logic to write in the trigger so that the requirement gets fulfilled.
My Oracle Version
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
PL/SQL Release 11.1.0.7.0 - Production
CORE 11.1.0.7.0 Production
TNS for Solaris: Version 11.1.0.7.0 - Production
NLSRTL Version 11.1.0.7.0 - ProductionAny help would be highly appreciated.
Thank You,
Ankit Khare.
Edited by: Ankit_Khare84 on Jun 28, 2012 2:47 PMit is definitively possible with an instead of trigger.
for Example:
create or replace
TRIGGER ioft_person
INSTEAD OF UPDATE
ON person_details_view
FOR EACH ROW
declare
firstname1 person_details.firstname%type;
BEGIN
SELECT firstname_new into firstname1
FROM (SELECT pid, cd_name, cd_value
FROM
select * from person_details_view where (pid, cd_name) not in (select :new.pid, :new.cd_name from dual)
union all
select :new.pid, :new.cd_name, :new.cd_value from dual
PIVOT ( max(cd_value) AS new FOR (cd_name) IN
('First Name' AS firstname,
'Last Name' as lastname,
'Phonenumber' as phonenumber,
'address1' as address1,
'address2' AS address2,
'Country Code' as country_code,
'Language Code' as language_code,
'Email' as email
) where pid = :old.pid;
UPDATE person_details
SET firstname = firstname1
WHERE pid = :old.pid;
END ioft_role_perm;and than run
update person_details_view
set cd_value = 'X|X' where cd_name = 'First Name' and pid=1The logic is: you must convert back the view through pivoting -
Updating A child Table As Administrator
Hello Eevryone, I read a post here http://forums.adobe.com/thread/463635. And i first off want to commend you guys on your awesome contribution to novices like me. I understand the technique presented here but I have a different problem though. I have two tables, which are related by one to many. Personals Table and Courses Table. One person can have many courses. Only the Admin can update and add new courses. The Courses Table has a Foreign key: personal_Id. The admin has a view page and can update personals table easily. How can I add and update courses for a selected Person. I mean how to build the recordset in Dreamweaver CS5 so that I cant pick just that persons ID and add all course just for his account. In the technical sense how do I parse the FK_personal_Id so that the add course form or update course form only stores the course for that personal_ID on Personal Table. Please I hope you understand how I have explained it but I would love to know this procedure. Thank you very much.
You don't really want to create a recordset to update the tables. You don't mention what scripting language you are using. In ASP, you CAN create updateable recordsets, but it's really not necessary in this circumstance. You simply need to create an update statement to update the parent table, and an insert statement to insert the record into the related table when the form is posted. You can use DW's server behaviors to accomplish one or the other if you want - but not both. If I am performing a CUD on multiple tables, I would think about writing a stored procedure. Again, it depends on your DBMS. I'd suggest looking into DW Insert record and update record server behaviors to start with.
-
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 -
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 -
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
-
Error while moving objects from BMM to Presentation layer: 46036
Hi, I created some aggregate logical columns in a logical fact table in BMM . Next, I created a branch to already existing Dimensional hierarchy and used those aggregate columns in the branch hierarchy. The Original Hierarchy was using columns from 2
-
Can USB act as a video output??
*As far as I am aware:* you are able to utilize USB ports as video outputs. With a basic graphics card you can only output either: 2 separate signals for split screen from the 2 standard dvi provided outputs. OR 2 separate signals for split screen fr
-
Unable to type in the "login" keychain password
When I switch on my iMac G5 I am asked for my keychain password: but I can't type in the space provided. I can still use the computer normally, e-mail, internet etc. are all unaffected but the pop-up box asking for the keychain password won't go away
-
Suitable browser for downloading Rapidshare files ...
I use N91 mobile. I'm not in position to download Rapidshare files. I've enabled Java script in installed (part of firmware) browser, but whenever I try to download rapidshare files, it gives error message stating that 'enable Java script'. I do not
-
Moving through array backwards
Hi guys, Im new to java and i have a small query. I have an array which i have found the maximum value of using the code below. I want to be able to move back through the array(the maximum value is at rightmost element). Any suggestions as the best w