on 04-08-2007 7:07 AM
Hi
I am using FM BBP_PD_SC_CREATE to create a SC backend with an external SC number range
but i will get the error message ' No approval workflow found' .
Anyone had encountered such errors before ?
But on debug when i manually enter the SC number in debug mode, the program went thru' without any problems.
Any help or advice is greatly appreciated.
Thanks!
Hi
Which SRM and R/3 versions are you using ?
Please elaborate your detailed business requirements.
<u>Please paste your code details. Also ensure the BAck-end user executing the code/report has suitable BASIS authorizations in both SRM and R/3 system.</u>
<b>Here is some sample code, which migh help.</b>
INCLUDE BBP_PD_CON.
* create shopping cart on database
PERFORM create_shopping_cart TABLES basket_errors
lt_item
lt_account
lt_partner
lt_orgdata
USING ls_header
CHANGING lv_basket_no.
*&---------------------------------------------------------------------*
*& Form create_shopping_cart
*&---------------------------------------------------------------------*
* Create the shopping cart on database
*----------------------------------------------------------------------*
form create_shopping_cart tables et_errors structure bbp_oci_errors
it_item structure bbp_pds_sc_item_icu
it_account structure bbp_pds_acc
it_partner structure bbp_pds_partner
it_orgdata structure bbp_pds_org
using is_header structure bbp_pds_sc_header_ic
changing iv_basket_no type CRMT_OBJECT_ID_DB.
data: lv_save_failed type xfeld,
ls_header like bbp_pds_sc_header_d,
lt_item like bbp_pds_sc_item_d occurs 0 with header line,
lt_messages like bbp_pds_messages occurs 0 with header line.
call function 'BBP_PD_SC_CREATE'
exporting
i_save = gc_yes
i_park = gc_yes "try to park if save not possible
i_header = is_header
importing
e_header = ls_header
tables
i_item = it_item
i_account = it_account
i_partner = it_partner
i_orgdata = it_orgdata
e_item = lt_item
e_messages = lt_messages.
iv_basket_no = ls_header-object_id.
loop at lt_messages.
if lt_messages-msgty eq c_msgty_a or
lt_messages-msgty eq c_msgty_e.
lv_save_failed = gc_yes.
endif.
clear: et_errors.
read table lt_item with key guid = lt_messages-item_guid.
if sy-subrc eq 0.
et_errors-line = lt_item-number_int.
endif.
et_errors-type = lt_messages-msgty.
et_errors-code = lt_messages-msgno.
et_errors-message = lt_messages-message.
et_errors-message_v1 = lt_messages-msgv1.
et_errors-message_v2 = lt_messages-msgv2.
et_errors-message_v3 = lt_messages-msgv3.
et_errors-message_v4 = lt_messages-msgv4.
append et_errors.
endloop.
if lv_save_failed ne gc_yes.
*...call save and commit
CALL FUNCTION 'BBP_PD_SC_SAVE'.
commit work.
else.
raise not_saved.
endif.
endform. " create_shopping_cart
Regards
- Atul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lina,
Have you called
CALL FUNCTION 'BBP_PD_SC_SAVE'.
After calling the FM BBP_PD_SC_CREATE .
Just see the example FM BBP_SCFAVO_SAVE and implementation of FM BBP_PD_SC_CREATE.
I think that you miss to write commit work.
Regards,Nishant
Please reward if this helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.