Skip to Content
author's profile photo Former Member
Former Member

to print the values of Wagetype /3e1 and /3e2

hi all,

can any body have the code for printing the values of

wagetypes /3e1 and /3e2 of ESi, i can able to get

all the amounts of all wagetypes, want code to pick only ESI wage type

/3e2 and 3e1 for a report program.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 12, 2012 at 10:34 AM

    Hi

    If you are using ALV report then use REUSE_ALV_GRID_DISPLAY -FM

    Best Regards

    Venkata Manikanth

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Try this program it will give you perfect result.

      TABLES : pernr,pcl1,pcl2,t512t.

      INFOTYPES : 0001,0002,0587,0008.

      type-pools:slis.

      types : begin of ty_data,
      slno type i,
      pernr type pa0001-pernr,
      vorna type pa0002-vorna,
      nachn type pa0002-nachn,
      esi type betrg,
      esir type betrg,
      total type betrg,
      end of ty_data.

      Data: IT_DATA type standard table of ty_data,
      w_data type ty_data.

      DATA: w_var TYPE i.
      Data: t_cat type SLIS_T_FIELDCAT_ALV,
      wa_cat type SLIS_FIELDCAT_ALV.

      INCLUDE rpc2cd09.
      INCLUDE rpc2ca00.
      INCLUDE rpppxd00.
      INCLUDE rpppxd10.
      INCLUDE rpppxm00.
      INCLUDE pc2rxin0.
      INCLUDE rpc2rx09.

      DATA: wa_rt TYPE LINE OF hrpay99_rt,
      t_t512t TYPE TABLE OF t512t,
      wa_t512t LIKE LINE OF t_t512t,
      lgart TYPE p0008-lga01.

      START-OF-SELECTION.

      SELECT * FROM t512t INTO TABLE t_t512t WHERE sprsl = sy-langu
      AND molga = '40'.
      w_var = 1.
      GET pernr.

      cd-key-pernr = pernr-pernr.

      rp-imp-c2-cu.

      IF rp-imp-cd-subrc EQ 0.

      LOOP AT rgdir WHERE srtza = 'A'
      AND fpbeg GE pn-begda
      AND fpend LE pn-endda.

      rx-key-pernr = p0001-pernr.
      rx-key-seqno = rgdir-seqnr.

      rp-imp-c2-in.

      IF rp-imp-in-subrc EQ 0.

      loop at rt.
      case rt-lgart.
      when '/3E2'.
      w_data-esi = rt-betrg.
      w_data-total = w_data-total + rt-betrg.

      ********* ESIC - Employer
      when '/3E1'.
      w_data-esir = rt-betrg .
      w_data-total = w_data-total + rt-betrg.
      endcase. "CASE rt-lgart.
      endloop. "LOOP AT rt.

      ENDIF.

      ENDLOOP.
      ENDIF.

      rp_provide_from_last p0001 space pn-begda pn-endda.
      IF pnp-sw-found = 1.
      w_data-pernr = p0001-pernr.
      ENDIF.

      rp_provide_from_frst p0002 space pn-begda pn-endda.
      IF pnp-sw-found = 1.
      w_data-vorna = p0002-vorna.
      w_data-nachn = p0002-nachn.
      endif.

      w_data-slno = w_var.

      APPEND w_data TO it_data.
      CLEAR w_data.
      w_var = w_var + 1.

      END-OF-SELECTION.

      WA_CAT-col_pos = 0.
      WA_CAT-emphasize = 'C810'.
      WA_CAT-seltext_m = 'Sr.No.'.
      WA_CAT-fieldname = 'SLNO'.
      WA_CAT-tabname = 'IT_DATA'.
      APPEND WA_CAT TO T_CAT.
      clear wa_cat.

      WA_CAT-col_pos = 1.
      WA_CAT-emphasize = 'C810'.
      WA_CAT-seltext_m = 'Employee Code'.
      WA_CAT-fieldname = 'PERNR'.
      WA_CAT-tabname = 'IT_DATA'.
      APPEND WA_CAT TO T_CAT.
      clear wa_cat.

      WA_CAT-col_pos = 2.
      WA_CAT-emphasize = 'C810'.
      WA_CAT-seltext_m = 'First Name'.
      WA_CAT-fieldname = 'VORNA'.
      WA_CAT-tabname = 'IT_DATA'.
      APPEND WA_CAT TO T_CAT.
      clear wa_cat.

      WA_CAT-col_pos = 3.
      WA_CAT-emphasize = 'C810'.
      WA_CAT-seltext_m = 'Last Name'.
      WA_CAT-fieldname = 'NACHN'.
      WA_CAT-tabname = 'IT_DATA'.
      APPEND WA_CAT TO T_CAT.
      clear wa_cat.

      WA_CAT-col_pos = 4.
      WA_CAT-emphasize = 'C810'.
      WA_CAT-seltext_m = 'Employer Contibution'.
      WA_CAT-fieldname = 'ESI'.
      WA_CAT-tabname = 'IT_DATA'.
      APPEND WA_CAT TO T_CAT.
      clear wa_cat.

      WA_CAT-col_pos = 5.
      WA_CAT-emphasize = 'C810'.
      WA_CAT-seltext_m = 'Employee Contibution'.
      WA_CAT-fieldname = 'ESIR'.
      WA_CAT-tabname = 'IT_DATA'.
      APPEND WA_CAT TO T_CAT.
      clear wa_cat.

      WA_CAT-col_pos = 6.
      WA_CAT-emphasize = 'C810'.
      WA_CAT-seltext_m = 'Total'.
      WA_CAT-fieldname = 'TOTAL'.
      WA_CAT-tabname = 'IT_DATA'.
      APPEND WA_CAT TO T_CAT.
      clear wa_cat.



      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
      * I_INTERFACE_CHECK = ' '
      * I_BYPASSING_BUFFER = ' '
      * I_BUFFER_ACTIVE = ' '
      I_CALLBACK_PROGRAM = SY-REPID
      * I_CALLBACK_PF_STATUS_SET = ' '
      * I_CALLBACK_USER_COMMAND = ' '
      * I_CALLBACK_TOP_OF_PAGE = ' '
      * I_CALLBACK_HTML_TOP_OF_PAGE = ' '
      * I_CALLBACK_HTML_END_OF_LIST = ' '
      * I_STRUCTURE_NAME =
      * I_BACKGROUND_ID = ' '
      * I_GRID_TITLE =
      * I_GRID_SETTINGS =
      * IS_LAYOUT =
      IT_FIELDCAT = t_cat
      * IT_EXCLUDING =
      * IT_SPECIAL_GROUPS =
      * IT_SORT =
      * IT_FILTER =
      * IS_SEL_HIDE =
      * I_DEFAULT = 'X'
      * I_SAVE = ' '
      * IS_VARIANT =
      * IT_EVENTS =
      * IT_EVENT_EXIT =
      * IS_PRINT =
      * IS_REPREP_ID =
      * I_SCREEN_START_COLUMN = 0
      * I_SCREEN_START_LINE = 0
      * I_SCREEN_END_COLUMN = 0
      * I_SCREEN_END_LINE = 0
      * I_HTML_HEIGHT_TOP = 0
      * I_HTML_HEIGHT_END = 0
      * IT_ALV_GRAPHICS =
      * IT_HYPERLINK =
      * IT_ADD_FIELDCAT =
      * IT_EXCEPT_QINFO =
      * IR_SALV_FULLSCREEN_ADAPTER =
      * IMPORTING
      * E_EXIT_CAUSED_BY_CALLER =
      * ES_EXIT_CAUSED_BY_USER =
      TABLES
      t_outtab = it_data
      * EXCEPTIONS
      * PROGRAM_ERROR = 1
      * OTHERS = 2
      .
      IF sy-subrc <> 0.
      * Implement suitable error handling here
      ENDIF.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.