Sunday, December 26, 2010

Checking the PR deletion indicator

Enhancement Name - MEREQ001
Exit Name - EXIT_SAPLMEREQ_005
Exit Import Parameter IM_REQ_ITEM reference to interface IF_PURCHASE_REQUISITION_ITEM.

I need to read PR number from this import parameter, the field corresponds to the PR number is BANFN.
DATA: wf_banfn LIKE eban-banfn.
DATA: obj_requisition TYPE REF TO if_purchase_requisition.
DATA: loc_data_doc TYPE mereq_header.
*--->>>
CALL METHOD im_req_item->get_requisition
RECEIVING
re_requisition = obj_requisition.

IF NOT obj_requisition IS INITIAL.
*--->>> Getting the purchasing Document number
CALL METHOD obj_requisition->get_data
RECEIVING
re_data = loc_data_doc.

wf_banfn = loc_data_doc-banfn. " this will return the PR Number
ENDIF.

No comments: