10 SQL Script Deep Dive and OIA
10 SQL Script Deep Dive and OIA
end;
2. Generic way of handling any kind of error when error code is unknown
end;
4. For loop
5. if condition
6. While loop
end;
7. Arrary basics
result = :arr_1[:arr_2[3]] ;
end;
open anubhav(:icate);
--fetches the first record's pid and sets to my output variable
fetch anubhav into p1;
--fetches the first record's pid and sets to my output variable
fetch anubhav into p2;
end;
p1 = :arr_pid[1];
p2 = :arr_pid[3];
end;
10. Working with output tables and arrys which hold the data records
end;
end;
12. Loop at itab example where we map data from one table to another
rec_count = record_count(:lt_bp);
for i in 1..:rec_count do
:partners.insert( (:lt_bp.bp_id[i],
:lt_bp.company_name[i],
:lt_bp.currency_code[i] ) , :i);
end for;
end;
rec_count = record_count(:lt_bp);
for i in 1..:rec_count do
:partners.insert( (:lt_bp.bp_id[i],
:lt_bp.company_name[i],
:lt_bp.currency_code[i] ) , :i);
end for;
end;
select session_context('CLIENT'),
ucase(session_context('APPLICATIONUSER'))
into lv_client, lv_user from dummy;
lt_amounts = CE_CONVERSION(
:lt_all_amount,
[
family = 'currency',
method = 'ERP',
steps = 'shift,convert,shift_back',
client = :lv_client,
source_unit_column =
'CURRENCY_CODE',
target_unit = :lv_to_curr,
reference_date = :lv_today,
output_unit_column = 'CURR_CODE_OP'
], [gross_amount]
);
end;