Use of Custom ABAP Function in ABAP Extractor

We are extracting PSA data out of BW system, and encountering CR/LF errors within text columns coming out of PSA.
There is ABAP coding to handle the problem:
REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>newline IN <I_O_PARAMETER> WITH ' '.
REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>cr_lf IN <I_O_PARAMETER> WITH ' '.
Is it possible to somehow insert this custom coding into our BOBJ XI32 ABAP dataflows? Note, we do not want to create a custom development for the problem from within SE38 - we want to send the code from Data Services.
Thanks,
Doug

Copy the definition in a Type Group (SE11 - Uilities - Other Dictionary objects) in an Abap syntax, include the type group in function group and program top includes via a [TYPE-POOLS|http://help.sap.com/abapdocu_70/en/ABAPTYPE-POOLS.htm] statement (before Release 7.0, EhP2).
Regards,
Raymond

Similar Messages

  • Sorting a Collection with dynamic columns using a custom compare function for multiple columns

    I need help and ideas on how to sort a ListCollectionView.  My problem is complicated by 3 requirements-
         1. The column values contain HTML tags that needs to be removed before sorting (use custom compareFunction to strip HTML)
         2. The columns are dynamic, so dataField names are not known at compile time (need a single compareFunction for all columns)
         3. The data is used in an AdvancedDataGrid so multi-column sorting is required
    I have figured out how to solve any 2 of the 3 requirements.  However, I am having difficulties supporting all 3 requirements.
    Any help or ideas would be greatly appreciated.  Thanks.

    After playing with this some more I think I've figured out a solution.  This seems to work in initial testing.  Also, there is not a need to capture the current sort column in the headerRelease event which many offered solutions suggested.  Another benefit to this solution is that keyboard initiated sorting is handled also.  Whereas the headerRelease event is only triggered by a mouse click on the column header and special handling is required if the user uses the keyboard to access the column header.
    One point that I don't understand is how ascending/decending order is determined.  Behavior seems to be different between a single SortField versus multiple SortFields.  Notice how the compareResults are handled for the different situations.  Anyone out there know why???
     private function colSortCompareFunction(obj1:Object, obj2:Object, fields:Array = null):int{
         var compareResults:int = 0; 
         var newObj1:Object = new Object(); 
         var newObj2:Object = new Object();
          // should not be a condition that is met   
         if (_dataProviderDetails.sort.fields == null)     {
              var s:Sort = new Sort(); 
              var f:Function = s.compareFunction; 
              return f.call(null, obj1, obj2, fields);     }
         // when a single column is selected for sorting   
         else if (_dataProviderDetails.sort.fields.length == 1)     {
              var firstFld:SortField = _dataProviderDetails.sort.fields[0];
              newObj1[firstFld.name] = stripHTML(obj1[firstFld.name]as String);          newObj2[firstFld.name] = stripHTML(obj2[firstFld.name]
    as String);
              compareResults = ObjectUtil.compare(newObj1[firstFld.name], newObj2[firstFld.name]);
               return compareResults;     }
         // when multiple columns are selected for sorting   
         else       {
              for each (var fld:SortField in _dataProviderDetails.sort.fields)          {
                   newObj1[fld.name] = stripHTML(obj1[fld.name]
    as String);               newObj2[fld.name] = stripHTML(obj2[fld.name]
    as String);
                   compareResults = ObjectUtil.compare(newObj1[fld.name], newObj2[fld.name]);
                    if (compareResults != 0)               {
                        if (fld.descending)                    {
                             return compareResults * -1;                    }
                        else                      {
                             return compareResults;                    }
               return compareResults;     }
    Does anyone see any problems with this solution?
    NOTE:  stripHTML(String) is a simple function using regular expression to remove HTML tags.
    Thx

  • Computing of the shortest path using a custom cost function in Oracle NDM

    Hi to all,
    I have Oracle 10g R2, I'm working on Oracle Network Data Model. I created a Network (named ITALIA_NET) based on links table (named ITALIA_LINK$) and nodes table (named ITALIA_NODE$).
    Until now I computed the shortest path between two nodes using the 10gR2 NDM Java API, in particular I used the shortestPath() method.
    I know that this method computes the shortest path between two nodes on the base of the values of a field that can be the lenght OR the travel time of the links.
    What I wish to do is compute the shortest path between two nodes with a function that considers ( at the same time ) more parameters and on the base of them returns a path. For example, I want compute the shortest path taking into account these parameters for the links:
    travel times of links
    gradient links
    tortuosity links
    Infact, I have for each link the costs of: travel time (for example 3 minuts for cross the link), gradient (for example, the link has 2% of gradient) and tortuosity (for example, the link has two curves of 60° of angle).
    Do you have any idea how I can implement this?
    Are there other ways for reach this objective?
    I hope I explained well my objective.
    Thank you very much to all in advance.

    _1) If I convert the values of the other cost columns into the values of the primary cost column (time is ok), what is the formulation for do this conversion?_
    The modeling part is the most difficult part. I am not sure if there is a universal conversion formula between two different costs.
    One recommendation is to use time as your primary cost.
    For any other secondary costs, collect some data (or from some published statistics) on how these costs affect the travel time (based on the actual speeds wrt to gradients and tortuosity).
    I am not an expert on this. Maybe asking questions like,
    Q. how will a road of gradient = 10 deg affect the speed, uphill and downhill compared to the speed limit?
    Once you have a good estimates on the speeds, you can compute the travel times as the distance/length of the link is known. The same applies to tortuosity,
    Q. how will roads with 30/60/90 deg angles affect the travel speeds compared to the speed limit?
    Assuming you are using something like the speed limit as you normal travel speed to compute your travel time.
    _2) After conversion, how can I combine these columns?_
    Say if you have done the conversion part in Step 1, you have 3 costs,
    cost1, cost2, and cost3
    You can create a view on the link table with the combined link cost as (cost1+cost2+cost4) or
    you can create a new column that sums up the costs you want and use it as the link cost.
    hope it helps!
    jack

  • Bpel Server Does Not Catch Exceptions Thrown By Custom Xpath Functions

    Hi.
    I am using some custom xpath functions in a bpel process and whenever they fail I get an XPathExecutionError with summary:
    XPath expression failed to execute.
    Error while processing xpath expression, the expression is "<my function>", the reason is FOTY0001: type error.
    Please verify the xpath query.
    I am forcing my function to fail by giving a wrong input, which should result in an XPathFunctionException("Input does not respect format").
    There is a note on Metalink with ID 458434.1 on this subject which says that patch 5926809 should fix my problem.
    Patch 5926809 fixes Bug 5926809 - ORA:PARSEESCAPEDXML XPATH EXPRESSION FAILED TO EXECUTE FOTY0001: TYPE ERROR.
    I am using it, but it does not work :(
    I am using version 10.1.3.3.0 of App Server with various patch sets, including fix for bug 5926809.
    Has anyone suggestions on how to overcome this problem?
    Thanks

    Hello,
    I am trying to add a custom xpath function to the BPEL server, and I see that you made it work. I am using Oracle SOA Suite 10.1.3.3 and jDeveloper 10.1.3.4. I am using this function inside an xsl mapping file, although I am able to compile and deploy the Bpel Process to the server, it stops mapping where I placed the function and I have not seen any meaningful message from the domain/log/ files.
    Can you tell me how you did it?
    I think you will tell me faster than Oracle support, I already placed an SR but they just give me superficial advice.
    I appretiate your time and advice,
    Guillermo

  • Custom XSLT Functions Throw Exception

    Hi,
    I have following requirement-
    1. I have defined and configured some custom XSLT functions in Jdev and BPEL, which throw exception in case of an error.
    2. Now I want to catch that exception in my BPEL process
    3. In My BPEL process I have defined transformation step ( which is using those Custom XSLT functions) in a scope and added a catch branch to that
    4. But even XSLT java function throw an exception , it is not being catch by catch branch.
    Could you please help me regarding this and tell me any other way to catch an exception in BPEL process thrown by Custom XSLT function within transformation step?
    Thanks.

    Hi,
    Its the problem with the date. In the configuration file i used dateTime for java.util.Date, because of this i cant see "User Defined" option in Jdeveloper component pallete. I checked at XML data types i had seen dateTime for java.util.Date Class, but its not working.
    Do anyone created a custom xslt function which has date as parameter or return type?, If so wht they had used as data type for xml and java.
    Thanks,
    RR

  • Question about Custom Escalation Function

    I want to use a Custom Escalation Function described on this document:
    http://docs.tpu.ru/docs/oracle/en/owl/E14571_01/integration.1111/e10224/bp_workflow.htm#BACHEFDH
    I want to execute a custom function on task EXPIRATION.
    Main Question: The "Custom Escalation Function" is just for Escalation or i can use too for EXPIRATION ?
    Thanks.
    Victor Jabur

    Okay Experts. The problem is solved. There was no problem with the custom key figure function. The problem was with the sales order data. The sales order details for the material in question were under the "make to order" segment and the other transaction data info was in the "make to stock" segment.
    Once i found this out , i tried loading someother material and it worked perfectly.
    Thanks
    Aparna

  • Unable to start several servers using the custom. authentication and authorization Provider

    I downloaded the Sample Security Providers (http://developer.bea.com/managed_content/direct/SampleSecurityProvidersUnmanaged.zip)
    and followed the user guide for installation.
    We have following configuration:
    - One domain with 3 servers :
    - ADM: admin, console
    - WTL_1 : WebTool server 1
    - WTL_2 : WebTool server 2
    WTL_1 and WT_2 are member of cluster WTL_Cluster
    I try to restart all servers. It worked fine for the first one (ADM), but for
    the other two I got followinf exception:
    ####<Nov 13, 2002 10:29:02 AM CET> <Emergency> <WebLogicServer> <isoit652.bbn.hp.com>
    <WTL_1> <main> <kernel i
    dentity> <> <000342> <Unable to initialize the server: Fatal initialization exception
    Throwable: java.lang.SecurityException: Authentication denied: Boot identity not
    valid
    java.lang.SecurityException: Authentication denied: Boot identity not valid
    at weblogic.security.service.SecurityServiceManager.doBootAuthorization(SecurityServiceManager.java:1024)
    at weblogic.security.service.SecurityServiceManager.initialize(SecurityServiceManager.java:1166)
    at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:697)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:589)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:277)
    at weblogic.Server.main(Server.java:32)
    Do you have any idea why it worked only for one server?
    Thanks for any help
    My Chi

    Hi John,
    Actually, thanks to your examples, I have my Authentication Scheme setup using a custom authentication function that first checks that the Username/Password are valid, and if so, then validates that the user has also been setup in AD with one of the groups used by my application. What I'm wondering is, when I replace the built-in Authentication Function it appears that the function that I code must have the correct signature (accepts UserName and Password, and returns a boolean)... but I really want to be able to also return the actual AD Group that the user is assigned to for use within my Authorization Schemes. I'm not sure if/how I can do this from my authentication function, or if I just need to re-query AD again in my Authorization Schemes to get the AD group that the user is assigned to.
    Appreciate the help,
    Lori

  • Customer block VD05, for SO customized partner function

    Dear all,
    Good day!
    I was trying to block customer using VD05, to ensure this customer will not be used in SD Transaction, SO, DO, Billing.  It works for the Sold to party, Ship to party partner function in documents, but doesnt work for the customised partner function for eg ZC - Consignee.
    Is there anyway to make blocked customers, cannot be used in customized partner function as well?
    Thanks in advance
    Kevin

    Hi,
    In your case, I would use userexits to check it in customer updation, SO documents, invoices and so on.
    I hope this helps you,
    Regards,
    Eduardo

  • Notification custom callback function

    Hi,
    I want use a custom callback function instead of the default wf_engine.cb.
    Can someone tell me how to proceed?
    Thanks.

    Hi Dany,
    Is your scenario is where you have a custom application and want to complete that application process using the callback function? In such cases, you should be using the callback function.
    You should the Notification APIs to send such notifications. The Notification Send API includes a parameter for the Custom Callback function.
    The Notification API section of the workflow guide also documents the signature and other details of a custom callback function.
    Workflow also provides a Post Notification Function api which could perform back-end logic to either validate the legitimacy of the forward/transfer or execute some other supporting logic.
    Hope this helps,
    Raja

  • Crystal Reports for VS2010 using a custom SAP ABAP function module data source

    I recently worked with Crystal Reports 2011 and was able to connect and retrieve data from our R/3 system via an ABAP function module. While researching other features, I found this version that can be installed into Visual Studio 2010. The parameters are not very user friendly in Crystal Reports so I was hoping to create a custom dialog to collect my report parameters.
    Does anyone know if I were to install Crystal Reports for Visual Studio 2010, would I be able to design a front-end selection screen in a Visual Basic form and then pass the input to through the Crystal Reports connection to my ABAP function module to retrieve the data filtered on the back-end by the selection screen parameters and return the results to be reported in the Crystal Reports output?
    I am using Visual Studio 2010 Professional Visual Basic with the .NET Framework 4.0 on 32-bit Windows 7. I was able to connect to our R/3 system in Crystal Reports 2011, so if I were to install Crystal Reports for VS2010, would there be a similar way of connecting to SAP?
    Any assistance or direction would be greatly appreciated.
    Thanks,
    Bryan

    Hello Bryan
    I don't know for sure, but I doubt this will work in CRVS2010. Only hope is that the utility available for download in this KBA will point you in the right direction.
    - Ludek
    Follow us on Twitter
    Got Enhancement ideas? Try the SAP Idea Place
    Share Your Knowledge in SCN Topic Spaces

  • BW/ABAP- Function module is called infinitely by Datasource Extractor.

    Hi All,
    A quick ABAP question related to Function Modules and BW data source extractors.
    I’ve written a function module to select data from a database and simply output the data as a table. I then created a text Datasource using transaction rso2 and set it to Extraction by Function Module.
    When I test this using transaction rsa6, I can manipulate the number of calls to my function module using the Display Extra Calls field.
    However, when I test this using transaction rsa1, my function module seems to be called infinite times. So, the number of records being retrieved is increasing exponentially and finally ends with a dump.
    My question: Do I need to include something in my code such that the Function Module by itself will only be called once?
    Or is there some configuration for the Datasource that will limit my function module call to once only.
    Tried so far
    • Introducing a static variable in the function module that exits as soon as the value is greater than 1.
    o Is there another way out?
    Regards,
    Preethi.

    You need to raise the EXEPTION NO_MORE_DATA afte the last record is populated in the output table. Otherwise the program goes into an infinite loop.
    * From now on records get fetched from the database or gets read from the internal table
        FETCH NEXT CURSOR v_cursor
                   APPENDING CORRESPONDING FIELDS
                   OF TABLE <internal table>
                   PACKAGE SIZE i_s_if-maxsize.
        IF sy-subrc <> 0.
          CLOSE CURSOR v_cursor.
          RAISE no_more_data.
        ENDIF.
    * Populate the Output Data Structure into table E_T_DATA and you need to raise the EXEPTION NO_MORE_DATA and close the cursor to avoid any memory leaks

  • How to use RTRIM function in ABAP

    Hey,
    I have a question on using trim function in ABAP. According to all documents, I should be able to use rtrim as
    shorttext = rtrim('abcde-xx', '-xx').
    But when I do that, it gives me an error message "Comma without preceding colon (after shorttest?)"
    Anyone can tell me why is this happening? how should I use this trim function? And for me to cut off variable's last few character, what else method can I use? 
    Thank you very much.

    DATA : T1    TYPE STRING VALUE 'abcde-xx',
                T2    TYPE STRING  VALUE '-xx'.
    REPLACE T2 INTO T1 WITH SPACE.
    WRITE :/, T1.
    result output is :    'abcde'.
    regards
    Guna

  • Duration of an Abap Function call from Java using Jco3

    Hi guys!
    I would like to use this discussion to get some refernces of the duration Timespan of an RFC call from Java to SAP. At the moment, i need at last about 200ms to call the Abap function. I'm just using one simple import and export parameter (so no deep structures). I think that the reason for my poor performance is, that the Java Tool and the SAP instance are not in the same network. So, i hope some of you have some data, how fast an RFC call from Java using Jco can be executed.
    greetings, Hannes

    Hi Hannes,
    I think you have already got the answer to your question - the network set-up you have is probably the bottleneck.  Whenever I've worked with Java <-> ABAP and they are in the same network, I've had no performance problems at all.
    Does your RFC contain any complex logic or business processes?  Are you able to try and call something that does nothing, say it just accepts an input string and returns it straight away as an export.  Do you have any scope for testing with your Java tool on the same network as the SAP system?
    Cheers,
    G.

  • ABAP function module for Customer Specific Status

    I am looking for a standard ABAP function module that will return the customer specific status for a person. 
    Please let me know if any exists.
    Thanks,
    Harini

    Customer specific status for a person .
    Could you pleasee give more details...for what purpose  you are trying to get the status of a person. so that it will be easy for everyone to search

  • Using ABAP Function Modules

    ABAP Function Modules are available to Crystal Reports through the SAP Integration Kit. The look like tables when listing them in the Database Expert.
    How do you use them? Specifically, I am trying to use READ_TEXT to retrieve into a report the contents of STXL.
    Thanks!
    Luis

    Connect the following fields in the database expert:
    STXL
    TDOBJECT
    TDNAME
    TDID
    TDSPRAS
    TO FOLLOWING CORRESPONDING FIELDS OF READ_TEXT
    I_OBJECT
    I_NAME
    I_ID
    I_LANGUAGE
    LATER USE "T_LINES.TDLINE[Text Line]" as output.

Maybe you are looking for