Well, after I did the initial implementation, I found there were a few things missing. So I wanted to document those right now, to make it clear what needs to happen.
First, in order to make the entry screen function properly, you need to update the transactions allowed with the equipment record. You can do that by going to transaction: VFBS
Enter in program: SAPMIEQ0
Select Function codes.
Find the entry for ENT1 and copy it. Change ENT1 to 19 and Save.
Within the same transaction, go to T185 (the second radial button) for the same program.
Find the entry for ENT1 again and copy it. Change ENT1 to 19 in the first FCode column. Leave everything else the same.
This will get rid of the error that the function doesn’t exist.
This got me to a working screen, but when I saved it, it never wrote the entries back to BGMKOBJ. So I did some more digging.
In CMOD for the user exit, you need to change the code to be:
e_subscreen_number = ‘1000’.
CALL FUNCTION ‘WTY20_OBJNR_SET’
EXPORTING
IV_OBJNR = i_data_equi–objnr.
Next, in the Badi: change the code to be:
field-symbols:<bgmkobj_new> TYPE wty_bgmkobj_tab,
<bgmkobj_old> TYPE table.
ASSIGN (‘(SAPLWTY20)gt_bgmkobj_new’) TO <bgmkobj_new>.
check sy–subrc = 0.
ASSIGN (‘(SAPLWTY20)gt_bgmkobj_old2’) TO <bgmkobj_old>.
check sy–subrc = 0.
CALL FUNCTION ‘WTY20_DB_UPDATE_BGMKOBJ2’
EXPORTING
i_data_equi = i_data_equi
it_bgmkobj_new = <bgmkobj_new>
it_bgmkobj_old = <bgmkobj_old>.
unassign:<bgmkobj_new>, <bgmkobj_old>.
Once you make these updates, you will have multiple master warranties for a singe equipment record. Pretty slick. Now my next mission is to figure out how to make use of these entries within the service notification. More to come soon.
Thanks for reading,
As always, thanks for reading and don't forget to check out our SAP Service Management Products at my other company JaveLLin Solutions,Mike