Skip to Content
0

how to do this condition mapping i am beginner for sap pi

Nov 14, 2017 at 09:27 AM

49

avatar image
Former Member

screenshot-359.png

<Task_Date>

<Qual></Qual>

<Date></Date>

</Task_Date>

Qual 001 should be present always. For Qual 001 always Date should be present. If date is not present then give current date as output. If date is present then the same date should come.

source target

<Task_Date> <Task_Date>

<Qual>001</Qual> <Qual>001</Qual>

<Date></Date> <Date>CurrentDate</Date>

</Task_Date> </Task_Date>

<Task_Date> <Task_Date>

<Qual>001</Qual> <Qual>001</Qual>

<Date>29/08/2016</Date> <Date>29/08/2016</Date>

</Task_Date> </Task_Date>

Qualifier other than 001 is not mandatory. When it is other than 001 then date will be present. Give the same output. Also the first condition should be satisfied as shown in the below example.

source target

<Task_Date> <Task_Date>

<Qual>005</Qual> <Qual>001</Qual>

<Date>05/09/2016</Date> <Date>CurrentDate</Date>

</Task_Date> </Task_Date>

<Task_Date>

<Qual>005</Qual>

<Date>05/09/2016</Date>

</Task_Date>

screenshot-358.png (134.9 kB)
screenshot-359.png (151.9 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Evgeniy Kolmakov Nov 14, 2017 at 11:51 AM
0

Hi Manohar!

Regards, Evgeniy.


Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thank you.

0
avatar image
Former Member Nov 14, 2017 at 10:07 AM
1

Hi Manohar,

If I interpret your requirement correctly (the XML provided does not look like what you really want) I think this is an excellent, easy practice project to get into PI mapping so by asking somebody to spoon-feed it to you, you are wasting an opportunity. You should be able to figure this out yourself with very moderate effort by having a look at the SAP PI standard functions.

Check

  • Const
  • If
  • equalS
  • currentDate
  • TransformDate

If that doesn't get you anywhere, post a screenshot of your attempt and the community will happily help you make any necessary corrections.

Best of luck!

Regards,

Patrick

Show 3 Share
10 |10000 characters needed characters left characters exceeded
Former Member
  • Const
  • If
  • equalS
  • currentDate
  • TransformDate

i implemented all these standard function but i didn't get so i posted screenshot-359.png

screenshot-359.png (151.9 kB)
0

Hi Manohar!

I'd suggest to use Text function EqualsS instead of arithmetic function EqualsA.

Regards, Evgeniy.

0
Former Member
Evgeniy Kolmakov

thank you i got it but in the second scenario i need to create two structure or i need to take duplicated structure. i bit confused in this.

thanks & regards

Manohar s k

0