How to print Column Labels on each print page of an ALV report
Hi,
I have an ALV report which is of 10 print pages.
I need to print Column Labels on each print page.
How it is possible.
Plz write the solution
Narendra
Hi Narendra
try this code.
reward pts if help.
Deepanker.
*& Report ZDEMO_ALVGRID_EDIT *
*& Example of a simple ALV Grid Report *
*& The basic ALV grid, Enhanced to display specific fields as *
*& editable depending on field value *
REPORT ZDEMO_ALVGRID_EDIT .
TABLES: ekko.
TYPE-POOLS: slis. "ALV Declarations
*Data Declaration
TYPES: BEGIN OF t_ekko,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
statu TYPE ekpo-statu,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
menge TYPE ekpo-menge,
meins TYPE ekpo-meins,
netpr TYPE ekpo-netpr,
peinh TYPE ekpo-peinh,
field_style TYPE lvc_t_styl, "FOR DISABLE
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_ekko TYPE t_ekko.
*ALV data declarations
DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE.
DATA: it_fieldcat TYPE lvc_t_fcat, "slis_t_fieldcat_alv WITH HEADER LINE,
wa_fieldcat TYPE lvc_s_fcat,
gd_tab_group TYPE slis_t_sp_group_alv,
gd_layout TYPE lvc_s_layo, "slis_layout_alv,
gd_repid LIKE sy-repid.
*Start-of-selection.
START-OF-SELECTION.
PERFORM data_retrieval.
PERFORM set_specific_field_attributes.
PERFORM build_fieldcatalog.
PERFORM build_layout.
PERFORM display_alv_report.
*& Form BUILD_FIELDCATALOG
Build Fieldcatalog for ALV Report
FORM build_fieldcatalog.
wa_fieldcat-fieldname = 'EBELN'.
wa_fieldcat-scrtext_m = 'Purchase Order'.
wa_fieldcat-col_pos = 0.
wa_fieldcat-outputlen = 10.
wa_fieldcat-emphasize = 'X'.
wa_fieldcat-key = 'X'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'EBELP'.
wa_fieldcat-scrtext_m = 'PO Item'.
wa_fieldcat-col_pos = 1.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'STATU'.
wa_fieldcat-scrtext_m = 'Status'.
wa_fieldcat-col_pos = 2.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'AEDAT'.
wa_fieldcat-scrtext_m = 'Item change date'.
wa_fieldcat-col_pos = 3.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'MATNR'.
wa_fieldcat-scrtext_m = 'Material Number'.
wa_fieldcat-col_pos = 4.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'MENGE'.
wa_fieldcat-scrtext_m = 'PO quantity'.
wa_fieldcat-col_pos = 5.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'MEINS'.
wa_fieldcat-scrtext_m = 'Order Unit'.
wa_fieldcat-col_pos = 6.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'NETPR'.
wa_fieldcat-scrtext_m = 'Net Price'.
wa_fieldcat-edit = 'X'. "sets whole column to be editable
wa_fieldcat-col_pos = 7.
wa_fieldcat-outputlen = 15.
wa_fieldcat-datatype = 'CURR'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'PEINH'.
wa_fieldcat-scrtext_m = 'Price Unit'.
wa_fieldcat-col_pos = 8.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
ENDFORM. " BUILD_FIELDCATALOG
*& Form BUILD_LAYOUT
Build layout for ALV grid report
FORM build_layout.
Set layout field for field attributes(i.e. input/output)
gd_layout-stylefname = 'FIELD_STYLE'.
gd_layout-zebra = 'X'.
ENDFORM. " BUILD_LAYOUT
*& Form DISPLAY_ALV_REPORT
Display report using ALV grid
FORM display_alv_report.
gd_repid = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
i_callback_program = gd_repid
i_callback_user_command = 'USER_COMMAND'
is_layout_lvc = gd_layout
it_fieldcat_lvc = it_fieldcat
i_save = 'X'
TABLES
t_outtab = it_ekko
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. " DISPLAY_ALV_REPORT
*& Form DATA_RETRIEVAL
Retrieve data form EKPO table and populate itab it_ekko
FORM data_retrieval.
SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
UP TO 10 ROWS
FROM ekpo
INTO CORRESPONDING FIELDS OF TABLE it_ekko.
ENDFORM. " DATA_RETRIEVAL
*& Form set_specific_field_attributes
populate FIELD_STYLE table with specific field attributes
form set_specific_field_attributes .
DATA ls_stylerow TYPE lvc_s_styl .
DATA lt_styletab TYPE lvc_t_styl .
Populate style variable (FIELD_STYLE) with style properties
The NETPR field/column has been set to editable in the fieldcatalog...
The following code sets it to be disabled(display only) if 'NETPR'
is gt than 10.
LOOP AT it_ekko INTO wa_ekko.
IF wa_ekko-netpr GT 10.
ls_stylerow-fieldname = 'NETPR' .
ls_stylerow-style = cl_gui_alv_grid=>mc_style_disabled.
"set field to disabled
APPEND ls_stylerow TO wa_ekko-field_style.
MODIFY it_ekko FROM wa_ekko.
ENDIF.
ENDLOOP.
endform. " set_specific_field_attributes
pls reward pts is help,
Similar Messages
-
Printing sapscript label using zebra printer
Hi,
Can anybody please help me regarding "printing sapscript label using zebra printer"?
i hav set the following print default settings in the transaction mb90:
output device :
NO01
device type: YZZX_ZEB
but when i try to print ,i am getting error message stating that "the respective sapscript form is not active ".
i hav also attached my print program for ur easy reference.
====================================================================*
FORM open_form_slv.
*' Description:
*' Add information for the SAP spooler
*' Change the name of the standard customized form for Zebra print
*' Last Change Vers Programmer Reason
*1
DATA: BEGIN OF print_infos.
INCLUDE STRUCTURE itcpo.
DATA: END OF print_infos.
DATA: form_name(16) TYPE c, char1(1) TYPE c, ind_beg TYPE i.
PERFORM itcpo_fuellen.
MOVE-CORRESPONDING itcpo TO print_infos.
WRITE sy-datum USING EDIT MASK '__.__.____'
TO print_infos-tdcovtitle+1.
WRITE sy-uzeit USING EDIT MASK '__:__:__'
TO print_infos-tdcovtitle+12.
CONCATENATE itcpo-tddest sy-uname ' PO'(001) ekpo-ebeln ' Doc.No'(002)
mseg-mblnr print_infos-tdcovtitle
INTO print_infos-tdcovtitle SEPARATED BY space.
form name from the table YZZM_GR_LABEL
IF NOT g_fonam IS INITIAL.
tnapr-fonam = g_fonam.
ENDIF.
if the used printer is a Zebra label printer, then the customized
layout set name ???_???_XXX will be changed to ???_???_ZP
SELECT SINGLE * FROM tsp03d WHERE padest = nast-ldest.
IF tsp03d-patype = 'YZZX_ZEB'.
ind_beg := 15.
WHILE ind_beg > -1.
char1 := tnapr-fonam+ind_beg. " substr(tnapr-fonam,ind_beg,1)
IF char1 = '_'.
form_name := tnapr-fonam(ind_beg).
CONCATENATE form_name '_ZP' INTO tnapr-fonam.
EXIT.
ENDIF.
ind_beg := ind_beg - 1.
ENDWHILE.
ENDIF.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
device = 'PRINTER'
language = language
OPTIONS = print_infos
form = tnapr-fonam
dialog = ' '.
x_open := x.
IF mseg-weanz = 0. mseg-weanz = 1. ENDIF.
IF syst-tcode <> 'MB90' AND NOT g_flag_popup IS INITIAL.
check for requirement of printing label and ask for gr-quantities (popup)
SELECT SINGLE * FROM yzzm_gr_quantity WHERE ebeln = mseg-ebeln.
CLEAR yzzm_gr_quantity-no_popup.
ELSE.
and ask not for gr-quantities
IF syst-tcode = 'MB90'.
yzzm_gr_quantity-erfmg := mseg-menge.
ELSE.
yzzm_gr_quantity-erfmg := mseg-menge / mseg-weanz.
ENDIF.
yzzm_gr_quantity-no_popup := x.
ENDIF.
determination inspection lot number
CLEAR qals-prueflos.
SELECT SINGLE * FROM qals WHERE mblnr = mseg-mblnr
AND zeile = mseg-zeile
AND mjahr = mseg-mjahr.
determination vendor batch
CLEAR mch1-licha.
SELECT SINGLE * FROM mch1 INTO mch1 WHERE matnr = mseg-matnr
AND charg = mseg-charg.
ENDFORM. "open_form_label
=================================================================== *
FORM we01_print_slv.
*' Description:
*' print out of hazardous symbol
*' controls the Zebra printer
*' Last Change Vers Programmer Reason
*****26.09.2007 Starts
DATA: l_objky TYPE nast-objky,"Object key
l_vstat TYPE nast-vstat. "Processing status of message
*****26.09.2007 Starts
TABLES: mgef, t300.
FIELD-SYMBOLS: .
DATA: aux_index LIKE sy-index.
DATA: count_haz_sym, position TYPE n, zw TYPE p DECIMALS 1.
DATA: aux_value(5) TYPE c.
DATA: txt(10) TYPE c, pos(5) TYPE c.
t001w-werks = r_werks.
t001w-name1 = r_name1.
PERFORM read_address.
*2
SELECT SINGLE * FROM ekpo WHERE ebeln = mseg-ebeln
AND ebelp = mseg-ebelp.
CLEAR mara-stoff.
SELECT SINGLE stoff INTO mara-stoff FROM mara WHERE matnr = mseg-matnr.
IF NOT mara-stoff IS INITIAL.
CLEAR t300.
SELECT SINGLE * FROM t300 WHERE lgnum = mseg-lgnum.
IF NOT sy-subrc IS INITIAL.
for plants without warehouses try to use the country code
CASE mseg-werks.
WHEN 'BUP'.
t300-regkz := 'US '.
ENDCASE.
ENDIF.
CLEAR mgef.
SELECT SINGLE * FROM mgef WHERE stoff = mara-stoff
AND regkz = t300-regkz.
ENDIF.
in case of more then one label, use for each a new output window
(not only for the first)
IF g_count > 1.
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
command = 'NEW-WINDOW'.
ENDIF.
Ausgabe Gefahrstoffsysmbole Neustadt, V.Hilgert 14.07.98
*For output type YNL7, the hazardous warning symbol has to be printed at the bottom of the label.So label is called before that.
IF tnapr-kschl = 'YNL7'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'LABEL'.
ENDIF.
count_haz_sym = 0. position = 0.
WHILE count_haz_sym = 'XN'.
For output type YNL7, the width of the standard text is small.
IF tnapr-kschl = 'YNL7'.
zw = position * '0.2' + '0.1'. pos = zw.
ELSE.
zw = position * '1.3' + '0.1'. pos = zw.
ENDIF.
IF tsp03d-patype = 'YZZX_ZEB'. " device type for ZEBRA label priter
aux_value := count_haz_sym.
ELSE.
aux_value := pos. " HP/Kyocera or other laser printer
ENDIF.
CALL FUNCTION 'TEXT_SYMBOL_SETVALUE'
EXPORTING
name = '&XPOS&'
value = aux_value
EXCEPTIONS
OTHERS = 1.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element =
window = 'MAIN'
EXCEPTIONS
element = 1
function = 2
type = 3
unopened = 4
unstarted = 5
window = 6
OTHERS = 7.
IF sy-subrc = 0.
*Varying the position for YNL7
IF tnapr-kschl = 'YNL7'.
position = position + 2.
ELSE.
position = position + 1.
ENDIF.
ENDIF.
ENDIF.
ENDWHILE.
IF NOT mseg-vfdat IS INITIAL.
am07m-mhtxt = text-105.
ENDIF.
IF NOT am07m-mhdat IS INITIAL.
am07m-mhztx = text-106.
ENDIF.
IF ekko-bsart = 'UB'.
am07m-litxt = text-101.
am07m-libzg = ekko-reswk.
ELSE.
am07m-litxt = text-100.
am07m-libzg = ekko-lifnr.
ENDIF.
belpos-mblnr = mkpf-mblnr.
belpos-zeile = mseg-zeile.
CONDENSE belpos NO-GAPS.
am07m-belpos = belpos.
IF t156-shkzg = h.
am07m-hdlne = text-020.
ELSE.
am07m-hdlne = text-010.
ENDIF.
Ausgabe der Etiketten mit den ind. Mengen
IF NOT g_flag_popup IS INITIAL.
SELECT SINGLE * FROM yzzm_gr_quantity WHERE ebeln = mseg-ebeln
AND weanz = g_count.
ELSE.
* print the number of labels is handeled by the Zebra printer
IF tsp03d-patype = 'YZZX_ZEB'. " device type for Zebra label prts
g_lbls_tot := mseg-weanz - g_count + 1.
g_break_print := x.
ENDIF.
ENDIF.
mseg-erfmg := yzzm_gr_quantity-erfmg.*
********26.09.2007 Starts
CONCATENATE mseg-mblnr mseg-mjahr mseg-zeile INTO l_objky.
SELECT SINGLE vstat INTO l_vstat FROM nast WHERE kappl = 'ME' AND
objky = l_objky AND
kschl = 'YNL7'.
********26.09.2007 Ends
CALL FUNCTION 'TEXT_SYMBOL_SETVALUE'
EXPORTING
name = '&nummer&'
value = g_count.
IF tnapr-kschl <> 'YNL7'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'LABEL'.
else.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'BAR_CODE'
EXCEPTIONS
ELEMENT = 1
FUNCTION = 2
TYPE = 3
UNOPENED = 4
UNSTARTED = 5
WINDOW = 6
BAD_PAGEFORMAT_FOR_PRINT = 7
SPOOL_ERROR = 8
CODEPAGE = 9
OTHERS = 10.
IF sy-subrc <> 0. MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
ENDFORM. "GR_label_print
*& Form lesen
text
-->OBJKY text
FORM lesen USING objky.
nast_key = objky.
CLEAR retco.
SELECT SINGLE * FROM mkpf WHERE mblnr = nast_key-mblnr
AND mjahr = nast_key-mjahr.
SELECT SINGLE * FROM mseg WHERE mblnr = mkpf-mblnr
AND zeile = nast_key-zeile
AND mjahr = mkpf-mjahr.
IF sy-subrc NE 0.
retco = sy-subrc.
EXIT.
ENDIF.
PERFORM tab156_lesen.
xskkz = t156-rstyp.
PERFORM tab001w_lesen.
IF NOT mseg-evers IS INITIAL. "Versandvorschriften lesen.
PERFORM t027_lesen.
ENDIF.
PERFORM bestellung_lesen.
IF NOT ekpo-knttp IS INITIAL AND NOT
ekpo-weunb IS INITIAL.
PERFORM kontierung_lesen. "für multikontierte Bestellungen
ENDIF.
IF NOT mseg-ematn IS INITIAL.
PERFORM lesen_htn.
ELSE. "111277/PH
CLEAR am07m-mfrpn. "111277/PH
ENDIF.
IF mseg-matnr IS INITIAL.
mseg-menge = mseg-bpmng.
mseg-meins = mseg-bprme.
PERFORM bestelltext_lesen.
CLEAR mabdr.
ELSE.
PERFORM material_lesen.
ENDIF.
PERFORM tab024_lesen.
PERFORM t064b_lesen.
PERFORM ladr_lesen.
ENDFORM. "lesen
Lesen für WE-Schein Fert.Auftrag -
FORM lesen_wf USING objky.
nast_key = objky.
CLEAR retco.
SELECT SINGLE * FROM mkpf WHERE mblnr = nast_key-mblnr
AND mjahr = nast_key-mjahr.
SELECT SINGLE * FROM mseg WHERE mblnr = mkpf-mblnr
AND zeile = nast_key-zeile
AND mjahr = mkpf-mjahr.
IF sy-subrc NE 0.
retco = sy-subrc.
EXIT.
ENDIF.
PERFORM tab156_lesen.
xskkz = t156-rstyp.
PERFORM tab001w_lesen.
PERFORM auftrag_lesen.
IF NOT mseg-matnr IS INITIAL.
PERFORM material_lesen.
ELSE.
mseg-menge = mseg-erfmg.
mseg-meins = mseg-erfme.
ENDIF.
PERFORM tab024d_lesen.
PERFORM t064b_lesen.
PERFORM ladr_lesen.
ENDFORM. "lesen_wf
Lesen für Warenausgang -
FORM lesen_wa USING objky.
nast_key = objky.
CLEAR retco.
SELECT SINGLE * FROM mkpf WHERE mblnr = nast_key-mblnr
AND mjahr = nast_key-mjahr.
SELECT SINGLE * FROM mseg WHERE mblnr = mkpf-mblnr
AND zeile = nast_key-zeile
AND mjahr = mkpf-mjahr.
IF sy-subrc NE 0.
retco = sy-subrc.
EXIT.
ENDIF.
PERFORM tab156_lesen.
xskkz = t156-rstyp.
PERFORM tab001w_lesen.
IF NOT mseg-matnr IS INITIAL.
PERFORM material_lesen.
ENDIF.
PERFORM ladr_lesen.
ENDFORM. "lesen_wa
Druck Vorbereiten -
FORM open_form.
PERFORM itcpo_fuellen.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
device = 'PRINTER'
language = language
OPTIONS = itcpo
dialog = ' '.
PERFORM lesen_t159p.
x_open = x.
ENDFORM. "open_form
Druck Vorbereiten Sammelscheine -
FORM open_form_sammel.
PERFORM lesen_t159p.
PERFORM itcpo_fuellen.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
device = 'PRINTER'
language = language
OPTIONS = itcpo
form = tnapr-fonam
dialog = ' '.
x_open = x.
ENDFORM. "open_form_sammel
Druck schließen -
FORM close_form.
CHECK NOT x_open IS INITIAL.
CALL FUNCTION 'CLOSE_FORM'.
CLEAR x_open.
ENDFORM. "close_form
Hilfsfelder versorgen für Sammelscheindruck -
FORM helpdata1.
*mkpf = mkpf.
*mseg-lgort = mseg-lgort.
*ladr = ladr.
save_mkpf = *mkpf-usnam.
save_mblnr = *mkpf-mblnr.
save_budat = *mkpf-budat.
save_cpudt = *mkpf-cpudt.
save_ematn = *mseg-ematn.
save_lgort = *mseg-lgort.
save_ladr = *ladr.
*t001w = t001w.
save_werks = *t001w-werks.
save_name1 = *t001w-name1.
*ekko = ekko.
*am07m = am07m.
save_lifnr = *ekko-lifnr.
save_ebeln = *ekko-ebeln.
save_ekgrp = *ekko-ekgrp.
save_linam = *am07m-name1.
save_lina2 = *am07m-name2.
*t024 = t024.
save_eknam = *t024-eknam.
save_ektel = *t024-ektel.
*mkpf-usnam = old_mkpf.
*mkpf-mblnr = old_mblnr.
*mkpf-cpudt = old_cpudt.
*mkpf-budat = old_budat.
*mseg-ematn = old_ematn.
*mseg-lgort = old_lgort.
*ladr = old_ladr.
*t001w-werks = old_werks.
*t001w-name1 = old_name1.
*t024-eknam = old_eknam.
*t024-ektel = old_ektel.
*ekko-lifnr = old_lifnr.
*ekko-ebeln = old_ebeln.
*ekko-ekgrp = old_ekgrp.
*am07m-name1 = old_linam.
*am07m-name2 = old_lina2.
save_lfa1 = lfa1.
IF NOT old_lfa1 IS INITIAL.
lfa1 = old_lfa1.
ENDIF.
ENDFORM. "helpdata1
--- Versorgung der Hilfsfelder vor CLOSE_FORM bei Sammelscheindruck --
FORM helpdata2.
old_lfa1 = save_lfa1.
lfa1 = save_lfa1.
old_mkpf = save_mkpf.
old_lgort = save_lgort.
old_ladr = save_ladr.
old_budat = save_budat.
old_cpudt = save_cpudt.
old_werks = save_werks.
old_name1 = save_name1.
old_mblnr = save_mblnr.
old_lifnr = save_lifnr.
old_linam = save_linam.
old_lina2 = save_lina2.
old_ebeln = save_ebeln.
old_ekgrp = save_ekgrp.
old_eknam = save_eknam.
old_ektel = save_ektel.
old_ematn = save_ematn.
*mkpf-usnam = save_mkpf.
*mkpf-mblnr = save_mblnr.
*mkpf-budat = save_budat.
*mkpf-cpudt = save_cpudt.
*mseg-ematn = save_ematn.
*mseg-lgort = save_lgort.
*ladr = save_ladr.
*t001w-werks = save_werks.
*t001w-name1 = save_name1.
*t024-eknam = save_eknam.
*t024-ektel = save_ektel.
*ekko-lifnr = save_lifnr.
*ekko-ebeln = save_ebeln.
*ekko-ekgrp = save_ekgrp.
*am07m-name1 = save_linam.
*am07m-name2 = save_lina2.
ENDFORM. "helpdata2
Form Lesen Warenausgang Lohnbearbeiter -
FORM lesen_wlb USING objky.
nast_key = objky.
CLEAR retco.
SELECT SINGLE * FROM mkpf WHERE mblnr = nast_key-mblnr
AND mjahr = nast_key-mjahr.
SELECT SINGLE * FROM mseg WHERE mblnr = mkpf-mblnr
AND zeile = nast_key-zeile
AND mjahr = mkpf-mjahr.
IF sy-subrc NE 0.
retco = sy-subrc.
EXIT.
ENDIF.
PERFORM tab156_lesen.
xskkz = t156-rstyp.
PERFORM tab001w_lesen.
IF NOT mseg-matnr IS INITIAL.
PERFORM material_lesen.
ENDIF.
ON CHANGE OF mseg-lifnr.
PERFORM read_address.
ENDON.
ENDFORM. "lesen_wlb
*eject
Fuellen der ITCPO -
FORM itcpo_fuellen.
IF xscreen NE space.
*- Testausgabe auf Bildschirm -
itcpo-tdpreview = 'X'.
itcpo-tdnoprint = 'X'.
ELSE.
CLEAR: itcpo-tdpreview,
itcpo-tdnoprint.
ENDIF.
MOVE-CORRESPONDING nast TO itcpo.
itcpo-tdcover = nast-tdocover.
itcpo-tddest = nast-ldest.
itcpo-tddataset = nast-dsnam.
itcpo-tdsuffix1 = nast-dsuf1.
itcpo-tdsuffix2 = nast-dsuf2.
itcpo-tdimmed = nast-dimme.
itcpo-tddelete = nast-delet.
itcpo-tdcopies = nast-anzal.
itcpo-tdprogram = sy-repid.
ITCPO-TDTELELAND = US_COUNTRY.
itcpo-tdsenddate = nast-vsdat.
itcpo-tdsendtime = nast-vsura.
itcpo-tdnewid = x.
ENDFORM. "itcpo_fuellen
*eject.
------------ FORM lesen der Lagerortadr. ---------------------------*
FORM ladr_lesen.
DATA: BEGIN OF addr_sel.
INCLUDE STRUCTURE addr1_sel.
DATA: END OF addr_sel.
CLEAR ladr.
SELECT SINGLE * FROM twlad WHERE werks = mseg-werks
AND lgort = mseg-lgort
AND lfdnr = '001'.
IF NOT twlad-adrnr IS INITIAL AND sy-subrc IS INITIAL.
MOVE twlad-adrnr TO addr_sel-addrnumber.
ENDIF.
CALL FUNCTION 'ADDR_GET'
EXPORTING
address_selection = addr_sel
IMPORTING
sadr = ladr
EXCEPTIONS
OTHERS = 1.
ENDFORM. "ladr_lesen
**& Form REPRINT
text
*FORM reprint.
TABLES : nase.
DATA : x TYPE string.
IF nase-vermo = 2.
x = 'REPRINT'.
ENDIF.
*ENDFORM. "REPRINT
Kindly do the needful.
Thanks in advance
Regards
SwarnaHi Swarna,
CALL FUNCTION 'OPEN_FORM'
EXPORTING
device = 'PRINTER'
language = language
OPTIONS = print_infos
<b>form = tnapr-fonam</b>
dialog = ' '.
x_open := x.
I thing its not a good way to pass the Form name to the Parameter.
Try like,
data : temp_form like tnapr-fonam.
<b>form = temp_form</b>
Thanks. -
Print barcode label from sato printer
hi everybody,
i am trying to print barcode label from sato printer (CL408e) in code 128 or code 39 format. the length of my data is 32 characters and my data contains alphanumeric. but i have no printout or the printout is not proper. i think my command structure is not correct.
can you help me to solve this problem.
thanks everybody.Hi Mohit
Look for the similar kind of thread
Printing barcode labels with SAP ECC 5.0
Regards
Sachin -
How to create mail labels, Avery 5160, using Pages?
How to create mail labels, Avery 5160, using Pages?
The application Contacts holds all your addresses and telephone, email etc details.
It has a comprehensive set of Avery labels in its print dialog.
You select the Contacts or groups of Contacts you want to print then in the Print dialog click on Show Details where you can choose Style : Mailing labels and choose which labels you want.
Peter -
How to apply List box for multiple selection of rows in ALV report ?
Hi Exprots,
1: How to apply List box for multiple selection of rows in ALV report ?
Thanking you.
Subashhi,
check the below program.
REPORT zalv_dropdowns.
*Type pools declarations for ALV
TYPE-POOLS : slis.
*data declarations for ALV container,ALV grid, Fieldcatalogues & layout
DATA: g_grid TYPE REF TO cl_gui_alv_grid,
g_custom_container TYPE REF TO cl_gui_custom_container,
gt_fieldcat TYPE lvc_t_fcat,
gs_layout TYPE lvc_s_layo.*INTERNAL TABLE AND WA DECLARATIONS FOR t517 A table
DATA: gt_outtab TYPE STANDARD TABLE OF t517a INITIAL SIZE 0,
wa_outtab TYPE t517a.
START-OF-SELECTION.*Call to ALV
CALL SCREEN 600.*On this statement double click it takes you to the screen painter SE51.
*Create a Custom container and name it CCONT and OK code as OK_CODE.
*Save check and Activate the screen painter.
*Now a normal screen with number 600 is created which holds the ALV grid.
PBO of the actual screen , Here we can give a title and customized menus
Here we also call the subroutine for ALV output.
MODULE PBO OUTPUT *
MODULE pbo OUTPUT.
PERFORM alv_output.
ENDMODULE. "pbo OUTPUT
MODULE PAI INPUT *
MODULE pai INPUT.
ENDMODULE. "pai INPUT
*& Form BUILD_FIELDCAT
FORM build_fieldcat.
DATA ls_fcat TYPE lvc_s_fcat.
*Build the field catalogue
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'T517A'
CHANGING
ct_fieldcat = gt_fieldcat.
To assign dropdown in the fieldcataogue
LOOP AT gt_fieldcat INTO ls_fcat.
CASE ls_fcat-fieldname.
WHEN 'SLART'.
*is the first list box
ls_fcat-drdn_hndl = '1'.
ls_fcat-outputlen = 15.
MODIFY gt_fieldcat FROM ls_fcat.
is the second list box
WHEN 'ABART'.
ls_fcat-drdn_hndl = '2'.
ls_fcat-outputlen = 15.
MODIFY gt_fieldcat FROM ls_fcat.
ENDCASE.
ENDLOOP.
ENDFORM. "build_fieldcat
*& Form ALV_OUTPUT
FORM alv_output .*Create object for container
CREATE OBJECT g_custom_container
EXPORTING container_name = 'CCONT'.
*create object for grid
CREATE OBJECT g_grid
EXPORTING i_parent = g_custom_container.
Build fieldcat and set column
*Assign a handle for the dropdown listbox.
PERFORM build_fieldcat.
*Build layout
PERFORM build_layout.
Define a drop down table.
PERFORM dropdown_table.
*fetch values from the T517A table
SELECT * FROM t517a INTO TABLE gt_outtab.
*Display ALV output
CALL METHOD g_grid->set_table_for_first_display
EXPORTING
is_layout = gs_layout
CHANGING
it_fieldcatalog = gt_fieldcat
it_outtab = gt_outtab.ENDFORM. "ALV_OUTPUT
*& Form dropdown_table
text
--> p1 text
<-- p2 text
FORM dropdown_table.*Declarations for drop down lists in ALV.
DATA: lt_dropdown TYPE lvc_t_drop,
ls_dropdown TYPE lvc_s_drop.
First SLART listbox (handle '1').
ls_dropdown-handle = '1'.
ls_dropdown-value = '01 Primary school'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '1'.
ls_dropdown-value = '02 Lower Secondary'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '1'.
ls_dropdown-value = '03 Upper Secondary'.
APPEND ls_dropdown TO lt_dropdown.
ls_dropdown-handle = '1'.
ls_dropdown-value = '04 Professional School'.
APPEND ls_dropdown TO lt_dropdown.
ls_dropdown-handle = '1'.
ls_dropdown-value = '05 College'.
APPEND ls_dropdown TO lt_dropdown.
ls_dropdown-handle = '1'.
ls_dropdown-value = '06 University'.
APPEND ls_dropdown TO lt_dropdown.
ls_dropdown-handle = '1'.
ls_dropdown-value = '09 Other Establishment'.
APPEND ls_dropdown TO lt_dropdown.* Second ABART listbox (handle '2'). ls_dropdown-handle = '2'.
ls_dropdown-value = '10 Primary School certificate'.
APPEND ls_dropdown TO lt_dropdown.
ls_dropdown-handle = '2'.
ls_dropdown-value = '20 Lower secondary/Junior high'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '30 High school diploma(B-levels)'.
APPEND ls_dropdown TO lt_dropdown.
ls_dropdown-handle = '2'.
ls_dropdown-value = '31 Vocational'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '32 Matriculation'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '40 Specialist vocational certificate'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '50 College degree Level1'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '51 College degree Level2'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '52 Masters degree'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '60 Univ Degree level1'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '61 Bachelors degree'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '62 Masters degree'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '63 Licenciate'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '64 Doctors Degree Ph.D'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '89 None'.
APPEND ls_dropdown TO lt_dropdown. ls_dropdown-handle = '2'.
ls_dropdown-value = '90 Unknown'.
APPEND ls_dropdown TO lt_dropdown.*method to display the dropdown in ALV
CALL METHOD g_grid->set_drop_down_table
EXPORTING
it_drop_down = lt_dropdown.ENDFORM. " dropdown_table
*& Form build_layout
text
*layout for ALV output
FORM build_layout . gs_layout-cwidth_opt = 'X'.
gs_layout-grid_title = 'ALV DROPDOWN LISTS'.
gs_layout-no_toolbar = 'X'.ENDFORM. " build_layout
endform.
Edited by: S.r.v.r.Kumar on Jun 1, 2009 2:48 PM -
How to print a label in the last page of the report
Hi, I have a report af bottom page I trid to put a label, the label is in the margin, but when I change the print condition send me a error, illegal print condition, how can I print this label only in the last page at the botton of the page
ThanksHerbe,
You can do this using format trigger
Please see the building reports manual / Tutorial for details
at http://otn.oracle.com/docs/products/reports/content.html
Thanks
The Oracle Reports team -
How can I print a label on the last page of the report in the margin
I would like to display a label on my report but has to appear only on the last page of the report in the margin area or as a footer. I have tried using the solution below that I came across in this forum. This solution only worked if I put the label as a report trailer and not in the margin of the main section of report. The problem of putting the label as a report trailer is that it will only appear at the end of the report on it's own page, i.e. on a new page. I would like the label to appear at the end of the report, on the last page which has the other report details and not to appear on a new page on its own. Could you please help? Thanks.
1. Create a dummy query, like
select 1 dummy
from dual
2. Create a package spec:
PACKAGE pkg_globals IS
totalPages number(3);
END;
2. Create a repeating frame and field for this dummy at the end of the report layout.
3. Create a format trigger for this frame:
function R_1FormatTrigger return boolean is
begin
SRW.GET_PAGE_NUM(pkg_globals.totalPages);
return (FALSE);
end;
4. Create a format trigger for your margin field:
function F_1FormatTrigger return boolean is
pagenum number;
begin
srw.get_page_num(pagenum);
if pagenum = pkg_globals.totalPages then
return (TRUE);
else
return (false);
end if;
end;user8655468 wrote:
I would like to display a label on my report but has to appear only on the last page of the report in the margin areaCreate a fixed frame at the bottom of margin area and inside the frame put your label.
set the frame print object on: Last page
Hope this works.. -
I've printed a booklet before but each pdf page had two powerpoint slides on each pdf file. This binder has one powerpoint slide on each pdf page and if I try to print it as a binder, each pdf page takes up the whole half-page on the booklet. I want to print two pdf slides on each page of the booklet so when I open the booklet, there are four powerpoint slides printed. So I basically want to combine the ability to print multiple slides per page but in a booklet form.
Why not reconstruct the pages in InDesign they way you want the double pages to appear. There may even be an imposition script available that will do the trick. You could then output to pdf all the pages you want the full spread on. Leave the original to create the pages you wanted left as is.
You can ask in the ID forum about an imposition script. I know there was one with CS4, there may have been one with CS3. -
How to change background image for each individual page in a template?
I've been working for hours to try to figure out how to change the background image for each individual page in a template. I have tried making a div in the body and adding a CSS and setting a background picture. Unfortunately even after I made it editable all templated webpages changed. I tried looking at different forum results which didn't really help me out. http://forums.adobe.com/message/2670005#2670005#2670005. I've also tried embeding a CSS style on the webpage instead of the external CSS which again didn't work. I'm not sure where to go from here. Is there a good video that explains this clearly. Please help. Thanks.
Adjust inline styles to suit your needs.
<li><a tabindex="-1" href="giving/index.html" class="MenuBarItemSubmenu" style="background:none; color:#FFF; background: #000;">GIVING</a>
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
http://alt-web.com/
http://twitter.com/altweb -
Display/Print the Selection criteria entered by USER on the ALV Report o/p?
Hi Experts,
I hv a requirement of to print/display the Selection criteria entered by user in the selection screen.........on the top portion of the ALV report output lay out.
There is a FM for this purpose, but, I forgot its name!!
So, let me know the FM or FMs, so that, will choose, which is best one,
or the piece of code, which covers all select-option entries..........appreciated.
thanq
Edited by: SAP ABAPer on Sep 3, 2008 6:35 PMUse the Function RS_REFRESH_FROM_SELECTOPTIONS get the selection details, now format the data accordingly in the TOP_OF_PAGE using the calss CL_DD_DOCUMENT.
Check the below mention code.
REPORT ztest_page.
TABLES: sflight.
DATA : it_flight TYPE TABLE OF sflight WITH HEADER LINE.
DATA BEGIN OF it_sel_opt OCCURS 0.
INCLUDE STRUCTURE rsparams.
DATA END OF it_sel_opt.
SELECT-OPTIONS: s_carrid FOR sflight-carrid.
START-OF-SELECTION.
SELECT * FROM sflight INTO TABLE it_flight
WHERE carrid IN s_carrid.
END-OF-SELECTION.
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
curr_report = sy-repid
TABLES
selection_table = it_sel_opt
EXCEPTIONS
not_found = 01
no_report = 02.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_callback_html_top_of_page = 'TOP_OF_PAGE'
i_structure_name = 'SFLIGHT'
TABLES
t_outtab = it_flight
EXCEPTIONS
program_error = 1
OTHERS = 2.
*& Form top_of_page
* text
* -->DOCUMENT text
FORM top_of_page USING document TYPE REF TO cl_dd_document.
DATA : dl_text(255) TYPE c. "Text
* Add new-line
CALL METHOD document->new_line.
CALL METHOD document->new_line.
CLEAR : dl_text.
* program ID
dl_text = 'Program Name :'.
CALL METHOD document->add_gap.
CALL METHOD document->add_text
EXPORTING
text = dl_text
sap_emphasis = cl_dd_area=>heading
sap_color = cl_dd_area=>list_heading_int.
CLEAR dl_text.
dl_text = sy-repid.
CALL METHOD document->add_text
EXPORTING
text = dl_text
sap_emphasis = cl_dd_area=>heading
sap_color = cl_dd_area=>list_negative_inv.
* Add new-line
CALL METHOD document->new_line.
CLEAR : dl_text.
dl_text = 'Selection Criteria'.
CALL METHOD document->add_gap
EXPORTING
width = 34.
CALL METHOD document->add_text
EXPORTING
text = dl_text
sap_emphasis = cl_dd_area=>heading
sap_color = cl_dd_area=>list_negative_inv.
* Add new-line
CALL METHOD document->new_line.
CLEAR : dl_text.
CONCATENATE 'SELECT Option' 'SIGN' 'OPTION' 'LOW' 'HIGH'
INTO dl_text SEPARATED BY cl_abap_char_utilities=>horizontal_tab.
CALL METHOD document->add_gap
EXPORTING
width = 34.
CALL METHOD document->add_text
EXPORTING
text = dl_text
sap_emphasis = cl_dd_area=>heading
sap_color = cl_dd_area=>list_negative_inv.
* Add new-line
CALL METHOD document->new_line.
LOOP AT it_sel_opt.
CLEAR : dl_text.
CONCATENATE it_sel_opt-selname it_sel_opt-sign
it_sel_opt-option it_sel_opt-low it_sel_opt-high
INTO dl_text SEPARATED BY cl_abap_char_utilities=>horizontal_tab.
CALL METHOD document->add_gap
EXPORTING
width = 34.
CALL METHOD document->add_text
EXPORTING
text = dl_text
sap_emphasis = cl_dd_area=>heading
sap_color = cl_dd_area=>list_negative_inv.
* Add new-line
CALL METHOD document->new_line.
ENDLOOP.
ENDFORM. "top_of_page -
How to Display Page Numbers in ALV Report HTML End of page Event
hai Gurus
Greetings
Please tell me how to get current page noumber and total number of pages in ALV Report (in HTML End of Page Event)
i tried with sy-pagno system field but it is not working
so please guide me
Thanks
Rameshcheck below code....
*Work area for Layout
gf_layout type slis_layout_alv,
*Work area for HEADER FOOTER
gf_header type slis_listheader,
*Work area for Field catalogue
gf_fieldcat type slis_fieldcat_alv.
it_top_page type slis_t_listheader,
*Internal table for Field catalogue
it_fcat type slis_t_fieldcat_alv.
perform:fill_layout,
prepare_header,
field_catlog,
display_report.
Form fill_layout
form fill_layout .
gf_layout-colwidth_optimize = 'X'.
endform. " fill_layout
Form field_catlog
form field_catlog .
data : lf_fcat type line of slis_t_fieldcat_alv,
l_cnt type i.
clear : lf_fcat, l_cnt.
Employee Number
add 1 to l_cnt.
lf_fcat-fieldname = 'EMPLID'.
lf_fcat-tabname = 'IT_EMPLOYEE'.
lf_fcat-col_pos = l_cnt.
lf_fcat-emphasize = 'X'.
lf_fcat-outputlen = 8.
lf_fcat-seltext_l = text-003.
append lf_fcat to it_fcat.
clear lf_fcat.
*Last Name
add 1 to l_cnt.
lf_fcat-fieldname = 'USERNAME'.
lf_fcat-tabname = 'IT_EMPLOYEE'.
lf_fcat-col_pos = l_cnt.
lf_fcat-emphasize = 'X'.
lf_fcat-outputlen = 20.
lf_fcat-seltext_l = text-004.
append lf_fcat to it_fcat.
*First Name
add 1 to l_cnt.
lf_fcat-fieldname = 'EMPMAIL'.
lf_fcat-tabname = 'IT_EMPLOYEE'.
lf_fcat-col_pos = l_cnt.
lf_fcat-emphasize = 'X'.
lf_fcat-outputlen = 40.
lf_fcat-seltext_l = text-005.
append lf_fcat to it_fcat.
*Known As
clear lf_fcat.
add 1 to l_cnt.
lf_fcat-fieldname = 'EMPSTATUS'.
lf_fcat-tabname = 'IT_EMPLOYEE'.
lf_fcat-col_pos = l_cnt.
lf_fcat-emphasize = 'X'.
lf_fcat-outputlen = 10.
lf_fcat-seltext_l = text-006.
append lf_fcat to it_fcat.
clear lf_fcat.
*System UserID
add 1 to l_cnt.
lf_fcat-fieldname = 'COSTCENTER'.
lf_fcat-tabname = 'IT_EMPLOYEE'.
lf_fcat-col_pos = l_cnt.
lf_fcat-emphasize = 'X'.
lf_fcat-outputlen = 10.
lf_fcat-seltext_l = text-007.
append lf_fcat to it_fcat.
clear lf_fcat.
*EMail ID
add 1 to l_cnt.
lf_fcat-fieldname = 'DEPTDESC'.
lf_fcat-tabname = 'IT_EMPLOYEE'.
lf_fcat-col_pos = l_cnt.
lf_fcat-emphasize = 'X'.
lf_fcat-outputlen = 8.
lf_fcat-seltext_l = text-008.
append lf_fcat to it_fcat.
clear lf_fcat.
*Employment Status
add 1 to l_cnt.
lf_fcat-fieldname = 'LOC'.
lf_fcat-tabname = 'IT_EMPLOYEE'.
lf_fcat-col_pos = l_cnt.
lf_fcat-emphasize = 'X'.
lf_fcat-outputlen = 20.
lf_fcat-seltext_l = text-009.
append lf_fcat to it_fcat.
clear lf_fcat.
*Personnel Area
add 1 to l_cnt.
lf_fcat-fieldname = 'TITLE'.
lf_fcat-tabname = 'IT_EMPLOYEE'.
lf_fcat-col_pos = l_cnt.
lf_fcat-emphasize = 'X'.
lf_fcat-outputlen = 40.
lf_fcat-seltext_l = text-010.
append lf_fcat to it_fcat.
clear lf_fcat.
*Personnel Area Text
clear lf_fcat.
add 1 to l_cnt.
lf_fcat-fieldname = 'HDATE'.
lf_fcat-tabname = 'IT_EMPLOYEE'.
lf_fcat-col_pos = l_cnt.
lf_fcat-emphasize = 'X'.
lf_fcat-outputlen = 10.
lf_fcat-seltext_l = text-011.
append lf_fcat to it_fcat.
clear lf_fcat.
*Country Grouping text
add 1 to l_cnt.
lf_fcat-fieldname = 'MGRID'.
lf_fcat-tabname = 'IT_EMPLOYEE'.
lf_fcat-col_pos = l_cnt.
lf_fcat-emphasize = 'X'.
lf_fcat-outputlen = 10.
lf_fcat-seltext_l = text-012.
append lf_fcat to it_fcat.
clear lf_fcat.
*Cost Center
add 1 to l_cnt.
lf_fcat-fieldname = 'MGRNAME'.
lf_fcat-tabname = 'IT_EMPLOYEE'.
lf_fcat-col_pos = l_cnt.
lf_fcat-emphasize = 'X'.
lf_fcat-outputlen = 20.
lf_fcat-seltext_l = text-013.
append lf_fcat to it_fcat.
clear lf_fcat.
*Employee Group
add 1 to l_cnt.
lf_fcat-fieldname = 'MGMAIL'.
lf_fcat-tabname = 'IT_EMPLOYEE'.
lf_fcat-col_pos = l_cnt.
lf_fcat-emphasize = 'X'.
lf_fcat-outputlen = 40.
lf_fcat-seltext_l = text-014.
append lf_fcat to it_fcat.
clear lf_fcat.
*Organizational Unit
add 1 to l_cnt.
lf_fcat-fieldname = 'DIV'.
lf_fcat-tabname = 'IT_EMPLOYEE'.
lf_fcat-col_pos = l_cnt.
lf_fcat-emphasize = 'X'.
lf_fcat-outputlen = 25.
lf_fcat-seltext_l = text-015.
append lf_fcat to it_fcat.
clear lf_fcat.
*Supervisor
add 1 to l_cnt.
lf_fcat-fieldname = 'BUSUNIT'.
lf_fcat-tabname = 'IT_EMPLOYEE'.
lf_fcat-col_pos = l_cnt.
lf_fcat-emphasize = 'X'.
lf_fcat-outputlen = 25.
lf_fcat-seltext_l = text-016.
append lf_fcat to it_fcat.
clear lf_fcat.
endform. " field_catlog
Form display_report
form display_report .
data : l_repid type sy-repid.
clear l_repid.
l_repid = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = l_repid
is_layout = gf_layout
it_fieldcat = it_fcat
i_callback_top_of_page = 'TOP-OF-PAGE'
tables
t_outtab = it_employee
exceptions
program_error = 1
others = 2.
endform. " display_report
Form PREPARE_HEADER
form prepare_header.
data:l_header1(20),
l_header2(60).
data:l_header3(20),
l_header4(60).
l_header1 = 'Met Life Census Data'.
l_header2+40(8) = 'Run Date'.
write sy-datum to l_header2+50(10).
header
gf_header-typ = 'S'.
gf_header-key = l_header1.
gf_header-info = l_header2.
append gf_header to it_top_page.
clear gf_header.
endform. " PREPARE_HEADER
form top-of-page.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = it_top_page.
endform. "TOP-OF-PAGE
*& Form end_of_list_html
output at the end of the list - not in printed output *
FORM END_OF_LIST_HTML USING END TYPE REF TO CL_DD_DOCUMENT.
DATA: LS_TEXT TYPE SDYDO_TEXT_ELEMENT,
L_GRID TYPE REF TO CL_GUI_ALV_GRID,
F(14) TYPE C VALUE 'SET_ROW_HEIGHT'.
LS_TEXT+0(20) = 'Total Employees'.
LS_TEXT+40(10) = g_count.
CALL METHOD END->ADD_TEXT
EXPORTING
TEXT = LS_TEXT
SAP_EMPHASIS = 'STRONG'.
*adds new line (start new line)
CALL METHOD END->NEW_LINE.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = l_grid.
CALL METHOD l_grid->parent->parent->(f)
EXPORTING
id = 3
height = 10.
ENDFORM. -
How to show a value of a field in %(Percentage) in ALV report
Hi,
I would like to show % symbol in my ALV report.
Can anybody please let me know how to do this.
Thanks
Venkatplz refer this..
DATA : v_var(10) TYPE p DECIMALS 2,
v_char(12) .
v_var = '-3.12'.
IF v_var < 0 .
v_char = ABS( v_var ).
CONDENSE v_char.
CONCATENATE '-' v_char INTO v_char.
ELSE.
v_char = v_var.
ENDIF.
WRITE :/ v_var , -
How to add 2 more field to the Header of FBL5N ALV report output
Hi All,
I have copied and made some modification to the standard transaction FBL5N and added some fields to the ALV report line Items but how to add fields to the header part i.e if you execute the transaction FBL5n, you will get the ALV report, in the header part customer no, company code then I need to add the 2 more fields. can any one tell me that which structure or where I need to add these fields to be appear in ALV output screen.
Thanks in advance.
Swapna.Hi Mohamed,
If you copied Z-FM successfully, then you have to go to subroutine TOP_OF_PAGE to add your field:
*& Form TOP_OF_PAGE
FORM top_of_page.
DATA: b_suppress LIKE boole-boole,
opfi_text LIKE eptext OCCURS 10 WITH HEADER LINE,
n_color TYPE i.
* IF NOT it_items-bukrs IS INITIAL "737295
* AND NOT it_items-konto IS INITIAL "737295
* AND NOT it_items-koart IS INITIAL. "737295
gs_items = gt_alv.
* ENDIF. "737295
* skip first call at top of page:
IF NOT gd_first_top IS INITIAL.
CLEAR gd_first_top.
EXIT.
ENDIF.
IF x_grid = c_x OR x_inet = c_x. "1012201
PERFORM grid_top_of_page.
EXIT.
ENDIF.
*... open FI: get header text.
* first fill some RFXPO fields for general info:
CLEAR: s_rfxpo, wa_kna1, wa_lfa1, wa_ska1.
s_rfxpo-bukrs = gs_items-bukrs.
s_rfxpo-kkber = gs_items-kkber.
s_rfxpo-koart = gs_items-koart.
s_rfxpo-konto = gs_items-konto.
s_rfxpo-vrbez = gs_variant-variant.
s_rfxpo-waers = gs_items-waers.
* update master record:
PERFORM fill_master_rec USING gs_items-koart
gs_items-konto
gs_items-bukrs. " note 698396
CALL FUNCTION 'OPEN_FI_PERFORM_00001640_E'
EXPORTING
i_rfxpo = s_rfxpo
i_kna1 = wa_kna1
i_lfa1 = wa_lfa1
i_ska1 = wa_ska1
IMPORTING
e_suppress_standard = b_suppress
TABLES
t_lines = opfi_text.
*... display open FI text:
IF x_konto_sort = 'X'.
LOOP AT opfi_text.
CASE opfi_text-color.
WHEN 1.
FORMAT COLOR 1.
WHEN 2.
FORMAT COLOR 2.
WHEN 3.
FORMAT COLOR 3.
WHEN 4.
FORMAT COLOR 4.
WHEN 5.
FORMAT COLOR 5.
WHEN 6.
FORMAT COLOR 6.
WHEN 7.
FORMAT COLOR 7.
ENDCASE.
WRITE: / opfi_text-text.
ENDLOOP.
FORMAT RESET.
ENDIF.
*... display other header text:
IF b_suppress NE 'X'.
PERFORM display_custom_header.
PERFORM display_ccard_lines.
ENDIF.
" Put your field somewhere...
ENDFORM. " TOP_OF_PAGE
Good luck,
Thanks, -
When printing labels for each printed label a blank label comes out of the printer
Hello Experts
We have a CR report which is designed to prints labels for the items using a label printer. After an upgrade that we have last month the settings for this report are missing so the labels were coming out wrong.
Due to this I have had to reconfigure this report and its printing preferences and so far I have managed to make the prints fit in each label. But the problem is that if I try to print 5 copies of a label, the 5 labels come out of the printer just fine, butt after it another 5 blank labels come out of the printer too.
I have tried with all parameters in "Printing preferences", mainly in the "Material" tab but nothing works.
Thanks in advance and regardsHi,
Please check below SAP note and let me know your feedback:
1043235 - Label/thermal printers are not supported by SAP Business
One
Thanks & Regards,
Nagarajan -
Is it possible to print a label after each LPN during a PO receipt using MSCA?
We have the buiness flow setup however the labels only print after all LPNs are received. We would like each label to print when we go to Next Item.
We are runing R12.1.3Sorry I forgot to put the locations of TS.xml
Examples:
Copying \\MDT04\DeploymentShare$\Control\WIN81ENTX64\TS.XML to X:\Deploy\Tools\X64
Copying \\MDT04\DeploymentShare$\Control\WIN81ENTX64\TS.XML to C:\MININT\Tools\X64
The one that is used when you are booted into the OS and have LTISuspend active is C:\MINIT\Tools\X64
Is this the location you copied the TS.xml to?
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Maybe you are looking for
-
HOW CAN U CORRECT THE DATA IN UR FILE WHICH CONTAINS 1 LAKSH RECS
Hai Frnds, i Attend an interview they asked this questions can u know the answeres . tell me . In File to file scenario how can we reprocess records which failed records. HOW CAN U CORRECT THE DATA IN UR FILE WHICH CONTAINS 1 LAKSH RECS Thanks in adv
-
I started working for ChaCha 11/26/2010, I had to download a program to take incoming questions. Ever since then, Firefox will not work correctly, even if I am totally logged out of ChaCha, and the page is closed, if I try to open my browser using Fi
-
I believe 3GS stereo jack damaged vehicle when used with cassette adapter
I believe the 3GS damaged my automobile stereo through some sort of short in the headphone jack that is related to voice control. I've noticed other threads about headphones and voice control causing strange behaviors on the iPhone 3GS. I'm wondering
-
Hello, i have following Problem, when i inserted data in the table "t_test",i have to do maually 10 SQL Statements to update this table. Now i would like a method, how i can do this automatically. THX Paul
-
My Address Book application is suddenly missing after upgrading to Tiger 10.4.3. Is it possible to download address book only or do I have to revert to the Tiger disk and do a custom install of ONLY address book? Alternatively, do I have to wait for