on 08-25-2009 10:07 AM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.