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: 

BAPI_QUALNOT_CREATE is not creating the Document flow

Former Member
0 Kudos
1,535

Hello,

I am trying to create Notification using bapi BAPI_QUALNOT_CREATE . The Notification is getting created , but document flow is not available for the created notification .

But if I create the Notification manually through transaction QM02 with the SAME data , notification will be created as well as I can see the document flow .

Any help will be highly appreciated and <<some text that was removed by the moderator>>.

Regards,

Sandeep

Edited by: kishan P on Oct 11, 2010 4:15 PM

10 REPLIES 10

Former Member
0 Kudos
314

Hi,

Did you use BAPI COMMIT ?

Regards,

Pravin

StMou
Active Participant
0 Kudos
314

HI,

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.

Call of these 3 functions modules :

first : BAPI_QUALNOT_CREATE

second : BAPI_QUALNOT_SAVE

third : BAPI_TRANSACTION_COMMIT

Rgds

Former Member
0 Kudos
314

Hi Pravin , Yes am using bapi_transaction_commit as well as Bapi_qualnot_save .

I am able to see the created notification in QM02 , but only document flow is missing...

Former Member
0 Kudos
314

Hi Sandeep,

Are you passing the external reference key and the KEY_RELATIONSHIPS to the function module?

If your answer to my question is I'm passing the fields correctly then I would ask you to post the code passed to the FM to identify the issue.

Sujay

Edited by: Sujay Venkateswaran Krishnakumar on Oct 11, 2010 4:51 PM Added passed to the FM.

Former Member
0 Kudos
314

Thnaks for your reply sujay.

I am not passing the key relations ships. Is it the mistake am doiong ??

I have just passed the data which i have passed manually to the BAPI.

here is my code any way

*Header data

ls_ntype = 'Z2'.

  • ls_nhead-REFOBJECTTYPE = 'BUS2078'.

*ls_nhead-REFOBJECTKEY = '000000004711'.

ls_nhead-REFRELTYPE = 'REFZ'.

ls_nhead-doc_year = '2010'.

ls_nhead-mat_doc_item = '0001'.

ls_nhead-mat_doc = '0011171068'.

ls_nhead-po_number = '4500084423'.

ls_nhead-po_item = '00010'.

*ls_nhead-REFOBJECTTYPE = 'QMEL'.

  • Patener data

ls_part-partn_role = 'KU'.

ls_part-partner = 'BEYER'.

APPEND ls_part TO lt_part.

CLEAR ls_part.

ls_part-partn_role = 'LF'.

ls_part-partner = '000000304302'.

APPEND ls_part TO lt_part.

CLEAR ls_part.

CALL FUNCTION 'BAPI_QUALNOT_CREATE'

EXPORTING

  • EXTERNAL_NUMBER =

notif_type = ls_ntype

notifheader = ls_nhead

  • TASK_DETERMINATION = ' '

  • SENDER =

IMPORTING

notifheader_export = ls_exp

TABLES

  • NOTITEM = lt_item

  • NOTIFCAUS = lt_caus

  • NOTIFACTV =

  • NOTIFTASK =

notifpartnr = lt_part

  • LONGTEXTS =

  • KEY_RELATIONSHIPS =

return = lt_ret .

CLEAR lt_ret.

CALL FUNCTION 'BAPI_QUALNOT_SAVE'

EXPORTING

number = ls_exp-notif_no

IMPORTING

notifheader = ls_exp1

TABLES

return = lt_ret.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' .

Former Member
0 Kudos
314

Hi,

If you don't provide REFOBJECTTYPE, REFOBJECTKEY and REFRELTYPE, document flow will not be updated. If you populate these fields, you have to give KEY_RELATIONSHIPS.

Sujay

Former Member
0 Kudos
314

Sujay .

Thanks for your reply .

I am passing REFOBJECTTYPE = BUS2078

REFRELTYPE = REFZ.

can you please let me know from where we can derive REFOBJECTKEY .

Thanks for your help.

Former Member
0 Kudos
314

Hi,

In table TQ80, you will find the reference object type for the quality notification type.

Look for QWRNUM in table VIQMEL for the ones which got created through QM01 / QM02. Pass similarly to REFOBJKEY.

Sujay

Former Member
0 Kudos
314

Hi Sujay,

I am having the same problem, could you just give some hint code for how to populate the KEYRELATIONSHIPS table when executing the BAPI or if we just give the REFOBJECTTYPE, REFOBJECTKEY, REFRELTYPE, is enough to create the document flow. I would also really appreciate if you could give example code for the entire BAPI.

I am able to create the Notification through the BAPI but not the task activities and causes.

Former Member
0 Kudos
314

Hi Hamid.

You should fill the field sender with your Mandant.

You should fill this field:

REFOBJECTTYPE : business object name.

REFOBJECTKEY : The reference object, i.e. a purchase order.

REFRELTYPE : REFZ

SENDER : Field "Logical System" from table T000

Regards,

Victorino