Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to use CRM_Status_Read in SAP ABAP

0 Kudos

Dear all,

I'm a newbie in SAP ABAP.

I want to know that How to use FM CRM_Status_Read.

In table crmd_orderadm_h have a field GUID and I want to show status by passing the GUID to the FM CRM_Status_Read.

I don't know how to fill parameters in this FM.

Please help me this problem.

FORM create_output USING i_t_crmd_orderadm_h TYPE g_tt_orderadm_h
                CHANGING e_t_out             TYPE g_tt_out.
  DATA: l_r_crmd_orderadm_h TYPE g_ty_orderadm_h,
        l_r_out             TYPE g_ty_out.
            .
  IF sy-subrc <> 0.
* Implement suitable error handling here
  ENDIF.
  
  LOOP AT i_t_crmd_orderadm_h INTO l_r_crmd_orderadm_h.
    CALL FUNCTION 'CRM_STATUS_READ'
      EXPORTING
*       CLIENT                 = SY-MANDT
        objnr                  = 
*       ONLY_ACTIVE            = ' '
*     IMPORTING
*       OBTYP                  =  
*       STSMA                  =
*       STONR                  =  
*       ET_JEST_BUF            =
*     TABLES
*       STATUS                 =
ENDFORM.

Best Regards,

Huy Vu

4 REPLIES 4

former_member660513
Participant
0 Kudos

You need to pass a value to the importing parameter objnr, you can do this by

objnr = l_r_crmd_orderadm_h-<the_name_of_the_field_that_contains_the_guid>

0 Kudos

Hi Slavov,

Do I need to pass Status Number (STONR)? Because in table crmd_orderadm_h don't have a field with status number, so I must join with another table ?

FredericGirod
Active Contributor
0 Kudos

you do not have a standard report CRM_ORDER_READ ?

0 Kudos

Hi Girod,

Please help me how to fill parameter in CRM_ORDER_READ.

I don't know how to fill exactly.