cancel
Showing results for 
Search instead for 
Did you mean: 

free text and catalog items

Former Member
0 Kudos

Hello SRM Experts

How can I implemnt this requirement ?

A Purchase Requisition has been uploaded from backend into SRM and a Shopping Card will be

generated.

The Purchase Requisition will be generated automatically if you create an Plant Maintance Order.

After Approval Process within SRM is the following action is desired.

If the generated Shopping Card has catalog items than choose or call in the BBP_DRIVER_DETERMINE

BADI the class CL_BBP_BS_ADAPTER_PO_CRT_470 for creating a purchase order

else choose in case of free text items CL_BBP_BS_ADAPTER_RQ_CRT_470 (update the Purchase Requistion inside)

in order to update the Purchase Requistion in the backend.

Any help on this would be highly appreciated.

Regards

ertas ilhan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

David before closing this thread do you have an example for

FuBa BBP_PO_CHANGE. It seems quite diffcult.

Regards

ertas

Former Member
0 Kudos

Hi. I have written this straight into this thread, so not 100% sure it is right, but please see below.

You will have to populate the BAPI properly using data from WA_ITEM, but this should get you on the right track.

Regards,

Dave.

Data: wa_item type BBPT_PD_PO_ITEM_ICU.

loop at it_item into wa_item.

call function 'BAPI_REQUISITION_CHANGE' destination {backend r/3 /ecc system}

exporting....

tables......

wa_item-del_ind = 'X'.

modify it_item from wa_item.

endloop.

et_item[] = it_item[].

Former Member
0 Kudos

Just noticed the square brackets turned into a link, html for you.

ET_ITEM needs to equal IT_ITEM, so use the open and close square brackets.

Regards,

Dave.

Answers (2)

Answers (2)

Former Member
0 Kudos

David thx.

I did not understand you very clearly. Can you pls try explain it with some little pseudo

coding

Regards

ertas

Former Member
0 Kudos

Hi. How's this:

1 - Implement BADI BBP_DETERMINE_LOGSYS method DETERMINE_LOGSYS -

2 - Loop at ITEM_DATA

3 - If ITEM_DATA-CATALOGID is not initial then ITEM_DATA-LOGICAL_SYSTEM = Backend R/3 / ECC system

4 - If ITEM_DATA-CATALOGID is initial then ITEM_DATA-LOGICAL_SYSTEM = SRM system

At this point if your shopping cart item is from a catalogue then you will get a backend PO. If it is a free text item you will get a local SRM PO.

5 - Now implement BBP_DOC_CHANGE_BADI method BBP_PO_CHANGE. This will only get called when a local PO is created or changed.

6 - In BBP_DOC_CHANGE_BADI Call function BAPI_REQUISITION_CHANGE destination R/3 / ECC backend to update your requisition.

7 - Also in BBP_DOC_CHANGE_BADI Loop at ET_ITEM and set ET_ITEM-DEL_IND to 'X'.

Basically you have created a dummy SRM PO and used the PO change BADI to change the requisition, and also to delete the dummy PO.

Regards,

Dave.

Former Member
0 Kudos

Hi. I have seen simlar questions before, but never seen a particularly good solution.

I think the problem is that you have to create something once the cart is approved.

Looking at your situation I guess you are using classic scenario that is why you want a backend PO or to update a backend req?

If so, you could try using BADI BBP_DETERMINE_LOGSYS to determine that for the catalogue items you want to send the PO to the backend, but for free text you want to create a local PO.

This will create a local PO in SRM for you.

Then you can try BADI BBP_DOC_CHANGE_BADI to call BAPI BAPI_REQUISITION_CHANGE in the backend and update your req using the data from the SRM PO. In this same BADI in SRM you can set the deletion flag on your local PO which will close down the SRM POs for you.

It is not an ideal solution but it might work.

Regards,

Dave.