Application Development and Automation 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: 
Read only

Internal table questions

Former Member
0 Likes
898

Hi All,

How to write the below expression in ABAP,

check, if it_ltap_vb-bwlvs is in internal table it_bwlvs

if yes: continue with First decision.

if no: EXIT.

First Decision,

Secodn Decision.

Please let me know.

Thanks,

KCR

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
851

Hi,

try like this:

<b>

sort it_bwlvs f1.

loop at it_ltap_vb.

read table it_bwlvs with key f1 = it_ltap_vp-f1

binary search.

if sy-subrc = 0.

first condition.

else.

exit.

endif.

</b>

Regards

Shiva

Hi,

try like this:

<b>

sort it_bwlvs f1.

loop at it_ltap_vb.

read table it_bwlvs with key f1 = it_ltap_vp-f1

binary search.

if sy-subrc = 0.

first condition.

else.

exit.

endif.

</b>

Regards

Shiva

7 REPLIES 7
Read only

Former Member
0 Likes
851

Use this code:

read table it_bwlvs with key bwlvs = it_itap_vb-bwlvs.

if sy-subrc eq 0.
* First Decision
else.
* Second Decision
endif.

Read only

0 Likes
851

loop at it_bwlvs where bwlvs = it_ltap_vb-bwlvs.

perform first decision

endloop.

if sy-subrc ne 0.

perform second decision

endif.

Read only

Former Member
0 Likes
852

Hi,

try like this:

<b>

sort it_bwlvs f1.

loop at it_ltap_vb.

read table it_bwlvs with key f1 = it_ltap_vp-f1

binary search.

if sy-subrc = 0.

first condition.

else.

exit.

endif.

</b>

Regards

Shiva

Read only

Former Member
0 Likes
851

loop at it_bwlvs.

read table it_ltap_vb with key bwlvs = it_bwlvs-bwlvs.

if sy-subrc = 0.

<first decision>

endif.

<second dicisson>

endloop.

regards

shiba dutta

Read only

Former Member
0 Likes
851

loop at it_bwlvs.

read table it_ltap_vb with key f eq it_bwlvs-f.

if it_ltap_vb-bwlvs eq it_bwlvs-bwlvs.

perform first decision

else.

exit.

endif.

endloop.

form firstdecision.

................

..............

endform.

form seconddecision.

..................

..............

endform.

Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
851

Hi

You can write the following code for that purpose:

read table it_bwlvs with key bwlvs = it_itap_vb-bwlvs.

if sy-subrc eq 0.

ur First Decision

else.

ue Second Decision

endif.

Regards

kumar

Read only

0 Likes
851

Hi,

U can use the following code:

read table it_bwlvs with key bwlvs = it_itap_vb-bwlvs.

if sy-subrc = 0.

first decision.

else.

second decision.

endif.

Reward if this helps.

Thanks.