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: 

Insert records in a table infotype

luscruz
Participant
0 Kudos
626

Hi all,

I had create a table infotype using PPCI transaction.

Now I need to insert some records, but I can't find any function module for that.

With RH_INSERT_INFTY I might be able to insert the HRPnnnn record, but not the HRTnnnn records.

Can anyone help me?

Thanks,

Luis Cruz

2 REPLIES 2

luscruz
Participant
0 Kudos
241

Found by myself.

Function module RH_INSERT_INFTY_EXP


DATA: lt_hrp9xxx TYPE TABLE OF p9xxx,
      lt_hrt9xxx TYPE TABLE OF hrt9xxx,
      ls_hrp9xxx LIKE LINE OF  lt_hrp9xxx,
      ls_hrt9xxx LIKE LINE OF  lt_hrt9xxx.

ls_hrp9xxx-plvar = '01'.
ls_hrp9xxx-otype = 'E'.
ls_hrp9xxx-objid = 'xxxxxxxxx'.
ls_hrp9xxx-infty = '9xxx'.
ls_hrp9xxx-istat = '2'.
ls_hrp9xxx-begda = '2011xxxx'.
ls_hrp9xxx-endda = '2011xxxx'.
ls_hrp9xxx-zzfield = 'xxxxxx'.
APPEND ls_hrp9xxx TO lt_hrp9xxx.

ls_hrt9xxx-tabseqnr   = 1.
ls_hrt9xxx-zzfield      = 'xxxx'.
APPEND ls_hrtxxx TO lt_hrt9xxx.

CALL FUNCTION 'RH_INSERT_INFTY_EXP'
  EXPORTING
    vtask                        = 'D'
 TABLES
   innnn                        = lt_hrp9xxx
   tnnnn                        = lt_hrt9xxx
 EXCEPTIONS
   OTHERS                       = 99.

Former Member
0 Kudos
241

Thanks!! Luis Cruz.