Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

IDoc to JDBC scenario - UDF

Hi,

Hope you all are doing well. I have an IDoc to JDBC scenario. The IDoc structure is as follows:

<IDOC BEGIN="1">

<Structure 1>

<DEFINITION>xxxx</DEFINITION>

<CREATE_DATE>20070706</CREATE_DATE>

</Structure 1 SEGMENT="1">

<Structure 2>

<ELEMENT>xxx1</ELEMENT>

<CREATE_DATE>20070719</CREATE_DATE>

</Structure 2>

<Structure 2>

<ELEMENT>xxx2</ELEMENT>

<CREATE_DATE>20070719</CREATE_DATE>

</Structure 2>

<Structure 3>

<ELEMENT>xxx1</ELEMENT>

<PROJECT>yyyy1</DEFINITION>

</Structure 3>

<Structure 3>

<ELEMENT>xxx1</ELEMENT>

<PROJECT>yyyy2</PROJECT>

</Structure 3>

<Structure 3>

<ELEMENT>xxx2</ELEMENT>

<PROJECT>yyyy3</DEFINITION>

</Structure 3>

<Structure 3>

<ELEMENT>xxx2</ELEMENT>

<PROJECT>yyyy4</PROJECT>

</Structure 3>

</IDOC>

Structures 1, 2 and 3 are at the same level/hierarchy in the IDoc. Structure 3 contains the project name of records in structure 2. The requirement is that if the records in structure 2 have the create date as the current date then the corresponding project in structure 3 has to be passed on to the database by creating a statement. To do this, we need to check the date of the record in structure 2 and if the date is equal to the current date then we have to use the element in structure 2 to select the corresponding rows in structure 3 to be passed on to the database. The INSERT statements have to be created for each of the rows of Structure 3 to be passed on to the database.

How do I achieve this?

I tried using node and text standard functions functions but was unable to achive the objective. Can I use UDF to read the IDoc structures and determine the statements?

regards

Debansu

Former Member
Not what you were looking for? View more on this topic or Ask a question