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.

Similar Messages

  • Chatting using ABAP Function module

    Hi,
    Is there some function module or report available in ABAP where we can kind of chat with the other user in same client ?
    Regards,
    Tushar

    Hi Tushar. This is Stallone Christian from Gujarat, India.
    I have developed Chat Application in SAP ABAP with Multi User support, Saving History, Auto Refresh, Ping status, Long Text, Etc.
    For more detail and screen shots please refer,
    http://scn.sap.com/community/abap/blog/2012/06/02/sap-abap-chat-box-v-10-chat-application-in-sap
    Stallone Christian
    WWW.SAPABAPCODES.COM

  • Abap function module http_post and umlaut characters

    I am using abap function module HTTP_POST to frame xml and send the data to our middleware system 'CASTIRON'.
    Everything works fine but when there are any umlaut characters in xml, the function HTTP_POPST is unable to transmit the data and is creating SM21 updation failures. We are on ECC 6.0 unicode system.
    Any help is vey much appreciated.

    Are you using a CDATA tag to encapsulate your data. Try doing it.

  • 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

  • Using a function module in ABAP Query

    Hi All,
    I want to use a function module in ABAp query in the Record Processing Section.
    In the report program we click on Pattern button to inser the function module so that all the Importing and exporting parameter automatically appears.
    Similarly is there any particular method of inserting a function module in ABAp Query.
    Regards
    Manipal Parkala

    When you are doing the infoset for the query (SQ02) you can add coding by clicking the coding tab. You can chose in wich event you want your coding and there is Pattern Button for  you to easy use.
    If you don't want to put the code in the infoset just in the query then is not posible.
    Nevertheless, I higly descourage the use of coding in queryies. If you need to insert some coding make an ALV its easier, clearer and much easier to mantain.
    Hope it helps.

  • ABAP Function Module where-used in BI-Transformations

    Hi,
    we have developed some ABAP-Z-Function-Modules. These are used in several BI-Data-Transformations and work fine and performant.
    The problem we have now is to find out in which transformation a Function-Module is used.
    The where-used-list in SE37 doesn't report any BI-Transformations althought I check all categories.
    Got anyone a solution for our problem?
    Christian

    Hi,
    see this code for function module where used list only for transformation . i used the same code as bhaskar specified..but little modification..here u used "date_get_week" function module..
    TYPE-POOLS slis.
    DATA fcat1 TYPE slis_t_fieldcat_alv.
    DATA: BEGIN OF t_display OCCURS 0,
             targetname LIKE rstran-targetname,
             sourcename LIKE rstran-sourcename,
             tranid LIKE rstran-tranid,
             routine LIKE rstran-startroutine,
             line_no LIKE rsaabap-line_no,
             line LIKE rsaabap-line,
    END OF t_display.
    data : input(75) type c.
    DATA : input_pattern1(75) TYPE c.
    DATA : input_pattern2(75) TYPE c.
    DATA : same_source(30) TYPE c.
    **Internal table declerations**************************************
    TYPES:  BEGIN OF t_trans_lookup_finder,
             targetname TYPE rstran-targetname,
             sourcename TYPE rstran-sourcename,
             tranid TYPE rstran-tranid,
             routine TYPE rstran-startroutine,
             line_no TYPE rsaabap-line_no,
             line TYPE rsaabap-line,
    END OF t_trans_lookup_finder.
    DATA: i_lookup_finder TYPE STANDARD TABLE OF t_trans_lookup_finder,
      wa_lookup_finder TYPE t_trans_lookup_finder,
      i_trans_lookup_finder TYPE STANDARD TABLE OF t_trans_lookup_finder,
      wa_trans_lookup_finder TYPE t_trans_lookup_finder,
      i_trans_final TYPE STANDARD TABLE OF t_trans_lookup_finder,
      wa_trans_final TYPE t_trans_lookup_finder.
    DATA : i(7) TYPE n.
    DATA  old_cube(20) TYPE c VALUE ' '.
    DATA  old_source(20) TYPE c VALUE ' '.
    **Selections for update rules**************************************
    SELECT DISTINCT  targetname    sourcename  tranid        endroutine       line_no       line
           INTO TABLE i_trans_lookup_finder FROM
           rstran AS a  INNER JOIN rsaabap AS b ON aendroutine = bcodeid
                           WHERE
                           aobjvers = 'A' AND bobjvers = 'A'.
      APPEND LINES OF i_trans_lookup_finder TO i_lookup_finder.
    **Selections for Transformations(Expert routine)*******************
    SELECT DISTINCT        targetname       sourcename       tranid       expert       line_no       line
           INTO TABLE i_trans_lookup_finder FROM
           rstran AS a  INNER JOIN rsaabap AS b ON aexpert = bcodeid
                           WHERE
                           aobjvers = 'A' AND bobjvers = 'A'.
      APPEND LINES OF i_trans_lookup_finder TO i_lookup_finder.
    Edited by: Sakthi Jaganathan on May 20, 2009 6:25 PM

  • How to use this function module on abap hr GET_PDSNR_RANGE

    how to use this function module on abap hr GET_PDSNR_RANGE
    thankx.

    PASS INETRNAL TABLE WITH SOME DATA TO TABELLE FOR GENERATING PDSNR SEQUENCE

  • HR ABAP - Using of function module HR_READ_INFOTYPE

    Hi,
    I want to replace the below SELECT statement with the function module by HR_READ_INFOTYPE.
    IF l_begda LE '20100331'.
              l_assgnda = '20100401'.
            ELSE.
              l_assgnda = l_begda.
            ENDIF.
    SELECT SINGLE werks
            FROM pa0315
            INTO e_t_data-zz_werks
            WHERE pernr = wa-pernr
            AND endda GE l_assgnda   
            AND begda LE l_assgnda.
    But the problem is, in the where condition i have to use LE or GE condition for endda and begda. So how can i use  the function module  for replacing the select statement without changing the functionality.

    Hi,
    You are selecting a single entry... So you will just need to pass the variable l_assgnda to the BEGDA and ENDDA parameters of the FM...
    added: also, if that infotype can have concurrent records (but in that case the select is not correct), you will have to take the first one from INFTY_TAB...
    Cheers,
    Manu.
    Edited by: Manu D'Haeyer on Dec 29, 2011 2:40 PM

  • Creating ABAP function module in using an automated script

    I wish to create very simple ABAP function modules through an automated script. Is there any way I can do this?

    [http://code.google.com/p/saplink/]
    Greetings,
    Blag.

  • Call ABAP function module from script?

    Hi,
    I have an ABAP function module, which works fine when I call it in a transformation.
    Since I don't need to execute this function for each record but rather for each file I process, I would like to move the call from the DataFlow to a script in the WorkFlow. When I click on the 'functions' button the ABAP FM is available in my SAP Datastore, so I drag and drop it into my script. I also make sure to populate all required variables.
    There are no error messages or warning when I check my job definition.
    When I execute it, I get the following RFC error:
    Function call <xxx  ( abcd ) > failed, due to error <150413>: <RFC CallReceive exception <FUNCTION_NOT_FOUND>.>.
    Is it just not possible to call an RFC enabled function module in SAP from a script or am I doing something wrong here?
    Thanks,
    Jan.

    Could you please let me know how I can call an abap function module from a transformation? (from abap xslt program). I know how we can call methods of a class from the transformations, but no idea how we can call function modules. Any suggestions or a sample code snippet towards this will be very useful for me.
    Thanks,
    Shashi.

  • Passing an XML file from WebDynpro app to ABAP function module

    Hi all,
    I'm stuck with a problem, and am hoping one of you could let me know how to proceed:
    I need to pass an XML file (or at least the entire content of the XML) from my WebDynpro application to a backend ABAP function module. What I tried was this:
    In my WebDynpro app, I read the XML and convert the content into one long string (using java.io.FileReader and java.io.BufferedReader). In my ABAP function module I created an import parameter of type String. I then imported the ABAP Function module into my WebDynpro app as a model. I then tried to pass the XML string to the ABAP module. What happens is this:
    If the size of the string (XML) happens to be less than 255 characters, then it works. That is, the string is passed to the ABAP function module and I can see the contents. However, if the XML string happens to be greater than 255 characters, then it does not work. The string at the ABAP side is empty. Surprisingly, the ABAP module does not throw an error either. It just displays an empty string.
    Could you please tell me what the problem is?
    Thanks & Regards,
    Biju

    Hi Biju ,
    Welcome to SDN.
    If the import parameter is defined as type string it should work, however did you check whether your application pass it properly?
    I have applications using strings as import parameters working fine. (webapplications (BSP) to RFC)
    Regards
    Raja

  • Issue with use of Function Module GUI_UPLOAD

    Hi Experts,
    I have an issue in using the Function Module GUI_UPLOAD for uploading the contents of an Excel file on the Presentation Server to an internal table in an ABAP Program.
    My file consists of around 300 records but the FM succeeds in uploading only the first 6 lines to the Internal Table specified while calling the FM.
    I dont have any idea why this happens. Any pointers in this direction will be helpful.
    Thanks in advance.
    Regards,
    Keerthi

    Hi,
    Kindly go through this link below:
    https://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=60655105
    Hope it helps you
    Regards
    Mansi

  • Issue in creating web service for a ABAP Function Module

    Hi,
    now i'm learning how to create web service for a ABAP Function Module. I used the following steps.
    1. select the Function Module, named "zws_test".
    2. in the context menu, select "create->proxy object". so we enter into wizard.
    3. in the wizard, press the radio button "Service Provider".
    4. in the next page, press the radio button "Existing ABAP Objects(Inside Out)".
    5. In the next page, Enter the "zws_test_prvider" as Service Definition and select "Function Module" as Endpoint Type.
    6. in the next page, enter "zws_test" as Function Module and mark the "Mapping der Namen" button
    7. in the next page,select "PRF_DT_IF_SEC_LOW" as Profile and mark "Deploy Service".
    8. Save in the local package.
    9. then it will pop up a window with title "WSDL Source". i selected "URL/HTTP Destination" and press "OK".
    10.in the next page, i enter the URL as "http://hostname:portnumber/", and press "OK".
    11. then it will pop up a window with title "Display logs". A record with error message "HTTP error(return code 404, message "Not found")" appears.
    12. i press "ok" and a service provider with name "zws_test_prvider" appears in my local package.
    13. i use "zws_test_prvider"'s URL to create a service consumer "ZCO_WS_TEST_CONSUMER" and logic portal "LP1".
    14. But when i test my service consumer "ZCO_WS_TEST_CONSUMER", it will throw an exception "cx_ai_system_fault" with errortext "SOAP:14 Unexpected element -el=definitions ns=http://schemas.xmlsoap.org/wsdl/".
    15. I use t-code SM59 to test connection  and get the following info.
          Status HTTP Response     200
          Status Text                      OK
          Duration Test Call             328 ms.
    who can give me the reasons about item 11 and 14, and explain me how to create service provider and service consumer for a Function Module.
    Thanks in advance
    Johnney

    have you seen this weblog
    /people/thomas.jung3/blog/2004/11/15/bsp-150-a-developer146s-journal-part-xiii-developing-abap-webservices

  • Help on ABAP Function Module (Unit 1)

    Hello ABAP Experts,
    I need help with the below mentioned lesson plan. I donot have source code for The ABAP Function Module - BC401_GET_SEP_STRING. For the Source Code Solution in the Lesson Plan to work, I need the source code for the above mentioned function module.
    The Lesson Plan with Solution is posted below:
    Exercise 1 
    Unit: Data Types and Data Objects in Detail
    Topic: Defining Data Types and Data Objects
    Basic Statements
    Processing Character Strings
    At the conclusion of these exercises, you will be able to:
    u2022     Define structure types locally in the program
    u2022     Define elementary and complex data objects
    u2022     Split strings
    u2022     Use conversion rules
    u2022     Display the contents of data objects in lists
    In this exercise, you will use a template to create a program that receives a single data record from the database table SFLIGHT in form of a character string. The program will split the this character string into its components and display it formatted in a list.
    Because the focus of this exercise is not on the transfer of data as a character string, we will use a function module that will provide us with the required database. This will simulate actual cases, such as data transfer from an external system.
    Program: ZBC401_##_SPLIT_STRING
    Template: SAPBC401_DTOT_SPLIT_STRING
    Model solution: SAPBC401_DTOS_SPLIT_STRING
    is your two-digit group number
    1-1 Copy the program, SAPBC401_DTOT_SPLIT_STRING and give it the new name ZBC401_##_SPLIT_STRING.
    1-2 Familiarize yourself with the main body of the program. Pay special attention to the content of the data object datastring after the function module call. Use the Debugger to do this, and/or display the character string in a list. (The function module itself is here seen as a black box. For this exercise, it is not necessary to understand its construction.)
    1-3 To be able to split the character string into its components you must first remove the ## characters. Remove the two leading separators from the character string first. Then copy the initial part up to the closing separators to the auxiliary variable set_string. For this, set_string has to be defined appropriately.
    1-4 Now use the separators to split the contents of the auxiliary variable set_string into the structure wa_flight_c. The latter is typed with the local program structure type st_flight_c. You still have to comment out the components of this structure type and assign them an appropriate type.
    1-5 As a test, display the fields of the structure, wa_flight_c in a list.
    1-6 In the list displayed in exercise 1-5, you should have observed that some of the fields were displayed without formatting u2013 for example, the PRICE field. Your next step is to change this.
    To do this, convert the data you have extracted by copying it to data objects with suitable types. Also, not all components of wa_flight_c are to be displayed.
    For this purpose, a structure wa_flight has already been defined. It is typed with the structure type st_flight. You must comment out the components of st_flight and find appropriate types for these components for the formatting. Then copy the identically-named components of the character-type structure wa_flight_c to the fields of the structure wa_flight.
    Display the contents of the structure wa_flight in a list. Use the appropriate formatting options for the WRITE statement for the fldate and price components.
    Data Types and Data Objects in Detail Solution 1
    Unit: Data Types and Data Objects in Detail
    Topic: Defining Data Types and Data Objects
    Basic Statements
    Processing Character Strings
    REPORT sapbc401_dtos_split_string.
    TYPES:
    BEGIN OF st_flight_c,
    mandt(3) TYPE c,
    carrid(3) TYPE c,
    connid(4) TYPE n,
    fldate(8) TYPE n,
    price(20) TYPE c,
    currency(5) TYPE c,
    planetype(10) TYPE c,
    seatsmax(10) TYPE n,
    seatsocc(10) TYPE n,
    paymentsum(22) TYPE c,
    seatsmax_b(10) TYPE n,
    seatsocc_b(10) TYPE n,
    seatsmax_f(10) TYPE n,
    seatsocc_f(10) TYPE n,
    END OF st_flight_c,
    BEGIN OF st_flight,
    carrid(3) TYPE c,
    connid(4) TYPE n,
    fldate TYPE d,
    price(9) TYPE p DECIMALS 2,
    currency(5) TYPE c,
    planetype(10) TYPE c,
    seatsmax TYPE i,
    seatsocc TYPE i,
    END OF st_flight.
    DATA:
    datastring TYPE string,
    set_string TYPE string,
    wa_flight_c TYPE st_flight_c,
    wa_flight TYPE st_flight.
    START-OF-SELECTION.
    CALL FUNCTION 'BC401_GET_SEP_STRING'
    EXPORTING
    IM_NUMBER = '1'
    IM_TABLE_NAME = 'SFLIGHT'
    IM_SEPARATOR = '#'
    IM_UNIQUE = 'X'
    IMPORTING
    ex_string = datastring
    EXCEPTIONS
    no_data = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    MESSAGE a038(bc401).
    ENDIF.
    SHIFT datastring BY 2 PLACES.
    FIND '##' IN datastring.
    IF sy-subrc <> 0.
    MESSAGE a702(bc401).
    ENDIF.
    SPLIT datastring AT '##' INTO set_string datastring.
    SPLIT set_string AT '#' INTO
    wa_flight_c-mandt
    wa_flight_c-carrid
    wa_flight_c-connid
    wa_flight_c-fldate
    wa_flight_c-price
    wa_flight_c-currency
    wa_flight_c-planetype
    wa_flight_c-seatsmax
    wa_flight_c-seatsocc
    wa_flight_c-paymentsum
    wa_flight_c-seatsmax_b
    wa_flight_c-seatsocc_b
    wa_flight_c-seatsmax_f
    wa_flight_c-seatsocc_f.
    MOVE-CORRESPONDING wa_flight_c TO wa_flight.
    WRITE: /
    wa_flight-carrid,
    wa_flight-connid,
    wa_flight-fldate DD/MM/YYYY,
    wa_flight-price CURRENCY wa_flight-currency,
    wa_flight-currency,
    wa_flight-planetype,
    wa_flight-seatsmax,
    wa_flight-seatsocc.

    this FM is to get one element value from the XML
    if you want to convert the whole XML use FM SMUM_XML_PARSE
    Regards
    Raja
    Kindly close your previous threads and assing points.
    Re: Creation of SIMPLE TRANSFORMATIO(ST)for deserialisation of XML ->ABAP data.

  • How to Use ECC function Module

    Hi Experts - We need to execute the function module in ECC and need to write data in Oracle table.
    We are using BODS 4.0.
    How to use function module in data flow ? how it can work as a source ?
    I just need some basic steps how to use function module as a source and do the transformation to target.
    Thanks
    R

    Hi Ashwani,
    It is still not possible to use a FM as a source in DS.
    You can use a FM in a transformation but you have to start from a file or table as a source and load into a target (a FM can not be an end point of a dataflow - as it is used in the transformation and each transformation requires a source and a target.
    The scenario I described above was based on a situation where you have a source (flat file or table) and want to use a Function Module to transform your data and/or load the data in a transparant table in SAP.
    Your scenario is different, as your source is not a table/ff but a FM.
    In your case, I can see two scerio's:
    - Use an ABAP dataflow. Although I haven't got any experience with this I do believe this would be an option for your scenario. Please referer to the Data Services documentation on ABAP dataflows for further guidance.
    - As suggested earlier, you can create a bespoke (BW) Datasource based on a Function Module. Please refer to SAP help for creating a generic datasource:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/e3/e60138fede083de10000009b38f8cf/frameset.htm
    Depending on your scenario there might be a third option:
    - Use a SAP transparant table as a source. Create a transformation into the designated Oracle table. In the transformation call a FM which executes whatever logic you require. This solution will work if you have a table which produces the same number of records as your FM. If your function module produces more or less records (than there are in the transparant table), then this might become a bit tricky. It might work, but I have never tried it.
    Instead of a transparant table you can also use a table join, obviously. Perhaps part of the complexity of your FM could be resolved by using a join and you can create a new simpler FM for the remaining logic?
    Good luck,
    Jan.

Maybe you are looking for

  • I have Two apple ids: one apple id will not authorize on same computer.

    I just purchased a new imac. I have two apple ids. Stupid, I know. I was able to authorize one of the apple ids on my iMac. When I try to authorize the other apple id, I get the message "We could not complete your iTunes Store request. The iTunes Sto

  • Looking for a good GTD app for both Mac and Windows

    I have looked around the internet quite a bit and haven't found anything that looks promising. Lots of great Mac-only task management/Get Things Done (GTD) software, but I need something that will also work with Windows. Any Suggestions?

  • Has a life on his own

    My iPad has a problem that comeback and goes, it has a life on his own. Think that you use your finger, and click like a maniac on the screen, fast as lightning, opening programs, edit settings, surf internet, writing etc etc.... I just let it have a

  • Problems with Java 1.5_X installs help required.

    Hi All, Having problems with multiple machines with Java 1.5_X installs, the install ppears to complete successfully, and the version checking on the Java Website says that Java is installed however the checking of the Java Virtual Machine using the

  • Bitmap indexes and group by

    I'm trying to understand why Oracle 8.1.6 sometimes uses bitmap indexes sometimes not. Of course I have all the statistics, my bitmap indexes are valid and so on. The problem is this: - I have a customer table very very large - I have many columns wi