Skip to Content
0
Former Member
Feb 27, 2010 at 03:32 PM

Problem create it0298 use FM HR_MAINTAIN_MASTERDATA

75 Views

Hi All,

I am trying to create records for 0298 infotype for different pernr.

I need create records for different pernr with same begda and endda ,

and I use FM HR_MAINTAIN_MASTERDATA with action = INS .

The result is that it creates a record for the first prnr.

But the records doesn't create for next pernr with same begda and endda.

FORM UPLOAD_DATA .{code
  CLEAR: proposed_values, proposed_values[].
 
  LOOP AT g0000 INTO l_000.
    CLEAR: proposed_values, proposed_values[].
*  0000   - - - - - - - - - - - --            - - - - - - -- - - ***
    proposed_values-INFTY = l_000-INFTY. proposed_values-FNAME = 'P0000-MASSN'. proposed_values-FVAL  = l_000-MASSN.
    APPEND proposed_values.
*                                              
    proposed_values-INFTY = l_000-INFTY. proposed_values-FNAME = 'P0000-BEGDA'. proposed_values-FVAL  = l_000-BEGDA.
    APPEND proposed_values.
*                                           
    proposed_values-INFTY = l_000-INFTY. proposed_values-FNAME = 'P0000-ENDDA'. proposed_values-FVAL  = l_000-endda.
    APPEND proposed_values.
*                                             
    proposed_values-INFTY = l_000-INFTY. proposed_values-FNAME = 'P0000-PERNR'. proposed_values-FVAL  = l_000-pernr.
    APPEND proposed_values.
*                                             
    proposed_values-INFTY = l_000-INFTY. proposed_values-FNAME = 'P0000-MASSG'. proposed_values-FVAL  = l_000-MASSG.
    APPEND proposed_values.
*   0001             - - - - - - -- - - ***
    READ TABLE g0001 WITH  KEY PERNR = l_000-pernr INTO l_001.
*                                             
    proposed_values-INFTY = l_001-INFTY. proposed_values-FNAME = 'P0001-PLANS'. proposed_values-FVAL  = l_001-PLANS.
    APPEND proposed_values.

*                                           
    proposed_values-INFTY = l_001-INFTY. proposed_values-FNAME = 'P0001-ABKRS'. proposed_values-FVAL  = l_001-ABKRS.
    APPEND proposed_values.

Edited by: Sergei Rykov on Feb 27, 2010 4:32 PM