on 03-11-2008 12:58 PM
1. Running into an issue where when i delete a item from SC it still gets passed to bbp_doc_check method that we have customized.
CALL FUNCTION 'BBP_PD_SC_GETDETAIL'
EXPORTING
i_guid = iv_doc_guid
i_with_itemdata = 'X'
IMPORTING
e_header = ls_header
TABLES
e_item = lt_item
e_account = lt_account
e_partner = lt_partner.
2. When i run in debug mode using SM50 and breakpoints...i see the completed method get executed 2 times.
3. Also the following step in program gets executed 2 times in both runs
IF ls_account-zzitem_type_flag = 'E'.
MOVE 'Y' TO lv_expense_found.
ELSEIF ls_account-zzitem_type_flag = 'C'.
MOVE 'Y' TO lv_capital_found.
ENDIF.
4. What does the following statement do?
REFRESH : li_zmatrl_bo_status.
I am new to SRM and any help is appreciated.
Thanks,
Nikhil
1. Running into an issue where when i delete a item from SC it still gets passed to bbp_doc_check method that we have customized.
CALL FUNCTION 'BBP_PD_SC_GETDETAIL'
EXPORTING
i_guid = iv_doc_guid
i_with_itemdata = 'X'
IMPORTING
e_header = ls_header
TABLES
e_item = lt_item
e_account = lt_account
e_partner = lt_partner.
2. When i run in debug mode using SM50 and breakpoints...i see the complete method get executed 2 times.
3. Also the following step in program gets executed 2 times in both runs (when 1 item is present in shopping cart...basically its n + 1 times where n = number of items whethere deleted or not) first with ls_account-zzitem_type_flag value as XI then product categories of the item.
IF ls_account-zzitem_type_flag = 'E'.
MOVE 'Y' TO lv_expense_found.
ELSEIF ls_account-zzitem_type_flag = 'C'.
MOVE 'Y' TO lv_capital_found.
ENDIF.
4. What does the following statement do?
REFRESH : li_zmatrl_bo_status.
I am new to SRM and any help is appreciated.
Thanks,
Nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
This BADI allows SRM customer to check that the document data is semantically correct based on the business rule you want to implement.
If you have a need not to execute the check BADI logic when you are performing a deletion action on screen, you can check the sy-ucomm value of this action within the BADI and bypass the program codes in this BADI completely.
Regards.
Hi,
1. When an item is deleted, the indicator DEL_IND would be set in the line item details. So, you deleted item will be still there but with the deletion indicator set.
2. The below statement clears/initializes the internal table li_zmatrl_bo_status.
REFRESH : li_zmatrl_bo_status.
3. doc_check_badi will be called for all events on the shopping cart application. Hence use SY-UCOMM to restrict when it should process the data.
4. Note that there can be multiple account assignments for a single line item. Please check that.
Regards
Kathirvel
hi,
I am checking for
LOOP AT lt_account INTO ls_account WHERE del_ind = space.
Inspite of that I get the deleted item in ls_account
Is there are syntax issue?
Also when there is change is SC what are the events that take place in background and their sequence?
1. ZBBP_DOC_CHANGE_BADI and then
2. ZBBP_DOC_CHECK_BADI ?
Thanks,
Nikhil
Hi,
There is no sytax or coding problem in your logic. Since the line item has the deletion indicatot set, I would recommend you to adopt the below logic:
* Loop at Item Table
LOOP AT lt_item INTO ls_item WHERE del_ind <> "X".
* Loop into the acoount assignment for the corresponding line item
LOOP AT lt_account INTO ls_account WHERE P_GUID = ls_item-guid.
* Your logic goes here
ENDLOOP.
ENDLOOP.
Now the account assignment table not be processed for the deleted items.
Best Regards
Kathirvel
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.