07-11-2005 12:23 PM
Hi Friends,
Any idea how to store infotype texts in clusters.
The text we enter in the custom infotype text-fields has to get stored in clusters.
Thanks in advance!
Regards,
Rajeev
07-18-2005 5:06 PM
You can try a variation of this code. It is old (R/3 3.1), but I don't think the HR macros and structures have changed.
*---------------------------------------------------------------------*
* -> TEXT_ITAB - an internal table of the text to be written to PCL1*
* -> EMPL_NO - employee number that text is to be attached to *
* -> INFOTYPE - infotype that the text is associated with *
* -> TEXT_NO - the index number of the PCL1 text *
* -> BEGDA - the begin date for infotype 0000 *
*---------------------------------------------------------------------*
FORM WRITE_PCL1 USING TEXT_ITAB EMPL_NO INFOTYPE TEXT_NO BEGDA.
* set up key values for getting text into SAP
TX-KEY-PERNR = EMPL_NO.
TX-KEY-ITXNR = TEXT_NO. " The index of the PCL1 text
TEXT_KEY-PERNR = EMPL_NO.
TEXT_KEY-INFTY = INFOTYPE.
TEXT_KEY-BEGDA = BEGDA.
TEXT_KEY-ENDDA = '99991231'.
MOVE TEXT_KEY TO PKEY.
RP-EXP-TX. " CALL TO THE RMAC to export text
ENDFORM.
07-18-2005 5:06 PM
You can try a variation of this code. It is old (R/3 3.1), but I don't think the HR macros and structures have changed.
*---------------------------------------------------------------------*
* -> TEXT_ITAB - an internal table of the text to be written to PCL1*
* -> EMPL_NO - employee number that text is to be attached to *
* -> INFOTYPE - infotype that the text is associated with *
* -> TEXT_NO - the index number of the PCL1 text *
* -> BEGDA - the begin date for infotype 0000 *
*---------------------------------------------------------------------*
FORM WRITE_PCL1 USING TEXT_ITAB EMPL_NO INFOTYPE TEXT_NO BEGDA.
* set up key values for getting text into SAP
TX-KEY-PERNR = EMPL_NO.
TX-KEY-ITXNR = TEXT_NO. " The index of the PCL1 text
TEXT_KEY-PERNR = EMPL_NO.
TEXT_KEY-INFTY = INFOTYPE.
TEXT_KEY-BEGDA = BEGDA.
TEXT_KEY-ENDDA = '99991231'.
MOVE TEXT_KEY TO PKEY.
RP-EXP-TX. " CALL TO THE RMAC to export text
ENDFORM.
07-21-2005 7:35 AM
Hi Barter,
Thanks a lot! This will be of great help.
Can you pls elaborate this answer in detail, i.e, in which cluster the text is getting saved and where to call this subroutine?
Regards,
Rajeev
07-21-2005 7:45 AM
Hi Rajeev,
The Macro RP-EXP-TX contains the actual statement to update the cluster table. If you go to the Database Table TRMAC and enter this Macro, you will find the answer -
The cluster table in this case is <b>PCL1</b>. and the area is <b>TX</b>.
Hope that helps.
Regards,
Anand Mandalika.