08-09-2006 2:13 PM
Hello,
I am looking for a function module/bapi that can <u>update</u> PM notification.
The function module/bapi must contain in the import tab the structure of the table <u>qmel</u>.
I didn't succeed to find one - I must have the structure of the qmel in the import section because we have here a customer include in qmel and we want to update the fields that we added from the portal system.
Does anyone here have an idea??
Thanks so much.
Ruthie.
08-09-2006 2:17 PM
BAPI_ALM_NOTIF_DATA_MODIFY and BAPI_ALM_NOTIF_CREATE are there, but not sure if they have the qmel structure.
regards,
ravi
08-09-2006 2:15 PM
08-09-2006 2:17 PM
BAPI_ALM_NOTIF_DATA_MODIFY and BAPI_ALM_NOTIF_CREATE are there, but not sure if they have the qmel structure.
regards,
ravi
08-09-2006 2:21 PM
08-09-2006 2:21 PM
Hi Ravi & Suresh,
Thanks for your answer.
But BAPI_ALM_NOTIF_DATA_MODIFY and BAPI_ALM_NOTIF_CREATE
don't have the qmel structure.
Best Regards,
Ruthie.
08-09-2006 2:23 PM
Check the business object <b>QMSM</b> in SWO1. You could find FMs there.
I could see IQS4_CHANGE_STATUS_TASK, also check more there.
~thomas
08-09-2006 2:24 PM
Hi Suresh,
Thanks.
IQS0_CHANGE_NOTIFICATION also don't have the qmel structure.
Best Regards,
Ruthie.
08-09-2006 2:28 PM
Hey Ruthie,
Even though the interface of functions BAPI_ALM_NOTIF_DATA_MODIFY, BAPI_ALM_NOTIF_CREATE and BAPI_ALM_NOTIF_DATA_ADD do not have a direct reference to QMEL structure it creates/updates the notifications correctly.
I am using it in my current assignment successfully.
Give it a shot.
-Kiran
08-09-2006 2:27 PM
Hi,
Check the BAPI<b> BAPI_ALM_ORDER_MAINTAIN</b> , this will help you.
Regards
vijay
08-09-2006 2:42 PM
Hi Kiran,
I must have the structure of the qmel because we added here <u>customer include</u> to the qmel table and we want to update the <u>fields that we added</u> from the <u>portal</u> system.
Best Regards,
Ruthie.
02-13-2007 9:34 AM
Hi Ruthie
We have exactly the same problem - did you ever get a resolution for this?
Having dug into the code for BAPI_ALM_NOTIF_CREATE we found a structure called RIQS5 which is mapped to the notification header BAPI import structure BAPI2080_NOTHDRI in function MAP2I_BAPI2080_NOTHDRI_RIQS5. The latter function is generated using transaction BDBS. We are considering adding CI_QMEL to these structures using an append structure and running BDBS to regenerate the function module but haven't tried this yet.
Chris Brain
11-04-2008 3:53 PM
Hello,
I've struggled also with this but got it now working for Notification Items:
There are quite some steps involved
Table QMFE enhanced
Append Structure: ZZPM_QMFE (E00010 Append Structure QMFE: PM/QM Notification Items)
Field Name Type Length Data Elem. Short Text
ZZ_BULK_IN_SPEC QUAN 13 Z_PM_QNTY_BULK_IN_SPEC E00010 Quantity Bulk in Specification
ZZ_BULK_OFF_SPEC QUAN 13 Z_PM_QNTY_BULK_OFF_SPEC E00010 Quantity Bulk off Specification
ZZ_WASTE QUAN 13 Z_PM_QNTY_WASTE E00010 Quantity Waste
ZZ_WEIGH_FACT DEC 4 Z_PM_FLOC_WEIGHT_FACT Functional Location Weighing Factor
ZZ_AUSVN DATS 8 AUSVN Start of Malfunction (Date)
ZZ_AUZTV TIMS 6 AUZTV Start of Malfunction (Time)
ZZ_AUSBS DATS 8 AUSBS End of Malfunction (Date)
ZZ_AUZTB TIMS 6 AUZTB End of Malfunction (Time)
ZZ_EAUSZT DEC 11 EAUSZT Breakdown Duration
Structure BAPI2080NOTITEMI Enhanced_
Append Structure: ZZPM_BAPI2080_NOTITEMI (E00010 Append Structure for BAPI2080_NOTITEMI)
Field Name Type Length Data Elem. Short Text
ZZ_BULK_IN_SPEC CHAR 17 Z_PM_QNTY_BULK_IN_SPEC_CHAR E00010 Quantity Bulk in Specification (CHAR)
ZZ_BULK_OFF_SPEC CHAR 17 Z_PM_QNTY_BULK_OFF_SPEC_CHAR E00010 Quantity Bulk off Specification (CHAR)
ZZ_WASTE CHAR 17 Z_PM_QNTY_WASTE_CHAR E00010 Quantity Waste (CHAR)
ZZ_WEIGH_FACT CHAR 5 Z_PM_FLOC_WEIGHT_FACT_CHAR Functional Location Weighing Factor (CHAR)
ZZ_AUSVN DATS 8 AUSVN Start of Malfunction (Date)
ZZ_AUZTV TIMS 6 AUZTV Start of Malfunction (Time)
ZZ_AUSBS DATS 8 AUSBS End of Malfunction (Date)
ZZ_AUZTB TIMS 6 AUZTB End of Malfunction (Time)
ZZ_EAUSZT CHAR 14 Z_EAUSZT_CHAR Breakdown Duration (CHAR)
FMGEIN UNIT 3 QMGEIN Unit of Measure for Item
Structure BAPI2080NOTITEMI_X Enhanced_
Append Structure: ZZPM_BAPI2080_NOTITEMI_X (E00010 Append Structure for BAPI2080_NOTITEMI_X)
Field Name Type Length Data Elem. Short Text
ZZ_BULK_IN_SPEC CHAR 1 BAPIUPDATE Updated information in related user data field
ZZ_BULK_OFF_SPEC CHAR 1 BAPIUPDATE Updated information in related user data field
ZZ_WASTE CHAR 1 BAPIUPDATE Updated information in related user data field
ZZ_WEIGH_FACT CHAR 1 BAPIUPDATE Updated information in related user data field
ZZ_AUSVN CHAR 1 BAPIUPDATE Updated information in related user data field
ZZ_AUZTV CHAR 1 BAPIUPDATE Updated information in related user data field
ZZ_AUSBS CHAR 1 BAPIUPDATE Updated information in related user data field
ZZ_AUZTB CHAR 1 BAPIUPDATE Updated information in related user data field
ZZ_EAUSZT CHAR 1 BAPIUPDATE Updated information in related user data field
FMGEIN CHAR 1 BAPIUPDATE Updated information in related user data field
Structure RFCVIQMFE Enhanced_
Append Structure: ZZPM_RFC_VIQMFE (E00010 Append Structure for RFC_VIQMFE)
Field Name Type Length Data Elem. Short Text
ZZ_BULK_IN_SPEC QUAN 13 Z_PM_QNTY_BULK_IN_SPEC E00010 Quantity Bulk in Specification
ZZ_BULK_OFF_SPEC QUAN 13 Z_PM_QNTY_BULK_OFF_SPEC E00010 Quantity Bulk off Specification
ZZ_WASTE QUAN 13 Z_PM_QNTY_WASTE E00010 Quantity Waste
ZZ_WEIGH_FACT DEC 4 Z_PM_FLOC_WEIGHT_FACT Functional Location Weighing Factor
ZZ_AUSVN DATS 8 AUSVN Start of Malfunction (Date)
ZZ_AUZTV TIMS 6 AUZTV Start of Malfunction (Time)
ZZ_AUSBS DATS 8 AUSBS End of Malfunction (Date)
ZZ_AUZTB TIMS 6 AUZTB End of Malfunction (Time)
ZZ_EAUSZT DEC 11 EAUSZT Breakdown Duration
FMGEIN UNIT 3 QMGEIN Unit of Measure for Item
Remark: of course the FMGEIN field is not how it should be done but why did sap not foresee it?
Mapping Function Modules maintained by TRx BDBS
MAP2I_BAPI2080_NOTITEMI_VIQMFE
MAP2E_VIQMFE_BAPI2080_NOTITEMI
TAKE CARE: ONE CAN NOT DISPLAY HOW THE FUNCTION WAS ORIGINALY GENERATED. THE PROPOSITION IT SHOWS IS JUST BASED ON NAMES AND/OR TYPES IN THE STRUCTURE => THE ORIGINAL MAPPING YOU HAVE TO DERIVE FROM THE ACTUAL GENERATED CODE
So to generate a new one I took the option to have a subroutine generated
So something like:
BAPI2080_NOTITEMI
RFC_VIQMFE
Original New
REFOBJECTKEY REFOBJKEY REFOBJKEY
ITEM_KEY FENUM Not accepted anymore
ITEM_SORT_NO POSNR POSNR
DESCRIPT FETXT FETXT
D_CODEGRP FEGRP FEGRP
D_CODE FECOD FECOD
DL_CODEGRP OTGRP OTGRP
DL_CODE OTEIL OTEIL
ASSEMBLY BAUTL BAUTL
ASSEMBLY_EXTERNAL
ASSEMBLY_GUID
ASSEMBLY_VERSION
ZZ_BULK_IN_SPEC
ZZ_BULK_OFF_SPEC
ZZ_WASTE
ZZ_WEIGH_FACT
ZZ_AUSVN ZZ_AUSVN
ZZ_AUZTV ZZ_AUZTV
ZZ_AUSBS ZZ_AUSBS
ZZ_AUZTB ZZ_AUZTB
ZZ_EAUSZT
FORM MAP2I_BAPI2080_NOTITEMI_VIQMFE
USING
BAPI2080_NOTITEMI
STRUCTURE BAPI2080_NOTITEMI
CHANGING
RFC_VIQMFE
STRUCTURE RFC_VIQMFE .
*{ INSERT D04K902454 1
E00010 TD 08 10 109 CR 594 new fields on PM Notification Items
RFC_VIQMFE-FENUM = BAPI2080_NOTITEMI-ITEM_KEY.
try.
RFC_VIQMFE-ZZ_BULK_IN_SPEC = BAPI2080_NOTITEMI-ZZ_BULK_IN_SPEC.
catch CX_ROOT.
conversion to number error
endtry.
try.
RFC_VIQMFE-ZZ_BULK_OFF_SPEC = BAPI2080_NOTITEMI-ZZ_BULK_OFF_SPEC.
catch CX_ROOT.
conversion to number error
endtry.
try.
RFC_VIQMFE-ZZ_WASTE = BAPI2080_NOTITEMI-ZZ_WASTE.
catch CX_ROOT.
conversion to number error
endtry.
try.
RFC_VIQMFE-ZZ_WEIGH_FACT = BAPI2080_NOTITEMI-ZZ_WEIGH_FACT.
catch CX_ROOT.
conversion to number error
endtry.
try.
RFC_VIQMFE-ZZ_EAUSZT = BAPI2080_NOTITEMI-ZZ_EAUSZT.
catch CX_ROOT.
conversion to number error
endtry.
*} INSERT
ENDFORM.
Then BAPIALM_NOTIF_DATA_ADD works allready_
For BAPIALM_NOTIF_DATA_MODIFY some more work was needed_
In this BAPI the possible transferable fields are hard-code and even more they don't use the mapping functions so in
Fu2019tion BAPI_ALM_NOTIF_DATA_MODIFY => Fu2019tion IWON_NOTIFICATION_DATA_MODIFY (FuGr IWON) => Subroutine CHANGE_NOTIFITEM
In that subroutine I implemented the beginning and ending Implicit Enhancement point somewhat like:
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(7 ) Form CHANGE_NOTIFITEM, Start
$$-Start: (7 )----
$$
ENHANCEMENT 1 ZPM_CHANGE_NOTIF_ITEM_DCLRTN. "active version
E00010 Enhancement for BAPI_ALM_NOTIF_DATA_MODIFY (D00028)
DATA: zz_notifitem TYPE bapi2080_notitemi,
zz_notifitem_x TYPE bapi2080_notitemi_x,
zz_viqmfe TYPE rfc_viqmfe.
FIELD-SYMBOLS: <zz_viqmfe> TYPE rfc_viqmfe.
ENDENHANCEMENT.
$$-End: (7 )----
$$
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(8 ) Form CHANGE_NOTIFITEM, End
$$-Start: (8 )----
$$
ENHANCEMENT 2 ZPM_CHANGE_NOTIF_ITEM_DCLRTN. "active version
E00010 Enhancement for BAPI_ALM_NOTIF_DATA_MODIFY (D00028)
LOOP AT p_notifitem_x INTO zz_notifitem_x.
LOOP AT p_notifitem INTO zz_notifitem
WHERE item_key = zz_notifitem_x-item_key.
CLEAR: zz_viqmfe.
CALL FUNCTION 'MAP2I_BAPI2080_NOTITEMI_VIQMFE'
EXPORTING
bapi2080_notitemi = zz_notifitem
CHANGING
rfc_viqmfe = zz_viqmfe.
READ TABLE p_viqmfe WITH KEY fenum = zz_viqmfe-fenum
ASSIGNING <zz_viqmfe>.
IF sy-subrc <> 0.
CONTINUE.
ENDIF.
IF NOT ( zz_notifitem_x-zz_bulk_in_spec IS INITIAL ).
<zz_viqmfe>-zz_bulk_in_spec = zz_viqmfe-zz_bulk_in_spec.
ENDIF.
IF NOT ( zz_notifitem_x-zz_bulk_off_spec IS INITIAL ).
<zz_viqmfe>-zz_bulk_off_spec = zz_viqmfe-zz_bulk_off_spec.
ENDIF.
IF NOT ( zz_notifitem_x-zz_waste IS INITIAL ).
<zz_viqmfe>-zz_waste = zz_viqmfe-zz_waste.
ENDIF.
IF NOT ( zz_notifitem_x-zz_weigh_fact IS INITIAL ).
<zz_viqmfe>-zz_weigh_fact = zz_viqmfe-zz_weigh_fact.
ENDIF.
IF NOT ( zz_notifitem_x-zz_ausvn IS INITIAL ).
<zz_viqmfe>-zz_ausvn = zz_viqmfe-zz_ausvn.
ENDIF.
IF NOT ( zz_notifitem_x-zz_auztv IS INITIAL ).
<zz_viqmfe>-zz_auztv = zz_viqmfe-zz_auztv.
ENDIF.
IF NOT ( zz_notifitem_x-zz_ausbs IS INITIAL ).
<zz_viqmfe>-zz_ausbs = zz_viqmfe-zz_ausbs.
ENDIF.
IF NOT ( zz_notifitem_x-zz_auztb IS INITIAL ).
<zz_viqmfe>-zz_auztb = zz_viqmfe-zz_auztb.
ENDIF.
IF NOT ( zz_notifitem_x-zz_eauszt IS INITIAL ).
<zz_viqmfe>-zz_eauszt = zz_viqmfe-zz_eauszt.
ENDIF.
ENDLOOP.
ENDLOOP.
ENDENHANCEMENT.
$$-End: (8 )----
$$
And then it worked.
Good luck
12-08-2009 4:47 AM
ISU_DB_QMEL_UPDATE is a FM you can use........... You can fill in the structure X_QMEL which is like QMEL and the update mode (X_UPD_MODE) should be 'I' for Insert.
01-20-2011 4:25 PM
Not the most sleek of solutions but you can also export your customer data to memory then retrieve your exported customer data in user exit EXIT_SAPMIWO0_001 or EXIT_SAPLIQS0_017 -- which is invoked during the BAPI call and move your customer data into the parameter E_VIQMEL. (you need to chose the exit dependent on whether your working on quantity or work orders.
Not ideal, but there is no extensions available in the bapi BAPI_ALM_NOTIF_CREATE where you need to pas the data.
01-20-2011 4:51 PM
11-29-2013 9:26 AM
As a reference for other people looking for a solution :
You could also use thes FM "IWOC_POST_NOTIFICATION". It's a powerfull option to enable updates on the PM notification. For (VI)QMEL specifically, the mentioned function calls FM "VIQMEL_POST" internally, enabling an update/insert/delete and creating changedocuments accordingly ...
05-20-2016 7:14 AM
For those who are looking for having extension parameters in BAPI_ALM_NOTIF_CREATE please implement below 2 SAP notes in the order mentioned.
1. 2151416 - Preparatory note for SAP note 2108975
2. 2108975 - Maintenance of customer fields using BAPIs of the maintenance notification.
You can implement these automatically. For first note only 1 manual task is there to execute the program generated after implementation.
Regarding how to use BAPI extension please refer Update extension QMEL ( CI_QMEL ) by function | SCN.