Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Open SQL for ABAP and MS SQL equivalent code.

Former Member
0 Kudos
128
  • SAP Managed Tags:

can somebody please give open sql for ABAP and MS SQL equivalent code for the following code snippet.

 

EXEC SQL.

SELECT *

INTO :zglhrmm_trans_v

FROM zglhrmm_trans_v

WHERE trans_num = :trans_num

AND UPPER(in_val_01) = :zinVAL01

ENDEXEC.

Points will be rewarded .

Thanks.

1 ACCEPTED SOLUTION

venkateswaran_k
Active Contributor
0 Kudos
73
  • SAP Managed Tags:

You have to have an internal table defined say IT_ZGLHRMM_TRANS

DATA  : IT_ZGLHRMM_TRANS TYPE zglhrmm_trans_v

DATA   lv_zinVAL01, lv_trans_num ......

SELECT *

    FROM zglhrmm_trans_v

    INTO CORRESPONDING FIELDS OF TABLE IT_ZGLHRMM_TRANS

    WHERE

    trans_num = lv_trans_num

   AND UPPER(in_val_01) = lv_zinVAL01

Regards,

Venkat

2 REPLIES 2

venkateswaran_k
Active Contributor
0 Kudos
74
  • SAP Managed Tags:

You have to have an internal table defined say IT_ZGLHRMM_TRANS

DATA  : IT_ZGLHRMM_TRANS TYPE zglhrmm_trans_v

DATA   lv_zinVAL01, lv_trans_num ......

SELECT *

    FROM zglhrmm_trans_v

    INTO CORRESPONDING FIELDS OF TABLE IT_ZGLHRMM_TRANS

    WHERE

    trans_num = lv_trans_num

   AND UPPER(in_val_01) = lv_zinVAL01

Regards,

Venkat

Former Member
0 Kudos
73
  • SAP Managed Tags:

Thanks Venkat. I appreciate your response. It helped me fix the code.