How To download a idoc to a text file
Hi Gurus,
Can anyone let me know how to download idoc to a text file (Local).
Thanks in advance
B S B.
Hi,
Check the code below...
Reads an existing Idoc and dispays the contents in a spreadsheet format
REPORT Z_DISPLAY_IDOC_AND_DATA line-size 275.
* This tool reads an existing Idoc and dispays the contents in a *
* spreadsheet format. The spreadsheet (MS-EXCEL) will be automatically *
* created if D_EXCEL = 'X'. *
data: idoc_control like EDIDC,
NUMBER_OF_DATA_RECORDS like sy-dbcnt,
NUMBER_OF_STATUS_RECORDS like sy-dbcnt,
INT_EDIDS like edids occurs 0 with header line,
INT_EDIDD like edidd occurs 0 with header line.
TYPE-POOLS : LEDID.
data: STRUCT_TYPE TYPE LEDID_STRUCT_TYPE ,
IDOC_STRUCT TYPE LEDID_T_IDOC_STRUCT,
SEGMENTS TYPE LEDID_T_SEGMENT,
SEGMENT_STRUCT TYPE LEDID_T_SEGMENT_STRUCT,
excel_tab(2000) occurs 0 with header line.
parameter: DOCNUM like edidc-docnum obligatory, ""Idoc Number
sap_rel like SY-SAPRL default SY-SAPRL obligatory,
pi_ver like EDI_VERREC-VERSION default '3' obligatory,
d_excel as checkbox default 'X'. ""Download ?
start-of-selection.
perform read_idoc.
perform process_idoc.
if d_excel = 'X'.
perform download_to_excel.
endif.
end-of-selection.
FORM read_idoc.
CALL FUNCTION 'IDOC_READ_COMPLETELY'
EXPORTING
DOCUMENT_NUMBER = docnum
IMPORTING
IDOC_CONTROL = idoc_control
NUMBER_OF_DATA_RECORDS = NUMBER_OF_DATA_RECORDS
NUMBER_OF_STATUS_RECORDS = NUMBER_OF_STATUS_RECORDS
TABLES
INT_EDIDS = INT_EDIDS
INT_EDIDD = INT_EDIDD
EXCEPTIONS
DOCUMENT_NOT_EXIST = 1
DOCUMENT_NUMBER_INVALID = 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.
ENDIF.
ENDFORM. "" read_idoc
FORM process_idoc.
perform read_idoc_structure.
perform display_data_records.
ENDFORM. "" process_idoc
FORM display_data_records.
data: PE_seg_HEADER like EDI_SAPI01,
segname like EDI_IAPI12-SEGMENTTYP,
prev_segname like EDI_IAPI12-SEGMENTTYP value ' ',
pt_fields2 like EDI_IAPI12 occurs 0 with header line,
PT_FVALUES2 like EDI_IAPI14 occurs 0 with header line,
byte_first type i,
byte_last type i,
field_val(50),
tmp_str(15),
tmp_str3(15),
seg_repeats type i value 0,
tmp_str2(15),
tab_cr(1) type x value '09',
tot_ctr type i value 0,
ctr type i value 0,
msg(40) type c.
data: IDOC_STRUCT_wa TYPE LEDID_IDOC_STRUCT.
sort int_edidd by segnum.
describe table int_edidd lines tot_ctr.
loop at int_edidd.
move int_edidd-segnam to segname.
clear msg.
concatenate 'Reading segment ' segname
into msg separated by space.
if tot_ctr <> 0.
ctr = ( 100 * sy-tabix ) / tot_ctr.
endif.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
PERCENTAGE = ctr
TEXT = msg.
add 1 to seg_repeats.
clear tmp_str2.
if int_edidd-segnam <> prev_segname.
seg_repeats = 1.
clear: pe_seg_header, pt_fields2, pt_fvalues2.
refresh: pt_fields2, pt_fvalues2.
CALL FUNCTION 'SEGMENT_READ_COMPLETE'
EXPORTING
PI_SEGTYP = segname
PI_RELEASE = sap_rel
PI_VERSION = pi_ver
IMPORTING
PE_HEADER = pe_seg_header
TABLES
PT_FIELDS = pt_fields2
PT_FVALUES = pt_fvalues2
EXCEPTIONS
SEGMENT_UNKNOWN = 1
SEGMENT_STRUCTURE_UNKNOWN = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE 'I' NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
prev_segname = int_edidd-segnam.
endif.
read table idoc_struct into idoc_struct_wa with key
segment_type = int_edidd-segnam.
if sy-subrc = 0.
IF IDOC_STRUCT_WA-SYNTAX_ATTRIB-MUSTFL = 'X'.
TMP_STR = 'Mandatory'. ""Mandatory
ELSE.
TMP_STR = 'Optional'. ""Optional
ENDIF.
if IDOC_STRUCT_wa-SEGMENT_TYPE_ATTRIB-QUALIFIER = 'X'.
tmp_str3 = 'Qualified'.
else.
tmp_str3 = 'Non-Qualified'.
endif.
shift IDOC_STRUCT_wa-SYNTAX_ATTRIB-OCCMAX
left deleting leading '0'.
move seg_repeats to tmp_str2.
condense: IDOC_STRUCT_wa-SYNTAX_ATTRIB-OCCMAX, tmp_str2.
concatenate tmp_str2 'of' IDOC_STRUCT_wa-SYNTAX_ATTRIB-OCCMAX
into tmp_str2 separated by space.
write :/ IDOC_STRUCT_wa-SEGMENT_TYPE,
tmp_str,
TMP_STR3,
tmp_str2,
IDOC_STRUCT_wa-SYNTAX_ATTRIB-HLEVEL,
IDOC_STRUCT_wa-SEGMENT_TYPE_ATTRIB-plast,
IDOC_STRUCT_wa-SEGMENT_TYPE_ATTRIB-DESCRP.
if d_excel = 'X'.
concatenate 'Segment Name' tab_cr
'Mand / Opt ' tab_cr
'Qual / non-Qual' tab_cr
'Seq of Max' tab_cr
'Level' tab_cr
'Owner' tab_cr
'Description'
into excel_tab.
append excel_tab.
concatenate IDOC_STRUCT_wa-SEGMENT_TYPE tab_cr
tmp_str tab_cr
TMP_STR3 tab_cr
tmp_str2 tab_cr
IDOC_STRUCT_wa-SYNTAX_ATTRIB-HLEVEL tab_cr
IDOC_STRUCT_wa-SEGMENT_TYPE_ATTRIB-plast tab_cr
IDOC_STRUCT_wa-SEGMENT_TYPE_ATTRIB-DESCRP
into excel_tab.
append excel_tab.
concatenate tab_cr
'Field Nma' tab_cr
'Type' tab_cr
'Length' tab_cr
'Byte From' tab_cr
'Byte To' tab_cr
'Description' tab_cr
'Value' tab_cr
'Qualifier Meaning'
into excel_tab.
append excel_tab.
endif.
endif.
sort pt_fields2 by field_pos.
byte_first = 0.
loop at pt_fields2.
clear: field_val.
byte_last = pt_fields2-EXTLEN.
write int_edidd-sdata+byte_first(byte_last) to
field_val left-justified.
shift pt_fields2-EXTLEN left deleting leading '0'.
shift pt_fields2-byte_first left deleting leading '0'.
shift pt_fields2-byte_last left deleting leading '0'.
write:/ ' ', pt_fields2-fieldname,
pt_fields2-datatype,
pt_fields2-EXTLEN,
pt_fields2-byte_first ,
pt_fields2-byte_last,
pt_fields2-descrp,
field_val.
read table pt_fvalues2 with key fieldname = pt_fields2-fieldname
fldvalue_l = field_val.
add byte_last to byte_first.
if sy-subrc = 0.
write : pt_fvalues2-descrp.
else.
clear pt_fvalues2-descrp.
endif.
if d_excel = 'X'.
concatenate tab_cr pt_fields2-fieldname tab_cr
pt_fields2-datatype tab_cr
pt_fields2-EXTLEN tab_cr
pt_fields2-byte_first tab_cr
pt_fields2-byte_last tab_cr
pt_fields2-descrp tab_cr
field_val tab_cr
pt_fvalues2-descrp
into excel_tab.
append excel_tab.
endif.
endloop.
endloop.
ENDFORM. "" display_data_records
FORM read_idoc_structure.
data: idoctype type LEDID_IDOCTYPE.
if not idoc_control-cimtyp is initial.
STRUCT_TYPE = 'E'. ""Extended
idoctype = idoc_control-cimtyp.
else.
STRUCT_TYPE = 'B'. ""Basic
idoctype = idoc_control-idoctp.
endif.
CALL FUNCTION 'IDOC_TYPE_COMPLETE_READ'
EXPORTING
RELEASE = sap_rel
STRUCT_TYPE = STRUCT_TYPE
IDOCTYPE = idoctype
VERSION = pi_ver
* IMPORTING
* IDOC_TYPE = idoctype
TABLES
IDOC_STRUCT = idoc_struct
SEGMENTS = segments
SEGMENT_STRUCT = segment_struct
EXCEPTIONS
IDOCTYPE_UNKNOWN = 1
IDOCSTRUCT_UNKNOWN = 2
SEGMENT_DATA_MISSING = 3
ILLEGAL_STRUCT_TYPE = 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.
ENDFORM. "" read_idoc_structure
FORM download_to_excel.
data: name like RLGRAP-FILENAME.
shift docnum left deleting leading '0'.
concatenate docnum '-' idoc_control-idoctp '.xls'
into name.
CALL FUNCTION 'RH_START_EXCEL_WITH_DATA'
EXPORTING
DATA_NAME = name
DATA_TYPE = 'ASC'
WAIT = ' '
TABLES
DATA_TAB = excel_tab
EXCEPTIONS
NO_BATCH = 1
EXCEL_NOT_INSTALLED = 2
WRONG_VERSION = 3
INTERNAL_ERROR = 4
INVALID_TYPE = 5
CANCELLED = 6
DOWNLOAD_ERROR = 7
OTHERS = 8
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. "" download_to_excel
Cheers
VJ
Similar Messages
-
How to download the SAP client into text file
Hi,
I want to download a SAP client to a text file for backup and then upload it again for restoration when needed. Can this be done?Hi,
Regarding which data you want to export, you have to select the corresponding profiles in SCC8:
If you want to export transaction data & master data (this is together known as application data), then you have to select the appropriate profile. Alongwith application data, customizing data would also be there, because it cant be transferred alone. ALso, you can choose whether to export user data or not.
But please note that repository data (programs etc) would not be part of this export.
The transaction is SCC8 for client export.
For importing you can import like any other transport request.
For details you could refer to the below link:
http://help.sap.com/saphelp_47x200/helpdata/en/69/c24c824ba111d189750000e8322d00/frameset.htm
Thanks & Regards,
Kunal. -
How to download a ABAP report to text file
Hi Experts,
I want to save a ABAP report to a local file in my PC (*txt format). Since it uses a lot of includes, I have to download those ones too.. Is there is quickway to save the main program and all it's subprograms to a text file ?
Regards
ShibuHi,
Try this report, it will solve u r problem,
TABLES:TRDIR.
SELECT-OPTIONS: PGMNAME FOR TRDIR-NAME.
CONSTANTS: LINESIZE value 2048.
PARAMETERS:
HEADING AS CHECKBOX DEFAULT 'X',
FGROUP AS CHECKBOX,
USER LIKE TRDIR-CNAM DEFAULT '*',
DOWNLOAD AS CHECKBOX default 'X',
pa_TEXTP AS CHECKBOX,
DOWNDIR(80) DEFAULT 'C:\temp\',
chg_date(8) default '19000101',
chg_time(6) default '000000'.
PGMNAME like TRDIR-NAME.
DATA:
W_TEXT(128),
W_FILENAME(128),
W_PROGRAM_LOW(8),
W_PROGRAM_HIGH(8).
DATA:
_texttab type textpool,
texttab type standard table of textpool initial size 0
with header line,
BEGIN OF TEXTTAB OCCURS 0,
ID(1),
KEY(8),
ENTRY(70),
END OF TEXTTAB,
BEGIN OF ABAPTAB OCCURS 500,
LINE(72),
line(LINESIZE),
END OF ABAPTAB,
BEGIN OF TRTAB OCCURS 0,
NAME LIKE TRDIR-NAME,
ENTRY LIKE TEXTTAB-ENTRY,
CDAT LIKE TRDIR-CDAT,
UDAT LIKE TRDIR-UDAT,
END OF TRTAB,
BEGIN OF TRFTAB OCCURS 0,
NAME LIKE TRDIR-NAME,
ENTRY LIKE TEXTTAB-ENTRY,
CDAT LIKE TRDIR-CDAT,
UDAT LIKE TRDIR-UDAT,
END OF TRFTAB.
START-OF-SELECTION.
IF FGROUP = ' '.
PERFORM LOAD_TRDIR_PROGRAM.
PERFORM PROCESS_PROGRAM.
ELSE.
PERFORM LOAD_TRDIR_FGROUP.
PERFORM PROCESS_FGROUP.
ENDIF.
*& form load_trdir_program.
FORM LOAD_TRDIR_PROGRAM.
SELECT * FROM TRDIR
WHERE NAME IN PGMNAME
and sdate >= chg_date
and stime >= chg_time.
IF USER <> '*'.
CHECK TRDIR-UNAM = USER OR
TRDIR-CNAM = USER.
ENDIF.
CLEAR: TEXTTAB.
REFRESH: TEXTTAB.
CLEAR: TRTAB.
READ TEXTPOOL TRDIR-NAME INTO TEXTTAB LANGUAGE 'E'.
IF SY-SUBRC = 0.
READ TABLE TEXTTAB WITH KEY 'R'.
MOVE TEXTTAB-ENTRY TO TRTAB-ENTRY.
ENDIF.
MOVE TRDIR-NAME TO TRTAB-NAME.
MOVE TRDIR-CDAT TO TRTAB-CDAT.
MOVE TRDIR-UDAT TO TRTAB-UDAT.
APPEND TRTAB.
CLEAR: TEXTTAB.
ENDSELECT.
ENDFORM. " load_trdir_program
*& Form load_trdir_fgroup
FORM LOAD_TRDIR_FGROUP.
SELECT * FROM TRDIR
WHERE NAME BETWEEN 'SAPLYYYY' AND 'SAPLZZZZ'.
CHECK TRDIR-UNAM = USER OR TRDIR-CNAM = USER.
CLEAR: TEXTTAB.
CLEAR: TRTAB.
REFRESH: TEXTTAB.
READ TEXTPOOL TRDIR-NAME INTO TEXTTAB LANGUAGE 'E'.
IF SY-SUBRC = 0.
READ TABLE TEXTTAB WITH KEY 'R'.
MOVE TEXTTAB-ENTRY TO TRTAB-ENTRY.
ENDIF.
MOVE TRDIR-NAME TO TRTAB-NAME.
MOVE TRDIR-CDAT TO TRTAB-CDAT.
MOVE TRDIR-UDAT TO TRTAB-UDAT.
APPEND TRTAB.
CLEAR: TEXTTAB.
ENDSELECT.
LOOP AT TRTAB.
MOVE-CORRESPONDING TRTAB TO TRFTAB.
APPEND TRFTAB.
MOVE TRTAB-NAME+3(5) TO W_PROGRAM_LOW.
MOVE '%' TO W_PROGRAM_LOW+5(1).
MOVE TRTAB-NAME+3(5) TO W_PROGRAM_HIGH.
MOVE 'MMMMMMMM' TO W_PROGRAM_HIGH.
SELECT * FROM TRDIR
WHERE NAME LIKE W_PROGRAM_LOW.
*where name between w_program_low and w_program_high.
CHECK TRDIR-NAME+5(1) <> '$'.
CHECK TRDIR-NAME(5) =
TRTAB-NAME+3(5).
READ TEXTPOOL TRDIR-NAME INTO
TEXTTAB LANGUAGE 'E'.
READ TABLE TEXTTAB WITH KEY 'R'.
MOVE TEXTTAB-ENTRY TO TRFTAB-ENTRY.
MOVE TRDIR-NAME TO TRFTAB-NAME.
MOVE TRDIR-CDAT TO TRFTAB-CDAT.
MOVE TRDIR-UDAT TO TRFTAB-UDAT.
APPEND TRFTAB.
ENDSELECT.
ENDLOOP.
ENDFORM. " load_trdir_fgroup.
FORM PROCESS_PROGRAM
FORM PROCESS_PROGRAM.
LOOP AT TRTAB.
READ REPORT TRTAB-NAME INTO ABAPTAB.
IF DOWNLOAD = 'X'.
PERFORM DOWNLOAD_PROGRAMS USING TRTAB-NAME.
ELSE.
PERFORM LIST_PROGRAMS USING TRTAB-NAME.
ENDIF.
IF pa_TEXTP = 'X'.
READ TEXTPOOL TRTAB-NAME INTO TEXTTAB LANGUAGE
'E'.
IF SY-SUBRC = 0 AND DOWNLOAD = 'X'.
PERFORM DOWNLOAD_TEXTPOOL USING
TRTAB-NAME.
ENDIF.
LOOP AT TEXTTAB.
WRITE:/
TEXTTAB-ID,
TEXTTAB-KEY,
TEXTTAB-ENTRY.
ENDLOOP.
ENDIF.
ENDLOOP.
ENDFORM.
FORM PROCESS_fgroup
FORM PROCESS_FGROUP.
LOOP AT TRFTAB.
READ REPORT TRFTAB-NAME INTO ABAPTAB.
IF DOWNLOAD = 'X'.
PERFORM DOWNLOAD_PROGRAMS USING TRFTAB-NAME.
ELSE.
PERFORM LIST_PROGRAMS USING TRFTAB-NAME
ENDIF.
IF pa_TEXTP = 'X'.
READ TEXTPOOL TRFTAB-NAME INTO TEXTTAB LANGUAGE
'E'.
IF SY-SUBRC = 0 AND DOWNLOAD = 'X'.
PERFORM DOWNLOAD_TEXTPOOL USING
TRFTAB-NAME.
LOOP AT TEXTTAB.
WRITE:/
TEXTTAB-ID,
TEXTTAB-KEY,
TEXTTAB-ENTRY.
ENDLOOP.
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM.
*& Form DOWNLOAD_PROGRAMS
FORM DOWNLOAD_PROGRAMS USING NAME.
W_TEXT = 'Downloading'.
W_TEXT+15(8) = NAME.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
TEXT = W_TEXT
EXCEPTIONS
OTHERS = 1.
clear w_filename.
MOVE DOWNDIR TO W_FILENAME(80).
MOVE NAME TO W_FILENAME+20(8).
MOVE '.txt' TO W_FILENAME+28(4).
CONDENSE W_FILENAME NO-GAPS.
concatenate w_filename name '.doc' into w_filename.
condense w_filename no-gaps.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
FILENAME = W_FILENAME
FILETYPE = 'ASC'
TABLES
DATA_TAB = ABAPTAB
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
INVALID_FILESIZE = 3
INVALID_TABLE_WIDTH = 4
INVALID_TYPE = 5
NO_BATCH = 6
UNKNOWN_ERROR = 7
OTHERS = 8.
ENDFORM. " DOWNLOAD_PROGRAMS
*& Form LIST_PROGRAMS
FORM LIST_PROGRAMS USING NAME.
LOOP AT ABAPTAB.
WRITE:/ NAME, ABAPTAB-LINE.
ENDLOOP.
ENDFORM. " LIST_PROGRAMS
*& Form DOWNLOAD_TEXTPOOL
FORM DOWNLOAD_TEXTPOOL USING NAME.
W_TEXT = 'Textpool...'.
W_TEXT+15(8) = NAME.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
TEXT = W_TEXT
EXCEPTIONS
OTHERS = 1.
MOVE DOWNDIR TO W_FILENAME(80).
MOVE TRTAB-NAME TO W_FILENAME+20(8).
MOVE '.tpl' TO W_FILENAME+28(4).
CONDENSE W_FILENAME NO-GAPS.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
FILENAME = W_FILENAME
FILETYPE = 'ASC'
TABLES
DATA_TAB = TEXTTAB
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
INVALID_FILESIZE = 3
INVALID_TABLE_WIDTH = 4
INVALID_TYPE = 5
NO_BATCH = 6
UNKNOWN_ERROR = 7
OTHERS = 8.
ENDFORM. " DOWNLOAD_TEXTPOOL
TOP-OF-PAGE.
IF HEADING = 'X'.
Place your heading here:
call function 'Z_WRITE_HEADER_FOOTER'
exporting
type = 'H'
exceptions
others = 1.
skip 1.
ENDIF.
Regards
Nilesh -
Download data to Fixed Length Text File
Can anyone share the sample code on how to download data into fixed length text file and place the file in the server directory?
One way i would advice is to declare a text variable and move values using offset.
Eg:
move: <struc>-fld1 to l_text(8),
<struc>-fld2 to l_text+8(3),
<struc>-fld3 to l_text+11(15).
transfer l_text to <file>.
Try this approch and see the result.
Kind Regards
Eswar -
How to download the IDOC when i performing WE02 to display?
Hi ,
How to download the IDOC into local drive when i performing WE02 to display an IDOC?
Thanks.Hi,
Check this
a® -
How to download an IDOC in XML or spreadsheet with well structured.
Dear Experts,
I am currently display an IDOC in WE02.
May i know how to download this IDOC into XML format or spreadsheets format and well structured with Hierarchy level..
Thank you very muchHi,
Good question my friend,
Follow below process:
- Input t-code IDOC
- In selection screen, select 'Analyse IDOC field values
- Press F8
- Input your IDOC number
- Check mark on 'Also evaluate empty fields
- Click on 'Output in internal form' : this is very much important thing
- The execute
- You will see all the data
- Then go to 'List'>Save/send option from where you can achieve your purpose.
Hrishi -
How to Download a Hierarchie to a Flat File
Hallo Experts,
sorry i just have a second question. We make the solution
"How to Download a Hierarchy to a flat file"
Program works
transport green
Upload ok,
but the Text Node keys are there, but not the text
e.g.
description text note short: 00000000000000000000
description text note long: empty
The rest is alright ????? Has someone a idea?
Thanks
SantraHi,
You may be interested in this official SAP How-To-Guide document:
"How to Download a Hierarchy to a Flat File"
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/0403a990-0201-0010-38b3-e1fc442848cb -
How to read the content of a text file (by character)?
Guys,
Good day!
I'm back just need again your help. Is there anyone knows how to read the content of a text file not by line but by character.
Please help me. Thank you so much in advance.
Jojohttp://java.sun.com/javase/6/docs/api/index.html
package java.io
InputStream.read(): int
Reads the next byte of data from the input stream.
Implementation:
InputStreamReader
An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes them into characters using a specified charset. The charset that it uses may be specified by name or may be given explicitly, or the platform's default charset may be accepted. -
How to get summary columns in delimited text file
How to get summary columns in delimited text file
I am trying to generate a delimited text file output with delimited_hdr = no.The report is a Group above report with summary columns at the bottom.In the text file the headers are not getting repeated & thats ok.The problem is the summary data is getting repeated for each row of data.Is there a way where i will get all the data & summary data will get displayed only once.I have to import the delimited text file in excel spreadsheet.Sorry there were a typos :
When I used desformat=DELIMITEDDATA with desttype=FILE, I get error "unknown printer driver DELIMITEDDATA". When you look for help, DELIMITED is not even listed as one of the values for DESTFORMAT. But if you scroll down and look for DELIMITER it says , this works only in conjuction with DESTFORMAT=DELIMITED !!!!!!??!! This is in 9i.
Has this thing worked for anybody ? Can anyone please tell if they were able to suppress the sumary columns or the parent columns of a master-detail data for that matter ? -
How do i split content from the text file using tab and spaces...?
Hi.. Just want to ask help to all the experts. Im new in java and i have this problem on how to split the contents of the text file. ill show you the contents in order to let you see what i mean.
FileName: COL.txt
AcctNo AcctName Primary Secondary Status Opendate
121244 IPI Company Noel Jose Active 12/05/2007
As you can see the content i want to split it per column.. Please help meJose_Noel wrote:
Hi prometheuzz,
What do you mean by one thread...?You created two threads* with the same question in it. That way, people might end up giving you an answer that has already been posted in your other thread: thus wasting that person's time.
Just don't create multiple threads with the same question please.
* a thread is a post here at the forum -
How to download the script data into pdf file
how to download the script data into pdf file
i have one option to download the script data to pdf file --->rstxpdft4 program.
i have one doubt how to use this proogram.or any function module to download the script data to pdf file.
Thanks and regards,
Sri.Hi Sri Sai,
I know one method to convert the sapscript to pdf file :
first generate a Spool Request for the required Sapscript
then goto transaction SP01 and copy the generated Spool Request number
now execute the SAP report RSTXPDFT4
here enter the copied Spool request number and the target directory into the parameters
execute the report
required pdf file will be generated into the target directory
i hope it will help you out
Please refer this simple program:
http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
Reward points if found helpful....
Cheers,
Eshwar. -
Download Internal Table into a Text File in BSP?
I have an internal table which i need to download into my local pc. I know i can not use FM gui_download. Could some one please post code on how to download the internal table into a text file in BSP. Also i am not sure if i can use save dialog FM. Also need suggestion on which FM to use for save dialog which tells where to save the file.
Any help will be appreciated.
Thanks
NahmanThis might be a good starting point.
<a href="/people/thomas.jung3/blog/2004/09/02/creating-a-bsp-extension-for-downloading-a-table">/people/thomas.jung3/blog/2004/09/02/creating-a-bsp-extension-for-downloading-a-table</a> -
Mail Adapter: How to send data as a simple text file attachment?
Hi All
I have a proxy to file scenario, where i write data to a text file.
Now, i need to have a second receiver. I have to send an email, with the above file as an attachment, to this receiver.
How can i do this?
How can i send the data as a text file attachment to the receiver?
Many Thanks
ChandraHi,
To send the message to the second receiver you need to have:
1) Necessary mail message format (can download from service marketplace)
2) Receiver mail communication channel.
3) Create the necessary Configuration Objects .... Receiver Determination, Interface Determination, Receiver Agreement.
3) You can do a XSLT mapping (if required)....if no complex logic is needed then you can do a simple Message mapping.
4) In the receiver CC make sure that you check the Adapter Specific Message Attribute checkbox.
For more info you can refer my answer in this thread:
Re: xml in mail
Also refer the blog:
/people/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter
Regards,
Abhishek. -
Downloading a report in a text file.
Hi,
I have one report program, my requirement is when i execute the report program to display the report,on that report screen, i need to include one button such as "Download to text file" after clicking that button whole report which is displayed on the screen should be downloaded to a text file. Please guide me how this can be achieved?
Thanks in advance.
Regards,
ChetanHi Chetan,
Good mng!..
If your report is ALV , then no need to write code for that .. Download to EXCEL option is inbuilt.
If your report is classical report...you have to write the program like this...
REPORT ztablexls.
* Developer : S.Srini.
* Location : Chennai,
* : Tamil Nadu,
* : India.
* Date : 3/10/2001.
* TESTED - MS EXCEL 97
* NOT RECOMMENDED FOR LENGTHY OUTPUT AND LARGE DATA TABLE BROWSING
TABLES: USR03,DD02L.
DATA: ZX030L LIKE X030L.
DATA BEGIN OF ZDFIES OCCURS 0.
INCLUDE STRUCTURE DFIES.
DATA END OF ZDFIES.
DATA: BEGIN OF FLDITAB OCCURS 0,
FLDNAME(11) TYPE C,
END OF FLDITAB.
DATA ITABUSR03 LIKE USR03 OCCURS 0 WITH HEADER LINE.
DATA TNAME LIKE DD02L-TABNAME.
SELECT * FROM USR03 INTO TABLE ITABUSR03.
TNAME = 'USR03'.
PERFORM GETFIELEDS.
PERFORM SHOW123.
FORM GETFIELEDS.
CALL FUNCTION 'GET_FIELDTAB'
EXPORTING
LANGU = SY-LANGU
ONLY = SPACE
TABNAME = TNAME
WITHTEXT = 'X'
IMPORTING
HEADER = ZX030L
TABLES
FIELDTAB = ZDFIES
EXCEPTIONS
INTERNAL_ERROR = 01
NO_TEXTS_FOUND = 02
TABLE_HAS_NO_FIELDS = 03
TABLE_NOT_ACTIV = 04.
CASE SY-SUBRC.
WHEN 0.
LOOP AT ZDFIES.
FLDITAB-FLDNAME = ZDFIES-FIELDNAME.
APPEND FLDITAB.
ENDLOOP.
WHEN OTHERS.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
with SY-SUBRC.
ENDCASE.
ENDFORM.
FORM SHOW123.
CALL FUNCTION 'EXCEL_OLE_STANDARD_DAT'
EXPORTING
FILE_NAME = 'C:\USR03.XLS'
DATA_SHEET_NAME = 'USER LIST'
TABLES
DATA_TAB = ITABUSR03
FIELDNAMES = FLDITAB
EXCEPTIONS
FILE_NOT_EXIST = 1
FILENAME_EXPECTED = 2
COMMUNICATION_ERROR = 3
OLE_OBJECT_METHOD_ERROR = 4
OLE_OBJECT_PROPERTY_ERROR = 5
INVALID_FILENAME = 6
INVALID_PIVOT_FIELDS = 7
DOWNLOAD_PROBLEM = 8
OTHERS = 9.
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.
Reward points if my reply is useful
~Lakshmiraj~ -
How Open And Print Proc C Genrated Text File Based Report ON Browser
Dear Sir
I have my old 6i forms from which i runs some Pro*c programmers with the help of HOST() command ,and then that generates a normal text file as a resultant report like file name "kha10"
which i can easily open with any text client ,,,
now what i want is that, to open this file on browser like web Report on my forms 10g like report builder 10g
can anyone help me as it will be a gr8 help otherwise i would have to develop approx 100 reports.....
any solution or any technique plzz help mebro my work is almost done apart from this virtual directory , how to make a virtual directory so that is dosent comes under
http://........../form/
i mean where to put my
<virtual-directory virtual-path="/procrepo" real-path="c:\" />
as my original file looks like bellow
<?xml version="1.0"?>
<!DOCTYPE orion-web-app PUBLIC "-//ORACLE//DTD OC4J Web Application 9.04//EN" "http://xmlns.oracle.com/ias/dtds/orion-web-9_04.dtd">
<orion-web-app
deployment-version="10.1.2.0.2"
jsp-cache-directory="./persistence"
temporary-directory="./temp"
servlet-webdir="/servlet/"
>
<context-param-mapping name="configFileName">D:\DevSuiteHome_1/forms/server/formsweb.cfg</context-param-mapping>
<virtual-directory virtual-path="/html" real-path="D:\DevSuiteHome_1/tools/web/html" />
<virtual-directory virtual-path="/java" real-path="D:\DevSuiteHome_1/forms/java" />
<virtual-directory virtual-path="/webutil" real-path="D:\DevSuiteHome_1/forms/webutil" />
<virtual-directory virtual-path="/jinitiator" real-path="D:\DevSuiteHome_1/jinit" />
<session-tracking cookies="disabled" />
<!-- Uncomment this element to control web application class loader behavior.
<web-app-class-loader search-local-classes-first="true" include-war-manifest-class-path="true" />
-->
<security-role-mapping name="administrators">
</security-role-mapping>
</orion-web-app>
plzzzzzzzzzzz help
Maybe you are looking for
-
How do I get my Audio book back on my Ipad?
How do I get my Audio book back?
-
How to put the URL-bar at a fixed position to the right of tabs ?
I have moved the URL-BAR to the right of tabs, on the same row, and reduced the size with a few lines in "userChrome.css". I want the URL-bar to be at a fixed position as far to the right as possible, so i get as much free space as i can for my tabs.
-
SharePoint 2013 Community members list is not working properly.
Hello All, We have a community site at our office. It is having a discussion list which has almost 2000 discussion. The problem is the members who have raised questions or discussions should get added in community members list. But its not happening.
-
What application do I use to open Ghostery?
I had successfully downloaded Ghostery to my macbook and imac. But it "went away" after I upgraded from Leopard to Snow Leopard. I keep downloading it but unlike my first installation, I'm asked what application to use to open it. What application
-
Hi, where can i find the BI Java Connector Files: bi_sdk_jdbc.rar bi_sdk_xmla.rar bi_sdk_sapq.rar bi_sdk_odbo.rar Can anyone help me?