Header not visible in alv output print preview using html_top_of_page
hi to all experts,
im using html_top_of_page for alv header and using fm reuse_alv_grid_display. when i see the print preview im getting the report output but not the alv header . what could be the problem
Hi tarun,
im unable to see the header print preview . I can see it in the report output .
here is my code
FORM html_top_of_page USING document
TYPE REF TO cl_dd_document .
CREATE OBJECT: document.
DATA:text TYPE sdydo_text_element.
DATA: l_repid TYPE sy-repid,
l_mandt TYPE sy-mandt,
l_date(10),
l_yr(4),
l_mm(2),
l_dd(2),
l_hr(2),
l_sec(2),
l_min(2),
l_time(10).
CALL METHOD document->add_gap
EXPORTING
width = 70.
text = text-005.
CALL METHOD document->add_text
EXPORTING
text = text-005
sap_style = 'HEADING'.
CALL METHOD document->new_line.
CONCATENATE 'Report:' sy-repid INTO text.
CALL METHOD document->add_text
EXPORTING
text = text
sap_emphasis = 'Strong'.
CALL METHOD document->add_gap
EXPORTING
width = 206.
l_date = sy-datum.
MOVE: l_date+0(4) TO l_yr,
l_date+4(2) TO l_mm,
l_date+6(2) TO l_dd.
CONCATENATE 'Run Date:' l_dd '.' l_mm '.' l_yr
INTO text.
CALL METHOD document->add_text
EXPORTING
text = text
sap_style = space
sap_color = space
sap_fontsize = cl_dd_document=>medium
sap_emphasis = cl_dd_document=>strong
style_class = space
* CHANGING
* document =
CALL METHOD document->new_line.
CONCATENATE 'Client:' sy-mandt INTO text.
CALL METHOD document->add_text
EXPORTING
text = text
sap_fontstyle = cl_dd_document=>medium
sap_emphasis = cl_dd_document=>strong.
CALL METHOD document->add_gap
EXPORTING
width = 220.
l_time = sy-uzeit.
l_hr = l_time+0(2).
l_mm = l_time+2(4) .
l_sec = l_time+4(6).
CONCATENATE l_hr ':' l_mm ':' l_sec
INTO l_time.
CONCATENATE 'Time:' l_time INTO text.
CALL METHOD document->add_text
EXPORTING
text = text
sap_fontstyle = cl_dd_document=>medium
sap_emphasis = cl_dd_document=>strong
style_class = space
* CHANGING
* document =
CALL METHOD document->new_line.
CONCATENATE 'User Id:' sy-uname INTO text.
CALL METHOD document->add_text
EXPORTING
text = text
sap_style = space
sap_color = space
sap_fontstyle = cl_dd_document=>medium
sap_emphasis = cl_dd_document=>strong
style_class = space
* CHANGING
* document =
CALL METHOD document->new_line.
CALL METHOD document->new_line.
text = 'Note: The maximum value for the column Qty to Print is 10,000.'.
CALL METHOD document->add_text
EXPORTING
text = text
* text_table =
* fix_lines =
* sap_style = cl_dd_document=>strong
sap_color = cl_dd_document=>list_negative
* sap_fontsize =
sap_fontstyle = cl_dd_document=>strong
* sap_emphasis =
* style_class =
* CHANGING
* document =
CALL METHOD document->new_line.
CALL METHOD document->new_line.
text = 'Selection Criteria:'.
CALL METHOD document->add_text
EXPORTING
text = text
* text_table =
* fix_lines =
sap_style = 'KEY'
* sap_color =
sap_fontsize = cl_dd_document=>medium
sap_fontstyle = cl_dd_document=>strong.
* CALL METHOD document->new_line.
* CALL METHOD document->new_line.
IF so_mblnr[] IS NOT INITIAL.
CALL METHOD document->new_line.
IF so_mblnr-high IS NOT INITIAL.
CONCATENATE 'Material Doc:' so_mblnr-low ' TO ' so_mblnr-high INTO text SEPARATED BY space.
ELSE.
CONCATENATE 'Material Doc:' so_mblnr-low INTO text SEPARATED BY space.
ENDIF.
CALL METHOD document->add_text
EXPORTING
text = text
sap_fontsize = cl_dd_document=>medium
sap_fontstyle = cl_dd_document=>strong.
ENDIF.
IF so_bwart[] IS NOT INITIAL.
CALL METHOD document->new_line.
IF so_bwart-high IS NOT INITIAL.
CONCATENATE 'Movement Type:' so_bwart-low ' TO ' so_bwart-high INTO text SEPARATED BY space.
ELSE.
CONCATENATE 'Movement Type:' so_bwart-low INTO text SEPARATED BY space.
ENDIF.
CALL METHOD document->add_text
EXPORTING
text = text
sap_fontsize = cl_dd_document=>medium
sap_fontstyle = cl_dd_document=>strong.
ENDIF.
IF so_bldat[] IS NOT INITIAL.
CALL METHOD document->new_line.
IF so_bldat-high IS NOT INITIAL.
CONCATENATE 'Document Date:' so_bldat-low ' TO ' so_bldat-high INTO text SEPARATED BY space.
ELSE.
CONCATENATE 'Document Date:' so_bldat-low INTO text SEPARATED BY space.
ENDIF.
CALL METHOD document->add_text
EXPORTING
text = text
sap_fontsize = cl_dd_document=>medium
sap_fontstyle = cl_dd_document=>strong.
ENDIF.
IF so_budat[] IS NOT INITIAL.
CALL METHOD document->new_line.
IF so_budat-high IS NOT INITIAL.
CONCATENATE 'Posting Date:' so_budat-low ' TO ' so_budat-high INTO text SEPARATED BY space.
ELSE.
CONCATENATE 'Posting Date:' so_budat-low INTO text SEPARATED BY space.
ENDIF.
CALL METHOD document->add_text
EXPORTING
text = text
sap_fontsize = cl_dd_document=>medium
sap_fontstyle = cl_dd_document=>strong.
ENDIF.
IF so_matnr[] IS NOT INITIAL.
CALL METHOD document->new_line.
IF so_matnr-high IS NOT INITIAL.
CONCATENATE 'Material ID:' so_matnr-low ' TO ' so_matnr-high INTO text SEPARATED BY space.
ELSE.
CONCATENATE 'Material ID:' so_matnr-low INTO text SEPARATED BY space.
ENDIF.
CALL METHOD document->add_text
EXPORTING
text = text
sap_fontsize = cl_dd_document=>medium
sap_fontstyle = cl_dd_document=>strong.
ENDIF.
IF so_werks[] IS NOT INITIAL.
CALL METHOD document->new_line.
IF so_werks-high IS NOT INITIAL.
CONCATENATE 'Plant:' so_werks-low ' TO ' so_werks-high INTO text SEPARATED BY space.
ELSE.
CONCATENATE 'Plant:' so_werks-low INTO text SEPARATED BY space.
ENDIF.
CALL METHOD document->add_text
EXPORTING
text = text
sap_fontsize = cl_dd_document=>medium
sap_fontstyle = cl_dd_document=>strong.
ENDIF.
IF so_lgort[] IS NOT INITIAL.
CALL METHOD document->new_line.
IF so_lgort-high IS NOT INITIAL.
CONCATENATE 'Storage Location:' so_lgort-low ' TO ' so_lgort-high INTO text SEPARATED BY space.
ELSE.
CONCATENATE 'Storage Location:' so_lgort-low INTO text SEPARATED BY space.
ENDIF.
CALL METHOD document->add_text
EXPORTING
text = text
sap_fontsize = cl_dd_document=>medium
sap_fontstyle = cl_dd_document=>strong.
ENDIF.
IF so_lifnr[] IS NOT INITIAL.
CALL METHOD document->new_line.
IF so_lifnr-high IS NOT INITIAL.
CONCATENATE 'Vendor:' so_lifnr-low ' TO ' so_lifnr-high INTO text SEPARATED BY space.
ELSE.
CONCATENATE 'Vendor:' so_lifnr-low INTO text SEPARATED BY space.
ENDIF.
CALL METHOD document->add_text
EXPORTING
text = text
sap_fontsize = cl_dd_document=>medium
sap_fontstyle = cl_dd_document=>strong.
ENDIF.
IF so_xblnr[] IS NOT INITIAL.
CALL METHOD document->new_line.
IF so_xblnr-high IS NOT INITIAL.
CONCATENATE 'Delivery Note:' so_xblnr-low 'TO' so_xblnr-high INTO text SEPARATED BY space.
ELSE.
CONCATENATE 'Delivery Note:' so_xblnr-low INTO text SEPARATED BY space.
ENDIF.
CALL METHOD document->add_text
EXPORTING
text = text
sap_fontsize = cl_dd_document=>medium
sap_fontstyle = cl_dd_document=>strong.
ENDIF.
IF so_ebeln[] IS NOT INITIAL.
CALL METHOD document->new_line.
IF so_ebeln-high IS NOT INITIAL.
CONCATENATE 'PO NO:' so_ebeln-low ' TO ' so_ebeln-high INTO text SEPARATED BY space.
ELSE.
CONCATENATE 'PO NO:' so_ebeln-low INTO text SEPARATED BY space.
ENDIF.
CALL METHOD document->add_text
EXPORTING
text = text
sap_fontsize = cl_dd_document=>medium
sap_fontstyle = cl_dd_document=>strong.
ENDIF.
IF so_usnam[] IS NOT INITIAL.
CALL METHOD document->new_line.
IF so_usnam-high IS NOT INITIAL.
CONCATENATE 'User Name:' so_usnam-low ' TO ' so_usnam-high INTO text SEPARATED BY space.
ELSE.
CONCATENATE 'User Name:' so_usnam-low INTO text SEPARATED BY space.
ENDIF.
CALL METHOD document->add_text
EXPORTING
text = text
sap_fontsize = cl_dd_document=>medium
sap_fontstyle = cl_dd_document=>strong.
ENDIF.
CALL METHOD document->new_line.
IF 1x3 = 'X'.
text = 'Barcode label 1x3 maintained'.
CALL METHOD document->add_text
EXPORTING
text = text
sap_fontsize = cl_dd_document=>medium
sap_fontstyle = cl_dd_document=>strong.
ELSE.
text = 'Bar Code label 2x4 maintained'.
CALL METHOD document->add_text
EXPORTING
text = text
sap_fontsize = cl_dd_document=>medium
sap_fontstyle = cl_dd_document=>strong.
ENDIF.
CALL METHOD document->new_line.
Similar Messages
-
Field of character length 255 not displaying in ALV output
Dear all,
i am trying to display a field of ztable with lenght 255 character, same is not displaying at ALV output.
it is displaying only upto 128 characters in ALV output.
table is Ztable-zfield with CHAR255 length.
please help me.
Regards,
Sam.Hi Sam Johny,
In ALV Grid the maximum characters can be displayed in one column is 128 Characters..
But for your solution you can press Print Preview Button to view more text(or Press Ctrl + Shift + F10 )...
Else try with ALV LIST
and pass FIELDCAT-OUTPUTLEN = '255' for field in fieldcatalog
Hope it will solve your problem..
Thanks & Regards
ilesh 24x7
ilesh Nandaniya -
Freight, octroi not to be shown in Print preview
Dear friends,
I want freight and octroi not to be shown in print preview although i am maintaining those condition types in condition tab. Their value should not add up to the net value of material in print preview.
Pl suggest how it's possible?
Regds
AmitavaDear Raju sir,
I will maintain freight & octroi condition types in conditions tab but I don't want them to come in print preview and need not to add into total price in print preview, i.e. the total price to be shown in print preview should be exclusive of freight and octroi
how it's possible? -
Print Preview using crystal report in SAP B1 slow.
Dear all,
I face another problem. Print preview using crystal report in SAP B1 is very slow. Although i have create a query view in SQL server but it's still slow for my user. First time i create using table in crystal report. just drag the table. It's take more than 10 minutes. After that i move all the query to view in SQL server , it's take 1-2 minutes to print preview some time more.. But i think that it's still slow. Does any one know how to print preview fast. Just like in PLD.
Thanks in advance
bodhi86Hello,
How do you answered to this question ?
Malika
Edited by: Malika Sanoune on May 13, 2011 1:48 PM -
Print preview using crystal report in SAP B1 is very slow.
Dear all,
I face another problem. Print preview using crystal report in SAP B1 is very slow. Although i have create a layout in AR invoice form and applying the print sequences (ie 4 prints). Does any one know how to print preview fast. Just like in PLD.
Thanks in advance
Kamlesh NawareHi,
Basically Crystal report run with SQL statement, I would suggest to do well performance tuning on SQL query / Store Procedure.
Structure your query in DBA manner that will make some how faster such as use ( inner join, less condition,...)..
also if it simple query then use Command in Crystal report rather store Procedure..that make some how Faster your report.
Thanks
Kevin
Edited by: Kevin Shah on May 27, 2011 4:21 PM -
NEF files from Nikon d800 not visible in bridge and photoshop cs6- using mac ver.10.8.5. downloaded plugin from site 8.3 but issue unresolved
You can install and use Camera Raw 8.8 with OSX 10.8 Go to Help > Updates in Photoshop CS6
-
Does anyone know why since upgrading to ML notes are not visible in Time Machine. They used to be part of mail and could be recovered from Time machine but since ML I don't seem to be able to access notes in Time Machine. Any help would be useful.
Welcome to Apple Communities
Mail doesn't support notes. If you use iCloud, you have them in it because Notes is an application -
Problem in alv grid display (it is not filtering the data in print preview)
Hi Every One,
Its very urgent for me to deliver this report ....
I applied sort criteria on my final internal table which is pupulated and then i passed to the function module...
when i execute the program it is showing me the perfect output..when i take a print preview it is not filtering the data instead it is showing me the normal uotput i.e..,without sort criteria...
here is the code plz go thru it and tell me were i am doing wrong...
i thank u one and all ...and plz debub the code on the system and let me know....
REPORT tracking-quotation NO STANDARD PAGE HEADING MESSAGE-ID zrv_message LINE-COUNT 65 LINE-SIZE 110.
Includes
This include contains declarations
INCLUDE ZMM_TRACKING_QUOTATION_T.
This include contains code for the performs
INCLUDE ZMM_TRACKING_QUOTATION_F.
AT SELECTION SCREEN *
AT SELECTION-SCREEN.
This perform will validate the fields
PERFORM f_validate_sel_screen.
Start-Of-Selection
START-OF-SELECTION.
This perform will read the values from the database.
PERFORM selection.
This perform will build the field catalogue
PERFORM f_build_catalogue.
This perform will build the sort
PERFORM f_event_sort.
This perform will build the layout
PERFORM f_build_layout.
This perform will build the event
PERFORM f_event_build.
This perform will build the comment
PERFORM f_comment_build.
This perform will display the list
PERFORM f_list_display.
End-Of-Selection
END-OF-SELECTION.
*& Include ZMM_TRACKING_QUOTATION_T *
T a b l e s D e c l a r a t i o n s *
TABLES: eban,
ebkn,
ekko,
eket,
lfa1,
ekpo.
Selection Screen Declaration
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-100.
SELECT-OPTIONS: bednr FOR eban-bednr,
ps_psp FOR ebkn-ps_psp_pnr,
kostl FOR ebkn-kostl,
erdat FOR ebkn-erdat.
SELECTION-SCREEN END OF BLOCK b1.
Type Pools D e c l a r a t i o n s *
TYPE-POOLS: slis.
V a r i a b l e s *
DATA : rt_fieldcat TYPE slis_t_fieldcat_alv,
i_layout TYPE slis_layout_alv,
i_event TYPE slis_t_event,
i_listheader TYPE slis_t_listheader,
l_sort TYPE slis_t_sortinfo_alv,
wa_sort TYPE slis_sortinfo_alv.
I n t e r n a l T a b l e s *
DATA: BEGIN OF i_final_tab OCCURS 0,
name1 LIKE lfa1-name1,
banfn LIKE eban-banfn,
badat LIKE eban-badat,
bnfpo LIKE eban-bnfpo,
txz01 LIKE eban-txz01,
menge LIKE eban-menge,
bednr LIKE eban-bednr,
frgdt LIKE eban-frgdt,
lfdat LIKE eban-lfdat,
ps_psp_pnr LIKE ebkn-ps_psp_pnr,
bwbdt LIKE ekko-bwbdt,
aedat LIKE ekko-aedat,
lifnr LIKE ekko-lifnr,
ihran LIKE ekko-ihran,
ebeln LIKE ekpo-ebeln,
ebelp LIKE ekpo-ebelp,
plifz LIKE ekpo-plifz,
eindt LIKE eket-eindt,
END OF i_final_tab.
DATA: BEGIN OF itab OCCURS 0,
name1 LIKE lfa1-name1,
banfn LIKE eban-banfn,
badat LIKE eban-badat,
bnfpo LIKE eban-bnfpo,
txz01 LIKE eban-txz01,
menge(17),
bednr LIKE eban-bednr,
frgdt LIKE eban-frgdt,
lfdat LIKE eban-lfdat,
ps_psp_pnr LIKE ebkn-ps_psp_pnr,
bwbdt LIKE ekko-bwbdt,
aedat LIKE ekko-aedat,
lifnr LIKE ekko-lifnr,
ihran LIKE ekko-ihran,
ebeln LIKE ekpo-ebeln,
ebelp LIKE ekpo-ebelp,
plifz LIKE ekpo-plifz,
eindt LIKE eket-eindt,
END OF itab.
*& Include ZMM_TRACKING_QUOTATION_F *
**& Form FIELDCAT_INIT
text
-->P_GT_FIELDCAT[] text
FORM f_build_catalogue.
DATA : ls_fieldcat TYPE slis_fieldcat_alv.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'BANFN'.
ls_fieldcat-tabname = 'itab'.
ls_fieldcat-seltext_m = 'PR Number'.
ls_fieldcat-ref_tabname = 'EBAN'.
ls_fieldcat-fix_column = ''.
ls_fieldcat-emphasize = ''.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'BNFPO'.
ls_fieldcat-ref_tabname = 'EBAN'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'BADAT'.
ls_fieldcat-ref_tabname = 'EBAN'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'TXZ01'.
ls_fieldcat-ref_tabname = 'EBAN'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'MENGE'.
ls_fieldcat-ref_tabname = 'ITAB'.
ls_fieldcat-seltext_l = 'Quantity'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'PS_PSP_PNR'.
ls_fieldcat-ref_tabname = 'EBKN'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'BEDNR'.
ls_fieldcat-ref_tabname = 'EBAN'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'FRGDT'.
ls_fieldcat-ref_tabname = 'EBAN'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'LFDAT'.
ls_fieldcat-ref_tabname = 'EBAN'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'EBELN'.
ls_fieldcat-ref_tabname = 'EKPO'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'EBELP'.
ls_fieldcat-ref_tabname = 'EKPO'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'AEDAT'.
ls_fieldcat-ref_tabname = 'EKKO'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'LIFNR'.
ls_fieldcat-ref_tabname = 'EKKO'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'NAME1'.
ls_fieldcat-ref_tabname = 'LFA1'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'IHRAN'.
ls_fieldcat-ref_tabname = 'EKKO'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'EINDT'.
ls_fieldcat-ref_tabname = 'EKET'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'PLIFZ'.
ls_fieldcat-ref_tabname = 'EKPO'.
APPEND ls_fieldcat TO rt_fieldcat.
ENDFORM. " FIELDCAT_INIT
*& Form selection
text
--> p1 text
<-- p2 text
FORM selection .
SELECT
lfa1~name1
eban~banfn
eban~badat
eban~bnfpo
eban~txz01
eban~menge
eban~bednr
eban~frgdt
eban~lfdat
ebkn~ps_psp_pnr
ekko~bwbdt
ekko~aedat
ekko~lifnr
ekko~ihran
ekpo~ebeln
ekpo~ebelp
ekpo~plifz
eket~eindt
FROM lfa1 INNER JOIN ekko ON ( lfa1lifnr = ekkolifnr )
INNER JOIN ekpo ON ( ekkoebeln = ekpoebeln )
INNER JOIN eket ON ( ekpoebeln = eketebeln
AND
ekpoebelp = eketebelp )
INNER JOIN eban ON ( ebanbanfn = eketbanfn
AND
ebanbnfpo = eketbnfpo )
INNER JOIN ebkn ON ( ebanbanfn = ebknbanfn
AND
ebanbnfpo = ebknbnfpo )
INTO TABLE i_final_tab WHERE eban~bednr IN bednr AND
ebkn~ps_psp_pnr IN ps_psp AND
ebkn~kostl IN kostl AND
ebkn~erdat IN erdat AND
ekko~bstyp <> 'F'.
LOOP AT i_final_tab.
itab-name1 = i_final_tab-name1.
itab-banfn = i_final_tab-banfn.
itab-badat = i_final_tab-badat.
itab-bnfpo = i_final_tab-bnfpo.
itab-txz01 = i_final_tab-txz01.
itab-menge = i_final_tab-menge.
itab-bednr = i_final_tab-bednr.
itab-frgdt = i_final_tab-frgdt.
itab-lfdat = i_final_tab-lfdat.
itab-ps_psp_pnr = i_final_tab-ps_psp_pnr.
itab-aedat = i_final_tab-aedat.
itab-lifnr = i_final_tab-lifnr.
itab-ihran = i_final_tab-ihran.
itab-ebeln = i_final_tab-ebeln.
itab-ebelp = i_final_tab-ebelp.
itab-plifz = i_final_tab-plifz.
itab-eindt = i_final_tab-eindt.
APPEND itab.
CLEAR itab.
ENDLOOP.
ENDFORM. " selection
*& Form f_event_build
text
--> p1 text
<-- p2 text
FORM f_event_build .
DATA wa_event TYPE slis_alv_event.
CLEAR: wa_event,
i_event.
*read event top-of-page
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = i_event.
IF sy-subrc <> 0.
ENDIF.
*Prepare event table
READ TABLE i_event WITH KEY name = 'TOP_OF_PAGE' INTO wa_event.
IF sy-subrc EQ 0.
MOVE 'TOP_OF_PAGE' TO wa_event-form.
APPEND wa_event TO i_event.
ENDIF.
ENDFORM. " f_event_build
*& Form f_comment_build
text
--> p1 text
<-- p2 text
FORM f_comment_build .
DATA: wa_listheader TYPE slis_listheader.
CLEAR wa_listheader.
wa_listheader-typ = 'H'.
wa_listheader-info = 'Tracking Of Quotation For Purchase Requisition'.
APPEND wa_listheader TO i_listheader.
CLEAR wa_listheader.
wa_listheader-typ = 'S'.
wa_listheader-info = 'SMS-DEMAG Pvt. Ltd.'.
APPEND wa_listheader TO i_listheader.
CLEAR wa_listheader.
wa_listheader-typ = 'S'.
wa_listheader-info = 'R1- Nehru Enclave'.
APPEND wa_listheader TO i_listheader.
CLEAR wa_listheader.
wa_listheader-typ = 'S'.
wa_listheader-info = 'New Delhi - '.
APPEND wa_listheader TO i_listheader.
ENDFORM. " f_comment_build
*& Form f_build_layout
text
--> p1 text
<-- p2 text
FORM f_build_layout .
CLEAR i_layout.
i_layout-colwidth_optimize = 'X'.
i_layout-zebra = 'X'.
i_layout-totals_text = 'Total'.
ENDFORM. " f_build_layout
*& Form f_list_display
text
--> p1 text
<-- p2 text
FORM f_list_display .
*sort itab by name1
banfn
badat
bnfpo
txz01
menge
bednr
frgdt
lfdat
ps_psp_pnr
bwbdt
aedat
lifnr
ihran
ebeln
ebelp
plifz
eindt.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
is_layout = i_layout
it_fieldcat = rt_fieldcat
it_events = i_event
it_sort = l_sort
TABLES
t_outtab = itab.
IF sy-subrc <> 0.
ENDIF.
ENDFORM. " f_list_display
*& Form TOP_OF_PAGE
text
--> p1 text
<-- p2 text
FORM top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = i_listheader
i_logo = 'ENJOYSAP_LOGO'.
ENDFORM. "TOP_OF_PAGE
*& Form f_event_sort
text
--> p1 text
<-- p2 text
FORM f_event_sort .
wa_sort-spos = 1.
wa_sort-up = 'X'.
wa_sort-tabname = 'i_final_tab'.
wa_sort-fieldname = 'BANFN'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
CLEAR WA_SORT.
wa_sort-spos = 5.
wa_sort-up = 'X'.
wa_sort-tabname = 'i_final_tab'.
wa_sort-fieldname = 'MENGE'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
wa_sort-spos = 2.
wa_sort-up = 'X'.
wa_sort-tabname = 'i_final_tab'.
wa_sort-fieldname = 'BNFPO'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
wa_sort-spos = 3.
wa_sort-up = 'X'.
wa_sort-tabname = 'i_final_tab'.
wa_sort-fieldname = 'BADAT'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
wa_sort-spos = 4.
wa_sort-up = 'X'.
wa_sort-tabname = 'i_final_tab'.
wa_sort-fieldname = 'TXZ01'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
wa_sort-spos = 7.
wa_sort-up = 'X'.
wa_sort-tabname = 'i_final_tab'.
wa_sort-fieldname = 'BEDNR'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
wa_sort-spos = 6.
wa_sort-up = 'X'.
wa_sort-tabname = 'i_final_tab'.
wa_sort-fieldname = 'PS_PSP_PNR'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
wa_sort-spos = 8.
wa_sort-up = 'X'.
wa_sort-tabname = 'i_final_tab'.
wa_sort-fieldname = 'FRGDT'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
wa_sort-spos = 9.
wa_sort-up = 'X'.
wa_sort-tabname = 'i_final_tab'.
wa_sort-fieldname = 'LFDAT'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
CLEAR wa_sort.
wa_sort-up = 'X'.
wa_sort-tabname = 'i_final_tab'.
wa_sort-spos = 10.
wa_sort-fieldname = 'EBELN'.
wa_sort-subtot = 'X'.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
CLEAR wa_sort.
wa_sort-up = 'X'.
wa_sort-tabname = 'i_final_tab'.
wa_sort-spos = 11.
wa_sort-fieldname = 'EBELP'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
CLEAR wa_sort.
wa_sort-up = 'X'.
wa_sort-tabname = 'i_final_tab'.
wa_sort-spos = 12.
wa_sort-fieldname = 'AEDAT'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
CLEAR wa_sort.
wa_sort-up = 'X'.
wa_sort-tabname = 'i_final_tab'.
wa_sort-spos = 13.
wa_sort-fieldname = 'LIFNR'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
CLEAR wa_sort.
wa_sort-up = 'X'.
wa_sort-tabname = 'i_final_tab'.
wa_sort-spos = 14.
wa_sort-fieldname = 'NAME1'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
CLEAR wa_sort.
wa_sort-up = 'X'.
wa_sort-tabname = 'i_final_tab'.
wa_sort-spos = 15.
wa_sort-fieldname = 'IHRAN'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
CLEAR wa_sort.
wa_sort-up = 'X'.
wa_sort-tabname = 'i_final_tab'.
wa_sort-spos = 16.
wa_sort-fieldname = 'EINDT'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
*sort l_sort by spos.
CLEAR wa_sort.
wa_sort-spos = 1.
wa_sort-fieldname = 'BANFN'.
wa_sort-down = 'X'.
wa_sort-tabname = 'itab'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
wa_sort-spos = 5.
wa_sort-down = 'X'.
wa_sort-tabname = 'itab'.
wa_sort-fieldname = 'MENGE'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
CLEAR wa_sort.
wa_sort-spos = 2.
wa_sort-fieldname = 'BNFPO'.
wa_sort-down = 'X'.
wa_sort-tabname = 'itab'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
wa_sort-spos = 3.
wa_sort-down = 'X'.
wa_sort-tabname = 'itab'.
wa_sort-fieldname = 'BADAT'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
wa_sort-spos = 4.
wa_sort-down = 'X'.
wa_sort-tabname = 'itab'.
wa_sort-fieldname = 'TXZ01'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
wa_sort-spos = 7.
wa_sort-down = 'X'.
wa_sort-tabname = 'itab'.
wa_sort-fieldname = 'BEDNR'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
wa_sort-spos = 6.
wa_sort-down = 'X'.
wa_sort-tabname = 'itab'.
wa_sort-fieldname = 'PS_PSP_PNR'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
wa_sort-spos = 8.
wa_sort-down = 'X'.
wa_sort-tabname = 'itab'.
wa_sort-fieldname = 'FRGDT'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
wa_sort-spos = 9.
wa_sort-down = 'X'.
wa_sort-tabname = 'itab'.
wa_sort-fieldname = 'LFDAT'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
CLEAR wa_sort.
wa_sort-down = 'X'.
wa_sort-tabname = 'itab'.
wa_sort-spos = 10.
wa_sort-fieldname = 'EBELN'.
wa_sort-subtot = 'X'.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
CLEAR wa_sort.
wa_sort-down = 'X'.
wa_sort-tabname = 'itab'.
wa_sort-spos = 11.
wa_sort-fieldname = 'EBELP'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
CLEAR wa_sort.
wa_sort-down = 'X'.
wa_sort-tabname = 'itab'.
wa_sort-spos = 12.
wa_sort-fieldname = 'AEDAT'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
CLEAR wa_sort.
wa_sort-down = 'X'.
wa_sort-tabname = 'itab'.
wa_sort-spos = 13.
wa_sort-fieldname = 'LIFNR'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
CLEAR wa_sort.
wa_sort-down = 'X'.
wa_sort-tabname = 'itab'.
wa_sort-spos = 14.
wa_sort-fieldname = 'NAME1'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
CLEAR wa_sort.
wa_sort-down = 'X'.
wa_sort-tabname = 'itab'.
wa_sort-spos = 15.
wa_sort-fieldname = 'IHRAN'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
CLEAR wa_sort.
wa_sort-spos = 16.
wa_sort-fieldname = 'EINDT'.
wa_sort-tabname = 'itab'.
wa_sort-down = 'X'.
wa_sort-subtot = ' '.
APPEND wa_sort TO l_sort.
*CLEAR WA_SORT.
*sort l_sort by spos.
ENDFORM. " f_event_sort
*& Form f_validate_sel_screen
text
--> p1 text
<-- p2 text
FORM f_validate_sel_screen .
*Tracking number
SELECT SINGLE * FROM eban WHERE bednr IN bednr.
IF sy-subrc NE 0.
MESSAGE e013.
ENDIF.
*Wbs Element
SELECT SINGLE * FROM ebkn WHERE ps_psp_pnr IN ps_psp.
IF sy-subrc NE 0.
MESSAGE e014.
ENDIF.
*Cost center
SELECT SINGLE * FROM ebkn WHERE kostl IN kostl.
IF sy-subrc NE 0.
MESSAGE e015.
ENDIF.
*Date
SELECT SINGLE * FROM ebkn WHERE erdat IN erdat.
IF sy-subrc NE 0.
MESSAGE e012.
ENDIF.
ENDFORM. " f_validate_sel_screenHey Ravi,
As you said it is urgent to deliver the report, i will suggest you temporary solution while i debug the program.
In the FM "REUSE_ALV_GRID_DISPLAY", use layout to generate your sorted report for now as shown following:
<b>DATA: G_VARIANT LIKE DISVARIANT.</b>
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IS_LAYOUT = I_LAYOUT
IT_FIELDCAT = RT_FIELDCAT
IT_EVENTS = I_EVENT
IT_SORT = L_SORT
<b>is_variant = g_variant</b>
TABLES
T_OUTTAB = ITAB.
IF SY-SUBRC <> 0.
ENDIF.
Where g_variant is your custom layout which you will make as default for output.
Hope this helps and let me know if you need more details.
In the mean time, i will look in to the program.
Regards,
Vicky
PS: Award points if helpful -
Delivery output print preview issue.
Hello Friends,
While going for the print preview of the outbound delivery by T-code VL71 i am getting the message-->
"Output could not be displayed (it may not be complete)
Message no. VN069"
As i have maintained VV21 & output type in the delivery.
Please help me with the solution.
Thank you.
Sadanand.hi
did u maintained the output type in NACE for appliacation V2
and also check whether u have maintained the custom form in smartforms place
Output type LD00
trans medium : 1
short tecxt : print out
Program ; RLE_DELNOTE
FORM routine : ENTRY
smartforms : ur z form
trans medium : 2
short text : fax
Program ; RLE_DELNOTE
FORM routine : ENTRY
smartforms : LE_SHP_DELNOTE
hopre this would sove ur problem.
Regards,
Venkat.
Edited by: venkatakrishnan Parthsarathy on Apr 14, 2008 2:40 PM -
Data element description not changing in ALV output
Hi Friends
I changed the description of the data element from xx to yy,but this is not reflecting in the alv output,
It is still showing xx,After activating everything and running the report I get the same problem,
Can any one help?Hi,
Write your code in following manner.
ATA:ist_fieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE.
DATA: wa_fieldcat LIKE LINE OF ist_fieldcat.
DATA : l_pos TYPE i VALUE 1.
ist_fieldcat-fieldname = 'POSID'.
ist_fieldcat-tabname = 'IT_FINAL'.
ist_fieldcat-outputlen = 24.
ist_fieldcat-col_pos = l_pos.
* ist_fieldcat-ddictxt = 'L'.
ist_fieldcat-key = 'X'.
ist_fieldcat-seltext_l = 'Appropriation Request Number'.
APPEND ist_fieldcat.
CLEAR ist_fieldcat.
l_pos = l_pos + 1.
ist_fieldcat-fieldname = 'TXT04'.
ist_fieldcat-tabname = 'IT_FINAL'.
ist_fieldcat-outputlen = 4.
ist_fieldcat-col_pos = l_pos.
ist_fieldcat-ddictxt = 'L'.
* ist_fieldcat-key = 'X'.
ist_fieldcat-seltext_l = 'Status'.
ist_fieldcat-EMPHASIZE = 'C400'.
APPEND ist_fieldcat.
CLEAR ist_fieldcat.
l_pos = l_pos + 1.
ist_fieldcat-fieldname = 'UDATE'.
ist_fieldcat-tabname = 'IT_FINAL'.
ist_fieldcat-outputlen = 8.
ist_fieldcat-col_pos = l_pos.
ist_fieldcat-ddictxt = 'L'.
ist_fieldcat-key = 'X'.
ist_fieldcat-seltext_l = 'Status Date'.
* IST_FIELDCAT-EMPHASIZE = 'C600'.
APPEND ist_fieldcat.
CLEAR ist_fieldcat.
l_pos = l_pos + 1.
ist_fieldcat-fieldname = 'CRTD'.
ist_fieldcat-tabname = 'IT_FINAL'.
ist_fieldcat-outputlen = 4.
ist_fieldcat-col_pos = l_pos.
ist_fieldcat-ddictxt = 'L'.
* ist_fieldcat-key = 'X'.
IST_FIELDCAT-EMPHASIZE = 'C700'.
ist_fieldcat-seltext_l = 'Status CRTD'.
APPEND ist_fieldcat.
CLEAR ist_fieldcat.
<i>Rewards point if helpful</i>
<b>Debjani</b> -
Hi friends,
I want to see the print preview of my RFQ. But I am unable to see the print preview in ME41/ME42/ME43. In my PO i can see the print preview, but for RFQ its not showing at all.
Please suggest.
Thanks & Regards
SatyaHi.
Which component are you using purchase order?
I guess ME21N.
Preview function should be added in Enjoy transaction like ME21N, ME22N etc.
So when you try to create ME21, you won't find the way to preview the output.
You can reffer to Note 457497(18).
18. In the EnjoySAP Transaction ME21N, ME22N or ME23N you go into in the
print preview for a purchase order.It can happen that the system
displays too much or too little data.However, the print output of
the document is correct.
It's not the comment about "Enjoy can use the preview" but we can guess from the
text.
Instead of that, you can see the Nast data from ME9A(for RFQ and for PO ME9F)
and you can use the preview function.
I'm not sure if this help you, but it should be restriction of old transaction.
Just only information, the coding of ME21N to call preview function.
*LMEGUICJL
preview output
WHEN 'PREVOUTPUT'.
CALL METHOD l_appl->preview.
CLEAR im_fcode. -
Hi,
I have made settings for output determination.
Now while creating MIGO , one output TAB is coming .
But while entering into that TAB ,I cant find any option for print preview.
Is in standard SAP , print preview is not possible?
How to make settings for connecting this output to my network printer.?
Kindly advise.
regards,In MIGO , the messge is generated when we save/post the document . Hence preview of teh document is not possible. Only after post u will come to know wr message is generated or not.
In case you are testing the message set up, I suggest to use MB01 for goods receipt .
Hope this answers your query. Please reward points if u are satisfied with or post your query back.....
Regards
Mani -
Table header not visible on all pages
I have created a table, which have the following subforms.
MaterialBody ( Type -Flow Content & Flow direction - Table )
- Header ( Type - Flow Content & Flow direction - Table row )
- Data ( Type - Flow Content & Flow direction - Table row )
Also Checked the check BOX , Include Header Row in Initial Page
In the output of my form i see all the records in table format, but my header is not visible on all the pages.
The header is visible only on the firs and second page.
Can anyone suggest, why the header is not visible on every page.Hi Ayesha,
can you please show us the screenshot of your elements you have declared under smartforms.
Please check this too, for your header data you have checked or not. -
Issue with ALV grid print preview/spool
Hello everyone,
I am working on a report and I am having some issues with ALV grid. Currently in our DEV and QA environments the user can run the report, view the ALV grid, and print the grid without any issues.
However this isn't the case in the Prod environment. The user is able to run the report and view the grid without any issues. But when they click print preview or click print, the spool is incorrect. It shows the proper values from the grid, but the first field is reduced in length. Rather than showing a numeric field of length 10 it shows 99999999# or 99999999...
The programs are identical through every environment, including user parameters, formats, and spool settings. I have been told printing grids may have some issues, does anyone have any advice or dealt with this issue before?
I appreciate the help.
Thanks,
CI was waiting to hear from the functional team on the matter and no one has mentioned any more issues. I am assuming the problem is solved. I just noticed the thread was still un-answered and wanted to give an update.
Thank you for you help Vijay.
Regards
C -
Data not seen in Table Control --Print Preview
Hi
I am creating one Standard Transaction Iview for CATS .
While doing print preview(Portal Side) in IE 6 , I am not able to see data in Table control(Data Entry Area ).
Can you please provide me the solution for how I can see the data in Table Control
Regards
RuturajGo to SE11 and search for setup and look for the specific data source and see the content, if the content is actually zero, then there is nothing in the setup table.
thanks.
Wond
Maybe you are looking for
-
When i go to websites, including bookmarks or repeats - sometimes they open, sometimes not. Often it takes a long time and then goes to Earthlink / Yahoo search page, over and over. Very annoying. I did not have this problem prior to the upgrade. I s
-
Connect iPhone to Projector?
Guys, Can any one let me know of how to use the iphone to connect to a projector so that we can simply demonstrate the application on a large screen? (just as shown in Keynote!!) Earlier response is appreciated. Thanks, Goldeni
-
We're testing the functionality of SkyDrive Pro in our business, and we've come across an issue. Initially setting up SkyDrive Pro, it creates a folder in the user's profile, and starts syncing. Awesome. But when you go to change the root folder t
-
When I select a FedEX tracking number from an email to copy it intending to paste it in the FedEX tracking web page in Safari the paste option is never available. Why?
-
Hello folks simple question (again) I have just added Properties to my first App, and load/save them from/to disk. All well there, but them Properties only come in one flavor, String. And I'm so green here that I haven't got a clue how to extract an