2006 Jun 14 12:06 PM
hi all,
how to retrive data from cluster table can anybody send samole code.
1.by using function modules cu_read_rgdir
and the other is using IMPORT STATEMENT.
WHAT MAKES THE DIFFERENCE.
2.how to upload data into cluster table.payroll management.
3.what is interface toolbox how this differes from normal interfaces?
thanks and regards,
phani.
hi all,
how to retrive data from cluster table can anybody send samole code.
1.by using function modules cu_read_rgdir
and the other is using IMPORT STATEMENT.
WHAT MAKES THE DIFFERENCE.
2.how to upload data into cluster table.payroll management.
3.what is interface toolbox how this differes from normal interfaces?
thanks and regards,
phani.
2006 Jun 14 12:15 PM
Hi,
1) cluster table are updated by SAp system when any
changes are made in standard transaction.
select * from cdhdr into table itab.
where ---
Regards
Amole
2006 Jun 14 12:24 PM
Hi,
just call the FM " CU_READ_RGDIR"
Exporting parameter PERNR &
Importing parameter Molga then automatically RGDIR
will be populated. If u know pernr & Seqnr
then u can get payroll details of employees.
after u can call RP_imp_C2_xx macro this macro populates all cluster tables reqd for payroll.
2006 Jun 14 12:26 PM
Hi phani,
1. by using function modules cu_read_rgdir
and the other is using IMPORT STATEMENT
Any standard FM which may be provided
for reading cluster data,
FINALLY USES
IMPORT STATEMENT ONLY
for retrieving make-sense data from cluster tables.
(If a standard FM is provided for the purpose,
its better to use that FM,
instead of using directly IMPORT STATEMENT,
bcos this FM will check authority and other things also)
2.how to upload data into cluster table.payroll management
We cannot upload directly into cluster tables.
We have to run the payroll program,
that program will update the cluster table.
regards,
amit m.
2006 Jun 14 12:28 PM
hi
good
1- go through this link to get the clear idea bout the access of cluster table.
http://fuller.mit.edu/hr/cluster_tables.html
2-
go through this blog to get more details about cu_read_rgdir.
/people/alvaro.tejadagalindo/blog/2006/02/19/how-to-deal-with-hr-payroll-reports
GO THROUGH THIS LINK TO KNOW MORE ABOUT IMPORT STATEMENT
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba56d35c111d1829f0000e829fbfe/content.htm
THANKS
MRUTYUN
2006 Jun 14 12:32 PM
hi
refer the following mentioned program for payroll...
uploading data in to cluster??....payroll run updates the cluster...
*&----
-
*& Report ZHR_REP_LTA *
*& *
*&----
*
*& *
*& *
*&----
*
.
REPORT zhr_rep_lta NO STANDARD PAGE HEADING LINE-SIZE 200 LINE-COUNT
57(8) MESSAGE-ID yh_messages.
*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
************************************************************************
DECLARATION OF TABLES & INFOTYPES. *
************************************************************************
TABLES : pernr, " Standard Selections for HR Master Data Reporting
pcl1, " HR Cluster 1
pcl2, " HR Cluster 2
bnka, " Bank details
t247, " Month texts
pa0008,
pa0015,
pa0001,
pa0000,
pa0267,
pa0009.
*----
*
STANDARD INCLUDES
*----
*
*INTERNATIONAL INCLUDE
INCLUDE rpc2cd09. "Cluster CD data definition
INCLUDE rpc2ca00. "Cluster CA Data-Definition
INCLUDE rpppxd00. "Data Definition buffer PCL1/PCL2 Buffer
INCLUDE rpppxd10. "Common part buffer PCL1/PCL2
INCLUDE rpppxm00. "Buffer Handling routine
*COUNTRY SPECIFIC INCLUDE
INCLUDE pc2rxin0. "Cluster IN data definition
INCLUDE rpc2rx09.
DATA: slno TYPE i.
************************************************************************
DECLARATION OF INTERNAL TABLES *
*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
TYPE-POOLS : slis.
Declaration pertaining to ALV
DATA: i_gt_fieldcat TYPE slis_t_fieldcat_alv,
i_gs_layout TYPE slis_layout_alv,
i_gt_list_top_of_page TYPE slis_t_listheader,
i_g_repid LIKE sy-repid,
i_g_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE',
i_gt_events TYPE slis_t_event,
i_gs_sort TYPE slis_sortinfo_alv,
i_gt_sort TYPE slis_t_sortinfo_alv,
i_gs_print TYPE slis_print_alv.
DATA: w_pos TYPE i VALUE 1.
DATA: basic LIKE pa0008-bet01,
advance LIKE pa0008-bet01,
advance1 LIKE pa0008-bet01,
ename LIKE pa0001-ename,
accountno LIKE pa0009-bankn,
bankname LIKE bnka-banka,
lta LIKE rt-betrg,
percenta TYPE p DECIMALS 2 VALUE '8.33',
pern TYPE p DECIMALS 2 VALUE '0.50',
temptrfgr LIKE pa0008-trfgr.
DATA: BEGIN OF bdcitab OCCURS 0,
pernr(8),
lgart(4),
betrg(18),
END OF bdcitab.
DATA lta_str(9).
DATA lta1 TYPE i.
DATA:
tempbegda LIKE pa0000-begda ,
tempendda LIKE pa0000-endda ,
calday TYPE i.
DATA: lines LIKE sy-linno.
DATA l_page_count(5) TYPE c.
DATA prog LIKE sy-repid.
DATA: BEGIN OF bonus_comp OCCURS 0,
slno(3),
pernr(8),
ename LIKE pa0001-ename,
accountno LIKE pa0009-bankn,
bankname LIKE bnka-banka,
lta LIKE rt-betrg,
totbasic LIKE rt-betrg,
END OF bonus_comp.
*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
*for capturing errors
DATA: BEGIN OF hr_error OCCURS 10.
INCLUDE STRUCTURE hrerror.
DATA: END OF hr_error.
***************SELECTION-SCREEN************************
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS:p_paytyp LIKE pc261-payty,
p_rundat LIKE pc261-bondt.
SELECTION-SCREEN END OF BLOCK b1 .
************************************************************************
START OF SELECTION *
************************************************************************
START-OF-SELECTION.
GET pernr.
PERFORM fill_main_tab.
PERFORM import_results.
******************************************************************
END-OF-SELECTION *
************************************************************************
END-OF-SELECTION.
Assign the value of the report Id to the declared variable. Comes as a
part of the ALV standard. This is required to use the ALV features
i_g_repid = sy-repid.
Performed to initialize the Header, Layout, Events, field category and
Sort-Subtotal of the ALV Grid
PERFORM initialize_alv_for_display.
Display in the ALV grid
PERFORM display_output .
Clear all the variables
PERFORM clear_all.
push button for displaying results in excel.*
SET PF-STATUS 'EXCEL_DISP'.
prog = 'ZHR_REP_LTA'.
SET TITLEBAR 'LTA CALCULATION REPORT' OF PROGRAM
*prog.
**transfer contents of bonus_comp internal table to bonus_final and
**bonus_final_excel for output list and excel display respectively
PERFORM download_tab.
PERFORM bdc_upload.
*&----
*
*& Form IMPORT_RESULTS
*&----
*
text
*----
*
--> p1 text
<-- p2 text
*----
*
FORM import_results USING pn-begda pn-endda CHANGING basic1.
IMPORT ALL CLUSTER RESULTS.
CLEAR rgdir.
cd-key-pernr = pernr-pernr.
rp-imp-c2-cu.
IF rp-imp-cd-subrc <> 0.
MESSAGE S124(HRPADIN01) WITH PERNR-PERNR.
Payroll results not found for the employee no. &
PERFORM build_error TABLES hr_error
USING pernr-pernr 'HRPADIN01'
'124' pernr-pernr space space space.
REJECT.
ENDIF.
SORT rgdir BY fpper DESCENDING.
LOOP AT rgdir WHERE fpbeg GE pn-begda AND fpend LE pn-endda
AND srtza = 'A' AND payty = p_paytyp AND bondt = p_rundat.
CHECK rgdir-fpbeg NE rgdir-fpend.
rx-key-seqno = rgdir-seqnr.
rx-key-pernr = pernr-pernr.
rp-imp-c2-in.
IF rp-imp-in-subrc <> 0.
CONTINUE.
ENDIF.
bonus calculations processing*
LOOP AT rt.
CASE rt-lgart.
WHEN '1000'.
ADD rt-betrg TO basic1.
ENDCASE.
ENDLOOP.
PERFORM fill_main_tab.
ENDLOOP. " RGDIR
ENDFORM. " IMPORT_RESULTS
*&----
*
*& Form DISPLAY_ERROR
*&----
*
text
*----
*
-->P_HR_ERROR text
*----
*
*&----
*
*& Form BUILD_ERROR
*&----
*
FORM build_error TABLES hr_error STRUCTURE hr_error
USING $pernr
$msgid
$msgno
$msgv1
$msgv2
$msgv3
$msgv4.
hr_error-pernr = $pernr.
hr_error-arbgb = $msgid.
hr_error-msgty = 'E'.
hr_error-msgno = $msgno.
hr_error-msgv1 = $msgv1.
hr_error-msgv2 = $msgv2.
hr_error-msgv3 = $msgv3.
hr_error-msgv4 = $msgv4.
APPEND hr_error.
ENDFORM. " BUILD_ERROR
*&----
*
*& Form FILL_MAIN_TAB
*&----
*
text
*----
*
--> p1 text
<-- p2 text
*----
*
FORM fill_main_tab.
CLEAR : advance,advance1,lta,basic.
bonus_comp-pernr = pernr-pernr.
SELECT SINGLE * FROM pa0001 WHERE pernr = pernr-pernr AND
endda = '99991231'.
IF sy-subrc EQ 0.
MOVE: pa0001-ename TO ename.
ENDIF.
MOVE ename TO bonus_comp-ename.
**********************employee name*******************************
*************************bank account no*****************
SELECT SINGLE * FROM pa0009 WHERE pernr = pernr-pernr AND
endda = '99991231'.
IF sy-subrc EQ 0.
MOVE pa0009-bankn TO accountno.
ENDIF.
MOVE accountno TO bonus_comp-accountno.
*APPEND bonus_comp.
*CLEAR bonus_comp.
*************************bank account no*****************
*************************bank name*****************
SELECT SINGLE * FROM pa0009 WHERE pernr = pernr-pernr AND
endda = '99991231'.
IF sy-subrc EQ 0.
SELECT SINGLE * FROM bnka WHERE bankl = pa0009-bankl.
IF sy-subrc EQ 0.
MOVE bnka-banka TO bankname.
ENDIF.
MOVE bankname TO bonus_comp-bankname.
ENDIF.
PERFORM import_results USING pn-begda pn-endda CHANGING basic.
MOVE basic TO bonus_comp-totbasic.
SELECT SINGLE * FROM pa0015 WHERE pernr = pernr-pernr AND
lgart IN ('1014','1110') AND begda GE pn-begda AND begda LE pn-endda AND
betrg NE 0.
********************************************************
IF sy-subrc = 0.
MOVE pa0015-betrg TO advance.
ENDIF.
********************************************************
SELECT SINGLE * FROM pa0267 WHERE pernr = pernr-pernr AND
lgart IN ('1014','1110') AND begda GE pn-begda AND begda LE pn-endda AND
betrg NE 0.
IF sy-subrc = 0.
MOVE pa0267-betrg TO advance1.
ENDIF.
advance = advance + advance1.
*************************************************
lta = basic * percenta .
lta = lta / 100.
IF advance NE 0.
lta = lta - advance.
ENDIF.
MOVE lta TO lta1.
ADD 1 TO slno.
MOVE slno TO bonus_comp-slno.
MOVE lta1 TO bonus_comp-lta.
APPEND bonus_comp.
CLEAR bonus_comp.
ENDFORM. " FILL_MAIN_TAB
*&----
*
*& Form bdc_upload
*&----
*
text
*----
*
--> p1 text
<-- p2 text
*----
*
FORM bdc_upload .
Internal table declared for storing the input data from the text file
*move pn
DATA: it_upload LIKE bdcdata OCCURS 0 WITH HEADER LINE.
Upload structure
*DATA: BEGIN OF bdcitab OCCURS 0,
pernr(8),
lgart(4),
betrg(18),
anzhl(10),
END OF bdcitab.
*
Standard SAP structure to store the parameters / processing steps
DATA: bdcdata TYPE TABLE OF bdcdata.
Store error messages
DATA: itab TYPE TABLE OF bdcmsgcoll.
Work area and report id
DATA: program LIKE sy-repid,
wa_bdcdata TYPE bdcdata.
*&----
*
THE STRENOUS / MASSIVE PROCESSING STARTS FROM HERE. CRITICAL
INFOTYPES ARE BEING CALLED AND UPDATED HERE
*&----
*
Call this function to upload the input data from the flat file
*CALL FUNCTION 'UPLOAD'
EXPORTING
filename = 'C: est1.txt'
filetype = 'DAT'
TABLES
data_tab = bdcitab
EXCEPTIONS
conversion_error = 1
invalid_table_width = 2
invalid_type = 3
no_batch = 4
unknown_error = 5
gui_refuse_filetransfer = 6
OTHERS = 7.
*
Handle exceptions, if any occured. No errors / exceptions are likely
to occur
*IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
*ENDIF.
*=======================================================================
Note - Every program screen just as shown below has a separate stack
*=======================================================================
LOOP AT bdcitab.
refresh wa_bdcdata.
REFRESH bdcdata.
************************************************************************
PA30 transaction's opening screen
************************************************************************
CLEAR wa_bdcdata.
wa_bdcdata-program = 'SAPMP50A'.
wa_bdcdata-dynpro = '1000'.
wa_bdcdata-dynbegin = 'X'.
APPEND wa_bdcdata TO bdcdata.
Concept of stacking (Push <-> Pop) operation is being used here.
The insert / create button is fired last and hence it is being
populated to the stack first. When the pop operation, this will come
out last
CLEAR wa_bdcdata.
wa_bdcdata-fnam = 'BDC_OKCODE'.
wa_bdcdata-fval = '=INS'.
APPEND wa_bdcdata TO bdcdata.
Fill screen fields with values
CLEAR wa_bdcdata.
wa_bdcdata-fnam = 'RP50G-PERNR'.
wa_bdcdata-fval = bdcitab-pernr.
APPEND wa_bdcdata TO bdcdata.
Fill screen fields with values
CLEAR wa_bdcdata.
wa_bdcdata-fnam = 'RP50G-CHOIC'.
wa_bdcdata-fval = '0015'.
APPEND wa_bdcdata TO bdcdata.
************************************************************************
Infotype 0015 screen
************************************************************************
CLEAR wa_bdcdata.
wa_bdcdata-program = 'MP001500'.
wa_bdcdata-dynpro = '2040'.
wa_bdcdata-dynbegin = 'X'.
APPEND wa_bdcdata TO bdcdata.
Concept of stacking is used here. Push <-> Pop operation is being
employed here. The insert / create button is fired last and hence
it is being populated to the stack first. When the pop operation,
this will come out last
CLEAR wa_bdcdata.
wa_bdcdata-fnam = 'BDC_OKCODE'.
wa_bdcdata-fval = 'UPD'.
APPEND wa_bdcdata TO bdcdata.
Fill screen fields with values
CLEAR wa_bdcdata.
wa_bdcdata-fnam = 'P0015-LGART'.
wa_bdcdata-fval = bdcitab-lgart.
APPEND wa_bdcdata TO bdcdata.
Fill screen fields with values
CLEAR wa_bdcdata.
wa_bdcdata-fnam = 'Q0015-BETRG'.
wa_bdcdata-fval = bdcitab-betrg.
APPEND wa_bdcdata TO bdcdata.
Fill screen fields with values
CLEAR wa_bdcdata.
wa_bdcdata-fnam = 'P0015-ANZHL'.
wa_bdcdata-fval = bdcitab-anzhl.
APPEND wa_bdcdata TO bdcdata.
************************************************************************
This command calls the PA30 transaction and processes it as defined by
the steps above. The above processing steps are nothing but the
parameters to drive the tranasction PA30 and update the 0015 infotype
Mode - E is used because the processing steps gets executed in the
background without the user intervention. The user will be notified
only if an error occurs
************************************************************************
CALL TRANSACTION 'PA30' USING bdcdata MODE 'A'
MESSAGES INTO itab.
************************************************************************
ENDLOOP.
************************************************************************
ALL THE BEST
************************************************************************
LOOP AT bdcitab.
*if lta ne 0.
WRITE:/14 'Infotype Successfully Updated(15)>>>>>>>>' COLOR 1.
WRITE:/14 'For Your Reference:>>>>>>>>>>>>' COLOR 1.
WRITE:/14 'The Values are:' COLOR 1.
SKIP 2.
WRITE:/14 'Personnel no:' COLOR 1,36 bdcitab-pernr COLOR 1.
WRITE:/14 'Lta:(1014)' COLOR 1,36 bdcitab-betrg COLOR 1.
*endif.
ENDLOOP.
ENDFORM. " bdc_upload
*&----
*
*& Form initialize_alv_for_display
*&----
*
text
*----
*
FORM initialize_alv_for_display .
*Declare the variable for date manipulation purposed
DATA: l_corrdate TYPE string.
************************************************************************
DISLAY THE HEADER OF THE ALV
************************************************************************
Populate the header of the ALV
PERFORM display_values USING i_gt_list_top_of_page[]
'H' 'OMAX AUTOS LTD'.
Get the date from the routine
PERFORM format_date USING s_date-low CHANGING l_corrdate.
CONCATENATE 'From Date : ' l_corrdate INTO l_corrdate.
Populate the header of the ALV
PERFORM display_values USING i_gt_list_top_of_page[]
'A' l_corrdate.
Clear the variable L_CORRDATE
CLEAR l_corrdate.
Get the date from the routine
PERFORM format_date USING s_date-high CHANGING l_corrdate.
CONCATENATE 'To Date : ' l_corrdate INTO l_corrdate.
Populate the header of the ALV
PERFORM display_values USING i_gt_list_top_of_page[]
'A' l_corrdate.
Populate the header of the ALV
PERFORM display_values USING i_gt_list_top_of_page[]
'' ''.
***********************************************************************
DISLAY THE FIELD CATEGORY VARIABLES
***********************************************************************
PERFORM fieldcat_init USING i_gt_fieldcat[]
'SLNO' 'BONUS_COMP' 'Sl No' ''.
PERFORM fieldcat_init USING i_gt_fieldcat[]
'PERNR' 'BONUS_COMP' 'Code' ''.
PERFORM fieldcat_init USING i_gt_fieldcat[]
'ENAME' 'BONUS_COMP' 'Employee Name' ''.
PERFORM fieldcat_init USING i_gt_fieldcat[]
'BANKNAME' 'BONUS_COMP' 'Bank Name' ''.
PERFORM fieldcat_init USING i_gt_fieldcat[]
'ACCOUNTNO' 'BONUS_COMP' 'Account No' ''.
PERFORM fieldcat_init USING i_gt_fieldcat[]
'TOTBASIC' 'BONUS_COMP' 'Total Earned Basic' ''.
PERFORM fieldcat_init USING i_gt_fieldcat[]
'LTA' 'BONUS_COMP' 'Lta Payable' ''.
************************************************************************
INITIALIZE THE EVENTS
************************************************************************
PERFORM eventtab_build USING i_gt_events[].
************************************************************************
INITIALIZE(AUTOMATE) THE SORT AND SUB-TOTAL FEATURE
************************************************************************
PERFORM sort_subtotal USING 'DESIG' ''.
PERFORM sort_subtotal USING 'PERNR' ''.
PERFORM sort_subtotal USING 'ENAME' ''.
************************************************************************
INITIALIZE THE LAYOUT
************************************************************************
PERFORM initialize_layout.
ENDFORM. " initialize_alv_for_display
*&----
*
*& Form display_values
*&----
*
text
*----
*
-->W_LT_TOP_OFtextE
-->W_TYPE text
-->W_INFO text
*----
*
FORM display_values USING w_lt_top_of_page TYPE slis_t_listheader
w_type w_info.
Declared for further usage
DATA: l_ls_line TYPE slis_listheader.
Clear the table header
CLEAR l_ls_line.
Assign the input value to the required fields and append the entry to
the LS-LINE
l_ls_line-typ = w_type.
l_ls_line-info = w_info.
APPEND l_ls_line TO w_lt_top_of_page.
ENDFORM. "display_values
*&----
*
*& Form format_date
*&----
*
text
*----
*
-->W_INPDATE text
-->W_OUTDATE text
*----
*
FORM format_date USING w_inpdate CHANGING w_outdate.
Declared for use in the subroutine
DATA: l_year(4) TYPE c,
l_month(2) TYPE c,
l_date(2) TYPE c,
l_monthname(3) TYPE c.
Assign the date to the structure through the temporary variables
l_year = w_inpdate+0(4).
l_month = w_inpdate+4(2).
l_date = w_inpdate+6(2).
Query to retrieve the name of the month corresponding to the month
number
SELECT SINGLE * FROM t247 WHERE mnr = l_month AND spras = sy-langu.
IF sy-subrc = 0.
Move the monthname to the month variable
MOVE t247-ltx TO l_monthname.
Concatenate the variables and assign the value to a temporary variable
CONCATENATE l_date l_monthname l_year INTO w_outdate
SEPARATED BY '-'.
ENDIF.
ENDFORM. " FORMAT_DATE
*&----
*
*& Form fieldcat_init
*&----
*
text
*----
*
-->W_RT_FIELDCtext
-->W_FIELDNAMEtext
-->W_INTTABLE text
-->W_SELTEXT text
-->W_SUBTOT text
*----
*
FORM fieldcat_init USING w_rt_fieldcat TYPE slis_t_fieldcat_alv
w_fieldname w_inttable w_seltext w_subtot.
Declared for use in this module
DATA: ls_fieldcat TYPE slis_fieldcat_alv.
Clear table header
CLEAR ls_fieldcat.
Assign the value to the table fields
ls_fieldcat-col_pos = w_pos.
ls_fieldcat-fieldname = w_fieldname.
ls_fieldcat-tabname = w_inttable.
ls_fieldcat-seltext_m = w_seltext.
Add the subtotal field to the field category if the sub-total is
specified
IF w_subtot = 'X'.
ls_fieldcat-do_sum = 'X'.
ENDIF.
Append the value to the internal table
APPEND ls_fieldcat TO w_rt_fieldcat.
Increment the Counter by 1
w_pos = w_pos + 1.
ENDFORM. " FIELDCAT_INIT
*&----
*
*& Form eventtab_build
*&----
*
text
*----
*
-->W_RT_EVENTStext
*----
*
FORM eventtab_build USING w_rt_events TYPE slis_t_event.
Declared for use in program
DATA: ls_event TYPE slis_alv_event.
Call this function to trigger the ALV grid events
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = w_rt_events.
Read the table to get the name and put it into the events
READ TABLE w_rt_events WITH KEY name = slis_ev_top_of_page
INTO ls_event.
Check if the above statement is successful
IF sy-subrc = 0.
MOVE i_g_top_of_page TO ls_event-form.
APPEND ls_event TO w_rt_events.
ENDIF.
ENDFORM. " EVENTTAB_BUILD
*&----
*
*& Form sort_subtotal
*&----
*
text
*----
*
-->W_FIELDNAMEtext
-->W_SUBTOTAL text
*----
*
FORM sort_subtotal USING w_fieldname w_subtotal.
Initialiaze the Sort sequence and Sub-total feature
CLEAR i_gs_sort.
i_gs_sort-fieldname = w_fieldname.
i_gs_sort-spos = 1.
i_gs_sort-up = 'X'.
Check if the sub-total feature is enabled
IF w_subtotal = 'X'.
i_gs_sort-subtot = 'X'.
ENDIF.
Append the record to the structure
APPEND i_gs_sort TO i_gt_sort.
ENDFORM. " SORT_SUBTOTAL
*&----
*
*& Form initialize_layout
*&----
*
text
*----
*
FORM initialize_layout.
Initialiaze the Layout for the colour and Column width
i_gs_layout-info_fieldname = 'LINE_COLOUR'.
i_gs_layout-colwidth_optimize = 'X'.
ENDFORM. " INITIALIZE_LAYOUT
*&----
*
*& Form clear_all
*&----
*
text
*----
*
FORM clear_all.
Free the internal tables
FREE: bonus_comp.
Free all the ALV variables
FREE: i_gt_fieldcat,
i_gs_layout,
i_gt_list_top_of_page,
i_g_repid,
i_g_top_of_page,
i_gt_events,
i_gs_sort,
i_gt_sort,
i_gs_print.
Free the declared variables
FREE: w_pos.
ENDFORM. " CLEAR_ALL
*&----
*
*& Form display_output
*&----
*
text
*----
*
-->W_INP_TYPE text
*----
*
FORM display_output .
Declared for use in the program
DATA: l_title TYPE lvc_title.
Check if the type is 'P'. If it is 'P', it means proper records have
to be displayed, else improper records are to be displayed
IF w_inp_type = 'P'.
Assign the value of the title to be displayed
l_title = 'LTA Payable Report'.
Call this funciton to display the output
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = i_g_repid
i_callback_user_command = ' '
i_callback_pf_status_set = ' '
i_grid_title = l_title
i_callback_top_of_page = 'Lta Paid'
is_layout = i_gs_layout
it_events = i_gt_events[]
it_fieldcat = i_gt_fieldcat[]
it_sort = i_gt_sort[]
i_save = 'A'
TABLES
t_outtab = bonus_comp.
ENDIF.
ENDFORM. " DISPLAY_OUTPUT
reward points if it helps
gunjan
2006 Jun 14 12:34 PM
refer PC00_M40_CLSTR --for viewing the cluster
40 is the country grouping...
and make sure u include LDB PNP while creating the report!!
2006 Jun 14 12:30 PM
hi
regarding interface toolbox
chk this link
<b>http://www.google.co.in/url?sa=U&start=8&q=http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAXX/PYSOME_INTERFACE.pdf&e=15476</b>
2006 Jun 14 2:09 PM
Hi Phani,
>>how to upload data into cluster table.payroll management?
There area macros to do this.. but have to be handled with care.. it is like attempting direct Table updates.. you can find suitable macros by doing alook up for RP-IMP* in Table TRMAC..
>>>what is interface toolbox how this differes from normal interfaces?
Did you look up Tcode PU12? You mostly export Master data to ane external system to do Gross & Net Payroll outside SAP. Pl take a look at <a href="http://help.sap.com/saphelp_erp2005/helpdata/en/4f/d52a70575e11d189270000e8322f96/frameset.htm">SAP Help</a>.It is very exhaustive.
Regards,
Suresh Datti
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |