cancel
Showing results for 
Search instead for 
Did you mean: 

Sending reduced IDOC from XI to R/3 with nodata markers

Former Member
0 Kudos

Hi !

I need to update a VERY FEW Vendor fields data in R/3 from XI (FILE-XI-IDOC). I'm using the standard IDOC type CREMAS04 (I need to update fields of the E1LFBWM segment...withholding tax fields).

The problem is, that if I disable the not needed IDOC fields in the XI message mapping, when the IDOC reaches R/3, it blanks all the fields that were empty as result of the mapping...I verified it using XI and using the IDOC test tool (we19). For example, if the vendor had data in fields such as "salutation", "phone number", etc. after the IDOC processing, those fields change to BLANK.

One solution is to send the NODATA marker ("/") in those not needed fields, and that works!!!!...<b>BUT</b>, there are hundreds of IDOC fields.

I made a reduced IDOC type, based on CREMAS, enabling only the segments and fields needed, but tnx-WE19 and XI keep sending blank data in the not needed fields instead of the NODATA marker.

How could I send by default, the NODATA marker ("/") to all the fields NOT mapped or disabled, without having to map each field manually ?!?!?

Should XI send those fields as "/", or the R/3 should detect that the incoming IDOC is a reduced IDOC type, and complete all the not existing fields with NODATA ??

The goal is to update some data, and not overwrite with blanks, those fields that should remain untouched.

Thanks !!

Matias.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You have 2 chances:

1) write a custom "Function Module" for IDoc processing that evaluate the non-used segments fileds with "/" and use this function module to process the inbound message in the backend.

2) use a post-mapping step in the Interface Mapping that put all the "/" in the non-used structure fields. You can do it with "ABAP Mapping" or "Java Mapping"

Regards,

Sandro

Former Member
0 Kudos

Thanks !!

I like the 2nd option, because here, they like to avoid have custom functions..unless there is no other way to solve it. I will try it now...

so, could you tell me what is the transaction BD53 for ??

Thanks

Former Member
0 Kudos

mmm...it looks a possible 3rd option.

I forgot this, you can try this way also...

<i>Standard basic IDoc types are often adapted to all imaginable interfaces. However, it sometimes happens that the sent volume is too big compared with the needs. A filter can applied (see above), which represents a dynamical method.

The number of segments or the number of fields in a segment can also be reduced in a static way, while still keeping the structure of the basic IDoc type. Indeed, for all basic IDocs, SAP had envisaged their reduction.

A reduced IDoc has less segments than the basic IDoc, provided that the deleted segments are not mandatory. The segments of a reduced IDoc can also have less fields than the corresponding segments of the basic IDoc.

Dealing with the standard basic IDoc types, their integration function module already takes into account the possibility of a reduction. The advantage to use reduced IDocs seems to be obvious then: to profit from standard functions while reducing the volume of exchanged data.</i>

Regards

Sandro

Former Member
0 Kudos

Yep...that's what I'm trying to do,

these were the steps:

1) tnx BD53: creation of the reduced IDOC type (based on CREMAS), called ZCREMAS_WITHHOLDTAX, selecting only the requiered segments (E1LFA1M, E1LFB1M and E1LFBWM), with only mandatory fields in first 2 segments, and ALL fields in third segment.

2) tnx WE20: added the new reduced type to the inbound parameters list of the partner profile (partner type logical system), with NO partner role, and ZCREMAS_WITHHOLDTAX as message type, and CRE1 as Process Code.

3) tnx WE19: via message type ZCREMAS_WITHHOLDTAX, here appears the whole IDOC (aprox. 20 segments)...I completed only the fields that I want to send, and executed the "standard inbound" button. It says that the IDOC was sent to the application.

4) tnx FK03 (Display Vendor): I entered the vendor modified by the IDOC and a lot of previously completed fields (not completed in WE19) became blank. Those completed in WE19, were updated.

Am I missing something ? Am I trying ok ?

Thanks.

Answers (5)

Answers (5)

Former Member
0 Kudos

Thanks!

Former Member
0 Kudos

Hello Matias,

I am facing the same problem with an inbound DEBMAS idoc that we reduced. However, we are not using XI, we're getting an IDOC into SAP from a 3rd Party MDM tool.

I am not familiar with SALE tnx in R3 (ECC 6.0), and am not able to find help on it on Google. How can do I set up a message rule to set all the reduced fields to NODATA?

Please help me.

Thank you in advance,

Masha Consilio

Weyerhaeuser Co.

Former Member
0 Kudos

I am sorry.. my edit fails eventhough I paragraph it in word and pasted it..

thnx-Gopal

Former Member
0 Kudos

Hi !

Thank you everyone !

I think I solved it, by creating a message rule in tnx SALE, and configuring a constant value for each not used field of my IDOC segments.

Thanks

Matias

former_member185846
Active Participant
0 Kudos

Hi Matias,

I need to send IDocs from one SAP client to other SAP client via XI with only required segments. Can you explain the steps in detail?

Thanks in advance.

Regards,

Joe.

Former Member
0 Kudos

Matias

Is ur intention /equirement to send the NODATA for the rest of the IDOC elements or just send the reduced IDOC for the required sender elements..

if it is only for sender file elements, as sravya said Note 709400 describes

The integration repository provides a new function: "export reduced XSD" to reduce the XML schema of an IDoc.

To use this function in the mapping tool, proceed as follows:

1) Open the relevant IDoc in the object editor of the XI Repository.

2) In the menu "Tools", select the menu option "Export reduced XSD".

3) Assign a file name in the subsequent dialog box and save the data on the hard disk of your local PC.

4) Use this exported file in the message mapping instead of the IDoc by using the function "Import XML or XSD" in the mapping tool to select the source or target message. So you must use this function to import the reduced XML schema stored under

3) of the IDoc in question, and use this XML schema instead of the complete IDoc.

Note: The XML schema generated using the function "export reduced XSD" does not contain the full information in the repository on the IDoc and should only be used for the mapping.

option2: if you want to send the NO DATA, you got to develop UDF in Java or XSLT..

Here is a sample Java code:

obj = inputModuleData.getPrincipalData();

msg = (Message)obj;

XMLPayload xmlpayload = msg.getDocument();

DocumentBuilderFactory factory;

factory =DocumentBuilderFactory.newInstance();

DocumentBuilder builder = factory.newDocumentBuilder();

// parse the XML Payload

Document document = builder.parse((InputStream)

xmlpayload.getInputStream());

var x=document.getElementsByTagName("<rootnode>");

for(i=0;i<x.length;i++)

{

//the attlist variable will hold a NamedNodeMap

var attlist=x.item(i).attributes;

if (attllist.getvalue.equals("") { //pseudo

attlist.setvalue("/"); //pseudo

}

document.write(att.value + "<br />");

}

Good luck

Thanks-Gopal

Message was edited by:

gopal srinivasan

STALANKI
Active Contributor
0 Kudos

Take a look at this note 709400

STALANKI
Active Contributor
0 Kudos

Take a look at this note 709400

Former Member
0 Kudos

Hi !

Thanks for your answer...but with REDUCED, I mean a reduced IDOC type via transaction BD53 in R/3, not the "export reduced xsd" in XI.

I have no problem with the IDOC size regarding performance or hang ups...my problem is the way to AVOID creating manually hundreds of "constant" mappings in the graphical mapping for fields that should contain "/".

Thanks anyway.