Csv report out put problem
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 200
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
Similar Messages
-
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 -
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. -
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. -
XML PUBLISHER report in Excel out put problem
Hi Experts,
I have developed one XML report which output type is EXCEL in Oracle Application.
I am getting some -ve value in the report so I need to do the trailing sign
Menace for example I got a value -8645 I need to display the value like (8645).
This functionality is working in PDF output but in EXCEL out put it is not working.
Could any body please help me on this..
Its Urgent .
Thanks in Advance.Check this metalink notes, did you got any error..?
Note: 364547.1 - Troubleshooting Oracle XML Publisher For The Oracle E-Business Suite
https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=364547.1
Note: 359875.1 - Cannot View Xml Publisher Report Output In Excel Format
Note: 358296.1 - How To Produce Requests In Formats Of HTML, RTF, and Excel From XML Publisher
Note: 850685.1 - Wrong Output Format In Xml Publisher Output
Note: 727031.1 - XML Publisher Requests Always Get Defaulted to Output Format as PDF Whatever the Template Type is Set To
Note: 337343.1 - Unable to View Excel Output File Created by XML Publisher
Note: 401328.1 - Default Layout Format for XML Publisher Concurrent Request Is Always PDF
Re: XML Publisher Server on EBS 11.5.10.2 -
Hi:
I used 10g forms and reports for my application. When I run a report .rdf file in form used
web.show_document(v_parameter_string ,'_blank');
build in function, the v_parameter_string include all parameter for server and application.
Everything is ok and the report file appears in the browser window. But maybe the size of each row is too long, the words in the report body with font size =1 -- the smallest size of letter. So the color of words in report body part is dark gray but the title part is normal black color (words' font size is 2 or upper). This make I looking at report body very difficult in web browser. When I print the report from browser, the print out paper is good and no color different between body and title part.
Do some people know why this gray color issue happened and how to fix it making the black color words appear in the report body.
Thanks.
LWUHi Madhu,
Yes, I did but out put is not coming.
Regards,
Pradeep Krishnamurthy -
Out put problem in Ad hoc query reports
Hi Gurus,
I am tryting to generate a report through Ad hoc query in S_PH0_48000510 - Ad Hoc Query SAP/Query/HR_ADM - > Selected several options like personnel number / employee name / entry date / leaving date.
But when we select it shows the input details but when i try for output the entry date / leaving date even the names of the employees are not reflecting.
But the age/date of birth other fields are coming in output.
Kindly let me know the solution to get a out put. If there is any changes need to be done in the back end. Pls advice with the path details.
Thanks & Regards,
Pradeep KrishnamurthyHi Madhu,
Yes, I did but out put is not coming.
Regards,
Pradeep Krishnamurthy -
Hi ,related to CSV files out put.
hi all,
I am taking out put in ALV and .CSV format (in unix path ) .
And the ALV out put is fine.
In one of the material description the text is like this :
my name is (Activ.Foil+S,sr)
so for description in CSV it is taking like this : my name is (Activ.Foil+S
and for the next field the remaining text is going
i.e , for material group it is getting : sr)
and all the values are shifted by one field.
so the BW team facing the problem while extracting data ,
can any one please help me out how to solve this probelm.
Thanks and Regards.
C.Shamsundher.Hi Prem,
In such case you need to change the delimitter or else remove the comma from Material description once you retrieve data from database into internal table.
REPLACE ALL OCCURRENCES OF ',' in WA_TAB-DESC with ' '.
Then move the material descritpion to the CSV file.
Best regards,
Prashant -
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 -
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 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 -
hi gurus,
I have a problem when creating billing out put automatically. through condition technique . I did it when am looking into vf02 it is not coming automatically. when am giving manually it is accepting. when i saved that out put type it is saving and green singl is coming. But it is not coming automatically. Even though i maintained conditon records in vv31. still am getting this prob. in procedure. am having conditon type that
conditon type i assigned i proce.
If any one know this please help.me . he will get maximum rewards from this query.Hi Nag,
I.Once again check assignments with repect to billing type.
2.Check the communication tab in VV32 are you maintaining all parameters or not,check the storage field it should be filled with print,check medium also.
I hope it will help you
Regards,
Murali. -
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
Maybe you are looking for
-
How to use my iphone internet connection on my laptop
How to use my apple iphone internet connection on my laptop
-
Anyone know how to remove a stubborn alignment guide
I'm working in a Page Layout document. There is an alignment guide on the 2nd page. I cannot get rid of it! I cannot move it. I can't "select" it. I can delete the page and insert another page, from the Insert Menu, but it shows up again. It must hav
-
Applications launcher popup - Scrambled graphics
Hello, I am getting a very very strange UI bug in OS X Lion (both 10.7.2 and 10.7.3).. When I click on my applications folder in the dock, the launcher window that pops up has very warbled and scrambled graphics. Pieces are being drawn in the wron
-
How can i do to solve the jboss and mysql
when i deploy the mysql-service.xml to the C:\jboss-3.2.1_tomcat-4.1.24\server\default\deploy i get the exception as org.jboss.deployment.DeploymentException: exception in init of file:/C:/jboss-3.2.1_tomcat-4.1.24/server/default/deploy/mysql-service
-
Localhost maps to multiple ips
I am having an odd issue. This occurs when I launch the 10.2 Weblogoic application server on my local machine. The application server listens for http requests. During start up it issues a warning that <Hostname "localhost" maps to multiple IP addres