Create blocked contract in backend R3 from a quot in SRM
HI experts,
I work in SRM 5.0 and I need to create a contract in backend R3 from a quot in SRM
I need that positions of my future contract in R3 are blocked
Do you know if filling the parameter IT_PDEXT_ITEMS-DEL_IND = S or with other mark in the badi BBP_CTR_BE_CREATE, the contract positions are blocked?
Best Regards and thank you in advance.
Hi,
If u set the IT_PDEXT_ITEMS-DEL_IND = X then contract will be created and it will be deleted.
Yes u can do this in BADI BBP_CTR_BE_CREATE.
Thanks
Venkatesh P
Similar Messages
-
Creating contracts on backend - iDocs not even sent from SRM
Hi all
I'm having a bit of trouble configuring backend contracts and could use a little help from the experts.
Trying to create a contract from SoCo or bid invitation results in a success message informing a contract number, but idocs BLAORD and COND_A don't appear on WE02 on the backend. Checking on WE05 on SRM, no idocs are listed, so I'm assuming they are not even being created.
BAdIs BBP_DETERMINE_LOGSYS and BBP_CTR_BE_CREATE are implemented and active, logical systems and RFC destinations are defined correctly and organizational data is ok. Also backend POs are working fine. Please advice.
Best regards
AlvaroHello Alvaro,
for backend contract creation, there is no IDOC generated in SRM, but directy in R/3, but the function BBPV_CONTRACT_CREATE.
If an error occurs during this function call, you should get an error message in Application Monitoring.
You can access those monitors via the web, with role SAP_BBP_STAL_ADMINISTRATOR, or directly in SAP GUI with transaction RZ10.
Last option: debug the process
Rgds
Christophe
PS: please reward points for helpfull answers -
Creation of multiple contracts in ERP backend from 1 GOA in SRM
Hello fellow SRM'ers, we are on SRM 5.5 and we have a scenario where we create a GOA in SRM and it get's created as a contract in the ERP backend system. This is working fine. Now our client would like to have multiple contracts created in the backend, one for each company when the GOA is saved. I found OSS note 646903, statement #2 that explains how to code the badi bbp_ctr, but is this all that is required to do this? It seems to me that the code in BBP_CTR will only create 1 contract/idoc. Can anyone tell me how we generate an idoc/contract that we want to create in ERP backend? Or is this how it's done?
Points will be rewarded for usefull answers. I have read most of the posts on this forum and have not found any answers yet.
Thanks,
MartyHi,
Please go through the below explanation from SAP documentation which says the no of contracts that would be created in the backend depends on
--If you activate grouping logic for locations in GOA from SPRO under cross aplication settings, items belonging to the same release-authorized purchasing organization, but different locations, can be grouped together into one backend contract. This requires a 1:1:1 relationship between an item, the release-authorized purchasing organization, and the location. This means that for each item, you can only assign one release-authorized purchasing organization, and one location, in order to release the GOA.
If you do not select this indicator to activate the grouping logic for location, a separate backend contract is created for each item belonging to the same release-authorized purchasing organization, but with different locations. Only items referring to the same release-authorized purchasing organization and location can be combined into one backend contract.---
So the bottomline is by default, when we distribute one separate contract is created for each location.
Hope this clarifies.
Regards,
RRK -
Unable to Create Project Contract from back end (R12)
Hello,
I am trying to create project contract using following code:
DECLARE
lv_return_status VARCHAR2 ( 1000 );
ln_msg_count NUMBER;
lv_msg_data VARCHAR2 ( 1000 );
l1 oke_import_contract_pub.chr_rec_type;
l2 oke_import_contract_pub.chr_rec_type;
error_message VARCHAR2 ( 3000 );
v_msg_index_out NUMBER;
BEGIN
l1.project_id := 3188;
l1.prime_k_number := 'PRJ-CNV-10016';
l1.owning_organization_id := 365;
l1.start_date := SYSDATE;
l1.inv_organization_id := 364;
l1.authoring_org_id := 82;
l1.k_type_code := 'MIPR';
l1.sts_code :='E';
l1.template_yn:='N';
l1.currency_code:='USD';
oke_import_contract_pub.create_contract_header (
p_api_version => '1.0'
, p_init_msg_list => oke_api.g_false
, p_ignore_oke_validation => 'N'
, x_return_status => lv_return_status
, x_msg_count => ln_msg_count
, x_msg_data => lv_msg_data
, p_chr_rec => l1
, x_chr_rec => l2
IF ln_msg_count > 0 THEN
FOR v_index IN 1 .. ln_msg_count
LOOP
fnd_msg_pub.get (
p_msg_index => v_index
, p_encoded => 'F'
, p_data => error_message
, p_msg_index_out => v_msg_index_out
DBMS_OUTPUT.put_line ('ERROR:' || error_message );
END LOOP;
END IF;
END;
The output results in following error: ERROR:You cannot save this entry before saving the header entry. (COL_NAME=sts_code) (CHILD_TABLE=OKC_K_HEADERS_V) (PARENT_TABLE=OKC_STATUSES_V)
Anybody has used this API or knows other method of creating oracle contract please help.
Thanks in advance.Hi,
How are you. I am currently working on the Project contracts conversion, as in the process of understanding the API's, i have provided some static data to create contract headers, lines and Billing method API's.
When i execute it, i could able to create the contract header but at line level i get the following errors . I don't understand this error "OKE_NO_PARENT_RECORD (COL_NAME=billing_method_code) (CHILD_TABLE=OKE_K_LINES_V) (PARENT_TABLE=OKE_K_BILLING_METHODS)"
Could you please help me in sending your script.
thanks
Ravi.
The original contract number:4100401462_9886546
Contract header id:875449
Contract header number:4100401462_9886546
Return Status S
l_msg_count 0
l_msg_data
Return Status S
l_msg_count 0
l_msg_data
Inventory_item_id for 5498563-79 is -->1285587
1. Value for INVENTORY_ITEM_ID is invalid.
2. OKE_NO_PARENT_RECORD (COL_NAME=billing_method_code) (CHILD_TABLE=OKE_K_LINES_V) (PARENT_TABLE=OKE_K_BILLING_METHODS)
Return Status E
l_msg_count 2
l_msg_data
Inventory_item_id for 5498563-9 is -->1285589
1. Value for INVENTORY_ITEM_ID is invalid.
2. OKE_NO_PARENT_RECORD (COL_NAME=billing_method_code) (CHILD_TABLE=OKE_K_LINES_V) (PARENT_TABLE=OKE_K_BILLING_METHODS)
Return Status E
l_msg_count 2
l_msg_data
Inventory_item_id for 7104853-1 is -->1306099
1. Value for INVENTORY_ITEM_ID is invalid.
2. OKE_NO_PARENT_RECORD (COL_NAME=billing_method_code) (CHILD_TABLE=OKE_K_LINES_V) (PARENT_TABLE=OKE_K_BILLING_METHODS)
Return Status E
l_msg_count 2
l_msg_data
PL/SQL procedure successfully completed.
The following is the test script
========================================================
declare
gr_xxoke_l_chr_rec xxoke_header%ROWTYPE;
type gt_xxoke_header is table of xxoke_header%rowtype index by binary_integer;
l_api_version number := 1.0;
l_init_msg_list varchar2(20) := oke_api.g_true;
l_ignore_oke_validation varchar2(1) := xx_common.gc_yes;
l_return_status varchar2(20) := xx_common.g_null;
l_msg_count number := xx_common.gn_zero;
l_msg_data varchar2(500) := xx_common.g_null;
--l_chr_rec xxoke_header%ROWTYPE;
l_chr_rec oke_import_contract_pub.chr_rec_type;
r_chr_rec oke_import_contract_pub.chr_rec_type;
--r_chr_rec xxoke_header%ROWTYPE;
l_cle_rec oke_import_contract_pub.cle_rec_type; --xxoke_lines%ROWTYPE;
r_cle_rec oke_import_contract_pub.cle_rec_type; --xxoke_lines%ROWTYPE;
bill_tbl OKE_IMPORT_CONTRACT_PUB.bill_tbl_type;
l_inventory_item_id number;
cursor c_head is
select
k_header_id
, contract_number_modifier
, k_number
, buy_or_sell
, currency_code
, status
, status_code
, scs_code
, start_date
, end_date
, owning_organization
, owning_organization_id
, authoring_org
--, esitmated_amount
, date_approved
, short_description
, comments
, description
--, cognomen
, template_yn
--, archived_yn
--, deleted_yn
, customer_po_number
, program_id
, program_number
, project_id
, project_description
, project_name
, project_number
, project_organization
, boa_id
, boa_number
, k_type_code
, priority_code
, prime_k_alias
, prime_k_number
, authorize_date
, authorizing_reason
, award_cancel_date
, date_definitized
, date_issued
, date_negotiated
, date_received
, date_sign_by_contractor
, date_sign_by_customer
, faa_approve_date
, faa_reject_date
, booked_flag
, open_flag
, cfe_flag
, vat_code
, country_of_origin_code
, export_flag
, human_subject_flag
, cqa_flag
, interim_rpt_req_flag
, no_competition_authorize
, penalty_clause_flag
, product_line_code
, reporting_flag
, sb_plan_req_flag
, sb_report_flag
, nte_amount
, nte_warning_flag
, bill_without_def_flag
, cas_flag
, classified_flag
, client_approve_req_flag
, cost_of_money
, dcaa_audit_req_flag
, cost_share_flag
, oh_rates_final_flag
, prop_delivery_location
, prop_due_date_time
, prop_expire_date
, copies_required
, sic_code
, tech_data_wh_rate
, progress_payment_flag
, progress_payment_liq_rate
, progress_payment_rate
, alternate_liquidation_rate
, definitized_flag
, financial_ctrl_verified_flag
, prop_due_time
, line_value_total
, undef_line_value_total
--, sfwt_flag
--,chr_id_response
--,chr_id_award
--,chr_id_renewed
--, contract_number
, chr_type
, trn_code
, authoring_org_id
, issue_or_receive
from oke_k_headers_full_v@testlink
WHERE k_header_id = 608283;
cursor c_line (l_header_id in number) is
select
k_line_id
,parent_line_id
,project_id
,project_name
,project_number
,project_organization
,task_id
,task_number
,task_name
,task_description
,billing_method_code
,inventory_item_id
,item_number
,item_description
,delivery_order_flag
,splited_flag
,priority_code
,customer_item_id
,customer_item_number
,line_quantity
,delivery_date
,unit_price
,uom_code
,billable_flag
,shippable_flag
,subcontracted_flag
,completed_flag
,nsp_flag
,app_code
,as_of_date
,authority
,country_of_origin_code
,drop_shipped_flag
,customer_approval_req_flag
,date_material_req
,inspection_req_flag
,interim_rpt_req_flag
,subj_a133_flag
,export_flag
,cfe_flag
,cop_required_flag
,export_license_num
,export_license_res
,copies_required
,cdrl_category
,data_item_name
,data_item_subtitle
,date_of_first_submission
,frequency
,requiring_office
,dcaa_audit_req_flag
,definitized_flag
,cost_of_money
,bill_undefinitized_flag
,nsn_number
,nte_warning_flag
,discount_for_payment
,financial_ctrl_flag
,c_scs_flag
,c_ssr_flag
,prepayment_amount
,prepayment_percentage
,progress_payment_flag
,progress_payment_liq_rate
,progress_payment_rate
,award_fee
,award_fee_pool_amount
,base_fee
,ceiling_cost
,ceiling_price
,labor_cost_index
,material_cost_index
,customer_percent_in_order
,cost_overrun_share_ratio
,cost_underrun_share_ratio
,date_of_price_redetermin
,estimated_total_quantity
,fee_ajt_formula
,final_fee
,fixed_quantity
,initial_fee
,initial_price
,level_of_effort_hours
,line_liquidation_rate
,maximum_fee
,maximum_quantity
,minimum_fee
,minimum_quantity
,number_of_options
,revised_price
,target_cost
,target_date_definitize
,target_fee
,target_price
,total_estimated_cost
,proposal_due_date
,cost_of_sale_rate
,line_value
,line_value_total
,undef_line_value
,undef_unit_price
,undef_line_value_total
,object_version_number
,sfwt_flag
--,chr_id
--,cle_id
--,cle_id_renewed
--,cle_id_renewed_to
,lse_id
,line_number
,display_sequence
,trn_code
--,dnz_chr_id
,comments
,boe_description
--,hidden_ind
--,price_unit_percent
--,price_negotiated
--,price_negotiated_renewed
--,price_level_ind
--,invoice_line_level_ind
--,dpas_rating
--,block23text
--,exception_yn
--,template_used
--,date_terminated
--,name
,start_date
,end_date
--,upg_orig_system_ref
--,upg_orig_system_ref_id
,attribute_category
,attribute1
,attribute2
,attribute3
,attribute4
,attribute5
,attribute6
,attribute7
,attribute8
,attribute9
,attribute10
,attribute11
,attribute12
,attribute13
,attribute14
,attribute15
--,price_type
--,currency_code
--,currency_code_renewed
,created_by
,creation_date
,last_updated_by
,last_update_login
,last_update_date
from oke_k_lines_full_v@testlink
where header_id = l_header_id
order by line_number;
l_seq_num number;
begin
for r_head in c_head loop
select xxtest_conversion_s.nextval
into l_seq_num
from dual;
l_chr_rec.contract_number:= r_head.k_number||'_'||l_seq_num;
dbms_output.put_line('The original contract number:' || l_chr_rec.contract_number );
l_chr_rec.buy_or_sell := r_head.buy_or_sell;
l_chr_rec.currency_code := r_head.currency_code;
l_chr_rec.sts_code := upper(r_head.status_code);
l_chr_rec.scs_code := r_head.scs_code;
l_chr_rec.start_date := r_head.start_date;
l_chr_rec.end_date := r_head.end_date;
l_chr_rec.inv_organization_id := 91; --r_head.owning_organization_id;
l_chr_rec.authoring_org_id := 82; --r_head.authoring_org_id;
--l_chr_rec.estimated_amount := r_head. 5000000;
l_chr_rec.date_approved := r_head.date_approved;
l_chr_rec.short_description := r_head.short_description;
l_chr_rec.comments := r_head.comments;
l_chr_rec.description := r_head.description;
--l_chr_rec.cognomen := r_head. 'Test Contract Alias';
l_chr_rec.template_yn := r_head.template_yn;
--l_chr_rec.archived_yn := r_head. 'N';
--l_chr_rec.deleted_yn := r_head. 'N';
l_chr_rec.cust_po_number := r_head.customer_po_number;
l_chr_rec.program_id := 1035; --r_head.program_id;
l_chr_rec.project_id := 158017; --r_head.project_id;
l_chr_rec.boa_id := r_head.boa_id;
l_chr_rec.k_type_code := 'Award'; ---r_head.k_type_code;
l_chr_rec.priority_code := r_head.priority_code;
l_chr_rec.prime_k_alias := r_head.prime_k_alias;
l_chr_rec.prime_k_number := r_head.prime_k_number;
l_chr_rec.authorize_date := r_head.authorize_date;
l_chr_rec.authorizing_reason := r_head.authorizing_reason;
l_chr_rec.award_cancel_date := r_head.award_cancel_date;
--l_chr_rec.award_date := r_head. sysdate - 16;
l_chr_rec.date_definitized := r_head.date_definitized;
l_chr_rec.date_issued := r_head.date_issued;
l_chr_rec.date_negotiated := r_head.date_negotiated;
l_chr_rec.date_received := r_head.date_received;
l_chr_rec.date_sign_by_contractor := r_head.date_sign_by_contractor;
l_chr_rec.date_sign_by_customer := r_head.date_sign_by_customer;
l_chr_rec.faa_approve_date := r_head.faa_approve_date;
l_chr_rec.faa_reject_date := r_head.faa_reject_date;
-- l_chr_rec.booked_flag := gr_xxoke_l_chr_rec NULL;
-- l_chr_rec.open_flag := gr_xxoke_l_chr_rec NULL;
l_chr_rec.cfe_flag := r_head.cfe_flag;
l_chr_rec.vat_code := r_head.vat_code;
l_chr_rec.country_of_origin_code := r_head.country_of_origin_code;
l_chr_rec.export_flag := r_head.export_flag;
l_chr_rec.human_subject_flag := r_head.human_subject_flag;
l_chr_rec.cqa_flag := r_head.cqa_flag;
l_chr_rec.interim_rpt_req_flag := r_head.interim_rpt_req_flag;
l_chr_rec.no_competition_authorize := r_head.no_competition_authorize;
l_chr_rec.penalty_clause_flag := r_head.penalty_clause_flag;
l_chr_rec.product_line_code := 'CONTRACT MFG'; --r_head.product_line_code;
l_chr_rec.reporting_flag := r_head.reporting_flag;
l_chr_rec.sb_plan_req_flag := r_head.sb_plan_req_flag;
l_chr_rec.sb_report_flag := r_head.sb_report_flag;
l_chr_rec.nte_amount := r_head.nte_amount;
l_chr_rec.nte_warning_flag := r_head.nte_warning_flag;
l_chr_rec.bill_without_def_flag := r_head.bill_without_def_flag;
l_chr_rec.cas_flag := r_head.cas_flag;
l_chr_rec.classified_flag := r_head.classified_flag;
l_chr_rec.client_approve_req_flag := r_head.client_approve_req_flag;
l_chr_rec.cost_of_money := r_head.cost_of_money;
l_chr_rec.dcaa_audit_req_flag := r_head.dcaa_audit_req_flag;
l_chr_rec.cost_share_flag := r_head.cost_share_flag;
l_chr_rec.oh_rates_final_flag := r_head.oh_rates_final_flag;
l_chr_rec.prop_delivery_location := r_head.prop_delivery_location;
l_chr_rec.prop_due_date_time := r_head.prop_due_date_time;
l_chr_rec.prop_expire_date := r_head.prop_expire_date;
l_chr_rec.copies_required := r_head.copies_required;
l_chr_rec.sic_code := r_head.sic_code;
l_chr_rec.tech_data_wh_rate := r_head.tech_data_wh_rate;
l_chr_rec.progress_payment_flag := r_head.progress_payment_flag;
l_chr_rec.progress_payment_liq_rate := r_head.progress_payment_liq_rate;
l_chr_rec.progress_payment_rate := r_head.progress_payment_rate;
l_chr_rec.alternate_liquidation_rate := r_head.alternate_liquidation_rate;
-- l_chr_rec.prop_due_time := r_head. NULL;
l_chr_rec.definitized_flag := r_head.definitized_flag;
l_chr_rec.financial_ctrl_verified_flag := r_head.financial_ctrl_verified_flag;
--l_chr_rec.cost_of_sale_rate := r_head. 0.1;
oke_import_contract_pub.create_contract_header( p_api_version => l_api_version
, p_init_msg_list => l_init_msg_list
, p_ignore_oke_validation => l_ignore_oke_validation
, x_return_status => l_return_status
, x_msg_count => l_msg_count
, x_msg_data => l_msg_data
, p_chr_rec => l_chr_rec
, x_chr_rec => r_chr_rec
FOR I IN 1..l_msg_count
LOOP
dbms_output.put_line ( I||'. '||SubStr(FND_MSG_PUB.Get(p_encoded => FND_API.G_FALSE ), 1, 255));
END LOOP;
dbms_output.put_line('Contract header id:'|| r_chr_rec.k_header_id);
dbms_output.put_line('Contract header number:'|| r_chr_rec.contract_number);
dbms_output.put_line('Return Status '||l_return_status);
dbms_output.put_line('l_msg_count '||l_msg_count);
dbms_output.put_line('l_msg_data '||l_msg_data);
bill_tbl(1).k_header_id := r_chr_rec.k_header_id;
bill_tbl(1).billing_method_code := 'Mixed';
--bill_tbl(2).k_header_id := r_chr_rec.k_header_id;
--bill_tbl(2).billing_method_code := 'Cost Plus';
OKE_IMPORT_CONTRACT_PUB.define_billing_methods(p_api_version => l_api_version
,p_init_msg_list => l_init_msg_list
,x_return_status => l_return_status
,x_msg_count => l_msg_count
,x_msg_data => l_msg_data
,p_bill_tbl => bill_tbl
FOR I IN 1..l_msg_count
LOOP
dbms_output.put_line ( I||'. '||SubStr(FND_MSG_PUB.Get(p_encoded => FND_API.G_FALSE ), 1, 255));
END LOOP;
dbms_output.put_line('Return Status '||l_return_status);
dbms_output.put_line('l_msg_count '||l_msg_count);
dbms_output.put_line('l_msg_data '||l_msg_data);
for r_line in c_line (r_head.k_header_id) loop
--------CREATE A TOP LINE -----------------
-- validate inventory item
begin
select inventory_item_id
into l_inventory_item_id
from mtl_system_items_b
where segment1 = r_line.item_number
and organization_id = 91;
exception
when others then
dbms_output.put_line('Error in deriving the inventory_item_id:'|| substr(sqlerrm,1,500));
end;
dbms_output.put_line('Inventory_item_id for '||r_line.item_number|| ' is -->' ||l_inventory_item_id);
l_cle_rec.k_line_id := null;
l_cle_rec.parent_line_id := null;
l_cle_rec.project_id := 158017; --r_line.project_id;
l_cle_rec.task_id := null; --r_line.task_id;
l_cle_rec.billing_method_code := 'Mixed';
l_cle_rec.inventory_item_id := l_inventory_item_id;
l_cle_rec.delivery_order_flag := r_line.delivery_order_flag;
l_cle_rec.splited_flag := r_line.splited_flag;
l_cle_rec.priority_code := r_line.priority_code;
l_cle_rec.customer_item_id := r_line.customer_item_id;
l_cle_rec.customer_item_number := r_line.customer_item_number;
l_cle_rec.line_quantity := r_line.line_quantity;
l_cle_rec.delivery_date := r_line.delivery_date;
l_cle_rec.unit_price := r_line.unit_price;
l_cle_rec.uom_code := r_line.uom_code;
l_cle_rec.billable_flag := r_line.billable_flag;
l_cle_rec.shippable_flag := r_line.shippable_flag;
l_cle_rec.subcontracted_flag := r_line.subcontracted_flag;
l_cle_rec.completed_flag := r_line.completed_flag;
l_cle_rec.nsp_flag := r_line.nsp_flag;
l_cle_rec.app_code := r_line.app_code;
l_cle_rec.as_of_date := r_line.as_of_date;
l_cle_rec.authority := r_line.authority;
l_cle_rec.country_of_origin_code := r_line.country_of_origin_code;
l_cle_rec.drop_shipped_flag := r_line.drop_shipped_flag;
l_cle_rec.customer_approval_req_flag := r_line.customer_approval_req_flag;
l_cle_rec.date_material_req := r_line.date_material_req;
l_cle_rec.inspection_req_flag := r_line.inspection_req_flag;
l_cle_rec.interim_rpt_req_flag := r_line.interim_rpt_req_flag;
l_cle_rec.subj_a133_flag := r_line.subj_a133_flag;
l_cle_rec.export_flag := r_line.export_flag;
l_cle_rec.cfe_req_flag := r_line.cfe_flag;
l_cle_rec.cop_required_flag := r_line.cop_required_flag;
l_cle_rec.export_license_num := r_line.export_license_num;
l_cle_rec.export_license_res := r_line.export_license_res;
l_cle_rec.copies_required := r_line.copies_required;
l_cle_rec.cdrl_category := r_line.cdrl_category;
l_cle_rec.data_item_name := r_line.data_item_name;
l_cle_rec.data_item_subtitle := r_line.data_item_subtitle;
l_cle_rec.date_of_first_submission := r_line.date_of_first_submission;
l_cle_rec.frequency := r_line.frequency;
l_cle_rec.requiring_office := r_line.requiring_office;
l_cle_rec.dcaa_audit_req_flag := r_line.dcaa_audit_req_flag;
l_cle_rec.definitized_flag := r_line.definitized_flag;
l_cle_rec.cost_of_money := r_line.cost_of_money;
l_cle_rec.bill_undefinitized_flag := r_line.bill_undefinitized_flag;
l_cle_rec.nsn_number := r_line.nsn_number;
l_cle_rec.nte_warning_flag := r_line.nte_warning_flag;
l_cle_rec.discount_for_payment := r_line.discount_for_payment;
l_cle_rec.financial_ctrl_flag := r_line.financial_ctrl_flag;
l_cle_rec.c_scs_flag := r_line.c_scs_flag;
l_cle_rec.c_ssr_flag := r_line.c_ssr_flag;
l_cle_rec.prepayment_amount := r_line.prepayment_amount;
l_cle_rec.prepayment_percentage := r_line.prepayment_percentage;
l_cle_rec.progress_payment_flag := r_line.progress_payment_flag;
l_cle_rec.progress_payment_liq_rate := r_line.progress_payment_liq_rate;
l_cle_rec.progress_payment_rate := r_line.progress_payment_rate;
l_cle_rec.award_fee := r_line.award_fee;
l_cle_rec.award_fee_pool_amount := r_line.award_fee_pool_amount;
l_cle_rec.base_fee := r_line.base_fee;
l_cle_rec.ceiling_cost := r_line.ceiling_cost;
l_cle_rec.ceiling_price := r_line.ceiling_price;
l_cle_rec.labor_cost_index := r_line.labor_cost_index;
l_cle_rec.material_cost_index := r_line.material_cost_index;
l_cle_rec.customers_percent_in_order := r_line.cost_underrun_share_ratio;
l_cle_rec.cost_overrun_share_ratio := r_line.date_of_price_redetermin;
l_cle_rec.cost_underrun_share_ratio := r_line.cost_underrun_share_ratio;
l_cle_rec.date_of_price_redetermin := r_line.date_of_price_redetermin;
l_cle_rec.estimated_total_quantity := r_line.estimated_total_quantity;
l_cle_rec.fee_ajt_formula := r_line.fee_ajt_formula;
l_cle_rec.final_fee := r_line.final_fee;
--l_cle_rec.final_pft_ajt_formula := r_line.final_pft_ajt_formula;
--l_cle_rec.fixed_fee := r_line.fixed_fee;
l_cle_rec.fixed_quantity := r_line.fixed_quantity;
l_cle_rec.initial_fee := r_line.initial_fee;
l_cle_rec.initial_price := r_line.initial_price;
l_cle_rec.level_of_effort_hours := r_line.level_of_effort_hours;
l_cle_rec.line_liquidation_rate := r_line.line_liquidation_rate;
l_cle_rec.maximum_fee := r_line.maximum_fee;
l_cle_rec.maximum_quantity := r_line.maximum_quantity;
l_cle_rec.minimum_fee := r_line.minimum_fee;
l_cle_rec.minimum_quantity := r_line.minimum_quantity;
l_cle_rec.number_of_options := r_line.number_of_options;
l_cle_rec.revised_price := r_line.revised_price;
l_cle_rec.target_cost := r_line.target_cost;
l_cle_rec.target_date_definitize := r_line.target_date_definitize;
l_cle_rec.target_fee := r_line.target_fee;
l_cle_rec.target_price := r_line.target_price;
l_cle_rec.total_estimated_cost := r_line.total_estimated_cost;
l_cle_rec.proposal_due_date := r_line.proposal_due_date;
l_cle_rec.cost_of_sale_rate := r_line.cost_of_sale_rate;
l_cle_rec.line_value := r_line.line_value;
l_cle_rec.line_value_total := r_line.line_value_total;
l_cle_rec.UNDEF_UNIT_PRICE := r_line.UNDEF_UNIT_PRICE;
l_cle_rec.UNDEF_LINE_VALUE := r_line.UNDEF_LINE_VALUE;
l_cle_rec.UNDEF_LINE_VALUE_TOTAL := r_line.UNDEF_LINE_VALUE_TOTAL;
l_cle_rec.object_version_number := r_line.object_version_number;
l_cle_rec.sfwt_flag := r_line.sfwt_flag;
l_cle_rec.chr_id := r_chr_rec.k_header_id;
--l_cle_rec.cle_id := r_line.cle_id;
--l_cle_rec.cle_id_renewed := r_line.cle_id_renewed;
--l_cle_rec.cle_id_renewed_to := r_line.cle_id_renewed_to;
l_cle_rec.lse_id := r_line.lse_id;
l_cle_rec.line_number := r_line.line_number;
l_cle_rec.sts_code := r_head.status_code; --r_line.sts_code;
l_cle_rec.display_sequence := r_line.display_sequence;
l_cle_rec.trn_code := r_line.trn_code;
l_cle_rec.dnz_chr_id := r_chr_rec.k_header_id;
l_cle_rec.comments := r_line.comments;
l_cle_rec.item_description := r_line.item_description;
l_cle_rec.oke_boe_description := r_line.boe_description;
--l_cle_rec.hidden_ind := r_line.hidden_ind;
--l_cle_rec.price_unit := r_line.price_unit;
--l_cle_rec.price_unit_percent := r_line.price_unit_percent;
--l_cle_rec.price_negotiated := r_line.price_negotiated;
--l_cle_rec.price_negotiated_renewed := r_line.price_negotiated_renewed;
--l_cle_rec.price_level_ind := r_line.price_level_ind;
--l_cle_rec.invoice_line_level_ind := r_line.invoice_line_level_ind;
--l_cle_rec.dpas_rating := r_line.dpas_rating;
--l_cle_rec.block23text := r_line.block23text;
l_cle_rec.exception_yn := 'N'; --r_line.exception_yn;
--l_cle_rec.template_used := r_line.template_used;
--l_cle_rec.date_terminated := r_line.date_terminated;
--l_cle_rec.name := r_line.name;
l_cle_rec.start_date := r_line.start_date;
l_cle_rec.end_date := r_line.end_date;
--l_cle_rec.upg_orig_system_ref := r_line.upg_orig_system_ref;
--l_cle_rec.upg_orig_system_ref_id := r_line.upg_orig_system_ref_id;
l_cle_rec.attribute_category := r_line.attribute_category;
l_cle_rec.attribute1 := r_line.attribute1;
l_cle_rec.attribute2 := r_line.attribute2;
l_cle_rec.attribute3 := r_line.attribute3;
l_cle_rec.attribute4 := r_line.attribute4;
l_cle_rec.attribute5 := r_line.attribute5;
l_cle_rec.attribute6 := r_line.attribute6;
l_cle_rec.attribute7 := r_line.attribute7;
l_cle_rec.attribute8 := r_line.attribute8;
l_cle_rec.attribute9 := r_line.attribute9;
l_cle_rec.attribute10 := r_line.attribute10;
l_cle_rec.attribute11 := r_line.attribute11;
l_cle_rec.attribute12 := r_line.attribute12;
l_cle_rec.attribute13 := r_line.attribute13;
l_cle_rec.attribute14 := r_line.attribute14;
l_cle_rec.attribute15 := r_line.attribute15;
--l_cle_rec.price_type := r_line.price_type;
--l_cle_rec.currency_code := r_line.currency_code;
--l_cle_rec.currency_code_renewed := r_line.currency_code_renewed;
l_cle_rec.created_by := r_line.created_by;
l_cle_rec.creation_date := r_line.creation_date;
l_cle_rec.last_updated_by := r_line.last_updated_by;
l_cle_rec.last_update_login := r_line.last_update_login;
l_cle_rec.last_update_date := r_line.last_update_date;
oke_import_contract_pub.create_contract_line( p_api_version => l_api_version
,p_init_msg_list => l_init_msg_list
,x_return_status => l_return_status
,x_msg_count => l_msg_count
,x_msg_data => l_msg_data
,p_cle_rec => l_cle_rec
,x_cle_rec => r_cle_rec
FOR I IN 1..l_msg_count
LOOP
dbms_output.put_line ( I||'. '||SubStr(FND_MSG_PUB.Get(p_encoded => FND_API.G_FALSE ), 1, 255));
END LOOP;
dbms_output.put_line('Return Status '||l_return_status);
dbms_output.put_line('l_msg_count '||l_msg_count);
dbms_output.put_line('l_msg_data '||l_msg_data);
end loop;
end loop;
end;
============================================================================================= -
Best way to create blocks from "No Year" to each year
Hi,
I have a scenario where I need to create blocks for each year based on the data in "No Year", keeping all the other members same.
Years in Year dimension are not fixed as every year it would be added, so I do not want to hard code the years.
I was looking the Datacopy command but am not able to get it using the same.
Following is the extract of the code that I am trying to execute.....
SET UPDATECALC OFF;
SET CREATEBLOCKONEQ ON;
SET LOCKBLOCK HIGH;
FIX(
[Scenario],
"No Year",
"ALDAR PJSC",
"ICE99999",
"ARB-Al Bandar","P115101", /* Projects */
@RELATIVE("Emp013",0), /* Employees*/
@RELATIVE("EMPG001",0), /* Employee Grade */
@RELATIVE("D100000",0), /* Department */
@RELATIVE("Period",0), /* Period - Dense */
"ADJ120", /* Adjust - Dense */
"ST02021300" /* Account - Dense */
[Version]
[Version] = [Version] + 0;
ENDFIX
In the above case, I want to use @RELATIVE("Projects",0) which has around 90 members, but it takes huge amount of time. So, I tried having only one Project member initially and it took around 1 minute; then I tried using 2 members from Project dimemsion, then it took 2 minutes...
Let know if there is any way to create blocks......Why not do a DATACOPY with a substitution variable as the target?
FIX(
[Scenario],
[Version]
"ALDAR PJSC",
"ICE99999",
"ARB-Al Bandar","P115101", /* Projects */
@RELATIVE("Emp013",0), /* Employees*/
@RELATIVE("EMPG001",0), /* Employee Grade */
@RELATIVE("D100000",0), /* Department */
@RELATIVE("Period",0), /* Period - Dense */
"ADJ120", /* Adjust - Dense */
"ST02021300" /* Account - Dense */
/* Copy the data, creating blocks along the way. */
DATACOPY "No Year" TO &NextYear ;
/* Get rid of data, but keep blocks. */
FIX(&NextYear)
CLEARBLOCK ALL ;
ENDFIX
ENDFIX
That would be pretty quick.
Regards,
Cameron Lackpour -
Creating service contract from OM
Hi,
We have tried creating service contracts from OM in 11.5.10.
Can we create service contracts from OM in 11.5.9? Any pointers where i can confirm this?
Thanks,
Sid.SId,
Yes we can!.
Thanks
Nagamohan -
Automatic creation of contract in SAP ECC from ESO
Hello Experts,
We are installing SAP ESO 5.1, with integration package, linked to a SAP ERP 5.0 system.
With the out-of-the box integration package, it is possible to create an outline agreement (contract) from an ESO Master Agreement / Agreement by selecting Scripts -> Publish to ERP from the toolbar (this can only be done if the Master Agreement is in a "saved" state). This is a manual process.
My question is: is it possible to automatically execute this script by means of Workflow?
The goal would be for E-Sourcing to always create a contract in the SAP ECC backend system from a completed ESO Master Agreement. I believe this can be achieved by executing a script at the "saved" event?
I'll appreciate your feedback on this approach, or any other solutions you might have implemented with customers to reach a solution to a similar requirement.
Thanks!
Regards,
Gilberto GallardoHi Gilberto
I would not suggest "Publish to ERP " to me made a post save script as contract managers/ buyers might "save" a draft version of the master agreement which might still need some validation. Also since a word contract is not in place at this point in time, there might be changes later on which could make the situation rather messy.
In case you are going for approval workflows in phase definition of contract, you can use "Publish to ERP " as a postscript for workflow when contract finally is moved to executed phase but again would support Howie here that it should remain a manual process since a lot of validations would be required.
A lot depends on business on what they consider to be the culimination of CLM cycle. Few would like to start transactions through oultine agreement before actual contract is signed to speed up the process while many would like to wait for the actual signed document to be in place before starting transactional procurement.
Regards
Mudit Saini -
Hi All,
We are trying to figure out PROS N CONS of two different options that can be used to send a contract to backend (as a follow on doc from bidding engine app only). These are
1. Directly create a backend contract by using badis.
2. Create GOA in SRM and then send it to the backend.
Currently there is a single backend and classic scenario. We want to consider the options of contract alert mgmt and adding additional backend in future.
Ques1: Please suggest what can be the better option to implement and what are advantages and disadvantages of both.
Ques 2: In option 1 the system creates a backend contract WITH NO COPY OF CONTRACT IN SRM. Is this statement true? If yes how can this be resolved as we want to have contract copy in SRM as well?
Thanks in Advance
HussainHi,
it is a feasible solution:
Now when an accepted bid is converted into contract it should create a GOA and create contract in backend (here we have a single backend). So the contract is available in SRM also as GOA.
Just disable the Badi and make the GOA doc type as the follow on document for bid. The system will create an incomplete GOA, which you can complete and distribute.
The operational contract created from distribution then can be used as source of supply in R/3 and all POs placed against it are recorded in SRM.
My query is that we want to have alert mgmt to notify the purchasers about the expiring contracts and then use "Negotiate" contract function for creating a bid invitation out of expiring contract. Is this functionality possible considering the classic mode and GOA.
Yes, SRM alerts on each contract type, also on GOAs. From GOA a Bid invitation (Negotiate) can be created and the GOA can be renewed and is redistributed.
Is there any special customisation or BADI required?
Make the follow on settings in SRM to enable the right doc types as follow on document. Also make sure, that the distribution of contracts is working fine by using the BADI BBP_CTR in R/3 for conditions as well for company code (when needed). Then you are fine.
Cheers,
Claudia -
How to Populate a Block when someone select something from an LOV
Hi
I have a form that has 2 blocks
Block 1 has one field called customers.. It's a list of values
where you can select customer_number.
Block 2 has several fields like country, state,city,address1.
Here is what I need to do. When the user pick a customer_number
from the LOV from block 1 I want block 2 to be populated based
on the customer_number that selected automatically.
Note: All fields (block 1 and 2 ) comes from the same table.
Please let me know what kind of trigger would be good here and
how how would you write it.
Thanks
alphaHi
I have a form that has 2 blocks
Block 1 has one field called customers.. It's a list of values
where you can select customer_number.
Block 2 has several fields like country, state,city,address1.
Here is what I need to do. When the user pick a customer_number
from the LOV from block 1 I want block 2 to be populated based
on the customer_number that selected automatically.
Note: All fields (block 1 and 2 ) comes from the same table.
Please let me know what kind of trigger would be good here and
how how would you write it.
Thanks
alpha
If you are returning the customer_number from the LOV to the top
block you can create a relation between the 2 blocks based on
customer_number. That way when the top block is populated the
detail block will populate as well. -
How to create a contract with one supplier and two dealers?
Hi Gurus,
I have a contract with a supplier (eg. Apple), but the products and services are supplied by two dealers.
The supplier is the manufacturer and with whom the negotiation of prices is made.
The dealers are those who make the delivery of the products and services and who the payment is done.
How can I create a contract with these characteristics in SRM 7.0?
I don't want to create two contracts with same products and services for two suppliers (Dealer_1 and Dealer_2).
How can this be handled through business partner type "Vendor"?
In "Partner" section in "Header" --> "Basic data", I can only add 1 vendor.
The system is:
Component software: SRM_SERVER
Release: 700
Level: 0008
Support package: SAPKIBKV08
Thanks in advance and best regards,
Alonso ValenzuelaHi Wadim,
I have a similar requirement to create order lines in an existing contract with reference using BAPI_CUSTOMERCONTRACT_CHANGE. The order lines get created in the contract. However, the condition types from the order line which i'm referencing are not getting referenced and are not getting added in the Contract's line after referencing.
Did you come across any such issue ? If yes , could you suggest the solution ?
Regards,
Venkat. -
How to create a Contract with reference to a Sales-Order(VA01) with a BAPI
Hi,
my name is Wadim and i need help.
My problem:
I am creating a sales-order(VA01) with the BAPI 'BAPI_SALESORDER_CREATEFROMDAT2'.
After that i have to create a contract(VA41) with reference to this order. I found the BAPI "BAPI_CONTRACT_CREATEFROMDATA" and it has the same interfaceparameters like the salesorder-bapi. but there are no parameters to get a connection to the sales-order.
Is it even possible to get a connection to a sales-order with a bapi???
thanks for help
regards mark
Edited by: Krapp Wadim on May 20, 2010 9:19 PMHi Wadim,
I have a similar requirement to create order lines in an existing contract with reference using BAPI_CUSTOMERCONTRACT_CHANGE. The order lines get created in the contract. However, the condition types from the order line which i'm referencing are not getting referenced and are not getting added in the Contract's line after referencing.
Did you come across any such issue ? If yes , could you suggest the solution ?
Regards,
Venkat. -
Updating SRM contracts from R/3 to SRM....
Hi all,
I am working in SRM, my requirement is to update the SRM contracts from R/3 to SRM and if any changes happen in R/3 contracts (previously updated contracts to SRM) then it should replicate those changes in SRM contracts also.
I found the program BBP_CONTRACT_INITIAL_UPLOAD (This program can be used to upload contracts from ERP to SRM. A separate contract in SRM would be created for each successfully transferred ERP contract.)
My question is, so if any changes happen in R/3 contracts it should update SRM contracts also.
Please let me know the solution how to solve this?
Highly appreciated any kind of help..
Thanks
Rajesh.Hi Rajesh,
I think that your scenario is very risky as there is no master system for contract : one time it is srm and after it can be r/3 !
Besides this comment, you can search the forum and find some threads for contract replication in both ways (but no activated in the same time...)
Kind regards,
Yann -
Fill the custom fields of backend PO from bid invitation
Hi all,
From bid invitation I am generating a purchase order. A PO is getting created in the backend. But when I save the PO in the backend it gives an error because a custom field (created in both backend PO and bid invitation) is mandatory for creating a PO is not filled. I have to map the Z field created in bid invitation to the custom field in backend. But in the badi BBP_CREATE_PO_BACK there is no information regarding the quotation or bid invitation. Is there any way to get the bid or bid invitation details like bid guid or bid invitation guid or any other field which related the PO to bid in the badi BBP_CREATE_PO_BACK?
Regards,
AshaHi Sundeep,
This problem looks to be a program error. SAP suggest few notes for the account assignment errors. However i could not found out any relation for this error w.r.t commodity code.
The related OSS notes are as under :
<b>Note 1000184 - Account assignment error when document transfer to back end</b>
<b>Note 966323 - Service Item: Not able to create PO in ERP backend</b>
The note 1000184 is more relavent in your case and other related notes are mentioned in that note which may resolve your issue.
Hope this note will definitely come to your help.
Please let us know the outcome for further help.
Rgds,
Teja -
Problem in Creating Service contract Quote
Hi,
I have a problem while creating Service Contract Quote. The Problem is "No Items being created in Service Contract Quote."
I am copying these line items from the Package Quote(Programatically). I am reading the Package Quote Lines Items using CRM_ORDER_READ and I am looping these one by one, and copying into one Item Table. Passed this table, to MAINTAIN_ORDERADM_I function module. And Then I am calling SAVE function module.
But, for me service contract Quote is being created with no line items.
Can you please let me know, how can I solve this problem.
And let me know what are the necessary steps to be taken progrmtically, for creating Service Contract Quote from a Package Quote.
Thanks,
SandeepA standard way of doing this would be to create an action in service contract with method call processing type, and method COPY_DOCUMENT. For this you need to do the following:
1) Create a new action called "SRV_CNTRCT_QUOTE_CREATE" in action pofile already attached to Package Quote. Use
CRMC_ACTION_DEF Tcode for this.
2) Choose processing type as method call and method as COPY_DOCUMENT.
3) Choose parameter CRMD_ORDERADM_H, PROCESS_TYPE with initial value as transaction type of Serv Contract Quote.
4) Institute start and scheduled conditions if required in CRMC_ACTION_CONF.
Note: For this copying controls at transaction level, item category level and itemcat determination while copying should have been determined.
Regds,
Raghu -
Create a contract with its premise with a BAPI
Hello People,
My doubt is as follows:
I need to create massive contracts in CRM '07 that replicates in IS-U, use the role to which he BAPI_BUSPROCESSND_CREATEMULTI step various parameters (see the final code), the problem lies in the allocation of the premise, the service contract creates perfectly (Business Partner, Business and Product Agreement).
It is right that assigned the Premise through the parameter "OBJECTS", or through another field?.
I reviewed several post as the companion of Anand Link: Creating an Installation , but no one answered your question.
Then a summary of the code used
CALL FUNCTION 'GUID_CREATE'
IMPORTING
ev_guid_32 = z_guidp.
wa_header_ins-guid = z_guidp.
z_partner = '300001867'.
z_buagid = '002000000151'.
z_product = 'GAS_BASICA'.
z_pod = 'ES0021000010000070HN'.
wa_partner-ref_kind = 'A'.
wa_partner-ref_partner_handle = '0001'.
wa_partner-kind_of_entry = 'C'.
wa_partner-partner_fct = '00000001'.
wa_partner-partner_no = Z_partner.
wa_partner-mainpartner = 'X'.
wa_partner-display_type = 'BP'.
wa_partner-no_type = 'BP'.
INSERT wa_partner INTO TABLE int_partner.
****************Carga de datos para lt_input_fields*********************
data: int_INPUT_FIELDS type table of BAPIBUS20001_INPUT_FIELDS.
CLEAR wa_input_fields.
REFRESH int_input_fields.
* HEADER
wa_input_fields-objectname = 'ORDERADM_H'.
wa_input_fields-ref_kind = 'A'.
wa_input_fields-ref_handle = '0000000001'.
wa_input_fields-fieldname = 'PROCESS_TYPE'.
APPEND wa_input_fields TO int_input_fields.
wa_input_fields-fieldname = 'CREATED_BY'.
APPEND wa_input_fields TO int_input_fields.
* BILLING
wa_input_fields-objectname = 'BILLING'.
wa_input_fields-ref_kind = 'A'.
wa_input_fields-ref_handle = '0000000001'.
wa_input_fields-fieldname = 'BUAG_ID'.
APPEND wa_input_fields TO int_input_fields.
* ITEM
wa_input_fields-objectname = 'ORDERADM_I'.
wa_input_fields-ref_kind = 'B'.
wa_input_fields-ref_handle = '0000000002'.
wa_input_fields-fieldname = 'ORDERED_PROD'.
APPEND wa_input_fields TO int_input_fields.
wa_input_fields-fieldname = 'NUMBER_INT'.
APPEND wa_input_fields TO int_input_fields.
wa_input_fields-fieldname = 'PRODUCT'.
APPEND wa_input_fields TO int_input_fields.
* PARTNER
wa_input_fields-objectname = 'PARTNER'.
wa_input_fields-ref_kind = 'A'.
wa_input_fields-ref_handle = '0000000001'.
wa_input_fields-logical_key = '0001'.
wa_input_fields-fieldname = 'DISPLAY_TYPE'.
APPEND wa_input_fields TO int_input_fields.
wa_input_fields-fieldname = 'KIND_OF_ENTRY'.
APPEND wa_input_fields TO int_input_fields.
wa_input_fields-fieldname = 'NO_TYPE'.
APPEND wa_input_fields TO int_input_fields.
wa_input_fields-fieldname = 'PARTNER_FCT'.
APPEND wa_input_fields TO int_input_fields.
wa_input_fields-fieldname = 'PARTNER_NO'.
APPEND wa_input_fields TO int_input_fields.
CLEAR wa_input_fields-logical_key.
* QUANTITY
WA_input_fields-objectname = 'SCHEDLIN'.
WA_input_fields-ref_kind = 'B'.
WA_input_fields-ref_handle = '0000000002'.
WA_input_fields-fieldname = 'QUANTITY'.
APPEND WA_input_fields TO INT_input_fields.
WA_input_fields-fieldname = 'LOGICAL_KEY'.
APPEND WA_input_fields TO INT_input_fields.
* iBase OBJECTS
wa_input_fields-objectname = 'ORDPRP_I'.
wa_input_fields-ref_kind = 'D'.
wa_input_fields-ref_handle = '0000000002'.
wa_input_fields-fieldname = 'IBASE_COMPONENT'.
APPEND wa_input_fields TO int_input_fields.
data: int_created_process type table of BAPIBUS20001_HEADER_INS,
wa_created_process like BAPIBUS20001_HEADER_INS.
REFRESH: int_created_process.
* HEADER *
REFRESH INT_header.
CLEAR wa_header.
wa_header-handle = '0000000001'.
wa_header-process_type = 'ISUL'.
APPEND wa_header TO INT_header.
* BILLING *
DATA: INT_BILLING TYPE TABLE OF BAPIBUS20001_BILLING,
WA_BILLING LIKE BAPIBUS20001_BILLING.
REFRESH INT_billing.
CLEAR wa_billing.
wa_billing-ref_handle = '0000000001'.
wa_billing-ref_kind = 'A'.
wa_billing-buag_id = z_buagid.
APPEND wa_billing TO INT_billing.
* ITEM *
DATA: product_guid TYPE GUID_32.
REFRESH INT_item.
CLEAR wa_item.
wa_item-product = '489A0908D19E0F3CE10000000A1D0232'.
wa_item-ordered_prod = z_product.
wa_item-number_int = 10.
wa_item-handle = '0000000002'.
wa_item-header_handle = '0000000001'.
APPEND wa_item TO INT_ITEM.
* PARTNER *
REFRESH INT_partner.
CLEAR wa_partner.
wa_partner-partner_no = z_partner.
wa_partner-no_type = 'BP'.
wa_partner-display_type = 'BP'.
wa_partner-kind_of_entry = 'C'.
wa_partner-ref_handle = '0000000001'.
wa_partner-ref_partner_handle = '0000000001'.
wa_partner-partner_fct = '00000001'.
wa_partner-ref_kind = 'A'.
APPEND wa_partner TO INT_partner.
* QUANTITY *
DATA: WA_SCHEDULELINE LIKE BAPIBUS20001_SCHEDLIN,
INT_SCHEDULELINE TYPE TABLE OF BAPIBUS20001_SCHEDLIN.
REFRESH INT_scheduleline.
CLEAR wa_scheduleline.
wa_scheduleline-item_handle = '0000000002'.
wa_scheduleline-quantity = 1.
APPEND wa_scheduleline TO INT_scheduleline.
* iBase OBJECTS *
F_pod = 'ES0021000010000088LF'.
CLEAR WA_OBJECTS. REFRESH INT_OBJECTS.
SELECT SINGLE *
FROM isu_pod
INTO wa_isu_pod
WHERE EXT_UI = f_pod.
SELECT SINGLE *
FROM ibin
INTO wa_ibin
WHERE objnr = wa_isu_pod-int_ui.
REFRESH INT_objects.
wa_objects-IBASE_HEADER = wa_ibin-IBASE.
wa_objects-ibase_component = wa_ibin-instance.
wa_objects-ref_handle = '0000000001'.
APPEND wa_objects TO INT_objects.
DATA: int_RETURN type table of BAPIRET2,
wa_RETURN LIKE BAPIRET2.
BREAK-POINT.
CALL FUNCTION 'BAPI_BUSPROCESSND_CREATEMULTI'
TABLES
header = int_header
billing = INT_billing
item = INT_item
partner = int_partner
input_fields = int_input_fields
created_process = int_created_process
return = INT_return
scheduleline = INT_scheduleline
OBJECTS = int_objects.
data: wa_OBJECTS_TO_SAVE LIKE BAPIBUS20001_GUID_DIS,
int_OBJECTS_TO_SAVE type table of BAPIBUS20001_GUID_DIS,
int_SAVED_OBJECTS type table of BAPIBUS20001_OBJECT_ID,
WAA_SAVED_OBJECTS LIKE BAPIBUS20001_OBJECT_ID.
REFRESH int_objects_to_save.
REFRESH int_saved_objects.
REFRESH int_return.
LOOP AT int_created_process INTO wa_created_process.
wa_objects_to_save-guid = wa_created_process-guid.
APPEND wa_objects_to_save to int_objects_to_save.
ENDLOOP.
CALL FUNCTION 'BAPI_BUSPROCESSND_SAVE'
TABLES
objects_to_save = int_objects_to_save
saved_objects = int_saved_objects
return = int_return.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'
IMPORTING
return = wa_return.Hello People,
My doubt is as follows:
I need to create massive contracts in CRM '07 that replicates in IS-U, use the role to which he BAPI_BUSPROCESSND_CREATEMULTI step various parameters (see the final code), the problem lies in the allocation of the premise, the service contract creates perfectly (Business Partner, Business and Product Agreement).
It is right that assigned the Premise through the parameter "OBJECTS", or through another field?.
I reviewed several post as the companion of Anand Link: Creating an Installation , but no one answered your question.
Then a summary of the code used
CALL FUNCTION 'GUID_CREATE'
IMPORTING
ev_guid_32 = z_guidp.
wa_header_ins-guid = z_guidp.
z_partner = '300001867'.
z_buagid = '002000000151'.
z_product = 'GAS_BASICA'.
z_pod = 'ES0021000010000070HN'.
wa_partner-ref_kind = 'A'.
wa_partner-ref_partner_handle = '0001'.
wa_partner-kind_of_entry = 'C'.
wa_partner-partner_fct = '00000001'.
wa_partner-partner_no = Z_partner.
wa_partner-mainpartner = 'X'.
wa_partner-display_type = 'BP'.
wa_partner-no_type = 'BP'.
INSERT wa_partner INTO TABLE int_partner.
****************Carga de datos para lt_input_fields*********************
data: int_INPUT_FIELDS type table of BAPIBUS20001_INPUT_FIELDS.
CLEAR wa_input_fields.
REFRESH int_input_fields.
* HEADER
wa_input_fields-objectname = 'ORDERADM_H'.
wa_input_fields-ref_kind = 'A'.
wa_input_fields-ref_handle = '0000000001'.
wa_input_fields-fieldname = 'PROCESS_TYPE'.
APPEND wa_input_fields TO int_input_fields.
wa_input_fields-fieldname = 'CREATED_BY'.
APPEND wa_input_fields TO int_input_fields.
* BILLING
wa_input_fields-objectname = 'BILLING'.
wa_input_fields-ref_kind = 'A'.
wa_input_fields-ref_handle = '0000000001'.
wa_input_fields-fieldname = 'BUAG_ID'.
APPEND wa_input_fields TO int_input_fields.
* ITEM
wa_input_fields-objectname = 'ORDERADM_I'.
wa_input_fields-ref_kind = 'B'.
wa_input_fields-ref_handle = '0000000002'.
wa_input_fields-fieldname = 'ORDERED_PROD'.
APPEND wa_input_fields TO int_input_fields.
wa_input_fields-fieldname = 'NUMBER_INT'.
APPEND wa_input_fields TO int_input_fields.
wa_input_fields-fieldname = 'PRODUCT'.
APPEND wa_input_fields TO int_input_fields.
* PARTNER
wa_input_fields-objectname = 'PARTNER'.
wa_input_fields-ref_kind = 'A'.
wa_input_fields-ref_handle = '0000000001'.
wa_input_fields-logical_key = '0001'.
wa_input_fields-fieldname = 'DISPLAY_TYPE'.
APPEND wa_input_fields TO int_input_fields.
wa_input_fields-fieldname = 'KIND_OF_ENTRY'.
APPEND wa_input_fields TO int_input_fields.
wa_input_fields-fieldname = 'NO_TYPE'.
APPEND wa_input_fields TO int_input_fields.
wa_input_fields-fieldname = 'PARTNER_FCT'.
APPEND wa_input_fields TO int_input_fields.
wa_input_fields-fieldname = 'PARTNER_NO'.
APPEND wa_input_fields TO int_input_fields.
CLEAR wa_input_fields-logical_key.
* QUANTITY
WA_input_fields-objectname = 'SCHEDLIN'.
WA_input_fields-ref_kind = 'B'.
WA_input_fields-ref_handle = '0000000002'.
WA_input_fields-fieldname = 'QUANTITY'.
APPEND WA_input_fields TO INT_input_fields.
WA_input_fields-fieldname = 'LOGICAL_KEY'.
APPEND WA_input_fields TO INT_input_fields.
* iBase OBJECTS
wa_input_fields-objectname = 'ORDPRP_I'.
wa_input_fields-ref_kind = 'D'.
wa_input_fields-ref_handle = '0000000002'.
wa_input_fields-fieldname = 'IBASE_COMPONENT'.
APPEND wa_input_fields TO int_input_fields.
data: int_created_process type table of BAPIBUS20001_HEADER_INS,
wa_created_process like BAPIBUS20001_HEADER_INS.
REFRESH: int_created_process.
* HEADER *
REFRESH INT_header.
CLEAR wa_header.
wa_header-handle = '0000000001'.
wa_header-process_type = 'ISUL'.
APPEND wa_header TO INT_header.
* BILLING *
DATA: INT_BILLING TYPE TABLE OF BAPIBUS20001_BILLING,
WA_BILLING LIKE BAPIBUS20001_BILLING.
REFRESH INT_billing.
CLEAR wa_billing.
wa_billing-ref_handle = '0000000001'.
wa_billing-ref_kind = 'A'.
wa_billing-buag_id = z_buagid.
APPEND wa_billing TO INT_billing.
* ITEM *
DATA: product_guid TYPE GUID_32.
REFRESH INT_item.
CLEAR wa_item.
wa_item-product = '489A0908D19E0F3CE10000000A1D0232'.
wa_item-ordered_prod = z_product.
wa_item-number_int = 10.
wa_item-handle = '0000000002'.
wa_item-header_handle = '0000000001'.
APPEND wa_item TO INT_ITEM.
* PARTNER *
REFRESH INT_partner.
CLEAR wa_partner.
wa_partner-partner_no = z_partner.
wa_partner-no_type = 'BP'.
wa_partner-display_type = 'BP'.
wa_partner-kind_of_entry = 'C'.
wa_partner-ref_handle = '0000000001'.
wa_partner-ref_partner_handle = '0000000001'.
wa_partner-partner_fct = '00000001'.
wa_partner-ref_kind = 'A'.
APPEND wa_partner TO INT_partner.
* QUANTITY *
DATA: WA_SCHEDULELINE LIKE BAPIBUS20001_SCHEDLIN,
INT_SCHEDULELINE TYPE TABLE OF BAPIBUS20001_SCHEDLIN.
REFRESH INT_scheduleline.
CLEAR wa_scheduleline.
wa_scheduleline-item_handle = '0000000002'.
wa_scheduleline-quantity = 1.
APPEND wa_scheduleline TO INT_scheduleline.
* iBase OBJECTS *
F_pod = 'ES0021000010000088LF'.
CLEAR WA_OBJECTS. REFRESH INT_OBJECTS.
SELECT SINGLE *
FROM isu_pod
INTO wa_isu_pod
WHERE EXT_UI = f_pod.
SELECT SINGLE *
FROM ibin
INTO wa_ibin
WHERE objnr = wa_isu_pod-int_ui.
REFRESH INT_objects.
wa_objects-IBASE_HEADER = wa_ibin-IBASE.
wa_objects-ibase_component = wa_ibin-instance.
wa_objects-ref_handle = '0000000001'.
APPEND wa_objects TO INT_objects.
DATA: int_RETURN type table of BAPIRET2,
wa_RETURN LIKE BAPIRET2.
BREAK-POINT.
CALL FUNCTION 'BAPI_BUSPROCESSND_CREATEMULTI'
TABLES
header = int_header
billing = INT_billing
item = INT_item
partner = int_partner
input_fields = int_input_fields
created_process = int_created_process
return = INT_return
scheduleline = INT_scheduleline
OBJECTS = int_objects.
data: wa_OBJECTS_TO_SAVE LIKE BAPIBUS20001_GUID_DIS,
int_OBJECTS_TO_SAVE type table of BAPIBUS20001_GUID_DIS,
int_SAVED_OBJECTS type table of BAPIBUS20001_OBJECT_ID,
WAA_SAVED_OBJECTS LIKE BAPIBUS20001_OBJECT_ID.
REFRESH int_objects_to_save.
REFRESH int_saved_objects.
REFRESH int_return.
LOOP AT int_created_process INTO wa_created_process.
wa_objects_to_save-guid = wa_created_process-guid.
APPEND wa_objects_to_save to int_objects_to_save.
ENDLOOP.
CALL FUNCTION 'BAPI_BUSPROCESSND_SAVE'
TABLES
objects_to_save = int_objects_to_save
saved_objects = int_saved_objects
return = int_return.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'
IMPORTING
return = wa_return.
Maybe you are looking for
-
I inadvertently deleted one of my calendars from iCal. I don't have a backup database. Any way to retrieve that calendar and it's listings??? Not optimistic.
-
Error when rendering my file...
an output module failed. the file may be damaged or corrupted.(-1610153464), how can i fix
-
Change Default iCal email invite handler
Right now in iCal, when I want to invite someone to a meeting, it wants to open Mail and send it out through that. Problem is I don't use Mail. I use Gmail via the Chrome browser. Is there any way to change the default email handler to Gmail? Or at t
-
Is there a way to map videos in a 3D environment?
Sorry, this is kinda hard to explain. Is it possible to have the area in which you put clips be a 3D environment. For example, could I put several clips around eachother in the shape of a sphere and scroll the camera around the sphere? If this is
-
Error-code when launching Time Machine from MacBook Pro
I´ve get this error-code when launching Time Machine: An unaspected error has acourd (errorcode -6584) Solution on this?