Quantcast
Viewing all articles
Browse latest Browse all 8735

Help regarding CRM_ORDER_READ

Hi all,

 

I'm new to BADI implementation. Trying to figure out how it works.

 

For example, while creating the service order, I would like to retrieve the products attached to the service order and do some validations. I’ve searched this forum and found the code below.

 

CALL FUNCTION 'CRM_ORDER_READ'

EXPORTING

IT_HEADER_GUID = lt_header_guid

IMPORTING

ET_PRODUCT_I = lt_product_i

ET_ORDERADM_H = lt_order_adm_h

EXCEPTIONS

document_not_found = 1

error_occurred = 2

document_locked = 3

no_change_authority = 4

no_display_authority = 5

no_change_allowed = 6

OTHERS = 7.

 

I passed iv_guid to lt_header_guid and called the FM. But, I’m getting the error below.

Exception Details

CX_SY_DYN_CALL_ILLEGAL_TYPE - The function call of CRM_ORDER_READ failed; a field may have been assigned to the parameter IT_HEADER.

I checked the data types of the parameters I pass, all are of same type.

My questions:

  1. when the service order is not yet saved, then from where the GUID is getting populated?
  2. Is this the correct FM to use to get the current screen values that we enter, before saving? I was thinking about the FM CRM_ORDER_READ_OW.

Please help me with these things. Your help is much appreciated. Thank you.


Viewing all articles
Browse latest Browse all 8735

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>