NEED SAMPLE HR REPORTS
HI TO ALL EXPERTS,
IM NEW TO ABAP HR PROGRAMMING I NEED SAMPLE HR REPORTS FOR PRACTICE (ESPECIALLY PAYROLL REPORTS)
plz send it on mail id mausam_8atyahoo.com
hii,
hr abap
Go through the SAp doc for HR programming and start doing.
http://www.sapdevelopment.co.uk/hr/hrhome.htm
See:
http://help.sap.com/saphelp_46c/helpdata/en/4f/d5268a575e11d189270000e8322f96/content.htm
sites regarding hr-abap:
http://www.sapdevelopment.co.uk/hr/hrhome.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPA/PAPA.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPD/PAPD.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PYINT/PYINT_BASICS.pdf
http://www.atomhr.com/training/Technical_Topics_in_HR.htm
http://www.planetsap.com/hr_abap_main_page.htm
You can see some Standard Program examples in this one ...
http://www.sapdevelopment.co.uk/programs/programshr.htm
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html?Offer=SAlgwn12604#Certification
http://www.erpgenie.com/faq/hr.htm.
http://www.planetsap.com/hr_abap_main_page.htm
http://www.sapbrain.com/TUTORIALS/FUNCTIONAL/HR_tutorial.html
cheers,
sharad
Similar Messages
-
Need sample program OO abap alv using hotspot( interactive report)
need sample program on Object Oriented program using alv interactive report.
*& Report Z8VM_N_PO_PRICING_CONDITION *
REPORT Z8VM_N_PO_PRICING_CONDITION NO STANDARD PAGE HEADING
MESSAGE-ID Z8VM.
vivekanand meghmala
trial assignment
po with pricing condition interactive report with checkbox
data declaration
TYPES : BEGIN OF STRUCT_EKKO, "po header
BUKRS LIKE T001-BUKRS,
EBELN LIKE EKKO-EBELN,
BSART LIKE EKKO-BSART,
BEDAT LIKE EKKO-BEDAT,
EKORG LIKE EKKO-EKORG,
WAERS LIKE EKKO-WAERS,
LIFNR LIKE EKKO-LIFNR,
KNUMV LIKE EKKO-KNUMV,
END OF STRUCT_EKKO.
TYPES : BEGIN OF STRUCT_EKPO, "po details
EBELN LIKE EKPO-EBELN,
EBELP LIKE EKPO-EBELP,
MATNR LIKE EKPO-MATNR,
END OF STRUCT_EKPO.
TYPES : BEGIN OF STRUCT_KONV,
KNUMV LIKE KONV-KNUMV,
KPOSN LIKE KONV-KPOSN,
KSCHL LIKE KONV-KSCHL,
KAWRT LIKE KONV-KAWRT,
KBETR LIKE KONV-KBETR,
END OF STRUCT_KONV.
DATA : IT_EKKO TYPE STANDARD TABLE OF STRUCT_EKKO WITH HEADER LINE.
DATA : IT_EKPO TYPE STANDARD TABLE OF STRUCT_EKPO WITH HEADER LINE.
DATA : IT_KONV TYPE STANDARD TABLE OF STRUCT_KONV WITH HEADER LINE.
PARAMETERS : T_BUKRS LIKE EKKO-BUKRS .
SELECT-OPTIONS : S_BEDAT FOR IT_EKKO-BEDAT.
SELECT-OPTIONS : S_EKORG FOR IT_EKKO-EKORG.
validations
AT SELECTION-SCREEN.
IF T_BUKRS = ' '.
MESSAGE E009.
ENDIF.
SELECT BUKRS FROM T001
INTO CORRESPONDING FIELDS OF IT_EKKO
WHERE BUKRS = T_BUKRS.
EXIT.
ENDSELECT.
IF SY-SUBRC 0.
MESSAGE E001.
ENDIF.
logic
START-OF-SELECTION.
SELECT BUKRS
EBELN
BSART
BEDAT
EKORG
WAERS
LIFNR
KNUMV FROM EKKO INTO CORRESPONDING FIELDS OF TABLE IT_EKKO
WHERE BUKRS = T_BUKRS
AND BEDAT IN S_BEDAT
AND EKORG IN S_EKORG.
SELECT EBELN
EBELP
MATNR FROM EKPO INTO CORRESPONDING FIELDS OF IT_EKPO
FOR ALL ENTRIES IN IT_EKKO WHERE EBELN = IT_EKKO-EBELN.
APPEND IT_EKPO.
ENDSELECT.
LOOP AT IT_EKPO.
SELECT KNUMV
KPOSN
KSCHL
KAWRT
KBETR FROM KONV INTO CORRESPONDING FIELDS OF IT_KONV
WHERE KPOSN = IT_EKPO-EBELP.
APPEND IT_KONV.
ENDSELECT.
ENDLOOP.
*data printing
LOOP AT IT_EKKO.
WRITE :/ IT_EKKO-BUKRS,IT_EKKO-EBELN,IT_EKKO-BSART,IT_EKKO-BEDAT,
IT_EKKO-EKORG,IT_EKKO-WAERS,IT_EKKO-LIFNR,IT_EKKO-KNUMV.
LOOP AT IT_EKPO WHERE EBELN = IT_EKKO-EBELN.
WRITE :/ IT_EKPO-EBELP,IT_EKPO-MATNR.
LOOP AT IT_KONV.
WHERE KPOSN = IT_EKPO-EBELN.
WRITE :/ IT_KONV-KNUMV COLOR 3,IT_KONV-KPOSN COLOR 3,IT_KONV-KSCHL COLOR 3,IT_KONV-KAWRT COLOR 3,IT_KONV-KBETR COLOR 3.
ENDLOOP.
ENDLOOP.
ENDLOOP.[/code]
thanks
reward if helpful -
Needed sample program for emailing the report output
hi all,
neede sample program for emailing the report outputHi,
Please refer this program for sending e-mail with attachment.
***INCLUDE ZHZLPP_CLZSN_DAILY_MIS_PRINT .
*& Form print
* text
* --> p1 text
* <-- p2 text
FORM print .
DATA: wa_output_options TYPE ssfcompop,
wa_control_parameters TYPE ssfctrlop,
t_otfdata TYPE ssfcrescl,
t_pdf_tab TYPE TABLE OF tline WITH HEADER LINE.
DATA: t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE.
DATA: w_filesize TYPE i.
DATA: w_bin_filesize TYPE i.
DATA: i_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
i_tline TYPE TABLE OF tline WITH HEADER LINE,
v_form_name TYPE rs38l_fnam,
v_len_in LIKE sood-objlen,
w_return TYPE ssfcrescl.
DATA : l_mean TYPE p DECIMALS 2,
l_mean1 TYPE p DECIMALS 2,
l_mean2 TYPE p DECIMALS 2,
l_mean3 TYPE p DECIMALS 4,
temp TYPE p DECIMALS 2,
v_header LIKE zmisdisp3-remark,
disp_d_kwh_mt TYPE zmisdisp5,
disp_m_kwh_mt TYPE zmisdisp5,
disp_d_mt_mw TYPE zmisdisp5,
disp_m_mt_mw TYPE zmisdisp5,
l_bptarget(16) TYPE p DECIMALS 2,
l_act_d(16) TYPE p DECIMALS 2,
l_act_c(16) TYPE p DECIMALS 2,
l_pow_gen TYPE p DECIMALS 2,
l_pow_gen_d TYPE p DECIMALS 2,
l_pow_gen_c TYPE p DECIMALS 2,
l_no_of_days TYPE p,
disp_bptarget TYPE zmisdisp5,
disp_act_d TYPE zmisdisp5,
disp_act_c TYPE zmisdisp5,
disp_d_kwh TYPE zmisdisp5,
disp_c_kwh TYPE zmisdisp5,
disp_d_mw TYPE zmisdisp5,
disp_c_mw TYPE zmisdisp5,
disp_pow_gen_d TYPE zmisdisp5,
disp_pow_gen_c TYPE zmisdisp5,
disp_pow_gen TYPE zmisdisp5,
disp_ftd_h1 TYPE zmisdisp5,
disp_ftd_h2 TYPE zmisdisp5,
disp_ftd_h3 TYPE zmisdisp5,
disp_ftd_h4 TYPE zmisdisp5,
disp_ftd_h5 TYPE zmisdisp5,
disp_ftd_o1 TYPE zmisdisp5,
disp_ftd_o2 TYPE zmisdisp5,
disp_ftd_o4 TYPE zmisdisp5,
disp_ftd_o5 TYPE zmisdisp5,
disp_***_o1 TYPE zmisdisp5,
disp_***_o2 TYPE zmisdisp5,
disp_***_o4 TYPE zmisdisp5,
disp_***_o5 TYPE zmisdisp5,
disp_cath_d TYPE zmisdisp5,
disp_cath_c TYPE zmisdisp5,
disp_anode_d TYPE zmisdisp5,
disp_anode_c TYPE zmisdisp5,
l_rec_con_d_kwh(16) TYPE p DECIMALS 2,
l_rec_con_c_kwh(16) TYPE p DECIMALS 2,
l_rec_con_d_mw(16) TYPE p DECIMALS 2,
l_rec_con_c_mw(16) TYPE p DECIMALS 2,
tot_kah TYPE p DECIMALS 2,
avg_kah TYPE p DECIMALS 2,
disp_tot_kah TYPE zmisdisp5,
disp_avg_kah TYPE zmisdisp5,
v_ftd_h1 TYPE p DECIMALS 2,
v_ftd_h2 TYPE p DECIMALS 2,
v_ftd_h3 TYPE p DECIMALS 2,
v_ftd_h4 TYPE p DECIMALS 2,
v_ftd_h5 TYPE p DECIMALS 2,
v_ftd_o1 TYPE p DECIMALS 2,
v_ftd_o2 TYPE p DECIMALS 2,
v_ftd_o4 TYPE p DECIMALS 2,
v_ftd_o5 TYPE p DECIMALS 2,
v_***_o1 TYPE p DECIMALS 2,
v_***_o2 TYPE p DECIMALS 2,
v_***_o4 TYPE p DECIMALS 2,
v_***_o5 TYPE p DECIMALS 2,
l_cdiff1 LIKE imrg-cdiff,
l_cdiff2 LIKE imrg-cdiff,
l_cdiff3 LIKE imrg-cdiff,
l_cdiff4 LIKE imrg-cdiff,
l_path LIKE rlgrap-filename,
l_flag.
DATA :prod_disp TYPE TABLE OF zmisdisp1 WITH HEADER LINE,
keyp_disp TYPE TABLE OF zmisdisp2 WITH HEADER LINE,
keyp_dis1 TYPE TABLE OF zmisdisp2 WITH HEADER LINE,
rmat_disp TYPE TABLE OF zmisdisp4 WITH HEADER LINE,
rcur_disp TYPE TABLE OF zmisdisp6 WITH HEADER LINE,
rhrs_disp TYPE TABLE OF zmisdisp4 WITH HEADER LINE,
brkd_disp TYPE TABLE OF zmisdisp7 WITH HEADER LINE.
DEFINE fill_kpp.
clear l_flag.
loop at it_mic_data where kurztext = &1.
l_mean1 = it_mic_data-mittelwert.
l_mean = it_mic_data-mean.
if l_flag = ' '.
move : &2 to keyp_disp-desc,
l_mean1 to keyp_disp-ftd.
if it_mic_data-kurztext = 'Ingot Pb SHG Zinc'.
l_mean2 = v_mean_pbshg.
move l_mean2 to keyp_disp-avg.
elseif it_mic_data-kurztext = 'Ingot Cu SHG Zinc'.
l_mean2 = v_mean_cushg.
move l_mean2 to keyp_disp-avg.
elseif it_mic_data-kurztext = 'Ingot Cd SHG Zinc'.
l_mean2 = v_mean_cdshg.
move l_mean2 to keyp_disp-avg.
elseif it_mic_data-kurztext = 'Ingot Fe SHG Zinc'.
l_mean2 = v_mean_feshg.
move l_mean2 to keyp_disp-avg.
elseif it_mic_data-kurztext = 'Ingot Zn SHG Zinc'.
l_mean2 = v_mean_znshg.
move l_mean2 to keyp_disp-avg.
else.
move l_mean to keyp_disp-avg.
endif.
if it_mic_data-masseinhsw = 'GLI'.
move 'g/l' to keyp_disp-unit.
elseif it_mic_data-masseinhsw = 'PPM'.
move 'ppm' to keyp_disp-unit.
elseif it_mic_data-masseinhsw = 'NO'.
move 'no' to keyp_disp-unit.
else.
move it_mic_data-masseinhsw to keyp_disp-unit.
endif.
append keyp_disp.
clear keyp_disp.
move 'X' to l_flag.
else.
move : l_mean1 to keyp_disp-ftd.
append keyp_disp.
clear keyp_disp.
endif.
endloop.
if sy-subrc is not initial.
move &2 to keyp_disp-desc.
append keyp_disp.
clear keyp_disp.
endif.
END-OF-DEFINITION.
DEFINE fill_kp1.
clear l_flag.
loop at it_mic_data where kurztext = &1.
l_mean1 = it_mic_data-mittelwert.
l_mean = it_mic_data-mean.
if l_flag = ' '.
move : &2 to keyp_dis1-desc,
l_mean1 to keyp_dis1-ftd.
if it_mic_data-kurztext = 'Ingot Pb SHG Zinc'.
l_mean2 = v_mean_pbshg.
move l_mean2 to keyp_dis1-avg.
elseif it_mic_data-kurztext = 'Ingot Cu SHG Zinc'.
l_mean2 = v_mean_cushg.
move l_mean2 to keyp_dis1-avg.
elseif it_mic_data-kurztext = 'Ingot Cd SHG Zinc'.
l_mean2 = v_mean_cdshg.
move l_mean2 to keyp_dis1-avg.
elseif it_mic_data-kurztext = 'Ingot Fe SHG Zinc'.
l_mean2 = v_mean_feshg.
move l_mean2 to keyp_dis1-avg.
elseif it_mic_data-kurztext = 'Ingot Zn SHG Zinc'.
l_mean3 = v_mean_znshg.
move l_mean3 to keyp_dis1-avg.
clear l_mean3.
l_mean3 = it_mic_data-mittelwert.
move l_mean3 to keyp_dis1-ftd.
else.
move l_mean to keyp_dis1-avg.
endif.
if it_mic_data-masseinhsw = 'GLI'.
move 'g/l' to keyp_dis1-unit.
elseif it_mic_data-masseinhsw = 'PPM'.
move 'ppm' to keyp_dis1-unit.
elseif it_mic_data-masseinhsw = 'NO'.
move 'no' to keyp_dis1-unit.
else.
move it_mic_data-masseinhsw to keyp_dis1-unit.
endif.
append keyp_dis1.
clear keyp_dis1.
move 'X' to l_flag.
else.
if it_mic_data-kurztext = 'Ingot Zn SHG Zinc'.
clear l_mean3.
l_mean3 = it_mic_data-mittelwert.
move l_mean3 to keyp_dis1-ftd.
else.
move : l_mean1 to keyp_dis1-ftd.
endif.
append keyp_dis1.
clear keyp_dis1.
endif.
endloop.
if sy-subrc is not initial.
move &2 to keyp_dis1-desc.
append keyp_dis1.
clear keyp_dis1.
endif.
END-OF-DEFINITION.
*FIRST PAGE
********PLANT HEADER
MOVE 'CLZS HYDRO I PLANT - DAILY PRODUCTION REPORT' TO v_header.
********Production figure
LOOP AT it_disp1.
prod_disp-desc = it_disp1-desc.
prod_disp-d_plnmg = it_disp1-d_plnmg.
prod_disp-d_menge = it_disp1-d_menge.
prod_disp-u_plnmg = it_disp1-u_plnmg.
prod_disp-u_menge = it_disp1-u_menge.
prod_disp-avg = it_disp1-avg.
prod_disp-ask_rate = it_disp1-ask_rate.
prod_disp-m_plnmg = it_disp1-m_plnmg.
prod_disp-y_plnmg = it_disp1-y_plnmg.
prod_disp-y_menge = it_disp1-y_menge.
prod_disp-y_variance = it_disp1-y_variance.
APPEND prod_disp.
ENDLOOP.
********Key performance parameters
MOVE 'ROASTER :' TO keyp_disp-desc.
APPEND keyp_disp.
fill_kpp '% S/S IN 45 DEG' ' S/S in Calcine'.
MOVE 'LEACHING :' TO keyp_disp-desc.
APPEND keyp_disp.
fill_kpp '% S/S IN CAL' ' S/S in Calcine'.
fill_kpp '%water soluble Zn' ' W/S Zn in Jarosite Cake'.
fill_kpp '%total Zn in HBF' ' T/Zn in Jarosite cake'.
fill_kpp 'ZINC IN CT' ' Zn in Conditioning tank'.
fill_kpp 'g/l zn in neutral overflow' ' Zn in Electrolyte Prod (gpl)'.
fill_kpp 'PPM CU IN PS25' ' Purified Solution Cu'.
fill_kpp 'PPM CADMIUM IN PS25' ' Purified Solution Cd'.
fill_kpp 'PPM COBALT IN PS25' ' Purified Solution Co'.
MOVE 'CELLHOUSE :' TO keyp_disp-desc.
APPEND keyp_disp.
fill_kpp 'g/l zinc in cell feed' ' Cell Feed Zinc gpl'.
fill_kpp 'GPL ACID IN CELL FEED' ' Cell Feed acidity gpl'.
fill_kpp 'g/l manganese in cell feed' ' Cell Feed Mn gpl'.
LOOP AT t_imrg_add_disp.
MOVE: t_imrg_add_disp-desc TO keyp_disp-desc,
t_imrg_add_disp-d_value TO keyp_disp-ftd,
t_imrg_add_disp-c_value TO temp,
temp TO keyp_disp-avg.
IF t_imrg_add_disp-units = 'NO'.
MOVE: 'no' TO keyp_disp-unit.
ELSE.
MOVE: t_imrg_add_disp-units TO keyp_disp-unit.
ENDIF.
APPEND keyp_disp.CLEAR keyp_disp.
ENDLOOP.
fill_kp1 'Ingot Pb SHG Zinc' ' Ingot Pb SHG Zinc'.
fill_kp1 'Ingot Cu SHG Zinc' ' Ingot Cu SHG Zinc'.
fill_kp1 'Ingot Cd SHG Zinc' ' Ingot Cd SHG Zinc'.
fill_kp1 'Ingot Fe SHG Zinc' ' Ingot Fe SHG Zinc'.
fill_kp1 'Ingot Zn SHG Zinc' ' Ingot Zn SHG Zinc'.
********Cellhouse power
CATCH SYSTEM-EXCEPTIONS bcd_zerodivide = 1.
v_m_kwh_mt = v_ind8_m / cathode_recipt.
v_m_mt_mw = cathode_recipt / ( v_ind8_m / 24000 ).
ENDCATCH.
MOVE : v_d_kwh_mt TO disp_d_kwh_mt,
v_m_kwh_mt TO disp_m_kwh_mt,
v_d_mt_mw TO disp_d_mt_mw,
v_m_mt_mw TO disp_m_mt_mw.
*SECOND PAGE
********Raw Material
LOOP AT it_disp3.
rmat_disp-desc = it_disp3-desc.
rmat_disp-opstk = it_disp3-opstk.
rmat_disp-d_recpt = it_disp3-d_recpt.
rmat_disp-u_recpt = it_disp3-u_recpt.
rmat_disp-d_cons = it_disp3-d_cons.
rmat_disp-u_cons = it_disp3-u_cons.
rmat_disp-clstk = it_disp3-clstk.
APPEND rmat_disp.
ENDLOOP.
********Work in Progress
********Finished Goods
********power consumption
l_no_of_days = v_mm_en_dt+6(2).
CATCH SYSTEM-EXCEPTIONS bcd_zerodivide = 1.
l_bptarget = ( v_bp_nrms_p * v_gross_d ) / l_no_of_days.
l_act_d = v_ind6_d + v_ind2_d - ( v_ind3_d + ( v_ind4_d / 2 ) ) - v_ind5_d.
l_act_c = v_ind6_m + v_ind2_m - ( v_ind3_m + ( v_ind4_m / 2 ) ) - v_ind5_m.
l_pow_gen = ( v_ind2_d / 1000 ) / v_ind7_d.
ENDCATCH.
l_pow_gen_d = v_ind2_d / 1000.
l_pow_gen_c = v_ind9_m / 1000.
l_rec_con_d_kwh = v_ind8_d.
l_rec_con_c_kwh = v_ind8_m.
l_rec_con_d_mw = v_ind8_d / 24000.
l_rec_con_c_mw = v_ind8_m / ( 24000 * v_days_pased ).
LOOP AT t_disp_curr.
rcur_disp-time = t_disp_curr-time.
rcur_disp-current = t_disp_curr-current.
rcur_disp-kah = t_disp_curr-kah.
APPEND rcur_disp.
AT LAST.
SUM.
tot_kah = t_disp_curr-kah.
ENDAT.
ENDLOOP.
avg_kah = tot_kah / '24'.
*********************running hrs
LOOP AT it_disp6.
rhrs_disp-desc = it_disp6-desc.
rhrs_disp-opstk = it_disp6-d_runhrs.
rhrs_disp-d_recpt = it_disp6-m_runhrs.
APPEND rhrs_disp.
ENDLOOP.
rhrs_disp-desc = 'Turbo Generator'.
rhrs_disp-opstk = v_turbod.
rhrs_disp-d_recpt = v_turboc.
INSERT rhrs_disp INDEX 2.
**********************BREAK_DOWN & OIL
CLEAR value.
LOOP AT itab2.
IF itab2-equnr = 'NMZ-EH01G001'.
PERFORM s_conversion_h.
v_ftd_h1 = v_ftd_h1 + value.
CLEAR value.
ENDIF.
IF itab2-equnr = 'NMZ-EH01G002'.
PERFORM s_conversion_h.
v_ftd_h2 = v_ftd_h2 + value.
CLEAR value.
ENDIF.
IF itab2-equnr = 'NMZ-EH01V003'.
PERFORM s_conversion_h.
v_ftd_h3 = v_ftd_h3 + value.
CLEAR value.
ENDIF.
IF itab2-equnr = 'NMZ-EH01V001'.
PERFORM s_conversion_h.
v_ftd_h4 = v_ftd_h4 + value.
CLEAR value.
ENDIF.
IF itab2-equnr = 'NMZ-EH01V002'.
PERFORM s_conversion_h.
v_ftd_h5 = v_ftd_h5 + value.
CLEAR value.
ENDIF.
ENDLOOP.
LOOP AT t_oil.
AT END OF ind.
SUM.
IF t_oil-ind = 1.
v_***_o1 = t_oil-cdiff * 1000.
ELSEIF t_oil-ind = 2.
v_***_o2 = t_oil-cdiff * 1000.
ELSEIF t_oil-ind = 3.
v_***_o4 = t_oil-cdiff * 1000.
ELSEIF t_oil-ind = 4.
v_***_o5 = t_oil-cdiff * 1000.
ENDIF.
ENDAT.
IF t_oil-idate = p_repdt.
IF t_oil-ind = 1.
l_cdiff1 = l_cdiff1 + t_oil-cdiff.
ELSEIF t_oil-ind = 2.
l_cdiff2 = l_cdiff2 + t_oil-cdiff.
ELSEIF t_oil-ind = 3.
l_cdiff3 = l_cdiff3 + t_oil-cdiff.
ELSEIF t_oil-ind = 4.
l_cdiff4 = l_cdiff4 + t_oil-cdiff.
ENDIF.
ENDIF.
ENDLOOP.
v_ftd_o1 = l_cdiff1 * 1000.
v_ftd_o2 = l_cdiff2 * 1000.
v_ftd_o4 = l_cdiff3 * 1000.
v_ftd_o5 = l_cdiff4 * 1000.
*********Breakdown details----3rd page
LOOP AT itab INTO wa.
CALL FUNCTION 'FLTP_CHAR_CONVERSION'
EXPORTING
decim = 0
expon = 0
input = wa-auszt
ivalu = 'X'
IMPORTING
flstr = wk_char_auszt.
CONDENSE wk_char_auszt NO-GAPS.
wk_flt_auszt = wk_char_auszt.
wk_flt_auszt = wk_flt_auszt / 3600.
duration = wk_flt_auszt.
brkd_disp-eqdesc = wa-eqktx.
brkd_disp-nodesc = wa-qmtxt.
brkd_disp-hrs = duration.
APPEND brkd_disp.
ENDLOOP.
MOVE : v_ftd_h1 TO disp_ftd_h1,
v_ftd_h2 TO disp_ftd_h2,
v_ftd_h3 TO disp_ftd_h3,
v_ftd_h4 TO disp_ftd_h4,
v_ftd_h5 TO disp_ftd_h5,
v_ftd_o1 TO disp_ftd_o1,
v_ftd_o2 TO disp_ftd_o2,
v_ftd_o4 TO disp_ftd_o4,
v_ftd_o5 TO disp_ftd_o5,
v_***_o1 TO disp_***_o1,
v_***_o2 TO disp_***_o2,
v_***_o4 TO disp_***_o4,
v_***_o5 TO disp_***_o5,
l_bptarget TO disp_bptarget,
l_act_d TO disp_act_d,
l_act_c TO disp_act_c,
l_rec_con_d_kwh TO disp_d_kwh,
l_rec_con_c_kwh TO disp_c_kwh,
l_rec_con_d_mw TO disp_d_mw,
l_rec_con_c_mw TO disp_c_mw,
tot_kah TO disp_tot_kah,
avg_kah TO disp_avg_kah,
l_pow_gen TO disp_pow_gen,
l_pow_gen_d TO disp_pow_gen_d,
l_pow_gen_c TO disp_pow_gen_c,
v_cath_d TO disp_cath_d,
v_cath_c TO disp_cath_c,
v_anode_d TO disp_anode_d,
v_anode_c TO disp_anode_c.
wa_output_options-tdimmed = 'X'.
wa_control_parameters-device = 'PRINTER'.
wa_control_parameters-preview = 'X'.
IF rb3 = 'X'.
wa_control_parameters-getotf = 'X'.
wa_control_parameters-no_dialog = 'X'.
ENDIF.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZHZLPP_CLZSN_DAILY_MIS'
IMPORTING
fm_name = v_form_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
ENDIF.
CALL FUNCTION v_form_name
EXPORTING
control_parameters = wa_control_parameters
output_options = wa_output_options
user_settings = 'X'
header = v_header
date = p_repdt
l_bptarget = disp_bptarget
l_act_d = disp_act_d
l_act_c = disp_act_c
disp_d_kwh = disp_d_kwh
disp_c_kwh = disp_c_kwh
disp_d_mw = disp_d_mw
disp_c_mw = disp_c_mw
disp_tot_kah = disp_tot_kah
disp_avg_kah = disp_avg_kah
disp_d_kwh_mt = disp_d_kwh_mt
disp_m_kwh_mt = disp_m_kwh_mt
disp_d_mt_mw = disp_d_mt_mw
disp_m_mt_mw = disp_m_mt_mw
disp_pow_gen = disp_pow_gen
disp_pow_gen_d = disp_pow_gen_d
disp_pow_gen_c = disp_pow_gen_c
disp_ftd_h1 = disp_ftd_h1
disp_ftd_h2 = disp_ftd_h2
disp_ftd_h3 = disp_ftd_h3
disp_ftd_h4 = disp_ftd_h4
disp_ftd_h5 = disp_ftd_h5
disp_ftd_o1 = disp_ftd_o1
disp_ftd_o2 = disp_ftd_o2
disp_ftd_o4 = disp_ftd_o4
disp_ftd_o5 = disp_ftd_o5
disp_***_o1 = disp_***_o1
disp_***_o2 = disp_***_o2
disp_***_o4 = disp_***_o4
disp_***_o5 = disp_***_o5
disp_cath_d = disp_cath_d
disp_cath_c = disp_cath_c
disp_anode_d = disp_anode_d
disp_anode_c = disp_anode_c
IMPORTING
job_output_info = w_return " .
TABLES
prod_tab = prod_disp
keyp_tab = keyp_disp
remk_tab = it_remarks
rmat_tab = rmat_disp
rwip_tab = it_disp4
rfng_tab = it_disp_fg
rcur_tab = rcur_disp
rhrs_tab = rhrs_disp
brkd_tab = brkd_disp
keyp_tab1 = keyp_dis1
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5
IF sy-subrc <> 0.
MESSAGE 'Error in printing form' TYPE 'I'.
ENDIF.
********Downloading in pdf format.
IF rb3 = 'X'.
IF l_usract <> 9.
MOVE fullpath TO l_path.
i_otf[] = w_return-otfdata[].
CALL FUNCTION 'CONVERT_OTF' "
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = v_len_in
TABLES
otf = i_otf
lines = i_tline
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
OTHERS = 4.
IF sy-subrc <> 0.
ENDIF.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
bin_filesize = v_len_in
filename = l_path
filetype = 'BIN'
IMPORTING
filelength = w_filesize
TABLES
data_tab = i_tline
EXCEPTIONS
file_open_error = 1
file_write_error = 2
invalid_filesize = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
OTHERS = 10.
IF sy-subrc = 0.
MESSAGE 'File downloaded successfully' TYPE 'S'.
ENDIF.
ENDIF.
ENDIF.
IF sy-batch = 'X'. " SENDING MAILS IF SCHEDULED IN BACKGROUND
DATA: formname TYPE tdsfname,
fm_name TYPE rs38l_fnam,
control_parameters TYPE ssfctrlop,
output_options TYPE ssfcompop,
job_output_info TYPE ssfcrescl,
otf_data TYPE tsfotf.
DATA: otf TYPE TABLE OF itcoo WITH HEADER LINE,
doctab_archive TYPE TABLE OF docs WITH HEADER LINE,
lines TYPE TABLE OF tline WITH HEADER LINE,
bin_filesize TYPE i.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZHZLPP_CLZSN_DAILY_MIS'
IMPORTING
fm_name = v_form_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
ENDIF.
control_parameters-no_dialog = 'X'.
control_parameters-getotf = 'X'.
CALL FUNCTION v_form_name
EXPORTING
control_parameters = control_parameters
header = v_header
date = p_repdt
l_bptarget = disp_bptarget
l_act_d = disp_act_d
l_act_c = disp_act_c
disp_d_kwh = disp_d_kwh
disp_c_kwh = disp_c_kwh
disp_d_mw = disp_d_mw
disp_c_mw = disp_c_mw
disp_tot_kah = disp_tot_kah
disp_avg_kah = disp_avg_kah
disp_d_kwh_mt = disp_d_kwh_mt
disp_m_kwh_mt = disp_m_kwh_mt
disp_d_mt_mw = disp_d_mt_mw
disp_m_mt_mw = disp_m_mt_mw
disp_pow_gen = disp_pow_gen
disp_pow_gen_d = disp_pow_gen_d
disp_pow_gen_c = disp_pow_gen_c
disp_ftd_h1 = disp_ftd_h1
disp_ftd_h2 = disp_ftd_h2
disp_ftd_h3 = disp_ftd_h3
disp_ftd_h4 = disp_ftd_h4
disp_ftd_h5 = disp_ftd_h5
disp_ftd_o1 = disp_ftd_o1
disp_ftd_o2 = disp_ftd_o2
disp_ftd_o4 = disp_ftd_o4
disp_ftd_o5 = disp_ftd_o5
disp_***_o1 = disp_***_o1
disp_***_o2 = disp_***_o2
disp_***_o4 = disp_***_o4
disp_***_o5 = disp_***_o5
disp_cath_d = disp_cath_d
disp_cath_c = disp_cath_c
disp_anode_d = disp_anode_d
disp_anode_c = disp_anode_c
IMPORTING
job_output_info = job_output_info
TABLES
prod_tab = prod_disp
keyp_tab = keyp_disp
remk_tab = it_remarks
rmat_tab = rmat_disp
rwip_tab = it_disp4
rfng_tab = it_disp_fg
rcur_tab = rcur_disp
rhrs_tab = rhrs_disp
brkd_tab = brkd_disp
keyp_tab1 = keyp_dis1
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc = 0.
otf_data = job_output_info-otfdata[].
CALL FUNCTION 'CONVERT_OTF_2_PDF'
IMPORTING
bin_filesize = bin_filesize
TABLES
otf = otf_data[]
doctab_archive = doctab_archive[]
lines = lines[]
EXCEPTIONS
err_conv_not_possible = 1
err_otf_mc_noendmarker = 2
OTHERS = 3.
IF sy-subrc = 0.
SUBMIT rsconn01 with mode = 'INT' AND RETURN.
* ----<<distrubution list>>----
PERFORM mail_users TABLES lines USING 'MIS-HY1A' v_header. " Donot put more than 8 email-ids
PERFORM mail_users TABLES lines USING 'MIS-HY1B' v_header. " in a distribution list
PERFORM mail_users TABLES lines USING 'MIS-HY1C' v_header.
PERFORM mail_users TABLES lines USING 'MIS-HY1D' v_header.
PERFORM mail_users TABLES lines USING 'MIS-HY1E' v_header.
PERFORM mail_users TABLES lines USING 'MIS-HY1F' v_header.
PERFORM mail_users TABLES lines USING 'MIS-HY1G' v_header.
PERFORM mail_users TABLES lines USING 'MIS-HY1H' v_header.
PERFORM mail_users TABLES lines USING 'MIS-HY1I' v_header.
PERFORM mail_users TABLES lines USING 'MIS-HY1J' v_header.
ENDIF.
ENDIF.
ENDIF.
ENDFORM. " print
*& Form get_download_path
* text
* --> p1 text
* <-- p2 text
FORM get_download_path .
CALL FUNCTION 'GUI_FILE_SAVE_DIALOG'
EXPORTING
window_title = 'Download as pdf file'
default_extension = 'pdf'
IMPORTING
fullpath = fullpath
user_action = l_usract.
IF l_usract = '9'.
STOP.
ENDIF.
ENDFORM. " get_download_path
*& Form mail_users
* text
* -->P_LINES text
* -->P_2153 text
* -->P_V_HEADER text
FORM mail_users TABLES p_lines STRUCTURE tline
USING p_dist_list
p_v_header.
CONSTANTS: c_raw TYPE so_obj_tp VALUE 'RAW',
c_pdf TYPE so_obj_tp VALUE 'PDF',
c_255 TYPE i VALUE 255,
c_134 TYPE i VALUE 134,
c_x TYPE c VALUE 'X'.
DATA: document_data LIKE sodocchgi1 ,
tab_lines TYPE i,
contents_txt TYPE TABLE OF solisti1 WITH HEADER LINE,
contents_bin TYPE TABLE OF solisti1 WITH HEADER LINE,
packing_list TYPE TABLE OF sopcklsti1 WITH HEADER LINE,
object_header TYPE TABLE OF solisti1 WITH HEADER LINE,
receivers TYPE TABLE OF somlreci1 WITH HEADER LINE,
l_str(255) ,
v1 TYPE i,
v2 TYPE i,
v3 TYPE i.
document_data-obj_name = 'EMAIL'.
document_data-obj_descr = p_v_header. " SUBJECT LINE
CONCATENATE 'Please find the attached SAP generated Daily Production Report for the day'
p_repdt+6(2)
p_repdt+4(2)
'.' p_repdt+0(4)
INTO contents_txt.
APPEND contents_txt.
CLEAR contents_txt.
APPEND contents_txt.
APPEND contents_txt.
DESCRIBE TABLE contents_txt LINES tab_lines.
READ TABLE contents_txt INDEX tab_lines.
document_data-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( contents_txt ).
document_data-doc_size = tab_lines .
CLEAR packing_list-transf_bin.
packing_list-head_start = 1.
packing_list-head_num = 0.
packing_list-body_start = 1.
packing_list-body_num = tab_lines.
packing_list-doc_type = c_raw.
packing_list-doc_size = document_data-doc_size.
APPEND packing_list.
LOOP AT p_lines.
CLEAR l_str.
l_str+0(2) = p_lines-tdformat.
l_str+2(132) = p_lines-tdline.
v2 = v1 + c_134.
IF v2 LE c_255.
contents_bin-line+v1(c_134) = l_str. v1 = v2.
ELSE.
v3 = v2 - c_255.
v2 = c_255 - v1.
IF NOT v2 IS INITIAL.
contents_bin-line+v1(v2) = l_str+0(v2).
ENDIF.
APPEND contents_bin.
CLEAR contents_bin.
v1 = v3.
v3 = 134 - v1.
IF NOT v1 IS INITIAL.
contents_bin-line+0(v1) = l_str+v3(v1).
ENDIF.
ENDIF.
ENDLOOP.
APPEND contents_bin.
CLEAR contents_bin.
DESCRIBE TABLE contents_bin LINES tab_lines.
READ TABLE contents_bin INDEX tab_lines.
CONCATENATE 'Hy-I Report'
p_repdt+6(2)
p_repdt+4(2)
'.' p_repdt+0(4)
'.pdf'
INTO object_header.
APPEND object_header.
packing_list-transf_bin = c_x.
packing_list-head_start = 1.
packing_list-head_num = 1.
packing_list-body_start = 1.
packing_list-body_num = tab_lines.
packing_list-doc_type = c_pdf.
packing_list-obj_name = 'text1'.
packing_list-obj_descr = 'Production report'.
packing_list-doc_size = tab_lines * 255 + STRLEN( contents_bin ).
APPEND packing_list.
receivers-receiver = p_dist_list.
receivers-rec_type = 'C'.
APPEND receivers.
CLEAR receivers.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = document_data
put_in_outbox = ' '
SENDER_ADDRESS = 'CZPPPLG'
SENDER_ADDRESS_TYPE = 'B'
commit_work = 'X'
TABLES
packing_list = packing_list
object_header = object_header
contents_bin = contents_bin
contents_txt = contents_txt
receivers = receivers
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
IF sy-subrc = 0.
WAIT UP TO 2 SECONDS.
SUBMIT rsconn01 with mode = 'INT' AND RETURN.
ENDIF.
ENDFORM. " mail_users -
Need sample code with RV_INVOICE_CREATE used
Hi everybody!
I need sample code with RV_INVOICE_CREATE or similar FMs used.
The thing is that I do not know how to populate parametres of this and other invoicing FMs....
For example, there are some tables to be passed to RV_INVOICE_CREATE
TABLES
XKOMFK = XKOMFK
XKOMV = XKOMV
XTHEAD = XTHEAD
XVBFS = XVBFS
XVBPA = XVBPA
XVBRK = XVBRK
XVBRP = XVBRP
XVBSS = XVBSS
How to populate them? I mean how to fill them with needed values?
Useful answers will be awarded.
Kind regards, M.RV_INVOICE_CREATE is the function module to create invoice based on delivery .
when you pass delivery number ,it will create invoice ,see the invoice number in vf02,vf03 transaction. and also see the data vbrk,vbrp tables
I have done this development and i have cancelled invoice,reverse goods issue,updated the delivery and again i am createing invoice..see the below progrm to get better understanding.
REPORT ZWM_OVERWEIGHT_FIX no standard page heading
message-id zwm.
======================================================================
Program Name : ZWM_OVERWEIGHT_FIX *
Description : Tool to fix Overweight in delivery line item, *
Used All Function module to cancel invoice , *
Reverse the goods issue ,Update Delivery qty,Create *
invoice *
Author : Seshu *
Date : 05/08/2007 *
MODIFICATION HISTORY *
DATE | AUTHOR | CHANGE # | DESCRIPTION OF MODIFICATION *
--|||--
05/08/07| Seshu | DEVK921979 | Initial *
D A T A - D E C L A R A T I O N *******************
Tables
Tables : vbak,
vbap,
vbfa,
likp,
lips,
vbrk,
vbrp.
Internal Tables
data : i_lips like lips occurs 0 with header line,
i_vbap like vbap occurs 0 with header line.
Variables
data : v_deliv like vbfa-vbelv,
v_invoic like vbfa-vbelv.
Data Declaration Part for Post Goods Issue
DATA: l_vbeln LIKE likp-vbeln,
l_vbkok LIKE vbkok,
i_prot LIKE prott OCCURS 0 WITH HEADER LINE,
ef_error_any_0 TYPE c,
ef_error_in_item_deletion_0 TYPE c,
ef_error_in_pod_update_0 TYPE c,
ef_error_in_interface_0 TYPE c,
ef_error_in_goods_issue_0 TYPE c,
ef_error_in_final_check_0 TYPE c,
d_return LIKE bapireturn1.
Internal tables for BAPI Function Module
data : i_cret like BAPIRETURN1 occurs 0 with header line,
i_csucess like BAPIVBRKSUCcESS occurs 0 with header line,
i_ret2 like bapiret2 ,
flag type c,
i_mesg like mesg occurs 0 with header line.
Data Declaration for Invoice Creation
DATA: VBSK_I LIKE VBSK.
data: d_success type c.
DATA: XKOMFK LIKE KOMFK OCCURS 0 WITH HEADER LINE,
XKOMV LIKE KOMV OCCURS 0 WITH HEADER LINE,
XTHEAD LIKE THEADVB OCCURS 0 WITH HEADER LINE,
XVBFS LIKE VBFS OCCURS 0 WITH HEADER LINE,
XVBPA LIKE VBPAVB OCCURS 0 WITH HEADER LINE,
XVBRK LIKE VBRKVB OCCURS 0 WITH HEADER LINE,
XVBRP LIKE VBRPVB OCCURS 0 WITH HEADER LINE,
XVBSS LIKE VBSS OCCURS 0 WITH HEADER LINE,
XKOMFKGN LIKE KOMFKGN OCCURS 0 WITH HEADER LINE.
S E L E C T I O N - S C R E E N ******************
Selection-screen
Selection-screen : begin of block blk with frame title text-001.
parameters : p_vbeln like vbak-vbeln obligatory.
selection-screen : end of block blk.
A T - S E L E C T I O N - S C R E E N ***************
Validation on Sales order
at selection-screen on p_vbeln.
Check the data on VBAK Table
select single vbeln from vbak into vbak-vbeln
where vbeln = p_vbeln.
if sy-subrc ne 0.
message e006 with p_vbeln.
endif.
S T A R T - O F - S E L E C T I O N *******************
Start-of-selection.
break sreddy.
Get the Invoice Number corresponding Sales Order Number
perform get_invoice.
Step 1.
Cancel the Invoice - Transaction VF11
perform cancel_invoice.
Reverse the goods issue
perform reverse_goodsissue.
Get the Order and Delivery Items
perform get_sales_deliv.
Delivery Change
perform Delivery_change.
Create Invoice document
perform invoice_create.
E N D - O F - S E L E C T I O N *******************
end-of-selection.
if flag = 'X'.
message i012 with p_vbeln.
endif.
*& Form get_invoice
Get Invoice Number
FORM get_invoice.
Clear Variables
clear : v_deliv,
v_invoic,
flag.
Get the Delivery Number First
select single vbeln from vbfa into v_deliv
where vbelv = p_vbeln
and vbtyp_n = 'J'.
if sy-subrc ne 0.
message i004 with p_vbeln.
stop.
endif.
Get the Invoice Number
select single vbeln from vbfa into v_invoic
where vbelv = p_vbeln
and vbtyp_n = 'M'.
if sy-subrc ne 0.
message i003 with p_vbeln.
stop.
endif.
ENDFORM. " get_invoice
*& Form cancel_invoice
Cancel the Invoice
FORM cancel_invoice.
clear : i_ret2,
i_cret,
i_csucess.
refresh : i_cret,
i_csucess.
CALL FUNCTION 'BAPI_BILLINGDOC_CANCEL1'
EXPORTING
BILLINGDOCUMENT = v_invoic
TESTRUN =
NO_COMMIT =
BILLINGDATE =
TABLES
RETURN = i_cret
SUCCESS = i_csucess
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = space
IMPORTING
RETURN = i_ret2.
read table i_cret with key type = 'E'.
if sy-subrc ne 0.
message i005 with v_invoic.
stop.
endif.
ENDFORM. " cancel_invoice
*& Form reverse_goodsissue
Reverse the goods Issue
FORM reverse_goodsissue.
Local Variable
data : lv_vbtyp like likp-vbtyp.
clear : i_mesg,
lv_vbtyp.
refresh : i_mesg.
select single vbtyp from likp into lv_vbtyp
where vbeln = v_deliv.
CALL FUNCTION 'WS_REVERSE_GOODS_ISSUE'
EXPORTING
I_VBELN = v_deliv
I_BUDAT = sy-datum
I_COUNT =
I_MBLNR =
I_TCODE =
I_VBTYP = lv_vbtyp
TABLES
T_MESG = i_mesg
EXCEPTIONS
ERROR_REVERSE_GOODS_ISSUE = 1
OTHERS = 2
if sy-subrc ne 0.
message i007 with v_deliv.
endif.
ENDFORM. " reverse_goodsissue
*& Form get_sales_deliv
Get the Sales order and Deliv Items
FORM get_sales_deliv.
Local Variables
data : lv_kwmeng like vbap-kwmeng.
clear : i_lips,
i_vbap.
refresh : i_lips,
i_vbap.
Select the data from LIPS
select * from lips into table i_lips
where vbeln = v_deliv.
if sy-subrc ne 0.
message i008 with v_deliv.
stop.
endif.
sort i_lips by vbeln posnr.
Get the Sales order Item Data.
select * from vbap into table i_vbap
where vbeln = p_vbeln.
if sy-subrc ne 0.
message i006 with p_vbeln.
stop.
endif.
sort i_vbap by vbeln posnr.
Compare delivery Item and Order Items
loop at i_lips.
clear lv_kwmeng.
read table i_vbap with key posnr = i_lips-posnr.
if sy-subrc eq 0.
lv_kwmeng = i_vbap-kwmeng * 2.
if lv_kwmeng >= i_lips-lfimg.
i_lips-lfimg = i_vbap-kwmeng.
modify i_lips.
endif.
endif.
endloop.
ENDFORM. " get_sales_deliv
*& Form Delivery_change
Delivery Update
FORM Delivery_change.
Clear : i_prot.
refresh : i_prot.
Delivery Update
CALL FUNCTION 'LE_MOB_DELIVERY_UPDATE'
EXPORTING
do_commit = 'X'
TABLES
t_delivery_items = i_lips
prot = i_prot
EXCEPTIONS
conversion_overflow = 1
essential_data_missing = 2
error = 3
nothing_to_update = 4
lock_after_update_failed = 5
error_in_delivery_update = 6
OTHERS = 7.
COMMIT WORK.
IF sy-subrc <> 0.
MESSAGE i009 with v_deliv.
endif.
Post Goods Issue
CLEAR: d_return,
i_prot,
l_vbeln,
l_vbkok.
REFRESH i_prot.
CLEAR: ef_error_in_item_deletion_0 ,
ef_error_in_pod_update_0 ,
ef_error_in_interface_0 ,
ef_error_in_goods_issue_0 ,
ef_error_in_final_check_0 .
carry out goods issue
l_vbeln = v_deliv.
l_vbkok-vbeln_vl = l_vbeln.
l_vbkok-wabuc = 'X'.
carry out goods issue
l_vbeln = v_deliv.
l_vbkok-vbeln_vl = l_vbeln.
l_vbkok-wabuc = 'X'.
SET UPDATE TASK LOCAL.
CALL FUNCTION 'WS_DELIVERY_UPDATE'
EXPORTING
vbkok_wa = l_vbkok
synchron = 'X'
no_messages_update = ' '
update_picking = 'X'
commit = 'X'
delivery = l_vbeln
nicht_sperren = 'X'
if_error_messages_send_0 = space
IMPORTING
ef_error_any_0 = ef_error_any_0
ef_error_in_item_deletion_0 = ef_error_in_item_deletion_0
ef_error_in_pod_update_0 = ef_error_in_pod_update_0
ef_error_in_interface_0 = ef_error_in_interface_0
ef_error_in_goods_issue_0 = ef_error_in_goods_issue_0
ef_error_in_final_check_0 = ef_error_in_final_check_0
TABLES
prot = i_prot
EXCEPTIONS
error_message = 1
OTHERS = 2.
if sy-subrc ne 0.
message i010 with v_deliv.
else.
COMMIT WORK .
endif.
ENDFORM. " Delivery_change
*& Form invoice_create
Invoice Creation
FORM invoice_create.
refresh: XKOMFK, XKOMV,
XTHEAD, XVBFS,
XVBPA, XVBRK,
XVBRP, XVBSS.
clear : XKOMFK, XKOMV,
XTHEAD, XVBFS,
XVBPA, XVBRK,
XVBRP, XVBSS,
VBSK_I.
VBSK_I-SMART = 'F'.
XKOMFK-VBELN = v_deliv.
XKOMFK-VBTYP = 'J'.
APPEND XKOMFK.
CALL FUNCTION 'RV_INVOICE_CREATE'
EXPORTING
VBSK_I = VBSK_I
WITH_POSTING = 'C'
TABLES
XKOMFK = XKOMFK
XKOMV = XKOMV
XTHEAD = XTHEAD
XVBFS = XVBFS
XVBPA = XVBPA
XVBRK = XVBRK
XVBRP = XVBRP
XVBSS = XVBSS.
if sy-subrc eq 0.
COMMIT WORK.
flag = 'X'.
else.
message i011 with p_vbeln.
endif.
ENDFORM. " invoice_create
Reward Points if it is helpful
Thanks
Seshu -
Sample ALV report required for FI module
Hello friends,
I am develoing ALV report for FI module for that i need some sample ALV report. If someone have than please send it to me.
Thanx & Regards,
Rahul TaleleHI,
SEE THE SAMPLE REPORT
Fringe Benefit Tax Report
Program Name :
Object ID :
Functional Analyst :
Programmer :
Start date :
Initial CTS :
Description : FRINGE Benefit Tax
Includes :
Function Modules :
Logical database :
Transaction Code :
External references :
Modification Log
Date | Modified by | CTS number | Comments
| | | Initial Version *
REPORT ZFI_FBT NO STANDARD PAGE HEADING LINE-SIZE 255.
TYPE-POOLS: SLIS.
TYPES : BEGIN OF
T_BSIS,
BUKRS TYPE BUKRS, " Company Code
HKONT TYPE HKONT, " General Ledger Account
GJAHR TYPE GJAHR,
BELNR TYPE BELNR_D, " Accounting Document Number
BUDAT TYPE BUDAT, " Posting Date in the Document
BLDAT TYPE BLDAT, " Document Date in Document
XBLNR TYPE XBLNR1, " Reference Document Number
BSCHL TYPE BSCHL, " Posting Key
DMBTR TYPE DMBTR, " Amount in Local Currency
AUFNR TYPE AUFNR_NEU, " Order Number
NONFBT TYPE DMBTR, " non fbt amount
SUBFBT TYPE DMBTR, " subject to fbt amount
ZFI_FBT TYPE ZFI_FBT, " Qualifying amount.
AMOUNT TYPE DMBTR,
FBTPAY TYPE DMBTR,
ZFI_PAY TYPE ZFI_PAY,
END OF T_BSIS,
T_IT_BSIS TYPE STANDARD TABLE OF T_BSIS.
TYPES : BEGIN OF T_FRINGE,
ZFI_HKONT TYPE HKONT,
ZFI_FBT TYPE ZFI_FBT,
ZFI_PAY TYPE ZFI_PAY,
END OF T_FRINGE,
T_IT_FRINGE TYPE STANDARD TABLE OF T_FRINGE.
DATA : GIT_FRINGE TYPE T_IT_FRINGE,
GWA_FRINGE TYPE T_FRINGE.
DATA : GIT_BSIS TYPE T_IT_BSIS,
GWA_BSIS TYPE T_BSIS.
DATA : G_HKONT TYPE HKONT,
G_BUDAT TYPE BUDAT,
G_AUFNR TYPE AUFNR_NEU.
FIELD-SYMBOLS : <BSIS> TYPE T_BSIS.
DATA : G_REPID TYPE SY-REPID,
GIT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
GWA_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
GT_SORT TYPE SLIS_T_SORTINFO_ALV,
GT_EVENTS TYPE SLIS_T_EVENT,
GT_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER,
GS_LAYOUT TYPE SLIS_LAYOUT_ALV.
GS_LAYOUT-ZEBRA = 'X'.
GS_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
CONSTANTS : C_50(2) TYPE C VALUE '50'.
SELECTION SCREEN DEFINITIONS
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS : P_BUKRS TYPE BUKRS DEFAULT 'H901' OBLIGATORY.
SELECT-OPTIONS : S_HKONT FOR G_HKONT,
S_BUDAT FOR G_BUDAT.
*PARAMETERS : P_AUFNR TYPE AUFNR_NEU DEFAULT '000000100001' OBLIGATORY.
SELECTION-SCREEN END OF BLOCK B1.
EVENTS
INITIALIZATION.
INITIALIZATION.
G_REPID = SY-REPID.
AT SELECTION-SCREEN
AT SELECTION-SCREEN.
PERFORM GET_ZTABLE. " get data from ZFII_FRINGE table
START-OF-SELECTION.
START-OF-SELECTION.
PERFORM GET_DATA. " get data from BSIS table
IF NOT GIT_BSIS IS INITIAL.
PERFORM GET_PERCENTAGE. " to get the percentages from table ZFII_FRINGE
PERFORM CHK4_INTERNAL. " checking for the posting key wheather th document is reversed
" and checking wheather internal order is FBT or non-FBT
ENDIF.
END-OF-SELECTION.
END-OF-SELECTION.
IF NOT GIT_BSIS IS INITIAL.
PERFORM DISPLAY. " display ALV GRID display
ENDIF.
*& Form get_data
text
--> p1 text
<-- p2 text
FORM GET_DATA .
SELECT
BUKRS
HKONT
GJAHR
BELNR
BUDAT
BLDAT
XBLNR
BSCHL
DMBTR
AUFNR FROM BSIS
INTO TABLE GIT_BSIS
WHERE BUKRS EQ P_BUKRS AND
HKONT IN S_HKONT AND
BUDAT IN S_BUDAT.
IF SY-SUBRC NE 0.
MESSAGE I000(ZFI) WITH 'No data exist'.
EXIT.
ENDIF.
ENDFORM. " get_data
*& Form display
FORM DISPLAY .
PERFORM BUILD_FIELD_CATALOUGE.
PERFORM GET_EVENTS.
PERFORM DETERMINE_SORT_SEQUENCE.
PERFORM SUB_COMMENTERY_BUILD.
PERFORM ALV_DISPLAY.
ENDFORM. " display
*& Form build_field_catalouge
FORM BUILD_FIELD_CATALOUGE.
DATA : L_POS TYPE I.
L_POS = 1 .
PERFORM INIT_FIELD_CATALOG USING GIT_FIELDCAT[] " Field Catalog
L_POS " Column Position
'HKONT' " InTab Field Name
'GIT_BSIS' " InTab Name
'10' " Output Length
'GL Account' " Column Name Text
' ' " Datatype
'X' " Key?
'1' " Row Position
' ' " Hotspot
' ' " Emphasize
' ' " key_sel
' ' " justification
' '. " Sum field?
L_POS = L_POS + 1 .
PERFORM INIT_FIELD_CATALOG USING GIT_FIELDCAT[] " Field Catalog
L_POS " Column Position
'BELNR' " InTab Field Name
'GIT_BSIS' " InTab Name
'10' " Output Length
'Document No.' " Column Name Text
' ' " Datatype
'X' " Key?
'1' " Row Position
'X' " Hotspot
' ' " Emphasize
' ' " key_sel
' ' " justification
' '. " Sum field?
L_POS = L_POS + 1 .
PERFORM INIT_FIELD_CATALOG USING GIT_FIELDCAT[] " Field Catalog
L_POS " Column Position
'BUDAT' " InTab Field Name
'GIT_BSIS' " InTab Name
'10' " Output Length
'Posting Date' " Column Name Text
' ' " Datatype
' ' " Key?
'1' " Row Position
' ' " Hotspot
' ' " Emphasize
' ' " key_sel
' ' " justification
' '. " Sum field?
L_POS = L_POS + 1 .
PERFORM INIT_FIELD_CATALOG USING GIT_FIELDCAT[] " Field Catalog
L_POS " Column Position
'BLDAT' " InTab Field Name
'GIT_BSIS' " InTab Name
'10' " Output Length
'Docu. Date' " Column Name Text
' ' " Datatype
' ' " Key?
'1' " Row Position
' ' " Hotspot
' ' " Emphasize
' ' " key_sel
' ' " justification
' '. " Sum field?
L_POS = L_POS + 1 .
PERFORM INIT_FIELD_CATALOG USING GIT_FIELDCAT[] " Field Catalog
L_POS " Column Position
'XBLNR' " InTab Field Name
'GIT_BSIS' " InTab Name
'16' " Output Length
'Ref. Doc. Number' " Column Name Text
' ' " Datatype
' ' " Key?
'1' " Row Position
' ' " Hotspot
' ' " Emphasize
' ' " key_sel
' ' " justification
'X'. " Sum field?
L_POS = L_POS + 1 .
PERFORM INIT_FIELD_CATALOG USING GIT_FIELDCAT[] " Field Catalog
L_POS " Column Position
'DMBTR' " InTab Field Name
'GIT_BSIS' " InTab Name
'16' " Output Length
'Gross Amount' " Column Name Text
' ' " Datatype
' ' " Key?
'1' " Row Position
' ' " Hotspot
' ' " Emphasize
' ' " key_sel
' ' " justification
'X'. " Sum field?
L_POS = L_POS + 1 .
PERFORM INIT_FIELD_CATALOG USING GIT_FIELDCAT[] " Field Catalog
L_POS " Column Position
'SUBFBT' " InTab Field Name
'GIT_BSIS' " InTab Name
'16' " Output Length
'FBT Amount' " Column Name Text
' ' " Datatype
' ' " Key?
'1' " Row Position
' ' " Hotspot
' ' " Emphasize
' ' " key_sel
' ' " justification
'X'. " Sum field?
L_POS = L_POS + 1 .
PERFORM INIT_FIELD_CATALOG USING GIT_FIELDCAT[] " Field Catalog
L_POS " Column Position
'NONFBT' " InTab Field Name
'GIT_BSIS' " InTab Name
'16' " Output Length
'Non FBT Amount' " Column Name Text
' ' " Datatype
' ' " Key?
'1' " Row Position
' ' " Hotspot
' ' " Emphasize
' ' " key_sel
' ' " justification
'X'. " Sum field?
L_POS = L_POS + 1 .
PERFORM INIT_FIELD_CATALOG USING GIT_FIELDCAT[] " Field Catalog
L_POS " Column Position
'ZFI_FBT' " InTab Field Name
'GIT_BSIS' " InTab Name
'12' " Output Length
'Percentage' " Column Name Text
' ' " Datatype
' ' " Key?
'1' " Row Position
' ' " Hotspot
' ' " Emphasize
' ' " key_sel
' ' " justification
' '. " Sum field?
L_POS = L_POS + 1 .
PERFORM INIT_FIELD_CATALOG USING GIT_FIELDCAT[] " Field Catalog
L_POS " Column Position
'AMOUNT' " InTab Field Name
'GIT_BSIS' " InTab Name
'16' " Output Length
'Qualifying Amount' " Column Name Text
' ' " Datatype
' ' " Key?
'1' " Row Position
' ' " Hotspot
' ' " Emphasize
' ' " key_sel
' ' " justification
'X'. " Sum field?
L_POS = L_POS + 1 .
PERFORM INIT_FIELD_CATALOG USING GIT_FIELDCAT[] " Field Catalog
L_POS " Column Position
'FBTPAY' " InTab Field Name
'GIT_BSIS' " InTab Name
'12' " Output Length
'FBT payable' " Column Name Text
' ' " Datatype
' ' " Key?
'1' " Row Position
' ' " Hotspot
' ' " Emphasize
' ' " key_sel
' ' " justification
'X'. " Sum field?
ENDFORM. " build_field_catalouge
*& Form init_field_catalog
text
FORM INIT_FIELD_CATALOG USING P_GIT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV
PV_POS LIKE GWA_FIELDCAT-COL_POS
PV_FIELDNAME LIKE GWA_FIELDCAT-FIELDNAME
PV_TABNAME LIKE GWA_FIELDCAT-TABNAME
PV_OUTPUT LIKE GWA_FIELDCAT-OUTPUTLEN
PV_SELTEXT LIKE GWA_FIELDCAT-SELTEXT_M
PV_DATATYPE LIKE GWA_FIELDCAT-DATATYPE
PV_KEY LIKE GWA_FIELDCAT-KEY
PV_ROW LIKE GWA_FIELDCAT-ROW_POS
PV_HOTSPOT LIKE GWA_FIELDCAT-HOTSPOT
PV_EMPHASIZE LIKE GWA_FIELDCAT-EMPHASIZE
PV_KEY_SEL LIKE GWA_FIELDCAT-KEY_SEL
PV_JUST LIKE GWA_FIELDCAT-JUST
PV_SUM LIKE GWA_FIELDCAT-DO_SUM.
DATA: LT_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
LT_FIELDCAT-OUTPUTLEN = PV_OUTPUT.
LT_FIELDCAT-COL_POS = PV_POS.
LT_FIELDCAT-FIELDNAME = PV_FIELDNAME.
LT_FIELDCAT-TABNAME = PV_TABNAME.
LT_FIELDCAT-SELTEXT_M = PV_SELTEXT.
LT_FIELDCAT-KEY = PV_KEY.
LT_FIELDCAT-ROW_POS = PV_ROW.
LT_FIELDCAT-HOTSPOT = PV_HOTSPOT.
LT_FIELDCAT-EMPHASIZE = PV_EMPHASIZE.
LT_FIELDCAT-KEY_SEL = PV_KEY_SEL.
LT_FIELDCAT-DO_SUM = PV_SUM.
LT_FIELDCAT-JUST = PV_JUST.
LT_FIELDCAT-DATATYPE = PV_DATATYPE.
APPEND LT_FIELDCAT TO P_GIT_FIELDCAT.
CLEAR LT_FIELDCAT.
ENDFORM. " init_field_catalog
*& Form alv_display
text
--> p1 text
<-- p2 text
FORM ALV_DISPLAY .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = G_REPID
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
I_CALLBACK_USER_COMMAND = '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 = 'Fringe Benefit Tax'
I_GRID_SETTINGS =
IS_LAYOUT = GS_LAYOUT
IT_FIELDCAT = GIT_FIELDCAT
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT = GT_SORT
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS = GT_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 = GIT_BSIS
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " alv_display
*& Form chk4_internal
text
--> p1 text
<-- p2 text
FORM CHK4_INTERNAL .
LOOP AT GIT_BSIS ASSIGNING <BSIS>.
IF <BSIS> IS ASSIGNED.
IF <BSIS>-BSCHL = C_50.
<BSIS>-DMBTR = <BSIS>-DMBTR * -1.
ENDIF.
IF NOT <bsis>-aufnr IS INITIAL.
IF <BSIS>-AUFNR = '000000100000'. " P_AUFNR.
<BSIS>-SUBFBT = <BSIS>-DMBTR.
<BSIS>-AMOUNT = ( <BSIS>-SUBFBT * <BSIS>-ZFI_FBT ) / 100.
ELSE.
IF <bsis>-aufnr = '000000100020'.
<BSIS>-NONFBT = <BSIS>-DMBTR.
ENDIF.
ENDIF.
<BSIS>-FBTPAY = ( <BSIS>-AMOUNT * <BSIS>-ZFI_PAY ) / 100.
ENDIF.
ENDLOOP.
UNASSIGN <BSIS>.
ENDFORM. " chk4_internal
*& Form get_ztable
text
--> p1 text
<-- p2 text
FORM GET_ZTABLE .
REFRESH : GIT_FRINGE.
SELECT HKONT
ZFI_FBT
ZFI_PAY
FROM ZFI_FBT_DETL
INTO TABLE GIT_FRINGE
FOR ALL ENTRIES IN s_hkont
WHERE HKONT IN S_HKONT.
CHECK SY-SUBRC EQ 0.
SORT GIT_FRINGE BY ZFI_HKONT.
ENDFORM. " get_ztable
*& Form get_percentage
text
--> p1 text
<-- p2 text
FORM GET_PERCENTAGE .
CLEAR : GWA_FRINGE.
LOOP AT GIT_BSIS ASSIGNING <BSIS>.
IF <BSIS> IS ASSIGNED.
READ TABLE GIT_FRINGE INTO GWA_FRINGE WITH KEY
ZFI_HKONT = <BSIS>-HKONT
BINARY SEARCH.
CHECK SY-SUBRC EQ 0.
<BSIS>-ZFI_FBT = GWA_FRINGE-ZFI_FBT.
<BSIS>-ZFI_PAY = GWA_FRINGE-ZFI_PAY.
ENDIF.
ENDLOOP.
UNASSIGN <BSIS>.
ENDFORM. " get_percentage
*& Form determine_sort_sequence
text
--> p1 text
<-- p2 text
FORM DETERMINE_SORT_SEQUENCE .
DATA : LS_SORT TYPE SLIS_SORTINFO_ALV.
LS_SORT-SPOS = 1. " Sort order
LS_SORT-FIELDNAME = 'HKONT'.
LS_SORT-TABNAME = 'GIT_BSIS'.
LS_SORT-UP = 'X'.
LS_SORT-SUBTOT = 'X'. " Sub total allowed
APPEND LS_SORT TO GT_SORT.
CLEAR LS_SORT.
ENDFORM. " determine_sort_sequence
*& Form get_events
text
--> p1 text
<-- p2 text
FORM GET_EVENTS .
CONSTANTS:
GC_FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE',
GC_FORMNAME_USER_COMMAND TYPE SLIS_FORMNAME VALUE 'USER_COMMAND'.
DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = GT_EVENTS.
READ TABLE GT_EVENTS WITH KEY NAME = SLIS_EV_TOP_OF_PAGE
INTO LS_EVENT.
IF SY-SUBRC = 0.
MOVE GC_FORMNAME_TOP_OF_PAGE TO LS_EVENT-FORM.
APPEND LS_EVENT TO GT_EVENTS.
ENDIF.
READ TABLE GT_EVENTS WITH KEY NAME = SLIS_EV_USER_COMMAND
INTO LS_EVENT.
IF SY-SUBRC = 0.
MOVE GC_FORMNAME_USER_COMMAND TO LS_EVENT-FORM.
APPEND LS_EVENT TO GT_EVENTS.
ENDIF.
ENDFORM. " get_events
*& Form sub_commentery_build
text
--> p1 text
<-- p2 text
FORM SUB_COMMENTERY_BUILD .
DATA: LS_LINE TYPE SLIS_LISTHEADER.
DATA : L_LOW TYPE CHAR10,
L_HIGH TYPE CHAR10,
L_DATE TYPE CHAR25.
CONCATENATE S_BUDAT-LOW6(2) '.' S_BUDAT-LOW4(2) '.' S_BUDAT-LOW+0(4) INTO L_LOW.
CONCATENATE S_BUDAT-HIGH6(2) '.' S_BUDAT-HIGH4(2) '.' S_BUDAT-HIGH+0(4) INTO L_HIGH.
CONCATENATE L_LOW ' - ' L_HIGH INTO L_DATE.
***header
CLEAR LS_LINE.
LS_LINE-TYP = 'H'.
LS_LINE-KEY: not used for this type
LS_LINE-INFO = 'Fringe Benefit Tax'.
APPEND LS_LINE TO GT_LIST_TOP_OF_PAGE.
***Selection
CLEAR LS_LINE.
LS_LINE-TYP = 'S'.
LS_LINE-KEY = 'Company Code'.
LS_LINE-INFO = P_BUKRS.
APPEND LS_LINE TO GT_LIST_TOP_OF_PAGE.
CLEAR LS_LINE.
LS_LINE-TYP = 'S'.
LS_LINE-KEY = 'Posting Date'.
LS_LINE-INFO = L_DATE.
APPEND LS_LINE TO GT_LIST_TOP_OF_PAGE.
ENDFORM. " sub_commentery_build
FORM TOP_OF_PAGE *
When TOP-OF-PAGE will be fired , this event will be called and it
will use the contents of i_list_top_of_page for output in the header
FORM TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
i_logo = 'ENJOYSAP_LOGO'
IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
ENDFORM. "top_of_page
*& Form USER_COMMAND
Called from within the ALV processes. Currently, '&IC1' is used to
process the hotspot and display the document 'picked' by the user.
FORM USER_COMMAND USING PV_UCOMM LIKE SY-UCOMM
SELFIELD TYPE SLIS_SELFIELD.
CLEAR : GWA_BSIS.
CASE PV_UCOMM.
WHEN '&IC1'.
READ TABLE GIT_BSIS INTO GWA_BSIS INDEX SELFIELD-TABINDEX.
CASE SELFIELD-SEL_TAB_FIELD.
WHEN 'GIT_BSIS-BELNR'.
IF NOT GWA_BSIS-BELNR IS INITIAL.
SET PARAMETER ID: 'BUK' FIELD GWA_BSIS-BUKRS,
'BLN' FIELD GWA_BSIS-BELNR,
'GJR' FIELD GWA_BSIS-GJAHR.
CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN.
ENDIF.
WHEN OTHERS.
ENDCASE.
WHEN OTHERS.
ENDCASE.
CLEAR : GWA_BSIS.
ENDFORM. "user_command
*& Form SET_PF_STATUS
text
FORM SET_PF_STATUS USING EXTAB TYPE SLIS_T_EXTAB.
SET PF-STATUS 'STANDARD_FULLSCREEN' OF PROGRAM 'SAPLKKBL'.
ENDFORM. "SET_PF_STATUSENDFORM. "SET_PF_STATUS
AWARD POINTS IF USEFUL.... -
Need example BDC reports in HR ABAP
hi all,
I need example BDC reports in HR-ABAP .both download and upload reports..
I was tried but I'm not getting it , so please, any one send sample reports .
Rewarded for helpful answers.Hi,
Check these links
BDC for infotype 0008
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/erphcm/employee%2bphoto%2bupload
Search using "bdc" in this forum you will get lot of examples -
Need sample programs for inbound & outbound interfaces in abap hr?
hi friends
i need sample programs for inbound & outbound interface programs in hr abap . any one send me pls
thanks & regards
deepurd&u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014
*& Report ZPROG65_11 *
&u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014
REPORT zprog65_11 .
TABLES : lfa1.
TYPES : BEGIN OF ven ,
lifnr LIKE rf02k-lifnr,
bukrs LIKE rf02k-bukrs ,
ekorg LIKE rf02k-ekorg,
ktokk LIKE rf02k-ktokk,
name1 LIKE lfa1-name1,
sortl LIKE lfa1-sortl,
land1 LIKE lfa1-land1,
spars LIKE lfa1-spras,
akont LIKE lfb1-akont,
fdgrv LIKE lfb1-fdgrv,
waers LIKE lfm1-waers,
anred LIKE lfa1-anred ,
END OF ven .
DATA : t_ven TYPE TABLE OF ven WITH HEADER LINE ,
t_bdc LIKE TABLE OF bdcdata WITH HEADER LINE .
DATA : v_file TYPE string ,
v_temp TYPE i ,
v_lifnr(10) TYPE n,
v_hdate LIKE sy-datum.
DATA : c_tcode LIKE sy-tcode .u201Dvalue u2018XK01u2032.
PARAMETERS : p_file(30) DEFAULT u2018c:\vendor1_11.txtu2019,
p_group LIKE apqi-groupid.
START-OF-SELECTION .
MOVE p_file TO v_file .
PERFORM file_upload TABLES t_ven USING v_file .
v_hdate = sy-datum - 1.
CALL FUNCTION u2018BDC_OPEN_GROUPu2019
EXPORTING
client = sy-mandt
DEST = FILLER8
group = p_group
holddate = v_hdate
keep = u2018Xu2019
user = sy-uname
IMPORTING
QID =
EXCEPTIONS
client_invalid = 1
destination_invalid = 2
group_invalid = 3
OTHERS = 11
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT t_ven .
clear lfa1.
v_temp = 0.
MOVE t_ven-lifnr TO v_lifnr.
SELECT SINGLE * FROM lfa1 INTO lfa1 WHERE lifnr =
v_lifnr.
IF sy-subrc = 0.
WRITE :/ u2018foundu2019.
v_temp = 1.
else.
write: / u2018not foundu2019.
ENDIF.
IF v_temp = 0.
c_tcode = u2018xk01u2032.
PERFORM fill_ddc_table .
ELSEIF v_temp = 1.
c_tcode = u2018xk02u2032.
PERFORM fill_bdc_table .
ENDIF.
CALL FUNCTION u2018BDC_INSERTu2019
EXPORTING
tcode = c_tcode
TABLES
dynprotab = t_bdc
EXCEPTIONS
internal_error = 1
OTHERS = 7.
REFRESH t_bdc .
ENDLOOP .
CALL FUNCTION u2018BDC_CLOSE_GROUPu2019
EXCEPTIONS
not_open = 1
queue_error = 2
OTHERS = 3.
&u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014
*& Form file_upload
&u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014
text
u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014-
u2013>P_T_VEN text
u2013>P_V_FILE text
u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014-
FORM file_upload TABLES p_tven STRUCTURE t_ven
USING p_vfile.
CALL FUNCTION u2018GUI_UPLOADu2019
EXPORTING
filename = p_vfile
filetype = u2018ASCu2019
has_field_separator = u2018Xu2019
IMPORTING
FILELENGTH =
HEADER =
TABLES
data_tab = p_tven
EXCEPTIONS
file_open_error = 1
file_read_error = 2
OTHERS = 17
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. u201D file_upload
&u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014
*& Form FILL_DDC_TABLE
&u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014
text
u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014-
u2013> p1 text
<u2013 p2 text
u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014-
FORM fill_ddc_table .
SCREN 100
t_bdc-program = u2018SAPMF02Ku2019.
t_bdc-dynpro = u20180100u2032.
t_bdc-dynbegin = u2018Xu2019.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018RF02K-LIFNRu2019.
t_bdc-fval = t_ven-lifnr .
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018RF02K-BUKRSu2019.
t_bdc-fval = t_ven-bukrs.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018RF02K-EKORGu2019.
t_bdc-fval = t_ven-ekorg.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018RF02K-KTOKKu2019.
t_bdc-fval = t_ven-ktokk.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018BDC_OKCODEu2019.
t_bdc-fval = u2018/00u2032.
APPEND t_bdc. CLEAR t_bdc.
110
t_bdc-program = u2018SAPMF02Ku2019.
t_bdc-dynpro = u20180110u2032.
t_bdc-dynbegin = u2018Xu2019.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018LFA1-NAME1u2032.
t_bdc-fval = t_ven-name1 .
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018LFA1-SORTLu2019.
t_bdc-fval = t_ven-sortl.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018LFA1-LAND1u2032.
t_bdc-fval = t_ven-land1.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018LFA1-SPRASu2019.
t_bdc-fval = t_ven-spars.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018BDC_OKCODEu2019.
t_bdc-fval = u2018/00u2032.
APPEND t_bdc. CLEAR t_bdc.
120
t_bdc-program = u2018SAPMF02Ku2019.
t_bdc-dynpro = u20180120u2032.
t_bdc-dynbegin = u2018Xu2019.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018BDC_OKCODEu2019.
t_bdc-fval = u2018/00u2032.
APPEND t_bdc. CLEAR t_bdc.
130
t_bdc-program = u2018SAPMF02Ku2019.
t_bdc-dynpro = u20180130u2032.
t_bdc-dynbegin = u2018Xu2019.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018BDC_OKCODEu2019.
t_bdc-fval = u2018=ENTRu2019.
APPEND t_bdc. CLEAR t_bdc.
210
t_bdc-program = u2018SAPMF02Ku2019.
t_bdc-dynpro = u20180210u2032.
t_bdc-dynbegin = u2018Xu2019.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018LFB1-AKONTu2019.
t_bdc-fval = t_ven-akont .
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018LFB1-FDGRVu2019.
t_bdc-fval = t_ven-fdgrv.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018BDC_OKCODEu2019.
t_bdc-fval = u2018/00u2032.
APPEND t_bdc. CLEAR t_bdc.
215
t_bdc-program = u2018SAPMF02Ku2019.
t_bdc-dynpro = u20180215u2032.
t_bdc-dynbegin = u2018Xu2019.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018BDC_OKCODEu2019.
t_bdc-fval = u2018/00u2032.
APPEND t_bdc. CLEAR t_bdc.
220
t_bdc-program = u2018SAPMF02Ku2019.
t_bdc-dynpro = u20180220u2032.
t_bdc-dynbegin = u2018Xu2019.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018BDC_OKCODEu2019.
t_bdc-fval = u2018/00u2032.
APPEND t_bdc. CLEAR t_bdc.
310
t_bdc-program = u2018SAPMF02Ku2019.
t_bdc-dynpro = u20180310u2032.
t_bdc-dynbegin = u2018Xu2019.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018LFM1-WAERSu2019.
t_bdc-fval = t_ven-waers .
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018BDC_OKCODEu2019.
t_bdc-fval = u2018/00u2032.
APPEND t_bdc. CLEAR t_bdc.
320
t_bdc-program = u2018SAPMF02Ku2019.
t_bdc-dynpro = u20180320u2032.
t_bdc-dynbegin = u2018Xu2019.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018BDC_OKCODEu2019.
t_bdc-fval = u2018=UPDAu2019.
APPEND t_bdc. CLEAR t_bdc.
ENDFORM. u201CFILL_DDC_TABLE
u201D FILL_DDC_TABLE
&u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014
*& Form FILL_BDC_TABLE
&u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014
text
u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014-
u2013> p1 text
<u2013 p2 text
u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014-
FORM fill_bdc_table .
SCREN 101
t_bdc-program = u2018SAPMF02Ku2019.
t_bdc-dynpro = u20180101u2032.
t_bdc-dynbegin = u2018Xu2019.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018RF02K-LIFNRu2019.
t_bdc-fval = t_ven-lifnr .
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018RF02K-BUKRSu2019.
t_bdc-fval = t_ven-bukrs.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018RF02K-EKORGu2019.
t_bdc-fval = t_ven-ekorg.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018BDC_OKCODEu2019.
t_bdc-fval = u2018/00u2032.
APPEND t_bdc. CLEAR t_bdc.
110
t_bdc-program = u2018SAPMF02Ku2019.
t_bdc-dynpro = u20180110u2032.
t_bdc-dynbegin = u2018Xu2019.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018lfa1-anredu2019.
t_bdc-fval = t_ven-anred .
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018LFA1-NAME1u2032.
t_bdc-fval = t_ven-name1 .
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018LFA1-SORTLu2019.
t_bdc-fval = t_ven-sortl.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018LFA1-LAND1u2032.
t_bdc-fval = t_ven-land1.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018LFA1-SPRASu2019.
t_bdc-fval = t_ven-spars.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018BDC_OKCODEu2019.
t_bdc-fval = u2018/00u2032.
APPEND t_bdc. CLEAR t_bdc.
300
t_bdc-program = u2018SAPMF02Ku2019.
t_bdc-dynpro = u20180300u2032.
t_bdc-dynbegin = u2018Xu2019.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018BDC_OKCODEu2019.
t_bdc-fval = u2018=YESu2019.
APPEND t_bdc. CLEAR t_bdc.
ENDFORM. u201D FILL_BDC_TABLE
Best Regards -
I need sample ABAP Z FM for Crystal
Hi,
I need sample ABAP Z FM for Crystal eg. if we pass PO# , it will return PO Detail.
Thanks,
KaleelHi,
in case you are looking for the exact sample, then this is most likely the wrong forum. if you looking for sample ABAP Functions working with Crystal Reports you can use the functions from the SFLIGHT model.
Ingo -
Hi need sample technical specifications
hi to all expertss,
i need sample functional specs and tech specs for
REPORTS
INTERFACES
ENHANCEMENTS
SCRIPTS AND SMARTFORMS
plz mail it to my id Mausam8 AT gmail.com
it will be great help for me before attending interviews
PLEASE ITS URGENThi kiran,
since been its notified that , they ask you to go for pseudo code , with full description on each and every evnt you perform in that , so aware of what you have to go, for vendor master the transaction to perform the particular function.
input parameters --> for that what type of data type , data element are used. you have to design for the entire screen. and more it is used for future reference to enhance or develope that particular one.
thanks & regards ,
senthilkumar -
I need interfaces and reports with wxample
Hi all,
I need interface sample date.If any one having please provide
Best Regards
GopalWhat do you mean exactly ?
Nicolas.
Well, I assume more info in your duplicate thread :
i need interfaces and reports with wxample
Message was edited by:
N. Gasparotto -
I Need some Itractive Reports not using alvs and any other advanced
I Need some Itractive Reports not using alvs and any other advanced topics like include and any other i need simple Intractive reports.
Hello,
Check this sample reports:
Program name Report title
DEMO_LIST_INTERACTIVE_1 Creating Detail Lists
DEMO_LIST_INTERACTIVE_2 List Administration
DEMO_LIST_INTERACTIVE_3 Page Headers in Detail Lists
DEMO_LIST_INTERACTIVE_4 Messages in Lists
If useful reward,
Vasanth -
I need the Log Report for the Data which i am uploading from SAP R/3.
Hi All,
I am BI 7.0 Platform with Support Patch 20.
I need the Log Report for the Data which i am uploading from SAP R/3.
I extract the DATA from R/3 into BI 7.0 DSO where I am mapping the GL Accounts with the FS Item. In the Transformation i have return a routine on the FS Item InfObject . I am checking the Gl code into Z table for the FS Item .
I capture the FS item from the Z table then update this FS item to Infobject FS item.
Now i need to stop the Data upload if i do not find the GL code in the Z table, and generate report for all GL code for which the FS item is not maintained in the Z table.
Please suggest.
Regards
nileshHi.
Add a field that you will use to identify if the GL account of the record was found in the Z table or not. Fx, create ZFOUND with length 1 and no text.
In your routine, when you do the lookup, populate ZFOUND with X when you found a match (sy-subrc = 0) and leave it blank if you don't find a match. Now create a report filtering on ZFOUND = <blank> and output the GL accounts. Those will be the ones not existing in the Z table, but coming in from your transactions.
Regards
Jacob -
I need help in Report for production orders for my customer.
Hi All
I have scenario where plant A needs the following report for Material XXX which has setting as Stock Trnasfer order from Plant B.
Need report withthe following details, Storage Unit number, Material No, Quantity, Planned Order Date in plant A, Date Produced in plant B, Date Received by Plant A.
Please tell me if there is any standard report to take the following details. Scenario is that the header material YYY in Plant A has one material XXX as BOM component. Now this material has setting as Stock transfer from Plant B. On creating a plan order for Header material it will create a Plan order in plant B for component XXX. The above said detail is required for component XXX in plant A.Dear
Did you explore the report in CO46-Order Progress Report based on Sales Order /Material /Production Order
Or COOIS/COHV for your requirement.Here you can get the Planned Order Details and also Production Order Details .
Regards
JH
Edited by: Jiaul Haque on Sep 27, 2010 2:57 PM -
I need some standard reports regarding Purchage Data Analysis Report and Open Sales order report .
Thanks & Regards
Satish PatnaikHi,
Check the following links:
http://sap-img.com/abap/make-e-mail-sender-of-po-the-po-creators-name.htm
http://sap-img.com/abap/sending-mail-when-the-purchase-order-is-released.htm
Regards,
Naresh -
Error Message: Information is needed before this report can be processed.
Hi Experts,
I am scheduling a Crystal Report from Infoview. Data Source for Report is BEx Query.
While scheduling i am providing all details like Parameters, Formats, Destination etc.
But Schedule is failing. The reason is parameter field is empty when i checked
in failed status , as below.
Parameters: [No Value]; [No Value]
Error Message: Information is needed before this report can be processed.
But when i am viewing the report with the same parameters, it is executing.
Please help
Regards,
Ajay Singh
Edited by: Ajay Singh on Sep 15, 2009 1:05 PMHi,
Try the below mentioned steps in addition to scheduling of your report.
Method 1: Following information might be helpful in resolving the issue.
To check if the .rep file exists in the Output FRS
1.Log on to the Central Management Console (CMC). Click Objects.
2.Click the report object to view its properties.
3.Click the History tab to view the list of instances.
4.Click Success to view the latest instance. Scroll to Instance Location.
5.Note the path name to the report.
6.Check the file store under the Output directory for the report.
If the report does not exist, delete the instance from the History tab in the CMC. Reschedule the report.
Method 2: To verify the configuration of multiple FRS
1.Log on to the CMC.
2.Click Servers.
3.Click the first Input file server. Note the home directory.
4.Click Home > Servers.
5.Click the second Input file server.
6.Check the home directory path for the second Input FRS. It must point to the same directory as the first Input FRS.
7.Repeat steps 2 through 6 to check the Output FRS.
====================
NOTE:
The Input and Output FRS physical machines must be able to connect to the file share for the file store. Also the Input and Output FRS are installed using the local administrator account. That account may not have rights to the network share for the file store. The security on the file store must be changed so the local administrator for each server can access it.
====================
Above mentioned steps are for deski/webi reports.
Cheers,
Suresh ALuri.
Maybe you are looking for
-
I need help with my event-based cue points with audio
Im having trouble with my video game project for my action script 3 class at school. Here is what i did, i made a game called Tailgate toss up. I filmed my character and rendered it in Adobe Premiere. I than brought my .mov file into After Effects an
-
Hi Gurus This is production Issue We are trying to do MIGO (GRN) but System giving the error that Please check the IO(internal order)Status But the configuration done in such a way that (its Redio Mirchi SAP) IO status 10. Internal order created
-
Workshop Studio, cannot start WebLogic 9.2 or Tomcat 5.5
after I click on the start icon I get a popup with the following message: An internal error occurred during: "Starting server - WebLogic Server v9" Please help! Thanks. David
-
Can't start Novell Messenger agent in SLES10
While rebooting my GroupWise server the messenger agent failed to start. I tried to start the agent using: rcnovell -nmma start and rcnovell-nmaa start. They both fail and refer me to the logs where I find this message. NMAA: Agent configuration fail
-
Can't find server when WiFi connected
I have had several incidences where my ipod says I'm connected but Safari says it cant' find the server. I remember someone saying something about a DNS or something but don't know what to do when this happens. Can someone tell me step by step what t