0% found this document useful (0 votes)
296 views17 pages

Delivery - Likp, Lips Invoice Data-Vbrk, VBRP Customers Data:-Kna1, KNVV

The document discusses various concepts related to sales order cycle, purchase order cycle, material master data, joins, normalization, and events in ABAP. It provides details on key tables like VBAK, VBAP for sales, EKKO, EKPO for purchases. It explains inner joins, left outer joins, and use of internal tables, work areas, and loops for data retrieval and manipulation in ABAP.

Uploaded by

Gaurav Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
296 views17 pages

Delivery - Likp, Lips Invoice Data-Vbrk, VBRP Customers Data:-Kna1, KNVV

The document discusses various concepts related to sales order cycle, purchase order cycle, material master data, joins, normalization, and events in ABAP. It provides details on key tables like VBAK, VBAP for sales, EKKO, EKPO for purchases. It explains inner joins, left outer joins, and use of internal tables, work areas, and loops for data retrieval and manipulation in ABAP.

Uploaded by

Gaurav Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 17

SALES ORDER CYCLE :- SALEAS ORDER --VBAK,VBAP

DELIVERY--LIKP,LIPS

INVOICE DATA-VBRK,VBRP

CUSTOMERS DATA:-KNA1,KNVV

---VBAK-header table

---VBAP-item table

ORDER TABLE

--create material ,customer and order table like


--first create 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.

--go to table content->create data->new entries

---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.

PURCHASE ODER CYCLCE

--EKKO & EKPO


--GOODS RECIPTS-MKPF(HEADER DATA),MSEG(LINE ITEM DATA)

--INVOOICE-RBKP(HEADER DATA),RSEG(LINE ITEM DATA)

--VENDOR-LFA1(HEADER DATA)

---create vendor table-


and program for that is
MARA-it is standard table in sap that contain most of field of material master.

--using mara selection criteria is material group(matkl) with the help of internal
table we can pull out data from database.

--TYPES: begin of ty_mara,

matnr type matnr,

ersda type ersda,

matkl type matkl,

end of ty_mara.

--what does type do?

-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.

---in order to hold strucutre a data we have to declare a data statement.

--data : it_mara type table of ty_mara,

wa_mara type ty_mara.

---i have created a internal table which of type strucutre

---so an internal table is a table in memory that can hold any number of reocrds.

--tables : mara

---select* means all the tables from mara where condition

---types is a frame that contains only those field whose we want to enter.
--ty_mara is the frame of structure

---syntax to declare this type is begin of ty_mara

IF LOOP IS NOT USED

---if syntax is select* from mara where matkl=mara-matkl where there is no


internal table declaration then we use endselect . and we write conditon b/w
select and endsleect.

IF LOOP IS USED

---loop at internal table into work area(it is a temporary space)

---after loop do your write statement and then end your loop.

--use of loop is more efficient .

--think of internal table as a copy of data from database which resides in memory.

--- database contains table like mara,matkl,matnr etc

--when we declare internal table (using type) ty_mara

--database resides on harddisk it does'nt resides in memory.


--using this type we declare two things

-one is internal table which essentially a grid of data with columns

--using select statement

---work area is temporary locaton that can hold one row

---internal table is llike grid mneaing it can contain n number of rows

--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.

--now that work area is avialable inside that loop.

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

--ex as shown above on mara~matnr = makt~matnr(~ tilda charcerter)

---syntax should be like this

LEFT OUTER JOIN

--STOCK location data for material is mard.

-it inculdes common in table 1 and 2 and aslo inculde in table 1 .


--when we join two table through inner join if column is not common then
program returns nothing (means i don't know)

--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

--IT essentially tries to achive two things.

-eliminating data redundacny(means repition of data over and over again)

--increase data integrity.

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

-It is two step process

-in first select we got list of customer number

--in second select we pull data from knvv

--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.

--an event is user driven(execute,enter).


--

--when execute event is start of program.


--

--when execute program first event is called load of program.


--start-of-selection:-porgram written under start of selection goes in this event by default
whether you mention start of selection or not.

--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)

--

--if not it_bkpf[] is not initial.

--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.

--apend lines of it_bsid to it_bsad means entire line is appending.

------------------------inner join----------------

You might also like