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

Update infotype using class method

Former Member
0 Likes
928

Hi All,

I need to update an infotype using a Class method. I need to pass a file as input to the Class Structure.

How can we pas a file as input to the Class structure.

Any pointers on this would be really helpful.

Thanks,

Saher

1 REPLY 1
Read only

former_member31961
Contributor
0 Likes
400

Check the following code:

DATA infotype_reader        TYPE REF TO if_hrpa_plain_infotype_access.
*  MOVE  <pnnnn_typ>    TO <pnnnn_local_typ>.
  text_tab_local[] = text_tab[].
*
  CALL METHOD cl_hrpa_masterdata_factory=>get_plain_infotype_access
    IMPORTING
      plain_infotype_access = infotype_reader.
*
  CALL METHOD infotype_reader->insert
    EXPORTING
      tclas           = tclas_employee
      no_auth_check   = no_auth_check
      message_handler = message_handler
    IMPORTING
      is_ok           = is_ok
    CHANGING
      pnnnn           = <pnnnn_local_typ>
      text_tab        = text_tab_local.
  CHECK is_ok = true.

Regards,

Shrinivas