Dear All Expert,
Need initial Quote prize form Quotation number. Need to know the link between ‘BBP_PDHAD_V’ and ‘BBP_PDIGP’
I have did this but for performance i dont want to use FM BBP_PD_QUOT_GETDETAIL. Please check my way :-
I have did this:
SELECT guid object_id created_at
INTO TABLE it_version_data
FROM bbp_pdhad_v
FOR ALL ENTRIES IN it_obj_id “ List of all object id
WHERE object_id EQ it_obj_id-object_id.
“For one quotation there may be N number of version so I am sorting it and “deleting adjacent duplicates by comparing Object id.
SORT it_version_data BY object_id created_at ASCENDING.
DELETE ADJACENT DUPLICATES FROM it_version_data COMPARING object_id.
“ So now I have all quotation numbers with their first Version Guid.
Now I am using FM ‘BBP_PD_QUOT_GETDETAIL’
CALL FUNCTION 'BBP_PD_QUOT_GETDETAIL'
EXPORTING
i_guid = wa_version_data-guid " GUID of 1st Version of Quataion
i_object_id = wa_ version_data-object_id
TABLES
e_item = it_item
* E_VERSION = It_VERSION
.
“And I get all item in IT_ITEM with their initial price.
“Using loop I will get item with price in FIRST QUOTAION
LOOP AT it_item INTO wa_item.
wa_e_t_data-object_id = wa_obj_id-object_id.
wa_e_t_data-part_no = wa_item-ZZPARTNO.
wa_e_t_data-DESCRIPTION = wa_item-DESCRIPTION.
wa_e_t_data-price = wa_item-price.
IF wa_e_t_data IS NOT INITIAL.
APPEND wa_e_t_data TO e_t_data.
ENDIF.
ENDLOOP.
It is working fine. But As it Is run for all records in table it is taking too much of time.
Now I know that Table : BBP_PDIGP have price for version. But I don’t know the link between ‘bbp_pdhad_v’ and BBP_PDIGP. If you help me then instead of loop I will use for all entries and make performance faster.
Please Advice...