11-22-2011 11:51 AM
Hi,
I am using FM RH_PNNNN_MAINTAIN for updating HRT1684 & HRP1684. But when processing it is inserting value in HRP1684 but it is not inserting value in HRT1684. Because in HRP1684 there is one field TABNR which is not getting generated
How to resolve this issue , below i am pasting the temp code.
ls_1684-tabnr = '&'.
ls_1684-tabseqnr = '1'.
ls_1684-molpt = '06'.
ls_1684-accdt = '20111122'.
ls_1684-refer = 'ANKESH'.
ls_1684-bupar = ''.
ls_1684-kobes = 'PEDA_INI'.
ls_1684-price = '100.00'.
ls_1684-waers = 'EUR'.
ls_1684-firm = '60094003'.
*ls_1684-pernr = '00000002'.
ls_1684-kostl = ''.
ls_1684-werks = ''.
ls_1684-btrtl = ''.
APPEND ls_1684 TO LT_1684.
p1684-plvar = '01'.
p1684-otype = 'E'.
p1684-objid = '62000032'.
p1684-infty = '1684'.
p1684-istat = '1'.
p1684-begda = sy-datum.
p1684-endda = '99991231'.
CALL FUNCTION 'RH_PNNNN_MAINTAIN'
EXPORTING
act_fcode = 'INSE'
act_plvar = '01'
act_otype = 'E'
act_objid = p1684-objid
act_infty = '1684'
act_begda = '20111122'
act_endda = '20111231'
act_vtask = 'D'
suppress_dialog = '1'
* IMPORTING
* ACT_OK_CODE =
* ACT_PNNNN_OUT =
* ACT_MESS_INFO =
TABLES
act_hrtnnnn = lt_1684
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
.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Please suggest
11-22-2011 2:46 PM
Hi,
You also have to pass the parameter ACT_PNNNN so that a valid pointer (tabnr) is generated by FM RH_PNNNN_MAINTAIN...
That parameter should be declared as TYPE p1684 in your case (just leave TABNR field empty and fill other fields)
added: You already populate a structure P1684... you should use it
Kr,
Manu.
Edited by: Manu D'Haeyer on Nov 22, 2011 3:47 PM
11-22-2011 2:46 PM
Hi,
You also have to pass the parameter ACT_PNNNN so that a valid pointer (tabnr) is generated by FM RH_PNNNN_MAINTAIN...
That parameter should be declared as TYPE p1684 in your case (just leave TABNR field empty and fill other fields)
added: You already populate a structure P1684... you should use it
Kr,
Manu.
Edited by: Manu D'Haeyer on Nov 22, 2011 3:47 PM
11-23-2011 5:46 AM
Hi Manu..
Thanks , problem resolved.. it is not generating number because of that structure only.
Ankesh Jindal