Display hole header line in PDF (Broadcaster)
Hi friends,
I have a little problem with finding the right optioin to display the whole headerline of an query after broadcasting a web template in PDF format (created with WAD).
If I broadcast it with MHTML it is showing me the hole header lines,
do not know why not in PDF....
e.g. column
PDF: January 2009
HTML: January 2009
Variance Act - Plan
Thank you for your help!
Best regards
Florian
Hi Florian,
Check "Note 1041987 - NW 04s BI PDF export - problem with multi-line cells", that solved the problem for me.
Best regards,
Mikael
Similar Messages
-
Report Title Displaying in Multiple Lines on PDF Format when i Print in PDF
Report Title Displaying in Multiple Lines on PDF Format when i tried to print in PDF Format, is there any limit for Report Title Characters
Displaying Like -
LRDP
Open
Label
Paradigm
Forecast
Report
Any Info Appreciated
~SrixGot It .. Just need to chnage the Width Parameter.......!
-
After adding one column in a table can't get the header line
hi all,
i have make a SMART FORM which was working perfectly.Now the requirement of user is to add one column in my table at smart form which i did and after modification i execute it it give me data as well but issue which i'm facing is that the TABLE at smart forms in which i have add one field is not displaying the HEADER LINE which i have define with SELECT PATTREN option.
Thanks & Regards,
sappk25Hi,
Have you created the Header Text? If yes, then might be the case that your smartforms
table which was already created is with Multiple Line. Check weather you have added
customer field in Header Line or Not?
Regards,
SUjeet -
Multiple Header Line In HIERSEQ ALV
Hi Experts,
Please guide me how to get miltile Header lines in the HIERSEQ Alv , My requirment it develop a genledger for customers in which the Address of customer should be in 3 or four lines then followed by its balances. Please suggest me ...
Regards,
PrakashHi,
You need to pass the Row number to the filed catlog in order to display multiple header lines.
For example,
wl_fieldcat-row_pos = 1. " This field will be displayed in first row
wl_fieldcat-col_pos = 1.
wl_fieldcat-fieldname = 'VBELN'.
wl_fieldcat-tabname = 'T_VBAK'.
wl_fieldcat-outputlen = 20.
Append wl_fieldcat to t_fieldcat.
wl_fieldcat-row_pos = 2. " This field will be displayed in Second row
wl_fieldcat-col_pos = 1.
wl_fieldcat-fieldname = 'VBELN'.
wl_fieldcat-tabname = 'T_VBAK'.
wl_fieldcat-outputlen = 20.
Append wl_fieldcat to t_fieldcat.
Regards,
Rajneesh -
Display attribute value as header line
Hello experts,
We are working with BI 7.0 SAP NetWeaver 2004s. We need to display a attribute value in the workbook header line. The characteristic is as filter in the query and the attribute is in free characteristic area.
Any idea?
Thanks in advanced,
yeberri.You did make it a navigational attribute though, right (otherwise you wouldn't be able to use it as a filter)?
Try using a text variable which references the attribute. -
Two header line in ALV display
Hi ,
I want two header lines in ALV report using reuse_alv_grid_display .
Like
Factory-Sales
Qty Value
10 1000
How to do that please helpHi,
I am giving the example code for 3 header line display. This may help you.
First declare Form,
FORM TOP-OF-PAGE .
FREE TTOP .
FREE HTOP .
CLEAR TTOP .
HTOP-TYP = 'H' .
HTOP-INFO = 'LLYODS STEEL INDUSTRIES LIMITED, WARDHA' .
APPEND HTOP TO TTOP .
CLEAR HTOP .
HTOP-TYP = 'S' .
HTOP-INFO = MAT .
APPEND HTOP TO TTOP .
CLEAR HTOP .
HTOP-TYP = 'S' .
HTOP-INFO = PONO .
APPEND HTOP TO TTOP .
CLEAR HTOP .
HTOP-TYP = 'S' .
HTOP-INFO = item .
APPEND HTOP TO TTOP .
CLEAR HTOP .
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = TTOP
I_LOGO =
I_END_OF_LIST_GRID =
I_ALV_FORM =
ENDFORM.
After that declare this form in your Grid or List like below.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = 'TOP-OF-PAGE'
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT =
IT_FIELDCAT = BTAB
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = 'X'
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = ITAB
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.
Regards,
Himanshu -
Using xdp + xml data to generate pdf.
I have a floating field that is bind to data. Data is a paragraph with multiple \n to indicate new line. When form is preview in designer it shows \n char instead of moving next content in paragraph to new line.
It used to work in old version of Designer but not any more in ES2 (9)
I need to know what data need to be sent so that content would display on new line.
Thanks
YogLCPaul,
the old version of the designer and Form server was displaying paragraph correctly with following xml data but with Designer ES2 9 SP1 shows \u000d\u000a character inside the paragraph and server throw exception on this xml data. (cobra communication error ...)
I tried replacing \u000d\u000a with 
 
 but server throws exception.
Also If user enter multiple CR in the textarea still server throws exception.
<Paragraph>My comments for content from the textfield paragraph are here My comments for content from the textfield paragraph are here My comments for content from the textfield paragraph are here My comments for content from the textfield paragraph are here \u000d\u000a</Paragraph>
or
<Paragraph>My comments for content from the textfield paragraph are here My comments for content from the textfield paragraph are here My comments for content from the textfield paragraph are here My comments for content from the textfield paragraph are here
for content from the textfield paragraph are here My comments for content from the textfield paragraph are here
\u000d\u000a</Paragraph> -
Displaying XML content in one line in pdf
Hi,
I am using OBIP for report generation, i am facing a problem regarding to xml content
In XML the content is displaying like
<OmbudsmanAdrress>Shri V. Ramasaamy,
Insurance Ombudsman,
Office of the Insurance Ombudsman,
Fathima Akhtar Court,
4th Floor, 453 (old 312),
Anna Salai, Teynampet,
CHENNAI-600 018,
Fax : 044-24333664,
Email [email protected]</OmbudsmanAdrress>
but i need to show only in one line in pdf.
how can i will get in one line
please suggest me....
Thanks in advance,
Vijay Chunduri.Finally after a long struggle i got the answer...
Here it is buddies...
<?xdofx:replace(OmbudsmanAdrress,’,\n’ ,',')?> -
Header Line not Displayed in Smartform
Hi all,
in Smartforms , i am having one Page.
in the main window , in Footer i am having Grand total to be displayed in the last page. i have put condition
SFSY-PAGE = SFSY-JOBPAGES.
the Problem is in the last page the header line is not displayed.
in all other pages it is getting displayed.
Can anyone help me out.
Regards.
Suki.Ok. I got the problem now. There is not simple solution for this.
You can create a new window just only for header. Put it on the same place as the Current Header line starts.
Move the contents from Main table header line to Header window.
This way, the header will print on all the pages.
Regards,
Naimesh Patel -
How to print header lines at the top of every page with Alv list display?
Dear all,
I need a requirement with printing issue. A program list should be printed with the function reuse_alv_list_display.
The list has several pages and then can be printed but the header lines appear only first page when they printed. The other pages don't have header lines, they continue with the next record of the list remaining from previous page. I use the alv parameters as below:
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = l_repid
i_callback_pf_status_set = 'ALV_PF_STATUS'
is_layout = ls_layo
it_fieldcat = lt_fcat
i_default = 'X'
i_save = 'A'
is_variant = ls_variant
it_events = lt_events
TABLES
t_outtab = lt_data
EXCEPTIONS
program_error = 1
OTHERS = 2.
and lt_events as below:
ls_event-name = 'END_OF_LIST'.
ls_event-form = 'ALV_END_OF_LIST'.
APPEND ls_event TO lt_events.
ls_event-name = 'END_OF_PAGE'.
ls_event-form = 'ALV_END_OF_PAGE'.
APPEND ls_event TO lt_events.
ls_event-name = 'TOP_OF_LIST'.
ls_event-form = 'ALV_TOP_OF_LIST'.
APPEND ls_event TO lt_events.
ls_event-name = 'TOP_OF_PAGE'.
ls_event-form = 'ALV_TOP_OF_PAGE'.
APPEND ls_event TO lt_events.
So, how can I print header lines for every page?
Best Regards,Hello Saba,
Your point might be very close to solution.
Because in the selection screen of the program there are two radio buttons, one of them visits 'REUSE_ALV_COMMENTARY_WRITE' function and the other doesn't. The one which visits has a problem with header liens in every page when printing. But I couldn't find out the solution yet.
reuse_alv_list_display uses 4 event and of course I call subroutine. There are end_of_list, end_of_page, top_of_list and top_of_page. I use in the subroutine for top_of_page:
CALL FUNCTION 'LVC_TRANSFER_TO_SLIS'
EXPORTING
it_fieldcat_lvc = gt_fcat
IMPORTING
et_fieldcat_alv = lt_fcat
EXCEPTIONS
it_data_missing = 1
it_fieldcat_lvc_missing = 2
OTHERS = 3.
CALL FUNCTION 'REUSE_ALV_LIST_WIDTH_GET'
EXPORTING
it_fieldcat = lt_fcat
IMPORTING
e_width = l_width.
WRITE l_reptx TO l_reptx CENTERED.
NEW-LINE.
WRITE: AT (l_width) l_reptx CENTERED.
SUBTRACT 10 FROM l_width.
WRITE: AT l_width sy-pagno RIGHT-JUSTIFIED.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = lt_header
I_LOGO =
I_END_OF_LIST_GRID =
Do you have other suggestions ? -
Line items records should display in 1 line (means header line)
Hi,
Suppose i have 5 line items in my report against 1 document number, now i want that when i execute the report with that document number, it show only 1 line item and sum of all amounts (means of all line items) ...
please let me know, how can i do it....Now i m sending my code for ur ref...
Code----
TABLES : bsik,bkpf,bseg,j_1imovend,lfa1,t001,t005u,bsak,ekko,bsis.
DATA : BEGIN OF itab OCCURS 0,
hkont LIKE bseg-hkont, "Gl account
belnr LIKE bsik-belnr, "Document number
gjahr LIKE bsik-gjahr, "Fiscal Year
bldat LIKE bsik-bldat, "Document Date
budat LIKE bsik-budat, "Posting Date
mwskz LIKE bseg-mwskz, "Tax Code
dmbtr LIKE bseg-dmbtr, "Amount
buzei LIKE bseg-buzei, "line item
lifnr LIKE bsik-lifnr, "Vendor number
ebeln LIKE bseg-ebeln, "Purchasing Document
ebelp LIKE bseg-ebelp, "line item nbr
hwbas LIKE bseg-hwbas, "Base amount
shkzg LIKE bseg-shkzg, "Debit/Credit code
xblnr LIKE mkpf-xblnr, "Ven invoice nbr
name1(25), "name1
ort01 LIKE lfa1-ort01, "City
j_1ilstno LIKE j_1imovend-j_1ilstno, " Vendor tin nbr
regio LIKE lfa1-regio, "Region Code
bezei LIKE t005u-bezei, "Region desc
END OF itab.
DATA : BEGIN OF itab1 OCCURS 0.
INCLUDE STRUCTURE itab.
DATA:END OF itab1.
DATA : BEGIN OF itab2 OCCURS 0.
INCLUDE STRUCTURE itab.
DATA:END OF itab2.
***********************************Purchase order history
DATA: BEGIN OF bet OCCURS 50.
INCLUDE STRUCTURE ekbe.
DATA: END OF bet.
DATA: BEGIN OF bzt OCCURS 50.
INCLUDE STRUCTURE ekbz.
DATA: END OF bzt.
DATA: BEGIN OF betz OCCURS 50.
INCLUDE STRUCTURE ekbez.
DATA: END OF betz.
DATA: BEGIN OF bets OCCURS 50.
INCLUDE STRUCTURE ekbes.
DATA: END OF bets.
DATA: BEGIN OF xekbnk OCCURS 10.
INCLUDE STRUCTURE ekbnk.
DATA: END OF xekbnk.
TYPE-POOLS: slis.
DATA: linecolor TYPE slis_specialcol_alv OCCURS 0 WITH HEADER LINE.
DATA: alv_layout TYPE slis_layout_alv.
DATA: fieldcat TYPE slis_t_fieldcat_alv,
fieldcat_ln LIKE LINE OF fieldcat,
sortcat TYPE slis_t_sortinfo_alv,
sortcat_ln LIKE LINE OF sortcat,
eventcat TYPE slis_t_event,
eventcat_ln LIKE LINE OF eventcat,
alv_print TYPE slis_print_alv.
DATA :col_pos TYPE i.
SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME.
PARAMETERS : hkont LIKE bseg-hkont OBLIGATORY. "GL Code
SELECT-OPTIONS : belnr FOR bsik-belnr, "Document number
gjahr FOR bsik-gjahr, "Fiscal Year
bldat FOR bsik-bldat, "Document date
budat FOR bsik-budat. "posting Date
SELECTION-SCREEN END OF BLOCK a.
SELECTION-SCREEN BEGIN OF BLOCK b WITH FRAME.
PARAMETERS: detail RADIOBUTTON GROUP gr1,
summry RADIOBUTTON GROUP gr1.
SELECTION-SCREEN END OF BLOCK b.
SELECT DISTINCT hkont belnr gjahr bldat budat INTO CORRESPONDING FIELDS OF TABLE itab
FROM bsis
WHERE bukrs = '1000'
AND hkont = hkont
AND belnr IN belnr
AND gjahr IN gjahr
AND bldat IN bldat
AND budat IN budat.
SORT itab BY belnr.
LOOP AT itab.
SELECT * FROM bseg WHERE belnr = itab-belnr
AND gjahr = itab-gjahr
AND bukrs = '1000'
AND ( ebeln <> ' ' OR hkont = hkont ).
IF sy-subrc = 0.
itab-buzei = bseg-buzei.
itab-mwskz = bseg-mwskz.
IF bseg-ebeln <> ' '.
itab-ebeln = bseg-ebeln.
itab-ebelp = bseg-ebelp.
MODIFY itab.
ENDIF.
IF bseg-hkont = hkont.
itab-shkzg = bseg-shkzg.
itab-hwbas = bseg-hwbas.
itab-dmbtr = bseg-dmbtr.
IF itab-shkzg = 'H'.
itab-dmbtr = itab-dmbtr * ( -1 ).
ENDIF.
MOVE-CORRESPONDING itab TO itab2.
APPEND itab2.
ENDIF.
ENDIF.
ENDSELECT.
ENDLOOP.
LOOP AT itab2.
SELECT SINGLE * FROM ekko WHERE ebeln = itab2-ebeln.
IF sy-subrc = 0.
itab2-lifnr = ekko-lifnr.
ENDIF.
CALL FUNCTION 'ME_READ_HISTORY'
EXPORTING
ebeln = itab2-ebeln
ebelp = itab2-ebelp
webre = 'X'
TABLES
xekbe = bet
xekbz = bzt
xekbes = bets
xekbez = betz
xekbnk = xekbnk.
itab2-xblnr = bet-xblnr.
SELECT SINGLE * FROM lfa1 WHERE lifnr = itab2-lifnr.
itab2-name1 = lfa1-name1.
itab2-ort01 = lfa1-ort01.
itab2-regio = lfa1-regio.
SELECT SINGLE * FROM t005u WHERE bland = itab2-regio
AND spras = 'EN'
AND land1 = 'IN'.
itab2-bezei = t005u-bezei.
SELECT SINGLE * FROM j_1imovend WHERE lifnr = itab2-lifnr.
IF sy-subrc = 0 .
itab2-j_1ilstno = j_1imovend-j_1ilstno. " Vendor tin nbr
ENDIF.
MODIFY itab2.
ENDLOOP.
PERFORM build_fieldcat1.
PERFORM build_fieldcat2.
PERFORM build_fieldcat3.
PERFORM build_fieldcat4.
PERFORM build_fieldcat5.
PERFORM build_fieldcat6.
PERFORM build_fieldcat7.
PERFORM build_fieldcat7_1.
PERFORM build_fieldcat8.
PERFORM build_fieldcat9.
PERFORM build_fieldcat10.
PERFORM build_fieldcat11.
PERFORM build_fieldcat12.
PERFORM build_eventcat.
PERFORM start_list_viewer.
*& Form BUILD_EVENTCAT
text
--> p1 text
<-- p2 text
FORM build_eventcat.
eventcat_ln-name = slis_ev_top_of_page.
eventcat_ln-form = 'TOP_OF_PAGE'.
APPEND eventcat_ln TO eventcat.
APPEND eventcat_ln TO eventcat.
ENDFORM. " BUILD_EVENTCAT
*& Form START_LIST_VIEWER
text
--> p1 text
<-- p2 text
FORM start_list_viewer.
DATA: pgm LIKE sy-repid.
pgm = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = pgm
i_callback_user_command = 'USER-COMMAND'
it_fieldcat = fieldcat
i_save = 'A'
it_events = eventcat
TABLES
t_outtab = itab2
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. "start_list_viewer
FORM build_fieldcat1 *
FORM build_fieldcat1.
ADD 1 TO col_pos.
fieldcat_ln-ref_tabname = 'ITAB2'.
fieldcat_ln-fieldname = 'BELNR'.
fieldcat_ln-seltext_m = 'Doc No'.
fieldcat_ln-outputlen = '20'.
fieldcat_ln-datatype = 'CHAR'.
fieldcat_ln-key = space.
fieldcat_ln-no_zero = space.
fieldcat_ln-do_sum = space.
fieldcat_ln-col_pos = col_pos.
fieldcat_ln-no_out = space.
fieldcat_ln-qfieldname = space.
fieldcat_ln-hotspot = space.
APPEND fieldcat_ln TO fieldcat.
ENDFORM. " BUILD_FIELDCAT1
FORM build_fieldcat2 *
FORM build_fieldcat2.
ADD 1 TO col_pos.
fieldcat_ln-ref_tabname = 'ITAB2'.
fieldcat_ln-fieldname = 'BLDAT'.
fieldcat_ln-seltext_m = 'Doc DATE'.
fieldcat_ln-outputlen = '20'.
fieldcat_ln-datatype = 'DATS'.
fieldcat_ln-key = space.
fieldcat_ln-no_zero = space.
fieldcat_ln-do_sum = space.
fieldcat_ln-col_pos = col_pos.
fieldcat_ln-no_out = space.
fieldcat_ln-qfieldname = space.
fieldcat_ln-hotspot = space.
APPEND fieldcat_ln TO fieldcat.
ENDFORM. " BUILD_FIELDCAT2
FORM build_fieldcat3 *
FORM build_fieldcat3.
ADD 1 TO col_pos.
fieldcat_ln-ref_tabname = 'ITAB2'.
fieldcat_ln-fieldname = 'BUDAT'.
fieldcat_ln-seltext_m = 'POSTING DT'.
fieldcat_ln-outputlen = '20'.
fieldcat_ln-datatype = 'DATS'.
fieldcat_ln-key = space.
fieldcat_ln-no_zero = space.
fieldcat_ln-do_sum = space.
fieldcat_ln-col_pos = col_pos.
fieldcat_ln-no_out = space.
fieldcat_ln-qfieldname = space.
fieldcat_ln-hotspot = space.
APPEND fieldcat_ln TO fieldcat.
ENDFORM. " BUILD_FIELDCAT3
FORM build_fieldcat4 *
FORM build_fieldcat4.
ADD 1 TO col_pos.
fieldcat_ln-ref_tabname = 'ITAB2'.
fieldcat_ln-fieldname = 'LIFNR'.
fieldcat_ln-seltext_m = 'VENDOR'.
fieldcat_ln-outputlen = '10'.
fieldcat_ln-datatype = 'CHAR'.
fieldcat_ln-key = space.
fieldcat_ln-no_zero = space.
fieldcat_ln-do_sum = space.
fieldcat_ln-col_pos = col_pos.
fieldcat_ln-no_out = space.
fieldcat_ln-qfieldname = space.
fieldcat_ln-hotspot = space.
APPEND fieldcat_ln TO fieldcat.
ENDFORM. " BUILD_FIELDCAT4
FORM build_fieldcat5 *
FORM build_fieldcat5.
ADD 1 TO col_pos.
fieldcat_ln-ref_tabname = 'ITAB2'.
fieldcat_ln-fieldname = 'NAME1'.
fieldcat_ln-seltext_m = 'Name'.
fieldcat_ln-outputlen = '25'.
fieldcat_ln-datatype = 'CHAR'.
fieldcat_ln-key = space.
fieldcat_ln-no_zero = space.
fieldcat_ln-do_sum = space.
fieldcat_ln-col_pos = col_pos.
fieldcat_ln-no_out = space.
fieldcat_ln-qfieldname = space.
fieldcat_ln-hotspot = space.
APPEND fieldcat_ln TO fieldcat.
ENDFORM. " BUILD_FIELDCAT5
FORM build_fieldcat6 *
FORM build_fieldcat6.
ADD 1 TO col_pos.
fieldcat_ln-ref_tabname = 'ITAB2'.
fieldcat_ln-fieldname = 'ORT01'.
fieldcat_ln-seltext_m = 'CITY'.
fieldcat_ln-outputlen = '15'.
fieldcat_ln-datatype = 'CHAR'.
fieldcat_ln-key = space.
fieldcat_ln-no_zero = space.
fieldcat_ln-do_sum = space.
fieldcat_ln-col_pos = col_pos.
fieldcat_ln-no_out = space.
fieldcat_ln-qfieldname = space.
fieldcat_ln-hotspot = space.
APPEND fieldcat_ln TO fieldcat.
ENDFORM. " BUILD_FIELDCAT6
FORM build_fieldcat7 *
FORM build_fieldcat7.
ADD 1 TO col_pos.
fieldcat_ln-ref_tabname = 'ITAB2'.
fieldcat_ln-fieldname = 'J_1ILSTNO'.
fieldcat_ln-seltext_m = 'TIN'.
fieldcat_ln-outputlen = '25'.
fieldcat_ln-datatype = 'CHAR'.
fieldcat_ln-key = space.
fieldcat_ln-no_zero = space.
fieldcat_ln-do_sum = space.
fieldcat_ln-col_pos = col_pos.
fieldcat_ln-no_out = space.
fieldcat_ln-qfieldname = space.
fieldcat_ln-hotspot = space.
APPEND fieldcat_ln TO fieldcat.
ENDFORM. " BUILD_FIELDCAT7
FORM build_fieldcat7_1 *
FORM build_fieldcat7_1.
ADD 1 TO col_pos.
fieldcat_ln-ref_tabname = 'ITAB2'.
fieldcat_ln-fieldname = 'BEZEI'.
fieldcat_ln-seltext_m = 'Region'.
fieldcat_ln-outputlen = '15'.
fieldcat_ln-datatype = 'CHAR'.
fieldcat_ln-key = space.
fieldcat_ln-no_zero = space.
fieldcat_ln-do_sum = space.
fieldcat_ln-col_pos = col_pos.
fieldcat_ln-no_out = space.
fieldcat_ln-qfieldname = space.
fieldcat_ln-hotspot = space.
APPEND fieldcat_ln TO fieldcat.
ENDFORM. " BUILD_FIELDCAT7_1
FORM build_fieldcat8 *
FORM build_fieldcat8.
ADD 1 TO col_pos.
fieldcat_ln-ref_tabname = 'ITAB2'.
fieldcat_ln-fieldname = 'MWSKZ'.
fieldcat_ln-seltext_m = 'Tax c'.
fieldcat_ln-outputlen = '4'.
fieldcat_ln-datatype = 'CHAR'.
fieldcat_ln-key = space.
fieldcat_ln-no_zero = space.
fieldcat_ln-do_sum = space.
fieldcat_ln-col_pos = col_pos.
fieldcat_ln-no_out = space.
fieldcat_ln-qfieldname = space.
fieldcat_ln-hotspot = space.
APPEND fieldcat_ln TO fieldcat.
ENDFORM. " BUILD_FIELDCAT8
FORM build_fieldcat9 *
FORM build_fieldcat9.
ADD 1 TO col_pos.
fieldcat_ln-ref_tabname = 'ITAB2'.
fieldcat_ln-fieldname = 'EBELN'.
fieldcat_ln-seltext_m = 'Purchase Ord'.
fieldcat_ln-outputlen = '20'.
fieldcat_ln-datatype = 'CHAR'.
fieldcat_ln-key = space.
fieldcat_ln-no_zero = space.
fieldcat_ln-do_sum = space.
fieldcat_ln-col_pos = col_pos.
fieldcat_ln-no_out = space.
fieldcat_ln-qfieldname = space.
fieldcat_ln-hotspot = space.
APPEND fieldcat_ln TO fieldcat.
ENDFORM. " BUILD_FIELDCAT9
FORM build_fieldcat10 *
FORM build_fieldcat10.
ADD 1 TO col_pos.
fieldcat_ln-ref_tabname = 'ITAB2'.
fieldcat_ln-fieldname = 'HWBAS'.
fieldcat_ln-seltext_m = 'Base Amount'.
fieldcat_ln-outputlen = '15'.
fieldcat_ln-datatype = 'CURR'.
fieldcat_ln-key = space.
fieldcat_ln-no_zero = space.
fieldcat_ln-do_sum = space.
fieldcat_ln-col_pos = col_pos.
fieldcat_ln-no_out = space.
fieldcat_ln-qfieldname = space.
fieldcat_ln-hotspot = space.
APPEND fieldcat_ln TO fieldcat.
ENDFORM. " BUILD_FIELDCAT10
FORM build_fieldcat11 *
FORM build_fieldcat11.
ADD 1 TO col_pos.
fieldcat_ln-ref_tabname = 'ITAB2'.
fieldcat_ln-fieldname = 'DMBTR'.
fieldcat_ln-seltext_m = 'Tax amt'.
fieldcat_ln-outputlen = '15'.
fieldcat_ln-datatype = 'CURR'.
fieldcat_ln-key = space.
fieldcat_ln-no_zero = space.
fieldcat_ln-do_sum = space.
fieldcat_ln-col_pos = col_pos.
fieldcat_ln-no_out = space.
fieldcat_ln-qfieldname = space.
fieldcat_ln-hotspot = space.
APPEND fieldcat_ln TO fieldcat.
ENDFORM. " BUILD_FIELDCAT11
FORM build_fieldcat12 *
FORM build_fieldcat12.
ADD 1 TO col_pos.
fieldcat_ln-ref_tabname = 'ITAB2'.
fieldcat_ln-fieldname = 'XBLNR'.
fieldcat_ln-seltext_m = 'VEN INV no'.
fieldcat_ln-outputlen = '20'.
fieldcat_ln-datatype = 'CHAR'.
fieldcat_ln-key = space.
fieldcat_ln-no_zero = space.
fieldcat_ln-do_sum = space.
fieldcat_ln-col_pos = col_pos.
fieldcat_ln-no_out = space.
fieldcat_ln-qfieldname = space.
fieldcat_ln-hotspot = space.
APPEND fieldcat_ln TO fieldcat.
ENDFORM. " BUILD_FIELDCAT12
FORM TOP_OF_PAGE
FORM top_of_page.
PERFORM batch-heading.
ENDFORM. "top_of_page
*& Form BATCH-HEADING
text
--> p1 text
<-- p2 text
FORM batch-heading.
DATA: lc_laufd(10) TYPE c,
lc_text(100) TYPE c,
lc_text2(100) TYPE c,
lc_text3(100) TYPE c,
lc_date(10) TYPE c,
lc_date1(10) TYPE c,
lc_date2(10) TYPE c.
DATA: li_len TYPE i,
li_len2 TYPE i,
li_len3 TYPE i,
li_pos TYPE i,
li_pos2 TYPE i,
li_pos3 TYPE i.
WRITE sy-datum TO lc_date.
write audat-low to lc_date1.
write audat-high to lc_date2.
lc_text = 'Purchases from Intrastate'.
concatenate lc_text spmon_out into lc_text2
CONCATENATE lc_text 'As On' lc_date INTO lc_text2
concatenate lc_text 'From' lc_date1 'To' lc_date2 into lc_text2
SEPARATED BY space .
PERFORM read_t001 USING '1000'.
lc_laufd = 'ZFI'.
FORMAT INTENSIFIED ON.
calculate output positions
li_pos2 = sy-linsz - 25.
li_pos3 = sy-linsz - 10. " pos. for name, date, time
li_pos = sy-linsz / 2 - STRLEN( lc_text2 ) .
*first line
WRITE AT 1 t001-butxt.
write at li_pos(75) lc_text2 .
WRITE AT 40 lc_text2 .
WRITE: AT li_pos2 sy-datum, ' / '.
WRITE AT li_pos3 sy-uzeit.
NEW-LINE.
WRITE AT li_pos2 'Page'.
WRITE AT li_pos3 sy-pagno LEFT-JUSTIFIED.
NEW-LINE.
WRITE AT li_pos2 lc_laufd .
NEW-LINE.
third line.
lc_text3 = text-014.
REPLACE '&BUKRS' WITH '1000' INTO lc_text3.
WRITE AT 1 lc_text3.
SKIP.
ENDFORM. " BATCH-HEADING
FORM READ_T001
--> P_PAR_ZBUK
FORM read_t001 USING p_par_zbuk.
SELECT SINGLE * FROM t001 WHERE bukrs =
p_par_zbuk.
IF sy-subrc NE 0.
t001-butxt = space.
t001-ort01 = space.
ENDIF.
ENDFORM. "read_t001
Plz check that how can i use collect in it... -
Display ALV list output in PDF format
Hi All,
My requirement is :
I am displaying output using Function module 'REUSE_ALV_LIST_DISPLAY'. then i will click one button which placed in application tool bar say 'Download to PDF' when i click this button it will display the output in PDF format. I tried with exsting threads but i unable to get suitable solution.Anybody can send me the sample code please.
Thanks in advance.
Maheedharplease go throuh the below procedure and sample Code, this might help you.
Procedure
When we activate the Smartform the system generates a Function Module. The function module name we can get from Smartfrom screen from menubar
Environment => Function Module_Name . In a report we can get this Function module name by calling a Function Module standard SSF_FUNCTION_MODULE_NAME. This function module at runtime calls the FM generated by smartform, which in turn is then used to pass data from the report to Smartform. In the report given below the FM generated is /1BCDWB/SF00000152 . In this FM we can see CONTROL_PARAMETERS in import tab. This is of type SSFCTRLOP. We need to set the GETOTF of this to be X. Setting this field will activate the OTF field in smartform.
In export tab of the FM generated by smartform we can see a parameter JOB_OUTPUT_INFO which is of type SSFCRESCL. The SSFCRESCL is a structure of having one of fields as OTFDATA. OTFDATA in turn is a table of type ITCOO. ITCOO has two fields TDPRINTCOM and TDPRINTPAR. TDPRINTCOM represents command line of OTF format data and TDPRINTPAR contains command parameters of OTF format data.
In every Smartform output in OTF format, TDPRINTCOM begins and ends with //. EP represents the end-of-page value for TDPRINTCOM field.
In addition we need to set few fields at the place where we call this FM(generated by smartform) in our program. While calling this FM we should set control_parameters, output_options, user_settings and job_putput_info fields as shown in program.
Once these settings are done we can call Function Module CONVERT_OTF to convert the OTF data of smartfrom output to PDF data format. Once these are done we can call method cl_gui_fronted_services=>file_save_dialog to specify the directory path where we want to save the output PDF file. After this we can call Function Module GUI_DOWNLOAD to download the PDF file on our local system.
Here is a sample code of program to perform the function.
SAMPLE CODE
*& Report ZAMIT_SMART_FORM_PDF *
REPORT ZAMIT_SMART_FORM_PDF .
data: carr_id type sbook-carrid,
cparam type ssfctrlop,
outop type ssfcompop,
fm_name type rs38l_fnam.
DATA: tab_otf_data TYPE ssfcrescl,
pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE,
tab_otf_final TYPE itcoo OCCURS 0 WITH HEADER LINE,
file_size TYPE i,
bin_filesize TYPE i,
FILE_NAME type string,
File_path type string,
FULL_PATH type string.
parameter: p_custid type scustom-id default 1.
select-options: s_carrid for carr_id default 'LH' to 'LH'.
parameter: p_form type tdsfname default 'ZAMIT_SMART_FORM'.
data: customer type scustom,
bookings type ty_bookings,
connections type ty_connections.
start-of-selection.
suppressing the dialog box for print preview****************************
outop-tddest = 'LP01'.
cparam-no_dialog = 'X'.
cparam-preview = SPACE.
cparam-getotf = 'X'.
select single * from scustom into customer where id = p_custid.
check sy-subrc = 0.
select * from sbook into table bookings
where customid = p_custid
and carrid in s_carrid
order by primary key.
select * from spfli into table connections
for all entries in bookings
where carrid = bookings-carrid
and connid = bookings-connid
order by primary key.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting formname = p_form
variant = ' '
direct_call = ' '
importing fm_name = fm_name
exceptions no_form = 1
no_function_module = 2
others = 3.
if sy-subrc 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
exit.
endif.
calling the generated function module
call function fm_name
exporting
archive_index =
archive_parameters =
control_parameters = cparam
mail_appl_obj =
mail_recipient =
mail_sender =
output_options = outop
user_settings = SPACE
bookings = bookings
customer = customer
connections = connections
importing
document_output_info =
job_output_info = tab_otf_data
job_output_options =
exceptions formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
others = 5.
if sy-subrc 0.
error handling
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
tab_otf_final] = tab_otf_data-otfdata[.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
ARCHIVE_INDEX = ' '
COPYNUMBER = 0
ASCII_BIDI_VIS2LOG = ' '
IMPORTING
bin_filesize = bin_filesize
BIN_FILE =
TABLES
otf = tab_otf_final
lines = pdf_tab
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
OTHERS = 5
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
WINDOW_TITLE =
DEFAULT_EXTENSION =
DEFAULT_FILE_NAME =
FILE_FILTER =
INITIAL_DIRECTORY =
WITH_ENCODING =
PROMPT_ON_OVERWRITE = 'X'
CHANGING
filename = FILE_NAME
path = FILE_PATH
fullpath = FULL_PATH
USER_ACTION =
FILE_ENCODING =
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 3
others = 4
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
************downloading the converted PDF data to your local PC*******
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = bin_filesize
filename = FULL_PATH
filetype = 'BIN'
APPEND = ' '
WRITE_FIELD_SEPARATOR = ' '
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
IMPORTING
filelength = file_size
TABLES
data_tab = pdf_tab
FIELDNAMES =
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22
IF sy-subrc 0.
ENDIF.
Check this link it will help you.
https://forums.sdn.sap.com/click.jspa?searchID=5950895&messageID=2375150
Reward points if useful. -
Displaying selection screen details in Alv Report output display as Header
Hi all,
May be somebody knows how I can show selected values with select-options in top_of_page using REUSE_ALV_GRID_DISPLAY.
This shoud work for all the reports and diff selection screens .
I need one dynamic process which will for display any report selection screen selected details.(Basically varient information of report).
Small example if possible, please.
Thanks in advance,
RimasHi Thiru,
Thanks for the input.
This is my exact requirement.
Hi Experts,
I would like to Display / Print Select-options selected details in ALV Header.
Ex: Say suppose here i enter kunnr as 1000
lifnr as 2000 to 4000
p_langu as 'EN'.
p_dir as 'C:\TEMP,
p_upda as 'X'
for selection screen below.
SELECTION-SCREEN :BEGIN OF BLOCK blk1 WITH FRAME TITLE text-000.
SELECT-OPTIONS : s_kunnr FOR kna1-kunnr.
SELECT-OPTIONS : s_lifnr FOR lfa1-lifnr.
PARAMETER : p_lanuge LIKE t002-spras DEFAULT sy-langu.
PARAMETER: p_dir LIKE rlgrap-filename
DEFAULT text-003 LOWER CASE.
PARAMETERS: p_upd AS CHECKBOX DEFAULT 'X'.
I dont want to Hard code selection screen values like
DATA: header TYPE slis_t_listheader,
wa TYPE slis_listheader,
wa-typ = 'S'(093).
wa-key = s_lifnr .
wa-info = 'Vendor no".
APPEND wa TO header.
I want dynamic process for all of my selection screen values selected
hard code may be it will be fine small selection screen it will work.
Fur that i got one process to get dynamically through fm
Ex: DATA: irsparams TYPE rsparams OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
curr_report = program
TABLES
selection_table = irsparams
EXCEPTIONS
not_found = 1
no_report = 2
OTHERS = 3.
loop at irsparams.
write : / irsparams-SELNAME.
write : / irsparams-SIGN.
write : / irsparams-OPTION.
write : / irsparams-LOW.
write : / irsparams-HIGH.
endloop.
I have done my requirement partially but i am failed to achive my full requirement.
Because
rsparams strcture is diff from slis_t_listheader.
Can any one help me for further assistence to display irsparams strcture data in alv header.
Thanks
Nag -
How to display the header data on different position in alv report
hi all,
how to display the header data on different position in alv report.
for example ,
customer name
xxxx xxxx
vendor name street
xxxx xxxx xxxxx
pls help me .hi
as per my understanding you need to trnasfer header internal table data to pdf..
please check the following links for internal table to pdf..
Convertion of Internal table data to PDF
This link is related to ur issue
Re: how to insert the calling of the FM: OTF to PDF
Thanks -
How to restrict spool data in the next line in pdf print
Hi Experts,
i have spool data which is going to be print in PDF format.
if line is extented..thenit is prining the in the next line..
but that next line is not starting after one tab space.
so how to remove that space.
can anybody give me help.
Regards,
venkatHi,
output is displaying in pdf file in the give format..
ex:-
919 sub 00001 44445 testmater
ial final
here test material is not coming fully in the first line..it is cutting and displaying in 2 lines.
Regards,
venkat
Maybe you are looking for
-
How To check validity of XML File
can any one tell me how to find whether an XML file is valid or not before beginning to parse the XML file Thanks in advance
-
Run with user privileges but write to restricted folder
In Windows Server 2008 R2 (and in an Active Directory domain), the login and logoff scripts are run with user privileges. Suppose that I run script1.ps1, when user1 logs in; I need that script1.ps1 is associated to user1, because it will write some i
-
PHP Sendmail [SOLVED]
I am trying to use a PHP script to send mail with the PHP mail() function. Looking at phpinfo(), I see "/usr/sbin/sendmail -t -i" for the local and master values of sendmail_path. However, if I manually issue "/usr/sbin/sendmail -t -i" as root, I rec
-
Please help
-
I just cancelled an order today for an iphone 5 that was still not going to ship fornanother 4 weeks. I am just concerned att will try and charge something since i had chosen theirbservice when i made the order, but i figure how can they charge me an