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)

Similar Messages

  • Application ERROR - Fault message Error in Inbound ABAP Proxy !!

    Hi Folks,
    I have got application error while doing in Inbound proxy scenario. This inbound message is ProductActivityNotification, this message has got fault message. This message is triggering for faults. How to control this fault message or how to divert this error as an alert to RWB. Please give me your ideas step by step. Error as follows:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!-- Call Inbound Proxy
    -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
    <SAP:Category>Application</SAP:Category>
    <SAP:Code area="ABAP">APPLICATION_ERROR</SAP:Code>
    <SAP:P1 />
    <SAP:P2 />
    <SAP:P3 />
    <SAP:P4 />
    <SAP:AdditionalText />
    <SAP:ApplicationFaultMessage namespace="http://sap.com/xi/SAPGlobal20/Global">ProductActivityNotificationFault</SAP:ApplicationFaultMessage>
    <SAP:Stack>Application has thrown an exception</SAP:Stack>
    <SAP:Retry>M</SAP:Retry>
    </SAP:Error>
    Please find the fault message has got following values
    <?xml version="1.0" encoding="utf-8" ?>
    - <n0:ProductActivityNotificationFault xmlns:n0="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:RAS:/1SAI/TAS653D9A9CCD9A8EF3AF9B:701:2009/02/10">
    - <standard>
    <faultText>Proxy Class (Generated)</faultText>
    - <faultDetail>
    <severity>information</severity>
    <text>Start of inbound processing: ProductActivityNotification (ID )</text>
    <id>000(/SCA/BIF_PROACT)</id>
    </faultDetail>
    - <faultDetail>
    <severity>error</severity>
    <text>Message ID is missing</text>
    <id>032(/SCA/BIF_MI)</id>
    </faultDetail>
    </standard>
    </n0:ProductActivityNotificationFault>
    Will you please focus bit light on this error message please?
    Regards
    San

    Hi,
    Check your Source data is correct or not..beofr executing your scenario execute your inboud Proxy with valid data ,
    check below blog...
    /people/stefan.grube/blog/2006/07/28/xi-debug-your-inbound-abap-proxy-implementation
    Regards,
    Raj

  • Problem  with Inbound Abap Proxy

    Hi Experts,
    I have an Inbound ABAP proxy scenario that insert data into a ztable. The whole process from XI to R/3 works fine, except it does not update my ztable.
    The only time the ztable gets updated is when i debug it. I used this report "SPRX_TEST_INBOUND" to debug
    Anyone who's had a similar problem.
    Thank you in Advance,
    Danny

    Hi,
    did you use the same XML from SXMB_MONI that gets posted during message flow?
    you can check inside your inbound proxy if the values are not empty etc
    and then raise an exception to see what's going on
    you can also do an endless loop and get inside it to see the real values
    that get passed into the proxy
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Issue with inbound abap proxy

    I have an Inbound ABAP proxy scenario , the ABAP code inserts data into a ZTable.
    I am having an issue in the runtime where
    1. I see transaction data in SXI_MONITOR of both XI & application system.
    2. if tried to debug with the report SPRX_TEST_INBOUND (as the application system WebAS is 6.20) the proxy code works just fine, and records are inserted in the ZTable.
    records are not getting inserted into the table when run end to end..anybody faced this situation ?
    <b>Appreciate genuine replies....</b>

    Hi,
    but this just <b>has to</b> work
    if this doesn't work then "something realy strange is going around here"
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • FILE TO INBOUND ABAP PROXY - " LOOP_IN_MESSAGE_ROUTING  ERROR "

    Hi , 
    Getting the following Error in *FILE TO INBOUND ABAP PROXY* which is updating a Database table in R/3.
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Call Adapter
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIProtocol</SAP:Category>
      <SAP:Code area="MESSAGE">LOOP_IN_MESSAGE_ROUTING</SAP:Code>
      <SAP:P1>is.01.lgscms</SAP:P1>
      <SAP:P2>IS</SAP:P2>
      <SAP:P3>XI</SAP:P3>
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>XI protocol error</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    How to rectify the Error..
    Regards,
    Ravi

    Hi Ravi !
    Check if the url for the receiver is
    http://<host>:<port>/sap/xi/engine?type=receiver
    or
    http://<host>:<port>/sap/xi/engine?type=entry
    if using XI 3.0
    Regards,
    Matias.
    Edited by: Matias Denker on Feb 25, 2008 2:12 PM

  • Inbound ABAP Proxy

    Hi All,
      I have an inbound ABAP proxy as the receiver. The class, interface, structure and tables are generated when I created the proxy.
      I edited the method execute_asynchronous to collect the data from the table and send it to another RFC.
      When I tried to populate my internal table using the data from table generated during proxy generation, it gives me an error like"zjssrc_dt-header_tab" is not defined in the ABAP dictionary as table, projection view or database view. But it doesn't give me an error while declaring my internal table of the type "zjssrc_dt-header_tab".
    Any inputs on this will be of great help.
    Thanks & Regards,
    Jai Shankar.

    Hi,
    When you generate your Proxy, there will be some structures created. Here you can see the name of the table type.
    Just create a work are for the same table type and one internal table.
    <i>eg.
    DATA: i_data_records TYPE TABLE OF zback_dt_data_records.
    DATA: wa_data_records TYPE zback_dt_data_records.</i>
    Now move the data from the proxy to your internal table
    eg.
    i_data_records = input-mt_val_in-data_records.
    Now this value <i>input-mt_val_in-data_records</i> for you would be input_<MessageType>_<segmentName thats repeating>
    Now loop through the Internal table and move the data to Work area and then update your table.
    I have taken second weblog as eg. Just see that weblog and read this.
    Regards
    Vijaya
    Message was edited by: vijaya kumari

  • How to get Messageid in Inbound ABAP Proxy ?

    Hi,
    Please advise how to get messageid in Inbound ABAP Proxy, so far i could not find anythings most of the forum discuss about "How to get messageid for Outbound Proxy).
    Thank You and Best Regards
    FL

    Hi Fernad,
    By using below code you can take message id.
    java.util.Map map = container.getTransformationParameters();
    return ((String) map.get(StreamTransformationConstants.MESSAGE_ID));
    Create one simple UDF by using above code and map this to one field (you may create one dummy field for this). Then at runtime the mapped field contains the message id.
    Regards,
    Venkata Ramesh

  • FILE TO INBOUND ABAP PROXY - error

    Hi,
    Getting the following Error in FILE TO INBOUND ABAP PROXY which is updating a Database table in R/3.
    Error:
    com.sap.aii.utilxi.misc.api.BaseRuntimeException
    thrown during application mapping
    com/sap/xi/tf/_file2proxy_mm_: RuntimeException in
    Message-Mapping transformatio~
    How to rectify the error...
    Ravi

    Hi,
    The error mentioned is indicating about the Message Mapping error.
    I think you need to test your Message Mapping with test tab.
    Here Goto SXMB_Moni and select the related message  and double click on it.
    It will show you the various steps in Message flow.
    Take the Inbound Message and look for Payload in it. Open it in right side window and right click on it to see source code.
    Copy it in Message Mapping and test it
    Thanks
    swarup

  • Inbound ABAP proxy in the IS localhost

    Hello, Is there anyone who knows what I need to do to create an Inbound ABAP Proxy that execute a method in the Integration Server localhost.
    regards
    Ernesto Duran

    Hello the reason is that I want to split a message I receive from the jdbc adapter. Anyway in webMethods you can always manipulate your XML messages and then resend them to a broker(wM Broker) or a publish/subscriber system (wM TN) and trigger a new process. In XI I only see the posbility to pass document from one system to another. Maybe the point is to work in another way that I still don't understand. Please look at my topic "JDBC adapter and message split" to get more information about my problem.

  • Inbound ABAP proxy in batch mode

    Hi,
    Is it possible to post the message to target SAP system using inbound abap proxy in batch mode instead of default dialog mode ? If anyone has done this, can you please let me know how to do it.
    Thanks
    Shany

    Any comments from PI experts on this ?

  • Where we should implement inbound abap proxy?

    I have to implement Inbound abap proxy, there i need to call two BAPI s to create reservation and purchase requisition based on material number coming from input.
    my doubt is all this code where should i implement and also please give me some sample codes.
    Thank you
    Neelima

    Hi,
    U can find the code in the following link,
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/06adbf03-0a01-0010-f386-d8e45561a3c4
    ABAP Inbound Proxy Error !
    Problem  with Inbound Abap Proxy
    How to call BAPI from ABAP Inbound Proxy
    issue with inbound abap proxy
    Reward If Helpful,
    Jagadish.

  • How can i write code in Inbound ABAP proxy method

    Hi,
    All
    Iam doing server proxy ascenario
    /people/siva.maranani/blog/2005/04/03/abap-server-proxies
    i have done
    steps:
    1:I have done inbound  proxy interface in xi
    2:i have created a inbound abap proxy in my SAP WEB AS6.4 using SPROXY.
    3:I need to write code in Z11_EMPDETAILS_IN~EXEXUTE_ASYNCHRONOUS method
    if i double click on that method it is not opening how can I write code.

    Hi,
    You have to goto the class
    <b>ZCL</b>_EMPDETAILS_IN~EXEXUTE_ASYNCHRONOUS not
    <b>Z11</b>_EMPDETAILS_IN~EXEXUTE_ASYNCHRONOUS
    Check on the third step.
    Regards
    Vijaya

  • ABAP Code for Inbound ABAP PROXY Creation

    Hi,
    Can anybody help me to create Inbound ABAP proxy programee, by using PRoxy.
    As interface is between PI and ECC.
    Through RFc setting i hv to accomplish it.
    If u provide psuedo code that would we be grateful.
    Regards
    Vivek

    Hi,
    Can anybody help me to create Inbound ABAP proxy programee, by using PRoxy.
    As i hv to fetch data from Pi/Xi, by using proxy,
    then i have to send it to SAP tables.
    If u provide psuedo code that would we be grateful.
    Regards
    Vivek

  • Catch an error in inbound ABAP Proxy

    Hi,
    I'm using an ABAP Proxy to file->PI->ECC(proxy) scenario and I found an error in my sxi_monitor on ECC side:
    <SAP:Stack>Error during proxy processing An exception with the type CX_SY_REF_IS_INITIAL occurred, but was neither handled locally, nor declared in a RAISING clause</SAP:Stack>
    I actually solved the error, but I still don't know how to pass to the MONI the message error catching the exception instead of that "standard" error that y pasted.
    How can I get the exception error and then RAISE it to the MONI?
    Edited by: Marshal on Jun 9, 2009 12:37 PM

    Ok, I'm talking about PI 7.1, I'm not sure if it's the same for older versions:
    1 - Create a Fault Message Type (with standard error data types that PI generates automatically when you create the Fault MT) and add it to your inbound Service Interface (or Message Interface in previous PI versions).
    2 - Regenerate the proxy.
    3 - Now in the proxy class method related to your SI there is an exception you have to possible kind of errors to catch, the 1st one is a short dump than you can catch with a TRY. CATCH. ENDTRY structure, the 2nd one is a situation that isn't a dump but you want the proxy to return an error.
    3.1 - Catch Short dump code:
    DATA:  lo_cx_root TYPE REF TO CX_ROOT,
                 l_pi_fault_data TYPE ZPI_EXCHANGE_FAULT_DATA. "Exception message
    TRY.
    ***********YOUR PROXY CODE
    CATCH cx_root INTO lo_cx_root.
    *     GET ERROR TEXT
          lo_cx_root->if_message~get_longtext(
            RECEIVING result = l_pi_fault_data-fault_text ).
    *    GENERATE ERROR THAT YOU WILL SEE ON SXI_MONITOR (IN ECC!!)
          RAISE EXCEPTION TYPE "YOUR_EXEPCTION_MESSAGE_TYPE"
            EXPORTING standard = l_pi_fault_data.
    ENDTRY.
    3.2 Raise an error when you found an error situation for example an error message after BAPI calll:
       DATA: lt_return TYPE STANDARD TABLE OF bapiret2.
    *  Call any BAPI function....always return bapiret2 table with messages
       CALL FUNCTION 'BAPI_XXXXX'
       TABLES lt_retun.
    *  Look for an Error message
        READ TABLE lt_return INTO lwa_return WITH KEY type = 'E'.
        IF sy-subrc = 0.
          CALL METHOD cl_proxy_fault=>raise
            EXPORTING
              exception_class_name   = 'YOUR_EXCEPTION_MESSAGE_TYPE'
              bapireturn_tab         = lt_return.
        ENDIF.
    I hope it helps

  • INPUT Parameter of INBOUND ABAP PROXY

    Hello Friends,
    We have created the inbound proxy via SPROXY and we have implemented the class ZACCL_MI_VENDOR_MASTER_PROXY_I for the same. Now In the structure tab of ABAP Proxy I can see the following structure of the INPUT.
    INPUT-MT_VENDOR_MASTER_PROXY -VENDOR -VENDOR_DETAIL -RECORD_TYPE.
    Now in the record_type we are passing a single parameters C or N. i.e if i is N then new and if it C then change.
    In my class implementation i am doing the followin check.
    CASE input--MT_VENDOR_MASTER_PROXY -VENDOR -VENDOR_DETAIL -RECORD_TYPE.    WHEN 'N'.
          CALL METHOD me->create_vendor
            EXPORTING
              input          = input
            IMPORTING
              title          = title
              it_recp        = it_recp
              it_contenttext = content_text.
    WHEN 'C.
          CALL METHOD me->change_vendor
            EXPORTING
              input          = input
            IMPORTING
              title          = title
              it_recp        = it_recp
              it_contenttext = content_text.
    but I am getting following error message.
    input-MT_VENDOR_MASTER_PROXY-VENDOR-VENDOR_DETAIL-RECORD_TYPE is unknown.
    Could you please help me on this issue.
    Thanks & Regards,
    Nagaraj

    If one of  MT_VENDOR_MASTER_PROXY,VENDOR or VENDOR_DETAIL  is a table type and not a flat structure, then your statement will not work.
    Suppose if VENDOR_DETAIL is a table type, then you have to access RECORD_TYPE this way.
    * Create it_vendor_detail type table of <VENDor_DETAIL>...
    it_vendor_detail[] = input-MT_VENDOR_MASTER_PROXY-VENDOR-VENDOR_DETAIL[].
    loop at it_vendor_detail into wa_vendordetail.
    case wa_vendordetail-record_type.
    when 'N'....
    when 'C'...
    endcase.
    endloop.
    Regards,
    Ravi

Maybe you are looking for