cancel
Showing results for 
Search instead for 
Did you mean: 

BADI implementation in SRM

Former Member
0 Kudos

HI,

I have implemented the BADI ZBBP_CREATE_BE_RQ_NEW, and wondering what code I need to put in method FILL_RQ_INTERFACE so that shopping cart number can be transferred to the back-end PR tracking number field ??,

I know that BAPI_REQUISITION_CREATE is called in the back-end ??,

I am not an ABAPer, so any code would be of great help!!

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi rahul,

pls see the below link it wil give you a good view on what you ask.pls chk.

https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=badiimplementationin+SRM&adv=false&sortby=cm_rnd_rankvalue

www.sappress.com/product.cfm?account=&product=H1943 - 35k

help.sap.com/saphelp_srm30/helpdata/en/d7/4c4a16285be742b089cb470daa82ae/content.htm - 9k

regards

karthik

<REMOVED BY MODERATOR>

Edited by: Alvaro Tejada Galindo on Apr 8, 2008 5:07 PM

Former Member
0 Kudos

I guess you will have to implement BBP_SC_TRANSFER_BE, method GET_NUMBER_OR_RANGE. I did this for my requirement.

Code below replaces the requisition number with SC number if number range is RQ and doc type is ISRM

*----


  • Data Declaration

*----


CONSTANTS: c_doctype(4) TYPE c VALUE 'ISRM'.

  • Replace the requisition number with shopping cart number

IF cv_number_range EQ 'RQ' and is_item-be_doc_type NE c_doctype.

SELECT SINGLE object_id FROM crmd_orderadm_h INTO cv_number WHERE

guid = is_item-header.

IF sy-subrc NE 0.

ENDIF.

ENDIF.

Hope this helps.

Thanks,

SKJ

Former Member
0 Kudos

Hi SKJ,

I dont want to replace purchase requistion number with a shopping cart number, but instead I just need to populate the shopping number in the one of field of purchase req eg: tracking number (and there is table field by name REQUISITION_ITEMS-TRACKINGNO inside BAPI_REQUISITION_CREATE in R/3, so I am just confused how to pass this value from SRM BADI BBP_CREATE_BE_RQ_NEW (Implemented with Z)

Thanks

Former Member
0 Kudos

ah! I misunderstood. Here you go...

In method FILL_REQ_INTERFACE, write below code:

SELECT SINGLE object_id

FROM crmd_orderadm_h

INTO lv_trackingno WHERE guid = lv_header.

IF sy-subrc NE 0.

ENDIF.

LOOP AT req_items INTO ls_reqitems WHERE doc_type EQ c_doctype.

ls_reqitems-trackingno = lv_trackingno.

MODIFY req_items FROM ls_reqitems TRANSPORTING trackingno.

endloop

Hope this helps. If it doesnt, then i suggest you to post in SRM forum for more replies.

Thanks,

SKJ

Former Member
0 Kudos

Hi SKJ,

the code you gave might be of help (sorry I m not a professional), but I am assuming we need to make use of paramaeters from BADI method such as IS_SC_DOCUMENT-HEADER to send the necessary data to the back-end BAPI BAPI_REQUESTION_CREATE, I appreciate if you can provide necessary code, I can provide you with more info from these objects.

However I am awarding you points for ur reply earlier.

Thanks