Skip to Content
0
Former Member
Feb 25, 2009 at 09:54 AM

Problem about creating bp in tcode: cic0

83 Views

Hi all,

I have developed function module that check bp role before saving new bp

and add in tcode BUS7>DCHCK

I create new bp in tcode bp, it works. I can create new bp (person organization) by selecting role before saving.

And if I create new bp but do not select role when click save button it will show error message that I write in function module.

If I create new bp in tcode cic0, it does not work. When I click button create new bp in cic0, it link to Create Organization screen. Then I want to create new bp(person) and click button create new person, suddenly it will show error message that I write in fm although I do not click save button.

The function module that i developed is: Z_CRM_BUPA_ROLECHECK

FUNCTION Z_CRM_BUPA_ROLECHECK.

*"----


""Local interface:

*"----


DATA:

lt_role LIKE bus0rltyp OCCURS 0,

lw_role TYPE bus0rltyp,

lv_partner TYPE but000-partner,

flag_x TYPE c,

lc_data TYPE bussdi3-data.

DATA: BEGIN OF t_role OCCURS 0,

rltyp TYPE bu_rltyp,

END OF t_role.

CALL FUNCTION 'BUP_BUPA_BUT000_GET'

IMPORTING

e_data = lc_data.

  • Get BP No.

MOVE lc_data+3(10) TO lv_partner.

SELECT rltyp

FROM but100

INTO TABLE t_role

WHERE partner = lv_partner.

READ TABLE t_role INDEX 1.

IF sy-subrc <> 0.

  • Determine Role

CALL FUNCTION 'BUS_PARAMETERS_ISSTA_GET'

TABLES

t_rltyp = lt_role.

READ TABLE lt_role INTO lw_role INDEX 1.

IF lw_role-rltyp = '000000'.

MESSAGE e000(zbp).

EXIT.

ENDIF.

ENDIF.

ENDFUNCTION.

I would like to know how to solve this issue. Are there any bugs in this FM or I have to config anythings else?

Thank you