cancel
Showing results for 
Search instead for 
Did you mean: 

Skip unwanted segment - but required?

Former Member
0 Kudos

Hi, if I dont want an Idoc segment to be created in my mapping, that is required (1..9999), what should I do?

Accepted Solutions (1)

Accepted Solutions (1)

Shabarish_Nair
Active Contributor
0 Kudos

<i>Hi, if I dont want an Idoc segment to be created in my mapping, that is required (1..9999), what should I do?</i>

>>>>

in case you never want tht to be created at your target, you can right click that particular node and disable the same.

Former Member
0 Kudos

Hi, its an Idoc to the R/3 system. In we30 the segment is defined as 1..9999) too.

I cant disable the whole segment, its determinated at runtime wheter the segment should be created or not.

Shabarish_Nair
Active Contributor
0 Kudos

<i>I cant disable the whole segment, its determinated at runtime wheter the segment should be created or not.</i>

>>>>

You can handle it in the mapping based on the condition/ requirement when u need to trigger the node.

Provide more details to help you out.

Former Member
0 Kudos

If the source field value = x, the segment should be created, otherwise not.

Former Member
0 Kudos

You could set up a condition based on af context object or X-path (pointing at your segment parent note).

Shabarish_Nair
Active Contributor
0 Kudos

u can handle it in your mapping with createif(http://help.sap.com/saphelp_nw04/helpdata/en/d9/3033f96c79674f90e3ab8d101a595b/content.htm)

Create tht segment only in case the value is x !!!

Shabarish_Nair
Active Contributor
0 Kudos

Rune ref this weblog to help u more on the createif function - https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2792. [original link is broken] [original link is broken] [original link is broken] [original link is broken]

I guess this should sort out your issue

Former Member
0 Kudos

context object or X-path

Is this setup in the config?

If the node is not created while testing in IB: Design I get these messages:

Unable to continue execution

Structure with min!=max without mapping

Shabarish_Nair
Active Contributor
0 Kudos

<i>If the node is not created while testing in IB: Design I get these messages:

Unable to continue execution

Structure with min!=max without mapping</i>

>>>>

well you might need to edit the occurance by importing the XSD. But still i guess the development will fail since that segment is mandatory in R3. Is it a custom development ? then maybe you can ask the ABAP team to make the occurance to 0-unbounded ie to make the segment not mandatory.

Former Member
0 Kudos

If a segment in your back end idoc is mandatory, I think you either need to map a blank constant (when you don't want to use it) og in some way manualy chance the idoc occurence

Regards, Thomas

Answers (4)

Answers (4)

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

You would need to create the segment in the mapping , otherwise the Idoc will error out at the idoc adapter with an idoc attribute meta data error.

What you can do this to map this segemnt to a blank constant. This way, when the Segemnt reaches R3 it will not have a value in it.

Regards,

Bhavesh

former_member184619
Active Contributor
0 Kudos

Hi rune,

Right click that node and select disable

no need to map even.

regards

Sachin

Former Member
0 Kudos

I'm not sure I understand your question (100%) but you could export the XSD - and manually change the occurence to (0..9999) and import it to "imported archive" - and the use this as source in your mapping program.

Best regards, Thomas Nørmark

Former Member
0 Kudos

deleted content

I guess, you can go with Shabz. That is more appropriate in your scenario....

Regards,

Jai Shankar

Message was edited by:

Jai Shankar