Function FUNCTION FILE_GET_NAME and table FILENAMECI
I have an ABAP program that calls FUNCTION 'FILE_GET_NAME' with only the logical_filename and operating_system parameters. ex:
CALL FUNCTION 'FILE_GET_NAME'
EXPORTING
logical_filename = 'Z_SAP_TO_GAINS'
operating_system = 'NT'
IMPORTING
file_name = g_output
EXCEPTIONS
file_not_found = 1
OTHERS = 2.
This gets the physical file name correctly when run / debugged in DEV/TST and PRD.
ex:
DEV :
serverT01\GAINS2\test\
TST :
serverT01\GAINS2\test\
PRD :
serverP01\GAINS01\
I can see that FILENAMECI has different entries for Physical file (FILEEXTERN) in DEV and TST than it does in PRD. I have read that transaction FILE can be used to maintain this Physical path, but it seems that best practice is to transport that from DEV. How then, is our file path in FILENAMECI different in PRD? Moreover, what is the best way to change this so that the function will retrieve the correct server name path when run in each environemnt. Apparently the parameters to replace nodes in the physical path name were not used when this was designed.
Is there a way to maintain the path without making ABAP changes to the application program?
Thanks for your help!
Jeremy
Hi Shailesh,
Thank you for the response. I understand, and have found, that the way to change the FILENAMECI entries in TST and PRD is to migrate them. Unfortunately, since the file paths need to be different in those environments, migrating a static file path from DEV all the way to PRD doesn't meet the need for DEV and TST once it is migrated. I can see how this would be great if the substitution design had been in place for this file path/name, but it was static and didn't allow for "variable substitution".
I did not have time with the project to rework this, so I did what the previous developer must have done and migrated it to PRD static for PRD and will rename FILENAMECI again afterwards, and re-migrate that file name as far as TST.
When time allows, after this project is closed, I'm committed to cleaning this mess up.
Thanks
Jeremy
Similar Messages
-
How to find function module's and tables used for the particulat screen or TCODE?
Hello Nation,
I would like to know how to find the function modules and tables used for the particular screen or TCODE or program.
Example : I would like know the function module used in the program RDBGFT?
How can i find that?
Thanks in advance ,Awaiting your reply.Make use of Find function with the keyword "CALL FUNCTION".
Make use of the same find function with the keyword "Select" to know the database tables used.
Regards,
Philip. -
FILE_GET_NAME and FILE
Hi Experts,
Can any one explain the use of Function moudule File_Get_name and the use of Transaction Code FILE.Hi Sir,
Below is the complete details of FM's you have been lookin for with code also.
Plz go through it.
Plz do reward if useful.
Thankx.
Transaction code FILE allows you to create a logical path name and the fiel
name.
Platform-independent file names are used in applications programs by the function module FILE_GET_NAME. For a given logical file name, the function module generates the corresponding platform-specific file name at runtime, based on definitions stored in customizing tables for converting platform-independent file names.
The following table gives an overview of its import and export parameters and of its exceptions.
Table: Interface of function module FILE_GET_NAME
IMPORT parameter
Function
CLIENT
Logical file names can be client-specific. Here you can specify the client to be used. The current client as stored in the system field SY-MANDT is used as default.
LOGICAL_FILENAME
Here you specify the logical filename. (Uppercase letters must be used!)
OPERATING_SYSTEM
Here you can specify the operating system for which to generate the appropriate file name. The application server's operating system as stored in the system field SY-OPSYS is used as default.
PARAMETER_1
PARAMETER_2
Here you can specify values that substitute the placeholders <PARAM_1> and <PARAM_2> in physical file names and paths.
USE_PRESENTATION
_SERVER
Specifies that the presentation server's operating system be used as the basis for generating a platform-specific file name.
WITH_FILE_EXTENSION
Specifies that the logical file name's data format be used as filename extension.
USE_BUFFER
Specifies that the customizing tables for converting platform-independent file names be buffered in main memory.
EXPORT parameter
Function
EMERGENCY_FLAG
If the returned value is not SPACE, then no physical path has been found for the logical filename under the current operating system. In this case the path specified in the profile parameter DIR_GLOBAL will be used as physical path.
FILE_FORMAT
Returns the data format defined for the logical file name. You can use this parameter to decide in which mode to open the file. It is also required as a parameter for DOWNLOAD of files to the presentation server.
FILE_NAME
Returns the fully instantiated platform-specific file name and path.
Exceptions
Function
FILE_NOT_FOUND
Raised if logical file name is not defined.
OTHERS
Raised if other errors occur.
If the function module cannot find a physical path for the current operating system (see parameter EMERGENCY_FLAG), this may have various causes:
the operating system is not defined in the customizing tables
the operating system is not assigned to a syntax group
no physical path is assigned to the logical path for the relevant syntax group
no logical path is assigned to the logical file name.
Assume that in the customizing tables for platform-independent file names the following definitions exist for the logical file name DATA_FILE and the logical path DATA_PATH:
DATA_FILE phys. file: file<PARAM_1>
data format: BIN
logical path: DATA_PATH
DATA_PATH syntax group: UNIX phys. path: /tmp/<FILENAME>
syntax group: DOS phys. path: c:\tmp\<FILENAME>
Assume also that the application server's operating system has been assigned to syntax group UNIX while the presentation server's operating system has been assigned to syntax group DOS.
The following two calls of the function module will then return the respective values.
CALL FUNCTION 'FILE_GET_NAME'
EXPORTING
LOGICAL_FILENAME = 'DATA_FILE'
PARAMETER_1 = '01'
IMPORTING
EMERGENCY_FLAG = FLAG
FILE_FORMAT = FORMAT
FILE_NAME = FNAME
EXCEPTIONS
FILE_NOT_FOUND = 1
OTHERS = 2.
Returned values:
FLAG:
FORMAT: BIN
FNAME: /tmp/file01
CALL FUNCTION 'FILE_GET_NAME'
EXPORTING
LOGICAL_FILENAME = 'DATA_FILE'
USE_PRESENTATION_SERVER = X
WITH_FILE_EXTENSION = X
IMPORTING
EMERGENCY_FLAG = FLAG
FILE_FORMAT = FORMAT
FILE_NAME = FNAME
EXCEPTIONS
FILE_NOT_FOUND = 1
OTHERS = 2.
Returned values:
FLAG:
FORMAT: BIN
FNAME: c:\tmp\FILE.BIN -
Doubt in export, import and table para when creating Function Module
Dear fellow ABAPers,
I have a doubt in defining export, import and table parameter while creating a function module.
I am calling a function module inside a user exit. Now in the user exit the SAP fills an internal table called i_lfa1 with all the data user has eneterd.
Now I want to pass this whole internal table to function module and the perform some checks on the values of internal table.
After that function module fills an error structure with values depending on some check.
1)
How do I pass this internal table to function module ?
When I am creating function module in se37 where do I define this iternal table type ? Is it in Import or Table parameter during function module creation?
2)
Where do I define error structure type (which is returned by function module to main program)? Is it in Export or table parameter during function module creation?
Please clear my doubt..
Relevant points will be awarded.
Regards,
Tushar.Hi Tushar,
1. How do I pass this internal table to function module ?
I assume u are creating your own Y/Z FM.
Pass it thru TABLES parameter.
2. When I am creating function module in se37 where do I define this iternal table type
Define this in TABLES interface.
What Type ?
THE SAME TYPE WHICH HAS BEEN DEFINED
WHILE PASSING IN THE USER-EXIT FUNCTION MODULE.
IF U SEE THE FM OF THE USER-EXIT,
U WILL COME TO KNOW.
3.
Where do I define error structure type (which is returned by function module to main program)? Is it in Export or table parameter during function module creation?
Define it in TABLES interace. (not in export, import)
(Since what u are going to return is an internal table)
U can take for eg. BDCMSGCOLL.
OR u can create your own Y/Z structure
for the same purpose.
(or u can use the structure type T100)
I hope it helps.
Regards,
Amit M. -
Certain Numbers templets allow you to drag and drop contacts to populate cell data, how can I create that functionality in my own tables?
If you haven't come across the workarounds thread you may find helpful tips there on this and other ways to work with Numbers 3.
ronniefromcalifornia discovered how to bring contacts into Numbers 3. As described in this post:
"Open Contacts
Select all the cards you want
Copy
In Numbers, in a table, select cell A1
Paste
Boom. Works great. Even brought in the pictures. Cool."
So instead of drag and drop, just select in Contacts, copy, and paste into Numbers
SG -
Can i use create function for MSSql scalar and table valude function.
Hi,
1) Can i use create function for MSSql scalar and table valued function?
2) How many type of user defined function are there in oracle 11g express?
3) And can i reture any "type" form user defined function?
yourse sincerely944768 wrote:
Q1)That means even if i return predefined types like integer, varchar2 then also PGA is used ?The data type does not determine where the variable is stored. A string (called a varchar2 in Oracle) can be stored in stack space, heap space, on disk, in a memory mapped file, in a shared memory, in an atom table, etc.
It is the who and what is defining and using that string, that determines where and how it is stored.
The Oracle sever supports 2 languages in PL/SQL. The PL (Programming Logic) language is a procedural/declarative language. It is NOT SQL. SQL is integrated with it. The PL/SQL engine uses private process memory (PGA). So PL/SQL variables exist in the PGA (but there are exceptions such as LOBs).
Q2) So please suggest me solution in oracle.Sounds to me you are looking at how to implement a T-SQL style function as an Oracle function, and once implemented, do joins on the function.
Do not use PL/SQL in SQL in place of a SQL select. It is not T-SQL.
One cannot use PL/SQL to create functions along the style of T-SQL, where the function executes a SQL using some conditional logic, and then return as if the function was a native SQL select.
T-SQL is an extension to the SQL language - making it a hybrid and very impure language implementation. PL is based on ADA - part of the Pascal family of languages. The E-SQL (embedded SQL) approach used in languages like C/C++, Cobol and Ada, has been transparently done in PL/SQL. You can write and mix PL code and variables with SQL code. And the PL/SQL engine figures out how to make the call from the PL/SQL engine to the SQL engine.
But PL/SQL is not "part" of the SQL language and does not "extend" the SQL language in a T-SQL fashion.
So you need to check your SQL-Server preconcepts in at the door, as they are not only irrelevant in Oracle, they are WRONG in Oracle.
The correct way in Oracle, in a nutshell - Use the SQL language to do data processing. Use PL/SQL to manage conditional process flow and the handling of errors. -
Function Reference and Table Sort
I have a table that I use to track numerical data to a fixed size table.
After adding new data I sort the columns, for example in descending order.
My question is this, is it possible to specify the references in say the Average Function to refer to the same cells, eg the bottom 10, in the table and not be affected by the sort. Another way to describe this is that I would like to always average the bottom 10 cells and not have this change with the sort command.
thank youThanks to both of you.
In fact I was not satisfied.
the initial formula assumes that every cells in the column are filled (minus the bottom one used ase a fake footer)
For those whose use doesn't match this requirement, here is an enhanced one.
=AVERAGE(OFFSET($A$1,COUNT(B)+1-10,1,10,1))
I wrote +1-10 to make clear what is done:
+1 because the COUNT() function doesn't count the header row
-10 to leave 10 filled cells in the calculated range
Jerry : it seems that you missed that I often used this function to define a range of cells. I must say thank you to Bugs Hunters because some months ago I asked them because I didn't correctly understood the function's behavior and they took time to explain what I missed.
While working on this question, I encountered what I feel as a gap in the Help. It states:
To copy cells within or between tables, drag selected cells while holding down the _Option key_ . Any values in the destination cells are replaced.
They forgot to add: "and then drag the selection by its border" as it is written for the move feature.
An alternate protocol works to move a group of cells:
select such a group
press the shift key.
drag the selected block where we want.
Yvan KOENIG (from FRANCE mardi 14 octobre 2008 19:31:42) -
VO query with SQL table function (MS SQL) and update of parameter value
Hello All,
I use VO where Query is the SQL function that returns a table (MS SQL Server):
select * from getData('XXXX')
where ‘ХХХХ’ should be binded to the specific ID (e.g. selected row in the tree view on the another facet).
More details: I have two facets. Left facet contains a tree view that displays the list of the projects grouped by industry. Right facet contains a pivot table (source query is a ‘table function’ from above).
I want to have the pivot table (right facet) to be updated with the data specific to the project (selected row in the tree).
I know about the possibility to dynamically update the where clause (setNamedWhereClauseParam method), but in my case there is no ‘where’ clause. Is there any kind of ‘bind variable’ to be used to refresh the data?
Any guidance, ideas, examples are greatly welcome.
With best wishes,
AnatolAre the columns that are being selected different each time or the same?
If they are the same then you don't need to do any additional binding - the pivot table is connected to the VO at design time and it wouldn't care if the underlying from/where have changed.
If on the other hand your columns change (but the number of them stay the same) then use aliases for the initial definition (select ename a, id b, salary c) and then when you change the VO change the mapping but keep the names (select dname a, moo b, foo c).
If the whole query is changing and you don't know in advance the structure - then there is no out of the box solution with a pivot table - you'll need to code a backing bean that will provide the data model to the pivot table based on your query. -
Can we move SAP standard Function Group and Table defintion to BW
Dear Forum,
We are in a pilot process of migrating SAP R/3 Custom development objects to our BW client and we have a few questions that we would like to know if possible.
We are currently in the To Be Blueprint Phase of migrating SAP 45B to ERP2005 as a Ramp-Up customer and we need to determine as soon as possible the feasibility of moving one particular Custom application
from our SAP R/3 environment to BW. This application primarily performs computational processing and does reporting of the results at the
conclusion
We have selected one Custom R/3 ABAP program to do a pilot to determine the feasibility of migrating it to the BW platform. This Custom program utilizes objects from standard SAP Function Groups which are non existent in BW. In this particular case Function groups KMS0
(Cost Center Selection) and KAB2 (CO Reporting: General).
Questions:
Are we allowed to move these 2 standard SAP Function Groups to BW ? Would it alter the BW environment integrity as intended and designed by SAP?
If we move the Function Group KMS0 and KAB2 will
SAP support our BW environment if we decide to move them?
Would it be considered a SAP Best Practice to move standard SAP R/3
objects to BW?
Thank you in advance for your help,
Paulo Silveira
[email protected]Hi Paulo and welcome on board !
Please don't post twice the same question...(look in the other one...)
..and don't forget to rewards the answers...it's THE way to say thanks here !
Anyway, I'd suggest to close this thread to avoid to receive answers in both threads...
Cheers,
Roberto -
Function module file_get_name
functionality of FILE_GET_NAME.
hi Venu,
Check this out
http://help.sap.com/saphelp_45b/helpdata/en/2a/fa02b7493111d182b70000e829fbfe/content.htm
FU FILE_GET_NAME
Text
Assign the Physical File Name Using a Logical File Name
Functionality
R/3 applications run on various platforms with various file systems. This function module enables you to use platform-independent logical file names in your application programs.
Based on definitions maintained in customizing tables for platform-independent file names, the function module converts a logical file name to the corresponding physical file name and path for the hardware platform concerned.
For this conversion to work for different platforms, the definition of a logical file name must include a logical file path, which in turn is converted to different physical file paths, depending on the particular platform. The platform-specific file name returned by the function module is composed of the physical file path for the current platform and the physical file name associated with the logical file name. Placeholders in physical file and path names are substituted at runtime by the corresponding current values.
Example
logical file name: MONTHLY_SALES_FILE
physical file name: VALUES<PARAM_1>
logical path: SALES_DATA_PATH
physical path (UNIX): /usr/<SYSID>/<FILENAME>
physical path (Windows): C:\SALES\<FILENAME>
Example 1
Get file name for UNIX platform
(current system: K11)
CALL FUNCTION 'FILE_GET_NAME'
EXPORTING
LOGICAL_FILENAME = 'MONTHLY_SALES_FILE'
IMPORTING
FILE_NAME = FILE
FILE_FORMAT = FORMAT.
Result:
FILE = /usr/K11/VALUES
FORMAT = WK1
Example 2
Get file name for UNIX platform, passing a parameter
(current system: K11)
CALL FUNCTION 'FILE_GET_NAME'
EXPORTING
LOGICAL_FILENAME = 'MONTHLY_SALES_FILE'
PARAMETER_1 = '_TST'
IMPORTING
FILE_NAME = FILE
FILE_FORMAT = FORMAT.
Result:
FILE = /usr/K11/VALUES_TST
FORMAT = WK1
Example 3
Get file name for WINDOWS platform, with file name extension
CALL FUNCTION 'FILE_GET_NAME'
EXPORTING
LOGICAL_FILENAME = 'MONTHLY_SALES_FILE'
WITH_FILE_EXTENSION = 'X'
IMPORTING
FILE_NAME = FILE
FILE_FORMAT = FORMAT.
Result:
FILE = C:\SALES\VALUES.WK1
FORMAT = WK1
Notes
All definitions needed for the platform-independent assignment of file names are maintained client-independently with transaction FILE. Logical file names (but not logical file paths) can also be defined specifically for the current client with transaction SF01. Transaction SF07 generates a list of current definitions.
The following concepts are used in the platform-independent assignment of file names:
Logical file name
A descriptive name for a file which is associated with these values:
physical file name
file format
logical file path.
If no logical file path is specified, the function module returns the physical file name only; placeholders are substituted by current values.
Physical file name
The physical file name may contain placeholders.
Logical file path
A descriptive name for a path which is associated with these values:
syntax groups (groups of operating systems)
physical file paths.
Physical file path
The physical file path is defined for a particular syntax group. It must contain the reserved word <FILENAME> as a placeholder for the file name. It may also contain other placeholders.
Operating system
Presentation server and application server can run under different operating systems. The current value for the application server can be obtained from the system field SY-OPSYS, the value for the presentation server by calling function module WS_QUERY.
Both operating systems must be defined and assigned to a syntax group.
Syntax group
Group of operating systems with a common syntax for file and path names (e.g. HP-UX and SINIX).
Placeholder
Reserved words, set in angle brackets, which can be included in physical file and path names (e.g. <DATE>, <FILENAME>). You can find information on possible reserved words in the online help (F1 help) for the fields physical file name and physical file path when maintaining platform-independent file names with transaction FILE.
If the logical path associated with a logical file name does not specify a physical path for the current operating system (syntax group), the path stored in the profile parameter DIR_GLOBAL of the current system is used for generating a complete platform-specific file name.
Parameters
CLIENT
LOGICAL_FILENAME
OPERATING_SYSTEM
PARAMETER_1
PARAMETER_2
PARAMETER_3
USE_PRESENTATION_SERVER
WITH_FILE_EXTENSION
USE_BUFFER
ELEMINATE_BLANKS
EMERGENCY_FLAG
FILE_FORMAT
FILE_NAME
Exceptions
FILE_NOT_FOUND
Function Group
SFIL
Regards,
santosh
Message was edited by: Santosh Kumar P -
Memory leak in JCO when calling an ABAP-function that returns larg tables
Hello everybody,
I think discovered a memory leak in JCO when the calling functionions that have exporting tables with large datasets. For example the ABAP-function RFC_READ_TABLE, which in this example I use to retrieve data from a table called "RSZELTTXT", which contains ~ 120000 datasets. RFC_READ_TABLE exports the data as table "DATA".
Here a simple JUnit test:
http://pastebin.ca/1420451
When running it with Sun Java 1.6 with standard heap size of 64mb I get a heapsize OutOfMemory error:
http://pastebin.ca/1420472
Looking at the heap dump (which I unfortunately cannot post here, because of it' size), I can see that I've 65000 char[512] array objects in my heap, which don't get cleaned up. I think, each char[512] array stands for one dataset in the exporting table "DATA", since the table contains 120000 datasets, the heap is full after the first 65000 datasets are parsed. Apparently, JCO tries to read all datasets in memory instead of justing reading the dataset to which the pointer (JCoTable.setRow(i)) currently points to and releasing it from memory after the pointer moves forward ...
Did anybody else experience this?
Is SAP going to remove to issue in upcoming versions of JCO?
regards SamirHi,
Check Below links
1) How To Analyze Performance Problems JCO
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/3fbea790-0201-0010-6481-8370ebc3c17d
2) How to Avoid Memory Leaks
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c3e598fe-0601-0010-e990-b8622840c8c2
Salil...
Edited by: salil chavan on Jun 2, 2009 5:21 AM -
Function module to get table description
Is there any function module to get table description on passing table name
Hi,
We need to use : 'G_RW_TABLE_DESCRIPTION_GET' function module.
we pass the table name and the language.
call function 'G_RW_TABLE_DESCRIPTION_GET'
exporting
rw_table = p_table
langu = sy-langu
importing
tab_text = l_tabtext
exceptions
others = 1.
thanx. -
Advanced functions,UDF's and node function
Dear all,
Can you kindly let me know about Advanced functions,UDF's and node function.Differences and Uses.
Also Let me know about the advantages,Disadvantages of Graphical,XSLT,Java,ABAP and ABAP XSLT mappings.
Thanks,
SriniHi,
The term Mapping means:
1. The transformation process, and/or
2. The transformation rules.
Independently from XI, you can distinguish two different mappings
Structure mappings transform entire message structures.
Value mappings transform values within messages.
Mapping Programs to Map Messages :
Message Mapping
Designed by using the graphical mapping editor of Integration Builder
Result: Generated Java Code.
Imported Archives
Import externally defined mapping programs into repository
Java mapping:
Implemented by using a specific interface
XSLT mapping:
Runtime supports XSLT processor
Java methods can be called from within a Style Sheet
ABAP Mapping
You can execute mapping programs in a sequence
The exchange infrastructure supports three types of mappings:
Message mappings that can be designed using a graphical mapping editor in the Integration Builder. As a result, Java code is generated from the graphical representation that is compiled before it can be executed on the integration server.
You can implement your own Java mapping by implementing a specific interface of the mapping API.
You can implement an XSLT mapping
For the latter two, there is no tool support in XI. It is expected that they are developed using external development tools. To make them available for the integration server, they have to be imported into the integration repository as JAR
files before (JAR: Java Archives).
Developers can even decide to combine the different mapping technologies:
Message mappings, XSLT mappings and Java mappings can be combined in a sequence by means of an interface mapping.
XSLT mappings can use java functions
Message mappings support user-defined functions that can use imported java packages of the same namespace.
In SAP XI, there is 3 types of mappings. Namely
XSLT Mapping
Java Mapping
ABAP Mapping
Here is the details of each mapping.
XSLT Mappings (ABAP Engine)
Interface descriptions are in the form of XML documents. XSL Transformation (XSLT) is a member of the XML family of languages. It describes how an XML structure is transformed into another XML structure.
Customers can develop an XSLT mapping by using the Transformation Editor of the ABAP Workbench. Such XSLT mappings are executed at runtime on the ABAP Engine of the Integration Server.
To simplify matters, this section refers to XSLT mappings of the ABAP Engine as transformation programs to differentiate them from XSLT mappings from imported archives that are executed on the J2EE Engine.
Features
XPath and <xsl:include>
You can define mappings using XSLT together with XPath. XPath is also a specification of the XML family. Using XPath you can address any node in an XML document. XSLT implements XPath expressions to select substructures of an XML document. Using templates in XSLT you can define the mapping rules for the selected substructures.
You can use the XSLT tags <xsl:include> and <xsl:import> to include predefined templates for substructures in a complete mapping definition. In this way, you can reuse mappings for data types.
Java Mapping
You can implement mapping programs in Java. To process XML documents, use Java API for XML Processing (JAXP), for example. The JAXP supports the Document Object Model (DOM) and the Simple API for XML (SAX). This gives you great flexibility for mapping definitions with Java.
Implementation Considerations
Java mapping programs are not permitted to be stateful. You are therefore not permitted to perform actions such as writing data to a database table during a Java mapping. The Integration Server cannot track such side effects. Therefore, if an attempt is made to resend a message that has not been received by the receiver, the data may inadvertently be written to the database twice in a Java mapping.
If you use JRE classes in your Java mapping programs then the same program restrictions apply as for Enterprise Java Beans (EJBs). For a detailed description of these restrictions, see the relevant EJB specification. It is important that you also refer to the information under Scope of Functions in Runtime Environment (Java Mappings).
The runtime environment for Java mappings has an mapping API. To use Java mapping, you must define a Java class that implements the Java interface com.sap.aii.mapping.api.StreamTransformation. This interface has two methods:
● public void execute(java.io.InputStream in, java.io.OutputStream out)
At runtime, the Integration Engine calls this method to execute a mapping. This method contains an input stream for the source document and an output stream for the target document as parameters. These streams are usually XML documents. You can import the substructures to be converted from the input stream and output the converted target document in the output stream.
● public void setParameter(java.util.Map param)
The Integration Engine transfers parameters to the mapping program with this method. It evaluates these parameters at runtime in the method execute(). This enables you to control the process flow of the mapping.
The transferred object that implements the Java interface java.util.Map contains seven key/value pairs as parameters. These correspond to corresponding fields in the message header. Apart from the MAPPING_TRACE constant, the value objects are of type java.lang.String. The key objects are defined in the class com.sap.aii.mapping.api.StreamTransformationConstants
ABAP Mappings
ABAP mappings are mapping programs in ABAP objects that customers can implement using the ABAP Workbench.
Features
An ABAP mapping comprises an ABAP class that implements the interface IF_MAPPING in the package SAI_MAPPING.
Exception: CX_MAPPING_FAULT
Applications can decide themselves in the method EXECUTE how to import and change the source XML document. If you want to use the XSLT processor of SAP Web AS, you can use the ABAP Workbench to develop a stylesheet directly (see XSLT Mappings (ABAP Engine)) rather than using ABAP mappings.
Runtime Constants
In ABAP mapping you can read access message header fields. To do this, an object of type IF_MAPPING_PARAM is transferred to the EXECUTE method. The interface has constants for the names of the available parameters and a method GET, which returns the respective value for the parameter name. The constants are the same as in Java mappings, although the constant MAPPING_TRACE does not exist for ABAP mappings. Instead, the trace object is transferred directly using the parameter TRACE of the method IF_MAPPING~EXECUTE
Example: Accessing a Runtime Constant
Method IF_MAPPING~EXECUTE.
Get mapping constant SENDER_SERVICE
data: l_sender_service type string.
l_sender_service = param->get( IF_MAPPING_PARAM=>SENDER_SERVICE ).
ENDMETHOD.
These r excellent websites which contain PPT & PDF documents on mapping:
Excellent PDF Document on Mapping
http://help.sap.com/bp_bpmv130/Documentation/Operation/MappingXI30.pdf
Mapping Development with the ABAP Workbench
http://help.sap.com/saphelp_nw04/helpdata/en/10/5abb2d9df242f6a62e22e027a6c382/content.htm
ABAP Mappings
http://help.sap.com/saphelp_nw04/helpdata/en/ba/e18b1a0fc14f1faf884ae50cece51b/content.htm
how to create a flat file out of an IDoc-XML by means of an ABAP mapping program and the J2EE File Adapter.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a
How to Use ABAP Mapping in XI 3.0
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e3ead790-0201-0010-64bb-9e4d67a466b4
Hope this will help you, and don't forget to close this thread.
Regards
Aashish Sinha
PS : reward points if helpful -
Function Module for creating Functional Location BOM and Equipment BOM
Hi All,
Is there any function module for creating and changing Functional Location BOM and Equipment BOM ???Hi,
Tables for Eq., BOM: EQST, STKO, STPO.
Tables fro Fun., Loc., BOM: TPST, STKO, STPO.
You can use FMs: CS_BOM_EXPL_TPL_V1, CS_BOM_EXPL_EQU_V2 & CS_BOM_EXPL_MAT_V2 for extracting the appropriate BOM related data.
And for the Alternatives please check the customizing or check with your respective Module experts for the appropriate configuration.
Hope this helps.
Best Regards, Murugesh AS -
TABLE FUNCTION OR CAST WITH TABLE FUNCTION
Consider following scenario:
I've a function which returns nested table of employees.
I am calling this function in some other procedure and building a query dynamically.
Sample code looks like
CREATE OR REPLACE PROCEDURE TEST_PROC( P_EMP_ID IN NUMBER,
O_EMP_LIST OUT SYS_REFCURSOR) IS
v_tbl_emp_id tbl_emp_id;
begin
v_tbl_emp_id := fn_get_usr_list (P_EMP_ID);--fetches employee id reporting to given emp id
v_select_clause :=
'SELECT EMP_NO,EMP_NAME,DEPT_NO';
v_from_clause := ' FROM EMP';
v_where_clause1 :=
' WHERE emp_no IN (
SELECT COLUMN_VALUE
FROM TABLE
(CAST
(:v_tbl_emp_id AS tbl_emp_id
--AND I AM APPENDING AND CLAUSES BASED ON VARIOUS CONDITION
v_qry := v_select_clause || v_from_clause|| v_where_clause1;
OPEN O_EMP_LIST FOR v_qry USING v_tbl_emp_id;
END TEST_PROC;I CAN REWRITE THE SAME CODE AS
CREATE OR REPLACE PROCEDURE TEST_PROC( P_EMP_ID IN NUMBER,
O_EMP_LIST OUT SYS_REFCURSOR) IS
begin
v_select_clause :=
'SELECT EMP_NO,EMP_NAME,DEPT_NO';
v_from_clause := ' FROM EMP';
v_where_clause1 :=
' WHERE emp_no IN (
SELECT COLUMN_VALUE
FROM TABLE(fn_get_usr_list (:P_EMP_ID)))';
--AND I AM APPENDING AND CLAUSES BASED ON VARIOUS CONDITION
v_qry := v_select_clause || v_from_clause|| v_where_clause1;
OPEN O_EMP_LIST FOR v_qry USING P_EMP_ID;
END TEST_PROC;Now I would like to know which one performs better
USING TABLE ALONE OR USING CAST ALONG WITH THE TABLE FUNCTION?
AND PLEASE HELP ME ON FORMATTING CODE.
I've added tags still its not formatting!!
Thanks,
NM
Edited by: user10862473 on Apr 11, 2011 12:14 AM
Edited by: BluShadow on 11-Apr-2011 09:13
fixed {noformat}{noformat} tagsTo be sure which is better you will have to test them both. You can use either AUTOTRACE or Oracle trace (tkprof) to get run metrics - system resources used when running both versions of the query. AUTOTRACE won't provide CPU information, but if you can find the qieries in (G)V$SQL you can find it there. Oracle trace is more effort but should provide more metrics. I could do it if I have privileges :(..
All I can do is check the time taken by the both procedures using set timing on, which gives same result for both.
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.07Thanks,
NM
Maybe you are looking for
-
Create an Apple ID and added to Family Sharing but want to change it to a Child account. I didn't want to use the @icloud.com address as it already has an existing email address. Is this possible?
-
I just upgraded to itunes 10 and tried to download a few movies and an app. Everytime it starts to download I get the error 3256 on the App and 3150 on the movies. From what I've seen it is a router issue, I have reset the router, turned of my wire
-
VERY simple find and execute script to be improved
hello, I've been searching for other scripts like the following but have found nothing, so decided to hack this together. I have almost 0 bash programming experience, so I'm sure some kind soul could easily improve it. The functionality should be obv
-
Saveas ... yet again
using Acrobat Pro v9, visual studio 2003 VB.Net I am struggling to find a working solution to use the saveas method to save a file in a different format. In this case, I am trying to export PDF to TIF programatically, but might want to adapt to other
-
I am not able to access my yahoo mail from my apple mail app. From past 2 days I a
I am having problems with my yahoo mail with iPhone when ever I try to access it from 3 days I am having trouble. I get an error tht my user or password must be wrong and tht I cannot acces my mail. Even though I type and use the correct password and