on 2024 Sep 25 8:35 AM
I want to auto populate person responsible field in IW33. The service order of certain order type and PM activity type is created through a custom transaction (using BAPI_ALM_ORDER_MAINTAIN).
I tried using pers_no in wtbl_oper table for the BAPI in the custom program but that did not reflect in IW33 screen. So I am thinking of using enhancements for order creation at save which will let me update the pernr field in afvgd structure for the ordertype-activitytype combination
Any other suggestions are welcome as well. Thanks!
Request clarification before answering.
From your screenshot the displayed field seems to be a partner defined at header of order header
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, this is an order partner, partners can be many entities: customers, suppliers, employees, etc.
Field would be IHPA-PARNR
Hi, thanks for your insight, If I might add one more thing about the field, It doesn't seem to be a partner number like char12, the field in concern has char 8 like in PMPARTNER structure PERNR field. And the values are like 0000580, 00007843 etc. So, I think this table and FMs won't be the right fit
The employee number is 8 characters long, but other partners such as suppliers or customers are 12 characters long. Have you had a chance to browse the IHPA table or test some of the provided FM?
The field you identified seems to be this one, at operation level
Start by testing BAPI_ALM_ORDER_GET_DETAIL on an existing order on which the employee number appears. Explore the returned data to find this personnel number.
The logic that displays this field (a subscreen in a subscreen) looks like
* Anlagezustand Text ermitteln
FIELD CAUFVD-ANLZU MODULE ANLZU_CHECK_PBO.
CALL SUBSCREEN PARTNER INCLUDING Y_PARTNER_PROGRAM " <--- here
Y_SUB_DYNPRO_PARTNER.
CALL SUBSCREEN SUB_PM_ADDR INCLUDING YSAPLCOIH PM_ADDR.
Values come from Customizing (a partner type)
SELECT SINGLE * FROM TPAR INTO LS_TPAR
WHERE PARVW = T350-PARVW_VERA.
IF LS_TPAR-NRART = 'PE'.
"/ screen from saplcoih.
Y_PARTNER_PROGRAM = YSAPLCOIH.
Y_SUB_DYNPRO_PARTNER = Y_SUB_DYNPRO_PARTNER_COIH.
ELSE.
"/ screen from SAPLIPAR
Y_PARTNER_PROGRAM = YSAPLIPAR.
Y_SUB_DYNPRO_PARTNER = Y_SUB_DYNPRO_PARTNER_KOPF.
ENDIF.
NB: 'PE' means that the partner is an employee
In the MASS change transaction for PM ordres, there is a mapping that link also to partner
Class CL_IWO_MASS_CHANGE_STANDARD2 method GET_HEADER_MAPPING
et_mapping_table = VALUE #( ( structure = 'BAPI_ALM_ORDER_HEADERS_I' bapi_fieldname = 'ORDPLANID' internal_fieldname = 'MAINTENANCEORDERPLANNINGCODE' )
" ...
( structure = 'BAPI_ALM_ORDER_PARTN_MUL' bapi_fieldname = 'RESPONSIBLEUSER' internal_fieldname = 'RESPONSIBLEUSER' )
" ...
Try to debug on your system.
User | Count |
---|---|
31 | |
10 | |
8 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.