Pagenumber display in report out put..
Hi all,
what are the system variables to dispay report output with <b>pagenumber / total number of pages</b>.
my output format is like <b>1/3 2/3 3/3</b>...
thanks and regards.
Rupa.
Please see the following example.
report zrich_0004
line-size 80
line-count 65
no standard page heading.
data: imara type table of mara with header line.
selection-screen begin of block b1 with frame title text-001 .
parameters: p_check type c.
selection-screen end of block b1.
start-of-selection.
perform get_data.
perform write_report.
top-of-page.
perform top_of_page.
* FORM GET_DATA
form get_data.
select * into corresponding fields of table imara
from mara up to 300 rows.
endform.
* FORM WRITE_REPORT
form write_report.
data: xpage(4) type c.
loop at imara.
write:/ imara-matnr.
endloop.
write sy-pagno to xpage left-justified.
do sy-pagno times.
read line 1 of page sy-index.
replace '****' with xpage into sy-lisel.
modify current line.
enddo.
endform.
* Form top_of_page
form top_of_page.
write:/32 'Test Program',
at 62 'Page:', at 67 sy-pagno, 'of', '****'.
endform.
Regards,
Rich Heilman
Similar Messages
-
In reports, i want to display currency field out put with diff currencies
Hi all
in reports, i want to display currency field out put with different type of currencies like 1st record in rupees 2nd record in dolors 3rd record in
Euros. for this i should not use any tables and any currency fields and any functional modules. pls give replay urgently.Hi swamy,
so sorry, but you have to use some of the objects you do not want to:
Currency values in ABAP are stored in currency fields (type CURR). If they are stored in structures or database, every CURR field must be connected to a CUKY field (currency key).
Displaying data using WRITE statement four output on a list is obsolete technique, you may use the use WRITE with the option CURRENCY c to format according to currency c in table TCURX.
SAP recommends to use ALV technique. If you use ALV to display structure data, then create a dictionary structure with currency value and currency key. The rest goes automatically.
Believe me: It is much easier and more reliable.
Regards,
Clemens -
Downloading the report out put for wchich split conatiner is used
hi friends i used split container for my report out put .here iam displaying two alvs in the two parts of the conainer.
i put some heading on the container in one box, is it possible to download all the out put into one excel file.Hi sudheer ,
There is no standart functionality for this. You need to code for your custom excel output. -
Getting report out put in another language (other than english).
Hi all,
can any one help me out in getting report out put in proper language (english).
actually i am running my layout through wizard.it show in english at report level but when i publish with oracle application it showing the out in another fassion.
please kindly help me out in this issue.In the language preference panel of the system preferences?
LN -
How to Save Background job report out put in local / Network Drive?
Hello Techies,
How to Save Background job report out put in local / Network Drive.
Actually we have option to send mail aftr complete but i need to save in local drive or network drive .Hi ,
Background job runs in application server , and your local /network drive is basically presentation server. So you cant save it in local /network drive from the job itself. But to download files, you can write the files to the application server using DATASET, in the background and then use the transaction CG3Y in the foreground to download the file. -
Report Out put by Push Button ???
Hi SAP-ABAP Experts .
Boss Please suggest me that i have to create a Screen in which only one Push Buton ,
As user Click this Push Button , a report should run and give it's output , the point is how selection screen will get a
perticular input when user will click this Push Button .
How to do this Boss .?
For Ex : program's Selection Screen has two input parameters
A = 5
B = 4
output of the report : C = 10 .
Requirement is when user click Puch Button , it will get out put C = 10 .
My Best Regards : rajneesh .Hi,
Use Module pool program for this.
SAP ABAP Tutorial: Module Pool Programming. Part 2
Once the program 'ZSALESORDSCREEN' is created Saved and Activated, run Transaction SE51.
Enter screen number '9000'
Screen numbers can be up to 4 characters long, all of which must be digits. Screen numbers from 9000 are reserved for customer-specific screens.
In the Screen Painter enter a short Description and Activate the screen.
Once this is done you will be presented with a screen that will have three tabs, namely Attributes/Element List/Flow Logic
Click on Element List and type Ok_Code and Activate.
Now click on Flow Logic.
You should see the following code in the Flow Logic.
PROCESS BEFORE OUTPUT.
MODULE STATUS_9000.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_9000.
Create MODULE STATUS_9000 by double clicking on it. The following code will be automatically created.
INCLUDE ZSALESORDERTOP . "
INCLUDE ZSALESORDERO01 . *
INCLUDE ZSALESORDERI01 . *
INCLUDE ZSALESORDERF01 . *
*& Module STATUS_9000 OUTPUT
text
MODULE STATUS_9000 OUTPUT.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_9000 OUTPUT
Uncomment the following code.
SET PF-STATUS 'ZSALES'. -
Menu Bar for the custom Sales Order Screen.
SET TITLEBAR 'ZSL'. -
Title.
Give appropriate names to PF-STATUS and TITLE BAR. Once the code is uncommented and the appropriate names are given. Double click on the name ZSALES. Once you see the prompt click on create object.
You will see the following three options in the resulting screen.
Menu bar Status for Sales Order Screen
Application toolbar Status for Sales Order Screen
Function keys Status for Sales Order Screen
Click on the Function Keys Drop Down Box. You will see the Standard Tool Bar with Icons that you normally see in the SAP Screen.
Enter the following values in the empty fields.
Standard Toolbar
Ente SAVE BACK EXIT CANCEL PRINT FIND FINDNEXT FIRSTPAGE PREVP NEXT LAST
Activate the PF-STATUS.
You will be prompted to enter the Function Text and Info Text for the button Enter.
Please enter the following values.
Function Text 'Ente'
Info Text 'Enter'
Execute Transaction SE80 and Activate the complete program by right clicking on it.
We will now create a transaction code for our program. To create a transaction code right click on the main program and from the pop-up menu select Create-----Transaction.
In the dialog box enter the following values.
Transaction Code 'ZSALESORD'
Short Description 'Create Sales Order'
And Click on Save.
You will now be asked to enter Program name and Screen Number. Enter the following values.
Program ZSALESORDSCREEN
Screen 9000
Save and Activate the Program
Now we need to enter code to create the Sales order. We also need to create the Screen Elements.
In transaction SE80 in the left pane click on Screens and then double click on 9000.
Now from the menu click on LAYOUT button.
We need to create Labels and Text Boxes for the following fields.
Filed (Label Display) Label Name TextBox Name Def Length
Order Type lblordtyp txtordtyp 2
Sales Org lblsalesorg txtsalesorg 4
Distribution Channel lbldistchnl txtdistchnl 2
Division lbldiv txtdiv 2
Sold-to Party lblsoldto txtsoldto 10
Ship-to Party lblshipto txtshipto 10
Purchase Ord lblpurchord txtpurchord 10
Material lblmat txtmat 18
Quantity lblqty txtqty 13
We also need to create a command button as follows
Label Name
Create Order lblcreateord
We will now look at the property box which is displayed after double clicking on each screen element.
Order Type (Label)
Name lblordtyp
Text Order_Type
Order Type (Text Box)
Name txtordtyp
Text
Def. Length 2
Similarly fill the Property box for other fileds
Important
Property Box for Command Button in this case the Function Code is important
Create Order
Name cmdord
Text Create Order
Fct Code ORDE -
Hi,
Please help me in this requirement.
Is there any option to get the out put of report 6i out put to excel format file.Its not possible to export data directly from 6i to excel but you can export in text file and then open it in excel it will open very easily but keep it in you mind first eliminate all report groups.
and
There is a trick to capture Oracle Reports output (text output) into a excel sheet.
Basic Steps :
1) Set the output format for the report to XML
2) Run the report to generate output.
3) Save the output file locally as a XML file.
4) Open the file using MS Excel.
5) To make it more beautiful, you may use a MS Excel Template
and read below may be this will be helpful to u
http://kr.forums.oracle.com/forums/thread.jspa?threadID=853876
Reports 6i Matrix Output in Excel Format -
am trying to generate delimited format report on command prompt.
out put is to huge and it gives error . To over come this when I turned page break to yes the report will be generated successfully but the out put number of rows are being doubled.
suppose initially I am getting 100 rows , With page break set to yes the out put in
report csv format will be 200Its not possible to export data directly from 6i to excel but you can export in text file and then open it in excel it will open very easily but keep it in you mind first eliminate all report groups.
and
There is a trick to capture Oracle Reports output (text output) into a excel sheet.
Basic Steps :
1) Set the output format for the report to XML
2) Run the report to generate output.
3) Save the output file locally as a XML file.
4) Open the file using MS Excel.
5) To make it more beautiful, you may use a MS Excel Template
and read below may be this will be helpful to u
http://kr.forums.oracle.com/forums/thread.jspa?threadID=853876
Reports 6i Matrix Output in Excel Format -
Hi All
I want the out put of a report in DOC file so that user can make changes in that report and then can print. this one is the requirement. but using a reports 9i the out put can be in PDF and HTML file. is this one possible that i can get the out put in DOC file. if yes can any one give me a hint how i can implement.
Thanks in Advancethanks its working. but when i am trying to open RTF file every time it appear a dialog box where i have to mention the target that i want to open in MS WORD or note pad. etc. may be because when i am using the command
WEBS('/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)|| '?'||'server='|| :global.reportserver ,'_blank');
there is no extension. so it ask me every time. so how i have to fix this that if mention my Report Destination Format to RTF is should be opened in MS Word.
Thanks -
Check bix in the list (report out put)
I have a field GW_FINAL-DECISION of char1 in an internal table.
After executing the selection screen the data from internal table is displayed on the list.
WRITE : GW_FINAL-DECISION AS CHECKBOX.
when I select the check box from the list, the value of the internal table is to be saved as 'X'.
please help me in this regard ASAP.Hi,
I think its better if you use ALV to display the report output and you can handle the check box issue with user_command subroutine of Reuse_alv_grid_display function module. Its simplest approach to solve such problems.
Cheers
Phani. -
Runtime error alv list report out put
Runtime Errors GETWA_NOT_ASSIGNED
Date and Time 03.03.2014 13:11:56
Short text
Field symbol has not yet been assigned.
What happened?
Error in the ABAP Application Program
The current ABAP program "SAPLKKBL" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
What can you do?
Note down which actions and inputs caused the error.
To process the problem further, contact you SAP system
administrator.
Using Transaction ST22 for ABAP Dump Analysis, you can look
at and manage termination messages, and you can also
keep them for a long time.
Error analysis
You attempted to access an unassigned field symbol
(data segment 93).
This error may occur if
- You address a typed field symbol before it has been set with
ASSIGN
- You address a field symbol that pointed to the line of an
internal table that was deleted
- You address a field symbol that was previously reset using
UNASSIGN or that pointed to a local field that no
longer exists
- You address a global function interface, although the
respective function module is not active - that is, is
not in the list of active calls. The list of active calls
can be taken from this short dump.
to correct the error
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"GETWA_NOT_ASSIGNED" " "
"SAPLKKBL" or "LKKBLF99"
"GEN_FIELD_OUT2"
If you cannot solve the problem yourself and want to send an error
(data segment 93).
This error may occur if
- You address a typed field symbol before it has been set with
ASSIGN
- You address a field symbol that pointed to the line of an
internal table that was deleted
- You address a field symbol that was previously reset using
UNASSIGN or that pointed to a local field that no
longer exists
- You address a global function interface, although the
respective function module is not active - that is, is
not in the list of active calls. The list of active calls
can be taken from this short dump.
to correct the error
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"GETWA_NOT_ASSIGNED" " "
"SAPLKKBL" or "LKKBLF99"
"GEN_FIELD_OUT2"
If you cannot solve the problem yourself and want to send an error
Operating system..... "HP-UX"
Release.............. "B.11.23"
Hardware type........ "ia64"
Character length.... 16 Bits
Pointer length....... 64 Bits
Work process number.. 1
Shortdump setting.... "full"
Database server... "CFLDEV01"
Database type..... "ORACLE"
Database name..... "CD1"
Database user ID.. "SAPSR3"
Terminal.......... "CFINWL0115"
Char.set.... "C"
SAP kernel....... 701
created (date)... "Apr 2 2011 01:40:22"
create on........ "HP-UX B.11.23 U ia64"
Database version. "OCI_102 (10.2.0.4.0) "
Patch level. 137
Patch text.. " "
Database............. "ORACLE 10.1.0.*.*, ORACLE 10.2.0.*.*, ORACLE 11.2.*.*.*"
SAP database version. 701
Operating system..... "HP-UX B.11"
Memory consumption
Roll.... 16192
EM...... 20949200
Heap.... 0
Page.... 122880
MM Used. 3677872
MM Free. 509344
User and Transaction
Client.............. 200
User................ "GUEST"
Language key........ "E"
Transaction......... "SE38 "
Transactions ID..... "5311AF68E99111BDE1000000C009C834"
Program............. "SAPLKKBL"
Screen.............. "SAPLKKBL 0500"
Screen line......... 3
Information on where terminated
Termination occurred in the ABAP program "SAPLKKBL" - in "GEN_FIELD_OUT2".
The main program was "ZTEST_11 ".
In the source code you have the termination point in line 2844
of the (Include) program "LKKBLF99".
Source Code Extract
Line SourceCde
2814 gs_sfc97 = gs_out_fieldcat.
2815 when 98.
2816 assign component gs_out_fieldcat-fieldname
2817 of structure t_outtab_slave to <fs98>.
2818 gs_sfc98 = gs_out_fieldcat.
2819 when 99.
2820 assign component gs_out_fieldcat-fieldname
2821 of structure t_outtab_slave to <fs99>.
2822 gs_sfc99 = gs_out_fieldcat.
2823 endcase.
2824 endform. "field_assign_hier_slave
2825 *---------------------------------------------------------------------*
2826 * FORM GEN_FIELD_OUT2 *
2827 *---------------------------------------------------------------------*
2828 * ........ *
2829 *---------------------------------------------------------------------*
2830 form gen_field_out2.
2831 field-symbols <l_initial>.
2832
2833 case gs_out-field_colcount.
2834 when 001.
2835 if gs_out_flags-slave ne 'X'.
2836 assign <fm01> to <field>.
2837 gs_fc = gs_mfc01.
2838 else.
2839 assign <fs01> to <field>.
2840 gs_fc = gs_sfc01.
2841 endif.
2842 when 002.
2843 if gs_out_flags-slave ne 'X'.
>>>>> assign <fm02> to <field>.
2845 gs_fc = gs_mfc02.
2846 else.
2847 assign <fs02> to <field>.
2848 gs_fc = gs_sfc02.
2849 endif.
2850 when 003.
2851 if gs_out_flags-slave ne 'X'.
2852 assign <fm03> to <field>.
2853 gs_fc = gs_mfc03.
2854 else.
2855 assign <fs03> to <field>.
2856 gs_fc = gs_sfc03.
2857 endif.
2858 when 004.
2859 if gs_out_flags-slave ne 'X'.
2860 assign <fm04> to <field>.
2861 gs_fc = gs_mfc04.
2862 else.
2863 assign <fs04> to <field>.
Contents of system fields
Name Val.
Name Val.
SY-SUBRC 4
SY-INDEX 2
SY-TABIX 0
SY-DBCNT 1
SY-FDPOS 80
SY-LSIND 0
SY-PAGNO 1
SY-LINNO 4
SY-COLNO 13
SY-PFKEY STANDARD
SY-UCOMM
SY-TITLE Sales nformation
SY-MSGTY I
SY-MSGID SF
SY-MSGNO 616
SY-MSGV1 ZTEST_11
SY-MSGV2 RE
SY-MSGV3 EN
SY-MSGV4
SY-MODNO 0
SY-DATUM 20140303
SY-UZEIT 131156
SY-XPROG SAPCNVE
SY-XFORM CONVERSION_EXIT
Active Calls/Events
No. Ty. Program Include Line
Name
10 FORM SAPLKKBL LKKBLF99 2844
GEN_FIELD_OUT2
9 FORM SAPLKKBL LKKBLF99 797
GEN_LINE_OUT
8 FORM SAPLKKBL LKKBLF98 1359
DATA_OUT_SIMPLE
7 FORM SAPLKKBL LKKBLF01 457
LIST_OUTPUT_NEW
6 FORM SAPLKKBL LKKBLF01 6205
FIRST_LIST_DISPLAY
5 MODULE (PBO) SAPLKKBL LKKBLO01 11
LIST_DISPLAY
4 FUNCTION SAPLKKBL LKKBLU01 441
K_KKB_LIST_DISPLAY
3 FUNCTION SAPLSALV LSALVU07 504
REUSE_ALV_LIST_DISPLAY
2 FORM ZTEST_11 ZTEST_11 181
DISPLAY
1 EVENT ZTEST_11 ZTEST_11 103
START-OF-SELECTION
Chosen variables
Name
Val.
10 Ty. FORM
e GEN_FIELD_OUT2
SFC22
0000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000
0000222222222222222222222222222222222222222222222222222
0000000000000000000000000000000000000000000000000000000
OUT-FIELD_COLCOUNT
2
0000
0002
UMMY$$
0000
0000
2222
0000
REPID
SAPLKKBL
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
5454444422222222222222222222222222222222
310CBB2C00000000000000000000000000000000
OUT_FLAGS-SLAVE
0
0
2
0
PACE
0
0
2
0
FM01>
0000
0000
2222
0000
FIELD>
0000
0000
2222
0000
S_FC
####BSARK 1
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000454542222222222222222222222222322222222222222222222222222222222222222222222222222222222222
01012312B0000000000000000000000000100000000000000000000000000000000000000000000000000000000000
S_MFC01
####BSARK 1
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000this is a report n im getiing runtime error Runtime Errors GETWA_NOT_ASSIGNED give the solution
TABLES : VBAK , VBAP , KNA1.
TYPE-POOLS : SLIS.
TYPES : BEGIN OF TY_VBAP,
matnr type matnr,
vbeln type vbeln, " order no
ARKTX type ARKTX, "item name
KWMENG type KWMENG, " order qua.
audat type audat, " SD document item date (incoming or outgoing date)
posnr type posnr,
END OF TY_VBAP.
TYPES : BEGIN OF TY_KNA1,
NAME1 TYPE NAME1,
* KUNNR TYPE KUNNR,
END OF TY_KNA1.
TYPES : BEGIN OF TY_VBAK,
VTWEG type VTWEG, " Distribution Channel
BSARK type BSARK, "Customer purchase order type
END OF TY_VBAK.
TYPES : BEGIN OF TY_FINAL,
matnr type VBAP-matnr,
vbeln type VBAP-vbeln, " order no
ARKTX type VBAP-ARKTX, "item name
KWMENG type VBAP-KWMENG, " order qua.
audat type VBAP-audat, " SD document item date (incoming or outgoing date)
posnr type VBAP-posnr,
VTWEG type VBAK-VTWEG, " Distribution Channel
BSARK type VBAK-BSARK, "Customer purchase order type
NAME1 TYPE KNA1-NAME1,
* KUNNR TYPE KNA1-KUNNR,
END OF TY_FINAL.
DATA : IT_VBAP TYPE TABLE OF TY_VBAP,
IT_VBAK TYPE TABLE OF TY_VBAK,
IT_KNA1 TYPE TABLE OF TY_KNA1,
IT_FINAL1 TYPE TABLE OF TY_FINAL,
IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
DATA : WA_VBAP LIKE LINE OF IT_VBAP,
WA_VBAK LIKE LINE OF IT_VBAK,
WA_KNA1 LIKE LINE OF IT_KNA1,
WA_FINAL LIKE LINE OF IT_FINAL1,
WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
INITIALIZATION.
SELECTION-SCREEN BEGIN OF BLOCK BL WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS :
SO_NO FOR VBAP-VBELN,
M_NO FOR VBAP-MATNR,
SO_DATE FOR VBAP-AUDAT OBLIGATORY.
SELECTION-SCREEN END OF BLOCK BL.
START-OF-SELECTION.
SELECT VBELN MATNR AUDAT ARKTX KWMENG POSNR
FROM VBAP INTO CORRESPONDING FIELDS OF TABLE IT_FINAL1 WHERE VBELN IN SO_NO
AND MATNR IN M_NO
AND AUDAT IN SO_DATE.
SELECT NAME1 FROM KNA1 INTO CORRESPONDING FIELDS OF TABLE IT_FINAL1 .
LOOP AT IT_FINAL1 INTO WA_FINAL.
SELECT SINGLE name1 FROM kna1 INTO WA_FINAL-name1 WHERE KUNNR = WA_FINAL-name1.
MODIFY IT_FINAL1 FROM WA_FINAL TRANSPORTING NAME1.
ENDLOOP.
SELECT VTWEG BSARK FROM VBAK INTO CORRESPONDING FIELDS OF TABLE IT_FINAL1.
* SELECT VTWEG BSARK FROM VBAK INTO CORRESPONDING FIELDS OF TABLE IT_VBAK
* FOR ALL ENTRIES IN IT_FINAL1
* WHERE VTWEG = IT_FINAL1-VTWEG
* AND BSARK = IT_FINAL1-BSARK.
LOOP AT IT_FINAL1 INTO WA_FINAL.
READ TABLE IT_VBAK INTO WA_VBAK WITH KEY VTWEG = WA_FINAL-VTWEG.
READ TABLE IT_VBAK INTO WA_VBAK WITH KEY BSARK = WA_FINAL-BSARK.
IF SY-SUBRC EQ 0.
WA_FINAL-VTWEG = WA_VBAK-VTWEG.
WA_FINAL-BSARK = WA_VBAK-BSARK.
ENDIF.
MODIFY IT_FINAL1 FROM WA_FINAL TRANSPORTING VTWEG BSARK.
ENDLOOP.
PERFORM BUILD.
PERFORM DISPLAY.
*& Form BUILD
* text
* --> p1 text
* <-- p2 text
form BUILD .
*CLEAR WA_FIELDCAT.
WA_FIELDCAT-COL_POS = '1'.
WA_FIELDCAT-FIELDNAME = 'BSARK'.
WA_FIELDCAT-SELTEXT_L = 'Order type'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-COL_POS = '2'.
WA_FIELDCAT-FIELDNAME = 'AUFNR'.
WA_FIELDCAT-SELTEXT_L = 'Order number'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-COL_POS = '3'.
WA_FIELDCAT-FIELDNAME = 'POSNR'.
WA_FIELDCAT-SELTEXT_L = 'Line No.'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-COL_POS = '4'.
WA_FIELDCAT-FIELDNAME = 'VTWEG'.
WA_FIELDCAT-SELTEXT_L = 'Dis Channel'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-COL_POS = '5'.
WA_FIELDCAT-FIELDNAME = 'audat'.
WA_FIELDCAT-SELTEXT_L = 'Order Date'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-COL_POS = '6'.
WA_FIELDCAT-FIELDNAME = 'audat'.
WA_FIELDCAT-SELTEXT_L = 'delivey date'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-COL_POS = '7'.
WA_FIELDCAT-FIELDNAME = 'name1'.
WA_FIELDCAT-SELTEXT_L = 'Name'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-COL_POS = '8'.
WA_FIELDCAT-FIELDNAME = 'ARKTX'.
WA_FIELDCAT-SELTEXT_L = 'Iem Name'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-COL_POS = '9'.
WA_FIELDCAT-FIELDNAME = 'KWMENG'.
WA_FIELDCAT-SELTEXT_L = 'Order quantitye'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
endform. " BUILD
*& Form DISPLAY
* text
* --> p1 text
* <-- p2 text
form DISPLAY .
CALL FUNCTION 'REUSE_ALV_LIST_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_STRUCTURE_NAME =
* IS_LAYOUT =
IT_FIELDCAT = IT_FIELDCAT[]
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
* IT_SORT =
* IT_FILTER =
* IS_SEL_HIDE =
* I_DEFAULT = 'X'
* I_SAVE = ' '
* 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
* IR_SALV_LIST_ADAPTER =
* IT_EXCEPT_QINFO =
* I_SUPPRESS_EMPTY_DATA = ABAP_FALSE
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = IT_FINAL1.
* 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 -
How convert a report out put to pdf and sending it via an email
Hi all,
i have convert the sap list or report output to a pdf file then i have to send it via an email that is given in the selection screen. if anyone knows the solutions for this please make it soon. i will be very thankful.
Thanks & Regards,
Poornagenerate spool request of ur report output and execute the standard program RSTXPDFT4 with tht spool reuest.it will download it in PDF format on ur PC and to send it via mail as attachment ,just copy this below code -
*& Report ZGILL_SENDMAIL_PDF *
REPORT ZGILL_SENDMAIL_PDF .
INCLUDE ZGILL_INCMAIL. "SEE BELOW FOR INCLUDE PROGRAM CODE.
DATA
DATA : itab LIKE tline OCCURS 0 WITH HEADER LINE.
DATA : file_name TYPE string.
data : path like PCFILE-PATH.
data : extension(5) type c.
data : name(100) type c.
SELECTION SCREEN
PARAMETERS : receiver TYPE somlreci1-receiver lower case DEFAULT '[email protected]'.
PARAMETERS : p_file LIKE rlgrap-filename
OBLIGATORY DEFAULT 'C:\TEMP\SALARY_SLIP1.PDF'.
AT SELECTION SCREEN
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CLEAR p_file.
CALL FUNCTION 'F4_FILENAME'
IMPORTING
file_name = p_file.
START-OF-SELECTION
START-OF-SELECTION.
PERFORM ml_customize USING 'Tst' 'Testing'.
PERFORM ml_addrecp USING receiver 'U'.
PERFORM upl.
PERFORM doconv TABLES itab objbin.
PERFORM ml_prepare USING 'X' extension name.
PERFORM ml_dosend.
SUBMIT rsconn01
WITH mode EQ 'INT'
AND RETURN.
FORM
FORM upl.
file_name = p_file.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = file_name
filetype = 'BIN'
TABLES
data_tab = itab
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
path = file_name.
CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
EXPORTING
complete_filename = path
CHECK_DOS_FORMAT =
IMPORTING
DRIVE =
EXTENSION = extension
NAME = name
NAME_WITH_EXT =
PATH =
EXCEPTIONS
INVALID_DRIVE = 1
INVALID_EXTENSION = 2
INVALID_NAME = 3
INVALID_PATH = 4
OTHERS = 5
ENDFORM. "upl
*********************iNCLUDE pROGRAM********************************************
*& Include ZGILL_INCMAIL *
Data
DATA: docdata LIKE sodocchgi1,
objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE,
objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE,
objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objhex LIKE solix OCCURS 10 WITH HEADER LINE,
reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
DATA: tab_lines TYPE i,
doc_size TYPE i,
att_type LIKE soodk-objtp.
DATA: listobject LIKE abaplist OCCURS 1 WITH HEADER LINE.
FORM
FORM ml_customize USING objname objdesc.
Clear Variables
CLEAR docdata.
REFRESH objpack.
CLEAR objpack.
REFRESH objhead.
REFRESH objtxt.
CLEAR objtxt.
REFRESH objbin.
CLEAR objbin.
REFRESH objhex.
CLEAR objhex.
REFRESH reclist.
CLEAR reclist.
REFRESH listobject.
CLEAR listobject.
CLEAR tab_lines.
CLEAR doc_size.
CLEAR att_type.
Set Variables
docdata-obj_name = objname.
docdata-obj_descr = objdesc.
ENDFORM. "ml_customize
FORM
FORM ml_addrecp USING preceiver prec_type.
CLEAR reclist.
reclist-receiver = preceiver.
reclist-rec_type = prec_type.
APPEND reclist.
ENDFORM. "ml_customize
FORM
FORM ml_addtxt USING ptxt.
CLEAR objtxt.
objtxt = ptxt.
APPEND objtxt.
ENDFORM. "ml_customize
FORM
FORM ml_prepare USING bypassmemory whatatt_type whatname.
IF bypassmemory = ''.
Fetch List From Memory
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = listobject
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
MESSAGE ID '61' TYPE 'E' NUMBER '731'
WITH 'LIST_FROM_MEMORY'.
ENDIF.
CALL FUNCTION 'TABLE_COMPRESS'
IMPORTING
COMPRESSED_SIZE =
TABLES
in = listobject
out = objbin
EXCEPTIONS
OTHERS = 1
IF sy-subrc <> 0.
MESSAGE ID '61' TYPE 'E' NUMBER '731'
WITH 'TABLE_COMPRESS'.
ENDIF.
ENDIF.
Header Data
Already Done Thru FM
Main Text
Already Done Thru FM
Packing Info For Text Data
DESCRIBE TABLE objtxt LINES tab_lines.
READ TABLE objtxt INDEX tab_lines.
docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
CLEAR objpack-transf_bin.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'TXT'.
APPEND objpack.
Packing Info Attachment
att_type = whatatt_type..
DESCRIBE TABLE objbin LINES tab_lines.
READ TABLE objbin INDEX tab_lines.
objpack-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objbin ).
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = att_type.
objpack-obj_name = 'ATTACHMENT'.
objpack-obj_descr = whatname.
APPEND objpack.
Receiver List
Already done thru fm
ENDFORM. "ml_prepare
FORM
FORM ml_dosend.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = docdata
put_in_outbox = 'X'
commit_work = 'X' "used from rel. 6.10
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
TABLES
packing_list = objpack
object_header = objhead
contents_bin = objbin
contents_txt = objtxt
CONTENTS_HEX = objhex
OBJECT_PARA =
object_parb =
receivers = reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8
IF sy-subrc <> 0.
MESSAGE ID 'SO' TYPE 'S' NUMBER '023'
WITH docdata-obj_name.
ENDIF.
ENDFORM. "ml_customize
FORM
FORM ml_spooltopdf USING whatspoolid.
DATA : pdf LIKE tline OCCURS 0 WITH HEADER LINE.
Call Function
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = whatspoolid
TABLES
pdf = pdf
EXCEPTIONS
err_no_otf_spooljob = 1
OTHERS = 12.
Convert
PERFORM doconv TABLES pdf objbin.
ENDFORM. "ml_spooltopdf
FORM
FORM doconv TABLES
mypdf STRUCTURE tline
outbin STRUCTURE solisti1.
Data
DATA : pos TYPE i.
DATA : len TYPE i.
Loop And Put Data
LOOP AT mypdf.
pos = 255 - len.
IF pos > 134. "length of pdf_table
pos = 134.
ENDIF.
outbin+len = mypdf(pos).
len = len + pos.
IF len = 255. "length of out (contents_bin)
APPEND outbin.
CLEAR: outbin, len.
IF pos < 134.
outbin = mypdf+pos.
len = 134 - pos.
ENDIF.
ENDIF.
ENDLOOP.
IF len > 0.
APPEND outbin.
ENDIF.
ENDFORM. "doconv
**********************INCLUDE END******************************** -
Hi,
I included a PO Number in Query designer and executed the report it gives an error as " PO_Number" has hexadecimal and invalid characters.
when i execute the query after removing the 'PO_Number" from the query designer and execute its working fine with out any issues.
the report is Build on DSO.
In DSO when i observed "PO_Number" has special characters.
.Please help on this .How to avoid this error.Don't try to restrict special character in report it's not recommendable. Some times special Characters come to DSO it's not gives any error. But when you are loading data from DSO--> Cube or executing report which develops on DSO it's gives Error.
Regards,
Sushant -
Xml report out put is not getting
Dear all
here i am calling the xml reports from oaf page the output is not displayed
how can we achieve this.
Regards
SreekanthHi Hussein,
Thank you for your valuable response.
I have followed the same steps for this customization what they are given in the metalink ID 374165.1.
And one more thing, I am not getting any output if i ran the standard program 'Printed Purchase Order Report (Portrait)' in R12. what it could be the problem.
Regards,
Thirupathi -
Report out put Showing # Simbel
Hi,
COPA Line Item Detail Reportt is
providing incomplete information. When there should be a description, it
is showing "#".
Please help me.
Thanks,Hi,
First check whether you master data text has been loaded properly in the master data of the infoobject .
First check in the business explorer tab, under general settings, what you have maintained in the Display property. It should not be 'key' alone . Other wise in your report text will not be displayed .
Secondly check whether you are maintaining short text , medium text or long text .
Then check whether in query designer whether you are displaying short , medium or long text .
sometimes it happens that we have loaded medium text and displaying short text .
hope the above reply was helpful.
Thanks & Regards,
Ashutosh Singh
Maybe you are looking for
-
I have a few questions regarding the xdoxslt functions in RTF template making. I've been using the Report Designer's Guide here: http://docs.oracle.com/cd/E10415_01/doc/bi.1013/e12187/T421739T481158.htm It says <?variable:name?> declares local or glo
-
I'm looking for an app to catalog contacts I am making.
I'm looking for an app to catalog contacts I am making. I would like to snap a picture of a product or idea and then log it into an app to which I could add notes about that product as well as be able to attach contact information for this product or
-
How do I convert my exsisting nitro files to adobe ?
how do I convert my exsisting nitro files to adobe ?
-
The web pages do not completely fill the screen at the top of my computer screen as I can see the top of my desk top page. It is opaque but still visible. I would like to have the entire screen (the bookmarks still visible along the side, of course)
-
Hello all, For some reason my old user info was not working so I had to create a new account. I just picked up one of the new Western Digital 250gig notebook drives that many retailers are selling as compatible with the G3 powerbooks (including even