Wednesday, March 21, 2012

Update service in quotation document (RFQ)

A quotation document can have service lines instead of normal material lines. It is an external component of the document, here we will see how to update service line.

The functionality for managing services is in the function group MLSP. How service is integrated is described here.

These are following steps to update service line:

  1. Read service data in internal table of the function group. This is achieved by function module MS_GET_SERVICES.
  2. Set data in the internal table by calling function module MS_FILL_TABS_FROM_EXT_DATA and MS_CHANGE_SERVICE_PACKAGE.
  3. After that save by calling MS_SAVE_SERVICE_PACKAGE.

The function call requires communication structure COMSRV. This can be filled from the structure EKKO and EKPO. It is important that COMSRV-REF_BSTYP is set to ‘C’ (change). Refer function module BAPI_PO_CHANGE.