on 02-12-2014 8:37 AM
Hi All,
Iam creating SC using BBP_PD_SC_CREATE with the following sequence.
1.BBP_PD_SC_CREATE
2.BBP_PD_SC_UPDATE
3.BBP_PD_SC_SAVE'
4.BBP_PROCDOC_RESET_BUFFER'
5.Commit
I can see SC created in BBP_PD Transaction,but with out any data.
This is my code:
iv_header-guid = '00000000000000000000000000001'.
iv_header-description = 'welcome'.
iv_header-currency = 'GBP'.
iv_header-process_type = 'SHC'.
iv_header-subtype = 'ER'.
iv_header-posting_date = sy-datum.
ls_item-guid | = '00000000000000000000000000000002'. |
ls_item-parent = ' 00000000000000000000000000000001'. | "header guid |
ls_item-product = '00000000000000000000000000000000'.
ls_item-description = 'Test'.
ls_item-category = '000C29B4A62C1EE1ADBFC8AA8C9BFC7F'. "00000000000000000000000000000000'.
ls_item-category_id = 'VALVES'. " '65.10'.
ls_item-number_int = '0000000001'.
ls_item-number_ext = '0000000000'.
ls_item-product_type = '01'.
ls_item-quantity = '1.000'.
ls_item-unit = 'HIT'.
ls_item-price = '1'.
ls_item-gross_price = '39.0000'.
ls_item-catalog_price = '0.00'.
ls_item-price_unit = '1'.
ls_item-deliv_date = sy-datum + 1.
ls_item-logsys_fi = 'ONECLNTERP'.
ls_item-be_stge_loc = '0001'.
ls_item-be_co_code = '1000'.
ls_item-currency = 'GBP'.
ls_item-be_plant = '1000'.
ls_item-be_pur_group = 'SRM'.
ls_item-be_pur_org = '1000'.
ls_item-be_log_system = 'ONECLNTERP' . | "CFG300 |
ls_item-be_doc_type = 'SHC' . "ECPO
APPEND ls_item TO lt_item.
ls_account-guid = '00000000000000000000000000000004'.
ls_account-p_guid = '00000000000000000000000000000002'. "item guid
ls_account-distr_perc = '100.00'.
ls_account-acc_no = '0001'.
ls_account-src_guid = '00000000000000000000000000000000'.
ls_account-g_l_acct = '520000'.
ls_account-cost_ctr = '10010001'.
ls_account-co_area = '1000'.
ls_account-profit_ctr = '1002'.
ls_account-acc_cat = 'CC'.
APPEND ls_account TO lt_account.
ls_bup-partner_guid = '00000000000000000000000000000004'..
ls_bup-p_guid = '00000000000000000000000000000002'. "header guid
ls_bup-partner_fct = '00000020'.
ls_bup-mainpartner = 'X'.
ls_bup-partner_no = '000C29B4A62C1EE1AEDA35BDC3303C7F'.
ls_bup-addr_type = '3'.
ls_bup-addr_origin = 'A'.
ls_bup-partner_id = '0000000705'.
ls_bup-addr_no = '0000029710'.
ls_bup-pers_no = '0000029973'.
APPEND ls_bup TO lt_bup.
ls_bup-partner_guid = '00000000000000000000000000000004'..
ls_bup-p_guid = '00000000000000000000000000000002'. "header guid
ls_bup-partner_fct = '00000027'.
ls_bup-mainpartner = 'X'.
ls_bup-partner_no = 'DD3FFE214117D0F1B1A10014C2593DCB'.
ls_bup-addr_type = '1'.
ls_bup-addr_origin = 'B'.
ls_bup-partner_id = '0000000411'.
ls_bup-addr_no = '0000028605'.
APPEND ls_bup TO lt_bup.
ls_bup-partner_guid = '00000000000000000000000000000004'..
ls_bup-p_guid = '00000000000000000000000000000002'. "header guid
ls_bup-partner_fct = '00000019'.
ls_bup-mainpartner = 'X'.
ls_bup-partner_no = '000C29B4A62C1EE1AEF5CB90A851BC7F'.
ls_bup-addr_type = '1'.
ls_bup-addr_origin = 'A'.
ls_bup-partner_id = '0000100063'.
ls_bup-addr_no = '0000030204'.
APPEND ls_bup TO lt_bup.
ls_bup-partner_guid = '00000000000000000000000000000004'..
ls_bup-p_guid = '00000000000000000000000000000002'. "header guid
ls_bup-partner_fct = '00000016'.
ls_bup-mainpartner = 'X'.
ls_bup-partner_no = '000C29B4A62C1EE1AEDA35BDC3303C7F'.
ls_bup-addr_type = '3'.
ls_bup-addr_origin = 'A'.
ls_bup-partner_id = '0000000705'.
ls_bup-addr_no = '0000029710'.
ls_bup-pers_no = '0000029973'.
APPEND ls_bup TO lt_bup.
ls_bup-partner_guid = '00000000000000000000000000000004'..
ls_bup-p_guid = '00000000000000000000000000000002'. "header guid
ls_bup-partner_fct = '00000075'.
ls_bup-mainpartner = 'X'.
ls_bup-partner_no = '000C29B4A62C1ED1AACC35E21C8DE770'.
ls_bup-addr_type = '1'.
ls_bup-addr_origin = 'A'.
ls_bup-partner_id = '0000000656'.
ls_bup-addr_no = '0000029676'.
APPEND ls_bup TO lt_bup.
ls_org-proc_org_ot = 'O'.
ls_org-proc_org_id = '50001351'.
ls_org-proc_group_ot = 'O'.
ls_org-proc_group_id = '50001284'.
ls_org-p_guid = '00000000000000000000000000000002'. "header guid (I tried item guid and header guid as well)
ls_org-guid = '00000000000000000000000000000005'..
CALL FUNCTION 'BBP_PD_SC_CREATE'
EXPORTING
i_save = 'X'
i_header = iv_header
IMPORTING
e_header = ls_header_u
TABLES
i_item = lt_item
i_account = lt_account
i_partner = lt_bup
i_orgdata = lt_org
e_messages = lt_message1.
MOVE-CORRESPONDING ls_header_u TO e_header.
CALL FUNCTION 'BBP_PD_SC_UPDATE'
EXPORTING
i_header = e_header
TABLES
i_item = lt_item
i_account = lt_account
i_partner = lt_bup
i_orgdata = lt_org
e_messages = lt_message1.
CALL FUNCTION 'BBP_PD_SC_SAVE'.
* EXPORTING
* iv_header_guid = e_header-guid.
*CALL FUNCTION 'BBP_PROCDOC_RESET_BUFFER'.
COMMIT WORK.
Please any one help me.
Thanks,
Anitha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I agree with Konstantin, guids have not to filled with this method.
Please try to reserve a guid with the MF GUID_CREATE for the header before calling the MF BBP_PD_SC_CREATE.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anitha,
what do you have in your message table?
Regards
Konstantin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anitha,
if you work with SRM 6.0+ I would say you should use classes, not the functions.
But anyway, try following.
Do not fill HEADER or PARENT for Item. Take GUID 00000000000000000000000000000001 fro position.
Do not provide GUIDS for Account, Partners, Org's - they should be determined automatically (P_GUID still should be filled with item guid, i.e. 00000000000000000000000000000001). Do not fill fields with zero-only guids.
For partners it should be enough to provide only partner_fct and partner_no.
Do not fill SUBTYPE with 'ER' on header level. Sourcing of external requirements is a very specific process. Just leave it empty.
Regards
Konstantin
Hi Konstantin,
This is the changed code.
iv_header-guid = '00000000000000000000000000001'. "Buffer table not uptodate (If i remove)
iv_header-description = 'welcome1'.
iv_header-currency = 'GBP'.
iv_header-process_type = 'SHC'.
iv_header-posting_date = sy-datum.
ls_item-guid = '00000000000000000000000000000002'. (I tried with 1 as well as 2 ) - if i remove ,bugger table error
ls_item-parent = ' 00000000000000000000000000000001'. "header guid
ls_item-description = 'Test'.
ls_item-category = '000C29B4A62C1EE1ADBFC8AA8C9BFC7F'. "00000000000000000000000000000000'.
ls_item-category_id = 'VALVES'. " '65.10'.
ls_item-number_int = '0000000001'.
ls_item-number_ext = '0000000000'.
ls_item-product_type = '01'.
ls_item-quantity = '1.000'.
ls_item-unit = 'HIT'.
ls_item-price = '1'.
ls_item-gross_price = '39.0000'.
ls_item-catalog_price = '0.00'.
ls_item-price_unit = '1'.
ls_item-deliv_date = sy-datum + 1.
ls_item-logsys_fi = 'ONECLNTERP'.
ls_item-be_stge_loc = '0001'.
ls_item-be_co_code = '1000'.
ls_item-currency = 'GBP'.
ls_item-be_plant = '1000'.
ls_item-be_pur_group = 'SRM'.
ls_item-be_pur_org = '1000'.
ls_item-be_log_system = 'ONECLNTERP' . "CFG300
ls_item-be_doc_type = 'SHC' . "ECPO
APPEND ls_item TO lt_item.
ls_account-guid = '00000000000000000000000000000003'.
ls_account-p_guid = '00000000000000000000000000000002'. "item guid
ls_account-distr_perc = '100.00'.
ls_account-acc_no = '0001'.
*ls_account-src_guid = '00000000000000000000000000000000'.
ls_account-g_l_acct = '520000'.
ls_account-cost_ctr = '10010001'.
ls_account-co_area = '1000'.
ls_account-profit_ctr = '1002'.
ls_account-acc_cat = 'CC'.
APPEND ls_account TO lt_account.
ls_bup-partner_guid = '00000000000000000000000000000004'..
ls_bup-p_guid = '00000000000000000000000000000002'. "header guid
ls_bup-partner_fct = '00000020'.
ls_bup-mainpartner = 'X'.
ls_bup-partner_no = '000C29B4A62C1EE1AEDA35BDC3303C7F'. (followed same for other partners)
ls_org-proc_org_ot = 'O'.
ls_org-proc_org_id = '50001351'.
ls_org-proc_group_ot = 'O'.
ls_org-proc_group_id = '50001284'.
ls_org-p_guid = '00000000000000000000000000000002'. "header guid (I tried item guid and header guid as well)
ls_org-guid = '00000000000000000000000000000005'..
Thanks,
Anitha
User | Count |
---|---|
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.