on 03-03-2011 1:26 PM
Hi all,
I've created an implementation of the badi BBP_SOS_BADI. The problem is that if I fill the table et_found_contract the result list is displayed empty.
This is my code:
METHOD if_ex_bbp_sos_badi~bbp_sos_search.
DATA: ls_index_search TYPE bbps_index_search,
ls_found_contract LIKE LINE OF et_found_contract.
MOVE-CORRESPONDING is_search_criteria TO ls_index_search.
CLEAR: ls_index_search-proc_org.
CALL FUNCTION 'BBP_PD_INDEX_FIND'
EXPORTING
iv_check_location = 'X'
is_index_search = ls_index_search
IMPORTING
et_found_contracts = et_found_contract
EXCEPTIONS
mandatory_field_missing = 1
no_search_criteria = 2
OTHERS = 3.
* Modify position ID
LOOP AT et_found_contract INTO ls_found_contract.
ls_found_contract-pos_id = is_search_criteria-pos_id.
MODIFY et_found_contract FROM ls_found_contract.
ENDLOOP.
IF et_found_contract[] IS INITIAL.
cv_search_for_contract = 'X'.
ELSE.
cv_search_for_contract = SPACE.
ENDIF.
ENDMETHOD.
I'm seeing the code of the example class CL_EX_BBP_SOS_BADI but i don't understand anything...
Can anyone help me?
Thanks in advance.
Solved.
This is my code:
DATA: ls_index_search TYPE bbps_index_search,
ls_found_contract LIKE LINE OF et_found_contract.
MOVE-CORRESPONDING is_search_criteria TO ls_index_search.
CLEAR: ls_index_search-proc_org.
CALL FUNCTION 'BBP_PD_INDEX_FIND'
EXPORTING
iv_check_location = 'X'
is_index_search = ls_index_search
IMPORTING
et_found_contracts = et_found_contract
EXCEPTIONS
mandatory_field_missing = 1
no_search_criteria = 2
OTHERS = 3.
* Read contract details and enhance data
PERFORM contract_enhance IN PROGRAM SAPLBBP_PD_SOS USING iv_tolerant_search
is_search_criteria
CHANGING et_found_contract.
IF et_found_contract[] IS INITIAL.
cv_search_for_contract = 'X'.
ELSE.
cv_search_for_contract = SPACE.
ENDIF.
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.