cancel
Showing results for 
Search instead for 
Did you mean: 

bapi or fm to add new card to membership (CRM Loyalty)

murat_kaya
Participant
0 Kudos

Hello experts,

I need to create a report to add new card or cards to memberships from excel file. I looked for BAPI or FM to use but couldn't find any to achieve this. Does anybody have any solution to this matter?

Regards,

Murat Kaya

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

You can use this FM's. First will add Card and Second will save it to DB.

 

CALL FUNCTION 'CRM_LOY_CARD_CREATE'
       EXPORTING
         iv_create_key = 'X'
       IMPORTING
         ev_success    = lv_succ
       CHANGING
         ct_data       = lt_add_loy_cards.
     IF lv_succ NE abap_true.
       EXIT.
     ENDIF.
     CLEAR lv_succ.

     CALL FUNCTION 'CRM_LOY_CARD_SAVE'
       EXPORTING
         iv_update_task = ' '
       IMPORTING
         ev_success     = lv_succ.

BR, Jurijs

ceedee666
Active Contributor
0 Kudos

Hi Murat,

als always in the context of CRM I'd recommend using the BOL objects (ie. Membership and Card) instead of directly calling the underlying API.

Christian

Former Member
0 Kudos

Hi,

BOL is not the "fastest" thing in the world, so if don't care about performance then Christian's idea is fair enough.

BR, Jurijs

ceedee666
Active Contributor
0 Kudos

Hi Jurijs,

in general I don't think performance is a good argument in order not to use a high level API (cf. Premature Optimization).

Christian

Former Member
0 Kudos

Hi Christian,

Try to migrate into the system 5-10 of millions memberships and BP and when you will end up with weeks of migration we will talk about performance

BR, Jurijs