Delivery - Likp, Lips Invoice Data-Vbrk, VBRP Customers Data:-Kna1, KNVV
Delivery - Likp, Lips Invoice Data-Vbrk, VBRP Customers Data:-Kna1, KNVV
DELIVERY--LIKP,LIPS
INVOICE DATA-VBRK,VBRP
CUSTOMERS DATA:-KNA1,KNVV
---VBAK-header table
---VBAP-item table
ORDER TABLE
----price colum need refrence field b/c when we say 100 means 100 of what,meaning we have todefine
it what type of cuurency it is.
---qunatity also need a refrence field b/c when we say 100 which means 100 of what quantity material,
--if you want to put data in to create edit & delete in progam then we have to go table maintenance
generator.
---this + means in sales order data is we do not have define field label of data
elemenet of data element means length of the field must be define.
---if you change any data element propert than go to table maintenance generator delete existing one
and create new generator.
--VENDOR-LFA1(HEADER DATA)
--using mara selection criteria is material group(matkl) with the help of internal
table we can pull out data from database.
end of ty_mara.
-a type declare a structure and it can't hold nay data just yet.it just a structure.
--a strucutre is a combination of certian number of fileds.but they can't hold data
yet.
---so an internal table is a table in memory that can hold any number of reocrds.
--tables : mara
---types is a frame that contains only those field whose we want to enter.
--ty_mara is the frame of structure
IF LOOP IS USED
---after loop do your write statement and then end your loop.
--think of internal table as a copy of data from database which resides in memory.
--means if you select 100 rows all will reisded in memory(in ram)
--now you can procress rows like insert delete update etc.
---now we have to manupulate data so that we can create o/p according to ours
will so we need work area.
--work area is exactly similar to internal table in structure but it just one row
---
--
--here is the example we don't use endselect b/c we have selected everything
from internal table that operates in types.
---and then we loop at it_mara into wa_mara means we loop all internal table
into one single line which is wa_mara.
--then in write matnr we have to select which matnr which is from work area b/c
we have loop everything into the work area so we have to select from work area.
JOINS
--JOINS IS only happen with primary key.
--inner join is an intersection b/w two table means when the tables are
join together based on primary key that common colum we write in
on statement
--but when we do left outer join and when one column is not matching than it
return null (means zero).
---if you want to return data as null whether data from one table is not there in
another table then we use left outer join.
--inner join shows blank line but left outer join shos zero stock.
NORMALIZATION
FORIGN KEY
-linking one table which is primary key to another table which is
not primary key is known as linking primary foreign key
relation.
--main reason to use foriegn key is to link up across table
--linkage of tables through primary key and foreign key is what binds together
called data integrity.
FOR ALL ENTRIES VS JOIN
--for all entries is iterate all entries in first table where knvv -kunn r = it_kna1-
kunnr.
EVENTS
-exectution goes from top to bottom unless we provide loop.
--abap is event driven programming.
--bit of code that handle event is called event handler.ex--from select to endloop.
--initialization event:-it trigger once only start of program. we wanna set value for
s_ernam(created by) based on dynamic parameter(sy-uname)
--
--IT with square bracket means its looking for entire internal table of it_bkpf.
--if not it_bkpf is initial means its looking for single row.
--append means it_bsid to it_bsad means only row is peend.
------------------------inner join----------------