Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Storing infotype texts in Clusters

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.

3 REPLIES 3

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

0 Kudos

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.