Application Development and Automation 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: 
Read only

BAPI_ALM_NOTIF_DATA_DELETE - cannot delete the Partners

Former Member
0 Likes
7,676

Hi Gurus,

I want to delete the Partners assigned inside 'Functional Location', for a Notification.

I am using the BAPI_ALM_NOTIF_DATA_DELETE also return table is also initial.

But it is not affecting.

Can you please let me know how to delete it ??

Regards.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
6,853

@ALL : Thanks for the urgent help.

Issue has been solved.

We just have to pass the 'X' to field KZLOESCH (Delete Data Record) of IHPA table, after that it will automatically remove that partner from that functional location.

Hi Gurus,

I want to delete the Partners assigned inside 'Functional Location', for a Notification.

I am using the BAPI_ALM_NOTIF_DATA_DELETE also return table is also initial.

But it is not affecting.

Can you please let me know how to delete it ??

Regards.

20 REPLIES 20
Read only

Former Member
0 Likes
6,853

Hi,

You need to call the Function module BAPI_ALM_NOTIF_SAVE after BAPI_ALM_NOTIF_DATA_DELETE.

Also you need to commit using BAPI_TRANSACTION_COMMIT.

Thanks

Read only

jogeswararao_kavala
Active Contributor
0 Likes
6,853

Test in sequence in SE37 first in this order

BAPI_ALM_NOTIF_DATA_DELETE

BAPI_ALM_NOTIF_SAVE

BAPI_TRANSACTION_COMMIT

KJogeswaraRao

Read only

0 Likes
6,853

Hi Sir,

It wont work in se37. Can check using test program.

Regards

Read only

0 Likes
6,853

Is it? Why it won't work in SE37?

Read only

0 Likes
6,853

Hi,

It dosen't , i tried.

Thanks

Read only

0 Likes
6,853

Hello Ashish,

I have just tested in SE37 in the sequence advised above (for Tasks deletion). It works perfectly. We should not generalize when something does not work for us. There can be many reasons like incorrect REFOBJECTKEY etc.

Cheers

Read only

0 Likes
6,853

Hi,

My BAD ..

Cheers

Read only

Former Member
0 Likes
6,853

Dear All,

Thank you for you update.I have tried everything which you have posted.Please find my code below and let me know if I am missing anything:

*******************************************

gw_main-refobjectkey   = 'IF00000000000000313417'.

gw_main-partn_role      = 'Z3'.

gw_main-partn_role_old  = 'Z3'.

gw_main-partner         = '0007000007'.

gw_main-partner_old     = '0007000007'.

APPEND gw_main TO gt_main.

CALL FUNCTION 'BAPI_ALM_NOTIF_DATA_DELETE'

   EXPORTING

     number      = gv_num

   TABLES

*   NOTITEM     =

*   NOTIFCAUS   =

*   NOTIFACTV   =

*   NOTIFTASK   =

     notifpartnr = gt_main

     return      = gt_return.

CALL FUNCTION 'BAPI_ALM_NOTIF_SAVE'

   EXPORTING

     number                    = gv_num

*   TOGETHER_WITH_ORDER       = ' '

* IMPORTING

*   NOTIFHEADER               =

  TABLES

    return                    = gt_return1

           .

commit WORK.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

  EXPORTING

    wait          = 'X'

* IMPORTING

*   RETURN        =

*********************************************************************

Read only

0 Likes
6,853

Hi,

Is ur return table giving error??.. The process for using this function is as stated above by sir n me.

Please check what u r missing.

Read only

0 Likes
6,853

Hello Ketan,

I could not understand why your REFOBJECTKEY starts with IF , which indicates the OBJNR value of a Functional location. But this is Notification. It should start with QM.  Example: If your Notification number is 313417 then the REFOBJECTKEY should be QM000000313417 .

KJogeswaraRao

Read only

0 Likes
6,853

Also the rest of the values are also to be checked. Whether Z3 is correct in PARVW field. Check IHPA table whether such value exists. Similarly PARNR field is 12 char long. You assumed it to be 10 (0007000007). I doubt this input also. whether this is the partner code or something else. Take help of IHPA table, compare fields and then use right data in the FM.

Read only

Former Member
0 Likes
6,853

Hello Sir,

Can you please let me know from where should I get reference object key for partner .

I want to delete partner assignd to Functional location of particular Notification,

I am not able to understand which object key should I give to work these BAPI.

Please help me.

Thanks,

Ketan

Read only

0 Likes
6,853

I'm having to repeat the following

It is not Refobjectkey for partner. It is refobjectkey of Notification in partner table (already told IHPA table) and is nothing but the OBJNR value of the Notification. Also field values PARVW and PARNR from the same table.

Read only

0 Likes
6,853

Hello Sir,

Please find the attached screens for your reference .

Wan to delete the entry shown in table.

Read only

0 Likes
6,853

Then you are trying to delete the partner of a Functional location not a Notification. How you think this will work with n FM of Notification related ? You need to search for a line where the OBTYP is QMI not IFL.

If you do not have any such lines, then your query becomes irrelevant.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
6,853

I want to delete the Partners assigned inside 'Functional Location', for a Notification.

It would be a bad idea, even if it made sense

Those partners are related to the Functional location (attribute of the notification) and not the notification, so you should use Functional location related BAPI, but it would delete those partners for the functional location, not the notification (or for every notification already created/yet to be created)

Could you elaborate on the initial requirements as originally specified?

Regards,

Raymond

Read only

0 Likes
6,853

It seems I missed the beginning itself.

Read only

Former Member
0 Likes
6,853

           d    

Hi Raymond and Jogeswara,

Inside Change Service Notification (T-code - IW52), when we enter Notification Number we can see the Functional location inside the heading 'Reference Object'....

After that, by selecting it....we get the screen as 'Display Functional Location - Master Data'....then at this screen when we navigate to Goto ->Partners....we get the list of partners....I want to delete this...

Please let me know if you need any other info.

Regards,

Ketan              

             


                                                                     

Read only

0 Likes
6,853

All this is known. But you need to know one very simple thing that the FM you are using is not for the purpose you intended. This can be used to delete the partner assigned to a Notification. That's all from me.

Read only

Former Member
0 Likes
6,854

@ALL : Thanks for the urgent help.

Issue has been solved.

We just have to pass the 'X' to field KZLOESCH (Delete Data Record) of IHPA table, after that it will automatically remove that partner from that functional location.