on 08-04-2010 4:46 PM
Hi Guys,
Can any throw some light on this plese, How to supress mandatory (1..Unbound) on Target side.
Great help to me!!
Regards
San
What do you mean by suppressing the mandatory field? Do you mean that if the field is blank, don't send it to target? Please elaborate.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abhi,
You are right. Target side one of the header nodes say A is 0..unbound, to this header node there is one sub node with 1..unbound. This target node(A) has to generate when the souce side has got vlaue to this node, if not this header node (A) shouldn't appear on target side.
Please give me your idea on this!!
Many Thanks
Regards
San
> You are right. Target side one of the header nodes say A is 0..unbound, to this header node there is one sub node with 1..unbound. This target node(A) has to generate when the souce side has got vlaue to this node, if not this header node (A) shouldn't appear on target side.
You need to put conditions on header node A based on source field value.
For example let's say source field is Field1 and based on the value of this field you need to produce the header node A.
So for this do your mapping like this..
IF(WithoutElse) ---> Not ---> Field1 ---> equalS (Empty) ---> Then --->map and empty constant to ---> NodeA.
Apply the same logic to the sub node and map the acutal source field value rather mapping an empty constant as you did above.
>
> San,
> >
> >
> > Refer Sarvesh's reply. In my previous reply, I had meant similar approach.
> >
> >
> > Regards,
> > NeeteshHi Guys,
Please have a look the both structures and give me your idea on this!!
Source
ROOT Complex Type
OUTPUT Element 0..unbounded
TRANS_HEADER Element 0..unbounded
SET_ID Element xsd:string 0..1
H01_XQ Element 0..unbounded
XQ01 Element xsd:string 0..1
XQ_Y2K_D Element xsd:date 0..1
Group_N1 Element 0..unbounded
H02_N1 Element 0..1
N101 Element xsd:string 0..1
Group_LIN Element 0..unbounded
D01_LIN Element 0..unbounded
LIN02 Element xsd:string 0..1
D01_PO4 Element 0..unbounded
P0401 Element xsd:integer 0..1
D01_N9 Element 0..unbounded
N901 Element xsd:string 0..1
Group_ZA Element 0..unbounded
D02_ZA Element 0..unbounded
ZA01 Element xsd:string 0..1
ZA_Y2K_D Element xsd:date 0..1
S01_CTT Element 0..unbounded
CTT01 Element xsd:integer 0..1
Target Structure:
p1:ProductActivityNotification Element
MessageHeader Element 1
ProductActivity Element 1
ValidityPeriod Element 0..1
SubcontractingIndicator Element 0..1
BuyerParty Element 0..1
VendorParty Element 0..1
ProductRecipientParty Element 0..1
InboundDeliveryReference Element 0..unbounded
Item Element 1..unbounded
Item Element 1..unbounded
PromotionSalesTimeSeries Element 0..1
Item Element 1..unbounded
ValidityPeriod Element 1
Quantity Element 1
If ZA01 = 'QS' we need to produce target node "PromotionSalesTimeSeries" else shouldn't.
As Stefan said correctly if nodes are mandatory then there is no meaning to suppress them, they are ment to have some value all the time.
So for your requirement what you can do is, first change the occurrance of ALL mandatory fields to 0.. unbound or 0..1 under "PromotionSalesTimeSeries" node and then use below logic..
IF(WithoutElse) ---> ZA01 ---> equalS (QS) ---> Then ---> ZA01---> PromotionSalesTimeSeries.
> This is for SNC integration. We can't change target messages. These messages are SAP existed content and in SNC SWCV.
The logic which I have given will work for both mandatory and nonmandatory fields. So try it and let us know..
One more thing before you start the testing make sure all mandatory fields are either mapped or disabled otherwise you will get error.
Hi Sarvesh,
The logic which you have explained is not working. The source side field ZA01 is always exist and comes with many type of values like QA,QD,QN,QS etc.,, only thing is if this ZA01 values comes with QS, then only we need to generate target node.
Many Thanks for your support.
Regards
San
only thing is if this ZA01 values comes with QS, then only we need to generate target node.
What should be done when no ZA01 is equal to QS? In that case you have to map the target field with some value (like constant)
IfWithoutElse will fail in this case....use IfWithElse and map the constant to the else part.
The source side field ZA01 is always exist and comes with many type of values like QA,QD,QN,QS etc.,,
Ensure that you set the Context of the source node propperly
Regards,
Abhishek.
Hi Abhi,
The target node is like this
<Promotional Sales Time Series> 0..1
<Item> 1..unbound
<ValidPeriod> 1..1
<StartDate> 0..1
<EndDate> 0..1
<Quantity> 1..1
<UnitCode> optional (Attribute)
The top node i put the conditions like what you said.
if ZA01 = QS , then pass context ZA01 --> PromotinoalSalesTimeSerice, else constant to this .
The same condition applied for <Item>
I did the same thing to <ValidPeriod> and <Quantity> too. There is an error message shows,
/ns0:Messages/ns0:Message1/ns2:ProductActivityNotification/ProductActivity/Item[3]/PromotionSalesTimeSeries/Item/ValidityPeriod. Values missing in queue context. Target XSD requires a value for this element, but the target-field mapping does not create one. Check whether the XML instance is valid for the source XSD, and whether the target-field mapping fulfils the requirement of the target XSD
The If condition is not able to return a value (either out of then or else) ....you can check this by right-click...display queue.
Are you sure that if the then condition is not satisfied, the else part is populated with the constant value properly? Either of the queue should have a valid value.
> The logic which you have explained is not working. The source side field ZA01 is always exist and comes with many type of values like QA,QD,QN,QS etc.,, only thing is if this ZA01 values comes with QS, then only we need to generate target node.
Check this blog:
/people/stefan.grube/blog/2006/01/09/the-use-of-suppress-in-the-xi-30-graphical-mapping-tool
Now the description of your problem is now totally different of what you have written originally.
When you are not able to describe your issue in detail and ask something not relevant, you will not only get no valuable response, you also waste the time of the people trying to answer you.
>
> Hi Sarvesh,
>
> The logic which you have explained is not working. The source side field ZA01 is always exist and comes with many type of values like QA,QD,QN,QS etc.,, only thing is if this ZA01 values comes with QS, then only we need to generate target node.
>
> Many Thanks for your support.
>
> Regards
>
> San
The logic given by me will work but now you are saying something else... So do some small change in the logic and add RemoveContext just after IfWithoutElse output and it will work for sure..
Hi,
You can use the condition to header node saying
if (source field value )->exists->map constant value (use if-then condition for the header node)
Now apply the same condition for the Sub-node with same source fileds value.
Regards,
Sainath Chutke
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
> Can any throw some light on this plese, How to supress mandatory (1..Unbound) on Target side.
When it is mandatory, then you cannot suppress it.
That is why it is mandatory.
Check data type when you want it optional.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.