Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

QM Notification

Former Member
0 Kudos
459

Hello Everybody,

I am using the following code to create the quality notification.

The Quality Notification Number is not getting generated.

I see it as 00000000001.

What is the problem with the code? Please help me on this.

NOTIF_TYPE = 'Q3'.

NOTIFHEADER-REPORTEDBY = SY-UNAME.

NOTIFHEADER-MATERIAL_PLANT = P_WERKS.

NOTIFHEADER-MATERIAL = P_MATNR.

NOTIFHEADER-PROD_ORDER = PLANT.

NOTIFHEADER-PROD_ORDER = P_AUFNR.

NOTIFHEADER-STOR_LOC_BATCH = P_LGORT.

*NOTIFHEADER-PRIORITY = '1'.

NOTIFHEADER-SHORT_TEXT = 'Test'.

NOTIFHEADER-NOTIFTIME = SY-UZEIT.

NOTIFHEADER-NOTIF_DATE = SY-DATUM.

NOTIFHEADER-REPORTEDBY = SY-UNAME.

NOTIFHEADER-STARTDATE = SY-DATUM.

NOTIFHEADER-DESSTTIME = SY-UZEIT.

NOTIFHEADER-REFOBJECTTYPE = 'BUS2078'.

NOTIFHEADER-REFOBJECTKEY = '000000004711'.

NOTIFHEADER-REFRELTYPE = 'REFZ'.

NOTIFHEADER-QTY_UNIT = 'EA'.

NOTIFHEADER-QUANT_COMPLAINT = '1025.000'.

NOTIFPARTNR-PARTN_ROLE = 'KU'.

NOTIFPARTNR-PARTNER = SY-UNAME.

NOTIFPARTNR-REFOBJECTKEY = '000000004711'.

APPEND NOTIFPARTNR. CLEAR NOTIFPARTNR.

CALL FUNCTION 'BAPI_QUALNOT_CREATE'

EXPORTING

  • EXTERNAL_NUMBER = 'SAMPLE'

NOTIF_TYPE = NOTIF_TYPE

NOTIFHEADER = NOTIFHEADER

  • TASK_DETERMINATION = ' '

  • SENDER =

IMPORTING

NOTIFHEADER_EXPORT = NOTIFHEADER_EXPORT

TABLES

NOTITEM = NOTITEM

NOTIFCAUS = NOTIFCAUS

NOTIFACTV = NOTIFACTV

NOTIFTASK = NOTIFTASK

NOTIFPARTNR = NOTIFPARTNR

LONGTEXTS = LONGTEXTS

KEY_RELATIONSHIPS = KEY_RELATIONSHIPS

RETURN = RETURN.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

WAIT = 'X'.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
108

Hi,

Did you check the func.module documentation?

The changes to the notification data will only be available on the database after the function modules BAPI_QUALNOT_SAVE and BAPI_TRANSACTION_COMMIT have run successfully.

Pass this generated number from BAPI_QUALNOT_CREATE to the func.module BAPI_QUALNOT_SAVE and then call the BAPI_TRANSACTION COMMIT.

Regards,

Subramanian

1 REPLY 1

Former Member
0 Kudos
109

Hi,

Did you check the func.module documentation?

The changes to the notification data will only be available on the database after the function modules BAPI_QUALNOT_SAVE and BAPI_TRANSACTION_COMMIT have run successfully.

Pass this generated number from BAPI_QUALNOT_CREATE to the func.module BAPI_QUALNOT_SAVE and then call the BAPI_TRANSACTION COMMIT.

Regards,

Subramanian