HRIQ_UPDATE_INFTY 不更新 hrp1001
HRIQ_UPDATE_INFTY 返回 sy-subrc=0。但实际上并没有对其进行任何改变。部分源码:
DATA:
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 = <studies>-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.
HRIQ_UPDATE_INFTY returns sy-subrc=0. But it actually doesn't make any changes to it. Part source code:
DATA:
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 = <studies>-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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果我没记错的话,您正在将表 lt_1001 的标头的值移动到表 lt_single_1001 的标头。您至少应该附加它,否则表是空的。另外,P1001 与 HRP1001 不同:有一个 INFTY 成员需要填写:
对于以下行:
我会
为显示执行类似的操作:您正在使用 It_1001 的标题。您还应该循环 it_single_1001 以显示刚刚发送到初始函数的数据。
问候
纪尧姆
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 :
i would do something like
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
我不确定,但是,尝试提供导出参数 commit_flg = 'X'。
Am not sure but, try providing the exporting parameter commit_flg = 'X'.