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

Suggestion on Code

Former Member
0 Likes
316

Hi,

here i am doing duplicate name check so for that i used

Function module as

call function 'Z_DUPLICATE_CHECK'

exporting

lv_first = lv_name2

lv_last = lv_name1

lv_email = lv_email_id

  • lv_tel = lv_tel

importing

flag = lv_flag.

if sy-cprog = 'SAPMHTTP'.

zl_bp_head_bspwdcomponent_impl=>zduplicate_check = lv_flag.

zl_bp_head_bpheadoverview_impl=>bp_present = lv_flag.

if lv_flag = 'X'.

ls_et_return-type = 'E'.

ls_et_return-id = 'ZCRM'.

ls_et_return-number = '001'.

ls_et_return-message = 'Business Partner already exists'.

append ls_et_return to et_return.

clear : ls_et_return.

return.

IN Z_Duplicate_check i am writing the coding as

select c~partner into

corresponding fields of table t_final1

from but000 as c

inner join but020 as b on bpartner = cpartner

inner join adr6 as a on aaddrnumber = baddrnumber

where cmc_name1 = lv_last and cmc_name2 = lv_first and a~smtp_addr = lv_email+2(239).

if sy-subrc = 0.

flag = 'X'.

endif.

so but in this case it does not take the flag value as 'X' Even though i am given same names so i want some clarification on this code and what are all the changes i want to do

Regards

Ravi

1 REPLY 1
Read only

Former Member
0 Likes
277

Hi,

It is solved

Regards

Ravi