BAPI_ACC_DOCUMENT_POST --> FI belgesi yaratir
BAPI_SALESORDER_CREATEFROMDATA --> Sipariş
BAPI_BILLINGDOC_CREATEMULTIPLE --> Fatura
Test programi --> ACC_BAPI_TEST_DOCUMENT
eger KDV satiri yaratacaksan
it_accounttax LIKE TABLE OF bapiactx09 WITH HEADER LINE
kullanman gerekiyor..ama İş alanı zorunlu olmamasi lazım ona da
FS00 dan AnaHesap Düzenleme merkezinden KDV hesabina bakabilirsin..39 ile baslayan.
Giriş banka faizin altında alan durum grubu B000 i seçebilirsin..Normalde diger hesaplarda G001 İş alani seçilmis oluyor.
23 Kasım 2008 Pazar
16 Kasım 2008 Pazar
Data Types and Data Objects

In SAP Web As 6.10 and later, you can also specify the length after the LENGTH additon.Eg.
TYPE
DATA
Literals are data objects that are defined in the source text of a program and whose values are uniquely defined.the Abap runtime environment differentiates between three types of literals.
a)numeric literals
b)Text field literals
c)string literals
To display a single quote within a text field literal, you have to enter it twice
The TABLES statement always creates data objects that are visible program-wide.Data Objects that are created with the TABLES statement are always visible in the entire program,even if the statement appears within a subroutine or function module.
Data objects in modules and event blocks are always global.
In contrast to many other programming languages,the result of integer arithmetic in ABAP is rounded up or down to the nearest integer.
Data int type i.
int = 4 / 10. "Result 0
int = 5 / 10. "Result 1
Moreover- again in contrast to many other programming languages all interim results are also rounded.

int = 10 * ( 4 / 10 ). "Result 0
int = ( 10 * 4 ) / 10. "Result 1
Floating point arithmetic
Data: float type f,
pack type p decimals 2.
float = 73050 * '0.0727'. "Result 5.3107349999999997E+03
pack = float.
write pack. "Result 5310.73
Packed Number
Mixed Arithmetic Expressions
Caution: When trigonometry functions and other scientific functions,
logarithms and exponential functions (including the ** operator) are used,
floating point arithmetic is always used for calculation.
Search Help
There are two types of search help:
1)Elementary search helps describe a search path.
2)Collective search helps combine several elementary search helps. A collective search help thus can offer several alternative search paths.
Maintance views may not be used as the selection method for search helps.Normally a database view is used.However, you should note that database views(in R/3 system) are always created with an inner join.Sometimes values should be determined with outer join.In this case you should choose a help view as selection method.
A search help exit is a fnction module having a standardized interface.The function module F4IF_SHLP_EXIT_EXAMPLE can be used as template.
1)Elementary search helps describe a search path.
2)Collective search helps combine several elementary search helps. A collective search help thus can offer several alternative search paths.
Maintance views may not be used as the selection method for search helps.Normally a database view is used.However, you should note that database views(in R/3 system) are always created with an inner join.Sometimes values should be determined with outer join.In this case you should choose a help view as selection method.
A search help exit is a fnction module having a standardized interface.The function module F4IF_SHLP_EXIT_EXAMPLE can be used as template.
14 Kasım 2008 Cuma
9 Kasım 2008 Pazar
Buffering

"rdisp/bufreftime" defines the length of the interval in seconds.
1)Full buffering
When a record of the table is accessed, all the records of the table are loaded into the buffer.
2)Generic buffering
The generic key is a left-justified part of the primary key of the table that must be defined when the buffering type is selected.Client-dependent, fully buffered tables are automatically generically buffered.
3)Single-record buffering
All the accesses to the table that do not use SELECT SINGLE bypass the buffer and directly access the database.If the table does not contain a record with specified key, this record is recorded in the buffer as non-exist.
8 Kasım 2008 Cumartesi
Cluster & Pool tables

Should be accessed via primary key-very fast retrival otherwise very slow
No secondary indexes
No aggreagate functions (sum,avg,min,max)
pool and cluster table is many to one
cannot be read outside SAP
Cluster Tables : BSEC BSED BSEG
The basic idea of a table pool, as opposed to table clusters, is storage of data records from the tables defined in the ABAP Dictionary that are not dependent on one another.You would like combine small R/3 tables to a database table.
Pool tables are defined to host lots of small tables.
Pool tables --> A001 A002 A003
Table Logging
Parameter "rec/client" can have the following settings
rec/client=ALL all the clients should be logged
rec/client=030 only the specified clients should be logged
rec/client=OFF logging is deactivated int this system
Transaction Table History: SCU3
rec/client=ALL all the clients should be logged
rec/client=030 only the specified clients should be logged
rec/client=OFF logging is deactivated int this system
Transaction Table History: SCU3
Application Logs
Function module used to create Application Log
BAL_LOG_CREATE --> Create log with header data
BAL_LOG_MSG_ADD --> Put message in log
BAL_DB_SAVE --> Save logs in the database
Transaction Codes:
SLG0: Creation of Object and Sub object
SLG1: Display Application Logs
SAMPLE CODE
data: ls_log TYPE bal_s_log,
ls_log_handle TYPE balloghndl,
ls_log_handle TYPE balloghndl,
ls_msg TYPE bal_s_msg,
lt_new_lognumbers TYPE bal_t_lgnm.
clear: ls_log, ls_log_handle.
ls_log-aluser = sy-uname.
ls_log-alprog = sy-repid.
ls_log-object =.
ls_log-altcode = sy-tcode.
ls_log-subobject =.
ls_log-extnumber =.
ls_log-aldate = sy-datum.
ls_log-altime = sy-uzeit.
CALL FUNCTION 'BAL_LOG_CREATE'
EXPORTING
i_s_log = ls_log
IMPORTING
e_log_handle = ls_log_handle
EXCEPTIONS
log_header_inconsistent = 1
OTHERS = 2.
ls_msg-msgty =.
ls_msg-msgid =.
ls_msg-msgno =.
ls_msg-msgv1 =.
ls_msg-msgv2 =.
ls_msg-msgv3 =.
ls_msg-msgv4 =.
CALL FUNCTION 'BAL_LOG_MSG_ADD'
EXPORTING
i_log_handle = ls_log_handle
i_s_msg = ls_msg
EXCEPTIONS
log_not_found = 1
msg_inconsistent = 2
log_is_full = 3
OTHERS = 4.
CALL FUNCTION 'BAL_DB_SAVE'
EXPORTING
i_t_log_handle = lt_log_handle
IMPORTING
e_new_lognumbers = lt_new_lognumbers
EXCEPTIONS
log_not_found = 1
save_not_allowed = 2
numbering_error = 3
OTHERS = 4.
BAL_LOG_CREATE --> Create log with header data
BAL_LOG_MSG_ADD --> Put message in log
BAL_DB_SAVE --> Save logs in the database
Transaction Codes:
SLG0: Creation of Object and Sub object
SLG1: Display Application Logs
SAMPLE CODE
data: ls_log TYPE bal_s_log,
ls_log_handle TYPE balloghndl,
ls_log_handle TYPE balloghndl,
ls_msg TYPE bal_s_msg,
lt_new_lognumbers TYPE bal_t_lgnm.
clear: ls_log, ls_log_handle.
ls_log-aluser = sy-uname.
ls_log-alprog = sy-repid.
ls_log-object =
ls_log-altcode = sy-tcode.
ls_log-subobject =
ls_log-extnumber =
ls_log-aldate = sy-datum.
ls_log-altime = sy-uzeit.
CALL FUNCTION 'BAL_LOG_CREATE'
EXPORTING
i_s_log = ls_log
IMPORTING
e_log_handle = ls_log_handle
EXCEPTIONS
log_header_inconsistent = 1
OTHERS = 2.
ls_msg-msgty =
ls_msg-msgid =
ls_msg-msgno =
ls_msg-msgv1 =
ls_msg-msgv2 =
ls_msg-msgv3 =
ls_msg-msgv4 =
CALL FUNCTION 'BAL_LOG_MSG_ADD'
EXPORTING
i_log_handle = ls_log_handle
i_s_msg = ls_msg
EXCEPTIONS
log_not_found = 1
msg_inconsistent = 2
log_is_full = 3
OTHERS = 4.
CALL FUNCTION 'BAL_DB_SAVE'
EXPORTING
i_t_log_handle = lt_log_handle
IMPORTING
e_new_lognumbers = lt_new_lognumbers
EXCEPTIONS
log_not_found = 1
save_not_allowed = 2
numbering_error = 3
OTHERS = 4.
Notes
A value table only becomes a check table when a foreign key is defined.If you refer to a domain with a value table in a field , but no foreign key wa defined at field level, there is no check.
2)Database Views : Maintance status defines whether you can only read with the view or whether you can also write with it.If a database view was defined with more than one table, you can only read with this view.
If new fields are included in the table or existing fields are deleted, the view is automatically adjusted to this change.
2)Diff btw : SE54 & SM30
When you create a table maintenance generator the system will automatically create the underlying code. The system generates screens for the user to create or edit the entries. This screen can be accessed from SM30 or SM31 transaction.
SE54 is the developer tool to generate / change the maintenance view, which is a set of function modules and screens.
SM30 is the user / administrator tool to use the maintenance view. It internally calls the generated function modules and screens, but those details are hidden from the user.
3)Foreign keys can only be used in screens.Data records can be written to the table without being checked using an ABAP program.Domain equality is essential.Different data elements can be used, but they must refer to the same domains.The requirement for domain equality is only valid for the check field.For all other foreign key fields, it is sufficient if the data type and the field length are equal.
4)SE14 Database Utility ..The database utility provides an analysis tool with which you can find the cause of the error and the current state of all the tables involved in the conversion.
5)Append structures permit you to append fields to a SAP standart table and structures without having to modify the table definition.
If you copy a table to which an append structure has been appended the fields of the append structure become normal fields of the target table.
Customers create append structures in their namespace.The append structures are thus protected aganist overwriting during an upgrade.
No append structures may be created for pooled and cluster tables.
If a long field occurs in a table, it cannot be extended with append structures.This is because such long fields must always be in the last position of field list.
If you as a customer add a append structure to an SAP table, the fields in this append structure should be in the customer namespace for fields, that is they should begin with YY or ZZ
Kaydol:
Yorumlar (Atom)






