cancel
Showing results for 
Search instead for 
Did you mean: 

XML-IDOC inbound for ECC 6.0

Ganimede-Dignan
Contributor
0 Kudos

Hi,

in a ECC 6.0 only landscape we would like to process XML-IDOC in inbound. For outbound we have already create a XML-IDOC port... but I don't be able to find it for inbound.

How can I do it ?

Regards.

Ganimede Dignan.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi,

you can post your idoc-xml to the SICF service

/default_host/sap/bc/idoc_xml

via HTTP post. The used handler class is CL_HTTP_IDOC_XML_REQUEST.

If you don't want to use http, look at the handle_request method of this class. There is a call:

IDOC_INBOUND_XML_VIA_HTTP. Fill the needed parameters in your custom code and that's it

regards.

Volker

Former Member
0 Kudos

Hi,

There is no port like XML-IDOC........you have ports for tRFC, File, XML-File, XML-HTTP etc............

I think what you want is that you want to get a XML file posted in ECC as an IDOC.........for this thing, you will require XI to map your XML file to an IDOC and send that IDOC in native IDOC format to R/3 system............you will require to create a port in XI in IDX1 transaction to send it to R/3 using a RFC destination from XI to R/3..............

If you want to get an IDOC from another r/3 system, then you will need to have a tRFC port in your r/3 system to get the IDOC.

Regards,

Rajeev Gupta

Former Member
0 Kudos

u need to specify message type in partner profile(we20) under sender system name in inbound options.

then ur ECC system will be able to receive IDoc

Regards,

Manisha

Ganimede-Dignan
Contributor
0 Kudos

Hi,

thank for you port.... my problem is not ALE customizing... how can I process in inbound a XML-IDOC on a SAP system ? .... XML-IDOC port is only for outbound.

Regards.

Former Member
0 Kudos

Configure your message type in inbound params of your partner with appropriate processing code

Rajesh

Ganimede-Dignan
Contributor
0 Kudos

>Configure your message type in inbound params of your partner with appropriate processing code

>

>Rajesh

Thank you

... but where can I specify file path end/or file name for inbound processing for a XML-IDOC

Regards.

Ganimede Dignan

Former Member
0 Kudos

Hey Ganimede Dignan,

For to acheive solutions to your query asap ,post the entire scenario of yours, with details and where exactly your are stuck with.

by the way how your getting XML-IDOC to your R/3 system. Is it posted by XI or some other system.

Rajesh

Ganimede-Dignan
Contributor
0 Kudos

ECC create a MATMAS as XML-IDOC with XML-port into a specific path (/var/xml/matmas/out) for a 3th party application, this application create an xml file (is the same matmas in xml-idoc with some changes) and we would liket to import into out ECC system... without PI/XI.

Regards.

Former Member
0 Kudos

I think this is not the right forum for you to get efficient solutions for your query.

I know report RSEINB00 for conveting Flat-IDoc to IDOC XML . Check is there any report s in ECC for converting the same fot your rqts

Rajesh

Former Member
0 Kudos

Hi,

Generating IDOC in ECC from a XML file without using XI is not feasible.

Regards,

Rajeev Gupta

Ganimede-Dignan
Contributor
0 Kudos

IDOC_XML_FROM_FILE ?

Ganimede-Dignan
Contributor
0 Kudos

>IDOC_XML_FROM_FILE ?

It works fine and with a custom report we can solve this problem.

Regards.

Ganimede Dignan.

Ganimede-Dignan
Contributor
0 Kudos

>>

>>IDOC_XML_FROM_FILE ?

>>

>It works fine and with a custom report we can solve this problem.

>

It's hardly to define role with developers

Bye.

Former Member
0 Kudos

Hi,

A bit too late to ask a question on this thread. But would appreciate if you can tell me how you were able to import XML file into SAP without PI.

Regards,

Shilpi

Ganimede-Dignan
Contributor
0 Kudos

Hi,

it's quite simple, if you have a system base on NW 2004s or newer you have all that you need but take in mind XML-IDOC it's not a Free XML .... it's an XML structure as an IDOC.

In WE21 TCODE you can set-up and "XML File" port or and "XML Http" port.

In anyway you can parser each XML by ABAP custom code.

read olso some of my old notes....

IDOC_INBOUND_FROM_FILE => called within report RSEINB00

IDOC_XML_FROM_FILE         => not called by any report (on release 4.6c)

I have used fm IDOC_XML_FROM_FILE already many times to manually transfer XML-IDocs from one SAP system to another.

Given the fact that report RSEINB00 is quite simple (see below) you could create your ZRSEINB00 for processing XML IDocs.

The reports can be scheduled in background to process the inbound IDocs continuously.

REPORT RSEINB00 MESSAGE-ID E0.

*----------------------------------------------------------------------*

* EDI inbound processing (main program to be scheduled)

*----------------------------------------------------------------------*

* This program processes one file with one ore more intermediate

* documents.  When an error occurs, a message will be send via workflow

* processing.

* The index of the last successfully processed record of the file is

* always written to the table EDFI2.

* If the program is startet again for this file, the table EDFI2 will

* be interpreted and the processing will start at the next record.

*----------------------------------------------------------------------*

************************************************************************

* PARAMETERS

************************************************************************

PARAMETERS:

* directory + name of file that has to be processed

  P_FILE  LIKE  EDI_PATH-PTHNAM  DEFAULT '/usr/sap/.../SYS/global/...'.

************************************************************************

* DATA

************************************************************************

DATA:

  G_MESSAGE_FIELDS LIKE EDIMESSAGE.

************************************************************************

* MAIN PROGRAM

************************************************************************

START-OF-SELECTION.

* do inbound processing from file

  CALL FUNCTION 'IDOC_INBOUND_FROM_FILE'

       EXPORTING

            FILE_NAME            = P_FILE

       EXCEPTIONS

            FILE_OPEN_FAILED     = 1

            MARKER_TO_BE_DELETED = 2

            READ_FILE_FAILED     = 3

            IDOC_NOT_STORED      = 4

            FILE_DELETE_FAILED   = 5

            MARKER_MODIFY_FAILED = 6

            EVENT_CREATE_FAILED  = 7

            FIRST_RECORD_INVALID = 8

            INVALID_RECORD       = 9

            OTHERS               = 10.

  IF SY-SUBRC  0.

* fill message fields for exception handling from system fields

    MOVE-CORRESPONDING SY TO G_MESSAGE_FIELDS.

* error handling using the 3.0 business workflow

    CALL FUNCTION 'IDOC_ERROR_WORKFLOW_START'

         EXPORTING

              DOCNUM                  = 0

              EVENTCODE               = 'EDIM'

              MESS                    = G_MESSAGE_FIELDS

         EXCEPTIONS

              NO_ENTRY_IN_TEDE5       = 0

              ERROR_IN_START_WORKFLOW = 0

              OTHERS                  = 0.

* do not care for exceptions here

    COMMIT WORK.

* abend message for RFC

    MESSAGE ID     G_MESSAGE_FIELDS-MSGID

            TYPE   'A'

            NUMBER G_MESSAGE_FIELDS-MSGNO

            WITH   G_MESSAGE_FIELDS-MSGV1 G_MESSAGE_FIELDS-MSGV2

                   G_MESSAGE_FIELDS-MSGV3 G_MESSAGE_FIELDS-MSGV4.

  ENDIF.

************************************************************************

* end of report

**********************************************************

there are some function modules to accomplish this.

IDOCS_OUTPUT_IN_XML_FORMAT

IDOCS_OUTPUT_VIA_XML_HTTP

for inbound processing,

IDOC_INBOUND_XML_SOAP_HTTP

IDOC_INBOUND_XML_VIA_HTTP

IDOC_XML_FROM_FILE

IDOC Adaptor,

IDX_IDOC_TO_XML

Extended table maintenance, to display IDOC in XML format with XSL,

IDOC_XML_DISPLAY

IDOC_XML_TRANSFORM

Former Member
0 Kudos

Hi,

if you are trying to process it via RFC / ALE then you just have to create a port in the sender system with reference to the RFC destination that points to the receiver system. Then the lat thing is - the XML IDOC must carry the propper information in the header segment EDI_DC40.

Hope this helps!

Regards,

Kai