cancel
Showing results for 
Search instead for 
Did you mean: 

Need the Created by data in the shopping cart

Former Member
0 Kudos

Hi Experts,

I want to fetch the created by in the shopping cart and use it in the BADI BBP_ITEM_CHECK, when I wrote the select statement in the BADI in fetching the Created by from the CRMD_ORDER_H table then I am recieving a dump.

Here is the sample code

DATA: l_wa_messgs TYPE bbp_smessages_badi, "Error Messages

l_message TYPE bapi_msg, "Message Text

t_item TYPE bbp_pds_sc_item_d, "Item Data

c_hier TYPE crmt_item_type_db VALUE 'HIER',"Item Category

DATA : l_guid TYPE bbp_guid,

wa_created_by TYPE comt_created_at_usr.

l_guid = iv_doc_guid.

SELECT SINGLE created_by

FROM crmd_orderadm_h

INTO wa_created_by

WHERE guid = l_guid.

*FM Fetch all the data to a position of a personal favorite

CALL FUNCTION 'BBP_SCFAVO_ITEM_GETDETAIL'

EXPORTING

-


- -


Thanks in advance.

Regards,

Kiran

Accepted Solutions (0)

Answers (1)

Answers (1)

robin_janke
Contributor
0 Kudos
c_hier TYPE crmt_item_type_db VALUE 'HIER',"Item Category

should be:

c_hier TYPE crmt_item_type_db VALUE 'HIER'."Item Category

Notice the dot instead of the comma.

Former Member
0 Kudos

Hi Janke,

Yeah, it is a piece of code I just added here while adding I removed some lines.

Actually I want to know who is the creator of the shopping cart. So I have written a select statement to fetch the Created by record using

DATA : l_guid TYPE bbp_guid,

wa_created_by TYPE comt_created_at_usr.

l_guid = iv_doc_guid.

SELECT SINGLE created_by FROM crmd_orderadm_h INTO wa_created_by WHERE guid = l_guid.

I can use Object type, header GUID, Item GUID, Mode, and messages in my BADI.So I am giving i_guid in the where condition.

When I am giving this code in the BADI I am getting a Dump. Is there any other way that we can find the created_by information or

Is there any function module to fetch the created_by in the shopping cart?

Regards,

Kiran