


*&---------------------------------------------------------------------*
*& Report ZBW_TEST
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT ZBW_TEST.
DATA: p_ymfmdate TYPE i,
lv_temp(8) TYPE c,
p_out TYPE i,
lv_date type sy-datum,
conn TYPE dbcon_name,
conn2 TYPE dbcon_name.
DATA itab TYPE STANDARD TABLE OF dbcon.
*p_ymfmdate = sy-datum.
*p_ymfmdate = sy-datum.
lv_date = sy-datum - 1.
lv_temp = lv_date. "sy-datum.
p_ymfmdate = lv_temp.
p_out = 0.
START-OF-SELECTION.
conn = 'CON1'.
*--Open the Database connection
EXEC SQL.
connect to :conn
ENDEXEC.
IF sy-subrc = 0.
* BREAK-POINT.
ELSE.
MESSAGE 'Error in Opening the connection' TYPE 'E'.
ENDIF.
*--Call the first Procedure
EXEC SQL.
EXECUTE PLB_TEST.DBO.SP_INSERT_EMPLYEE_DATA
ENDEXEC.
IF sy-subrc = 0.
* BREAK-POINT.
ELSE.
MESSAGE 'Error in executing the Procedure' TYPE 'E'.
ENDIF.
*--Close the Database connection
EXEC SQL.
disconnect :conn
ENDEXEC.
IF sy-subrc = 0.
* BREAK-POINT.
ELSE.
MESSAGE 'Error in closing the connection' TYPE 'E'.
ENDIF.
conn2 = 'CON2'.
*--Open the Database connection
EXEC SQL.
connect to :conn2
ENDEXEC.
IF sy-subrc = 0.
* BREAK-POINT.
ELSE.
MESSAGE 'Error in Opening the connection' TYPE 'E'.
ENDIF.
*--Call the Second Procedure
EXEC SQL.
EXECUTE PLB_TEST.DBO.SP_INSERT_EMPLYEE_HIERARCHY(p_ymfmdate)
ENDEXEC.
IF sy-subrc = 0.
* BREAK-POINT.
ELSE.
MESSAGE 'Error in executing the Procedure' TYPE 'E'.
ENDIF.
*--Close the Database connection
EXEC SQL.
disconnect :conn2
ENDEXEC.
IF sy-subrc = 0.
* BREAK-POINT.
ELSE.
MESSAGE 'Error in closing the connection' TYPE 'E'.
ENDIF.

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 36 | |
| 31 | |
| 31 | |
| 28 | |
| 26 | |
| 26 | |
| 20 | |
| 15 | |
| 12 | |
| 11 |