Minimal Authentication for BAPI calls

Hi,
We use SAP Jco Library to connect SAP systems in our applications. Within the aplication we make BAPI calls to the SAP system for various operations. A typical BAPI calls we make are BAPI_DOCUMENT_CREATE, BAPI_DOCUMENT_GETLIST, BAPI_EQUI_GETLIST etc.
For these BAPI calls it is must that the user needs SAP_ALL and SAP_NEW profile added to his profile. I would be interested to know what is the minimal profile the user needs to make these BAPI calls?
Is there a document/link which talks about the minimum roles\profile needed for different BAPI calls byt the user.
Regards,
Naveen

there's a couple of notes on that:
[452508|https://service.sap.com/sap/support/notes/452508] describes RFC-connects coming from a portal.
[129795|https://service.sap.com/sap/support/notes/129795] does the same for connect via Session Manager
... there are a couple of others - a quick search in SMP will reveal the others.
as for your BAPIs: obviously you will need the authorizations for whatever the BAPI wants - some BAPI's require transaction code, several organisational values - e. g. creating CS-orders uses most of the I_* objects as well as the t-code for IW31.
But that is about all - you do not need SAP_ALL and/or SAP_NEW - in fact: try to avoid it - reduce the RFC-users to what they need and no more. Keep to using BAPIs for your development, as they are much more trustworthy (securitywise) than other RFC-FM's/methods.
In the SDN security forum are some sticky threads where you might find additional information in that direction. Its worth a look, Julius goes to great length of pain to make them interesting.

Similar Messages

  • Yellow transaction sequence block for Bapi call

    I am beginning upgrading MII from version 12.0 to 12.1.  When I imported my MII project to version 12.1, I get one BAPI call sequence that is yellow and the transaction does not execute.  It works fine in version 12.0, but something is wrong in version 12.1.  It is not a custom transaction. 
    The JRA Session Action is called JRA_Start_Session and when I try to execure the transaction, I get the following Error:
    [ERROR] [JRA_Start_Session] Link ('JRA_Start_Session.Language' [Assign] from "Transaction.Language") execution threw an exception. Exception: [Variable does not exist: JRA_Start_Session.Language]
    [INFO] Transaction Termination Request: [User: MSCOTT] [Reason: Variable does not exist: JRA_Start_Session.Language] [Message: Variable does not exist: JRA_Start_Session.Language]
    [INFO] Statistics [Load = 67 ms msec, Parse = 67 ms, Execution = 2 ms, Total = 81 ms]
    Both the new version and the old version of MII are pulling for the same data sources, so I'm not sure why 12.0 would work and 12.1 won't.  Maybe a known bug??
    Any help would be greatly appreciated!

    Thanks, Mike.  I am waiting on some help to try the steps you listed. 
    In further testing, we have been able to get some of the data from the BAPI, but not all of it.  We have also noticed that some of the data paths have changed.  For example, the "components" variable that was located in this location in version 12.0:
    {/BAPI_PRODORD_GET_DETAIL/INPUT/ORDER_OBJECTS/INPUT/COMPONENTS}
    Is located here after importing the project into version 12.1:
    {/BAPI_PRODORD_GET_DETAIL/INPUT/ORDER_OBJECTS/COMPONENTS}
    Does this information mean anything to you?  I did find some forum posts about JRA issues related to NW 7.1.6 and MII 12.1.8.  What I'm seeing is that to use MII 12.1.8, we have to roll back to NW 7.1.5.
    Can you tell me if this is still accurate?
    [Re: JRA "Execute Function" Option in MII 12.1.8.24]

  • Problem for Bapi Call  in Integration Scenario

    Hi
    I am creating an Integration Scenario at Design time which can be used during configuration time.In the Int. Scenario, I am using a Int Process(BPM). I am making a synchronous call to BAPI from my BPM. How can this be implemented in Integration Scenario.
    So how can I send a input message from BPM to BAPI and then take further steps only after getting response from BAPI. Is there any way to define synchronous Action in Int Scenario??? And another point to be noted is that we are not using any communication channel to send the message from BPM or receive the response in BPM. We have only a receiver communication channel which receives the message for the BAPI.
    So please help in solving this problem.
    regards,
    Biranchi

    > Thanks for ur reply. I am trying to follow the suggestion given by u. U have specified that the BAPI  in R/3 system has to be inserted as an application component. But I am unable to do that. I am using IDES system for the BAPI,but in the selection screen for the Application Component we have only instances of installed product in the SLD. So how to find out the application component to be imported.
    >
    What you need to do is, first of all your import the BAPI (RFC) into XI system. (I hope you must be knowing how to import the RFC & IDOCs into XI system). Make sure this BAPI is remote-enabled under attribute TAB in R3 ---> SE37.
    Now this imported BAPI (RFC) will be used in your message interfaces and this message interface will be used inside ACTION. And then you can use this action in your Integration Secnario as mentioned in the picture above in my first reply.
    Sorry for the confusion, you need to R3 business system name rather inserting the BAPI as a business system under 3rd swim lane.
    > And another problem is that I have to create an action for in the application Component containing BAPI and then it should be connected to the action in BPM for interaction. I have created one action for this and given the BAPi as both outbound and inbound interface. Is this the proper way to do this???
    >
    As mentioned above, after you import the BAPI (RFC) in XI you can create the messge interface. There should be two Message Interfaces. One for sending the request and other for receiving the response message.
    Regards,
    Sarvesh

  • Word VBA Macro problem with adding rows to table for BAPI call

    Hello all,
    I have code in Word macro which is reading file from the disk and converting it to binary. This binary should be inserted in the internal table (Dim As object) for further posting. Code is modified from the note 945682.
    Here is the code:
    Sub Read_File(FileNameFull As String)
    Dim oBinaryDataTab As Object
    Dim oBinaryDataRow As Object
    Dim lBytesToRead As Long
    Dim iNumChars, i As Integer
    Dim s1022, s2044, sX As String
    Dim fs, f, ts As Object
    Dim ReadFile As String
    ' Actually does the work of uploading the document in 1022 byte pieces.
    ReadFile = 0
    Set fs = CreateObject("Scripting.FileSystemObject")
    Set f = fs.GetFile(FileNameFull)
    Set ts = f.OpenAsTextStream(1, -2)
    lBytesToRead = f.Size
    ReadFile = f.Size
    Do While ts.AtEndOfStream <> True
    If lBytesToRead < 1022 Then
    iNumChars = lBytesToRead
    Else
    iNumChars = 1022
    End If
    s1022 = ts.Read(iNumChars)
    s2044 = ""
    For i = 1 To Len(s1022)
    sX = Hex$(CByte(Asc(Mid(s1022, i, 1))))
    If Len(sX) = 1 Then
    sX = "0" + sX
    End If
    s2044 = s2044 + sX
    Next i
    Set oBinaryDataRow = oBinaryDataTab.Rows.Add
    oBinaryDataRow("LINE") = s2044
    lBytesToRead = lBytesToRead - iNumChars
    Loop
    End Sub
    But on the row "Set oBinaryDataRow = oBinaryDataTab.Rows.Add" code just stopped to work.
    Can somebody give me a hint how to proceed?
    I also tried to Dim oBinaryDataTable As Table and oBinaryDataRow as Row with the same result.
    oBinaryDataTable will be used as to post file to SAP system without GUI FTP connection. Because of that it must be converted to binary form.
    TIA
    Gordan
    P.S. Message to Moderator: Please, be so kind, and put the message in the proper forum if this is not this one.

    Self Resloved

  • SNC login for BAPI active X  from VB.

    hello dear friends,
    Needs some advice, we are calling Sales order bapi from VB and due to SOX. we are implementing SNC functionality and so needs to enable SNC for BAPI call too.
    I am new to BAPI etc.. so don't know where to being from. Username/password is hardcoded in VB in active x control.
    thanks
    Lakhbir

    Hi,
    Create the Username in SAP as CPIC type and NOT Dialog User(ask your basis team to do this).
    Yes, you can hardcode username and Pwd in VB . It will work pretty straight forward. I have used this earlier.
    Then you call the BAPI from SAP in your VB code.
    Hope this answers your questions.
    Thanks,

  • Problem facing during BAPI call for an inbound interface.

    I have requirement where in i need to make a BAPI call from SRM system using RFC adapter.
    After importing the BAPI(Z_INV_REF_PO) in the Integration Repository the structure looks to be a follws,
    1.Request
    2.Response and
    3.Exception (fault) Message types.
        In my BPM i did a transformation for my source structure with BAPI request. But while doing a BAPI call it throws me Application error as follows,
    RFC adapter is working fine.
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Inbound Message
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="RFC_ADAPTER">APPLICATION_ERROR</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="urn:sap-com:document:sap:rfc:functions">Z_INV_REF_PO.Exception</SAP:ApplicationFaultMessage>
      <SAP:Stack />
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Please help me out on this. Itz very urgent

    Hi,
    As the error is Applcation_error, the data reached the target system but the BAPI call fails. So you mignt not be providing all the mandatory fields to the BAPI.
    Perform a standalone testing of your BAPI, with the data being passed from XI See if the BAPI call is successful..
    Hope this helps you.
    cheers,
    Siva Maranani.

  • AAA Radius Authentication for Calling Card Platform

    Hi,
    I am using AS5350 and I am using it for calling card application using Clear Box as my RADIUS Server for AAA. My question now, how would I know if cisco is sending the dtmf for "enter card number.au" on the RADIUS server ? Does the card number included on the VSA ? below are my configurations and the debug info. The problem here is that the card number that I entered doesn't able to match against the configuration on my Clear Box/SQL Database. I want to know what should I expect from CiscoAS5350 to send a vsa for enter_card_number ?
    aaa new-model
    aaa group server radius ClearBox
    server 192.168.1.1 auth-port 1812 acct-port 1813
    aaa authentication login default local
    aaa authentication login h323 group ClearBox
    aaa authorization exec h323 group ClearBox
    aaa accounting exec default start-stop group ClearBox
    aaa accounting network default start-stop group ClearBox
    aaa accounting connection h323 start-stop group ClearBox
    aaa session-id unique
    radius-server host 192.168.1.1 auth-port 1812 acct-port 1813
    radius-server key 7 0355481F031F761D
    radius-server vsa send accounting
    radius-server vsa send authentication
    call application voice prepaid tftp://192.168.1.2/debitcard-multi-lang-Cisco.1.1.0.2.tcl
    call application voice prepaid pin-len 10
    call application voice prepaid warning-time 300
    call application voice prepaid redirect-number 8662195822
    call application voice prepaid language 1 en
    call application voice prepaid language 2 sp
    call application voice prepaid language 3 ch
    call application voice prepaid set-location en 0 tftp://192.168.1.2/prompts/
    call application voice prepaid set-location sp 0 tftp://192.168.1.2/prompts/
    call application voice prepaid set-location ch 0 tftp://192.168.1.2/prompts/
    gw-accounting aaa
    ==================================================
    Getting session id for NET(00003600) : db=6418E654
    AA/ACCT/NET(00003600): add, count 1
    Getting session id for NET(00003601) : db=6410D098
    AAA/ACCT/NET(00003601): add, count 1
    AAA/ACCT/CONN(00003601): Pick method list 'h323'
    AAA/ACCT/SETMLIST(00003601): Handle 94000002, mlist 62D3B124, Name h323
    Getting session id for CONN(00003601) : db=6410D098
    AAA/ACCT/CONN(00003601): Queueing record is START
    AAA/ACCT(00003601): Accouting method=ClearBox (RADIUS)
    AAA/ACCT/EVENT/(00003601): ATTR ADD
    AAA/ACCT/CONN(00003601): START protocol reply PASS
    AAA/ACCT/EVENT/(00003601): VOICE DOWN
    AAA/ACCT/HC(00003601): Update VOICE/000020D3
    AAA/ACCT/HC(00003601): VOICE/000020D3 [sess] (rx/tx) base 0/0 pre 0/0 call 0/0
    AAA/ACCT/HC(00003601): VOICE/000020D3 [sess] (rx/tx) adjusted, pre 0/0 call 0/0
    AAA/ACCT/CONN(00003601): Queueing record is STOP osr 1
    AAA/ACCT(00003601): del node, session 174133
    AAA/ACCT/CONN(00003601): free_rec, count 1
    AAA/ACCT/CONN(00003601): Setting session id 174144 : db=6410D098
    AAA/ACCT/HC(00003601): Update VOICE/000020D3
    AAA/ACCT/HC(00003601): Deregister VOICE/000020D3
    AAA/ACCT/EVENT/(00003601): CALL STOP
    AAA/ACCT/CALL STOP(00003601): Sending stop requests
    AAA/ACCT(00003601): Send all stops
    AAA/ACCT/NET(00003601): STOP
    AAA/ACCT/NET(00003601): Method list not found
    AAA/ACCT/CONN(00003601): STOP protocol reply PASS
    AAA/ACCT/CONN(00003601) Record not present

    VSAs are collected by the RADIUS server during the accounting process when AAA is configured with the Debit Card feature. Data items are collected for each call leg created on the gateway. A call leg is the internal representation of a connection on the gateway. Each call made through the gateway consists of two call legs: incoming and outgoing. The call leg information emitted by the gateways can be correlated by the connection ID, which is the same for all call legs of a connection.
    Use the H.323 VSA method of accounting when configuring the AAA application.
    There are two modes:
    •Overloaded Session-ID
    Use the gw-accounting h323 syslog command to configure this mode.
    •VSA
    Use the gw-accounting h323 vsa command to configure this mode.

  • Bapi call for Storage Location????

    Hi,
    Is there any Bapi call which would display the stor location of Material.
    in the Bapi_mat_availabilty.. It shws the total amt of stock and stor_loc is an opional input parameter..
    Thanks in Advance,
    Diana

    Hi,
    Please find the answers to your questions.
    Thanks for you reply!
    Ques: What does FUNCTION 'ZPM1_GENERATE_SRM_DOC_ID' do wns why do you ignore the SY-SUBRC?
    Bapi SRM_DOCUMENT_CHECKIN_VIA_TAB  has SY-SUBRC  as 1.
    Ques: what are the values of c_rms_id c_d_elem_name c_d_srule_name c_d_srule_type v_document_id at run time?
    These are all constants based on the record structure of client.
    Ques: Which BAPI is not working for any of the Office 2010 documents?
    SRM_DOCUMENT_CHECKIN_VIA_TAB
    Ques: Do you use mime type XLSX - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet or XLS - application/vnd.ms-excel
    Yes.
    Regards,
    Sumit
    Edited by: Sumit Oberoi on May 16, 2011 11:12 PM

  • BAPI calls for DMS in CRM system

    Hi,
    What BAPI calls are available on CRM system to support DMS? Where can I find more info on this?
    Regards,
    Naveen

    Interesting question.
    A survey of transaction bapi reveals no DMS bapi's in CRM2007. However, In SPRO there are controls for DMS and transaction CSADMIN can also be found in the system.

  • Using Web Dynpro authentication for a Web Service call

    Hi all,
    I want to develop a Web Dynpro that calls a Web Service running on the same Web AS (7.0). The Web Dynpro will be integrated in a Portal. The web service that has to be called is automatically generated when we create a guided procedure :
    http://help.sap.com/saphelp_nw2004s/helpdata/en/44/44c59fd7c72e84e10000000a155369/frameset.htm
    In my Web Dynpro, I imported the WSDL of this WS and created a model.
    The first time I tried to call the WS in my Web Dynpro I got an authentication error :
    Service call exception; nested exception is: com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (401) Unauthorized. The requested URL was:"http://<myHostName>:50100/GPRuntimeFacadeWS/GPProcessExposing?style=document&pid=CA544E9B629A11DB91480017A48D672A&pver=0.5"
    So I hard-coded an HTTP authentication :
         model._setUser("myWASuser");
         model._setPassword("myPassword");
    And the Web Service call now works.
    Now the next step is that the WS call is made by the user that runs the Web Dynpro. So I found this documentation :
    http://help.sap.com/saphelp_nw04/helpdata/en/59/e8e95d1eba48dfa86ae91ad8816f5d/frameset.htm
    It would resolve my authentication problem, AND the transport issue : at the moment the Web Service URL is stored in the Logical Port of the WD model, and at transport time, a rebuild of the WD project will be needed.
    So I applied what is said in the doc : from the point of view of the Web Service consumer, I just had to add :
        model._setHTTPDestinationName("STARTGP");
    (where STARTGP is the name of the destination I created in the Visual Administrator with a "Logon Ticket" authentication.)
    before the execute(), and I removed my hardcoded authentication.
    Unfortunately, nothing changes... I still get a 401 authentication error.
    Does anyone have an idea about this ? Or maybe a workaround ?
    Thanks in advance for any suggestion.
    Regards,
    Julien

    Hello Julien,
    I have a scenario similar to yours. A client webdynpro application accessing a EJB methods exposed as web service. Those EJB's methods calls R3 RFC's. The client requirements' was to allow SSO through all the layers (Webdynpro -> EJB WS -> RFC). The Webdynpro and EJB's are deployed on the same WAS.
    Solution:
    1 - Create a RFC Destination on Visual Administration provide the R3 connection parameters and set the Authentication for "Current User (Logon Ticket)". Save your Destination;
    2 - In your EJB Project open your Web Service Configuration, on the Security page, set:
        Authentication Mechanism: HTTP Authentication
        Basic (username/password)
        Use SAP Logon Ticket
    3 - In your EJB, implement the following code to create JCO Client for the RFC invocations:
    Object obj = ctx.lookup(DestinationService.JNDI_KEY);
        DestinationService dstService = (DestinationService) obj;
        RFCDestination dst = (RFCDestination) dstService.getDestination("RFC", "<YOUR_RFC_DESTINATION_NAME>");
        Properties jcoProperties = dst.getJCoProperties();
        JCO.Client jcoClient = JCO.createClient(jcoProperties);
    4 - In your EAR Project, open your "application-j2ee-engine.xml" and add the References:
         "tc/sec/destinations/service" as Service
         "tc/sec/destinations/interface" as Interface.
    5 - Create your EAR File and Deploy;
    6 - Check if the web service now requires Authentication: go to http://<host>:<port>/index.html and click on Web Services Navigator. Test your Web Service. Your Web Service should requiere you to log in before execute the test;
    7 - Go back to your Visual Administrator and create a HTTP Destination. Provide your WS URL (should be something like "http://<host>:<port>/<WS_NAME>/Config1?style=document"). Choose Authentication: Logon Ticket. Save your Destination;
    8 - Go to your webdynpro project, import your WS Model. (If you have already created it, you have to delete it and import it again, refer to this blog on how to reimport WS Models: /people/bertram.ganz/blog/2005/10/10/how-to-reimport-web-service-models-in-web-dynpro-for-java  How To Reimport Web Service Models in Web Dynpro for Java );
    9 - Open your model's Logical Ports node, go to the Security tab, and choose "Use SAP Logon Ticket";
    10 - In your webdynpro code, before you call the ws invocation (should be something like that: <YOUR_NODE_DEFINITION>.modelObject().execute();), include the following line:
    <YOUR_NODE_DEFINITION>.modelObject()._setHTTPDestinationName("<YOUR_HTTP_DESTINATION_NAME>");
    11 - Save All Metadata and deploy your Webdynpro App. Test your results.
    I hope it helps you, as the documentation on how to implement this scenario is scattered through the SDN and all the SAP help portal.
    Best regards,
    Paulo.

  • How can I set a breakpoint for a BAPI call in SE37?

    Hi,
    I am trying to debug a BAPI call from an external system in R/3 4.6C.
    In SCM4.1, the SE37 transaction has an aoption under Utilities->Settings ABAP Editor/Debugging tab to activate external debugging. But in R/3 4.6C no such tab exists.
    Is there any other way of doing this in R/3 4.6C?
    Thanks,
    Chris Brookes.

    Hi,
    Unfortunately I cannot chage the source code of the FM since it is not a development system so I cannot insert a BREAKPOINT statement.
    Also, just setting a breakpoint in SE37, even if logged in as the same user who calls the BAPI does not work.
    Btw, the call to the BAPI is done via .NET.
    It seems that SE37 in R/3 4.6C just doesn't have the same options as in SCM4.1.
    Any other ideas?
    Thanks,
    Chris Brookes.

  • Java.lang.SecurityException: Authentication for user system denied in realm wl_realm

    I am experiencing this error when a servlet or JSP is preloaded on the web
    server and the init method of the preloaded item results in a call to the
    app server. If I don't preload and then manually invoke the JSP or servlet
    after the web server completely loads the call to the app server does not
    produce the exception. The only security differences between the web and
    app servers are the console and system passwords. I can fix the problem by
    making the passwords (system and console) the same across the board, but
    find it hard to believe that this is the true solution. I would prefer
    sticking with the default security settings.
    I've poured through hundreds of messages. I can find similar problems but
    not this exact problem.
    Any ideas would truly be appreciated!
    More information:...
    App and Web server are both wls 6.1.1.0 running on the same SUN Solaris box.
    Both are using the basic, out of the box, security.
    The App server has SSL disabled.
    The exception reported in the app server's log is:
    java.lang.SecurityException: Authentication for user system denied in realm
    wl_realm
    at weblogic.security.acl.Realm.authenticate(Realm.java:212)
    at weblogic.security.acl.Realm.getAuthenticatedName(Realm.java:233)
    at
    weblogic.security.acl.internal.Security.authenticate(Security.java:125)
    at weblogic.security.acl.internal.Security.verify(Security.java:87)
    at
    weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:235)
    at
    weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:2
    2)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    The exception reported in the web server's log is:
    java.lang.SecurityException: Authentication for user system denied in realm
    wl_realm
    at
    weblogic.rmi.internal.BasicOutboundRequest.sendReceive(BasicOutboundRequest.
    java:85)
    at
    weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
    :255)
    at
    weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
    :222)
    at weblogic.rmi.internal.ProxyStub.invoke(ProxyStub.java:35)
    at $Proxy54.lookup(Unknown Source)
    at
    weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:323)
    at javax.naming.InitialContext.lookup(InitialContext.java:350)
    at
    com.qwest.tmmt.manager.client.MDMAdapter.getEJBHome(MDMAdapter.java:197)
    at
    com.qwest.tmmt.manager.client.MDMAdapter.<init>(MDMAdapter.java:64)
    at
    com.qwest.tmmt.manager.client.ManagerFactory.createMetaDataManager(ManagerFa
    ctory.java:305)
    at
    com.qwest.insite.util.ClientMetaDataCache.<init>(ClientMetaDataCache.java:53
    at
    com.qwest.insite.util.ClientMetaDataCache.getInstance(ClientMetaDataCache.ja
    va:106)
    at
    com.qwest.insite.metadata.startup.MetaDataServlet.init(MetaDataServlet.java:
    30)
    at
    weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java
    :700)
    at
    weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.ja
    va:643)
    at
    weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.jav
    a:588)
    at
    weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletC
    ontext.java:2203)
    at
    weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServlet
    Context.java:2147)
    at
    weblogic.servlet.internal.WebAppServletContext.init(WebAppServletContext.jav
    a:884)
    at
    weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletContext.j
    ava:807)
    at
    weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:421)
    at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
    at weblogic.j2ee.Application.addComponent(Application.java:160)
    at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
    at
    weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentT
    arget.java:329)
    at
    weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentT
    arget.java:144)
    at
    weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServer.java:
    76)
    at java.lang.reflect.Method.invoke(Native Method)
    at
    weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl
    .java:608)
    at
    weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:5
    92)
    at
    weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea
    nImpl.java:352)
    at
    com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
    at
    com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
    at
    weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:449)
    at
    weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:190)
    at $Proxy33.addWebDeployment(Unknown Source)
    at
    weblogic.management.configuration.WebServerMBean_CachingStub.addWebDeploymen
    t(WebServerMBean_CachingStub.java:1094)
    at
    weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentT
    arget.java:315)
    at
    weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Deployment
    Target.java:279)
    at
    weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(D
    eploymentTarget.java:233)
    at
    weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(Deploym
    entTarget.java:193)
    at java.lang.reflect.Method.invoke(Native Method)
    at
    weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl
    .java:608)
    at
    weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:5
    92)
    at
    weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea
    nImpl.java:352)
    at
    com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
    at
    com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
    at
    weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:449)
    at
    weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:190)
    at $Proxy32.updateDeployments(Unknown Source)
    at
    weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(
    ServerMBean_CachingStub.java:2734)
    at
    weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(Appl
    icationManager.java:362)
    at
    weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManage
    r.java:154)
    at java.lang.reflect.Method.invoke(Native Method)
    at
    weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl
    .java:608)
    at
    weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:5
    92)
    at
    weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea
    nImpl.java:352)
    at
    com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
    at
    com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
    at
    weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:449)
    at
    weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:190)
    at $Proxy45.start(Unknown Source)
    at
    weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(
    ApplicationManagerMBean_CachingStub.java:480)
    at
    weblogic.management.Admin.startApplicationManager(Admin.java:1151)
    at weblogic.management.Admin.finish(Admin.java:570)
    at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:506)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:203)
    at weblogic.Server.main(Server.java:35)
    Thanks,
    Jed Zimmer

    You're correct. I meant the DOMAIN_SYSTEM_PASSWORD password in my
    <domain-name>domain.ksh file. The DOMAIN_SYSTEM_PASSWORD value (if
    specified) has to match the system user's password or else the server will
    not start/stop.
    I have determined more since my post. A startup class also produces the
    same error. I have minimized my environments as follows and still receive
    the exception, and a soon as I synchronize the system users' passwords on
    the app/web server the problem goes away. Or, I can keep the passwords
    different and just not access the app server EJBs until after the web server
    finished loading, which also causes the error to go away. I'm just confused
    about what I might be doing wrong.
    Steps to produce the error:
    App server:
    - Installed from 6.1.1.0 from scratch and started it up.
    - Changed the system user's password from the admin console, persisting the
    changes.
    - Modified logging settings to see more info in the log files.
    - Disabled instrument stack traces.
    - Stopped/Started the app server
    Web server:
    - Installed from 6.1.1.0 from scratch and started it up.
    - Modified logging settings to see more info in the log files.
    - Disabled instrument stack traces.
    - Added a servlet to the DefaultWebApp_insiteserver application
    - specified name and class
    - the load on startup setting defaulted to zero, which will cause the
    preloading
    - Added 3 jar files to the classpath to support the EJB call
    - Stopped/Started the web server
    When the web server loads the servlet loads and tries to locate the EJB on
    the app server. The app server throws the security exception. The app/web
    servers are both running on the same SUN box, have the same IP address
    (different ports) and I'm using non-SSL. Each server is it's own WLS
    environment. The only installed file that is shared it the
    weblogic_domain_registry.dat file in the root directory. As for security,
    I'm doing nothing except changing one password (system user on the app
    server).
    I then tried to manually upgrade the app/web servers to 6.1.2.0 by updating
    the WEBLOGIC_ROOT in the respective xxxxdomain.ksh files. Same problem.
    I then cleanly reinstalled the app/web servers using version 6.1.2.0 and
    configured as above. Same problem.
    Let me know if I need to provide additional details.
    Thanks,
    Jed Zimmer
    "Joseph Nguyen" <[email protected]> wrote in message
    news:[email protected]...
    >
    "Jed Zimmer" <[email protected]> wrote in message
    news:[email protected]...
    I am experiencing this error when a servlet or JSP is preloaded on the
    web
    server and the init method of the preloaded item results in a call tothe
    app server. If I don't preload and then manually invoke the JSP orservlet
    after the web server completely loads the call to the app server does
    not
    produce the exception. The only security differences between the weband
    app servers are the console and system passwords. I can fix the problemby
    making the passwords (system and console) the same across the board, but
    find it hard to believe that this is the true solutionI don't quite understand what you mean by "console" password? Are you
    talking about the admin console? If so then it's confusing because youhave
    to log into the console using the system user. If you can clarify morehere
    it would great.
    Joseph Nguyen
    BEA Support
    . I would prefer
    sticking with the default security settings.
    I've poured through hundreds of messages. I can find similar problems
    but
    not this exact problem.
    Any ideas would truly be appreciated!
    More information:...
    App and Web server are both wls 6.1.1.0 running on the same SUN Solarisbox.
    Both are using the basic, out of the box, security.
    The App server has SSL disabled.
    The exception reported in the app server's log is:
    java.lang.SecurityException: Authentication for user system denied inrealm
    wl_realm
    at weblogic.security.acl.Realm.authenticate(Realm.java:212)
    atweblogic.security.acl.Realm.getAuthenticatedName(Realm.java:233)
    at
    weblogic.security.acl.internal.Security.authenticate(Security.java:125)
    atweblogic.security.acl.internal.Security.verify(Security.java:87)
    at
    weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:235)
    at
    weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:2
    2)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    The exception reported in the web server's log is:
    java.lang.SecurityException: Authentication for user system denied inrealm
    wl_realm
    at
    weblogic.rmi.internal.BasicOutboundRequest.sendReceive(BasicOutboundRequest.
    java:85)
    at
    weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
    :255)
    at
    weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
    :222)
    at weblogic.rmi.internal.ProxyStub.invoke(ProxyStub.java:35)
    at $Proxy54.lookup(Unknown Source)
    at
    weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:323)
    at javax.naming.InitialContext.lookup(InitialContext.java:350)
    at
    com.qwest.tmmt.manager.client.MDMAdapter.getEJBHome(MDMAdapter.java:197)
    at
    com.qwest.tmmt.manager.client.MDMAdapter.<init>(MDMAdapter.java:64)
    at
    com.qwest.tmmt.manager.client.ManagerFactory.createMetaDataManager(ManagerFa
    ctory.java:305)
    at
    com.qwest.insite.util.ClientMetaDataCache.<init>(ClientMetaDataCache.java:53
    at
    com.qwest.insite.util.ClientMetaDataCache.getInstance(ClientMetaDataCache.ja
    va:106)
    at
    com.qwest.insite.metadata.startup.MetaDataServlet.init(MetaDataServlet.java:
    30)
    at
    weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java
    :700)
    at
    weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.ja
    va:643)
    at
    weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.jav
    a:588)
    at
    weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletC
    ontext.java:2203)
    at
    weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServlet
    Context.java:2147)
    at
    weblogic.servlet.internal.WebAppServletContext.init(WebAppServletContext.jav
    a:884)
    at
    weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletContext.j
    ava:807)
    at
    weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:421)
    at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
    at weblogic.j2ee.Application.addComponent(Application.java:160)
    at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
    at
    weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentT
    arget.java:329)
    at
    weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentT
    arget.java:144)
    at
    weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServer.java:
    76)
    at java.lang.reflect.Method.invoke(Native Method)
    at
    weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl
    .java:608)
    at
    weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:5
    92)
    at
    weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea
    nImpl.java:352)
    at
    com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
    at
    com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
    at
    weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:449)
    at
    weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:190)
    at $Proxy33.addWebDeployment(Unknown Source)
    at
    weblogic.management.configuration.WebServerMBean_CachingStub.addWebDeploymen
    t(WebServerMBean_CachingStub.java:1094)
    at
    weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentT
    arget.java:315)
    at
    weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Deployment
    Target.java:279)
    at
    weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(D
    eploymentTarget.java:233)
    at
    weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(Deploym
    entTarget.java:193)
    at java.lang.reflect.Method.invoke(Native Method)
    at
    weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl
    .java:608)
    at
    weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:5
    92)
    at
    weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea
    nImpl.java:352)
    at
    com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
    at
    com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
    at
    weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:449)
    at
    weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:190)
    at $Proxy32.updateDeployments(Unknown Source)
    at
    weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(
    ServerMBean_CachingStub.java:2734)
    at
    weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(Appl
    icationManager.java:362)
    at
    weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManage
    r.java:154)
    at java.lang.reflect.Method.invoke(Native Method)
    at
    weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl
    .java:608)
    at
    weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:5
    92)
    at
    weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea
    nImpl.java:352)
    at
    com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
    at
    com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
    at
    weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:449)
    at
    weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:190)
    at $Proxy45.start(Unknown Source)
    at
    weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(
    ApplicationManagerMBean_CachingStub.java:480)
    at
    weblogic.management.Admin.startApplicationManager(Admin.java:1151)
    at weblogic.management.Admin.finish(Admin.java:570)
    at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:506)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:203)
    at weblogic.Server.main(Server.java:35)
    Thanks,
    Jed Zimmer

  • How to create purchase order using VA01 for BAPI?

    how to create purchase order using VA01 for BAPI?

    Hi Arun,
    Please check this link
    Example Program for BAPI_PO_CREATE1
    Re: BAPI_PO_CREATE1
    Questions in BAPI_PO_CREATE1
    Problem with BAPI_PO_CREATE1
    *& Report BAPI_PO_CREATE *
    REPORT bapi_po_create.
    Input File Declaration
    TYPES: BEGIN OF ty_input_file,
    column1 TYPE char50,
    column2 TYPE char50,
    column3 TYPE char50,
    column4 TYPE char50,
    column5 TYPE char50,
    column6 TYPE char50,
    column7 TYPE char50,
    column8 TYPE char50,
    column9 TYPE char50,
    column10 TYPE char50,
    column11 TYPE char50,
    column12 TYPE char50,
    column13 TYPE char50,
    column14 TYPE char50,
    column15 TYPE char50,
    column16 TYPE char50,
    column17 TYPE char50,
    column18 TYPE char50,
    END OF ty_input_file.
    DATA: i_input_file TYPE STANDARD TABLE OF ty_input_file,
    wa_input_file TYPE ty_input_file.
    CONSTANTS: c_path TYPE char20 VALUE 'C:\',
    c_mask TYPE char9 VALUE ',.,..',
    c_mode TYPE char1 VALUE 'O',
    c_filetype TYPE char10 VALUE 'ASC',
    c_x TYPE char01 VALUE 'X'.
    PARAMETERS : p_fname LIKE rlgrap-filename.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
    Browse Presentation Server
    PERFORM f4_presentation_file.
    START-OF-SELECTION..
    Read presentation server file
    PERFORM f1003_upload_file.
    IF NOT i_input_file[] IS INITIAL.
    PERFORM split_data.
    ENDIF.
    *& Form f4_presentation_file
    *& F4 Help for presentation server
    FORM f4_presentation_file .
    CALL FUNCTION 'WS_FILENAME_GET'
    EXPORTING
    def_path = c_path
    mask = c_mask
    mode = c_mode
    title = text-001
    IMPORTING
    filename = p_fname
    EXCEPTIONS
    inv_winsys = 1
    no_batch = 2
    selection_cancel = 3
    selection_error = 4
    OTHERS = 5.
    IF sy-subrc 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    ENDFORM. " f4_presentation_file
    *& Form f1003_upload_file
    *& Upload File
    FORM f1003_upload_file .
    DATA: lcl_filename TYPE string.
    lcl_filename = p_fname.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = lcl_filename
    filetype = c_filetype
    has_field_separator = c_x
    TABLES
    data_tab = i_input_file
    EXCEPTIONS
    file_open_error = 1
    file_read_error = 2
    no_batch = 3
    gui_refuse_filetransfer = 4
    invalid_type = 5
    no_authority = 6
    unknown_error = 7
    bad_data_format = 8
    header_not_allowed = 9
    separator_not_allowed = 10
    header_too_long = 11
    unknown_dp_error = 12
    access_denied = 13
    dp_out_of_memory = 14
    disk_full = 15
    dp_timeout = 16
    OTHERS = 17.
    IF sy-subrc 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    EXIT.
    ENDIF.
    ENDFORM. " f1003_upload_file
    *& Form split_data
    Collect data for creating Purchase Order
    FORM split_data .
    DATA: i_poitem TYPE STANDARD TABLE OF bapimepoitem,
    i_poitemx TYPE STANDARD TABLE OF bapimepoitemx,
    i_poitem_sch TYPE STANDARD TABLE OF bapimeposchedule,
    i_poitem_schx TYPE STANDARD TABLE OF bapimeposchedulx,
    i_acct_*** TYPE STANDARD TABLE OF bapimepoaccount,
    i_acct_assx TYPE STANDARD TABLE OF bapimepoaccountx,
    i_services TYPE STANDARD TABLE OF bapiesllc ,
    i_srvacc TYPE STANDARD TABLE OF bapiesklc,
    i_return TYPE STANDARD TABLE OF bapiret2,
    wa_header TYPE bapimepoheader,
    wa_headerx TYPE bapimepoheaderx,
    wa_poitem TYPE bapimepoitem,
    wa_poitemx TYPE bapimepoitemx,
    wa_poitem_sch TYPE bapimeposchedule,
    wa_poitem_schx TYPE bapimeposchedulx,
    wa_acct_*** TYPE bapimepoaccount,
    wa_acct_assx TYPE bapimepoaccountx,
    wa_services TYPE bapiesllc,
    wa_srvacc TYPE bapiesklc,
    wa_return TYPE bapiret2,
    ws_po TYPE bapimepoheader-po_number.
    break gbpra8.
    wa_services-pckg_no = 10.
    wa_services-line_no = 1.
    wa_services-outl_no = '0'.
    wa_services-outl_ind = c_x.
    wa_services-subpckg_no = 20.
    APPEND wa_services TO i_services.
    wa_srvacc-pckg_no = 10.
    wa_srvacc-line_no = 1.
    wa_srvacc-serno_line = 01.
    wa_srvacc-serial_no = 01.
    wa_srvacc-percentage = 100.
    APPEND wa_srvacc TO i_srvacc.
    LOOP AT i_input_file INTO wa_input_file.
    IF wa_input_file-column2 EQ 'HD'.
    wa_header-doc_type = wa_input_file-column3.
    wa_header-creat_date = sy-datum.
    wa_header-created_by = sy-uname.
    wa_header-vendor = wa_input_file-column4.
    PERFORM conversion_output USING wa_header-vendor
    CHANGING wa_header-vendor.
    wa_header-comp_code = 'DE03'.
    wa_header-purch_org = 'DE03'.
    wa_header-pur_group = 'DE1'.
    wa_header-vper_start = wa_input_file-column9.
    wa_header-vper_end = wa_input_file-column10.
    wa_headerx-comp_code = c_x.
    wa_headerx-doc_type = c_x.
    wa_headerx-creat_date = c_x.
    wa_headerx-created_by = c_x.
    wa_headerx-vendor = c_x.
    wa_headerx-purch_org = c_x.
    wa_headerx-pur_group = c_x.
    wa_headerx-vper_start = c_x.
    wa_headerx-vper_end = c_x.
    ENDIF.
    IF wa_input_file-column2 EQ 'IT'.
    wa_poitem-po_item = wa_input_file-column3.
    wa_poitem-short_text = wa_input_file-column6.
    wa_poitem-plant = wa_input_file-column8.
    wa_poitem-quantity = '1'.
    wa_poitem-tax_code = 'V0'.
    wa_poitem-item_cat = 'D'.
    wa_poitem-acctasscat = 'K'.
    wa_poitem-matl_group = wa_input_file-column7.
    wa_poitem-pckg_no = '10'.
    APPEND wa_poitem TO i_poitem .
    wa_poitemx-po_item = wa_input_file-column3.
    wa_poitemx-po_itemx = c_x.
    wa_poitemx-short_text = c_x.
    wa_poitemx-plant = c_x.
    wa_poitemx-quantity = c_x.
    wa_poitemx-tax_code = c_x.
    wa_poitemx-item_cat = c_x.
    wa_poitemx-acctasscat = c_x.
    wa_poitemx-matl_group = c_x.
    wa_poitemx-pckg_no = c_x.
    APPEND wa_poitemx TO i_poitemx.
    wa_poitem_sch-po_item = wa_input_file-column3.
    wa_poitem_sch-delivery_date = sy-datum.
    APPEND wa_poitem_sch TO i_poitem_sch.
    wa_poitem_schx-po_item = wa_input_file-column3.
    wa_poitem_schx-po_itemx = c_x.
    wa_poitem_schx-delivery_date = c_x.
    APPEND wa_poitem_schx TO i_poitem_schx.
    wa_acct_***-po_item = 10.
    wa_acct_***-serial_no = 01.
    wa_acct_***-gl_account = '0006360100'.
    wa_acct_***-co_area = '1000'.
    wa_acct_***-costcenter = 'KC010000'.
    APPEND wa_acct_*** TO i_acct_***.
    wa_acct_***-po_item = 10.
    wa_acct_***-serial_no = 02.
    wa_acct_***-gl_account = '0006360100'.
    wa_acct_***-co_area = '1000'.
    wa_acct_***-costcenter = 'KC010000'.
    APPEND wa_acct_*** TO i_acct_***.
    wa_acct_assx-po_item = 10.
    wa_acct_assx-serial_no = 01.
    wa_acct_assx-po_itemx = c_x.
    wa_acct_assx-serial_nox = c_x.
    wa_acct_assx-gl_account = c_x.
    wa_acct_assx-co_area = c_x.
    wa_acct_assx-costcenter = c_x.
    APPEND wa_acct_assx TO i_acct_assx.
    wa_acct_assx-po_item = 10.
    wa_acct_assx-serial_no = 02.
    wa_acct_assx-po_itemx = c_x.
    wa_acct_assx-serial_nox = c_x.
    wa_acct_assx-gl_account = c_x.
    wa_acct_assx-co_area = c_x.
    wa_acct_assx-costcenter = c_x.
    APPEND wa_acct_assx TO i_acct_assx.
    wa_services-pckg_no = 20.
    wa_services-line_no = 2.
    wa_services-service = wa_input_file-column9.
    wa_services-quantity = '100'.
    wa_services-gr_price = '100'.
    wa_services-userf1_txt = wa_input_file-column13.
    APPEND wa_services TO i_services.
    wa_srvacc-pckg_no = 20.
    wa_srvacc-line_no = 1.
    wa_srvacc-serno_line = 02.
    wa_srvacc-serial_no = 02.
    wa_srvacc-percentage = 100.
    APPEND wa_srvacc TO i_srvacc.
    ENDIF.
    ENDLOOP.
    CALL FUNCTION 'BAPI_PO_CREATE1'
    EXPORTING
    poheader = wa_header
    poheaderx = wa_headerx
    POADDRVENDOR =
    TESTRUN =
    MEMORY_UNCOMPLETE =
    MEMORY_COMPLETE =
    POEXPIMPHEADER =
    POEXPIMPHEADERX =
    VERSIONS =
    NO_MESSAGING =
    NO_MESSAGE_REQ =
    NO_AUTHORITY =
    NO_PRICE_FROM_PO =
    IMPORTING
    exppurchaseorder = ws_po
    EXPHEADER =
    EXPPOEXPIMPHEADER =
    TABLES
    return = i_return
    poitem = i_poitem
    poitemx = i_poitemx
    POADDRDELIVERY =
    poschedule = i_poitem_sch
    poschedulex = i_poitem_schx
    poaccount = i_acct_***
    POACCOUNTPROFITSEGMENT =
    poaccountx = i_acct_assx
    POCONDHEADER =
    POCONDHEADERX =
    POCOND =
    POCONDX =
    POLIMITS =
    POCONTRACTLIMITS =
    poservices = i_services
    posrvaccessvalues = i_srvacc
    POSERVICESTEXT =
    EXTENSIONIN =
    EXTENSIONOUT =
    POEXPIMPITEM =
    POEXPIMPITEMX =
    POTEXTHEADER =
    POTEXTITEM =
    ALLVERSIONS =
    POPARTNER =
    break gbpra8.
    LOOP AT i_return INTO wa_return.
    ENDLOOP.
    ENDFORM. " split_data
    *& Form conversion_output
    Conversion exit input
    FORM conversion_output USING p_ip
    CHANGING p_op.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = p_ip
    IMPORTING
    output = p_op.
    ENDFORM. " conversion_output
    Best regards,
    raam

  • Howto bapi calls

    Hello,
    I am working on a scenario in which a client (abap proxy) sends a message to the integration server, which dispatches the messages to an rfc-adapter, an bapi call.
    Therefore I have read the tutorial, which can be found on this site, but unfortunately I have run into problems. Maybe someone can help me at this point. This is what I did:
    1.I have imported the BAPI_FLIGHT_CHECKAVAILABILITY as suggested in the tutorial.
    2. I created an Message interface named: U2_BAPI_IF
    3. For the output message I have chosen: BAPI_FLIGHT_CHECKAVAILABILITY and for the input:
    BAPI_FLIGHT_CHECKAVAILABILITY.Response. I have left the fault message field empty.
    4. I did no message mapping, since I want to work with the BAPI Response structure in the abap proxy.
    5. The Message interface is defined as outbound synchron.
    6.In the Integration Directory I created a Receiver Determination with a Service as a sender, the message interface is U2_BAPI_IF. Additionally I configured a "configured receiver" the client with the BAPI.
    7.I created a Interface Determination, for the sender the same entries as above and for the configured Inbound Interface I have chosen BAPI_FLIGHT_CHECKAVAILABILITY and the receiver client
    8.I created a receiver agreement.
    9. Saved the change list.
    10. I have generated the abap proxy for the message interface U2_BAPI_IF, without problems
    11. I created the following abap program:
    data: lv_msg_raus TYPE ZU2_BAPI_IF_BAPI_FLIGHT_CHECK1,
          lo_proxy TYPE REF TO ZCO_U2_BAPI_IF,
          lv_msg_rein TYPE ZU2_BAPI_IF_BAPI_FLIGHT_CHECKA.
          lv_msg_raus-AIRLINEID = 'AA'.
          lv_msg_raus-CONNECTIONID = '0017'.
          lv_msg_raus-FLIGHTDATE = '20040801'.
          create object lo_proxy.
          call method lo_proxy->execute_synchronous
            exporting
              OUTPUT = lv_msg_raus
            importing
              INPUT = lv_msg_rein.
    12. I execute the program and I receive the following error:INTERFACE_REGISTRATION_ERROR, the SAP Stack says:
    <SAP:Stack>No implementing class registered for the interface (type ifmmessif, name BAPI_FLIGHT_CHECKAVAILIBILITY, namespace urn:sap-com:document:sap:rfc:functions )</SAP:Stack>
    So now my question, do I have to implement a class (proxy) on the receiver side to receive the message and pass it then via bapi call myself, or did I something totally wrong?
    I hope somebody can help me,
    Thanks
    Oliver

    Hi Oliver,
    I was wondering if you finally got this scenario to work, if Yes. Could you explain how did yo manage to (solve your problem)setup your scenario as described in your earlier note?
    Thanks,
    Rob.

  • Bapi call in abap proxy reaching dialog timeout in async scenario

    Hi all,
    We have an XI interface to create sales orders. Legacy app sends a soap message async to XI with a group of orders. XI sends this group of orders to an Abap proxy async on ECC side. Into this Abap proxy we have a loop to process each order received in the group with BAPI_SALESORDER_CREATEFROMDAT2. Ending the loop, abap proxy start another async process to send the response to XI with an outbound abap proxy, and the response is redirected by XI to Legacy app.
    The problem is, this group of orders can have two or two thousand orders... so, the async process guarantee that no timeout limit will be reached. This is working for the whole process. But when this BAPI is creating an order, the time out of BAPIs execution seems to be the same as the timeout of dialog processes (now set to 10 minutes). This is our problem. Some orders spend more than 10 minutes to process (orders with five hundreds items, for example)... when this occurs, BAPI throws a time out reached error and the async process stops on the inbound queue with status sysfail.
    We are now trying to understand why this timeout is been triggered by the BAPI. As it is running into an Async process, it should execute without any kind of timeout limits...
    If anybody has any idea, please, help us.
    Thank you.
    regards.
    roberti

    May be I was not so clear... the total spent time in the process can be many many hours, days, etc... no timeout is reached. I can post 10.000 orders, no timeout is reached. The problem is that if the processing of only one order with BAPI_SALESORDER_CREATEFROMDAT2 takes longer than 10 minutes, then the timeout is reached. This is the strange part. The processing of the bapi seems to get the same timeout of dialog processes, we already tested increasing the dialog process timeout and the timeout of bapi execution was the same...
    We already monitor on SE66 to see if it opens a dialog process to execute the bapi call function, but it does not.
    If anyone has any tip, please, provide us.
    Thanks!
    roberti

Maybe you are looking for