Skip to Content
avatar image
Former Member

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

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)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Nov 14, 2017 at 11:51 AM

    Hi Manohar!

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded

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

    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

    Add comment
    10|10000 characters needed characters exceeded

    • 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