Nützliche Abap Codes und Code Fragmente
by Tron » Mon Jul 18, 2022 10:49 am
Hi.
![Update Sflight.png](./download/file.php?id=76&sid=dd2affeebc28329bb8e3b8535a74329b)
- Update Sflight.png (47.38 KiB) Viewed 33248 times
![Update Sflight2.png](./download/file.php?id=77&sid=dd2affeebc28329bb8e3b8535a74329b)
- Update Sflight2.png (19.97 KiB) Viewed 33248 times
- Code: [Select all] [Expand/Collapse] [Download] (Untitled.txt)
*"----------------------------------------------------------------------
*"*"Update Function Module:
*"
*"*"Local Interface:
*" IMPORTING
*" VALUE(IM_STATUS) TYPE SFLIGHT
*" VALUE(IM_PROCESSING_MODE) TYPE UPDKZ_D DEFAULT 'I'
*"----------------------------------------------------------------------
data ls_sflight
type sflight
. data lv_processing_mode
type updkz_d
.
lv_processing_mode = im_processing_mode.
select single * from sflight
into ls_sflight
where carrid = im_status-carrid and
connid eq im_status-connid and
fldate eq im_status-fldate.
if lv_processing_mode
= 'I'. lv_processing_mode = 'U'.
* EXIT.
ls_sflight-carrid = im_status-carrid.
ls_sflight-connid = im_status-connid.
ls_sflight-fldate = im_status-fldate.
ls_sflight-price = im_status-price.
ls_sflight-currency = im_status-currency.
ls_sflight-planetype = im_status-planetype.
ls_sflight-seatsmax = im_status-seatsmax.
ls_sflight-seatsocc = im_status-seatsocc.
ls_sflight-paymentsum = im_status-paymentsum.
ls_sflight-seatsmax_b = im_status-seatsmax_b.
ls_sflight-seatsocc_b = im_status-seatsocc_b.
ls_sflight-seatsmax_f = im_status-seatsmax_f.
ls_sflight-seatsocc_f = im_status-seatsocc_f.
* modify / update_table
modify sflight
from ls_sflight
. catch cx_sy_dynamic_osql_error
. * MESSAGE i061.
update sflight
from ls_sflight
. catch cx_sy_dynamic_osql_error
. * MESSAGE i061.
* insert into table
insert sflight
from ls_sflight
. catch cx_sy_dynamic_osql_error
. "MESSAGE I061.
* delete table
delete sflight
from ls_sflight
. catch cx_sy_dynamic_osql_error
. "MESSAGE I061.
"RAISE wrong_action_code.
- GeSHi ©
-
Tron
- .....
![..... .....](./images/ranks/4.png)
-
- Posts: 1112
- Joined: Sat Aug 04, 2007 10:21 pm
Return to Code Snippets
Who is online
Users browsing this forum: No registered users and 253 guests