cancel
Showing results for 
Search instead for 
Did you mean: 

Function module for submitting order in CRM B2B

former_member192283
Participant
0 Kudos

Hi Experts,

we are customizing the CRM B2B functionality. as per our reqruirement, we have 3 types of orders (docuemnts) to submit. for each order we have differnt extra fields data need to be sent to the back end system in the Header level and item level.

In this case still we can not use the standard function module to submit the document.

need to use the same standard functiona module or need to create the z function module for submitting all three orders.

Please advice.

I have another question. What the standard functiona module name for submitting the order?

Adavance Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

HI

We need not create any custom FM to send in extension data. Just extend the class which is called on save and overirde the

customer exits available there.

From the sales document object get header and itemlist.

ItemList itemsData = salesDocument.getItems();

HeaderData header = salesDocument.getHeaderData();

header.addExtensionData();

ItemSalesDoc[] items = itemsData.toArray();

for (int k = 0; k < items.length; k++) {

ItemSalesDoc item = new ItemSalesDoc();

item = items[k];

item.addExtensionData();

}

The header and item extension datas will be available in the respective place holders in the methods in BADI

CRM_ISA_BASKET_ITEMS CHANGEITEMS_BEFORE_ORDER IT_EXTENSION

CRM_ISA_BASKET_HEAD CHANGEHEAD_BEFORE_IL IT_EXTENSION

The method name and place holder in backend also given above.

Hope this helps

Regards

Antony

mark_foley
Active Contributor
0 Kudos

Hello Guru,

You can see some information on this in the development and extension guide,

Order

Function module Business object

CRM_ISA_BASKET_GETITEMS ItemSalesDoc

CRM_ISA_BASKET_CHANGEITEMS ItemSalesDoc

CRM_ISA_BASKET_GETHEAD HeaderSalesDoc

CRM_ISA_BASKET_CHANGEHEAD HeaderSalesDoc

CRM_ISA_BASKET_STATUS HeaderSalesDoc ItemSalesDoc

CRM_ISA_SALESDOC_GETLIST OrderStatus

CRM_ISA_BASKET_STATUS_ENH OrderStatus

Table 49: CRM - Supported Function Module / Business Object

Regards

Mark

former_member192283
Participant
0 Kudos

Mark ,

Thanks for the reply and valid information.

Can you explain little bit about how the customizations or Extension data will be passed to the standard fucntion module when the order submits.

Advance thanks

mark_foley
Active Contributor
0 Kudos

Hello,

Please see page 56 of the development and extension guide this deals with the topic of Storing Extension Data in an Existing Business Object.

This shold assist on this issue.

Mark

Former Member
0 Kudos

Hello Guru,

The below are some examples

isaBOM.getBasket().addExtensionData(u2018extHeaderDatau2019, extBasketHeaderData);

String extBasketHeaderData =

(String)isaBOM.getBasket().getExtensionData(u2018extHeaderDatau2019);

getExtensionDataValues() --Retrieves all extension data associated

with the Business Object.

removeExtensionData(Object key) ---Removes extension data from the

Business Object.

Regards,

Shanto Aloor

former_member192283
Participant
0 Kudos

shanto aloor ,

Thnaks for ther reply and information.

Can you clarify one point.

Do we need to use or create any custom function module for all the customer extension fields in Header and Item level for submitting or receving the order from back end or still we can rely on the standard function module only.

Thanks