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: 

BTE PM000030 : IHPATAB_OLD/IHPATAB_NEW empty

0 Kudos

Hi,

when saving a service order, i try to save same values into a Z-table (for example some partner functions).

So I implemented BTE PM000030 in transaction FIBF.

In 99% percent of cases everything is working fine.

But sometimes import tables IHPATAB_OLD/IHPATAB_NEW are empty, so my Z-table is filled with empty values.

But when I display the service order in IW33, partner functions are available, so at least IHPATAB_NEW should have been filled.

When I open the service order in IW32 and save, so BTE get executed again, then the import tables are filled.

Any ideas what the problem could be?

I cannot set this function productive, until it's working reliably.

Best regards

Peter

1 ACCEPTED SOLUTION

0 Kudos

Hi,


maybe somebody is interested, how I solved it:


...

"Determine ZU_PERNR
DATA lf_zu_pernr TYPE zcs_vorgaenge-zu_pernr.

IF  ihpatab_old[] IS INITIAL
AND ihpatab_new[] IS INITIAL.
   "Sometimes ihpatab_old/ihpatab_new are empty (?!)
   "In this case, try to read from database.
   SELECT SINGLE parnr
     FROM ihpa
     INTO lf_zu_pernr
     WHERE objnr = caufvd_new-objnr
     AND   parvw = 'KD'
     AND   KZLOESCH = ' '
     .
ELSE.
   FIELD-SYMBOLS <fs_ihpa> LIKE LINE OF ihpatab_new.
   LOOP AT IHPATAB_NEW ASSIGNING <fs_ihpa>
       WHERE parvw = 'KD'
       AND   updkz <> 'D'.

     lf_zu_pernr = <fs_ihpa>-parnr.
     EXIT.
   ENDLOOP.
ENDIF.

...


Kind regards

Peter

1 REPLY 1

0 Kudos

Hi,


maybe somebody is interested, how I solved it:


...

"Determine ZU_PERNR
DATA lf_zu_pernr TYPE zcs_vorgaenge-zu_pernr.

IF  ihpatab_old[] IS INITIAL
AND ihpatab_new[] IS INITIAL.
   "Sometimes ihpatab_old/ihpatab_new are empty (?!)
   "In this case, try to read from database.
   SELECT SINGLE parnr
     FROM ihpa
     INTO lf_zu_pernr
     WHERE objnr = caufvd_new-objnr
     AND   parvw = 'KD'
     AND   KZLOESCH = ' '
     .
ELSE.
   FIELD-SYMBOLS <fs_ihpa> LIKE LINE OF ihpatab_new.
   LOOP AT IHPATAB_NEW ASSIGNING <fs_ihpa>
       WHERE parvw = 'KD'
       AND   updkz <> 'D'.

     lf_zu_pernr = <fs_ihpa>-parnr.
     EXIT.
   ENDLOOP.
ENDIF.

...


Kind regards

Peter