Skip to Content
This blog describes how to use the EDW interfaces for Master Data update published in the SAP NetWeaver Developer Guide by using a example. The link to the guide can be found in my blog SAP NetWeaver BI Interfaces – Overview. (SAP NetWeaver BI Interfaces – Overview II (SAP NetWeaver BI Interfaces – Overview II)) The used example can update/insert a key and text of the master data stored in InfoObject 0VERSION. The sample will be easy to use from outside. A table of the texts can be easily updated. The returned message can be easily interpreted. The open interfaces used in this blog are the function modules: *BAPI_IOBJ_GETDETAIL
*and *RSNDI_MD_TEXTS_UPDATE* h5. Step by Step guide *Create a Function Group* In this example I have created the Function Groups ZGEN_WEBSERVICE in the ABAP Developer Workbench (Transaction SE80) [http://help.sap.com/saphelp_nw04s/helpdata/en/d1/801ef5454211d189710000e8322d00/content.htm | http://help.sap.com/saphelp_nw04s/helpdata/en/d1/801ef5454211d189710000e8322d00/content.htm] image 0.1. *Create a reuseable INCLUDE ‘ZGEN_TEXT’* that can be reused for any other InfoObject. Please find the coding of the Include ZGEN_TEXT below. This INCLUDE is NOT part of the Function Group ZGEN_WEBSERVICE. image 0.1. *Create a remote enabled function module* Z_TXT_SET_0VERSION The function module must be remote enabled. This can be flaged in the ‘Attributes’ view in the function module maintenance. image” There are no Importing paramters necessary. The Exporting paramter is ‘message’ with type ‘BAPI_MSG’. This is the message that will be sent back to the caller if the update of the text was succesful or not. image” The Tables parameter defines the structure of the text table that will be updated. The text table of an InfoObject can be found in the InfoObject maintenance Master data/texts view in transaction RSD1. image” In this case it is the table  /BI0/TVERSION. image There are no Exceptions defined. The source code of the function module is very simple since the include mentioned in 2. is very generic. image” Source code of function module Z_TXT_SET_0VERSION. FUNCTION Z_TXT_SET_0VERSION. *”——————————————————————-
*”*”Local Interface:
*” EXPORTING *” VALUE(message) TYPE BAPI_MSG
*” TABLES *” texts STRUCTURE */BI0/TVERSION* *”——————————————————————-
data: l_iobj_name type RSIOBJNM value ‘*0VERSION’*.
include zgen_text.
ENDFUNCTION.

The WebService can be generated using the created the created function module.
Goto Utilieties in the Function Module maintenance view –> More Utilities –> Create WebService –> From the Function Module

image

To report this post you need to login first.

6 Comments

You must be Logged on to comment or reply to a post.

  1. Former Member
    Hi,

    i paste the coding of the include in a FM. When i check the code, i’ve got the following error :
    “Include ZGEN_TEXT”
    Between “TYPE” and “ANY”, “TYPE” is missing. be interpreted. blanks may be missing (see help compute).
    I’m not an abap expert and i don’t know where i did the mistake. Any idea ?
    Regards.
    Guillaume

    (0) 
    1. Hi, you are right. The HTML editor had problems to present the field symbol Thanks for the feedback, Michael

      (0) 
      1. Former Member
        Ok, i works better now. Anyway, i’ve got another error again :
        Include ZGEN_TEXT
        Fields TEXTS is unknown. it’s neither in one of the specified tables nor defined by a “DATA” statement.
        As written in the document, i put the field “TEXTS” LIKE /BI0/TVERSION in the “Table” Tab.
        Any Idea ?
        (0) 
        1. Hi, the syntax check of the Function Module will be ok, if you insert the include in the Function Module (see step 3). You can activate the include without a syntax check. The text table is defined in the function module. Please make sure that the INCLUDE is not part of the Function Module Group. I know this is a bit tricky.
          Thanks for your Feedback, Michael

          (0) 
          1. Former Member
            Hi Michael,
            Firstly let me congratulate for you this wonderful blog. It is a big help for beginners like me.
            However, Am getting a couple of errors.
            Firstly, when I created the function module and tried to create a web service, it is giving an error saying  ” Function module xx either does not exist or is not RFC enabled” Do we need an RFC connectivity for the same ?

            Secondly, this is working fine for any DSO, but for cube, we are getting the infoobjects alright, but no data is being exported. Is there any issue with RSDRI_INFOPROV_READ function ?

            Thanks and hoping for a reply soon.
            regards
            Pats

            (0) 
  2. Former Member
    Hi Micheal,

    Firstly thanks alot for such a comprehensive explanation…

    Also i tried to implement but was getting error while executing webservices.. .

    following is the detail of the error:

    XML Serialization Error. Object content does not correspond to Schema restrictions of type [urn:sap-com:document:sap:rfc:functions][lang].

    any idea why it is failing…

    Thanks

    (0) 

Leave a Reply