Payslip through PE51 - adding custom fields from info types

...Previous

In the form FILL-ZK-MOD, write the following code in ENHANCEMENT and END-ENHANCEMENT:  

data tt type i.

data tt1 type i.

data: begin of itab occurs 0,

      number1 type char4,

  end of itab.  

data itl like line of itab.

  IMPORT ITAB FROM MEMORY ID 'rab1'.

  READ TABLE ITAB INTO ITL INDEX 1.

  ITL-number1 = ITL-number1 + 1. INSERT ITL INTO ITAB INDEX 1.

  LOOP AT ITAB INTO ITL.

    IF SY-TABIX NE 1.

      DELETE ITAB INDEX SY-TABIX.

    ENDIF.

  ENDLOOP.

  FREE MEMORY ID 'rab1'.

  EXPORT ITAB TO MEMORY ID 'rab1'.

read table itab index 1 into itl.

P0185-GRPVL = itl-number1. " We will store sequence number here in str. P0185  

select single *  from pa0057 into corresponding fields of p0057 where begda le PN-BEGDA and endda ge  pn-endda and pernr = pernr-pernr.  

select single * from pa0581 into CORRESPONDING FIELDS OF p0581 where begda le PN-BEGDA and endda ge  pn-endda and pernr = pernr-pernr.  

select single * from pa0032 into CORRESPONDING FIELDS OF p0032 where begda le PN-BEGDA and endda ge  pn-endda and pernr = pernr-pernr.  

Now save and activate the code and go to transaction pe51_checktab. Here, in this T code, we will put the additional structures p0185, p0057, p0581 and p0032 and their respective fields, so they become available in pe51 - payslip form designing.  

 

In country grouping, give 40 (India) and in form class, give CEDT (payslip) and click on change button as shown.  

It gives a pop up message. Click on the green tick mark.  

Now we see the following screen:  

Click on the create button. Let us add say P0032 structure and a field KFZKZ here and you can similarly add your required structures and fields. Put ‘p0032’ in table column; check all the three check boxes and give description in description column, as shown.

Next, click on the fields tab and enter the values after clicking on insert button.  

Now, lets change the payslip in transaction PE51 or rather add the newly available fields in transaction PE51. Give form name in PE51 and click Change:  

 

On the next screen, click on the "Next Screen" button, to go to the single fields screen, as shown below.  

On the next screen, click on the add button to add the newly available field:  

Click here to continue....

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image