tags:

views:

43

answers:

2

HRIQ_UPDATE_INFTY returns sy-subrc=0. But it actually doesn't make any changes to it. Part source code:

lt_single_1001 TYPE STANDARD TABLE OF p1001 WITH HEADER LINE, lt_1001
TYPE STANDARD TABLE OF hrp1001 WITH HEADER LINE,

SELECT * FROM hrp1001 INTO TABLE lt_1001 WHERE objid = -cs_objid AND sobid = lv_major_id.

move-corresponding lt_1001 to lt_single_1001.

CALL FUNCTION 'HRIQ_UPDATE_INFTY'

EXPORTING

 vtask                   = 'D'

TABLES

 innnn                   = lt_single_1001

EXCEPTIONS

            error_during_update     = 1

            no_authorization        = 2

            relation_not_reversible = 3

            corr_exit               = 4

            OTHERS                  = 5.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno.
        ELSE.
          NEW-LINE NO-SCROLLING.
          WRITE: 'Update: '.
          WRITE: lt_1001-objid. "TODO: write proper information
          write: lt_single_1001-begda.
          write: lv_begda.
          write: lt_single_1001-endda.
          write: lv_endda.

        ENDIF.
A: 

Am not sure but, try providing the exporting parameter commit_flg = 'X'.

pythonperl
A: 

Hello

If i'm not mistaken, you're moving the value of the header of table lt_1001 to the header of table lt_single_1001. You should at least append it, otherwise the table is empty. Also P1001 is not the same as HRP1001 : there is an INFTY member that should be filled :
For the following line :

   move-corresponding It_1001 to It_single_1001.

i would do something like

   loop at It_1001.
      " move header of It_1001 to header of It_single_1001
      move-corresponding It_1001 to It_single_1001.
      " append the infotype information
      It_single_1001-infty = '1001'.
      " append the header to the table
      append lt_single_1001.
   endloop.
   " call to the function...

Same thing for the display : you're using the header of It_1001. You should also loop at it_single_1001 to display the datas that you just sent to the initial function.

Regards
Guillaume

PATRY