‎2007 Jul 27 1:08 PM
Dear All,
how to upload data into SPFLI,SFLIGHT,SBOOK Tables using a program?
show also the program.
‎2007 Aug 01 10:17 AM
hi sandeep,
Here is an example where I am
Creating one BDC program with transaction ME21.
Transaction ME21 is related to purchase order creation.
First record the session from SM35.
Identify the screens and fields populated to create purchase order.
Create program using recorded session from SM35.
Use appropriate logic for page plus in case there are multiple line items more than table control.
Create session with input file by using BDC program.
Go to SM35, run the session, here we have different types of modes to run the session select one mode and run the session.
Find out whether the session is successful or erroneous.
Go to error log to see what is the problem when ever the transaction is erroneous.
First screen : This is header screen for purchase order creation. The fields are vendor number, purchase order type, purchase order date, currency.
Second screen : This is the purchase order item screen. The fields are item category, account assignment, material number, material short description, Quantity, Delivery date, Net price, material group, plant.
Third screen : This is the purchase order item account assignment. Based on input value of item category is empty and account assignment is K.
Fourth screen : This is purchase order service screen here user enters Service text, Quantity, Gross price, Unit of measure.
Fifth screen : This is purchase order service sub screen here user enters cost center and GL account value.
After this the recording is done. Then the recorded program is used in the object. When this object is executed with BDC_INSERT method without submitting the BDC, we can go to SM35 to manually process the BDC. If we execute the program while submitting the BDC , the BDC processing will be done automatically. The following slides explain the manual processing of a BDC.
I hope this will be a useful example reward points if useful
cheers!!!
Twinkle
‎2007 Aug 01 10:21 AM
SPFLI,SFLIGHT,SBOOK
they above table are directly insert values.
becaues display maintance allowed.
t_code se11
tab->field.
utilitize ->table content ->crate entirs
using bdc program.
‎2007 Aug 01 10:59 AM
The INSERT statement is used to insert values into a single database table.
This graphic is explained in the accompanying text
<insert statement> ::= INSERT INTO <table name> <insert column list> <insert source>.
<insert source> ::= VALUES '(' <value> ( ',' <value> )* ')'
| <query specification>.
<value> ::= <value expression>
| <dynamic parameter specification>
| NULL.
<insert column list> ::= '(' <column name> ( ',' <column name> )* ')'.
Note
In Open SQL the <insert column list> is not optional.
Caution
You cannot specify string literals as values for CLOB columns. Hex literals are not supported in Open SQL.
Examples
Example
INSERT INTO employees (employee_id, employee_name)
VALUES (4711, 'John Smith')
Inserting Values. A new row is inserted into the table employees with the values 4711 and 'John Smith' for the columns employee_id and employee_name respectively.
Example
INSERT INTO well_paid_employees (employee_id, salary)
SELECT employee_id, salary
FROM employees
WHERE salary > ?
Inserting the Result of a Query. The employee_idand the salaryof all employees from table employeeswith a salary exceeding a certain value are inserted into the table well_paid_employees.
also refer this link
http://www.sapdb.org/7.4/htmhelp/34/ee7fb7293911d3a97d00a0c9449261/content.htm
regards,
srinivas
<b>*reward for useful answers*</b>