on 07-21-2011 9:35 PM
Hello Experts,
I know that it is ABAP question. The reason i am posting here because it is related SRM development.
In SRM 5.5 version,
When we test FM directly in se37 by giving I_ITEM_CATEGORY_ID (input - Product ID), it is giving only one contract as output ie E_PDLIST. Here it brings only one active contract.
But the same function module if we call thru BADI Method (IF_EX_BBP_SOS_BADI~BBP_SOS_SEARCH), if we pass the same input (One category id) and we are getting the 3 contracts in output . Basically it brings expired contract also.
Any hint will be highly appreciated.
Thanks in advance.
Here is the code:
METHOD if_ex_bbp_sos_badi~bbp_sos_search.
DATA: category_id TYPE bbp_category_id.
DATA e_pdlist TYPE TABLE OF bbp_pds_ctr_pdlist.
DATA: ls_pdlist TYPE bbp_pds_ctr_pdlist.
category_id = is_search_criteria-category_id.
*** Calling FM BBP_PD_CTR_GETLIST ****
CALL FUNCTION 'BBP_PD_CTR_GETLIST'
EXPORTING
* I_DESCRIPTION =
* I_TREX_KEYWORDS =
* I_CHANGED_BY =
* I_CREATED_BY =
* I_CREATE_DATE =
* I_CREATE_DATE_TO =
* I_CHANGE_DATE =
* I_CHANGE_DATE_TO =
* I_VALID_FROM =
* I_VALID_UNTIL =
* I_TEMPLATE_TYPE =
* I_OBJECT_ID =
* I_SUBTYPE =
* I_PROCESS_TYPE =
* I_PARTNER =
* I_PARTNER_FCT =
* I_PROC_GROUP =
* I_PROC_ORG =
* I_PLUS_EMPTY_GROUP =
* I_WITH_CLOSED =
* I_INCOMPLETE =
* I_WITH_CHANGE_VERSION =
* I_READ_FROM_ARCHIVE =
* IV_EXPIRED =
* IV_READ_PRODUCT_CATEGORY_HIER =
* IS_READ_INITIAL_PARAMETER =
* I_READ_ORGDATA =
* I_ITEM_DESCRIPTION =
* i_item_product =
* I_ITEM_ORDERED_PROD =
* I_ITEM_PARTNER_PROD =
* IV_ITEM_MANU_PROD =
* IV_ITEM_MFR_NO_EXT =
* i_item_category =
i_item_category_id = category_id
* I_ITEM_NOT_DELETED =
* I_WITHOUT_COMPANY_CHECK =
* IV_ROOT =
* i_max_hits = 0
TABLES
* I_HEADER_GUIDS =
* I_RANGE_OBJECT_ID =
* I_STATUS =
* I_PARTNERS =
* IT_RANGE_FUND =
* IT_RANGE_FUNDS_CTR =
* IT_RANGE_CMMT_ITEM =
* IT_RANGE_FUNC_AREA =
* IT_RANGE_G_L_ACCT =
* IT_CUF_SEARCH =
* IT_ITEM_CUF_SEARCH =
* IT_RANGE_PROC_ORG =
* IT_RANGE_PROC_GROUP =
* IT_ITEM_PARTNERS =
* IT_ITEM_RANGE_CATEGORY_ID =
* IT_ITEM_RANGE_ORDERED_PROD =
e_pdlist = e_pdlist[]
* E_STATUS =
e_messages = e_messages.
* CHANGING
* EV_HITS_FOUND =
ENDMETHOD.
Thanks
Praba
Thanks everyone
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In your code, try to set parameter IV_EXPIRED explicitly to constant /sapsrm/if_pdo_search_c=>gc_getlist_expired_no.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
This issue is resolved. We need to get e_status.
Solution:
DATA e_status TYPE TABLE OF bbp_pds_status.
e_status = e_status[]
Reason:
Inside this FM, there is check for e_status
* General constants
CONSTANTS: c_on TYPE xfeld VALUE 'X',
IF e_status IS REQUESTED.
lv_status_requested = c_on.
ELSE.
lv_status_requested = c_off.
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.