Abap 2
Abap 2
Client kita iruthu oru requirement ipdi venum na ,udane ok solla kudathu--check with
feasibility
REPORT Z23_PRO31.
PARAMETERS: name type string,
roll_no type i.
START-OF-SELECTION.
data: student_1 type REF TO Z_STDUDENT_SMO, " ROOT CLASS NAME
lr_handle type ref to ZSTUDENT_AREA. "SHMA AREA NAME.
lr_handle = ZSTUDENT_AREA=>attach_for_write( ).
create object student_1 AREA HANDLE lr_handle.
call method studenT_1->get_attributes
exporting
IV_NAME = name
IV_ROLL_NO = roll_no.
call method student_1->Display.
lr_handle->set_root( student_1 ).
lr_handle->DETACH_COMMIT( ).
RICEFW
-R - REPORTS
-I -INTERFACE
-C -ENHANCE
-F -FORM (SMART FORM,ADOBE FORM)
-W -workflow
1.use transitioncode
2.short description
Short desc -- Inga shor description ethuku kudukanum - namma reference kaga easy access-
Descrption need to give -what purpose,date,username.
Task -- yentha ,yentah user ethula login panni irukanaum paka.
Access illatha oru tab open panna try panna-- no authorization provided nu varum.
5. Save
-- intha edathula request number automatic ha generate agum
1. Table name
2. Des taranum
3. Chose element type
-- oru Data element create panna 1st uu oru domain ha create pannanum,
-- Domain create pannitu ,same name/different name la data type ha create pannitu,antha
domain ha call pannalama.
-- so ipo nega create panna elemets reuse pannikalam.
-- oru table create panna apram technical settings podanum.
-- we can set data range.
-- Antha field oru table ha use pannikalam.
Creation of table
Tc- se11
-- deliver class ,chose a.
1.Built -in
2.Data element
Bulit in -oru oru time um nega size,char define panra mari irukum
Data element- athoda size,ellam set pannita ,resuse pannikalam.
LINK:
https://help.sap.com/saphelp_snc700_ehp01/helpdata/en/90/8d7301b1af11d194f600a0c9
29b3c3/content.htm?no_cache=true#:~:text=There%20are%20Flat%2C%20nested
%20and,at%20least%20one%20table%20type.
-- oru program create panani ,athula etha call panna,athu inga reflcet agaum.(bp)
yLink--> https://www.youtube.com/watch?v=jB7EFekBjS0&t=68s
Unit -3
Unit-3 Database tables.
L-1 Creating Transparent table
Types of table
Link-->https://www.youtube.com/watch?v=TjmeBPgoRP8
Transparent table
-- normal ha nega create panara ellam table um transparent table.
Cluster table
- combine this two different table,into one table with they use primary-foreign key
relationship.
-- primary key required..
-
Unit 4
Index and buffering
Index
Unit -5
U-5
L-1,2,3
Tc se -11
Check table
- check table na ,rendu table iruku table1 and table 2,
- ipo table one la 5 field iruku name,place,location,department.
- example department field la yentha department kuduthalum eduthum,illa enaku selective
va
na,yerkanave set/kuduthu iruku field mattum tha eduthukanum solrathu.
1.Se38 poitu
2.Program name- kudukanum
(name unique va irukanum/yen na ethu oru central face ,again vara id
authentication vachi ,same name la program create panna create agathu)
3.create - click next page varum
4.Title - la valid ana name tharanum yen,antha program execute agu bothu athu
katum.
5.Type - la execute program kudukanum.
6.save
Debugging
Two to debug
1.Program open pannitu /h kudu debug pannalam.
-- breakpoints vaika
2.program open page la debugging katum.-atha select
-- debugging la open panni pona watchpoint option katum.
-- single step (f5)
-- execute(f6)
-- return(f7)
-- continue(f8)
Connecting
1.Open remote desktop connection(normal user/admin) - enter they ip address()
2.Server already create -panni vachi irutha atha use pannikalam
Apdi illana
1.variable logon la -click
2..user specified system -select
3.next click
4.System id,instance number,application server kudukanum
Saprouter styring -kuduka theva illa.
-- Next atha activate pannanum,until active it in only edit phase .active pannala athu
central rep la save agathu.
Output
Transition code
Inga parameter use pannu bothu,value tharama variable declare panni irutha ,user input
namma kita kekum.
Inga oru variable create pannu bothu I,nu define pannitiga I oda maximum size 4 tha ,athu
mela kuduthu exceute panna athau output float la varum.
Intha idathula sy-index indrathu default value,sy-index oda value 0,so intha loop la 0 la
iruthu start agi 5 la mudiyum.
String
General table display
Some of default
Tadir word
--intha TADIR word la repository la pota ,nega create panna ellam package,object ellamey
katum.
Nega cretae panna ellam object,element um inga show agum.
Intha idthula package--tmp tempory,suppose package la pota package name katum.
Display
/ose38-
No consistency error
To check they inactive object
To stimulate object
How to release
1.truck symbol click
2.kela released notification katum
3.Release ana file la tick symbol katum
Release panna tr oda object edit panna allow pannum ana athu puthu object ha
Important
-- Oru tr development la iruthu release pannitu,again antha object la work pannalam,ana
activate panna puthu tr thara tharanum,
-- Release agama tr la object add panni save pannitiga.again antha object ha edit kudutha
athu puthu tr kekathu.
Nega panna program yentha tr la irukunu pakalam
To create new user (no access only specified people)
To create transaction code -se80
1. filter la choose -- package
2. Type they -- object name/package name
3. object name/package name -- right click
4. Choose -- Create
5. Choose -- Other one
6. Choose -- Transaction
7. Transaction code ---Choose transaction code own
8. Short text -- give releated description
9. Start object la 2nd -- program ans selection screen (report transaction)
10. Program -- choose program name within package
11. Gui suppot la choose -- sap gui for windows
12. Save
13. Package choose -- create object directory entry
14. Request id choose -- prompt for local workbench request
15. Save
16. Ipo create panna trcode(zse03) use pannalam.
How to execute
Note
-- parameters does not support float.
Sample pgr
Obligatory refers to manadatory ,ipo oru varibale name pakathula obligatory inu kuduthuta
antha variable kandipa oru input kudytha tha athu execute agum,until it won’t execute
agathu.
It only use in parameters.
IN SELECTION SCREEN -Obligatory only applicable for low(if with from)
Selection line la -rendu button(eg) oreyee line la vara use panrum,ana button oda name
varathu athuku thaniya comment podanum.
Modularization
-- nega oru constructor nu name kuduthu oru object create panna atha nega call panna
theve illa,constructor thavara vara name kuduthu calla panna atha call pannanaum.
--- oru class ku 5 object create panni call pannalim ,antha method la irukuratha print
pannaum.
--- oru instance method la oru constructore tha use panna mudiyum,same name la una oru
constructor create panna athu error katum.
Static.
-- Static ----- not ok to receive value,not parameters ,exception.
-- nega oru constructor nu name kuduthu oru object create panna atha nega call panna theve
illa,constructor thavara vara name kuduthu calla panna atha call pannanaum.
--- oru class ku 5 object create panni call pannalim ,antha method la irukuratha print
pannaum.
--- oru instance method la oru constructore tha use panna mudiyum,same name la una oru
constructor create panna athu error katum.
--- oru program kulla static and instance method use panni execute panna athu 1st static ha
tha execute pannaum.
Exception handling
-- Run time la face panra problem.
-- 4/0 exception.
--- if exception happened go with try ,catch block to know what exception happen.
--- to watch ,what exception happened st22(today).
--- pick type exception class and mention in catch block with one object.
--- run it show what type of exception accurately.
--- if exception happen out of method use raising exception comment with type of exception
class.
--- to create custom comment in class -zcx,ycx.
--- If they exception happend ouside of they method - we use raise exception with class of
exception happend
INTERFACE
Events
Singleton
--- Oru class ku oru object tha create panna mudiyum,athuku meal create panna try panna
object create panna mudiyathu.
Generic datatype
DATA: any_variable TYPE ANY.
any_variable = 10. " Assigning an integer value
WRITE any_variable. " Output: 10
CREATE DATA dynamic_variable TYPE string. " Changing the data type dynamically to string
ASSIGN dynamic_variable->* TO <fs>. " Reassigning the data object to the same field
symbol
<fs> = 'Hello'. " Assigning a string value
WRITE <fs>. " Output: Hello
REPORT field_symbol_demo.
1. Personalization
2. Customizing
2nd ku ,logic level la work panna matum,but oru field ha hide panrathu,antha mari use
pannikalam.
3. Enhancement
4. Customer development
5. Modification
4th book-lesson 2nd
Lesson one
Oru table kulla table enhancemenet use panni epdi oru extra field ha add panrathu
use append structure and customizing include.
Text enhancement.
F1 help--- we can enhance it,providing some additional information to the that ,for
standard table .
smod
cmod
1st -- Va01 (transaction code) -- use to create sales order. //which one u trying to change
Client oru requiremenet na -- check with feasibility check.
Oru transaction code oda package kandu pudika.--antha transaction open pannitu
Program la goto.
U can find any type of customer exists through --- Smod
If U want to implement any kind of customer exit --- cmod
Zpari_1
1st menu bar
2nd function key
3rd title bar
4th application tool bar.
Screen exit
Oru field ha additional sap screen la add pannanum,athuku custom ha oru screen ha
create pannitu ,antha custom screen la ,custom field ha add,pannitu ,ipo antha custom
subscreen ha ,sap screen iruthu custom screen ha call panna antha field reflect agaum.
1.screen number/Layout
2.Using package name with smod.
Package name ,smod la pota screen exit kandu pudichiralam.
3.Se 84
1st way
-- double click(ap)
2nd way
- For cat2
- ipo smod la ,package name pota ,screen exit ha identify panniralam.
- below is an smod(bp).
Exit ha click panna ------- right side badi show agum (dp)
Se - 18 use panni ,atha badi oda short description check pannaum (reason namma
changes ,intha badi correct ja irukumanu pakanum).
3rd way
Using Tc - se 84.
Se 19 badi implemamtataion
-- logic area.t(ap)
-- So IPO logic la break point set pannitu.
-- etha activate pannitu.
-- mmo1 oru entire potu save panna try panna athu debugger mode ku varum.
-- intha edathula ,antha implemenet double panna ,(ap) left sie la irukurathu ellam show
agum.
-- antha parameter ha double panna,(bp) right la irukurahu show agum.
-- ipo antha right side double panna,nega mmo1 la kudutha entre ellam yentha field la
varum nu katum.
-- so ipo antha field la vachi logic eluthukalam.and check is that importing parameter anu.
So antha field conform ana apram athuku,wmara-meins nu kuduthu patha nega kudutha
input anga show agum.
New badi
Same as classic badi it has an three way to identify they new badi.(refer classic badi doc)
-- so (ap)mari ellam get badi and call badi mudicha apram,antha page athuva show
agum(bp).
-- nammaku yentha method match agutho,athu varaikum execute pannanum.
-- BADI kernel la oru object create panna get badi comment use panni create pannanum.
If the method is instance ,we can call they method through instance.
-- if double that method(ap).
-- if u check they parameters of they method,it will show the changing ,if not changing
option present there ,no possible to do changes. (bp)
-- changing katuna, nega activate illa deactivate panna mudiyum,illana illa.
3rd way
When ever interface method using in the class we need to implement all method in this
page ( ellam method open panni just close pannanum)
-- so ethula oru method implement pannalana kuda athu inactive va irukum.
--for this(extab_insert) internal table ,we need push they function code to deactivate.
-- if u double click they mgint_extab ,u will get they structure(MEXTAB).
-- Func define that ,they length of they function code ,matching or not.
-- create .
-interface-->method -->parameters
- need to create program in se 38 and using badi definitititon by call they badi
deninitiotn(bp).
- need to add referenece of it.(bp).
-using pattern
- Badi ha call panna default call badi,get adi.so change they call method to call badi,after
call that method through pattern.
To implement use se 19
Se18 using panni create panna enhancement spot ha ing atharanum. (bp)
Filter concept
Ipo oru badi definititon ku rendu implementataion ,ha implemenet panni work pannu
bothu,program ha execute pannu bothu last ha yetha implement panninegaloo athu irukura
logi tha work,atha avoid panna filter concept use panrum.
- now activate it.
- click implementataion
-double click 1 st implememntataion
- if double
- Double click combination
-- and file symbol click
Fallback
Nega kudugatha oru filter value va input ha kudukum bothu,oru notification mari katum
- write in that.
Enhancement point
We can do,less enhancement,we can’t do more enhancement.
-- oru particular function ha insert panra mari iruku.
Enhancement section
We can do more enhancement.
--- oru module
-- oru set of code ha pannikalam.
To go screen nnumber
-- double click they screen number(ap)
--enhance (ap)
-- yentha point ku enhance ,venumo antha point neriya clck panni ,enhencement create pannanum.
-- sap provided they vmod package ,it tha we can have all they user exit program for sales
and distribution.
-- breakpoint set panni userexit paka mudiyathu.
--using VA01 transaction code.
Implementation
Customer req: oru
-- se va01 la
-- sales order create pannitu ,athula material quality below 100 kuduthatu,save panna try
pannu bothu athu eduthuka kudathu.
--
-- double click on they program(ap)
--table out put la ,customize ana input vara ,etha use pannalam.
---indicators symbol used to track they,customize input data.
-- user exit la ,sap oda standard program ha enhance panna try panna access key kekum.
OData
---t o create odata service ---tc --SEGW.
Data migration
-- extracting they data -- ethvathu oru data base la iruthu data va edukurum. In file type.
-- converting they data --- ipo sap field lenthg 18 tha eduthuku,but legacy database la 20 lentha la
iruku,atha appropiate ha mathanum.
-- importing they data --- converting data
-- verify they data
-- You have an external data that need to migrate into sap ,for that we need to create they table.
-- We need to create function module ,before that we need to create they function group for storing
they function module
-- TC-80
--Need to create they function module.
--TC se 37 to create they function module.
Idoc
-- Tc for idco We02
--for exchange they data from no-sap to sap
--for exchange they data from sap to no- sap
-- for exchange data from sap to sap
--Inbound --ulla
--outbound-- veliya
--new
--old
--for every idoc ,we have an unique idoc number
-- with control record,
-- data record ,
-- status record .
control record
-- it provide they basic details
Data record
-- it will display whole data in segment.
- data record will show they data record ,it that ,we have segment,in that segment we have they data.
Status record
-- it shows weather it successful or failure or error stat like that
-- table to show EDIDS
(1.1) To identify they status
-- Segments are always storing they data.
-- segment alwayse define in idoc
-- tc -se30
To create interface
-tc-- BDBG
--sample
-- suppose if some whereb ,they used means it will show like this.
To create new one
1--Enter number and enter
2.--- In this page it will show they catalog , you can select it from what u want.
Sorting concepts
For Pricing record
Condition records
--- Sap abap la default ana condition records ellam iruku,
--- condition record is full based on key combination that will done in condition table
Already we have existing pricing procedure,We added some access sequence we need to check it
reflected are not -- v/11