on 06-01-2015 6:57 AM
Hello Experts,
We have SRM5 ECS, we would like to have a custom report to extract the approved SCs that did not create POs automatically. I think of taking all GUIDs from CRM_JCDS that got status 'I1129' on a particular date and checking CRMD_ORDERADM_H (OBJECT_ID) and BBP_PDBEI (BE_TRACKING_NO) if BE_OBJECT_ID (PO number) is empty.
It will take a long time just to process CRM_JCDS table in Dev system itself, so please tell me a shortest way to identify such SCs.
Regards,
Karthik
Hi Karthikeyan,
You can extract the entire list of SCs for a given day and pass their Item GUIDs into FM - BBP_PD_SC_ITEM_GETDETAIL and check the item status in E_STATUS. If the active status is I1129 (i.e I1111 and I1113 are not yet active), then you can fetch such SCs into your output.
Regards,
Ajay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
Below code will get the approved SCs that did not generate POs in SRM5.
TYPES: BEGIN OF ls_sc,
sc LIKE swiwiobjct-objkey,
END OF ls_sc.
DATA: wa_sc TYPE ls_sc,
lt_sc TYPE TABLE OF ls_sc,
wa_status TYPE bbp_pds_status,
lt_status TYPE TABLE OF bbp_pds_status.
DATA lv_sc TYPE crmt_object_id_db.
PARAMETERS date TYPE sy-datum.
SELECT DISTINCT objkey FROM swiwiobjct INTO TABLE lt_sc
WHERE objtype EQ 'BUS2121' AND
wi_stat EQ 'COMPLETED' AND
wi_rh_task EQ 'WSXXXXXXXX' AND
wi_aed EQ date.
LOOP AT lt_sc INTO wa_sc.
lv_sc = wa_sc-sc.
CALL FUNCTION 'BBP_PD_SC_GETDETAIL'
EXPORTING
i_object_id = lv_sc
TABLES
e_status = lt_status.
READ TABLE lt_status WITH KEY stat = 'I1113' TRANSPORTING NO FIELDS.
IF sy-subrc IS NOT INITIAL.
WRITE:/ wa_sc-sc.
ENDIF.
ENDLOOP.
Regards,
Karthik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.