cancel
Showing results for 
Search instead for 
Did you mean: 

Reg:- Adding additional fields in Idoc.

Former Member
0 Kudos

Hi Sdners,

I am doing File to IDOC scenario. My receiving Idoc is Orders.Order04.In my receiving Idoc structure I want to add additional segment with five fields.

I had added the additional segment and fields using Altova XML spy and imported the xsd file using external defintions.If I am checking the XSD code in external defintion, it is showing the added segments and fields whereas if I am using the same external definition in mapping I am unable to see the extra segment and fields.

Can anybody help me in getting the segment and field names in mapping or please suggest any alternative to add extra segment and fields.

Thanks in Advance.

Regards,

Jayaram.G

Accepted Solutions (0)

Answers (5)

Answers (5)

former_member192295
Active Contributor
0 Kudos

Hi,

Modification of IDOC should be in R3 end only, once modification is done after that import thta idoc into xi, else can't work. We can modify idoc with extension mechanism.

Former Member
0 Kudos

Jayaram,

You need to update the IDOC in R/3.

Be sure to arrange a ZIDOC will be created, and fetch this data from your Logical system in Xi. Else if you want to map the data in the IDOC in SAP Xi it works but when uploading to R/3 the added data will be ignored.

Greets

JoelTrinidade
Active Contributor
0 Kudos

Hi,

To make custom idoc follow the following steps

Configuration Steps:

1) Create New Segments (Tcode WE 31)

2) Extend IDOC (WE30)

3) Create New Message Type(WE81)

4) Assign IDOC to Message Type(WE82)

5) Assign Message Type To Process Code(WE41):

6) Assign Message Type to Model View(BD64):

7) Assign Message Type/IDOC to Partner Profile(WE20)

Development

1.Find appropriate USEREXIT

2.Create Project Using CMOD

3.Choose the Enhancement and the Exit FM

4. Write your code in the include.

PSEUDO CODE:

IF control_record_out-mestyp = 'ZORDRSP' AND control_record_out-idoctp = 'ORDERS05'

LOOP AT dint_edidd WHERE segnam = 'E1EDK01'

dint_edidd-segnam = 'Z1EDK35'. dint_edidd-sdata = wa_vbkd-bsark_e. INSERT dint_edidd INDEX v_tabix.

ENDLOOP.

Rgds

joel

JoelTrinidade
Active Contributor
0 Kudos

Hi jayaram,

According to your requirements you would need to make a "zee" idoc (zidoc) also known as custom idoc.

Rgds

joel

Former Member
0 Kudos

Hi

The addition of the fields/segments for Idoc is done at R/3 side and imported into XI.

Then you have an updated IDOC msg, which can be used within mapping

Regards

Vishnu

Former Member
0 Kudos

Hi Vishnu,

Thanks for your quick response. If I want to do that one in XI, is it possible to do by importing Idoc XSD and adding additional segment and fields there? Any other procedure is there to add segment and fields to Idoc.

Regards,

Jayaram.G

Former Member
0 Kudos

Hi

Once you have the XSD in XI, You can ofcourse download, change the structure, upload it as Ext Def, map them etc..

but if you need these changes reflect in your R/3 receving side, then the Idoc should match the structure.

These kinds of scenarios are possible for sending msgs to some external systems etc

Regards

Vishnu

Former Member
0 Kudos

Hi Vishnu,

In my receiver side I am posting EDI Idoc (Idoc flat file). I think there will be no problem about matching the structure as I am placing the file in a specific folder.

Regards,

Jayaram.G

Former Member
0 Kudos

When using a IDOC flatFile the client SAP side can be ignored.

But when you add the renewed IDOC Xml in the External Defnitions you need to point the message and operational mapping to the correct message type

This isn't done automatically.

Greets