P_co -> SELECTCOMPANY_NAME FROM SNWD_BPA
Select so~so_id, so~gross_amount,
so~currency_code from snwd_so as so
where so~buyer_guid in ( select node_key from snwd_bpa
where company_name = ( SELECT COMPANY_NAME FROM SNWD_BPA )
and bp_role = '01' )
into table @data(lt_orders).
If ( p_co co ‘SELECT’ )
RETURN;
ENDIF.
https://sapui5.hana.ondemand.com/#/demoapps
8.
Design 2 functionmodules
1. To create BP Address data in SNWD_AD
2. To create BP Header data in SNWD_BPA
ZNC_XX_CREATE_BP
CALL ADDR…
Received the ID
Now create BPA
Generate ID
Take the address id
Create BP Data in DB
ZNC_XX_CREATE_BP_ADDR
Node_key
Create address data in DB
bpa
addr
addr
Address_id
Program call the
BP module
12.
1. Create anew class called factory ZCL_XX_FACTORY
2. Add a method call GET_INSTANCE as Static method Public
3. Add parameters
I_TYPE importing TYPE CHAR1
EO_PLANE exporting TYPE REF TO ZIF_XX_PLANE
4. Move our if condition inside the GET_INSTANCE
data: lo_pass_plane type ref to zcl_xx_pass_plane,
lo_cargo_plane type ref to zcl_xx_cargo_plane.
if i_ptype = 'P'.
create object : lo_pass_plane.
eo_plane = lo_pass_plane.
elseif i_ptype = 'C'.
create object : lo_cargo_plane.
eo_plane = lo_cargo_plane. ""child object to parent - widening cast
else.
message 'plane not supported' type 'E'.
endif.
5. Come back to the report and just call the factory class and pass our type and receive interface object – in call class report
ZCL_XX_FACTORY=>get_instance(
exporting
i_ptype = ptyp " Single-Character Flag
importing
eo_plane = lo_if_plane " Airplane Interface
).
13.
While I on-boardingmy flight, if I detect a corona positive passenger, I need to cancel the on-
boarding ASAP to avoid risk of an outbreak.