SPL - Mass check - MS Excel file
Hello!
We have an Excel sheet with about 30.000 customers and delivery addresses. These must be checked against our SPL lists. How can we upload this data, and check it, keeping a protocol?
Advise is appreciated!
Thanks very much in advance!
t.
Dieter,
Check this link:
http://www.sdn.sap.com/irj/scn/articles-grc-all
There should be an article called
SAP GRC GLOBAL TRADE SERVICES 7.2
OFFLINE SANCTIONED PARTY LIST SCREENING GUIDE
If it has been removed, I'd suggest you ask your account manager to contact GTS solution management for the document.
Similar Messages
-
Unable to check-in excel file correctly
Hi,
I checked-in a spreadsheet(.xls) to cs as type 'Document - Any generic document',and I was able to check-in but I faced below issue.
The document was not searchable. When I checked-in the .xls file, the document went to GenWWW status, I resubmitted it from repository browser, and it showed me the following error:
Indexing aborted. unable to index metadata only. This may indicate the collection is damaged.
I noticed that the web location was pointing to an error page in cs.
So, can anyone please help me with checking-in an excel file into cs? Why is this issue coming up?
Even when i checked-in a .csv format file, the document was not searchable.
Note: We have IBR disabled in our system as we don't use it, still other some files(.xml etc) also get stuck in Genwww status and remain there till they are resubmitted. That's also another issue.Hi ,
It looks to be a case of indexer problem on your UCM environment . Enable indexer* tracing with full verbose and capture server output with a new excel file check-in .
Thanks,
Srinath -
How to read an excel file into the datatable in sdk code( AddonApplication)
Hi Experts,
Please let me know the code ,how to write an excel file to the datatable and based on the datatable it should write to the database table.
help would be appreciated...
Regards,
Vijay Kumar
Edited by: Haroon Rasheed on Oct 29, 2011 10:40 PMHi,
You may check: Read Excel File by Sheet then put it in Matrix
Thanks,
Gordon -
Problem in Attachning an Excel File in Email
Hello Everyone,
I have a problem which sends an email containing an excel as an attachment. However, if I check the excel file in the email, the filename is not properly defined, and there is an error stating that the format is not recognizable in excel format.
I am using the function module SO_DOCUMENT_SEND_API1.
Please help.
Thanks,
JimHi,
i am sending some information how to send mails
please check it once,
please reward points, if it is useful.
A SAP mail is a mail internal to the SAP system. It is a very good forum to exchange information with other users. Using a SAP mail in ABAP code facilitates exchange of automatic messages at various stages of the business process. It is easy to use and saves many hassles involved in using workflows for exchanging messages.
The ABAP code to send a sap mail is built around the FM SO_OBJECT_SEND which has the following pattern.
call function 'SO_OBJECT_SEND'
exporting
EXTERN_ADDRESS = ' '
FOLDER_ID = ' '
FORWARDER = ' '
OBJECT_FL_CHANGE = ' '
OBJECT_HD_CHANGE = ' '
OBJECT_ID = ' '
OBJECT_TYPE = ' '
OUTBOX_FLAG = ' '
OWNER = ' '
STORE_FLAG = ' '
DELETE_FLAG = ' '
SENDER = ' '
CHECK_ALREADY_SENT = ' '
importing
object_id_new =
sent_to_all =
tables
OBJCONT =
OBJHEAD =
OBJPARA =
OBJPARB =
receivers =
PACKING_LIST =
ATT_CONT =
ATT_HEAD =
NOTE_TEXT =
exceptions
active_user_not_exist = 1
communication_failure = 2
component_not_available = 3
folder_not_exist = 4
folder_no_authorization = 5
forwarder_not_exist = 6
note_not_exist = 7
object_not_exist = 8
object_not_sent = 9
object_no_authorization = 10
object_type_not_exist = 11
operation_no_authorization = 12
owner_not_exist = 13
parameter_error = 14
substitute_not_active = 15
substitute_not_defined = 16
system_failure = 17
too_much_receivers = 18
user_not_exist = 19
x_error = 20
others = 21.
Import Parameters Name and Description Field name Field function
Object_hd_change (structure)
Contains the process to be done when SAP mail is marked for execution.
When the Execute Icon in the SAP mail is clicked the corresponding object is executed vmtyp D for dialog module
F for function module
R for report
T for transaction
U for transaction with export
Acnam Name of the object which is to be executed, like name of transaction/report
Skips X to execute first screen in background
Objsns Indicates sensitivity of the object.
P for private object
F for functional object
O for confidential object
C for company confidential object
Sensitivity level is restricted to O for documents in shared folders
Objla Language of the document
E for English
sy-langu for system language
Objnam Name of the document
Objdes Short description (Title) of the document
Objsrt Name of the sort field. This is used to group documents based on certain criteria
Object_type
Type of document to be sent with mail RAW for raw text (default)
DOC for word file
XLS for excel file
All classes can be used except for folders (FOL) and distribution lists (DLI)
Outbox_flag X to indicate that mail should also be stored in outbox of the user after sending (default )
Owner Sap login of the user responsible for transmission
Table Parameters Name and Description Field Name Field function
Objcont
Table to hold the body of the mail Line Text lines up to 255 characters
Objhead
Table to hold number of lines in the body of the mail, i.e size of the table in lines Line Text lines up to 255 characters
Objpara
Table to hold the set/get parameters to be transferred to the processing element Name Name of the parameter. Only first three characters are used
Option Not used
Low Value of the parameter in name
High Not used
Objparb
Table to hold information for mails to which a certain processing type is assigned. For a report or transaction with transfer of values to global memory, the table has to contain the parameters with relevant values. The memory id is taken from the first row. For a FM or dialog module, data in table will be transferred as table parameter msgdial Name For report or transaction with transfer of values to global memory, the field for first row should hold the name of the memory id used for export and the other rows should hold the parameter names. For FM or dialog module this field should hold the values as per the usage of the module
Value For report or transaction with transfer of values to global memory, the field for first row should remain empty and the other rows should hold values of the parameters. For FM or dialog module this field should hold the values as per the usage of the module
Receivers
Table to hold recipient details Recnam SAP login of the recipient. Append all the recipients to this table
Sndcp X for sending mail as a copy
Sndex X for sending as express document. This will prompt a logged on recipient saying that he or she has received an express mail
Recesc B for SAP user
E for external email address
U for unix address
Export Parameters Name and Description Field name Field function
Object_id_new
Contains object id of document created during send process
Sent_to_all
X indicates that document was sent to all recipients. Flag is not activated if sending fails in one or more cases
Main Exceptions Name and Description Description
Too_much_receivers Number of recipients is greater than number for which sender is authorised to send
Object_not_sent Document was not delivered to any of the recipients
Object_not_exist Document class specified does not exist or cannot be sent
Object_no_authorisation Document could not be sent as one of the required authorisations does not exist
Parameter_error Invalid combination of parameter values transferred to FM
X_error Internal error occurred
Once all the parameters and table interfaces are properly filled, call the function module to send the SAP mail to the recipient inbox.
Care should be taken to report the status of execution of the function module to the user using one of the exceptions defined (refer function module pattern above)
Though SAP mail is a very robust method of interacting with users within SAP system, it is always good to receive email in Microsoft inbox. This also works like an additional notification to users in case they do not check SAP mail regularly. The next article covers sending E-mails using ABAP.
regards,
satish. -
Excel files convert to 1F32,tmp what does this means
Hi
Pls check this Excel files its not open (1F4F.tmp)I experienced this issue twice this month with 2 different customers both use windows 7 pro 64 and office 2013 Home and Bus. Cant figure this out.
-
How to force checked out CSV Files to open in Excel and not in Notepad
Hi,
I'm looking for some pointers / direction.
.CSV files on SharePoint 2010 document library opens up in notepad by default. I did the DocIcon.xml CSV entry, changed the MIME type in IIS and did the IIS reset. Also on client computer CSV file is associated with MS Excel 2013. Now clicking a CSV file
opens it up in MS Excel.
Now a user checks out a CSV file and the same user clicks on the CSV file, the file is opening in notepad! If other users clicks on the same checked out file (checked out by the first user) it opens up in Excel for them. I've tried the 'Edit in Microsoft
Excel' from the pop up menu but with same result.
How can I force a checked out CSV file to open in MS Excel?
Thanks1. Highlight one of the images and press cmd+i (or right click and select "Get info")
2. Click the dropdown menu and select Photoshop (you might have to click "Other..." to find it.
3. Then click "Change All" button below.
You're going to have to do this with every different TYPE of image (e.g. jpeg, tiff etc) but once you've covered all the types you won't have the problem again.
Hope this helps! -
How to update Ztable from Excel file and how to check conditions ,
HI this uday,
pls help me how can i update Ztable from Excel file and how to check conditions .
regards
uday
Moderator message: please (re)search yourself before asking.
Edited by: Thomas Zloch on Jul 13, 2010 12:00 PMHi
Use Fm : ALSM_EXCEL_TO_INTERNAL_TABLE.
L_INTERN : internal table with your fields .
make sure that the fields in the Excel should be formatted (as numeric , characher ) depending upon the data types .
LOOP AT L_INTERN INTO WA_LINTERN .
MOVE WA_LINTERN-COL TO L_INDEX.
ASSIGN COMPONENT L_INDEX OF STRUCTURE WA_INREC TO <FS> .
IF SY-SUBRC = 0.
MOVE WA_LINTERN-VALUE TO <FS>.
ENDIF.
AT END OF ROW . "#EC *
APPEND WA_INREC TO IT_DATA. "
CLEAR WA_INREC.
ENDAT.
ENDLOOP.
Regards
Swapnil -
Is there a way to check whether an Excel file has a header or not?
Hi!
I'm currently using POI Utility to read and write Excel files.
You normally use the HasHeaderRow = true / false to specify whether the file has a header or not.
Now, let's say I have a program that needs to read Excel files from a directory, some have headers, some don't.
Is there a way to know dynamically whether a header has been defined or not?
Then, for those having headers, the flag will be set as true, while for those which don't have any header, the flag will be set as false.
E.g.
<!--- Create an instance of the POIUtility.cfc. --->
<cfset objPOI = CreateObject(
"component",
"POIUtility"
).Init()
/>
<!--- Set directory --->
<cfset currentDirectory = GetDirectoryFromPath(GetTemplatePath()) & "newDir">
<!--- Check whether the directory exists. --->
<cfif DirectoryExists(variables.currentDirectory)>
<!--- Read files from the specified directory --->
<cfdirectory action="list" directory="#variables.currentDirectory#" type="file" filter="*.xls" name="qDirectory">
<!--- Check if the directory has any Excel file --->
<cfif variables.qDirectory.recordcount gt 0>
<!--- Loop query --->
<cfloop query="variables.qDirectory">
<!--- Check if header is present in each of the file --->
IF headerExists THEN
headerFlag = true
ELSE
headerFlag = false
END IF
<!--- Read Excel File --->
<cfset objSheet = objPOI.ReadExcel(FilePath = #variables.qDirectory.name#, HasHeaderRow = #variables.headerFlag#, SheetIndex = 0) />
</cfloop>
</cfif>
</cfif>
Any help would be most welcome.
Thanks and regards,
Yogesh MahadnacHi cfSearching,
Many thanks for your reply! I really do appreciate!
However, I've still got 1 more question for you.
At the moment, I'm using POI and sometimes cfx_Excel2Query to read Excel files.
In both cases, you have to specify whether the first row is a header.
How would you read the Excel file to check whether the 1st row is the header?
I've tried using cffile, but I get all sorts of "garbage"
<cffile action="read" file="#variables.filename#" variable="xlsResult">
<cfloop index="i" list="#variables.xlsResult#" delimiters="#chr(13)#&#chr(10)#">
<cfif variables.i eq 1>
<cfoutput>
Test 1st Row: #trim(replacenocase(listgetat(variables.i,1,","),'"',"","All"))#
</cfoutput>
</cfif>
</cfloop>
I get the following output:
ÐÏ à¡± á����.... etc etc
I'd be very much grateful if you could please advise on the latter at your earliest convenience.
Thanks and best regards,
Yogesh Mahadnac -
Do we have Format Checker to test set of Excel files in a Folder
Team,
I need to do Format checking (like Arial Font, Bold etc) for set of Excel files in a Folder. Do we have any tool for that?
Thanks!
KiranHi Kiran,
As far as I know, Microsoft doesn't provide such kind of tools. But If you're familiar with Excel development, you can create your own VBA code or other kind of application(e.g. .Net application) to automate the Excel workbooks in the folder. Use the VBA
code or applications to access the Excel object model to check the cell format.
For example, use this vba code to check if cell A1 is bold:
Sheet1.Range("A1").Font.Bold
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Help! Check data in MS Excel file(JDBC-ODBC)
Hi guys,
I wrote a program that can check data in MS Excel file.
User can input a sentence like "1->2" ,"1->3" (one determine one), then the program can find the data which violate the integrity constrains(functional dependency).For example, if we have the functional dependency "TSeq_gi->TSeq_accver", the program looks for two or more tuples with the same "TSeq_gi" value but the different "TSeq_accver" value in Excel file. These tuples violate the integrity constraint. But now,I can't figure out how to modify this program to multiple determine one. (like 1 3->5 or 1 3 4 5->7) . 1 3 ->5 means: look for 1 and 3 have same value but 5 different. I get stuck. Can some experts help me?
The code and Excel file are in below link. Download and play it! Thank you~~
Karen.
http://us.f1f.yahoofs.com/bc/665bbb4/bc/Java/code.zip?bf6cljAB_wgRYVQf
PS: You need to set up JDBC ODBC driver in MS windows "Administrative Tools" first. Data Souce name is Test .
Main logic class:
class MyActionListener implements ActionListener{
public void actionPerformed(ActionEvent e){
if (e.getActionCommand()=="SEARCH")
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con1= DriverManager.getConnection("jdbc:odbc:Test");
stmt2= con1.createStatement();
input1 = new String(pathTf.getText());
main_loop: while(true){
if (input1.equals("0")){
// break out of while(1)
break main_loop;
st= new StringTokenizer(input1," ,-=>");
while(st.hasMoreTokens()){
// analyze the input stream.
// Attention, the program didn't do the input value check.
input1= st.nextToken();
input2= st.nextToken();
query= "select "+ schema[Integer.parseInt(input1)-1]+ ","+ schema[Integer.parseInt(input2)-1]+ " from [Sheet1$]";
rs2= stmt2.executeQuery(query);
rowCounter= 0;
list1.clear();
list2.clear();
list3.clear();
while(rs2.next()){
// increase the row counter
rowCounter++;
// initial the flag
col1= rs2.getString(1);
col2= rs2.getString(2);
// for the initalization
if (list1.isEmpty()){
list1.addElement(col1);
list2.addElement(col2);
row="Row 2";
list3.addElement(row);
// compare weather exist dependance
else
for (int i=0;i<list1.size();i++){
// if col1 match with the first part of value in the list
if (((String)list1.get(i)).equals(col1)){
// The independence pair match
if (((String)list2.get(i)).equals(col2)){
break;
else
textArea.append("\n"+"Violate Integrity Constraints Found : "+" Row "+ (rowCounter+1)+ " not match with "+ list3.get(i)+".");
System.out.println("\n"+" Row "+ (rowCounter+1)+ " not match with "+ list3.get(i)+".");
break;
// if col1 not match with any value, add a new record in list
else
list1.addElement(col1);
list2.addElement(col2);
row="Row "+ (rowCounter+1);
list3.addElement(row);
}// end of for
}//end of else
}//end of while
}//end of while(1): main_loop
}catch(Exception ex){
//System.err.println(ex);sorry~~I am new here!
class MyActionListener implements ActionListener{
public void actionPerformed(ActionEvent e){
if (e.getActionCommand()=="SEARCH")
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con1= DriverManager.getConnection("jdbc:odbc:Test");
stmt2= con1.createStatement();
input1 = new String(pathTf.getText());
main_loop: while(true){
if (input1.equals("0")){
// break out of while(1)
break main_loop;
st= new StringTokenizer(input1," ,-=>");
while(st.hasMoreTokens()){
// analyze the input stream.
input1= st.nextToken();
input2= st.nextToken();
query= "select "+ schema[Integer.parseInt(input1)-1]+ ","+ schema[Integer.parseInt(input2)-1]+ " from [Sheet1$]";
rs2= stmt2.executeQuery(query);
rowCounter= 0;
list1.clear();
list2.clear();
list3.clear();
while(rs2.next()){
// increase the row counter
rowCounter++;
// initial the flag
col1= rs2.getString(1);
col2= rs2.getString(2);
// for the initalization
if (list1.isEmpty()){
list1.addElement(col1);
list2.addElement(col2);
row="Row 2";
list3.addElement(row);
// compare weather exist dependance
else
for (int i=0;i<list1.size();i++){
// if col1 match with the first part of value in the list
if (((String)list1.get(i)).equals(col1)){
// The independence pair match
if (((String)list2.get(i)).equals(col2)){
break;
else
textArea.append("\n"+"Violate Integrity Constraints Found : "+" Row "+ (rowCounter+1)+ " not match with "+ list3.get(i)+".");
System.out.println("\n"+" Row "+ (rowCounter+1)+ " not match with "+ list3.get(i)+".");
break;
// if col1 not match with any value, add a new record in list
else
list1.addElement(col1);
list2.addElement(col2);
row="Row "+ (rowCounter+1);
list3.addElement(row);
}// end of for
}//end of else
}//end of while
}//end of while(1): main_loop
}catch(Exception ex){
//System.err.println(ex);
} -
Checking for file whether it is excel file or not??
when ever we r download or upload a file we never check for its type...
like when gui_upload fm used then it should be text file ....or
when alsmex_excel_to_internal_table fm used by default check its have 2 be excel file...
but my recomend is when ever download/upload a file its checking its type....
if .xls file then alsmex_excel_to_internal_table fm runs or if .txt then gui_upload runs...
need some type of file checking..
Thanks & regards ,
Sagnik RoyCALL FUNCTION '/SAPDMC/LSM_PATH_FILE_SPLIT'
EXPORTING
pathfile = lf_path "<--Your file path
IMPORTING
pathname = lf_path
filename = lf_name.
CHECK lf_name IS NOT INITIAL.
CALL FUNCTION 'TERM_TRANSLATE_TO_UPPER_CASE'
EXPORTING
langu = sy-langu
text = lf_name
IMPORTING
text_uc = lf_name
EXCEPTIONS
no_locale_available = 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.
IF lf_name CA '.'.
sy-fdpos = sy-fdpos + 1.
IF lf_name+sy-fdpos(*) = 'TXT'(044).
"<---Call your upload fm here
ELSEIF lf_name+sy-fdpos(*) = 'XLS'(045).
"<---Call your upload fm here
ENDIF.
ENDIF. -
I saved my Form Central spreadsheet file once as a excel file but Forms Central will not allow me to save the file a second time as an excel file. I am informed that I cannot complete this action because the file me be open in another application, but it is not open in another application. What is the problem, and how do I solve the problem. Thank you. Jeff
First check the version of the document with Jongware's script "Identify.jsx" (ExtendScript/JavaScript).
You can find it here:
[Ann] Identify Your InDesign File
If it is CS 5.5 or above, you need someone to open it in the version the script says and export an IDML representation from that. Another way would be to install a 30days version of CS6 or above (CC) and do it yourself.
In regards of the script showing a result for InDesign files higher than CS6:
CS7 = CC v9
CS8 = CC v10 = CC-2014 or CC2014.1
Uwe -
hi guru,
I want to upload data from excel file for mm02.. first of all help on the matter of how to upload data from excel...
i hv used the FM ALSM_EXCEL_TO_INTERNAL_TABLE.. but its not working it uploading garbage value ... so tell me how to used it...
help me on this matter.Check below example.
parameters : p_file LIKE rlgrap-filename OBLIGATORY.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
PERFORM get_file_name.
PERFORM get_file_to_excel.
*& Form get_file_name
FORM get_file_name.
DATA: lv_name LIKE sy-repid.
lv_name = sy-repid..
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
program_name = lv_name
dynpro_number = syst-dynnr
static = 'X'
CHANGING
file_name = p_file.
ENDFORM. " get_file_name
*& Form get_file_to_excel
FORM get_file_to_excel.
DATA: idata LIKE alsmex_tabline OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = p_file
i_begin_col = '1'
i_begin_row = '2' "Do not require headings
i_end_col = '2'
i_end_row = '60000'
TABLES
intern = idata
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 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.
STOP.
ENDIF.
* Get first row retrieved
READ TABLE idata INDEX 1.
* Set first row retrieved to current row
DATA: gd_currentrow TYPE i.
gd_currentrow = idata-row.
LOOP AT idata.
* Reset values for next row
IF idata-row NE gd_currentrow.
APPEND f. CLEAR f.
gd_currentrow = idata-row.
ENDIF.
CASE idata-col.
WHEN '0001'.
f-belnr = idata-value.
ENDCASE.
ENDLOOP.
APPEND f. CLEAR f. -
How to upload excel file in application server??
Hi,
How to upload an excel file into internal table in background mode from application server?
ThanksHi vipin,
check this it may help you...
hope below links helps you
Export the report list to Excel Sheet
http://www.sapdevelopment.co.uk/file/file_updown.htm
or below is a sample programme which helps you upload and download
REPORT ytest5 LINE-SIZE 80
LINE-COUNT 65
NO STANDARD PAGE HEADING.
TABLES: dd02l, dd03l.
* selection screen
SELECTION-SCREEN BEGIN OF BLOCK b00 WITH FRAME TITLE text-b00.
SELECTION-SCREEN BEGIN OF BLOCK b01 WITH FRAME TITLE text-b01.
PARAMETERS: tabname LIKE dd02l-tabname OBLIGATORY.
SELECTION-SCREEN END OF BLOCK b01.
SELECTION-SCREEN BEGIN OF BLOCK b03 WITH FRAME TITLE text-b03.
PARAMETERS: path(30) TYPE c DEFAULT 'C:SAPWorkdir'.
SELECTION-SCREEN END OF BLOCK b03.
SELECTION-SCREEN BEGIN OF BLOCK b04 WITH FRAME TITLE text-b04.
PARAMETERS: p_exp RADIOBUTTON GROUP radi,
p_imp RADIOBUTTON GROUP radi,
p_clear AS CHECKBOX.
SELECTION-SCREEN END OF BLOCK b04.
SELECTION-SCREEN END OF BLOCK b00.
* data
DATA: q_return LIKE syst-subrc,
err_flag(1) TYPE c,
answer(1) TYPE c,
w_text1(62) TYPE c,
w_text2(40) TYPE c,
winfile(128) TYPE c,
w_system(40) TYPE c,
winsys(7) TYPE c,
zname(8) TYPE c,
w_line(80) TYPE c.
* internal tables
DATA : BEGIN OF textpool_tab OCCURS 0.
INCLUDE STRUCTURE textpool.
DATA : END OF textpool_tab.
* table for subroutine pool
DATA : itab(80) OCCURS 0.
* events
INITIALIZATION.
PERFORM check_system.
AT SELECTION-SCREEN ON tabname.
PERFORM check_table_exists.
START-OF-SELECTION.
PERFORM init_report_texts.
PERFORM request_confirmation.
END-OF-SELECTION.
IF answer = 'J'.
PERFORM execute_program_function.
ENDIF.
TOP-OF-PAGE.
PERFORM process_top_of_page.
* forms
* FORM CHECK_TABLE_EXISTS *
FORM check_table_exists.
SELECT SINGLE * FROM dd02l
INTO CORRESPONDING FIELDS OF dd02l
WHERE tabname = tabname.
CHECK syst-subrc NE 0.
MESSAGE e402(mo) WITH tabname.
ENDFORM.
* FORM INIT_REPORT_TEXTS *
FORM init_report_texts.
READ TEXTPOOL syst-repid
INTO textpool_tab LANGUAGE syst-langu.
LOOP AT textpool_tab
WHERE id EQ 'R' OR id EQ 'T'.
REPLACE '&1............................'
WITH tabname INTO textpool_tab-entry.
MODIFY textpool_tab.
ENDLOOP.
ENDFORM.
* FORM REQUEST_CONFIRMATION *
FORM request_confirmation.
* import selected, confirm action
IF p_imp = 'X'.
* build message text for popup
CONCATENATE 'Data for table'
tabname
'will be imported' INTO w_text1 SEPARATED BY space.
* check if delete existing selected, and change message text
IF p_clear = ' '.
w_text2 = 'and appended to the end of existing data'.
ELSE.
w_text2 = 'Existing Data will be deleted'.
ENDIF.
CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
EXPORTING
defaultoption = 'N'
textline1 = w_text1
textline2 = w_text2
titel = 'Confirm Import of Data'
cancel_display = ' '
IMPORTING
answer = answer
EXCEPTIONS
OTHERS = 1.
ELSE.
* export selected, set answer to yes so export can continue
answer = 'J'.
ENDIF.
ENDFORM.
* FORM EXECUTE_PROGRAM_FUNCTION *
FORM execute_program_function.
PERFORM build_file_name.
CLEAR: q_return,err_flag.
IF p_imp = 'X'.
PERFORM check_file_exists.
CHECK err_flag = ' '.
PERFORM func_import.
ELSE.
PERFORM func_export.
ENDIF.
ENDFORM.
* FORM BUILD_FILE_NAME *
FORM build_file_name.
MOVE path TO winfile.
WRITE '' TO winfile+30.
WRITE tabname TO winfile+31.
WRITE '.TAB' TO winfile+61(4).
CONDENSE winfile NO-GAPS.
ENDFORM.
* FORM CHECK_FILE_EXISTS *
FORM check_file_exists.
CALL FUNCTION 'WS_QUERY'
EXPORTING
filename = winfile
query = 'FE'
IMPORTING
return = q_return
EXCEPTIONS
OTHERS = 1.
IF syst-subrc NE 0 OR q_return NE 1.
err_flag = 'X'.
ENDIF.
ENDFORM.
* FORM func_export *
FORM func_export.
CLEAR itab. REFRESH itab.
APPEND 'PROGRAM SUBPOOL.' TO itab.
APPEND 'FORM DOWNLOAD.' TO itab.
APPEND 'DATA: BEGIN OF IT_TAB OCCURS 0.' TO itab.
CONCATENATE 'INCLUDE STRUCTURE'
tabname
'.' INTO w_line SEPARATED BY space.
APPEND w_line TO itab.
APPEND 'DATA: END OF IT_TAB.' TO itab.
CONCATENATE 'SELECT * FROM'
tabname
'INTO TABLE IT_TAB.' INTO w_line SEPARATED BY space.
APPEND w_line TO itab.
APPEND 'CALL FUNCTION ''WS_DOWNLOAD''' TO itab.
APPEND 'EXPORTING' TO itab.
CONCATENATE 'filename = ' ''''
winfile '''' INTO w_line SEPARATED BY space.
APPEND w_line TO itab.
APPEND 'filetype = ''DAT''' TO itab.
APPEND 'TABLES' TO itab.
APPEND 'DATA_TAB = IT_TAB.' TO itab.
APPEND 'DESCRIBE TABLE IT_TAB LINES sy-index.' TO itab.
APPEND 'FORMAT COLOR COL_NORMAL INTENSIFIED OFF.' TO itab.
APPEND 'WRITE: /1 syst-vline,' TO itab.
APPEND '''EXPORT'',' TO itab.
APPEND '15 ''data line(s) have been exported'',' TO itab.
APPEND '68 syst-index,' TO itab.
APPEND '80 syst-vline.' TO itab.
APPEND 'ULINE.' TO itab.
APPEND 'ENDFORM.' TO itab.
GENERATE SUBROUTINE POOL itab NAME zname.
PERFORM download IN PROGRAM (zname).
ENDFORM.
* FORM func_import *
FORM func_import.
CLEAR itab. REFRESH itab.
APPEND 'PROGRAM SUBPOOL.' TO itab.
APPEND 'FORM UPLOAD.' TO itab.
APPEND 'DATA: BEGIN OF IT_TAB OCCURS 0.' TO itab.
CONCATENATE 'INCLUDE STRUCTURE'
tabname
'.' INTO w_line SEPARATED BY space.
APPEND w_line TO itab.
APPEND 'DATA: END OF IT_TAB.' TO itab.
APPEND 'DATA: BEGIN OF IT_TAB2 OCCURS 0.' TO itab.
CONCATENATE 'INCLUDE STRUCTURE'
tabname
'.' INTO w_line SEPARATED BY space.
APPEND w_line TO itab.
APPEND 'DATA: END OF IT_TAB2.' TO itab.
APPEND 'CALL FUNCTION ''WS_UPLOAD''' TO itab.
APPEND 'EXPORTING' TO itab.
CONCATENATE 'filename = ' ''''
winfile '''' INTO w_line SEPARATED BY space.
APPEND w_line TO itab.
APPEND 'filetype = ''DAT''' TO itab.
APPEND 'TABLES' TO itab.
APPEND 'DATA_TAB = IT_TAB.' TO itab.
IF p_clear = 'X'.
CONCATENATE 'SELECT * FROM'
tabname
'INTO TABLE IT_TAB2.' INTO w_line SEPARATED BY space.
APPEND w_line TO itab.
APPEND 'LOOP AT IT_TAB2.' TO itab.
CONCATENATE 'DELETE'
tabname
'FROM IT_TAB2.' INTO w_line SEPARATED BY space.
APPEND w_line TO itab.
APPEND 'ENDLOOP.' TO itab.
APPEND 'COMMIT WORK.' TO itab.
ENDIF.
APPEND 'LOOP AT IT_TAB.' TO itab.
CONCATENATE 'MODIFY'
tabname
'FROM IT_TAB.' INTO w_line SEPARATED BY space.
APPEND w_line TO itab.
APPEND 'ENDLOOP.' TO itab.
APPEND 'DESCRIBE TABLE IT_TAB LINES sy-index.' TO itab.
APPEND 'FORMAT COLOR COL_NORMAL INTENSIFIED OFF.' TO itab.
APPEND 'WRITE: /1 syst-vline,' TO itab.
APPEND '''IMPORT'',' TO itab.
APPEND '15 ''data line(s) have been imported'',' TO itab.
APPEND '68 syst-index,' TO itab.
APPEND '80 syst-vline.' TO itab.
APPEND 'ULINE.' TO itab.
APPEND 'ENDFORM.' TO itab.
GENERATE SUBROUTINE POOL itab NAME zname.
PERFORM upload IN PROGRAM (zname).
ENDFORM.
* Form CHECK_SYSTEM
* Check users workstation is running
* WINDOWS 95, or WINDOWS NT.
* OS/2 uses 8.3 file names which are no good for
* this application as filenames created are 30 char
* same as table name.
* You could change the logic to only use the first 8 chars
* of the table name for the filename, but you could possibly
* get problems if users had exported already with a table
* with the same first 8 chars.
* As an alternate method you could request the user to input
* the full path including filename and remove the logic to
* build the path using the table name.
FORM check_system.
CALL FUNCTION 'WS_QUERY'
EXPORTING
query = 'WS'
IMPORTING
return = winsys.
IF winsys NE 'WN32_95'.
WRITE: 'Windows NT or Windows 95/98 is required'.
EXIT.
ENDIF.
ENDFORM. " CHECK_SYSTEM
* FORM PROCESS_TOP_OF_PAGE *
FORM process_top_of_page.
FORMAT COLOR COL_HEADING INTENSIFIED ON.
ULINE.
CONCATENATE syst-sysid
syst-saprl
syst-host INTO w_system SEPARATED BY space.
WRITE : AT /1(syst-linsz) w_system CENTERED.
WRITE : AT 1 syst-vline, syst-uname.
syst-linsz = syst-linsz - 11.
WRITE : AT syst-linsz syst-repid(008).
syst-linsz = syst-linsz + 11.
WRITE : AT syst-linsz syst-vline.
LOOP AT textpool_tab WHERE id EQ 'R'.
WRITE : AT /1(syst-linsz) textpool_tab-entry CENTERED.
ENDLOOP.
WRITE : AT 1 syst-vline, syst-datum.
syst-linsz = syst-linsz - 11.
WRITE : AT syst-linsz syst-tcode(004).
syst-linsz = syst-linsz + 11.
WRITE : AT syst-linsz syst-vline.
LOOP AT textpool_tab WHERE id EQ 'T'.
WRITE : AT /1(syst-linsz) textpool_tab-entry CENTERED.
ENDLOOP.
WRITE : AT 1 syst-vline, syst-uzeit.
syst-linsz = syst-linsz - 11.
WRITE : AT syst-linsz 'Page', syst-pagno.
syst-linsz = syst-linsz + 11.
WRITE : AT syst-linsz syst-vline.
ULINE.
FORMAT COLOR COL_HEADING INTENSIFIED OFF.
LOOP AT textpool_tab WHERE id EQ 'H'.
WRITE : AT /1(syst-linsz) textpool_tab-entry.
ENDLOOP.
ULINE.
ENDFORM.
if it helps you reward with points.
regards,
venu
regards,
venu. -
Opening the Excel file from Application server
Hi All,
I had uploaded an excel file on the application server for using it in my program .
But when i am opening the uploaded file on the Application server it shows some special characters and those are also displayed on my report output while reading the file from the application server.
Please suggest how to get rid of those special characters.
my open data set statement is
OPEN DATASET pg_out2 FOR INPUT IN TEXT MODE ENCODING NON-UNICODE.Hi ,
if it a Excel file ..
do the following..
OPEN DATASET pg_out2 "appl file
FOR INPUT IN TEXT MODE
ENCODING DEFAULT.
IF sy-subrc EQ 0.
DO.
READ DATASET p_infile INTO w_temp.
* Condition To check when cursor reaches End Of file
IF sy-subrc EQ 0.
PERFORM f_split_appl_data.
ELSE.
EXIT.
ENDIF.
ENDDO.
CLOSE DATASET p_infile.
ELSE.
MESSAGE 'Error in opening file' type 'E'.
ENDIF.
FORM f_split_appl_data .
SPLIT w_temp AT ',' INTO : wa_inputfile-plannum ...... "Split at , for excel or CSV file formats at appl files
APPEND wa_inputfile TO t_inputfile.
ENDFORM. " F_SPLIT_APPL_DATA
Prabhudas
Maybe you are looking for
-
EFT for Oracle EBS 11.5.10.2
Hello, We are looking into implementing EFT (Electronic Fund Transfer) functionality in Oracle Applications(Payables) 11.5.10.2. Any idea on what are the seeded payment format programs (i.e. BACS, NACHA,.??) that could be used with minimal or no cust
-
G4 powerbook gets airport reception, g3 doesn't
hi everyone, we have one G4 powerbook and one G3 powerbook, and an airport express. the G4 runs 10.4.2 and the G3 10.3.9. yesterday i set a password for the network, because i realized we could connect using two other networks in our building, and wh
-
How can I download CoolEdit MAC free version?
How can I download CoolEdit MAC free version? How can I find the oldest version of CoolEdit available for MAC? I have MacBook Pro running OSX 10.6.8
-
Date - difference between JDK1.3.1 and 1.4.2 ???
I tried running this piece of code on JDK1.3.1_08 and JDK1.4.2 - and the output i different! Why??? import java.util.Date; import java.util.TimeZone; public class Test { public static void main(String[] args) { long longDate = Long.par
-
ORA-24544 When Creating a Standby From RAC One Node
I have a RAC One Node database running on node A and am attempting to create a Data Guard standby on node B using the following RMAN command - duplicate target database for standby from active database Error returned is - RMAN-00571: ================