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: 

Export Text into Infotype text cluster

Former Member
0 Kudos

Hi,

I am trying to insert some text into the infotype text (Edit -> Maintain Text) for infotype 40 programmatically.

I have written the sample code below but the text is not inserted into the infotype. Can someone advise me what could be wrong with the code ?

Many thanks in advance.

Regards

KC

=============================================

REPORT ZTEXTO .

TABLES : PERNR, PCL1, pcl2.

INFOTYPES : 0040.

INCLUDE RPPPXD00.

DATA : BEGIN OF COMMON PART BUFFER.

INCLUDE RPPPXD10.

DATA : END OF COMMON PART BUFFER.

INCLUDE RPC1TX00.

GET PERNR.

LOOP AT P0040.

MOVE-CORRESPONDING P0040 TO TX-KEY.

REFRESH PTEXT.

PTEXT-LINE = 'THIS IS A TRAIL INSERT INSERT INTO INFOTYPE TEXT'.

APPEND PTEXT.

RP-EXP-C1-TX.

ENDLOOP.

PERFORM PREPARE_UPDATE USING 'V'.

  • BUFFER ADMINISTRATION ROUTINE.

INCLUDE RPPPXM00.

7 REPLIES 7

0 Kudos

Texts need to be maintained using Function Modules which are keyed to them.

The FMs, CREATE_TEXT, SAVE_TEXT and READ_TEXT can be used.

The information to pass to the FMs is available from an existing text if you open the text to display it and use menu path Goto > Header.

I don't have HR installed at the site I am not so I can't check if this is relevant to your situation - but some transactions also have a 'Long Text Exists' flag which needs to be updated also if it exists, otherwise your text will be saved in the database, but not visable from your transaction (got caught out like that in a PM transaction once!)

Hope this helps.

Rosie Brent

ssimsekler
Active Contributor
0 Kudos

Hi Kir Chern

May some required information be still not exist at the structure "TX-KEY" after "MOVE-CORRESPONDING P0040 TO TX-KEY.".

After all if nothing applies, write the code for the macro into your program and see what happens.You can get the source code of the macro "RP-EXP-C1-TX" from the table "TRMAC".

*--Serdar

nablan_umar
Active Contributor
0 Kudos

Hi Kir,

You need to set field ITXEX in infotype 0040 table PA0040 as well to make the text visable in PA20 or PA30. The update works in the cluster table but need to set ITXEX field.

0 Kudos

Dear All who have responded,

Thanks for your pointers. I have solved the problem. One has to ensure that the field ITXEX is set to 'X' (in PAXXXX) for the infotype record you're trying to export text into.

Thank you once again.

Regards

KC

0 Kudos

Hi Kir Chern

It seems Nablan's solution has solved your problem. So would you please change the status of the thread as "solved "by pressing the yellow star icon at the header of Nablan's last post. This will also reward 10 points to him.

You can also assign points for helpful answers by clicking the same icon at the header of EACH post. In this content, you can assign:

- one 10 points (solved)

- two 6 points (very helpful answer)

- many 2 points (helpful answer)

Kind regards...

*--Serdar

Former Member
0 Kudos

Hi,

I have this same issue. I have the infotype field ITEXT is set to 'X'. I am trying to update the record in infotype 0672. I am using the following code, it executes well. But it is not updating the infotype with the text.

REPORT zven_insert_text_infotpe .

TABLES : pernr, pcl1, pcl2.

INFOTYPES : 0672.

Data: gs_0672 TYPE STANDARD TABLE of pskey with header line.

INCLUDE rpppxd00.

DATA : BEGIN OF COMMON PART buffer.

INCLUDE rpppxd10.

DATA : END OF COMMON PART buffer.

INCLUDE rpc1tx00.

gs_0672-pernr = '00010053'.

gs_0672-infty = '0672'.

gs_0672-subty = '0001'.

gs_0672-endda = '04042005'.

gs_0672-begda = '04042005'.

append gs_0672.

clear gs_0672.

*GET pernr.

LOOP AT gs_0672.

MOVE-CORRESPONDING gs_0672 TO tx-key.

REFRESH ptext.

ptext-line = 'THIS IS A TRAIL INSERT INSERT INTO INFOTYPE TEXT'.

APPEND ptext.

rp-exp-c1-tx.

ENDLOOP.

perform prepare_update using 'V'.

include RPPPXM00.

Please let me know ASAP.

Appreciate.

Thanks.

vgoy

Former Member
0 Kudos

Hi,

I am able to insert long text in infotype (IT0672), but I am not able to append the text more than 78 characters. The maximum it is taking 78 characters.

Is there any way to append the text more than 78 characters?

Actually I may need to append the text to the already existing text in the infotype.

Please let me know.

Thanks.

Venu