‎2005 Nov 04 1:27 PM
Hi,
i would like to create/change an it 0040 (objects on loan) without using PA 30 or Batch-Input. I would prefer to use HR_INFOTYPE_OPERATION. But i can not handover the textlines given in It 0040 ( can i ???? ).
It is not a problem to read the texts from the infotype with i.e. HRWPC_RFC_IT0XXX_TEXT_GET or rp-imp-c1-tx.
But how can i write back the infotype data ? When i use rp-exp-c1-tx (with correct pskey) it seems like the cluster does no longer refer to the infotype and all textlines in it 0040 are blank.
Does anybody know how to write the cluster tx and fill the textlines in it 0040.
‎2005 Nov 04 2:49 PM
I do like this :
data begin of common part cluster_edinition.
include rprstr00.
include rpc1te00.
include mp56tt99.
date end of common part.
you must set the data to the te-key (the key of the PCL1 table).
and the macro rp-exp-c1-te-my. (see include RPC1TE00)
Rgd
Frédéric
Message was edited by: Frédéric Girod
‎2005 Nov 04 2:05 PM
Hi Thomas,
try this..
1. set the field ITXEX to 'X' using HR_INFOTYPE_OPERATION
2. use rp-exp-c1-tx (with correct pskey)to update the text.
Good Luck,
Suresh Datti
P.S. Ignore this reply.. I thought you were trying to enter long texts on the infotype
Message was edited by: Suresh Datti
‎2005 Nov 04 2:39 PM
Hi Suresh Datti,
well, yes, i want to enter long texts on the infotype.
I tried to set itxex = X, but it also didn't work.
(There is no entry in Table PCL1 after i created the infotype)
I have no idea how to get a text on the textfield of the infotype because i do not see a possibility to handover the text. (Of course i tried to modify table ptext before i called rp-exp-c1-tx)
‎2005 Nov 04 2:46 PM
Hi Thomas,
Any specific reason why you are not inclined to go with the BDC?
Suresh Datti
‎2005 Nov 04 2:49 PM
I do like this :
data begin of common part cluster_edinition.
include rprstr00.
include rpc1te00.
include mp56tt99.
date end of common part.
you must set the data to the te-key (the key of the PCL1 table).
and the macro rp-exp-c1-te-my. (see include RPC1TE00)
Rgd
Frédéric
Message was edited by: Frédéric Girod
‎2005 Nov 04 3:03 PM
have you tried this?
CALL METHOD cl_hrpa_text_cluster=>update
EXPORTING
tclas = 'A'
pskey = pskey
no_auth_check = 'X'
IMPORTING
text_tab = text.
Good luck,
Suresh Datti
‎2005 Nov 04 3:20 PM
Hi Thomas,
the following piece of code worked for me. I was able to update the text on an existing record.
*************
report zp0040_tst .
data: i0040 like p0040 occurs 0 with header line.
data: pskey like pskey.
data: subrc like sy-subrc.
data: text type hrpad_text_tab.
data: asset_rec like line of text.
call function 'HR_READ_INFOTYPE'
exporting
pernr = '9802'
infty = '0040'
begda = '20051201'
endda = '20051231'
importing
subrc = subrc
tables
infty_tab = i0040
exceptions
infty_not_found = 1
others = 2.
pskey = i0040.
asset_rec = 'line1'.
append asset_rec to text.
asset_rec = 'line2'.
append asset_rec to text.
asset_rec = 'line3'.
append asset_rec to text.
call method cl_hrpa_text_cluster=>update
exporting
tclas = 'A'
histo = space
pgmid = space
pskey = pskey
no_auth_check = 'X'
text_tab = text.
**************************
Good Luck,
Suresh Datti
‎2005 Nov 07 8:14 AM
Hi Suresh,
almost perfect. But unfortunately it works only once. Means: if you change an existing record, the textlines are shown on the infotype. but if you change the asset_rec (coding) lines and write a different text and run the program again, all textlines are space and not updated. i would appreciate if you can try this, too, and tell me how it works on your system when you run the program twice for the same record. nevertheless thanks a lot for your effort.
Thomas
Amazing: when i use HR_READ_INFOTYPE and afterwords HRWPC_RFC_IT0XXX_TEXT_GET, the textlines are shown in ptext as written in your asset_rec-coding. but: the lines are not shown on the infotype. it seems like the infotype looses the reference to the updated cluster.
Message was edited by: Thomas
‎2005 Nov 07 4:11 PM
Hi Thomas,
I just ran three consecutive tames.. each time with a diff text and the record got updated every single time..
Are you using the exact same code or did you make nay changes?
Suresh Datti
‎2005 Nov 18 12:44 PM
Hi, the following coding works well on 4.7:
TRY.
CALL METHOD cl_hrpa_text_cluster=>update
EXPORTING
tclas = 'A'
pskey = pskey
histo = space
pgmid = ' '
text_tab = text
no_auth_check = 'X'.
CATCH cx_hrpa_missing_authorization .
CATCH cx_hrpa_violated_assertion .
ENDTRY.
But now i have to install my program on a 4.6C System where class CL_HRPA_TEXT_CLUSTER does not exist. Any idea how to update cluster tx when a IT0040-record was modified by function HR_INFOTYPE_OPERATION ?
regards
Thomas
by the way: rp-exp-c1-tx doesn't work.
‎2005 Nov 18 1:57 PM
Hi Thomas,
You have to copy the code in the 'UPDATE' method of this class into your custom Program in the 46c system..
ie the following..
pcl1-histo = histo.
pcl1-uname = uname.
pcl1-aedtm = aedtm.
pcl1-pgmid = pgmid.
EXPORT
text-version FROM version
ptext FROM text_tab
TO DATABASE pcl1(tx) ID pskey
FROM pcl1.
******************************************
Good Luck,
Suresh Datti
‎2005 Nov 18 3:23 PM
‎2005 Nov 18 4:23 PM