cancel
Showing results for 
Search instead for 
Did you mean: 

SAP CRM: Trade Promotion

Former Member
0 Kudos

Hello everyone,

I have to create Trade Promotions using Inbound Idocs. I am using the class cl_crm_mktpl_appl_base to create the promotions.

I have to add dates, products and trade spend values to the promotions.

I have been using the method DATE_ASSIGN_CREATE to add the dates. The sy-subrc is 0 and the update debugger has also been triggered. But the dates are not added in the date CRMD_MKTPL_DATE. I also cannot see the dates in the webui. Below is a sample of my codes.

ls_date-project_guid = lv_guid.

ls_date-date_id = '0'.

ls_date-start_date = '20140401220000'.

ls_date-end_date   = '20141231220000'.

ls_date-object_class = 'TP'.

lo_data->date_assign_create(

  EXPORTING

    im_mktelement_guid = lv_guid    " Project Planning: 16-Character GUID for Projects and Activts

*    im_date_in         = ls_date     " Additional date ranges internal format

*    im_date_ex         =     " Additional date ranges external format

    im_date            = ls_date    " Additional date ranges related to a marketing project

  EXCEPTIONS

    create_failed      = 1

    OTHERS             = 2

).

IF sy-subrc EQ 0.

  lo_data->save_and_commit( ).

ENDIF.

Can anyone help me on this issue?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Finally it worked.

We must use the parameter im_date_in.

But first we must do read on the dates DATE_ASSIGN_READ.

Then use the retrieve data, and add the dates we have to add and the use DATE_ASSIGN_CHANGE to add the values.

Thanks anyway.

Answers (0)