cancel
Showing results for 
Search instead for 
Did you mean: 

Question about JDBC Adapter: DML or Store Procedure?

Former Member
0 Kudos

Hi SDNer,

My scenario: RFC--> PI --> MySQL Database

Name of Database:      forSAP

Name of Table:            TableA

Table Structure:          

     - VKORG (Primary Key)

     - KUNNR (Primary Key)

     - ANRED    

     - NAME

     - PSTLZ

     - SPRAS

     - ORT01

     - STRAS

     - TELF1

     - STATUS

Requrirement:

Before writing, the following condition must be checked and the conrresponding behaviour would be executed:

If the dataset does not exit, the new dataset should be inserted and the STATUS is set to N.

If the dataset exits and the STATUS is empty, the dataset would be updated and the STATUS is set to N.

If the dataset exits and the STATUS is with other characters, the dataset should be updated and set the STATUS to U.                

I have read the help doc:

http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/frameset.htm

But I have no idea, how to realise the above requirements. If...Then is allowed in DLM? or it must be implemented through stored proc?

Any idea would be welcome.

Thanks a lot!

Regards

Rene

Accepted Solutions (0)

Answers (1)

Answers (1)

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi Rene,

Ask your DB team to create one more new table in data base and using PI insert data in to new table,then request you DB team write a stored procedure at data base level to insert/update data in to maintable from new table.

Regards.

Raj

Former Member
0 Kudos

Hi Raj,

as I know, PI can run stored proc directly.

So why you suggest to create a new table in Database to save new datas? why not execute SP from Statement directly?

Regards

Rene