2013 Jul 17 11:48 AM
Hi Gurus,
I have a requirement where i will get data from a flat file and i have to update 4 OM infotypes 1000, 1001, 1002, 1005, 1080. I know i have to use FM RH_INSERT_INFTY. Based on the data already existing or not i have to update or insert. Is there a way to dynamically pass the internal tables to INNNN parameter. And can you please provide me with an example for this scenario.
Thank you in advance for your help.
2013 Jul 18 6:28 AM
Hi,
Give INSERT operation as input for act_fcode. If an object already exist it will modify the already exisiting one and if it doesnt exist it will create a new one.
CALL FUNCTION 'RH_PNNNN_MAINTAIN'
EXPORTING
act_fcode = c_inse " Insert Operation
act_otype = ls_p1001-otype " Object Type
act_objid = ls_p1001-objid " Object ID
act_pnnnn = ls_p1001 " HRP1001 Sturcture
suppress_dialog = '2' " No dialog
act_commit_flg = '' " No Auto commit
EXCEPTIONS
infty_not_valid = 1
no_plvar = 2
object_not_defined = 3
otype_not_valid = 4
no_authority = 5
action_rejected = 6
no_gdate = 7
fcode_not_supported = 8
OTHERS = 9.
2013 Jul 18 6:28 AM
Hi,
Give INSERT operation as input for act_fcode. If an object already exist it will modify the already exisiting one and if it doesnt exist it will create a new one.
CALL FUNCTION 'RH_PNNNN_MAINTAIN'
EXPORTING
act_fcode = c_inse " Insert Operation
act_otype = ls_p1001-otype " Object Type
act_objid = ls_p1001-objid " Object ID
act_pnnnn = ls_p1001 " HRP1001 Sturcture
suppress_dialog = '2' " No dialog
act_commit_flg = '' " No Auto commit
EXCEPTIONS
infty_not_valid = 1
no_plvar = 2
object_not_defined = 3
otype_not_valid = 4
no_authority = 5
action_rejected = 6
no_gdate = 7
fcode_not_supported = 8
OTHERS = 9.
2013 Jul 18 7:03 AM
Hi Jegadeesan,
Thanks for the reply. I have a few doubts.
Does it act the same for all infotypes or only 1001.
What is the difference between RH_INSERT_INFTY and RH_PNNNN_MAINTAIN.