Interface Related

How to create an interface(report) to Extract the data from SAP and send it to a third party system on a weekly basis, when the report which will be created for this particular interface is executed.

HI,
  A simple program to meeting your requirement would be as mentioned below...
The Output file can be saved in the application Server, which can be accessed by the third party system.
  1. Reteieve the data required for your purpose into an internal table.
  2. Use OPEN_DATASET command to open a file in the application server with mode as output... click the link below to know more about OPEN_DATASET.
http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3c99358411d1829f0000e829fbfe/content.htm
  2. Use the TRANSFER Command to tranfer all the records of your internal table to the application server.
http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3d35358411d1829f0000e829fbfe/content.htm
  3. Now close the file Using CLOSE_DATASET command
http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3d1b358411d1829f0000e829fbfe/content.htm
Regards,
Vara

Similar Messages

  • Access interface related entries from within Receiver Communication Channel

    Hi,
    when i open the interface determintation that i created, i can see.
    Sender Details:
    Communication Component:Sys_Sample_One_D
    Interface: UserMasterQuery_Outb
    Namespace: urn:sample.com:I_Legacy_JDBC_Application
    Receiver Details:
    Communication Component:Sys_Sample_Two_D
    Interface:EmployeeEmailProcessing_Inb
    Namespace:urn:sample.com:I_Legacy_FileApplication
    Interface Mapping: UserMasterResultset_to_EmployeeEmail
    I created a Generic File Receiver communication Channel for my receiver BS: CC_FileReceiver
    In the target FileName field of the Communication channel, i would not like to hardcode any filename value, but my requirement is, the filename should be the same as the name of the Receiver Interface, that has been used in the message exchange.
    in my case, it should be something like EmployeeEmailProcessing_Inb.xml
    How can we access dynamically the interface related entries in the Communication channel, and how can we set those values in the Target Filename value of the File Receiver communication channel.
    in short, if i use the same communication channel for other scenario, the received filename should be different based on the receiver interface name that is executed.
    It would be even more better if i could access/set the receiver namespace value as part of the TargetFileName or TargetFileDirectory values.
    pls let me know how this can be possible.
    Thanks in advance,
    Madhu

    Hi Shabarish,
    thanks for your blog.
    After i saw the blog, the UDF can be created in ESR.
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create(u201Chttp://sap.com/xi/XI/System/Fileu201D,u201CFileNameu201D);
    String MyFileName = a + "_" + b +".xml";
    conf.put(key, myFileName);
    At this point, i can see that the required value is stored in certain key in the DynamicConfiguration.
    In the blog, i could not see anything related to ID.
    My question is, what do we need to do ID,
    when we create the FileReceiver Communication Channel, in that we need to specify the mandatory field "Source File Name". what value do we need to enter here.
    Are there any additional things do we need to do in Communication Channel in ID.

  • In PP Interface related issues the role of functional consultant

    In PP Interface related issues what is the role of functional consultant .  what is the approach steps to analyse and resolve the issues  in XI, interface, idoc, etc.,

    For issues relating to interfaces, a functional person would need to diagnose what is causing the issue & thereby informing the technical person where to fix it, if the issue is due to system setup.
    As regards to the steps, I just wish there was a manual which read something like
    10 steps on how to analyze....
    unfortunately there is none that I have come across or even if one is ever written on those lines will be very specific, so not much of use for your need. A good approach would be to have a clear understanding of what the interface is supposed to do, which would assist you in fixing the issues.

  • Receiving Open Interface related doubt

    Hi All,
    We are currently on Oracle Release 12.0.4 and need some help/information regards Receiving Open Interface tables : rcv_headers_interface & rcv_transactions_interface tables.
    We import the ASN which is being sent across from the Supplier via EDI directly into the Receiving Open Interface tables and then RTP program ( Receiving Transaction Processor ) program processes these into the base tables
    to complete the receipt process..
    Now for some reason or the other lets say because of EDI data issues or some other system issue with the RTP program , the Interface records end up in error status & the users have to manually complete the Receipt in Oracle Forms directly..
    Now this Interface data over a period in time keeps accumulating while the corresponding PO Document would already have been Received manually in Oracle.
    Because of this errored interface records the Interface tables keep growing in size in terms of data volume..
    Now is there a way script or a program which validates these interface records and purges these automatically based on some validations on its own..
    For Example : for a po if the records are stuck in the interface table but the po shipment has already been received in manually and in Closed Status, then it would automatically purge these records from interface tables.
    Could someone please help us with this as soon as possible with any suggestions or workarounds..
    Thanks

    Currently there is no purge program available to purge the records in RTI. Further the oracle support wont be able to provide a delete script to delete the records in RTI (The reason being, the records are populated by the customer and customers are the best persons to validate the records and delete them on their own).
    However, for ASN's
    You may write a query based on the RTI.po_distribution_id and then check, whether the corresponding po shipment\distribution is already received \ closed for receiving and then you may delete.

  • Query on interface related to PP process

    Hi,
    We have IDOC postings for production order goods receipt from legacy system to SAP (inbond IDOC). This will be done through middleware software using flat file. We run batch job to post these IDOCs daily to SAP. once the IDOC posts successfully (status 53) this IDOC will not get reprocess again as per required.
    But we observed in some cases or IDOCs, even after successfull posting of IDOC (status 53) the same IDOC restart to get reprocess within 2 secs and post the material document once again. This happens very rarely through batch job and i observed such cases only once in 3 months or 6months. I checked and found no parallel batch jobs or varaints are running on same program.
    Can any one knows why this happens? Any possible causes if you know on thism if share it will be greatful.
    Thank you in advance,
    Sharat

    Are you sure that GR is getting posted TWICE ??
    Coz in some cases, an IDoc shows a status-53 even though it has some error inside & system does not post any document.
    For example, if during IDoc posting from Legacy to SAP, if any Production Order is being processed in some other way, interface would not b in position to post GR. Even after this, system shows IDoc status as 53.
    And then actual GR happens during re-processing of failed IDoc's.
    Revert back.
    REgards,
    Anup

  • Outbound Interfaces related example

    Hi,
    I need an example of Outbound Interface in any of the modules AP/AR/GL.
    Kindly any help will be needful for me

    Ho w about EFT format from AP? Text based file going to the bank. The comparison between R11i and R12 is nice for this.
    Any other questions?
    Regards,
    Gareth

  • Interfaces related

    Hi .....
                Can we post a Gr if the relavent po is deleted , can some give an explanation...

    thank you for your replies.
    what exactly is the difference between
    erence between abstract classes and Interfaces? Abstract classes can carry implementation, interfaces can't. If you want more detail, google or search the forumst--that question gets asked a lot.
    Is it
    true that interfaces forms a different hierarchy from
    the
    class hierarchy.Um, I suppose. I don't know that that really means anything though. Interface don't have any common root (as opposed to Object for classes), but by the time your code is running, you'll always have an instance of a concrete class to operate on, so it's not like you can "escape" from Object by using inerfaces.
    when shuld i go for abstract classes
    stract classes rather than interfaces?The two are not mutually exclusive. They're often used together. Go for an interface when you want to just define a type. Use an abstract class to provide some default implementation for that type that other classes might find useful but don't have to use.
    Does an abstract class having all the
    the methods declared as abstract can be
    considered same as interface.Very similar. The only differences are that the class could have method implementations added to it, and that a class can implement more than one interface. Both of them just define a type, though, with no implementation.

  • Interface Relation between ServletRequest and HttpServletRequest

    a newbie question, both are interface, and
    public abstract interface javax.servlet.ServletRequest extends java.lang.Object
    public abstract interface javax.servlet.http.HttpServletRequest extends java.lang.Object implements javax.servlet.ServletRequest
    Why not interface javax.servlet.http.HttpServletRequest direct extends interface javax.servlet.ServletRequest ?

    the signature of HttpServletRequest class is
    public abstract interface HttpServletRequest
    extends ServletRequest
    NOT
    public abstract interface javax.servlet.http.HttpServletRequest extends java.lang.Object implements javax.servlet.ServletRequest

  • Idoc Configuration and interfaces related to 810

    Hi,
      Can any one tell me the entire configuration of ALE and EDI810 supported tools?
    Thanks
    Shobi

    <b>Hi,
    ALE
    To develop a new custom ALE scenario, comprises 5 steps:
    1.     Design and develop the custom IDoc with it’s segments and a new message type
    2.     Configure the ALE environment with the new IDoc and message type (customer model, partner profiles and linking IDoc to message type)
    3.     Develop the outbound process which does the following:
    •     Populates the custom IDoc with control info and functional data
    •     Sends the IDoc to the ALE layer for distribution
    •     Updates status and handles errors
    4.     Configure the ALE inbound side (partner profiles with inbound process code)
    5.     Develop the inbound process which does the following:
    •     Reads the IDoc into a BDC table; selects other data that is required
    •     Runs transaction using call transaction or BDC session
    •     Updates status and handles errors
    Below is a pictorial representation of the flow of a complete ALE scenario from the sending system to the receiving system.
    Figure 1: ALE Scenario model
    1.1.     ALE Example
    For the purposes of this example we will develop a small ALE scenario. This scenario is described below.
    “The receiver of an internal service must be able to reverse (cancel) the invoice receipt which will then cancel the applicable billing document automatically on the service provider’s system.”
    Figure 2: Example Purchasing & Selling scenario
    We will develop a custom IDoc to carry the billing number from the Service Receiver’s system to the Service Provider’s system. We will populate the IDoc in a user exit on the sending side and we will process the transaction on the receiving side using a custom function module and a BDC transaction call.
    No rule conversion, segment filtering or version conversion will be implemented in the model as described in Figure 1.
    Requirements
    •     Working ALE environment - See ALE Basis Configuration Guide;
    •     ALE scenario design together with the business requirement;
    •     Development access; and
    •     ALE configuration access.
    NOTES:
    1.     All IMG references to transactions are located in the transaction SALE which is the ALE portion of the IMG
    2.     This is one way of developing a scenario where no message control exists. If message control exist (EG. On purchase orders) then NAST can be used to call an outbound function module that would create the required IDocs.
    3.     Extensive knowledge of IDocs and ALE basis configuration is required in order to understand this guide.
    2.     OUTBOUND PROCESSING
    2.1.     Create IDoc type (WE30) Client independent
    The IDoc type refers to the IDoc structure that you will require for your development. In our case the IDoc type is called ZINVRV01. This IDoc type will have 1 segment called Z1INVRV with 2 fields, LIFNR & XBLNR, in this segment. If you require many segments or nested segments then they are also created using the same procedure.
    We will create the IDoc of the following structure:
    ZINVRV01
    Purchasing and Selling - Invoice receipt reversal
    Z1INVRV     P&S - Segment 1
         Segment fields     
              LIFNR     Vendor account number
              XBLNR     Reference document number
    Figure 3: IDoc type ZINVRV01
    To create the IDoc type, follow these next few steps:
    •     Enter transaction WE30 (ALE -> Extensions -> IDoc types -> Maintain IDoc type)
    •     Type in ZINVRV01 and click on Basic IDoc type, click the Create icon
    •     Click on Create new (we are creating an IDoc from scratch but you may want to copy another IDoc if it is similar to your requirements) and enter a description, and press enter
    •     Click on ZINVRV01 and then on the Create icon
    •     Enter Z1INVRV as the segment type (must start with Z1), check mandatory if the segment must exist (in this case check it), enter 1 in minimum number and 1 as maximum number. (Make the maximum number 9999999999 if there are going to be many of these segments in each IDoc. IE. When line items are passed via IDocs), click on Segment editor
    •     Enter a description for your segment type and create
    •     Enter a description for your segment, enter each field required in your IDoc, in our case type LIFNR across for Field name, DE structure and DE documentation, repeat for XBLNR and press enter to validate.
    •     Save and generate, press back
    •     To release the segment choose Goto, Release from the menu
    •     Check the box on the line of your new segment
    •     Save, back and enter
    •     Your IDoc type structure should be displayed with your new segment
    •     Save and back
    •     To release the IDoc type choose Extras, Release type from the menu and Yes
    Your IDoc is now ready for use. If you need to add fields or segments to your IDoc type, you will need to cancel the release of the IDoc type as well as the segment release using a similar procedure followed above (except now you uncheck the release box for the segment and you choose cancel release for the IDoc type).
    2.2.     Create message type (WE81) Client independent
    To create a new message type, follow these next few steps:
    •     Enter transaction WE81 (ALE -> Extensions -> IDoc types -> Maintain message type for intermed. Structure -> Create logical message type)
    •     Choose Create logical message type by double clicking on it
    •     Click on change icon to enter change mode
    •     Click on New entries to add a new type
    •     Enter the required message type, in our case it is ZINVRV and an appropriate description
    •     Save and exit.
    Your message type has now been created. The next step will be to link it to the IDoc.
    2.2.1.     Link message to IDoc type (WE82 & BD69) Client independent
    To link the message type to the IDoc type follow these next few steps:
    •     Enter transaction WE82 (ALE -> Extensions -> IDoc types -> Maintain message type for intermed. Structure -> EDI: Message Types and Assignment to IDoc Types)
    •     Click on change icon to enter change mode
    •     Click on New entries to create the link
    •     Enter the message type ZINVRV and the BasicIDoc type as ZINVRV01
    •     Save and exit
    •     Enter transaction BD69 (ALE -> Extensions -> IDoc types -> Maintain message type for intermed. Structure -> Assign message type to IDoc for ALE)
    •     Click on change icon to enter change mode
    •     Click on New entries to create the link
    •     Enter the message type ZINVRV and the BasicIDoc type as ZINVRV01
    •     Save and exit
    Your IDoc is now linked to your message type. We still need to link object types and add the message to the model before we can use the message.
    2.2.2.     Maintain object type for message type (BD59) Client independent
    The ALE objects are used to create links between IDocs and applications objects, to control the serialisation, to filter messages in the customer model and to use listings.
    For our own message type and IDoc you must maintain object types for the links.
    If you want to check the serialisation for the message type, then you must maintain object types for the serialisation. If no serialisation object has been maintained for a given message type, then the serialisation will not be checked for this message type.
    To add an object type to our message type, follow these next few steps:
    •     Enter transaction BD59 (ALE -> Extensions -> ALE object maintenance -> Maintain object types)
    •     Type in your message type ZINVRV and press enter
    •     Click on New entries
    •     Enter your object type, LIFNR (We need to use the vendor as a filter object), the segment name where LIFNR resides, Z1INVRV, a number 1 for the sequence followed by the actual field name LIFNR
    •     Save and exit.
    You have now created an object that we’ll use as a filter object in the customer model to direct the flow of messages to the various logical systems based on the vendors in the filter of the message type ZINVRV.
    We now need to add our new message type to the distribution model.
    2.3.     Configuring the Distribution Model
    This task is performed on your ALE reference client.
    2.3.1.     Manual Configuration (BD64) Client dependent
    To manually configure the customer distribution model, read the ALE configuration procedure, and follow these steps:
    •     Perform the Maintain customer distribution model directly function. (ALE -> Distribution customer model -> Maintain customer distribution model directly)
    •     Specify the customer model you want to maintain and the logical system that is to be the sender of the messages OR create a new model. (Create model ALE with logical system ALELS1C400)
    •     Choose the receiving systems to which the sending system must forward message type ZINVRV to.
    •     For each receiving logical system allocate the message type necessary for communication to the receiving systems as per ALE configuration procedure.
    •     Create filter objects (in our case LIFNR as the object type with the associated vendor number, 0000018001 with leading zeros, in the object area) for the message types.
    •     Save the entries.
    NOTES:
    You cannot maintain a message type between the same sender and receiver in more than one customer distribution model.
    Only the owner is authorised to modify the model.
    To change the owner of a model, choose the 'Maintain ownership of customer distribution model' function. Make sure that all changes will be distributed to all systems that know the corresponding model. To do so, you can use the correction and transport system.
    To transport the customer distribution model you should use the Distribute customer model function of the IMG as described below.
    2.3.2.     Distribute customer model (BD71) Client dependent
    After the customer model has been created centrally, it must be distributed to the other remote systems. This entails first of all setting up the communication for the distributed systems and then sending the model.
    2.3.2.1.     Distribute Model (BD71) Client dependent
    This task is performed on your ALE reference client. To distribute the customer distribution model, read the ALE configuration procedure and follow these steps:
    •     Make the settings for the communication with the other decentral systems, you have not set them yet.
    •     Define the RFC destination for R/3 connections whose names correspond to the name of the corresponding logical system.
    •     Create the output partner profile.
    •     Distribute the customer model
    •     Specify the name of the customer model.
    •     You must specify the target system to which you want to distribute the customer model.
    •     You must repeat this function for every distributed logical system.
    2.3.2.2.     Maintain sending system partner profile (WE20) Client dependent
    With this function, you define the partner profiles for all outbound and inbound messages on the basis of the customer distribution model.
    After you have defined and distributed the customer model, you will have to maintain the partner profiles locally. To do this read the ALE configuration procedure.
    •     Enter the output mode (background, immediately) and the package size for outbound processing.
    Requirements
    •     The customer model must be maintained.
    •     RFC destinations must be maintained.
    •     The customer model must be distributed.
    •     To ensure that the appropriate persons in charge are informed if a processing error occurs, you must make settings in: Error processing Maintain organisational units.
    2.4.     Populate & distribute IDoc using ABAP
    An IDoc consists of a control record with structure edidc and one or more data records with structure edidd. The control record contains the sender and recipient of the IDoc, as well as information on the type of message.
    To be able to pass an IDoc to the ALE layer, you must set up a field string with structure edidc and an internal table with structure edidd. They are used to call function module master_idoc_distribute, which performs the save to the database and triggers the dispatch if necessary.
    2.4.1.     Example code
    The code displayed below does the following:
    •     populates our IDoc segment Z1INVR with the 2 fields XBLNR and LIFNR, populates the segment name and appends this to an internal table used to store the IDoc data;
    •     populates the control record info with the message type and IDoc type; and
    •     calls the MASTER_IDOC_DISTRIBUTE function module which distributes the IDoc as configured in the customer distribution model.
    *--- Data declaration statements
    DATA:          C_INVREV_SEGNAME(7) TYPE C VALUE 'Z1INVRV',
              C_INVREV_MESTYPE(6) TYPE C VALUE 'ZINVRV',
              C_INVREV_IDOC_TYPE(8) TYPE C VALUE 'ZINVRV01',
              Z1INVRV LIKE Z1INVRV,
              C_INVREV_DOCTYPE LIKE BKPF-BLART VALUE 'YY',
              IDOC_CONTROL LIKE EDIDC,
              T_COMM_CONTROL LIKE EDIDC OCCURS 0 WITH HEADER LINE,
              IDOC_DATA LIKE EDIDD OCCURS 0 WITH HEADER LINE.
    *--- Move the document header into a structure
    LOOP AT DOC_HEAD_TAB INTO DOC_HEAD.
    ENDLOOP.
    *--- Move the document item data into a structure
    LOOP AT DOC_ITEM_TAB INTO DOC_ITEM WHERE NOT ( LIFNR IS INITIAL ).
    ENDLOOP.
    *--- Populate the IDoc segment’s field with the required data
    CLEAR Z1INVRV.
    Z1INVRV-LIFNR = DOC_ITEM-LIFNR.          “Store vendor number for filter
    Z1INVRV-XBLNR = DOC_HEAD-XBLNR.          “Billing number
    IDOC_DATA-SEGNAM = C_INVREV_SEGNAME.     “Segment name
    IDOC_DATA-SDATA = Z1INVRV.               “Segment data
    APPEND IDOC_DATA.                    “Populate IDoc internal table
    *--- Move the control data info required for the distribution
    IDOC_CONTROL-MESTYP = C_INVREV_MESTYPE.
    IDOC_CONTROL-DOCTYP = C_INVREV_IDOC_TYPE.
    *--- Call the distribute function with the required parameters
    CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE' IN UPDATE TASK
              EXPORTING
                   MASTER_IDOC_CONTROL          = IDOC_CONTROL
              TABLES
                   COMMUNICATION_IDOC_CONTROL     = T_COMM_CONTROL
                   MASTER_IDOC_DATA               = IDOC_DATA
              EXCEPTIONS
                   ERROR_IN_IDOC_CONTROL               = 1
                   ERROR_WRITING_IDOC_STATUS          = 2
                   ERROR_IN_IDOC_DATA               = 3
                   SENDING_LOGICAL_SYSTEM_UNKNOWN      = 4
                   OTHERS                         = 5.
    Figure 4: Outbound processing example code
    NOTE:
    For debugging purposes, use transaction WE05 (IDoc overview) to see check your IDoc status, or to see whether an IDoc was created/
    3.     INBOUND PROCESSING
    3.1.     Create Function Module
    This function module is called when a message type, of type ZINVRV, comes into the receiving system. This needs to be configured and is dealt with later in this section. The function module is passed the IDoc as a parameter.
    Example parameters
    Import parameters     Reference field     Opt Y/N
    INPUT_METHOD     BDWFAP_PAR-INPUTMETHD     N
    MASS_PROCESSING     BDWFAP_PAR-MASS_PROC     N
    Export Parameters     Reference field     Opt Y/N
    WORKFLOW_RESULT     BDWFAP_PAR-RESULT     N
    APPLICATION_VARIABLE     BDWFAP_PAR-APPL_VAR     N
    IN_UPDATE_TASK     BDWFAP_PAR-UPDATETASK     N
    CALL_TRANSACTION_DONE     BDWFAP_PAR-CALLTRANS     N
    Table Parameters     Reference field     Optional Y/N
    IDOC_CONTRL     EDIDC     
    IDOC_DATA          EDIDD     
    IDOC_STATUS     BDIDOCSTAT     
    RETURN_VARIABLES     BDWFRETVAR     
    SERIALIZATION_INFO     BDI_SER     
    Exceptions
    WRONG_FUNCTION_CALLED
    Example code
    The code displayed below does the following:
    •     populates a BDC table with the IDoc info;
    •     calls the transaction via a BDC call; and
    •     updates the IDoc status according to the BDC error status.
    EXTRACT FROM: Z_IDOC_INPUT_ZINVRV
    *--- Declaration of local variables
    DATA: C_SEGNAM(10) TYPE C VALUE 'Z1INVRV'.
    *-Loop through the IDOCs
    LOOP AT IDOC_CONTRL.
    *---Loop through the data for the IDOC
         LOOP AT IDOC_DATA WHERE DOCNUM = IDOC_CONTRL-DOCNUM.
              CASE IDOC_DATA-SEGNAM.
                   WHEN C_SEGNAM.
    *                    Here we get the info from the idoc table
                        IT_Z1INVRV = IDOC_DATA-SDATA.
              ENDCASE.
              PERFORM REV_INV.
         ENDLOOP.
         PERFORM UPDATE_IDOC_STATUS.
    ENDLOOP.
    FORM REV_INV               "Reverse invoice form
    *--- Local variables & constants
    DATA: C_TCODE LIKE BKPF-TCODE VALUE 'VF11'.  "BDC transaction code
    *--- Now we can build the bdc table to call the reversal transaction start of screen 109
    CLEAR BDC_TAB.
    BDC_TAB-PROGRAM  = 'SAPMV60A'.
    BDC_TAB-DYNPRO   = '109'.
    BDC_TAB-DYNBEGIN = 'X'.
    APPEND BDC_TAB.
    *--- Document number
    CLEAR BDC_TAB.
    BDC_TAB-FNAM = 'KOMFK-VBELN(01)'.
    BDC_TAB-FVAL = IT_Z1INVRV-XBLNR.     "Billing document number
    APPEND BDC_TAB.
    *--- OK Code for screen 109
    CLEAR BDC_TAB.
    BDC_TAB-FNAM = 'BDC_OKCODE'.
    BDC_TAB-FVAL = 'SICH'.
    APPEND BDC_TAB.
    *--- Now we can call transaction 'VF11' with the populated bdc table. The transaction is called inside the idoc-contrl loop, so a transaction will be called for every idoc (journal). the transaction is called in no-display mode ('N') because this code runs in background as it is called by ale.  The update is specified to be synchronous ('S') because we have to wait for the result to update the idoc status correctly.
    CALL TRANSACTION C_TCODE USING BDC_TAB MODE 'N' UPDATE 'S'.
    *--- Store the return code for use in another form (status update)
    RETURN_CODE = SY-SUBRC.
    *--- Here we check the return code, if there was an error, we put the transaction in a bdc session for the user to review and correct.
    IF SY-SUBRC NE 0.
         CALL FUNCTION 'BDC_OPEN_GROUP'
              EXPORTING
                   CLIENT = SY-MANDT
                   GROUP  = 'ZINVRV'
                   USER   = C_ALE_USER
                   KEEP   = 'X'.
         CALL FUNCTION 'BDC_INSERT'
              EXPORTING
                   TCODE     = C_TCODE
              TABLES
                   DYNPROTAB = BDC_TAB.
         CALL FUNCTION 'BDC_CLOSE_GROUP'
              EXCEPTIONS
                   NOT_OPEN    = 1
                   QUEUE_ERROR = 2
                   OTHERS      = 3.
    ELSE.                              "No problems
         C_EXISTS = 'N'.
      Select from the billing document table to get sales doc number
         SELECT * FROM VBRP WHERE VBELN = IT_Z1INVRV-XBLNR.
        Select from the sales document table to get user status number
              SELECT SINGLE * FROM VBAP WHERE VBELN = VBRP-AUBEL AND
                   POSNR = VBRP-AUPOS.
        Select from the status table to change the user status to pending
              SELECT * FROM JEST WHERE OBJNR = VBAP-OBJNR AND
                   STAT LIKE C_USER_STATUS.
                   IF JEST-STAT = C_US_PENDING.   "User status is pending
                        JEST-INACT = C_UNCHECKED.    "Make pending the active status
                        UPDATE JEST.
                        C_EXISTS = 'Y'.            "I.E. An entry is already in table
                   ELSEIF JEST-INACT = C_UNCHECKED AND JEST-STAT NE C_US_PENDING.
                        JEST-INACT = C_CHECKED.      "Make everything else inactive
                        UPDATE JEST.
                   ENDIF.
              ENDSELECT.
              IF C_EXISTS = 'N'.    "I.E. Pending has never been a status before
                   JEST-OBJNR = VBAP-OBJNR.
                   JEST-STAT  = C_US_PENDING.
                   JEST-INACT = C_UNCHECKED.      "Make pending the active status
                   INSERT JEST.
              ENDIF.
         ENDSELECT.       "Select from VBRP (Billing document table)
    ENDIF.
    ENDFORM.                               " REV_INV
    FORM UPDATE_IDOC_STATUS.                                              
    *--- Now we check the CALL TRANSACTION return code and set IDOC status
         CLEAR IDOC_STATUS.                                                  
         IF RETURN_CODE = 0.                                                 
              WORKFLOW_RESULT = '0'.                                            
              IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.                          
              IDOC_STATUS-STATUS = '53'.                                        
              IDOC_STATUS-UNAME = SY-UNAME.                                     
              IDOC_STATUS-REPID = SY-REPID.                                     
              IDOC_STATUS-MSGTY = SY-MSGTY.                                     
              IDOC_STATUS-MSGID = SY-MSGID.                                     
              IDOC_STATUS-MSGNO = SY-MSGNO.                                     
              IDOC_STATUS-MSGV1 = SY-MSGV1.                                     
              IDOC_STATUS-MSGV2 = SY-MSGV2.
              IDOC_STATUS-MSGV3 = SY-MSGV3.                        
              IDOC_STATUS-MSGV4 = SY-MSGV4.                        
              RETURN_VARIABLES-WF_PARAM = 'Processed_IDOCs'.       
              RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.    
              APPEND RETURN_VARIABLES.                             
         ELSE.                                                  
              WORKFLOW_RESULT = '99999'.                           
              IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.             
              IDOC_STATUS-STATUS = '51'.                           
              IDOC_STATUS-UNAME = SY-UNAME.                        
              IDOC_STATUS-REPID = SY-REPID.                        
              IDOC_STATUS-MSGTY = SY-MSGTY.                        
              IDOC_STATUS-MSGID = SY-MSGID.                        
              IDOC_STATUS-MSGNO = SY-MSGNO.                        
              IDOC_STATUS-MSGV1 = SY-MSGV1.
              IDOC_STATUS-MSGV2 = SY-MSGV2.                         
              IDOC_STATUS-MSGV3 = SY-MSGV3.                         
              IDOC_STATUS-MSGV4 = SY-MSGV4.                         
              RETURN_VARIABLES-WF_PARAM = 'ERROR_IDOCS'.            
              RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.     
              APPEND RETURN_VARIABLES.                              
         ENDIF.                                                  
         APPEND IDOC_STATUS.                                     
    ENDFORM.                               " UPDATE_IDOC_STATUS
    Figure 5: Inbound processing example code
    3.1.1.     Debugging inbound FM
    Use transaction WE19 to test inbound function module in debugging mode. Also use WE05 to view the IDocs and their statuses.
    3.2.     Maintain ALE attributes
    The inbound function module needs to be linked to the message type and the message type needs to be linked to the appropriate inbound process code at the partner profile level before the scenario is enabled. These steps are described below in detail.
    3.2.1.     Link Message Type to Function Module (WE57) Client independent
    To link a message (ZINVRV) type to a function module (Z_IDOC_INPUT_ZINVRV) follow these steps:
    •     Enter transaction WE57 (ALE -> Extensions -> Inbound -> Allocate function module to logical message)
    •     Select an entry (EG. IDOC_INPUT_ORDERS) and copy
    •     Type in module name Z_IDOC_INPUT_ZINVRV
    •     Type in basic IDoc type as ZINVRV01
    •     Type in message type as ZINVRV
    •     Type object type as IDOCINVOIC (Invoice document) - Used for workflow
    •     Direction should be set to 2 for inbound
    •     Enter and save
    3.2.2.     Define FM settings (BD51) Client independent
    •     Enter transaction BD51 (ALE -> Extensions -> Inbound -> Define settings for input modules)
    •     Click on New entries
    •     Type in the name of the new function module Z_IDOC_INPUT_ZINVRV
    •     Enter 0 for mass processing in the output column
    •     Save and Exit
    3.2.3.     Maintain process codes (WE42) Client dependent
    A process code needs to be maintained on each client. It then needs to be linked to the message via the partner profiles on each client. This allows the various clients to use a unique function module for the same message type.
    To maintain the process code follow these steps:
    •     Log on to the appropriate receiving system client
    •     Execute WE42 (ALE -> Extensions -> Inbound -> Maintaining process codes inbound)
    •     Choose Inbound with ALE service
    •     Choose Processing with function module
    •     Click on Processing with function module and choose create icon
    •     Click on New Entries
    •     Type in process code ZINR and give it a description and save
    •     Now you are asked to Please maintain codes added in ALE entry methods, enter and choose Z_IDOC_INPUT_FIRVSL and copy it. You should choose a FM similar to your one.
    •     Enter your process code ZINR
    •     Enter your function module Z_IDOC_INPUT_ZINVRV
    NOTE: The next 6 steps are used in workflow error handling.
    •     Enter IDPKFIDCMT in object type
    •     Enter MASSINPUTFINISHED in End event
    •     Enter IDOCINVOIC in IDoc object type
    •     Enter INPUTERROROCCURREDFI in IDoc start event
    •     Enter INPUTFINISHEDFI in IDoc End event
    •     Enter IDOCINVOIC in Application object type
    You will need to determine the task associated with object IDOCINVOIC, and then assign the appropriate position to it. This position will then receive the application error messages via workflow.
    To set up the workflow area please consult the Workflow config guide.
    3.3.     Create inbound partner profile
    For each message type you need to maintain the inbound partner profiles.
    3.3.1.     Maintain receiving system partner profile (WE20) Client dependent
    To maintain inbound partner profiles read the document ALE configuration procedure:
    •     Add the message type ZINVRV with process code ZINR.
    •     Enter the output mode (background, immediately) for inbound processing and NO message code.
    •     Enter the position S and choose the ALE administrator 50000085. This position will then receive all the technical ALE errors via workflow.
    3.4.     Test
    Once the inbound function module has been debugged the scenario should be ready to test in its entirety. If problems occur, read through the relevant areas of this document to check your configuration or code.</b>
      Foe EDI 810 Mapping Refer  <b>http://www.altova.com/videos.asp?type=0&video=edimapping</b>.
    Online demo you can see,
    Thanks
    Manju

  • About soap interface

    why we have to specify interface name while doing soap to rfc scinario

    HI,
    In SOAP to RFc interface your Web application is on Sender side and you will be defining the Webservice in XI in ID as per the SOAP sender communication channel.
    then you need to identify the Outbiund Message Interface related to this defined Web service. That could be possible if you mentioned the Message interface in Sender SOAP Communication channle.
    In Recevier you will not require it.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5474f19e-0701-0010-4eaa-97c4f78dbf9b
    /people/shabarish.vijayakumar/blog/2006/03/23/rfc--xi--webservice--a-complete-walkthrough-part-1
    /people/shabarish.vijayakumar/blog/2006/03/28/rfc--xi--webservice--a-complete-walkthrough-part-2
    Thanks
    Swarup
    Edited by: Swarup Sawant on Mar 14, 2008 12:14 PM

  • Questions about EJB local interfaces - 9iAS 9.03

    Intro: I am new in developing EJB, and I am trying to build an example to verify that a stateless session bean with local interfaces is quite efficient.
    Q1: I have read that an application trying to access local interfaces of an EJB must run into the same JVM. Does it means that it should be deployed into the same OC4J instance as the servlet?
    Q2: I am using JDev 10g to build the EJB, with local and remote interfaces. Using the internal OC4J container, I can use the remote interfaces but not the internal one: an object of class "_Proxy1" is returned after the lookup (with the same name as given for the remote interface related call). Is it possible to access the local interface?
    Q3: My application architecture is already defined to split the business logic in two EJBs: one stateless session bean for volatile data and one entity bean for a global user list cache. Where can I find a working example (with source code, please) to be deployed on 9iAS that can validate my design?
    Q4: In many places, I read that CMP entity bean are easier to develop than BMP one. Is there any special consideration I should be aware of before implementing a CMP for my global user list cache?
    Thanks a lot, Dom.

    I have just read:
    I think the problem is that local interfaces can only by
    accessed through the same container, and JSP/Servlet's
    one is different from EJB's one, regardless of you many
    application server's instances do you have... Hope this
    is the answer...Is there anyone who know if it applies too to 9iAS?
    A+, Dom

  • Urgent related to message type structure and proxy

    Hello,
    My outbound interface related message type structure is like this....
    message type name : MSg1
    Msg1
    x
    y
    Z
    (under z)
    a
    b
    c
    ok,Now in generating the proxy how to populate this structure.
    For example ...
    if Msg type is emp_profile_msg
    Emp_name
    Empno
    Department_name
    we use this code
    REPORT zblog_abap_proxy.
    DATA prxy TYPE REF TO zblogco_proxy_interface_ob.
    CREATE OBJECT prxy.
    DATA it TYPE zblogemp_profile_msg.
    TRY.
    it-emp_profile_msg-emp_name = 'Sravya'.
    it-emp_profile_msg-empno = '80101'.
    it-emp_profile_msg-DEPARTMENT_NAME = 'NetWeaver'.
    CALL METHOD prxy->execute_asynchronous
    EXPORTING
    output = it.
    commit work
    CATCH cx_ai_system_fault .
    DATA fault TYPE REF TO cx_ai_system_fault .
    CREATE OBJECT fault.
    WRITE :/ fault->errortext.
    ENDTRY.
    if message type consists structure inside strucutre ..then how to populate those sructure

    Hi Sunil,
    Please don't mind, but I think I already have posted the answer for this query and have provided some links
    Please see the below mail.
    urgent related to Mesage types and proxy
    Please let me know if you need anything else than the given info.
    I have one sample program where we have deal with these kind of sub-sturctures
    Thanks
    Swarup

  • Urgent related to Mesage types and proxy

    Hello,
    My outbound interface related message type structure is like this....
    message type name :  MSg1
       Msg1
         x
         y     
         Z
          (under z)
           a
           b
           c               
    ok,Now in generating the proxy how to populate this structure.
    For example ...
    if Msg type is emp_profile_msg
                    Emp_name
                    Empno
                    Department_name
    we use this code
    REPORT  zblog_abap_proxy.
    DATA prxy TYPE REF TO zblogco_proxy_interface_ob.
    CREATE OBJECT prxy.
    DATA it TYPE  zblogemp_profile_msg.
    TRY.
        it-emp_profile_msg-emp_name = 'Sravya'.
        it-emp_profile_msg-empno = '80101'.
        it-emp_profile_msg-DEPARTMENT_NAME = 'NetWeaver'.
        CALL METHOD prxy->execute_asynchronous
          EXPORTING
            output = it.
         commit work
      CATCH cx_ai_system_fault .
        DATA fault TYPE REF TO cx_ai_system_fault .
        CREATE OBJECT fault.
        WRITE :/ fault->errortext.
    ENDTRY.
    if message type consists structure inside strucutre ..then how to populate those sructure

    hI,
    Similarly you have to give it as extending it
    it-emp_profile_msg-DEPARTMENT_NAME -Field Name
    Refer below link for programming tips with ABAP proxy with the structure
    http://help.sap.com/saphelp_nw04/helpdata/en/3e/a35c3cff8ca92be10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/14/555f3c482a7331e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c9/74246d8ad2447799063d39013e9a11/content.htm
    Thanks
    swarup

  • XI interfaces for Telecommunication -SalesOrderManagment

    Hi Experts,
    Any one can Help me to find the Service Interfaces related to
    Telecommunication industry related Service Interfaces for   SalesOrderManagment Scenario
    thanks  in Advance
    Thanks & regards
    Nandan

    Go to esworkplace.sap.com and search.
    Here is what i found:
    http://esworkplace.sap.com/socoview(bD1lbiZjPTAwMSZkPW1pbg==)/render.asp?id=esoa[174BCB7D0047415E8AD34BC006084085]&fragID=&packageid=DE0426DD9B0249F19515001A64D3F462&iv=
    Regards,
    Ravi

  • Component interface question

    Is the concept "component interface" related to the business methods of the bean or to the callback methods (that inform the bean about state events) of SessionBean/EntityBean interface?
    if "component interface" related to the callBack methods then how the interface with the business methods is called (in 3.0 i know it's "business interface" but what about 2.1)?
    thanks in advanced

    The component interface refers to a particular client view exposed from the bean. It contains the business methods available to the callers.
    The callback methods are a separate contract between the bean class and the container. In EJB 2.x, they are expressed via strongly-typed javax.ejb interfaces that the bean class was required to implement.
    In EJB 3.0, all callbacks are optional and the bean class uses annotations such as @PostConstruct to annotate the methods it wants to be called back. These methods are typically not exposed through the client (component interface) view.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for

  • RFC connection Error

    Dear All,     when i connect our BI System to R/3 system via RFC in SM59 ,i am getting following error in BI system and also The problem occur  in particular instance .(Other instance working fine in BI system) Logon     Connection Error Error Detail

  • Looking to purchase a macbook pro, and i've got a few questions

    Hi Guys, I know some of these questions have been asked before, but i'm just trying to get all that information together... I really don't want to purchase a macbook pro - only for a new one to be announced a week later - the few people i've talked t

  • Applet Servlet communication compiles but does not communicate

    Hi, I have a applet which has a button named A. By clicking the button, the applet passes the letter A to the servlet. The servlet in turn accesses an Oracle database and retrieves the name corresponding to letter A from a table (name is Andy in the

  • Need to install Standard VGA Graphics Adapter

    My computer initially started with a Standard VGA Graphics Adapter but now its gone and some applications won't run properly. How can I fix this?

  • Random error accessing CIFS shares from Windows

    I am setting up some CIFS shares to be used from Windows clients and in the process I had some random problems accessing the shares. In hope of finding the answer I checked the CIFS Service and the Active Directory Service, and while watching the scr