cancel
Showing results for 
Search instead for 
Did you mean: 

RFC2JDBC synchronous stored procedure for multiple lines

deva_gembali2
Participant
0 Kudos

Dear Experts.

   I would like to check with the design for RFC <--> JDBC syn stored procedure for multiple lines.

1. RFC designed with table

2. Mapping looks like  (attached)

3. Stored procedure

CREATE DEFINER=`pidbuser`@`%` PROCEDURE `sp_payment_method`(

  IN  p_pay_method            VARCHAR(45),

        IN  p_billing_type VARCHAR(45),

        IN  p_country            VARCHAR(45),

        IN  p_customer                  VARCHAR(45),

        IN  p_datetime                  DATETIME,

        OUT status                      VARCHAR(45))

BEGIN

declare var integer;

SELECT

    COUNT(*)

INTO var FROM

    SAPPI.PAYMENT_METHOD

WHERE

    pay_method = p_pay_method

        AND Billing_type = p_billing_type

        AND country = p_country;

Issue : 1. my scenario is working for single entry only.

           2. if i pass multiple records, not supporting the format.

Kindly let me know , issue with mapping or stored procedure?

Accepted Solutions (1)

Accepted Solutions (1)

former_member191435
Contributor
0 Kudos

Can you please elaborate more on ur issue with mappings screenshot...

try work with change the statement as 0..unbounded and test

Answers (1)

Answers (1)

former_member190293
Active Contributor
0 Kudos

Hi Deva!

One way is to use separate statement for each line:

insert multiple rows with jdbc adapter into a d... | SCN

Another way is redesign stored procedure to accept table parameter and use approach described here:

http://scn.sap.com/thread/3202714

Regards, Evgeniy.