Application Development and Automation 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: 
Read only

long text for infotypes

Vijay
Active Contributor
0 Likes
847

hi all,

i have to upload text for infotype 0195.

is there any fm for doing that ??

otherwise how can i achieve this ?

regards

vijay

hi all,

i have to upload text for infotype 0195.

is there any fm for doing that ??

otherwise how can i achieve this ?

regards

vijay

5 REPLIES 5
Read only

Former Member
0 Likes
803

Hi vijay,

1. sample code

2. change the infotype number as per requirement.

3.

tables:

pernr.

infotypes:

0019.

data: key like pskey.

data: begin of ptext occurs 200.

data: line(78).

data: end of ptext.

rp-read-infotype p_pernr 0019 p0019 p_date p_date.

loop at p0019 where itxex eq 'X'.

refresh ptext.

move-corresponding p0019 to key.

import ptext from database pcl1(tx) id key.

loop at ptext.

write 😕 p_pernr,ptext-line.

endloop.

endloop.

regards,

amit m.

Read only

Vijay
Active Contributor
0 Likes
803

hi

i will receive the text from the third party and have to upload the same into database.

Read only

Vijay
Active Contributor
0 Likes
803

hi amit

i have written code like this.

it is creating the infotpe data but the text is not detting reflected in tx: pa20.

can u plz check this out.

*****************************************************************************************

tables pcl1.

*********************************************************************

PARAMETERS: number LIKE p0001-pernr DEFAULT '215',

new_num LIKE p0001-pernr DEFAULT '32'.

PARAMETERS: l_subty TYPE p0001-subty DEFAULT '0001'.

DATA:

return LIKE bapireturn1,

record TYPE p0194,

itab TYPE TABLE OF p0194,

key TYPE bapipakey,

wa_itab type p0194.

CALL FUNCTION 'HR_READ_INFOTYPE'

EXPORTING

  • TCLAS = 'A'

pernr = number

infty = '0194'

  • BEGDA = '18000101'

  • ENDDA = '99991231'

  • BYPASS_BUFFER = ' '

  • LEGACY_MODE = ' '

  • IMPORTING

  • SUBRC =

TABLES

infty_tab = itab

EXCEPTIONS

infty_not_found = 1

OTHERS = 2 .

INCLUDE RPC1TX00.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

PERFORM enqueue_pernr(sapfp50g) USING new_num ' '.

LOOP AT itab INTO record.

MOVE: new_num TO record-pernr.

MOVE-CORRESPONDING record TO TX-KEY.

PTEXT-LINE = 'this is long text for 0194'.

EXPORT PTEXT TO DATABASE PCL1(TX) ID TX-KEY.

*NOT GETTING REFLECTED TO INFOTYPE TEXT IN PA20

PERFORM hr_opn USING: 'INS' space.

ENDLOOP.

PERFORM dequeue_pernr(sapfp50g) USING new_num.

&----


*& Form hr_opn

&----


  • text

----


  • -->ACTION text

----


FORM hr_opn USING action TYPE actio

nocommit TYPE bapi_ncomt.

CALL FUNCTION 'HR_INFOTYPE_OPERATION'

EXPORTING

infty = '0194'

number = new_num

subtype = l_subty

  • OBJECTID =

lockindicator = 'E'

validityend = '20070101'

validitybegin = '20071231'

recordnumber = '001'

record = record

operation = action

  • TCLAS = 'A'

  • dialog_mode = '1'

nocommit = nocommit

  • VIEW_IDENTIFIER =

  • SECONDARY_RECORD =

IMPORTING

return = return

key = key

.

IF NOT return IS INITIAL.

WRITE: / return.

ELSE.

  • WRITE: / 'Record '(002), key, 'modified'(003).

ENDIF.

ENDFORM. "hr_opn

regards

vijay

Read only

Former Member
0 Likes
803

You have to use EXPORT in that case instead of IMPORT.

import is used to get text of infotype.. to set it as per ur choice.. use EXPORT

Regards

Prax

Read only

Former Member
0 Likes
803

Goto View : V_T582S using SM31/SM30..

give infotype text of ur choice..

Reward if useful

Regards

Prax