How to insert into dln3 automaticaly (delivery notes - expenses)
Hellow experts!!!
I have a problem, i'm progamming an add-on that i want to insert automaticly a row into dln3. I have declare a SAPbobscom.Documents and after like a SAPbobsCOM.BoObjectTypes.oDeliveryNotes and i access to dln3 like this:
If oDln3.GetByKey(oRST.Fields.Item("DocEntry").Value) Then
oDln3.Expenses.SetCurrentLine(0)
oDln3.Expenses.BaseDocEntry = oRST.Fields.Item("DocEntry").Value
oDln3.Expenses.ExpenseCode = "8"
oDln3.Expenses.LineTotal = (oMinKGB - oKGB) * oDiferencia
oKGB = oDln3.Expenses.add
If oKGB <> 0 Then
oApplication.MessageBox("ERROR")
End If
End If
I don't have an error, but the add-on don't insert any row into dln3 and i don't know where is inserting the fields...
I hope someone can help me!!!
THANK'S!!!!!!
Very helpfull answer, THANK'S A LOT!!!
Similar Messages
-
How to from more than one delivery note - conversion into one invoice
Dear Experts,
How to from more than one delivery note - conversion into one invoice?
Thanks and best regards,
Wilson HongDear Wilson Hong,
Single invoice for multiple deliveries will takes place based on these criterion
1.If you want single billing document for multiple deliveries these data should be same in all order for all items.
-> Payer
-> Inco term
-> Payment term
-> Actual GI Date from Delivery
-> Shipping Condition
-> Account Assignment Group
-> Exchange rate (in case of export sale order)
-> Foreign trade data.
2.In addition to this you need to maintain proper copy control settings between delivery and invoice.
Go to VTFL transaction input your delivery type and invoice type then go in to the item level settings here you find field Data VBRK/VBRP maintain this field with routine 3-Single invoice.
If the above data and settings are exists you can do single invoice for multiple deliveries.
I hope this will help you,
Regards,
Murali. -
How to insert into more than one table at a time also..
hi,
i am a newbee.
how to insert into more than one table at a time
also
how to get a autoincremented value of an id say transactionid for a particular accountid.
pls assume table as
transactionid accountid
101 50
102 30
103 50
104 35
i want 102 for accountid 30 and 103 for accountid 50.
thank u@blushadow,
You can only insert into one table at a time. Take a look here :
Re: insert into 2 tables
@Raja,
I want how to extract the last incremented value not to insert.Also, I don't understand your thread title... which was "how to insert into more than one table at a time also.. "
Insert, extract... ? Can you clarify your job ?
Nicolas. -
How to insert into a table with a nested table which refer to another table
Hello everybody,
As the title of this thread might not be very understandable, I'm going to explain it :
In a context of a library, I have an object table about Book, and an object table about Subscriber.
In the table Subscriber, I have a nested table modeling the Loan made by the subscriber.
And finally, this nested table refers to the Book table.
Here the code concerning the creation of theses tables :
Book :
create or replace type TBook as object
number int,
title varchar2(50)
Loan :
create or replace type TLoan as object
book ref TBook,
loaning_date date
create or replace type NTLoan as table of TLoan;
Subscriber :
create or replace type TSubscriber as object
sub_id int,
name varchar2(25)
loans NTLoan
Now, my problem is how to insert into a table of TSubscriber... I tried this query, without any success...
insert into OSubscriber values
*(1, 'LEVEQUE', NTLoan(*
select TLoan(ref(b), '10/03/85') from OBook b where b.number = 1)
Of course, there is an occurrence of book in the table OBook with the number attribute 1.
Oracle returned me this error :
SQL error : ORA-00936: missing expression
00936. 00000 - "missing expression"
Thank you for your help1) NUMBER is a reserved word - you can't use it as identifier:
SQL> create or replace type TBook as object
2 (
3 number int,
4 title varchar2(50)
5 );
6 /
Warning: Type created with compilation errors.
SQL> show err
Errors for TYPE TBOOK:
LINE/COL ERROR
0/0 PL/SQL: Compilation unit analysis terminated
3/1 PLS-00330: invalid use of type name or subtype name2) Subquery must be enclosed in parenthesis:
SQL> create table OSubscriber of TSubscriber
2 nested table loans store as loans
3 /
Table created.
SQL> create table OBook of TBook
2 /
Table created.
SQL> insert
2 into OBook
3 values(
4 1,
5 'No Title'
6 )
7 /
1 row created.
SQL> commit
2 /
Commit complete.
SQL> insert into OSubscriber
2 values(
3 1,
4 'LEVEQUE',
5 NTLoan(
6 (select TLoan(ref(b),DATE '1985-10-03') from OBook b where b.num = 1)
7 )
8 )
9 /
1 row created.
SQL> select *
2 from OSubscriber
3 /
SUB_ID NAME
LOANS(BOOK, LOANING_DATE)
1 LEVEQUE
NTLOAN(TLOAN(000022020863025C8D48614D708DB5CD98524013DC88599E34C3D34E9B9DBA1418E49F1EB2, '03-OCT-85'))
SQL> SY. -
How to insert a blank value in not nul column using transform activity
can anyone help me on how to insert blank values in a not null column using transform activity or however possible..This is a requirement in my project ..
vidya
In DB adapter or-mappings.xml , did you made any changes. If not the open that file in any notepad editor and change the following
<attribute-mapping xsi:type="direct-mapping">
<attribute-name>director</attribute-name>
<field table="MYTABLE" name="MAKE_IT_BLANK_NOT_NULL" xsi:type="column"/>
<attribute-classification>java.lang.String</attribute-classification>
</attribute-mapping>You can try to add this:
<attribute-mapping xsi:type="direct-mapping">
<attribute-name>director</attribute-name>
<field table="MYTABLE" name="MAKE_IT_BLANK_NOT_NULL" xsi:type="column"/>
<null-value></null-value>
<attribute-classification>java.lang.String</attribute-classification>
</attribute-mapping>Refer below link for details
Re: Insertion of Blank value to a Not Null varchar column in SQL server table
Thanks
AJ -
How to insert into a table in database1 from a table in database2?
hi!
how to insert into a table in database1 from a table in
database2?
can anyone help?
Tariq.using the EXEC_SQL package.
see form help for detail.
Regards. -
How to insert into a table from 3 tables?
Hello,
How to insert into a table getting values from 3 different tables?
For example table_A has col_1 to col_10.
I want to insert into table_A,
values: col_1 to col_4 are from table_B,
col_5 is from table_C,
col_6 to col_10 are from table_D.
Thanks!Normally, you'd do this by joining B, C, and D together. In the simplest case, something like
INSERT INTO A( col1, ... col10 )
SELECT B.col1, ..., B.col4,
C.col5,
D.col6, ..., D.col10
FROM B,
C,
D,
WHERE B.someKeyColumn = C.someKeyColumn
AND C.anotherKeyColumn = D.anotherKeyColumnYou'd have to know how the data in B, C, and D relate to fill in the WHERE clause. This basically tells Oracle how to match the data in a particular row in B with the data in a particular row in C with the data in a particular row in D.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
How to insert into two differents tables at the same time
Hi
I'm newer using JDev, (version 3.1.1.2 cause the OAS seems to support just the JSP 1.0)
and I want to insert into two differents tables at the same time using one view.
How can I do that ?
TIA
EdgarOracle 8i supports 'INSTEAD OF' triggers on object views so you could use a process similar to the following:
1. Create an object view that joins your two tables. 'CREATE OR REPLACE VIEW test AS SELECT d.deptno, d.deptname, e.empname FROM DEPT d, EMP E'.
2. Create an INSTEAD OF trigger on the view.
3. Put code in the trigger that looks at the :NEW values being processed and determines which columns should be used to INSERT or UPDATE for each table. Crude pseudo-code might be:
IF :NEW.deptno NOT IN (SELECT deptno FROM DEPT) THEN
INSERT INTO dept VALUES(:NEW.deptno, :NEW.deptname);
INSERT INTO emp VALUES (:NEW.deptno, :NEW.empname);
ELSE
IF :NEW.deptname IS NOT NULL THEN
UPDATE dept SET deptname = :NEW.deptname
WHERE deptno = :NEW.deptno;
END IF;
IF :NEW.empname IS NOT NULL THEN
UPDATE emp SET empname = :NEW.empname
WHERE deptno = :NEW.deptno;
Try something along those lines.
null -
How to insert into 2 tables from the same page (with one button link)
Hi,
I have the following 2 tables....
Employees
emp_id number not null
name varchar2(30) not null
email varchar2(50)
hire_date date
dept_id number
PK = emp_id
FK = dept_id
Notes
note_id number not null
added_on date not null
added_by varchar2(30) not null
note varchar2(4000)
emp_id number not null
PK = note_id
FK = emp_id
I want to do an insert into both tables via the application and also via the same page (with one button link). I have made a form to add an employee with an add button - adding an employee is no problem.
Now, on the same page, I have added a html text area in another region, where the user can write a note. But how do I get the note to insert into the Notes table when the user clicks the add button?
In other words, when the user clicks 'add', the employee information should be inserted into the Employees table and the note should be inserted into the Notes table.
How do I go about doing this?
Thanks.Hi,
These are my After Submit Processes...
After Submit
30 Process Row of NOTES Automatic Row Processing (DML) Unconditional
30 Process Row of EMPLOYEES Automatic Row Processing (DML) Unconditional
40 reset page Clear Cache for all Items on Pages (PageID,PageID,PageID) Unconditional
40 reset page Clear Cache for all Items on Pages (PageID,PageID,PageID) Unconditional
40 reset page Clear Cache for all Items on Pages (PageID,PageID,PageID) Unconditional
40 reset page Clear Cache for all Items on Pages (PageID,PageID,PageID) Unconditional
50 Insert into Tables PL/SQL anonymous block Conditional
My pl/sql code is the same as posted earlier.
Upon inserting data into the forms and clicking the add button, I get this error...
ORA-06550: line 1, column 102: PL/SQL: ORA-00904: "NOTES": invalid identifier ORA-06550: line 1, column 7: PL/SQL: SQL Statement ignored
Error Unable to process row of table EMPLOYEES.
Is there something wrong with the pl/sql code or is it something else? -
How to INSERT into table using CORRELATED subquery
I have 3 tables:
1.TEMP_PHONE(person_id, phonenumber, phone_type) - this holds all phone numbers relating to a person(just a temporary holding area)
2.PHONE_CONNECT(PERSON_ID, PHONE_ID) this table shows all the phone numbers relating to an individual. Phone_id is a unique number to identify a phonenumber and type(cell, work, home) - so in this table a person can have multiple phone ids)
3.MASTER_PHONE(PHONE_ID, PHONENUMBER, PHONE_TYPE) this is a master phone table. each combination of phone number and type has a unique identifier-phone_id.
What i need to figure out is how to populate PHONE_CONNECT with the information from TEMP_PHONE IF PERSON_ID already exists but phone_id is different. In other words, if the person gets a new phone number, i need to insert a new row into phone_connect.
Before that step is started, the master_phone is populated first with a new phone_id associated to the phonenumber/type
any help would be much appreciated. Thanks in advance.
So far, this is what i have come up with, but not sure if it makes sense:
insert into phone_connect(person_id)
select a.person_id
from temp_phone a
where
person_id = (select b.person_id from phone_connect b, master_phone c
where
a.person_id=b.person_id
and b.phone_id <> c.phone_id
and c.phonenumber||c.phone_type=a.phonenumber||a.phone_type);
update phone_connect c
set phone_id=(
select b.phone_id
from temp_phone a, master_phone b
where a.person_id = c.person_id
and a.phonenumber||a.phone_type = b.phonenumber||b.phone_type)
where phone_id is null;It does. You are right. But that's what i need help with. I don't think my code is correct. After the insert, the code is actually updating the same exact record I just inserted. I'm sure this all can be done with one insert. I just really don't know how to show that in my code.
I need to insert a new record into phone_connect with person_id and phone_id. phone_id is already populated in master_phone. I guess my problem is how to go about creating the joins to all three tables to make sure im inserting the data correctly, or not inserting data that already exists. -
Select Insert into staging table does not load varchar2
I have a select insert query that loads a prebuilt table. I am running this query through Heterogenous services which points to a MySql database.
If I run just a select query in SQL PLUS then it returns all rows just fine.
However, when I put the select insert into a stored procedure, compile it, then run it. It does not load any VARCHAR2 datatypes but it does load DATE and NUMBER datatypes.
I also have another table with VARCHAR2 and it loads fine.
How can the database only load some of the items in a row and not others (VARCHAR2)
For instance, the query will load TRANSACTION_ID, ORER_NUMBER but will not load any data into BILLFIRST_NAME, and their is data to load.
CREATE TABLE "TRAN_STG"
( "TRANSACTION_ID" NUMBER(11,0),
"ORDER_NUMBER" NUMBER(20,0),
"BILL_FIRST_NAME" VARCHAR2(100 BYTE),
Any suggestions would be appreciated.can it be that there are differences in characterset? Can it be that there are differences in datatypes? Can it be that there are differences in field length?
-
How to insert into table through reports
hi,
i m working on oracle reports 10g,i made a report which fatching some data & contains some function , i want to insert values of that functions into a table & how to update it if user again run that report.
like
data1 data2 data3
function1 function2
the values of function 1 & 2 shouls be insert into a table. if that user exist in table then update it otherwise insert that values;
thxsU can use SRW.DO_SQL built-in procedure . Check the reports online help from the reports builder.
Rajesh
FUNCTION CREATETAB RETURN BOOLEAN IS
BEGIN
SRW.DO_SQL('CREATE TABLE CHECK (EMPNO NUMBER NOT NULL
PRIMARY KEY, SAL NUMBER (10,2)) PCTFREE 5 PCTUSED 75');
RETURN(TRUE);
EXCEPTION
WHEN SRW.DO_SQL_FAILURE THEN
SRW.MESSAGE(100, 'ERROR WHILE CREATING CHECK TABLE.');
SRW.MESSAGE(50, 'REPORT WAS STOPPED BEFORE THE RUNTIME
PARAMETER FORM.');
RAISE
SRW.PROGRAM_ABORT;
END;
Edited by: RajeshAlex on Sep 30, 2008 12:10 PM -
How to insert into xml table from relational table
I wrote a sqlstaement that selects value from the relational tables. Now I want to replace root node "<event_start01>" with following value to the above selected xml string. My select returns root node and all nodes and elements of the root node.
I tried holding above sellected value into varchar2 variable but I get ora-00600 error. If I hold above selected values into xmltype variable then I am not able to replace root node with the following value.
I want to rplace rootnode with the following string.
INSERT INTO FRMD_EVENT_START01(xml_event_start) VALUES
(XMLTYPE('<event_start01
xmlns="event_start01.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="event_start01.xsd
event_start01.xsd">Normally, you'd do this by joining B, C, and D together. In the simplest case, something like
INSERT INTO A( col1, ... col10 )
SELECT B.col1, ..., B.col4,
C.col5,
D.col6, ..., D.col10
FROM B,
C,
D,
WHERE B.someKeyColumn = C.someKeyColumn
AND C.anotherKeyColumn = D.anotherKeyColumnYou'd have to know how the data in B, C, and D relate to fill in the WHERE clause. This basically tells Oracle how to match the data in a particular row in B with the data in a particular row in C with the data in a particular row in D.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
How to prevent a printing of Delivery Note for Spcecific Material Type
Hi,
I had a requirement wherein it was required to "Prevent Mask Delivery notes from printing to Shipping dept"
addition info: All delivery notes are currently set to print in shipping. We can put in a logic to prevent the printing of
delivery note for a specific material type (like mask)
for this i used copy control routine 'RV61B902' in the include for tcode vl02n or vl01n..
my logic is fine..
include 'RV61B902'.
sy-subrc = 0.
DATA : w_matnr LIKE lips-MATNR.
IF T683S-KSCHL = 'LD00'.
IF sy-tcode = 'VL01N' OR SY-TCODE = 'VL02N'.
select matnr into w_matnr from lips where vbeln eq komkbv2-vbeln.
condense w_matnr.
if W_matnr cs '*MASK'.
SY-SUBRC = 4.
exit.
endif.
ENDSELECT.
ENDIF.
ENDIF.
question : My check was overwritten by the subsequent logic
please advise.
ESWAR
Edited by: tarakeswar rao on Nov 5, 2008 3:39 PMend user wants output to be stopped right, that will be controlleed in Output requirement only.
What does that has to do witj copy control. It will not do anything in your case -
Urgent! How to insert into and query video from database in forms???
In forms 6i demos CD, There is a demo form ocxvideo.fmb,
but it just for video in file system.
I want to read *.avi file from file system, and insert into
database, and query from my forms.
I create table with long raw, with default forms wizard,
long raw for [image] item in forms.
I change item type to ActiveX ,and right_click mouse
==>[Insert object]==>Oracle Veideo control.
still can not insert avi data into database and query from my forms.
Please give me some advice to solve this problem?
Thank you very much!
Ming-An
[email protected]In forms 6i demos CD, There is a demo form ocxvideo.fmb,
but it just for video in file system.
I want to read *.avi file from file system, and insert into
database, and query from my forms.
I create table with long raw, with default forms wizard,
long raw for [image] item in forms.
I change item type to ActiveX ,and right_click mouse
==>[Insert object]==>Oracle Veideo control.
still can not insert avi data into database and query from my forms.
Please give me some advice to solve this problem?
Thank you very much!
Ming-An
[email protected]
Maybe you are looking for
-
Problem in sending purchase order via EDI
Hello Experts , I want to send purchase order via EDI , for this i have refer the below link for configurations. link : http://help.sap.com/saphelp_nw04/helpdata/EN/dc/6b7c9f43d711d1893e0000e8323c4f/content.htm I have created purchase order (ME21N)an
-
I was charged for something I did not buy on I tunes how do you fix this
I have been charged for something from I tunes which I did not purchase actually 2 things
-
Verizon had deceptive sales practices
I bought the Major League Baseball package from Verizon at the end of April. I was told by the marketing rep there are no blackouts except for Saturday from PM to PM (The ESPN monopoly) Today I tried to watch Mets against the Pirates from Pittsburg
-
Pricing - flat fee sales order discount based on the group of items
Dear All. Has anyone came up with a process to offer a customer discount on a sales order as a flat fee to the whole sales order, not a % when specific products are ordered on the sales order. The problem that we're running in to is with no automatic
-
Other than tracking down an old fruit colored iMac, is there any way I can open an iMovie project I made in 2004? (I'm assuming I was running the latest version back then -- iMovie 4?) What's the oldest iMovie I can run on an current Mac (Intel/Mount