Skip to Content
0
Former Member
Aug 14, 2009 at 01:33 PM

Follow up to MRSS planning board how to populate

337 Views

Thanks for teh reply Varun. It was correct as I did not knwo that the create/save populate teh planning board data via the BADi.

However 3 of the 4 added fields TPLNR, ABCKZ, and ILARTa re being populated in the Order Change (IW32) transaction but the field called Remaining Work field OFMNW_2 is not. It is generally calculated when teh actual work in teh IW41 confirmation is changed to less than planned. I.E. if the planned work was 8 and the operator puts 4 in actual work, then the IW41 screen shows remeaining work field filled in with the difference (4).

How can I populate this field via the BADi implementation PUSH_TO_MRS method. I tried to link the user exit for confirmation save (Enhancement CONFPM05, user exit EXIT_SAPLCORF_005 INCLUDE ZXCOFU05) to then invoke the instance of the class method call in the user exit after saving the remaing work field in an EXPORT to MEMORY ID:

Here is the code in the user exit that then fires off the BADI implementaion method PUSH_TO_MRS

read table AFRUD_TAB index 1.

EXPORT AFRUD_TAB-ISMNW to memory id 'z_OFMNW'.

data z_ZCL_IM_MRSS_RSG_PM_INT type ref to ZCL_IM_MRSS_RSG_PM_INT.

data zheader type BAPI_ALM_ORDER_HEADER_E.

data wa_zCT_INFO type line of /MRSS/T_DEM_INFO_EXT_TAB.

DATA: Z_DEM_H type /MRSS/T_DEM_H_EXT_TAB,

zCT_ADM type /MRSS/T_DEM_ADM_WRK_EXT_TAB,

zCT_PLR type /MRSS/T_DEM_PLR_EXT_TAB,

zCT_PLRS type /MRSS/T_DEM_PLRS_EXT_TAB,

zCT_INFO type /MRSS/T_DEM_INFO_EXT_TAB,

zCT_TOOL type /MRSS/T_DEM_TOOL_EXT_TAB,

zCT_RELAT type /MRSS/T_DEM_RELAT_EXT_TAB,

zCT_QUALIF type /MRSS/T_QUALIF_REQ_DEM_EXT_TAB,

zCT_ASSIGNMENT type /MRSS/T_ASS_KEY_EXT_TAB,

zCT_STATUS type /MRSS/T_DEM_STATUS_EXT_TAB,

zCT_PARTNER type /MRSS/T_DEM_PARTNER_EXT_TAB,

zCT_OPERATIONS type /MRSS/T_DEM_OPERATION_TAB.

create object z_ZCL_IM_MRSS_RSG_PM_INT.

z_zcl_im_mrss_rsg_pm_int->/mrss/if_ex_rsg_pm_int~push_to_mrs(

EXPORTING

is_header = zheader

changing

ct_dem_h = Z_DEM_H

ct_adm = zCT_ADM

ct_plr = zCT_PLR

ct_plrs = zCT_PLRS

ct_info = zCT_INFO

ct_tool = zCT_TOOL

ct_relat = zCT_RELAT

ct_qualif = zCT_QUALIF

ct_assignment = zCT_ASSIGNMENT

ct_status = zCT_STATUS

ct_partner = zCT_PARTNER

ct_operations = zCT_OPERATIONS

  • EXCEPTIONS

  • failed = 1

  • others = 2

).

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDIF.

____________________________________________________________________________________________________________________________________