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

Similar Messages

  • How can I call a ABAP proxy class from BADI? PLease help

    hi Experts,
        I have a scenario where I have to call a ABAP proxy class from a BADI. How can I do this? Does anybody has sample code for the same?
    Please help.
    Thanks
    Gopal

    Hi,
       You can call a method of a class from BADI. Here are the steps.
       1) In the BADI implementation create a object for the proxy class.
       2) Call the Execute_Synchronous method.
        You can define a BADI by using SE18 and you can implement it by using SE19.
    Sample code...
    ================================================
      METHOD ZIF_EX_VBADI~CONVERTUPPER.
      DATA: OBJ TYPE REF TO ZTESTCLASS.
      DATA: IT_DATA  TYPE ZIN_MT,
                IT_RES   TYPE ZOUT_MT,
                SEXCEPTION TYPE REF TO CX_AI_SYSTEM_FAULT.
      TRY.
          CREATE OBJECT OBJ
             EXPORTING
                 LOGICAL_PORT_NAME = 'TESTPORT'.
      CATCH CX_AI_SYSTEM_FAULT INTO SEXCEPTION.
      ENDTRY.
    ENDMETHOD.
    ================================================
    Thanks,
    Vivek LR

  • How to call a ABAP proxy class from a BADI? Please help!

    hi Experts,
        I have a scenario where I have to call a ABAP proxy class from a BADI. How can I do this? Does anybody has sample code for the same?
    Please help.
    Thanks
    Gopal

    Hi Gopal,
    Check this out
    DATA: ref_obj    TYPE REF TO zmfg_production_ord.----> BADI
    * Instantiate the proxy class
        CREATE OBJECT ref_obj.
        TRY.
            CALL METHOD ref_obj->execute_asynchronous
              EXPORTING
                output = it_output.     "Output Structure
            COMMIT WORK.
          CATCH cx_ai_system_fault INTO ref_sysexception.
        ENDTRY.
        IF  ref_sysexception IS INITIAL.
          WRITE : / 'Error Message'.
        ENDIF.
    Edited by: Raj on May 28, 2008 4:52 PM

  • Double call of abap proxy client

    Hi expert,
    I have a scenario which an abap program will send a data to third party web service via sender abap proxy. I notice some of the message was double in sxmb_moni which should be called 1 time. Any idea why this happen? Abaper said that the abap program only call my proxy client 1 time. Thanks.

    Hi,
    Any possible the abap proxy send double message?
    There is no way for this to happen.
    Either your report for proxy ran twice consecutively or the proxy call method is in loop in report.
    Sice u said that only 1 time it happened, i think th proxy call method is not in loop , and may be report ran twice.
    Please check the ABAP code if any loop is there or proxy called twice in the report..
    Babu

  • Parallel processing of webservice calls in ABAP Proxy

    Within an ABAP Proxy I want to call multiple services in parallel. My thougth was to encapsulate the webservice calls in RFC function modules and then to use "CALL FUNCTION STARTING NEW TASK ..." but anyhow I am wondering if it is possible to use a form within ABAP proxy to collect the RECEIVE data from the modules.

    The Problem was caused by the response of the external AXIS  WebService which contains a multiRef element in the SOAP
    body which is not supported by SAP simple transformation.
    The multiRef  was switched off on AXIS.

  • Calling an abap proxy on PI itself

    We have a situation where we maintain tables in PI for logging etc... and we want to be able to update these from an inbound message. My plan was to create a proxy on PI itself map to it and call it via the XI adapter, but I get
    Loop in message flow found: system is.00.sappi-dev-d1, pipeline CENTRAL with inbound adapter XI already processed
    because of course it is trying to put the same message id back in the pipeline for processing
    So, is this not possible? Should I just use the RFC adapter and create a function in abap?
    thanks for ideas.
    regards,
    chris

    Hi,
    >>>So, is this not possible? Should I just use the RFC adapter and create a function in abap?
    no it's not  possible unless you create a seperate client on PI which can be used for proxies then
    Regards,
    Michal Krawczyk

  • Is there any BAPI calling only  ABAP command SET UPDATE TASK LOCAL

    Hi abapers
    we have a requirement to run SET UPDATE TASK LOCAL befor calling BAPI_ENTRYSHEET_CREATE command by JAVA through JCO.
    is there any BAPI that contains SET UPDATE TASK LOCAL command or simillar functionality.
    Thanks & Regards,
    Ramesh

    You could write a wrapper RFC function module which calls your BAPI and also the SET UPDATE TASK LOCAL.
    Regards,
    Rich Heilman

  • Timeout in ABAP Proxy

    Hi!
    In my scenario messages on CRM are created by a BADI calling an ABAP proxy class on the local Integraton Engine which then forwards the messages to the XI Integration Server and vice versa.
    We recently had the problem that the SAPSLDAPI SM59 destinations on XI and CRM ran into a timeout because the SAPSLDAPI service in the JCo RFC Provider Service of the J2EE Admin Tool was not working properly.
    While we experienced the SAPSLDAPI timeout problem in the XI Integration Server all messages which XI was supposed to forward to CRM failed in the Call Adapter step in SXMB_MONI with error status 500 (timeout).
    I would have assumed that the same happens also on the CRM side when the local Integration Engine was supposed to send messages to XI. However, there was a timeout when pressing the save button in the IC Web Client. The XML messages were not created at all and not visible in SXMB_MONI. Thus in production a call center agent would have not been able to update any customer or product information.
    If such a problem arises in my opinion the messages should always be created and queued up by the Integration Engine so that they can be reprocessed once the problem is solved. Does anybody have any idea why this did not happen on the CRM side and do you have any feedback how this problem could be resolved?
    Regards, Tanja

    Hi!
    > Please can you check in the SXMB_MONI of the CRM
    > system if there are any messages stcuk there if you
    > cannot see the same in the XI SXMB_MONI.
    There was a timeout when pressing the save button in the IC Web Client. Thus the XML messages were not created at all and not visible in SXMB_MONI on CRM.
    Regards, Tanja

  • ABAP Proxy timeout issue

    Hi,
    I have a scenario in where I provide a web service. I get called by this web service and then call a abap proxy (synch). The abap side takes time to gather the data. after 600 secs, the connection gets a timeout.
    It says, "500 Connection timed out"
    "Detail: Connection to partner timed out after 600s"
    In smicm I increased the HTTP value to 9000. So, how do I get this error?
    Parameters are like below in PI:
    icm/server_port_0     = PROT=HTTP,PORT=50000,TIMEOUT=90,PROCTIMEOUT=9000
    icm/keep_alive_timeout (sec.)  = 50
    icm/conn_timeout (msec.)       = 5000
    xiadapter.inbound.timeout.default = 5400000

    Hi,
    Check if you are getting some short dumps in ABAP side due to this timeout in ST22.
    Probably the issue is the work process time out  in the ABAP side as you mentioned it takes more time to gather data. the profile parameter is rdisp/max_wprun_time  and it has default value of 600 seconds. if thats the case then you can increas it.
    regards,
    francis

  • Exception when calling ABAP Proxy modelled in SAP PI: CL_SOAP_RUNTIME_ROOT

    Hi,
    We have a scenario where we:
    1. Modell an interface in SAP PI
       This interface contains a complex type from a different namespace
    2. Use it to create an ABAP proxy in backend system
    3. Configure it with SOAManager
    4. Call the ABAP proxy ws directly from a third-party system (biztalk)
    We're currently testing calling the ABAP proxy from soapUI, but get a strange exception thrown by the SOAP framework in ABAP backend.
    The test in soapUI is setup by importing the WSDL acquired from SOAMANAGER.
    The error message we in the SOAP response is:
    CX_SY_REF_IS_INITIAL:Exception CX_SOAP_ROOT occurred
    (program: CL_SOAP_RUNTIME_ROOT==========CP, include: CL_SOAP_RUNTIME_ROOT==========CM004, line: 130)..
    An exception with the type CX_SY_REF_IS_INITIAL occurred, but was neither handled locally,
    nor declared in a RAISING clause.Dereferencing of the NULL reference
    It is a very low level error from the CL_SOAP_RUNTIME_ROOT program and not a descriptive error message at all.
    We've checked the user and the authorizations it has, we've redone the SOAManager config but the problem persists.
    We find no dumps in the ABAP proxy since the request never reaches it.
    For a limited time I'll make WSDL and SOAP response available
    WSDL (some values anonymized) available at http://dl.dropbox.com/u/4379928/SOAP/project.wsdl
    Complete SOAP response is available at http://dl.dropbox.com/u/4379928/SOAP/soap_data.xml
    Any ideas on where to look?

    Hi,
    We've now managed to implement a workaround.
    The workaround was to create the endpoint in PI as well.
    So that the traffic goes from third-party solution->PI-> WS-enabled ABAP Proxy
    When we did this initially, we got some errors related to the asynch method of this call, but this was resolved by changing the channel from "best effort" to "Guaranteed delivery". 
    Still we don't know what the root cause of the initial problem was, but we assume it is related to the asynch nature of the service (though we have other asynch proxies that work without problems).
    Regards
    Dagfinn

  • ABAP Proxy: Error calling Proxy

    Hi guys,
    Here I am with another amazing mistake.....
    After searching the forum, reading some suggestions, notes, I'm a little bit lost on how to figure out what is wrong...
    I've created a receiver ABAP Proxy. XI should call this proxy and receive the consequent response.....
    I've tested the ABAP Proxy, everything is working fine...I've encountered some errors but was able to bypass them... But this one is getting hard...I've found one or two similar threads, or with the same error description but I had no luck in overcoming the error....
    So, what is the problem....:
    When XI is calling the ABAP Proxy I get:
    <SAP:Category>XIServer</SAP:Category>
    <SAP:Code area="INTERNAL">EXCHANGE_PROFILE_ACCESS</SAP:Code>
    <SAP:Stack>Error while reading exchange profile for system DEV and client 100</SAP:Stack>
    I've searched the exchange profile but everything seems ok...
    The user has all (and more) the authorizations needed....
    Can you guys give me some hints? Or suggest any attempt....?

    Kumar,
    as I said before, in SPROXY i can test the interface with no errors....
    In the Application System the sldcheck returns no errors and the RFC Destinations return no errors on the connection tests...
    I really can't understand what this problem might be...
    Problem solved
    What was it? Well, I'm really not sure...Like most of the threads related to this topic it's quite an awkward problem....I've tested some RFC connections which were created, changed some parameters, restarted the system and voila....
    Thanks
    Message was edited by:
            Gonçalo Mouro Vaz

  • Call ABAP-Proxy with SOAP adapter?

    Hi all,
    for a PI7.1-scenario I would like to use the Lookup-API in mapping. As I know I can use either RFC or SOAP channels, however I would rather call an ABAP-Proxy in my backend system instead.
    So my question is: Is it technically possible to use the SOAP-adapter to call an ABAP-Proxy?
    Your help would be appreciated, best regards
    David

    Hi Stefan,
    Interesting answer here and one that has got me curious. Hope you can help.
    1. When you say it is going to be possible to call a ABAP proxy using a  UDF in the mapping of XI ( Lookup ), would it be using the WS Adapter of PI 7.1?
    2. If 1 is yes, is there a new API code to do this, or is it the same lookup code as used previously in XI 3.0 and PI 7.0 Days?
    3. If 1 is no, can you explain maybe a little more on how this would be possible using the standard SOAP adapter of XI?
    Thanks a bunch.
    Regards
    Bhavesh

  • ABAP Proxy Exception

    Hello everybody i have this error in my sxmb_moni of xi for a abap proxy server receiver:
      <?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>XIProxy</SAP:Category>
      <SAP:Code area="ABAP">DYNAMIC_CALL_FAILURE</SAP:Code>
      <SAP:P1>UNCAUGHT_EXCEPTION</SAP:P1>
      <SAP:P2>ZFUS_CL_MI_FMGOB_CAT_FONDOS_C1</SAP:P2>
      <SAP:P3>EXECUTE_SYNCHRONOUS</SAP:P3>
      <SAP:P4 />
      <SAP:AdditionalText>Unable to execute the dynamic application call (kernel error ID UNCAUGHT_EXCEPTION, class ZFUS_CL_MI_FMGOB_CAT_FONDOS_C1, method EXECUTE_SYNCHRONOUS)</SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack />
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    any suggestions?
    Regards,
    Julio Cesar

    Hi
    Below is the full details of above links
    For link 4196517?
    Q) Hi All,
    I have got a requirement to raise an exception from existing ABAP Proxy depending on condition. XI consultant created a fault messge type and attached to the inbound interface message type. I have regenerated the ABAP proxy but I cant find any thing in excpetion tab to raise exception.
    Please let me know the solution for this.
    Answers : 1) Go to Sproxy .
    Select the message interface for which you generated the proxy.
    Click on the Structure tab. Do you see any Exception Class generated for fault message ?
    2) Just follow all the steps defined in the below Blog and you will find the solution.
    /people/shabarish.vijayakumar/blog/2006/11/02/fault-message-types--a-demo-part-1
    3) I can't find any exception class there in 'Structure' tab. what might be the problem.
    4) In SProxy ..under the Message Interface you will see Fault Message Type.
    Click on Fault Message Type and check if you can see the fault message type created by xi consultant.
    Also ask your xi team to login to IR and re-activate the interface.
    5) I can't find any fault message type under Fault Message Type. I will ask my XI consultant to reactivate the interface.
    Is this the only problem for this or is htere any other reason for not finding this fault message type in SPROXY.
    6) Ideally the fault message type should be visible unless he has defined Software Dependencies and using MT from some other SC.
    Even if the fault message type is not visible everything could be all right.
    Ask him to check if he selected the fault message type while activating the interface.
    Do update us when you get a reply from ur xi team.
    7) I have checked with XI admin, he said that he created fault message types in Development Xi but R/3 Development refers to Production XI system in exchange profiles. He asked me to change it to XI development in exhange profile settings. So I am searching info on how to set exchange profiles.
    8) The following link will guide you ..
    http://help.sap.com/saphelp_nw04s/helpdata/en/c9/7a1041ebf0f06fe10000000a1550b0/frameset.htm
    I dont think we need to do any changes in Exchange Profile for proxy communication.
    Changing the RFC Destinations (in your R/3 system)- LCRSAPRFC & SAPSLDAPI should solve your problem.
    II) For Link :4147406?
    Q) Hi All,
    We have an ABAP Proxy implemented for posting goods movement and it is calling BAPI function module to post good movement. We have got a requirement that if BAPI returns any error, this error message send back to SAP XI.
    data call proxy
    Legacy -
    > XI -
    > SAP R/3(call bapi)
    <----
    error message
    Please let me know how to send the message back to XI.
    Answers: 1) Refer the following
    /people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy - ABAP Proxy to File
    /people/prateek.shah/blog/2005/06/14/file-to-r3-via-abap-proxy - File to ABAP Proxy
    2) you can utilize the fault messages for such an usage -
    Ref:
    Fault messages -
    /people/shabarish.vijayakumar/blog/2006/11/02/fault-message-types--a-demo-part-1
    Handling Web Service SOAP Fault Responses in SAP NetWeaver XI -
    /people/jin.shin/blog/2007/05/21/handling-web-service-soap-fault-responses-in-sap-netweaver-xi
    3) You have to do Fault message implementation in this case...
    A no. of exception will be there.For any error proxy will catch the exception and will write it in the fault message...so....from r/3 response will go to Xi as Fault message response in case any error/exception occours......
    have look here...
    Fault message implementation.
    /people/shabarish.vijayakumar/blog/2006/11/02/fault-message-types--a-demo-part-1
    4) Please go through it is very useful.
    /people/krishna.moorthyp/blog/2005/12/23/monitoring-for-processed-xml-messages-in-abap-proxy --Monitoring for Processed XML messages in ABAP Proxy
    /people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy --ABAP Proxies in XI(Client Proxy)
    /people/sap.user72/blog/2005/12/29/service-enable-your-sap-application-component --- Service Enable Your SAP Application Component
    5) the file adapter can work only asynchronous, so you cant have a response. You should build two asynchronous messages. File -> proxy inbound and after the bapi call an outbound proxy is called which is sending a second messge to the file adapter.
    6) you can define a synchronous scenario which will include request/response messages.
    send the response back to XI.
    the file adapter supports BE QoS.
    http://help.sap.com/saphelp_nw04s/helpdata/en/0d/5ab43b274a960de10000000a114084/frameset.htm
    7)I have an interface Z_stock_move(message interface(inbound)) and class z_STOCK_MOVE in that. I have clicked exception tab but not able to add exception there as its not enabled for change.
    Please let me know how to add the exception to an existing abap proxy.so that i can raise an exception when bapi call to goods movenment returns errors.
    Might be useful to U.

  • How to handle exceptions in sender ABAP Proxy

    Hi Experts,
       I have a synchronous scenario.
       SAP R/3 System A -ABAP Proxy <-> PI <-----> SOAP< ---> Webservice
       In system 'A', a function module calls the ABAP Proxy method.
       My requirement is that if there is an exception in PI ( for example: timeout or ABAP engine error) then I want to get the exception details in the calling function module.
    For example:
    Exception in PI:
      <SAP:Error xmlns:SAP="XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
    <SAP:Category>XIAdapterFramework</SAP:Category>
    <SAP:Code area="MESSAGE">GENERAL</SAP:Code>
    <SAP:P1/><SAP:P2/>
    <SAP:P3/><SAP:P4/>
    <SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.net.ConnectException: Connection timed out: connect</SAP:AdditionalText>
    <SAP:ApplicationFaultMessage namespace=""/>
    <SAP:Stack/>
    <SAP:Retry>M</SAP:Retry>
    </SAP:Error>
    In the calling function module:
    Try
    Call to proxy-> method
    Catch cx_ai_system_fault INTO v_o_fault.
           v_err_msg1 = v_o_fault->GET_TEXT( ).
           v_err_msg2 = v_o_fault->errortext.
           v_err_msg3 = v_o_fault->code.
    Endtry.
    Here I get value "MESSAGE.GENERAL" for  v_err_msg1 and v_err_msg3. v_err_msg2 is blank.
    I want to capture the info available under <SAP:AdditionalText>. How to get that?
    Please help!
    Thanks & Regards
    Gopal

    >
    gopalkrishna baliga wrote:
    > Hi Experts,
    >
    >    I have a synchronous scenario.
    >
    >    SAP R/3 System A -ABAP Proxy <-> PI <-----> SOAP< ---> Webservice
    >
    >    In system 'A', a function module calls the ABAP Proxy method.
    >
    >    My requirement is that if there is an exception in PI ( for example: timeout or ABAP engine error) then I want to get the exception details in the calling function module.
    >
    >  For example:
    >
    > Exception in PI:
    >
    >   <SAP:Error xmlns:SAP="XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
    > <SAP:Category>XIAdapterFramework</SAP:Category>
    > <SAP:Code area="MESSAGE">GENERAL</SAP:Code>
    > <SAP:P1/><SAP:P2/>
    > <SAP:P3/><SAP:P4/>
    > <SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.net.ConnectException: Connection timed out: connect</SAP:AdditionalText>
    > <SAP:ApplicationFaultMessage namespace=""/>
    > <SAP:Stack/>
    > <SAP:Retry>M</SAP:Retry>
    > </SAP:Error>
    >
    > In the calling function module:
    > Try
    >  Call to proxy-> method
    >
    >  Catch cx_ai_system_fault INTO v_o_fault.
    >        v_err_msg1 = v_o_fault->GET_TEXT( ).
    >        v_err_msg2 = v_o_fault->errortext.
    >        v_err_msg3 = v_o_fault->code.
    > Endtry.
    >
    > Here I get value "MESSAGE.GENERAL" for  v_err_msg1 and v_err_msg3. v_err_msg2 is blank.
    >
    > I want to capture the info available under <SAP:AdditionalText>. How to get that?
    >
    > Please help!
    >
    > Thanks & Regards
    > Gopal
    Hi Gopal,
    Maybe the exception is CX_SY_APPLICATION_FAULT, or you can catch by BPM in PI and send back to proxy like a message response.

  • Debugging of inbound ABAP proxy

    Please To show the debugging of inbound ABAP proxy, the implementation of the demo scenario is used. The demo scenario is available in any installation WebAS 6.40 or higher.

    follow this method and check debugging mode.
    Debugging of inbound proxies in WebAS 6.40 or higher
    To show the debugging of inbound ABAP proxy, the implementation of the demo scenario is used. The demo scenario is available in any installation WebAS 6.40 or higher.
    At first you have to set a break point in the ABAP code. Call transaction SPROXY. Expand the namespace http://sap.com/xi/XI/Demo/Airline, the node Message Interface (inbound) and the interface FlightBookingOrderRequest_In.
    Double click on interface II_SXIDAL_FBO_REQUEST and get the view of the proxy object properties.
    Double click on the implementing class (ABAP name) and then double click on the method name (this class has only one method).
    Now you are in the inbound proxy implementation. Set the break point on the first executable line.
    With help of the back button (F3) go back to the transaction SPROXY. Here you choose from menu Proxy -> Test Interface
    In the next pop up check the field XML Editor to maintain the payload.
    In the next screen apply suitable values or upload the XML payload of the SXMB_MONI (after mapping).
    Now the inbound proxy processing should stop at the break point.
    If the processing does not stop at the break point, there might be an error in the XML. Check at the result page for error messages.
    Debugging of inbound proxies in WebAS 6.20
    You set the break point the same way as described above.
    To start the proxy test you call the report SPRX_TEST_INBOUND.
    As parameters you enter the name of the ABAP interface and the method name of of the ABAP interface and check the parameter Edit Native XML
    In the next screen you apply suitable values or upload the XML payload of the SXMB_MONI (after mapping).
    Then you click first on save button (F11), then on back button (F3).
    Now you should see your debug session. If not, check if the XML is valid. BAPI_GOODSMVT_CREATE to post Goods Movement
    The following is an abap program making used of the BAPI function BAPI_GOODSMVT_CREATE to do Goods Receipts for Purchase Order after importing the data from an external system.
    BAPI TO Upload Inventory Data
    GMCODE Table T158G - 01 - MB01 - Goods Receipts for Purchase Order
                         02 - MB31 - Goods Receipts for Prod Order
                         03 - MB1A - Goods Issue
                         04 - MB1B - Transfer Posting
                         05 - MB1C - Enter Other Goods Receipt
                         06 - MB11
    Domain: KZBEW - Movement Indicator
         Goods movement w/o reference
    B - Goods movement for purchase order
    F - Goods movement for production order
    L - Goods movement for delivery note
    K - Goods movement for kanban requirement (WM - internal only)
    O - Subsequent adjustment of "material-provided" consumption
    W - Subsequent adjustment of proportion/product unit material
    report zbapi_goodsmovement.
    parameters: p-file like rlgrap-filename default
                                     'c:\sapdata\TEST.txt'.
    parameters: e-file like rlgrap-filename default
                                     'c:\sapdata\gdsmvterror.txt'.
    parameters: xpost like sy-datum default sy-datum.
    data: begin of gmhead.
            include structure bapi2017_gm_head_01.
    data: end of gmhead.
    data: begin of gmcode.
            include structure bapi2017_gm_code.
    data: end of gmcode.
    data: begin of mthead.
            include structure bapi2017_gm_head_ret.
    data: end of mthead.
    data: begin of itab occurs 100.
            include structure bapi2017_gm_item_create.
    data: end of itab.
    data: begin of errmsg occurs 10.
            include structure bapiret2.
    data: end of errmsg.
    data: wmenge like iseg-menge,
          errflag.
    data: begin of pcitab occurs 100,
            ext_doc(10),           "External Document Number
            mvt_type(3),           "Movement Type
            doc_date(8),           "Document Date
            post_date(8),          "Posting Date
            plant(4),              "Plant
            material(18),          "Material Number
            qty(13),               "Quantity
            recv_loc(4),           "Receiving Location
            issue_loc(4),          "Issuing Location
            pur_doc(10),           "Purchase Document No
            po_item(3),            "Purchase Document Item No
            del_no(10),            "Delivery Purchase Order Number
            del_item(3),           "Delivery Item
            prod_doc(10),          "Production Document No
            scrap_reason(10),      "Scrap Reason
            upd_sta(1),            "Update Status
          end of pcitab.
    call function 'WS_UPLOAD'
      exporting
        filename                      = p-file
        filetype                      = 'DAT'
    IMPORTING
      FILELENGTH                    =
      tables
        data_tab                      = pcitab
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_READ_ERROR               = 2
      NO_BATCH                      = 3
      GUI_REFUSE_FILETRANSFER       = 4
      INVALID_TYPE                  = 5
      OTHERS                        = 6
    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.
    gmhead-pstng_date = sy-datum.
    gmhead-doc_date = sy-datum.
    gmhead-pr_uname = sy-uname.
    gmcode-gm_code = '01'.   "01 - MB01 - Goods Receipts for Purchase Order
    loop at pcitab.
      itab-move_type  = pcitab-mvt_type.
      itab-mvt_ind    = 'B'.
      itab-plant      = pcitab-plant.
      itab-material   = pcitab-material.
      itab-entry_qnt  = pcitab-qty.
      itab-move_stloc = pcitab-recv_loc.
      itab-stge_loc   = pcitab-issue_loc.
      itab-po_number  = pcitab-pur_doc.
      itab-po_item    = pcitab-po_item.
      concatenate pcitab-del_no pcitab-del_item into itab-item_text.
      itab-move_reas  = pcitab-scrap_reason.
      append itab.
    endloop.
    loop at itab.
      write:/ itab-material, itab-plant, itab-stge_loc,
              itab-move_type, itab-entry_qnt, itab-entry_uom,
              itab-entry_uom_iso, itab-po_number, itab-po_item,
                                                  pcitab-ext_doc.
    endloop.
    call function 'BAPI_GOODSMVT_CREATE'
      exporting
        goodsmvt_header             = gmhead
        goodsmvt_code               = gmcode
      TESTRUN                     = ' '
    IMPORTING
        goodsmvt_headret            = mthead
      MATERIALDOCUMENT            =
      MATDOCUMENTYEAR             =
      tables
        goodsmvt_item               = itab
      GOODSMVT_SERIALNUMBER       =
        return                      = errmsg
    clear errflag.
    loop at errmsg.
      if errmsg-type eq 'E'.
        write:/'Error in function', errmsg-message.
        errflag = 'X'.
      else.
        write:/ errmsg-message.
      endif.
    endloop.
    if errflag is initial.
      commit work and wait.
      if sy-subrc ne 0.
        write:/ 'Error in updating'.
        exit.
      else.
        write:/ mthead-mat_doc, mthead-doc_year.
        perform upd_sta.
      endif.
    endif.
          FORM UPD_STA                                                  *
    form upd_sta.
      loop at pcitab.
        pcitab-upd_sta = 'X'.
        modify pcitab.
      endloop.
      call function 'WS_DOWNLOAD'
        exporting
          filename                      = p-file
          filetype                      = 'DAT'
    IMPORTING
      FILELENGTH                    =
        tables
          data_tab                      = pcitab
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_READ_ERROR               = 2
      NO_BATCH                      = 3
      GUI_REFUSE_FILETRANSFER       = 4
      INVALID_TYPE                  = 5
      OTHERS                        = 6
    endform.
    *--- End of Program
    Finding the user-exits of a SAP transaction code
    Finding the user-exits of a SAP transaction code
    Enter the transaction code in which you are looking for the user-exit
    and it will list you the list of user-exits in the transaction code.
    Also a drill down is possible which will help you to branch to SMOD.
    report zuserexit no standard page heading.
    tables : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.
             tables : tstct.
    data : jtab like tadir occurs 0 with header line.
    data : field1(30).
    data : v_devclass like tadir-devclass.
    parameters : p_tcode like tstc-tcode obligatory.
    select single * from tstc where tcode eq p_tcode.
    if sy-subrc eq 0.
       select single * from tadir where pgmid = 'R3TR'
                        and object = 'PROG'
                        and obj_name = tstc-pgmna.
       move : tadir-devclass to v_devclass.
          if sy-subrc ne 0.
             select single * from trdir where name = tstc-pgmna.
             if trdir-subc eq 'F'.
                select single * from tfdir where pname = tstc-pgmna.
                select single * from enlfdir where funcname =
                tfdir-funcname.
                select single * from tadir where pgmid = 'R3TR'
                                   and object = 'FUGR'
                                   and obj_name eq enlfdir-area.
                move : tadir-devclass to v_devclass.
              endif.
           endif.
           select * from tadir into table jtab
                         where pgmid = 'R3TR'
                           and object = 'SMOD'
                           and devclass = v_devclass.
            select single * from tstct where sprsl eq sy-langu and
                                             tcode eq p_tcode.
            format color col_positive intensified off.
            write:/(19) 'Transaction Code - ',
                 20(20) p_tcode,
                 45(50) tstct-ttext.
                        skip.
            if not jtab[] is initial.
               write:/(95) sy-uline.
               format color col_heading intensified on.
               write:/1 sy-vline,
                      2 'Exit Name',
                     21 sy-vline ,
                     22 'Description',
                     95 sy-vline.
               write:/(95) sy-uline.
               loop at jtab.
                  select single * from modsapt
                         where sprsl = sy-langu and
                                name = jtab-obj_name.
                       format color col_normal intensified off.
                       write:/1 sy-vline,
                              2 jtab-obj_name hotspot on,
                             21 sy-vline ,
                             22 modsapt-modtext,
                             95 sy-vline.
               endloop.
               write:/(95) sy-uline.
               describe table jtab.
               skip.
               format color col_total intensified on.
               write:/ 'No of Exits:' , sy-tfill.
            else.
               format color col_negative intensified on.
               write:/(95) 'No User Exit exists'.
            endif.
          else.
              format color col_negative intensified on.
              write:/(95) 'Transaction Code Does Not Exist'.
          endif.
    at line-selection.
       get cursor field field1.
       check field1(4) eq 'JTAB'.
       set parameter id 'MON' field sy-lisel+1(10).
       call transaction 'SMOD' and skip first   screen.
    *---End of Program
    u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026
    Difference Between BADI and User Exits
    Business Add-Ins are a new SAP enhancement technique based on ABAP Objects. They can be inserted into the SAP System to accommodate user requirements too specific to be included in the standard delivery. Since specific industries often require special functions, SAP allows you to predefine these points in your software. 
    As with customer exits two different views are available:
    In the definition view, an application programmer predefines exit points in a source that allow specific industry sectors, partners, and customers to attach additional software to standard SAP source code without having to modify the original object. 
    In the implementation view, the users of Business Add-Ins can customize the logic they need or use a standard logic if one is available.
    In contrast to customer exits, Business Add-Ins no longer assume a two-level infrastructure (SAP and customer solutions), but instead allow for a multi-level system landscape (SAP, partner, and customer solutions, as well as country versions, industry solutions, and the like). Definitions and implementations of Business Add-Ins can be created at each level within such a system infrastructure.
    SAP guarantees the upward compatibility of all Business Add-In interfaces. Release upgrades do not affect enhancement calls from within the standard software nor do they affect the validity of call interfaces. You do not have to register Business Add-Ins in SSCR.
    The Business Add-In enhancement technique differentiates between enhancements that can only be implemented once and enhancements that can be used actively by any number of customers at the same time. In addition, Business Add-Ins can be defined according to filter values. This allows you to control add-in implementation and make it dependent on specific criteria (on a specific Country value, for example).
    All ABAP sources, screens, GUIs, and table interfaces created using this enhancement technique are defined in a manner that allows customers to include their own enhancements in the standard. A single Business Add-In contains all of the interfaces necessary to implement a specific task.
    The actual program code is enhanced using ABAP Objects. In order to better understand the programming techniques behind the Business Add-In enhancement concept, SAP recommends reading the section on ABAP Objects.
    What is difference between badi and user-exists?
    What is difference between enhancements and user-exists? and what is the full form of BADI?
    I have another doubt in BDC IN BDC WE HAVE MSEGCALL (i did not remember the > correct name) where the error logs are stored, MSEGCALL is a table or structure.
    What is the system landscape?
    1) Difference between BADI and USER-EXIT.
        i) BADI's can be used any number of times, where as USER-EXITS can be used only one time.
           Ex:- if your assigning a USER-EXIT to a project in (CMOD), then you can not assign the same to other project.
        ii) BADI's are oops based.
    2) About 'BDCMSGCOLL' it is a structure.  Used for finding error records.
    3) Full form of BADI 'Business addins'.
    3) System land scape will be depends on your project 
        Ex:- 'Development server'>'Quality server'-> 'Production server'...... 
    List Of User Exit Related to VL01N
    I need to some restriction in fields ( Actual GI Date, T-Code:Vl01n ).
    How do you find out whcih user exits belongs to VL01n ?
    Here is the list of user exit related to VL01N :
    V02V0001   - Sales area determination for stock transport order 
    V02V0002   - User exit for storage location determination 
    V02V0003   - User exit for gate + matl staging area determination 
    V02V0004   - User Exit for Staging Area Determination (Item) 
    V50PSTAT  - Delivery: Item Status Calculation 
    V50Q0001   - Delivery Monitor: User Exits for Filling Display Fields
    V50R0001    -  Collective processing for delivery creation 
    V50R0002    - Collective processing for delivery creation 
    V50R0004    - Calculation of Stock for POs for Shipping Due Date List
    V50S0001    - User Exits for Delivery Processing 
    V53C0001    - Rough workload calculation in time per item 
    V53C0002    - W&S: RWE enhancement - shipping material type/time slot
    V53W0001   - User exits for creating picking waves 
    VMDE0001  - Shipping Interface: Error Handling - Inbound IDoc 
    VMDE0002  - Shipping Interface: Message PICKSD (Picking, Outbound) 
    VMDE0003  - Shipping Interface: Message SDPICK (Picking, Inbound) 
    VMDE0004  - Shipping Interface: Message SDPACK (Packing, Inbound)

Maybe you are looking for

  • List of forum editor issues and bugs

    This thread is work in progress. Please report additional bugs and issues you are aware off. I will try to reproduce the issue and add your information to the appropriate columns below. Thanks! Note: For accurate results, the width of your web browse

  • Connecting to enterprise TTLS+PAP wireless

    Ok, here's the problem. I can't connect to our enterprise wireless. I'm one of the network admins, and our director has purchased an iPad, and want to be able to connect it to our internal wireless network. It's a RADIUS server that uses WPA2 Enterpr

  • Recently Added

    I had accidentally deleted my recently added playlist. So, I then made another one to replace it. Although it shows up on the menu, nothing comes up on the list.  Is there another step that I'm missing? Thanks, chazff

  • Client copy customizing data + master data

    while i am performing client copy using SAP_UCUS,SAP_UCSV i used these two profiles but i am not getting  master data .Please help me out in this friends.

  • Did anyone else order accessories with their Iphone today?

    Just curious if that will slow down my order.  I'm not all hyper about when I get it like others are on here, but I'm just curious. Seems like if they can just slap a label on the box and send it out, those will get thier orders faster than people li