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

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

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 number on save when the partner determination is not called upon save?

Has anyone else come across this dilemma?

Many thanks

Larissa Maryniuk

Edited by: Larissa Maryniuk on Aug 25, 2009 10:08 AM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I have resolved this.

Coded in save user exit QMA0014 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.

Former Member
0 Kudos

Thanks marrisa.Thanks for the answer.I was looking for an answer to this issue.