Posts

Showing posts from February, 2018

BAPI for material storage location Add

 We can add material storage location plant wise using third party app or web. BAPI names : BAPI_MATERIAL_MAINTAINDATA_RT Import parameters: HEADDATA: Material Tables: STORAGELOCATIONDATA: Material: Plant: STGE_LOC:   STORAGELOCATIONDATAX: Material: Plant: STGE_LOC:   use below code after completing steps. CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.        

Update & Delete Query

UPDATE & Delete Statement Update Statement:  UPDATE statement is used to modify the existing records in a table.with We need to use Where Clause with Update statement to update the selected row,otherwise all the rows would be affected. The Update Statement look like : UPDATE table_name SET column1 = value1, column2 = value2...., columnN = valueN WHERE [condition];     If anyone forget to use Where Clause then the total row will be updated. So use Where clause with Update statement.   Delete Statement: The Delete Statement use to delete the existing record in a table.We need to use Where Clause with Delete Statement,Otherwise all the rows would be affected. The Statement look like: DELETE FROM table_name WHERE condition ;

INSERT INTO Statement

After Creating Table successfully we need to insert value in the existing table.So,I am showing you how to insert value in a row. The INSERT INTO Statement is used for insert value in a table as a row wise. There are two basic syntax.I am giving both of them. INSERT INTO TABLE_NAME (column1, column2, column3,...columnN) VALUES (value1, value2, value3,...valueN); and the other one is : INSERT INTO TABLE_NAME VALUES (value1,value2,value3,...valueN);   If we create a table for Customers then the query looks like:       INSERT INTO Customers(Cust_Id, Cust_Name, Cust_Addr,Cust_Phone) VALUES (1001, Harish, Park Street,+9178999999);   Similarly we can use the other one.Here we just put the value directly. never break the sequence , otherwise you 'll get wrong values.

SQL Create Table

Create a new table: The CREATE TABLE Statement is used for creating a new table.Where define the table name and also define its column name with each columns Data types. The statement looks like :   CREATE TABLE table_name (     column1 datatype,     column2 datatype,     column3 datatype,    .... nth column datatype,  PRIMARY KEY( one or more columns )  ); The column parameters specify the names of the columns of the table. The datatype parameter specifies the type of data the column can hold (e.g. varchar, integer, date, etc.).

Self Join

We need to know about Self Join meaning ,then we can understand its purpose.I am giving a short meaning : Joining a table with it's self is known as self Join. We can define Self join as like :  Inner Self Join Outer Self Join (Left,Wright & Full Join) Cross Self Join Inner Self Join : Select A. Column_Name1, B.Column_Name1 from Table_name A Inner Join Table_name B On A.Primary_Table = B. Primary_Table  Outer Self Join: Select A. Column_Name1, B.Column_Name1 from Table_name A Left Join Table_name B On A.Primary_Table = B. Primary_Table Cross Self Join: Select A. Column_Name1, B.Column_Name1 from Table_name A Cross Join Table_name B