cancel
Showing results for 
Search instead for 
Did you mean: 

BBP_CREATE_BE_RQ_NEW

Former Member
0 Kudos

Hello,

I have a problem in order to implement this Badi : BBP_CREATE_BE_RQ_NEW

IF_EX_BBP_CREATE_BE_RQ_NEW~FILL_RQ_INTERFACE,

I must value fields custom on the eban from SRM.

someone has an example ??

thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member183819
Active Contributor
0 Kudos

Hi

Please see some sample pieces on BADI's

https://www.sdn.sap.com/irj/scn/wiki?path=/display/srm/documentation and go to sample BADI's

Using Business Add-In BBP_CREATE_BE_RQ_NEW you can change all the data that is transferred to the backend system for generation of a requirement. This includes, for example, item data, account assignment data, and texts. You can access all the shopping cart data in the method FILL_RQ_INTERFACE for generation of the backend reservation via the BAPI BAPI_REQUISITION_CREATE.

Documentation

method IF_EX_BBP_CREATE_BE_RQ_NEW~FILL_RQ_INTERFACE.

CS_CTRL_ATT-TRANSFER_ACTIVE = 'X'.

endmethod.

How to debug SRM BBP_CREATE_BE_RQ_NEW?

Debug Function BBP_PD_SC_TRANSFER_INTERNAL OR Function BBP_REQREQ_TRANSFER (Transaction SE37, press the test button, Get the GUID number from bbp_pd transaction)

Breakpoint at LBBP_PD_SCF0J PERFORM delete_not_tansferable_items - delete all lines from ET_STATUS[] ( if you use function BBP_PD_SC_TRANSFER_INTERNAL )

Breakpoint at you BADI Implementation

Breakpoint at Class CL_BBP_BS_ADAPTER_RQ_CRT_470->CREATE_DOCUMENT Statement CALL FUNCTION 'BAPI_REQUISITION_CREATE'

How to Send Custom Fields to backend PR?

BADI Parameter cs_rq_document-it_extensionin is used to send the custom field to backend PO

lh_extensionin-structure = 'BAPI_TE_REQUISITION_ITEM'.

lh_req_ext-preq_item = <lh_cs_item>-preq_item.

lh_req_ext-yourcustomfield = lh_header-exceptioncode.

lh_extensionin-valuepart1 = lh_req_ext.

append lh_extensionin to <lt_extensionin>.

lh_extensionin-structure = 'BAPI_TE_REQUISITION_ACCOUNT'.

lh_req_acc_ext-preq_item = <lh_cs_item>-preq_item.

lh_req_acc_ext-serial_no = lh_cs_account-serial_no.

lh_req_acc_ext-yourcustomfield = lh_account-zzloca.

lh_extensionin-valuepart1 = lh_req_acc_ext.

append lh_extensionin to <lt_extensionin>.

(Debug BAPI_REQUISITION_CREATE to get exact idea about your valuepart structures)

Purchase Requisition in Backend System

Using Business Add-In BBP_CREATE_BE_RQ_NEW you can change all the data that is transferred to the backend system for generation of a requirement. This includes, for example, item data, account assignment data, and texts. You can access all the shopping cart data in the method FILL_RQ_INTERFACEfor generation of the backend reservation via the BAPI BAPI_REQUISITION_CREATE.

Standard settings

The settings for this BAdI override those of BAdI Grouping of Shopping Cart Items for Follow-on Documents (BBP_BS_GROUP_BE). BBP_CREATE_BE_RQ_NEW is called up following call-up of BBP_BS_GROUP_BE and shortly before the documents are created in the backend.

Recommendation

If you use BAdI Group Shopping Cart Items to Follow-on Documents in order to determine number ranges, assign numbers, or to group requirements, SAP recommends that you do not overwrite this data with BBP_BS_GROUP_BE.

regards

Muthu

Former Member
0 Kudos

ok thanks,

my problem is use this code :

definition this lh_req_ext ?? and <lh_cs_item>-preq_item ?? ?

lh_extensionin-structure = 'BAPI_TE_REQUISITION_ITEM'.

lh_req_ext-preq_item = <lh_cs_item>-preq_item.                       ???
lh_req_ext-yourcustomfield = lh_header-exceptioncode.
lh_extensionin-valuepart1 = lh_req_ext.

append lh_extensionin to <lt_extensionin>.

lh_extensionin-structure = 'BAPI_TE_REQUISITION_ACCOUNT'.

lh_req_acc_ext-preq_item = <lh_cs_item>-preq_item.
lh_req_acc_ext-serial_no = lh_cs_account-serial_no.
lh_req_acc_ext-yourcustomfield = lh_account-zzloca.
lh_extensionin-valuepart1 = lh_req_acc_ext.

append lh_extensionin to <lt_extensionin>.

thanks ..