cancel
Showing results for 
Search instead for 
Did you mean: 

hr_read_infotype in WD ABAP

prasad
Participant
0 Kudos

Dear All,

I am new to Webdynpro ABAP , please help in creating report which consists of

Fill the internal table with the first  5 columns  from pa0001 , 2columns from pa0007 and last column should be filled

with condition as when pa0000-massn = "AF" then fill with pa0000-begda. below is the screen shot .

please let me know how to use HR_READ_INFOTYPE to get a report like shown below, when i pass pernr , start date and enddate.

Thanks in advance

Prasad.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member199125
Active Contributor
0 Kudos

create a node with 8 attributes( your required attributes)

Then in coding create a table by referring that node.

for ex: Data it_Data type ref to wd_this->elements_nodename. ( internal table )

          data wa_data type ref to wd_this->element_nodename. ( work area )

now pass values to wa_data and append wa_data to it_data.

then bind it_data to node  ( lo_nd_nodename->bind_table( it_data ).

Now you have the issue with passing data.

You can use simple select statement to read infotype 0001 , no need to use hr_read_infotype. Anyhow for ur purpose check below one

data rt_p0001 TYPE STANDARD TABLE OF p0001,

data wa_p0001 type p0001.

CALL FUNCTION 'HR_READ_INFOTYPE'

   EXPORTING

*   TCLAS                 = 'A'

     pernr                 = lv_apernr

     infty                 = '0001'

    begda                 = '18000101'

    endda                 = '99991231'

*   BYPASS_BUFFER         = ' '

*   LEGACY_MODE           = ' '

  IMPORTING

    subrc                 = var

   TABLES

     infty_tab             = rt_p0001

* EXCEPTIONS

*   INFTY_NOT_FOUND       = 1

*   OTHERS                = 2.

.

now read rt_p0001.

read rt_p0001 into wa_p0001 with key pernr = lv_apernr.

now pass your required values to wa_data

say ex wa_data-orgeh = wa_p0001-orgeh. ( for ogranization field )

then append ..........append wa_data to it_data

now bind       lo_nd_nodename->bind_table ( it_Data ).

hmmmm....hope it will be useful.

Regards

Srinivas

Former Member
0 Kudos

Hello Prasad ,

Now get the data of the

create a final Structure which ever the columns you want to display in the report .

Get the data what ever you want in to the respective internal table and populate them in to final internal table of report and then bind it to the context node.. accordingly with the condition .

Thanks,

Venkat Ratnam Naidu .