API for creating a directory in the application server
Hello,
Does anyone knows a way to create a directory in the application server? Something similar to
CL_GUI_FRONTEND_SERVICES but for managing files in the application server?
Thanks in advance
Diz IsMi
Actually, CL_GUI_FRONTEND_SERVICES=>Directory_Create works really good for me.
REPORT ZRICH_0001 .
data: path type string.
data: rc type sy-subrc.
path = '\172.52.72.651qfilesvr400S109XXXXusrsapTSTSYStest'.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_CREATE
EXPORTING
DIRECTORY = path
CHANGING
RC = rc
EXCEPTIONS
DIRECTORY_CREATE_FAILED = 1
CNTL_ERROR = 2
ERROR_NO_GUI = 3
PATH_NOT_FOUND = 4
DIRECTORY_ACCESS_DENIED = 5
DIRECTORY_ALREADY_EXISTS = 6
UNKNOWN_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.
Regards,
Rich Heilman
Similar Messages
-
How Create Virtual Directory On Oracle Application Server 10g on RHEL 5
Dear Sir
i have deployed my application on OAS 10g on RHEL 5 ,,now since my application is calling some pro*c programs and then they generate some text based reports on fixed folder named
/treas/temp
now i simply have to open these text based reports on web browser
WEB.SHOW_DOCUMENT('/forms/pcreport/'||v_filename);
but for that i need to create virtual directory name : " /pcreport " without code
kindlly help as its working on my developer suit 10g i created a virtual directory in my application server by making following entry in "orion-web.xml" file
<virtual-directory virtual-path="/pcreport" real-path="/u/treas/temp" />
kindlly help(My paths shown, yours will be different)
In a text editor :
/u01/app/oracle/product/midtier/Apache/Apache/conf/httpd.conf
Add
Alias /pcreport/ "/u01/app/oracle/product/midtier/forms/pcreport/"
<Directory "/u01/app/oracle/product/midtier/forms/pcreport/">
Options Indexes
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Create the pcreport directory.
Add a simple test page
vi /u01/app/oracle/product/midtier/forms/pcreport/test.html
<html>
<head>
<title>Simple test page </title>
<style type="text/css">
body {
margin-left: 20%;;
margin-right: 20%;
border: 1px dotted gray;
padding: 10px 10px 10px 10px;
</style>
</head>
<body>
<p>test!</p>
</body>
</html>
Test
http://yourserver.com:7777/pcreport/test.html
Best Regards
mseberg -
Creating a directory & subdirectory on Application Server
I want to create a directory on Application Server which may contain many subdirectories where in i will upload my files from my ABAP Program.
I need to know if dynamic creation of a directory on Application Server is possible though ABAP.
I donot want to create it manually but dynamically depending on the type of file to be put in the directory.If you use the complete path, this actually works. I have tested it in my system. It may not work in background though. I'm on an AS400, so the path is a little different
call function 'GUI_CREATE_DIRECTORY'
exporting
dirname = '//<ip_address>/qfilesvr400/<host>/usr/sap/TST/SYS/Folder1'
exceptions
failed = 1
others = 2.
Regards,
Rich Heilman -
Creating a directory statically in the Application Server
Hi,
I need to create a directory in the application server statically (not through code), in which I later have to store and read files. Most forums talk about doing this through AL11 --> Configure.
While this does create an entry in the directory list in AL11, I doubt if the directory was actually created in the AS. Double clicking this directory name shows an error message in the status bar (Wrong order of calls <- CALL opendir: No such file or directory). So I believe the directory is not created at all.
How do I set up a directory which I can browse and see, and use for creating / reading files?
My AS is on AIX OS.
Thanks,
ZHi,
Yes, Could we not do it from SAP screens?
Go to Al11 and in that you can see a tab Configure.
There you can create the Directory and say Add button
and then Save .
and after that Using
Open Data set ds1 for Output.
will create the File if it is not there .
you can specify the path in which you can create the files.
check this thread as well:
Creating a directory & subdirectory on Application Server
Sachin
Edited by: Sachin Dhingra on Jan 22, 2009 11:02 AM -
How to check whether the Application Server directory exits or not
Hi,
I have a selection screen in which I give the Application server file name(UNIX file) as input. Here, I would like to check whether the Server directory exists or not.
Let us say, the path I gave in the selection screen is /usr/sap/tmp/testfile.txt . Here, the file name is testfile.txt and the server directory is /usr/sap/tmp . I would like to check whether this directory /usr/sap/tmp exists in the server or not. I am not bothered about the file name as I am going to write data into the file. I am mainly concerned about whether the directory exists in the server or not. and one more thing... this is the Application Server path not the Local path.
Can anyone help me on the same how to check whether the server directory exists or not.
Thanks in advance.
Best Regards,
Pradeep.Also you can use the FM EPS_GET_DIRECTORY_LISTING for this purpose.
Store the directory name
l_dpath = p_file+0(l_no).
Validate the directory of the application server
CALL FUNCTION 'EPS_GET_DIRECTORY_LISTING'
EXPORTING
dir_name = l_dpath
TABLES
dir_list = l_i_dlist
EXCEPTIONS
invalid_eps_subdir = 1
sapgparam_failed = 2
build_directory_failed = 3
no_authorization = 4
read_directory_failed = 5
too_many_read_errors = 6
empty_directory_list = 7
OTHERS = 8.
If any problem occurs with the directory then display proper
error message
IF sy-subrc <> 0.
Display error message
MESSAGE e018 WITH 'Problem with directory entered'(008).
ENDIF. " sy-subrc <> 0
Regards,
Joy. -
How to find out the application server instance name?
Hi,
I installed an Oracle application server a long long while ago and completely forgot the things about the installation, including the name of the instance (I installed single instance, not cluster). Now I am trying to create a connection to the application server and I am prompted to fill in the instance name. Where in the installation can I find out the instance name?
The version of the server as displayed when the server is started:
$ ./oc4j -start
Starting OC4J from /oraInventory/j2ee/home ...
09/10/08 16:04:39 Oracle Containers for J2EE 10g (10.1.3.2.0) initializedThis 10.1.3.2.0 number is somewhat confusing. As I understand it, right now if you download a copy of the Application server from Oracle web site, the current version is 10.1.3.1.0.
I am also reading the installation guide now and when looking at the server starting messages on the screen, I realize that installing the server in the oraInventory directory is not quite right. Does that interfere with the correct functioning of the server? I installed it but have never tried to use it until now.
Many thanks for your help!
NewmanJ. Newman wrote:
Hi,
I installed an Oracle application server a long long while ago and completely forgot the things about the installation, including the name of the instance (I installed single instance, not cluster). Now I am trying to create a connection to the application server and I am prompted to fill in the instance name. Where in the installation can I find out the instance name?If you have access to that server, then the following should give the instance name.
grep 'IASname' $ORACLE_HOME/config/ias.properties
you should also see it in the AS Control Console page.
The version of the server as displayed when the server is started:
$ ./oc4j -start
Starting OC4J from /oraInventory/j2ee/home ...
09/10/08 16:04:39 Oracle Containers for J2EE 10g (10.1.3.2.0) initializedThis 10.1.3.2.0 number is somewhat confusing. As I understand it, right now if you download a copy of the Application server from Oracle web site, the current version is 10.1.3.1.0.
Regarding the version numbers, this fourth digit refers to the Component-specific release number. The OAS documentation says this about it.
"This digit identifies a release level specific to a component. Different components can have different numbers in this position depending upon, for example, component patch sets or interim releases."
I am also reading the installation guide now and when looking at the server starting messages on the screen, I realize that installing the server in the oraInventory directory is not quite right. Does that interfere with the correct functioning of the server? I installed it but have never tried to use it until now.
Many thanks for your help!
NewmanI think Oracle software should always be installed in a separate directory. I think it may also generate errors in its functioning but it will certainly create a whole lot confusion and mess in later administration and configurations.
hope that helps!
AMN
Edited by: AMN on Oct 8, 2009 5:14 PM -
Renaming a file on the application server
Hi all,
I create a file on the Application server which I want to rename means a program.
I would like to add the system stamptime at the time the program is running.
sample:
original name:
file.csv
final name:
file_20060626123000.csv
does somebody have an ABAP program to do that ? other ideas?
Thanks in advance,
FedeXThanks for the answers,
I do not what I doing wrong in my sample....
I am using this logical path and logical file in an InfoSpoke..
and I get the error:
"could not open file on application server"
My definitions are:
Logical PATH : Z_PATH_TEST
Syntax Group ->UNIX
<P=DIR_HOME>/<FILENAME>
( I am sure DIR_HOME is set correcty on SAP Directories)
Logical FILE NAME : Z_NAME_TEST
Physical Name :File1_<DATE>.csv
Data Format : ASC
Logical Path: Z_PATH_TEST
What could be wrong here?... Thanks again
FedeX -
Working with File Properties on the Application Server
Hi,
I am looking for a way to get the size of a file existing in a directory in the application server without reading it.
Is there a function module or a static method that returns a file properties exists in the application server?
Thanks,
Eyal.hi Eyal,
fm <b>EPS_GET_FILE_ATTRIBUTES </b>
regards Andreas -
FIle Creation in the Application Server With Unicode-8 and Byte-Order Mark
Hi Guys,
I've requirement of creating a file in the Application server with the Data.
The Data Format Should be in UTF-8 and Byte-Order Mark.
I need to supply this data from SAP to PRMS.
I'm able to create a file with Unicode, but any of the guys have worked on Umicode with Byte-Order Mark, please let me know.
Thanks,
Adi.Hi Mathieu,
If you haven't found an aswer yet, you can check in transaction SE24 CL_ABAP_FILE_UTILITIES method CREATE_UTF8_FILE_WITH_BOM. You can check the code of the method (it's very short) so you can understand how it works. It's also a static method so you can call it directly in your program.
Ex:
CALL METHOD cl_abap_file_utilities=>create_utf8_file_with_bom(your_file_name).
I hope this helps.
Pax Vobiscum.
~ Eric -
BDS: How do I save an attachement to the application server?
Dear all
I have following problem:
We have certain attachements to an object in this case an XML file. These attachements are viewable via the Business Document Navigator and can be exported manually in foreground from there.
But how do I export (copy) it in background towards a directory on the application server? I don't seem to find any function capable of doing that.
So currently I'm thinking of reading the contents (via BDS_BUSINESSDOCUMENT_GET_TAB) and storing it myself via OPEN DATASET on the application server... but if there would be a more general approach I would rather use that.
Please advice!
Thanks in advance!Hi,
Please see below code:-
[http://wiki.sdn.sap.com/wiki/display/HOME/Objectservicefilestoe-mail-(Canbeusedforcustomportal,workflow+applications)]
Hope it helps you.
Regards
Abhii... -
Help/Example needed for creating JMSQueues/JMSTopics using the MBean API
I am trying to create JMSQueues programmatically using the MBean API. When
I use MBeanHome.createAdminMBean(), a queue appears in the root of the
config file. This is progress, but the queue is in the wrong place! I need
the queues to be part of my JMS server's "destinations" as seen on the
console.
So now I am trying to use createConfigurationMBean() instead, but I can't
figure out what the "parent" parameter should be- no documentation! My
first guess was that the parent might be the JMSServer, but that doesn't
work.
Anyone have example code to insert JMSQueues and JMSTopics into a specific
JMS server's destinations?
Here is the code I tried... All goes well until the final
createConfigurationMBean call, where it throws a MBeanCreationException:
// Get the MBeanHome bean
Object obj = jndiContext.lookup("weblogic.management.adminhome");
MBeanHome mbeanhome = (MBeanHome) javax.rmi.PortableRemoteObject.narrow
(obj, MBeanHome.class);
// Get the server MBean
JMSServerMBean jmsServerMB =
(JMSServerMBean)mbeanhome.getMBean("examplesJMSServer",
JMSServerMBean.class);
// Create the new Queue
JMSQueueMBean jmsQMB = (JMSQueueMBean)mbeanhome.createConfigurationMBean
("weblogic.examples.jms.fooQueue", "JMSQueue", jmsServerMB);Ok, I still don't see how I can do it differently with the admin tool. If
you want to see the commands I'm using, I can post them, but the basic one
is shown below in the previous message. We're trying to set up a script so
that developers can just run it and properly configure WebLogic with the
right components.
Thanks,
Michelle
"Michelle Baxter" <[email protected]> wrote in message
news:[email protected]...
I am using the weblogic.Admin tool, not doing this in code. I will attempt
to translate your advice when I get time again.
My commands look like this:
java weblogic.Admin -url 127.0.0.1:7001 -username system -passwordweblogic
CREATE -mbean "mydomain:Type=JMSQueue,Name=MyJMSQueue"
I create this, I create the JMSServer MBean, then do and INVOKE (insteadof
CREATE) and call the addDestination method, adding the JMS Queue MBeanthat
I created previously, using the same naming scheme as in the above CREATE.
"Viresh Garg" <[email protected]> wrote in message
news:[email protected]...
Daron Cole wrote:
You can use createConfigurationMBean with JMSQueueConfig but in the
end
I used
the code below to create a topic.The code that you posted is the right way to create queus/topics. alwayscreate admin mbeans to admin
server and let admin server internally create config Mbeans on the
managed
server as per the
location/targets that you set in admin Mbeans.
Queue's are the same, just replace the word
Topic with Queue and it should work. It should show up in the console
app.
MBeanHome home = (MBeanHome)ctx.lookup(MBeanHome.JNDI_NAME+".myserver");
ServerMBean myserver =(ServerMBean)home.getMBean("myserver",ServerMBean.class);
String topicName = "MyNewTopic";
JMSServerMBean jmsServerMB =(JMSServerMBean)home.getMBean("JMSServer","JMSServer","mydomain");
JMSTopicMBean jmsTopicMB =(JMSTopicMBean)home.createAdminMBean(topicName,"JMSTopic","mydomain");
jmsTopicMB.setJNDIName(topicName);
jmsServerMB.addDestination(jmsTopicMB);
Viresh Garg
Principal Developer Relations Engineer
BEA Systems
"Michelle Baxter" <[email protected]> wrote:
There is no JMSQueueConfigMBean. What do you mean?
"Daron Cole" <[email protected]> wrote in message
news:[email protected]...
Try JMSQueueConfig instead of JMSQueue.
"Michelle Baxter" <[email protected]> wrote:
Me too! I'm trying to use the weblogic.Admin class to set up
queues
and
topics and the JMS server. The same results in the config file:
the
queues
and topic were set up at the root, the JMS server was added, but
no
destinations, even though I invoked the addDestination method withthe
created MBean queues and topic as arguments. No exceptions, just
no
destinations on the JMS server resulted. What's the right order ofexecution
for this stuff??
Thanks,
Michelle
"Jude DeMeis" <[email protected]> wrote in message
news:[email protected]...
I am trying to create JMSQueues programmatically using the MBean
API.
When
I use MBeanHome.createAdminMBean(), a queue appears in the root
of
the
config file. This is progress, but the queue is in the wrong
place!
I
need
the queues to be part of my JMS server's "destinations" as seen
on
the
console.
So now I am trying to use createConfigurationMBean() instead,
but
I
can't
figure out what the "parent" parameter should be- no
documentation!
My
first guess was that the parent might be the JMSServer, but that
doesn't
work.
Anyone have example code to insert JMSQueues and JMSTopics intoa
specific
JMS server's destinations?
Here is the code I tried... All goes well until the final
createConfigurationMBean call, where it throws aMBeanCreationException:
// Get the MBeanHome bean
Object obj =
jndiContext.lookup("weblogic.management.adminhome");
MBeanHome mbeanhome = (MBeanHome)javax.rmi.PortableRemoteObject.narrow
(obj, MBeanHome.class);
// Get the server MBean
JMSServerMBean jmsServerMB =
(JMSServerMBean)mbeanhome.getMBean("examplesJMSServer",
JMSServerMBean.class);
// Create the new Queue
JMSQueueMBean jmsQMB =(JMSQueueMBean)mbeanhome.createConfigurationMBean
("weblogic.examples.jms.fooQueue", "JMSQueue", jmsServerMB); -
ABEND while creating file in the application server
Dear All,
Please provide the solution for the following.
REPORT ZMAIN.
SELECT BKORM UP TO 1000
EXTRACT ext.
ENDSELECT
Imagine, now the extract file having 1000 Entries
Reading the above EXTRACT file
LOOP .
submit ZSUB.
ENDLOOP.
End OF Main Program----
REPORT ZSUB.
SELECT BKORM UPTO 500
EXTRACT ext.
ENDSELECT
Here for each submit of the ZSUB, it is creating one EXTRACT file in the application server. When it reaching to create 999, it is going for ABEND.
Can anybody provide the solution to avoid going for ABEND .
Is there any restriction to create extract files in the applciation server?
Thanks in advance.Instead of select/endselect, try to use a loop with internal tables..
There's no limit in the extracts you can do..
<removed by moderator>
Edited by: Thomas Zloch on Nov 2, 2010 5:20 PM - please do not ask for... -> Ok
Edited by: Roberto Vacca on Nov 2, 2010 5:29 PM -
F4 help for file path in the Application server
Hi All,
i want to provide the F4 help so as to enable us to give the file path in the application server (AL11). I'm in version 4.0
Regards
ShekharHi
Copy paste the following code and see the result
Here you can see 2 types of open dialogs
1. Directory View
2. File View
Use any one as per your requirement.
DATA : l_filetable TYPE filetable,
l_rc TYPE i.
DATA: l_folder TYPE string,
l_file TYPE string.
PARAMETERS: p_folder(100) TYPE c,
p_file(100) TYPE c.
*Provide a Dialogue box for getting a folder path
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_folder.
CALL METHOD cl_gui_frontend_services=>directory_browse
EXPORTING
window_title = 'Select Folder Path'
initial_folder = 'D:\'
CHANGING
selected_folder = l_folder.
p_folder = l_folder.
*Provide a Dialogue box for getting a file path
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
window_title = 'Select a Text File'
initial_directory = l_folder
CHANGING
file_table = l_filetable
rc = l_rc.
Reward points generously
Regards
Akshay Chonkar
READ TABLE l_filetable INTO p_file INDEX 1.
CHECK sy-subrc <> 0. -
ABAP Code for Backup the entire table data in the application server
Hello Friends,
I have to create the table data Backup and Store the entire table data in the application server and also be able to restore the data back if needed.
this should be dynamic program for any table based on the table name given on the application server.. I have developed a program for this but its having problems with the Quantity, amount. Its not writing it correctly at the application level.
ANy Suggestions on this.
Below is the program for this.
Thanks,
Ster.
* Report YWMM_TABLE_DUMP *
REPORT ywmm_table_dump .
TABLES :
dd03l.
* Type spool declaration
TYPE-POOLS:
abap, slis.
DATA: i_table_data1 TYPE REF TO data.
DATA : it_dd03l LIKE dd03l OCCURS 0 WITH HEADER LINE.
*DATA : gt_fieldcat TYPE lvc_s_fcat.
DATA : i_fcat TYPE STANDARD TABLE OF lvc_s_fcat,
l_dr_line TYPE REF TO data,
l_v_as4vers TYPE as4vers.
FIELD-SYMBOLS: <f_table_data1> TYPE STANDARD TABLE,
<f_wa_table_data1> TYPE ANY.
SELECTION-SCREEN: BEGIN OF BLOCK bl1 WITH FRAME TITLE text-001.
PARAMETERS: rb_copy RADIOBUTTON GROUP map DEFAULT 'X',
rb_rest RADIOBUTTON GROUP map.
SELECTION-SCREEN: END OF BLOCK bl1.
SELECTION-SCREEN: BEGIN OF BLOCK bl2 WITH FRAME TITLE text-002.
PARAMETERS: p_table TYPE tabname OBLIGATORY,
p_plfld TYPE dd03l-fieldname.
SELECTION-SCREEN SKIP 1.
PARAMETERS: p_bkfile TYPE localfile OBLIGATORY.
SELECTION-SCREEN: END OF BLOCK bl2.
PERFORM get_data.
IF rb_copy = 'X'.
PERFORM backup.
ELSEIF rb_rest = 'X'.
PERFORM database_update.
ENDIF.
*& Form get_data
FORM get_data.
CLEAR i_fcat.
REFRESH i_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = p_table " Table Name
CHANGING
ct_fieldcat = i_fcat
EXCEPTIONS
OTHERS = 1.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = i_fcat
IMPORTING
ep_table = i_table_data1.
IF sy-subrc = 0.
ASSIGN i_table_data1->* TO <f_table_data1>.
ELSE.
WRITE: 'Error creating internal table'.
ENDIF.
IF rb_copy = 'X'.
SELECT * FROM (p_table) INTO CORRESPONDING FIELDS OF
TABLE <f_table_data1> UP TO 20 ROWS.
ELSEIF rb_rest = 'X'.
CREATE DATA l_dr_line LIKE LINE OF <f_table_data1>.
ASSIGN l_dr_line->* TO <f_wa_table_data1>.
*Get Data from Application Server
* Opening the dataset P_BKFILE given in the selection screen
TRANSLATE p_bkfile TO LOWER CASE.
OPEN DATASET p_bkfile FOR INPUT IN TEXT MODE." ENCODING DEFAULT.
IF sy-subrc NE 0.
* MESSAGE:
ELSE.
DO.
* Reading the file from application server
READ DATASET p_bkfile INTO <f_wa_table_data1>.
IF sy-subrc = 0.
APPEND <f_wa_table_data1> TO <f_table_data1>.
ELSE.
EXIT.
ENDIF.
ENDDO.
* Closing the dataset
CLOSE DATASET p_bkfile.
ENDIF.
ENDIF.
ENDFORM. " get_data
*& Form backup
* text
* --> p1 text
* <-- p2 text
FORM backup.
TRANSLATE p_bkfile TO LOWER CASE.
OPEN DATASET p_bkfile FOR OUTPUT IN TEXT MODE.
IF sy-subrc NE 0.
WRITE: text-017.
STOP.
ELSE.
LOOP AT <f_table_data1> ASSIGNING <f_wa_table_data1>.
TRANSFER <f_wa_table_data1> TO p_bkfile.
ENDLOOP.
ENDIF.
CLOSE DATASET p_bkfile.
ENDFORM. " backup
*& Form database_update
FORM database_update.
DATA : i_mara_u TYPE STANDARD TABLE OF mara WITH HEADER LINE,
i_ekpo_u TYPE STANDARD TABLE OF ekpo WITH HEADER LINE,
i_eban_u TYPE STANDARD TABLE OF eban WITH HEADER LINE,
i_resb_u TYPE STANDARD TABLE OF resb WITH HEADER LINE,
i_plpo_u TYPE STANDARD TABLE OF plpo WITH HEADER LINE,
i_stpo_u TYPE STANDARD TABLE OF stpo WITH HEADER LINE,
i_vbap_u TYPE STANDARD TABLE OF vbap WITH HEADER LINE,
i_vbrp_u TYPE STANDARD TABLE OF vbrp WITH HEADER LINE,
i_lips_u TYPE STANDARD TABLE OF lips WITH HEADER LINE,
i_afvc_u TYPE STANDARD TABLE OF afvc WITH HEADER LINE,
i_asmd_u TYPE STANDARD TABLE OF asmd WITH HEADER LINE,
* i_cooi_u TYPE STANDARD TABLE OF cooi WITH HEADER LINE,
i_qmel_u TYPE STANDARD TABLE OF qmel WITH HEADER LINE,
i_cooi_u TYPE STANDARD TABLE OF cooi WITH HEADER LINE,
i_esll_u TYPE STANDARD TABLE OF esll WITH HEADER LINE,
i_t165_u TYPE STANDARD TABLE OF t165 WITH HEADER LINE,
i_t165e_u TYPE STANDARD TABLE OF t165e WITH HEADER LINE,
i_twpko_u TYPE STANDARD TABLE OF twpko WITH HEADER LINE,
i_tpext_u TYPE STANDARD TABLE OF tpext WITH HEADER LINE,
i_ce4mxpa_u TYPE STANDARD TABLE OF ce4mxpa WITH HEADER LINE,
i_ce4mxpa_acct_u TYPE STANDARD TABLE OF ce4mxpa_acct WITH
HEADER LINE,
i_zaim_u TYPE STANDARD TABLE OF zaim WITH HEADER LINE,
i_s012_d TYPE STANDARD TABLE OF s012 WITH HEADER LINE,
i_s012_i TYPE STANDARD TABLE OF s012 WITH HEADER LINE,
i_dummy TYPE STANDARD TABLE OF mara.
CASE p_table.
WHEN 'MARA'.
* Non-Key
PERFORM move_to_table USING <f_table_data1>
CHANGING i_mara_u[]
i_mara_u.
PERFORM update_table USING i_mara_u[].
ENDCASE.
ENDFORM. " database_update
*& Form move_to_mara
FORM move_to_table USING p_tab_from TYPE STANDARD TABLE
CHANGING p_tab_to TYPE STANDARD TABLE
p_w_table.
DATA: l_wa_fcat TYPE lvc_s_fcat.
FIELD-SYMBOLS: <f_field_from> TYPE ANY,
<f_field_to> TYPE ANY.
LOOP AT p_tab_from ASSIGNING <f_wa_table_data1>.
LOOP AT i_fcat INTO l_wa_fcat.
ASSIGN COMPONENT l_wa_fcat-fieldname
OF STRUCTURE <f_wa_table_data1> TO <f_field_from>.
ASSIGN COMPONENT l_wa_fcat-fieldname
OF STRUCTURE p_w_table TO <f_field_to>.
<f_field_to> = <f_field_from>.
ENDLOOP.
APPEND p_w_table TO p_tab_to.
ENDLOOP.
ENDFORM. " move_to_mara
*& Form update_table
FORM update_table USING p_table_update TYPE STANDARD TABLE.
SELECT SINGLE *
FROM dd03l
WHERE fieldname = p_plfld
AND tabname = p_table
AND keyflag <> 'X'
AND as4local = 'A'
AND as4vers = l_v_as4vers
AND ( comptype = 'E' OR comptype = space ).
IF sy-subrc = 0.
* Do update
IF NOT p_table_update IS INITIAL.
UPDATE (p_table) FROM TABLE p_table_update.
IF sy-subrc = 0.
COMMIT WORK.
ELSE.
ROLLBACK WORK.
WRITE: text-003.
STOP.
ENDIF.
ENDIF.
ELSE.
*delete and insert.
IF NOT p_table_update IS INITIAL.
* DELETE (p_table).
IF sy-subrc = 0.
INSERT (p_table) FROM TABLE p_table_update.
IF sy-subrc = 0.
COMMIT WORK.
ELSE.
ROLLBACK WORK.
WRITE: text-018.
STOP.
ENDIF.
ELSE.
ROLLBACK WORK.
WRITE: text-018.
STOP.
ENDIF.
ENDIF.
ENDIF.
ENDFORM. " update_table
Edited by: Julius Bussche on Jul 18, 2008 1:43 PM
Please use a meaningfull subject title!ARS,
I am struggling a bit to get this.
there is a syntax error,
Field "FIELDS_INT-TYPE" is unknown. It is neither in one of thespecified tables nor defined by a "DATA" statement.
Again you have asked to move to a diffrent table. What is that table and how to build it.
LOOP AT <f_table_data1> ASSIGNING <f_wa_table_data1>.
LOOP AT i_fcat INTO l_fcat.
IF l_fcat-inttype EQ 'P'.
ASSIGN COMPONENT l_fcat-fieldname
OF STRUCTURE <f_wa_table_data1> TO <f_field>
TYPE fields_int-type
DECIMALS fields_int-decimals.
ELSE.
ASSIGN COMPONENT l_fcat-fieldname
OF STRUCTURE <f_wa_table_data1> TO <f_field>
TYPE fields_int-type.
ENDIF.
" Move <f_field> to a new table and use this table for download
ENDLOOP.
TRANSFER <f_wa_table_data1> TO p_bkfile.
ENDLOOP.
Ster -
API to create Purchase Order in Oracle applications?
Hi All,
Can you please tell me the API to create Purchase Order in Oracle Applications.Hi,
Pl. review the followng link.
How To create/update a Standard Purchase Order/Blanket Purchase Agreement/Quotation through PDOI process (Doc ID 1406003.1)
Maybe you are looking for
-
Filter not working for session timeout
Hi all, I am working on a struts application in portal. I want to logout of the application when a user does not perform any action, for say 30 mins. For this, i am using a filter and defined the filter as follows in web.xml. <filter> <filter-name>Pa
-
Settlement rules not getting created
Hi, During period end, all 2nd level WBS elements are generally settked to AuCs. I had maintained the settlement strategy in such a way that all the WBS elements below 2nd level are settled to its Superior. When i tested this in one of the Client, it
-
PDF output in a new window.
Hi All, Thers an application in MVC where on clicking a button a popup comes with three options OPEN/SAVE/CANCEL .If the user clicks the OPEN button , a new window comes up with the PDF file icon in it .On clicking this PDF File icon the PDF document
-
Linking Subforms from page one to page 2
Hello to who can help me, I am looking to link a subform from page one of the document and have it flow into page two. I have a series of expandable text boxes in the subform and the text is flowing perfectly. However, the form needs to run onto the
-
Lining up two tracks in Multitrack
Hi Is there a way of accurately lining up tracks I only can do it by dragging one or the ot her and tis is too coarse .Anyway it can be done minutely like you can moving the cursor with the arrows Audition Pro 2