Fill deep output Structure of Enterprise Service

Hello at all,
I created an Enterprise Service which contains an Input and Output Structure.
My Problem is, that the Output structure is very deep and this structure contains tabletyps and further structures.
How can I fill a field of the Output structure?
I almost use the Method "describe_by_name", which gives me the components of the "first-Level-structure (lt_components).
Lt_components is filled with different components and types, for example "TTYPE" or "STRU".
One Component of type TTYPE contains a further structure, ... and so on.
At the End of this deep structure (up to 9 Levels) are fields with type of string.
How can I fill These fields?
I hope you can help me.
Thanks in advance.
Andreas O.
Attached you will find a small example.

Hello Andreas,
You can access deep structure like the you access flat structure fields but with some restrictions.
One of things to take care is use the compatible type for the component that is being accessed.
This link will help you ABAP Keyword Documentation
As per you screen shot below statement can be used to access first table.
Table type <tt> = output-getOrderResponse-<Structure1>-<table1>
You can also refer below blog series :
Deeper Dive into Deep structure - part 1
Deeper Dive into Deep structure - part 2
Deeper Dive into Deep structure - part 3
Deeper Dive into Deep structure - part 4

Similar Messages

  • Problems with deep request structure in web service

    I'm having problems when trying to consume an Enterprise Service-like web service in my Web Dynpro application. The web service FindXByElements has a request-structure as follows:
    XByElementsQuery
    -ProcessingConditions
    -QueryHitsMaximumNumberValue
    -QueryHitsUnlimitedIndicator
    -XSelectionByElements
    -ID
    -Year
    Regarding the structures on level two, the structure ProcessingConditions are of the global data type "WITHOUT_LASTRETURNED_QueryProcessingConditions" and are therefore typed. The structure XSelectionByElements on the other hand are just a "level" in the request structure and are therefore not typed. Both structures have occurrence 1 so they have to be filled with input data.
    The code in wdDoInit in the Component Controller looks like this:
    QueryXInModel model = new QueryXInModel();
    wdContext.nodeRequest_FindXByElements().bind(wdContext.createRequest_FindXByElementsElement(new Request_FindXByElements(model)));
    wdContext.currentRequest_FindXByElementsElement().modelObject().setXByElementsQuery(new XByElementsQuery_Sync(model));
    //Processing structure
    wdContext.currentXByElementsQueryElement().modelObject().setProcessingConditions(new WITHOUT_LASTRETURNED_QueryProcessingConditions(model));
    //Selection structure
    wdContext.currentXByElementsQueryElement().modelObject().setXSelectionByElements(new XSelectionByElements(model));
    The last row generates the following exception:
    java.lang.IllegalArgumentException: Cannot perform write operation 'setRelatedModelObject' on target role: Class 'XSelectionByElements' is not compatible to class '$002fWsdlDefinitions$002fWsdlTypes$002fXsdSchema$002fXsdComplexType$005b3$005d$002fXsdSequence$002fXsdElement$005b2$005d$002fXsdComplexType' of target role 'XSelectionByElements' in model class 'XByElementsQuery_Sync'
    There seems to be a problem to bind a non-typed structure element to a context node since the processing structure is working fine but the selection structure are not.
    What am I doing wrong, anyone got any clues?
    /Oskar

    Hi
    QueryXInModel model = new QueryXInModel();
    wdContext.nodeRequest_FindXByElements().bind(wdContext.createRequest_FindXByElementsElement(new Request_FindXByElements(model)));
    wdContext.currentRequest_FindXByElementsElement().modelObject().setXByElementsQuery(new XByElementsQuery_Sync(model));
    //Processing structure
    wdContext.currentXByElementsQueryElement().modelObject().setProcessingConditions(new WITHOUT_LASTRETURNED_QueryProcessingConditions(model));
    //Selection structure
    wdContext.currentXByElementsQueryElement().modelObject().setXSelectionByElements(new XSelectionByElements(model));
    XByElementsQuery
    ProcessingConditions
    QueryHitsMaximumNumberValue
    QueryHitsUnlimitedIndicator
    XSelectionByElements
    ID
    Year
    as
              QueryXInModel model = new QueryXInModel();
               Request_FindXByElement  request = new Requst_FindXByElement();
                ProcessCondition   processCond  = new  ProcessCondition(model);
                QueryHitsMaximumNumberValue  qhMaxNumValues = QueryHitsMaximumNumberValue(model);
          QueryHitsUnlimitedIndicator  qhUnLimind = new QueryHitsUnlimitedIndicator(model);
            XSelectionByElements  selecByEle = new XSelectionByElements(model);
                     processCond.set....();                         
                     qhMaxNumValues .set...();
               and so on
                    request.set....();
    wdcontext.nodeReqestFindX..bind(request);
      in the above during the values you will automatically get the set values .

  • Enhancing Enterprise Service - Input Message Enhancement

    Hi
    I am using a standard Enterprise Service and have successfully Enhanced the Output Message (Created a Data Type Enhancement in PI), did the BADI Implementation and mapped the Outgoing Response in Outbound Processing of BADI Implementation and able to get the new added fields in the Response from the Service.
    Now need to understand, how to Enhance the Input Message (have gone through the Enhancement Guide) and as I understand need to Enhance the element in Inbound Processing of BADI. I can see the enhanced Data Type which I created in ESR and then Implemented the Proxy for Data Type Enhancement,  nevertheless unsure what I can do with the data type in INPUT parameter/structure. As I need to map this to another Changing type parameter to be able to validate this in Outbound Processing., although I cannot create a new parameter in the Method.
    Can someone guide in steps how to do Input Message enhancement - what to do I code in Inbound Processing-Method to make that available in Outbound Processing(Need to do validation based on this field to send the response back).
    Thanks
    Swetank

    Have managed to do the same. Declared the Enhanced Input variable in public section of the class and was able to refer to the same in Outbound processing.

  • Problems enhancing an enterprise Service.

    Hi guys, i´m trying to enhance a node of an enterprise service (PurchaseOrderByIDqueryResponse), i need to enhace the output message type PurchaseOrderByIDResponseMessage_sync.
    I made all the stuff in ESR, activate it, created the proxy in Ecc. everything is ok, no erros.
    browsing in the structure of the ES i can see my enhace node. but when i try to test by wsnavigator, i open the upper node and  my node is grey with a check, without showing me the structure that i made.
    I don´t know how to solve this issue, is there anyone who can help me with this?
    thanks in advace,
    regards
    Diego.

    The thig was that the badi implementation was wrong, now i correct it and map the correct fields and the info is shown.
    Diego.

  • Creating MBO by Enterprise Service eats much Workspace resources.

    Hi, Experts.
    I have been developing a iPhone mobile app by SUP2.0.
    I choose SAP CRM Enterprise Service(ES) as EIS Backend and create a MBO.
    but this MBO consists of about 140 structures and ate much computer resources (no
    response) so I could not develop any more.
    ServiceConfirmationCRMByIDQueryResponse_In
    Could you give ma some advice to develop MBO by using such ES.
    Regards,

    Hi,
    This is self reply.
    I made the wrapper web service which reduce input and output parameter structures by net weaver PI and resolved the problem.
    In my opinion though SAP ES is general-purpose and complex so originally they have many parameters and structure is nested and it can not be deleted under SUP Workplace. In many case we need the wrapper web service made by Netweaver PI or Netweaver CAF or Netweaver Gateway or others.
    Thanks

  • XML Deserialization error while consuming Enterprise service in wd java..

    Hello,
    I am trying to build 2 webdynpro java webdynpro applications which consumes enterprise service for purchase order and another application for Busines partner.
    While i was able to successfully consume the PO service in webdynpro java and get the desired output for PO..i get XML Deserialization error while running appliation for Business Partner..
    These are the details/steps i followed for the Business Partner application:
    1. After creating the model using the enterprise service, i created a service controller from the model to the component controller..
    2. Out of many inputs/output attributes during mapping from model to component controller. i further mapped the context from CC to ViewC.
    3. In the wdDoInit() method, i added the follwing code:
        BPCreate model1 = new BPCreate();
        Request_BusinessPartnerERPCreateRequestConfirmation_In RequestC = new  Request_BusinessPartnerERPCreateRequestConfirmation_In(model1);
        BPERPCrteReqMsg_S CreateMessage = new BPERPCrteReqMsg_S(model1);
        BPERPCrteReq_SBP Cpartner = new BPERPCrteReq_SBP(model1);
    String Category = new String();
        String lf = new String();
        Cpartner.setInternalID(new String());
        Cpartner.setNumberRangeIntervalBusinessPartnerGroupCode(new String());
        Cpartner.setLifeCycleStatusCode(lf);
        Cpartner.setCategoryCode(Category);   
        CreateMessage.setBusinessPartner(Cpartner);
        RequestC.setBusinessPartnerERPCreateRequestMessage_Sync(CreateMessage);
        wdContext.nodeBusinessPartnerERPCreateRequestMessage_Sync().bind(CreateMessage);
    4. When i comment this code and run the application, the aplication comes up but the input fields are non-editable..
    5. If i place this code in wdDoInit() method, i get the Deserialization error..
    Any idea about why this error occurs and which areas in the application can lead to these errors?
    I checked that the service runs fine in soamanager.
    Thanks, JVR

    Hi Kishore,
    This error is majorly because while executing this Webdynpro application you are not entering all the mandatory fileds of WS.
    Please try to execute this WS from WS-Navigator, check which fileds are mandatory and then
    appropriately instantiate it in wdDoInit and pass all the fields required.
    Regards,
    Vaibhav Modi.

  • Create service order on basis of service request via Enterprise Service

    Hi,
    I would like to use the ServiceExecutionOrderERPCreateRequestConfirmation_In Enterprise Service to create a service order in SAP in the basis of a previous created service request. Is this possible? I already tried calling the service with various parameter combinations. The creation works fine but the relationship to the service request is not maintained. Could maybe any of the SAP guys or anyone else tell me whether this is possible at all or not?
    Thanks a lot,
    Manfred

    Hello Manfred,
    Yes this is possible.
    In the service structure, there is a node by name BusinessTransactionDocumentReference.
    Please enter the following in the node elements:
    ID = <service_request_id>
    TypeCode =  118
    MainIndicator = true.
    The node BusinessTransactionDocumentReference may look like below in XML.
    <BusinessTransactionDocumentReference>
         <BusinessTransactionDocumentReference>
              <ID>service_request_number</ID>
              <TypeCode>118</TypeCode>
         </BusinessTransactionDocumentReference>
         <MainIndicator>true</MainIndicator>
    </BusinessTransactionDocumentReference>
    If you set the MainIndicator to false, ServiceRequest will be visible in the "Objects" tab in the Order. If this is true, ServiceRequest will be in the header of the order.
    Hope this helps.
    Regards
    Shankar

  • Unable to test enterprise services in SAP SRM 7.0 EhP1

    Hi experts,
    For my recent project, we have enabled "PI Independent Enterprise Services" business function in our SRM 7.01 EhP1 system. While to trying to test some of the enterprise services, we are facing some error. I am pasting the request message and the response that I got from the enterprise service InternalRequestSRMByElementsQueryResponse_in. While defining the end point, I have used basic authentication settings. Note that I am testing this ES with my own user id and password which is a valid on for the SRM system. Can someone help please?
    Request message:
    POST /sap/bc/srt/xip/sapsrm/internalrequestsrmbyel/100/sapsrm_internalrequestsrmbyel/sapsrm_internalrequestsrmbyel_binding HTTP/1.1
    Host: <host>:<port>
    Content-Type: text/xml; charset=UTF-8
    Connection: close
    Authorization: <value is hidden>
    SAP-PASSPORT: 2A54482A0300E60000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064353632326163306235363431316530383330333030303030323337663833320000000002D5622AC0B56411E0830300000237F832D562EADFB56411E0AD3800000237F83200000001000000002A54482A
    Content-Length: 753
    SOAPAction: ""
    <?xml version="1.0" encoding="UTF-8" ?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema"><SOAP-ENV:Header><sapsess:Session xmlns:sapsess="http://www.sap.com/webas/630/soap/features/session/"><enableSession>true</enableSession></sapsess:Session></SOAP-ENV:Header><SOAP-ENV:Body><ns1:InternalRequestSRMByElementsQuery_sync xmlns:ns1='http://sap.com/xi/SAPGlobal20/Global'><InternalRequestSelectionByElements><CreationDatePeriod><StartDate>2011-04-01</StartDate><EndDate>2011-07-22</EndDate></CreationDatePeriod></InternalRequestSelectionByElements></ns1:InternalRequestSRMByElementsQuery_sync></SOAP-ENV:Body></SOAP-ENV:Envelope>
    Response that I got:
    HTTP/1.1 200 OK
    content-type: text/xml; charset=utf-8
    content-length: 915
    accept: text/xml
    sap-srt_id: 20110723/194910/v1.00_final_6.40/4E24C49F23184117E1008000097C2FFA
    sap-srt_server_info: SRM_100,167 ,http://sap.com/xi/SRM/SE/Global,InternalRequestSRMByElementsQueryResponse_in,InternalRequestSRMByElementsQuery_sync,126
    server: SAP NetWeaver Application Server / ABAP 702
    <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"><soap-env:Header/><soap-env:Body><n0:InternalRequestSRMByElementsResponse_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global"><Log><BusinessDocumentProcessingResultCode>5</BusinessDocumentProcessingResultCode><MaximumLogItemSeverityCode>4</MaximumLogItemSeverityCode><Item><SeverityCode>4</SeverityCode><Note>Abort occurred; Internal request not read</Note></Item><Item><SeverityCode>4</SeverityCode><Note>Abort The attributes of the user are inconsistent or not defined. See transaction PPOMA_BBP. on Internal request level</Note></Item><Item><SeverityCode>4</SeverityCode><Note>Abort An exception with the type CX_GDT_CONVERSION occur red, but was neither handled locally, nor declared in a RAISING clause on Internal request level</Note></Item></Log></n0:InternalRequestSRMByElementsResponse_sync></soap-env:Body></soap-env:Envelope>

    Hi Gaurav,
    Thanks for responding. Yes, all the backend config are in place since I am able to successfully run an equivalent RFC (BBP_PD_SC_GETLIST) and another RFC named BBP_PD_SC_GETDETAIL from SE37. The problem seems to be something very specific to the ES. May I request you to run this ES at your end (if possible) and let me know the result possibly with the input and output message similar to the one I pasted in the origincal question.
    Thanks in advance,
    Nilay

  • How to map business process and enterprise service?

    Recently, I read some documents about ESA. I'm confusing about the relationship between business process and enterprise service. In other word, how to map the business process to enterprise service after the business process is analyzed? Is there any methodology/rule to define business process and wrap them into service in ESA?

    Hi Sherry,
    I like to add some of my thoughts about that discussion. From my point of view ESA is much more than just another BPM or Enterprise BPM. ESA is adresses six key areas and I think all of them are really needed:
    - <b>People Productivity</b> as the word itself describes...it's about portals and productivity.
    - <b>Embedded Analytics</b> has to integrate transactional and analytical content.
    - <b>Service Composition</b> is used for model-driven service composition and services orchestration.
    - <b>Service Enablement</b> is about a Enterprise Services Repository filled with business meaningful Enterprise Services and service patterns for enabled objects. Excactly this is where SAP has years of experiences.
    - <b>Business Process Platform</b> is about service enablement of all application platform objects and engines. This is the place where "BPM" for core business processes resits.
    - <b>Life-Cycle Management</b> has to cover the deployment, configuration, operation and change management for ESA based processes.
    Therefore the term "BPM" is located in serveral layers of an ESA approach. On the level of <u>Business Process Platform</u> BPM is providing the choreography for core business preocesses.
    At <u>Service Enablement</u> BPM needs to compose out of granular services (I would say "atomic" services)
    buiness meaningful services (here we have "molecular" services).
    The third level where BPM could be used is <u>Service Composition</u> because exactly this is the place
    where serveral Enterprise Services could be combined to a process representation.
    To come back to the discussion:
    1. The question should be how to indentify business meaningful services which could represent single process steps. ATP check, Credit card check, ... could be examples. In theory this service could be out-tasked, defined more flexible etc. This means that processes needs to be evaluated for Enterprise Service candidates. Afterwards you can check against SAP's Enterprise Services Repository for already existing Enterprise Services. The evalution for enterprise services candidates will be supported by the metodology mentioned by Kaj and David.
    2. I think domains in this context should be motivated by business and/or functional areas. Depending on the granularity. For example Order Fulfilment Services, Master Data Services, Search Services... These kind of serices can be combined again to services such as "Search of Master Data" (Search Service + Read Master Data Service) etc. or can be used to generate UI to be used in a ESA application.
    Your thoughts?
    Very best regards
    Wulff

  • Enterprise Service Repository

    Hi,
    I like to know the differences in between Enterprise Service Repository and Integration Repository (XI)?
    Thanks & Regards,
    Kamaljeet Singh

    hi Kamaljeet,
    ESR is a meta data repository, meaning that it stores data that describes other data. The meta data inside the ESR is then used by development tools, modeling tools, operational management tools, and by other services to help them do their jobs. The ESR has also been given the job of storing descriptions of business objects and models that show how services work together in process components.
    Perhaps the best way to quickly understand the ESR is to list all the different types of metadata stored in in and quickly explain how that data is used.
    Type of data and How it is used as follows:
    Web Services Definition Language (WSDL) files These files describe the service interfaces of enterprise services and are used by development tools and during run-time to look up interface definitions.
    Business Object Descriptions Business objects are used in modeling to show what structures exist in an application that are implementing services.
    Process Component Models This data describes models that show how enterprise services work together to implement business processes. These models show how a service is used and what business objects implement the service.
    It is important to remember that services are not implemented in the ESR. The ESR holds descriptions of services that are then implemented in applications that are separate from the repository.
    regards
    manoj kumar
    if its helpful award points

  • Description of enterprise service message types

    Hello people,
    I'd like to know where to find the description of the parameters of enterpise service operations. For example the operation "Create Invoice" (Process Component: SRM) needs a lot of input parameters. I took a look into the Integration Builder from the ESR, but there was no description for the different message types.
    The problem is: For example I wonder what is the difference between seller party and vendor party or what BillToID means. Without the knowledge of the meaning of the parameters I can't do an invocation.
    If anybody could tell me where to find these information, this would help me very much.
    BTW: Does anybody know a Test-SRM-Server that has an Invoice-ES that I could invoke?
    Thanks a lot,
    Michael

    Hello Michael,
    have you checked out the ES Workplace yet?
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/esworkplace">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/esworkplace</a>
    You get the complete message structure with all parameters for "Create Invoice" and all other enterprise services from there.
    Navigation path is <i>Enterprise Services by Process Components -> Customer Invoice Processing</i> (under SRM) -> Enterprise Service Operation <i>Create Invoice -> detailed field description</i>.
    For an SRM testing system, please check
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/explore-es">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/explore-es</a><i>-> Test-Drive</i> (on top of page) <i>-> HU5</i> .
    For a test user, click on <i>apply for free access now</i> in the same line.
    Hope this helps.
    Regards, Volker

  • Using Enterprise service for POS integration to POSDM

    Hi
    I have few question on using Enterprise Service  for POS Inbound .
    1. Is it possibe to get this XML schema for Enterprise Service
    2. Lets say we have to use a third party POS to  integarte POSDM via PI. But then if we don't want to do any transformation in SAP PI,  then can we use the following option:
              SAP POS sends the data in the ES XML format
              SAP PI just transports this to POSDM
    I do see some drawbacks of POS sending the data in  the ES service format. As this means, if any change needs to be done based on any new requirements, we need to change the source code. However the above option should still be technically possible?
    Any reference if the above approach had been used in any projects. We have always used the following flow:
    POS--> PI---> POSDM . PI to POSDM is through the RFC /POSDW/CREATE_TRANSACTIONS_EXT.
    Regards,
    Fazila

    Hi Fazila,
    The ES bundle "PointOfSaleTransactionERPBulkCreateRequest_In" can be used to transfer POS transactions to POS Data Management directly.
    In order to access the above-mentioned ES, please use the Integration Builder in your PI system in transaction SXMB_IFR and follow the link to the Integration Repository.
    This structure can be enhanced to capture additional information.
    Award point if useful.
    Regards,
    Ramki

  • How to find BADI for the enterprise service?

    Hi Experts,
      We are enhancing an enterprise service for Businesspartner  creation by adding an additional field in the structure. But we are not able to find out the correct BADI for the enterprise service.  We are using the following enterprise service - 'BusinessPartnerERPCreateRequestConfirmation_In' . I could not find any BADI in ES workplace also .How to search for a BADI for this ES.
    Any help on this will be well appreciated.
    Thanks in advance
    Sanu

    Hi Sanu.
    Not all the services is an BAPI or BAPI, maybe this is an interface.
    To see the related object go to esworkplace and find the service.
    You will find in the page the label "Related Web Service Definition".
    Copy the related value(in your case ECC_BusinessPartnerCrtRC) it and go to SAP GUI. In transaction SE84, go to enterprise service and choice service definition.
    Paste the value copied in esworkplace in field Service Definition, then F8.
    In the next screen double click in the returned value.
    In the next screen you will see a Reference Object field. Double click in the value and you will see the related object.
    In this case is an interface. You can see in Provider Class.
    Hope that's help you.
    Marcos

  • Add attachment to Opportunity using Enterprise Services

    Hi All,
    Is there a way I can add attachments (doc,txt) to a opportunity through the services exposed by Enterprise Services in CRM 7.0. Because the stubs generated for "Create Opportunity" does not have option to add attachments.
    If I browse to the ES Workplace and check the "Create Opportunity", I do not see any method that would allow me to add attachment to the Opportunity (OpportunityCRMCreateRequest_sync).
    Please let me know what am I missing.
    Regards,
    Naveen

    Hi Naveen,
    I have done one requirement attach a document from for already created business partners from external file. In that file I have Business partner number, file path and description.   so, My code is like this. I think it will help ful for you. I dont no wether your requirement will full fill but the coding may help ful for your requirement. try it.. gud luck.. any doubts please ask me i will help u...
    types: begin of ty_upload,
             bp_no type but000-partner,
              path  type sdok_chtrd,
       ls_description type sdok_titel,
            end of  ty_upload.
    data: it_upload type standard table of ty_upload. "Internal table for upload
    data: wa_upload type ty_upload.
      data:
      lv_file_save_as      type c length 255,
      lv_nombre_fichero    type sdok_filnm,
      lv_directory         type sdok_chtrd,
      ls_loio              type skwf_io,
      ls_phio              type skwf_io,
      ls_error             type skwf_error,
      ls_business_object   type sibflporb.
      data: ls_guid type ty_upload.
      data: lt_guid type standard table of ty_upload.
      data: ls_path type ty_upload.
      data: lt_path type standard table of ty_upload.
      data: wa_properties type sdokpropty.
      data: lt_properties like wa_properties occurs 0.
      data ls_but000 type but000.
      select single *
        from but000
       into ls_but000
        where partner = wa_upload-bp_no.
    ls_business_object-instid = wa_but000-partner_guid.
      ls_business_object-typeid =  'BUS1006'. "for bp
      ls_business_object-catid = 'BO'.
      wa_properties-name = 'DESCRIPTION'.
      wa_properties-value = wa_upload-ls_description.
      append wa_properties to lt_properties.
      wa_properties-name = 'LANGUAGE'.
      wa_properties-value = 'EN'.
      append wa_properties to lt_properties.
      clear ls_guid.
      types: begin of ty_path,
              ls_path type sdok_chtrd,
              ls_name type skwf_descr,
               end of  ty_path.
      data: wa_path type ty_path.
      data: it_path type standard table of ty_path.   "Internal table for path split
      call function '/SAPDMC/LSM_PATH_FILE_SPLIT'    "FM for splitting the file path (split file name and directory)
        exporting
          pathfile = wa_upload-path
        importing
          pathname = wa_path-ls_path
          filename = wa_path-ls_name.
      append wa_path to it_path.
      lv_nombre_fichero = wa_path-ls_name.
      lv_directory = wa_path-ls_path.
      call method cl_crm_documents=>create_with_file
        exporting
          file_name       =  lv_nombre_fichero
          directory       =  lv_directory
          properties      =  lt_properties
         properties_attr =  lv_description
          business_object =  ls_business_object
         parent_folder   =
         package_id      =
        importing
          loio            =  ls_loio
          phio            =  ls_phio
          error           =  ls_error.
      call method cl_crm_documents=>rename_object
        exporting
          is_io   = ls_loio
          iv_name = wa_path-ls_name.
    if sy-subrc = 0.
      message 'Attachment has been finished successfully' type 'S'.
    endif.
    Regards,
    Ramz...

  • Regd. use of enterprise services : Best approach

    Hi Experts,
    I have configured a scenario using standard enterprise services,used soamanager of ABAP and tested the services,it works perfectly.
    But the issue came with terms of security ,it seems we cannot expose our sap system as url for the services.
    need to use PI to connect to the third party...I need suggestions on following
    1. Can we connect ABAP of PI to ABAP of SAP ,with some configuration , i dont want to create any additional
        structures is PI apart from the one which i imported.
    2.If i set up a soap to proxy(ABAP) then i need to duplicate the structure for source and use the standard ES
       service at proxy receiver, but i want to avoid duplication as it is cumbersome to do for all services.
    3.If i create communication /service user i need to give access for some of sap tables  to support the service functionalities.
    what is the best approach for exposing services from PI using standard enterprise service.
    Any pointer will be appreciated.
    Regards,
    Srinivas
    Edited by: Srinivas on Jul 7, 2010 7:29 PM

    Hi
    Following is answer of your question:
    >(1)How can I search relevant Enterprise services in PI for the SAP R/3 BAPI.
    There is no way to look for enterprise service for BAPI, ES are harmonized services based on GDT whereas BAPI is more SAP oriented in datatype definitions, only way is to find out is look into code as many ES are calling BAPI internally. Best way to identify correct ES is business use (like Purchase Order Creation etc)
    >(2)If relevant ES is available then what are the steps to be performed?
    It depends how you want to use this ES, you can call this ES from outside world (read thirdparty tools, application) and these services can be used as ready-to-use building block for new applications. You must know URL of wsdl and security setting (user/password) to use it with any application. You can call it from ABAP, .Net, Java applications. You can test ES with any SOAP testing tool like WSNavigator or SOAP UI.
    >(3)If relevant ES is not availabe then what are the steps to be performed?
    You have few options if ES is not available, design of your own by following proper governance model (i.e. PIC process) or you can live with existing BAPI, RFC and convert them into Web Service using webservice wizard available in SE80 and SE37.
    Regards,
    Gourav

Maybe you are looking for