on 04-28-2010 8:11 AM
Hi everybody!
Would you so kind to help me with getting contract's history?
I need to get the history for contracts. But FM
BBP_PD_CTR_DOC_FLOW does not work fine.
Table of history after second call of FM BBP_PD_CTR_DOC_FLOW is empty.
1. Start se37 and fill BBP_PD_CTR_DOC_FLOW.
2. Fill IS_OBJECT_KEY-H_GUID by GUID of any existing contract.
3. Press Execute(F8).
In this moment we have a table ET_CTR_HISTORY filled by History.
Then back to previous screen and press Execute(F8) again.
Now the table of history ET_CTR_HISTORY is empty.
(If i Restart se37 - all works fine again)
We have the same situation if call FM BBP_PD_CTR_DOC_FLOW twice.
First call returns full table and second call - empty.
CALL FUNCTION 'BBP_PD_CTR_DOC_FLOW'
EXPORTING
IS_OBJECT_KEY = LS_OBJECT_KEY
IMPORTING
E_BE_LOG_SYSTEM =
TABLES
ET_CTR_HISTORY = LT_CTR_HISTORY
EXCEPTIONS
BID_NOT_FOUND = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*----
" Now LT_CTR_HISTORY is full.
*----
CALL FUNCTION 'BBP_PD_CTR_DOC_FLOW'
EXPORTING
IS_OBJECT_KEY = LS_OBJECT_KEY
IMPORTING
E_BE_LOG_SYSTEM =
TABLES
ET_CTR_HISTORY = LT_CTR_HISTORY
EXCEPTIONS
BID_NOT_FOUND = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*----
" Now LT_CTR_HISTORY is empty.
*----
And I have same situation with calling FM BBP_PD_BID_DOC_FLOW - For BID history.
In case of calling FM inside of BADI that starts more than once (for example
BBP_DOC_CHECK_BADI) we have full history in first call and empty in second.
I tried to use
function BBP_PDH_OR_RESET_ALL_BUFFERS that reset object relations. But it doesn't help.
Help me Please.
Apparently, these FMs, i.e. BBP_PD_*_DOC_FLOW are not meant to be used independently. They use global parameters (to the whole function group) such as gt_found which is populated and used in multiple places. What you should do is to use FM BBP_PD_GETHISTORY instead. For the input parameter I_OBJECT_KEY, input the H_OBJECT_TYPE with the object type, such as BUS2200 for Bid Invitation or BUS2000113 for Contract, and H_GUID with document GUID. You should be able to get history every time.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.