cancel
Showing results for 
Search instead for 
Did you mean: 

How to find approved SCs that did not create PO?

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Ajay,

We want to input only a date on selection screen, so system should consider only the SCs that were approved that day and check whether any of those SCs did not generate POs. Output should list only such SCs.

Regards,

Karthik

Former Member
0 Kudos

Hi Karthik,

Have you tried extracting the data from the tables:

- crmd_orderadm_i

- crmd_orderadm_h

Br,

Raghu.

Former Member
0 Kudos

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

Answers (0)