cancel
Showing results for 
Search instead for 
Did you mean: 

Changing the Occurence in IDOC

former_member188885
Active Participant
0 Kudos

Hi All,

I have a standard IDOC FIDCC1.FIDCCP02. I need to change the occurence of the first element FIDCCP02 from 1...1 to 0...1.

I tried to add minOccurs="0" in the xsd file and imported it again. But the change is not reflecting.

can you tell me how to change it.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

I have a scenario like JDBC to PROXY.

My requirement is after selecting the record from table, proxy has to be generated and after successful creation of PROXY that record has to be deleted in the table. Could you please help me to resolve the issue.

Thanks,

Dheeraja

former_member188885
Active Participant
0 Kudos

In my scenario, i have to send multiple IDOCS to N receivers. So based on the conditions some receivers might get zero IDOCs.

I am getting an error "Tag found instead of tag IDOC BEGIN="

I checked some blogs for this, but still i am not able to solve this.

How do i pass the structure with no IDOC in it?

Former Member
0 Kudos

Hi,

This is a bit tricky. Do one thing, first make the max occurence of the IDoc segment as unbounded. Now go to ESR & go to create a data type.You can give the name of the segment which you want to come before the IDoc. Now instead of creating fields, click on the XSD tab & import the IDoc XSD. Now create another data type & create a subelement for this data type. When you have to select the type for this data type, instead of selecting XSD types as we normally do,just below it is a tab called data types. Refer to the previously created data type using only the IDoc. The max occurence of the first field of the second data type can be taken as 0:1 as you want. This is called Nesting of data types.

baskar_gopalakrishnan2
Active Contributor
0 Kudos

After editing the occurence of segment make sure you activate the imported file. Also if you have few versions of xsd file make sure delete the unwanted and import and use the appropriate one as message type in the service interface.

Edited by: Baskar Gopal on Feb 27, 2012 9:35 AM

Former Member
0 Kudos

It wont do only with minOccurs set to 0. You must write minOccurs =0 along with maxOccusr =1. I bet it will work.

MichalKrawczyk
Active Contributor
0 Kudos

hi,

change it on IDOC level segment

http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/2762

and activate

Regards,

Michal Krawczyk

former_member188885
Active Participant
0 Kudos

I have changed the IDOC occurence and it is working. But i want to change the occurence of the element before the IDOC.

Like in the reference blog's example, i want to change the occurence of MBGMCR02

Former Member
0 Kudos

Hi,

When we want to make the occurence of IDoc from 1:1 to 1:Unbounded we write as:

<?xml version="1.0" encoding="UTF-8"?><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"><xsd:element name="ZXMATMAS05_CLFMAS02"><xsd:complexType><xsd:sequence><xsd:element name="IDOC" type="ZMATMAS.MATMAS05.ZXMATMAS05_CLFMAS02" maxOccurs="unbounded"/></xsd:sequence></xsd:complexType></xsd:element><xsd:complexType

Notice how the maximum occurence is changed to unbounded, but as you want to make it 0:1, you will write it as:

<?xml version="1.0" encoding="UTF-8"?><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"><xsd:element name="ZXMATMAS05_CLFMAS02"><xsd:complexType><xsd:sequence><xsd:element name="IDOC" type="ZMATMAS.MATMAS05.ZXMATMAS05_CLFMAS02" minOccurs="0" maxOccurs="1"/></xsd:sequence></xsd:complexType></xsd:element><xsd:complexType

If we want to change only the maximum occurence, we need to write in only the maximum occurs as in the first case, but if we want to change the min occurence, we have to write the min occurence as well as the max occurence, even if we are not changing the max occurence.