Well, this time I would like to share this tip to create a service interface to retrieve data from Database with SAP PO/PI.
When you develop the message types to get SQL data you must to check the names and the structure of the Data Types, for example, this is a simple structure to do this query:
SELECT VC_PEDIMENTO, INVNUM, VC_PRC_FILE_FLG FROM MYTABLE WHERE (INVNUM='4900005421')
For the request sender message type you can write your own structure with any label names: