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: 

QM01 QM02 need to determine partner after batch filled in on equiment tab

Former Member
0 Kudos
735

I am looking at Quality notifications and I want to determin a payer when the batch field has been filled onn the quipement tab. I have found 2 exits: one for partner determination ( EXIT_SAPLIQS0_006 ) and one for saving information on saving EXIT_SAPMIWO0_020 )

The problem I have is that the partner determination exit is invoked before I have a chance to enter a batch number on the equipment tab. However, when pressing save, user exit EXIT_SAPMIWO0_020 has no reference to the partner information to be able to change the partner after I have filled the batch.

How do I change the partner information after I have entered the batch on save when the partner determination is not called upon save?

Has anyone else come across this dilemma?

Many thanks

Larissa Maryniuk

3 REPLIES 3

Former Member
0 Kudos
140

Hi,

Check BADI>>>NOTIF_EVENT_SAVE

Regards,

Himanshu

0 Kudos
140

The BADI in question has no table showing partner information.

Former Member
0 Kudos
140

have resolved this.

Coded in save user exit EXIT_SAPMIWO0_020 (SMOD QQMA0014 ) by calling function module 'PM_PARTNER_GET' using I_VIQMEL-OBJNR and then I read the table from the function module to look at the partner information. Then I call PM_PARTNER_MAINTAIN to either change the partner function at the relevant line number for the function I am looking for or create a new line with that partner function.

*-- Anzahl Partner ermitteln 
  CALL FUNCTION 'PM_PARTNER_GET' 
    EXPORTING 
      objnr    = i_viqmel-objnr 
    TABLES 
      ihpa_tab = l_xihpa. 
 
 
...... 
 
     READ TABLE l_xihpa WITH KEY objnr = i_viqmel-objnr 
                                   parvw = 'RG'. 
 
      IF sy-subrc = 0. 
        l_tabix = sy-tabix. 
      ELSE. 
        DESCRIBE TABLE l_xihpa LINES sy-tfill. 
        l_tabix = sy-tfill + 1. 
      ENDIF. 
 
* change partner number and fill in l_parnr 
        l_parnr = l_kunrg. 
        SHIFT l_parnr LEFT DELETING LEADING '0'. 
        SHIFT l_parnr RIGHT DELETING TRAILING space. 
        OVERLAY l_parnr WITH '000000000000'. 
 
IF L_PARNR IS NOT INITIAL AND L_TABIX NE 0. 
*-- Partnersatz aufbauen, falls noch nicht vorhanden 
        CALL FUNCTION 'PM_PARTNER_MAINTAIN' 
          EXPORTING 
            parnr       = l_parnr 
            parvw       = 'RG' 
            tabix_objnr = l_tabix. 
ENDIF.