Skip to Content
0
Former Member
Oct 29, 2014 at 04:11 PM

BADI ORDER_SAVE CHECK_BEFORE_SAVE Validate Mandatory fields

46 Views

Hello all, I'm trying to validate if mandatory fields are filled on save and end interaction of new service request. For this i need to check fields: company code, categories, description, service group, requestor and initiator. For the parties involved i need to have the information on et_partner from FM CRM_ORDER_READ, but my issue is that i get a short dump everytime put et_partner and et_activity_h on the importing parameters. All data types are created correctly, i don't know what's issue.

lt_partner TYPE CRMT_PARTNER_EXTERNAL_WRK,

lt_subject TYPE CRMT_SUBJECT_WRKT,

CALL FUNCTION 'CRM_ORDER_READ'

EXPORTING it_header_guid = lt_header_guid

* iv_no_auth_check = 'X'

IMPORTING

et_orderadm_h = lt_orderadm_h

et_orgman = lt_orgman

et_appointment = lt_appointment

et_text = lt_text

et_subject = lt_subject

* ET_ACTIVITY_H = lt_activity

et_partner = lt_partner

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 .

IF sy-subrc <> 0.

* Implement suitable error handling here

ENDIF.

Any help would be highly appreciated. Many Thanks and Best regards, João Graça