cancel
Showing results for 
Search instead for 
Did you mean: 

Default PO order type before Number range assigned - BADI/Enhancement

Former Member
0 Kudos

Good day

We are currently wanting to do a validation just before the PO is sent to ECC. We are looking for an enhancement or BADI that could be used just before the number is assigned to the order. We want to velidate the order type, and the order type determines our order number range. So we need to check before the number is assigned to the PO for the XML.

Thanks

Regards

Wesley

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi All

Just for anyone else who is wanting to know where to implement this, you need to change/validate the ECC order type in SRM before the number range is determined (the new PO number is added to the XML and depending on the Order type a different number range is used). We used the following to do the code in an enhancement point:

Class/Interface: CL_BBP_SC_TRANSFER_SOURCING

Method : INIT_SC_DATA

Regards

Wesley

Answers (2)

Answers (2)

former_member216093
Contributor
0 Kudos

Hi Wesley,

Can you please let us know if it is classic or extended classic scenario?

In classic scenario, the PO will be generated in ECC but in extended classic the leading PO will be generated in SRM and therefore the solution will differ.

Regards,

Ravi Pachauri

Former Member
0 Kudos

Hi Ravi

It is a classic scenario.

Regards

Wesley

former_member216093
Contributor
0 Kudos

Hi Wesley,

In that case you need solution on ECC side and BADI ME_PROCESS_PO_CUST with the method PROCESS_HEADER can be implemented for your requirements.

Here you can call vendor tables to find the comms method (e.g XML etc) to decide on PO document type as ECC will hold the PO and not SRM.

We also had similar requirements and have same solution in place.

Regards,

Ravi Pachauri

Former Member
0 Kudos

Thanks Ravi

But my only issue is that when I look at the XML in sxmb_moni on SRM side the PO document number (the number that will be created in ECC) is already assigned to the XML. The XML then goes through XI and arrives in ECC. The XML is processed and the PO is generated used the PO details on the XML . This includes the PO document number. So this tells me that SRM is assigning the document number for the PO that will be created in the ECC backend.

No what we want to validate is that the correct order type has been selected. Based on order type the document number range is specified. So if I only validate in ECC we cannot change the document number as it is already assigned in SRM which means we cannot change the PO order type.

Just to answer the next question, the PO is created in ECC and only ECC, SRM does not carry the PO. So it is the a scenario where SRM has the originating PO document and then ECC gets a copy. ECC has the only PO document, but the order number is assigned in SRM prior to the XML being generated.

I assume then that this is not standard functionality by what you said?

Regards

Wesley

former_member216093
Contributor
0 Kudos

Hi Wesley,

Your last para has confused me. Can you check in which system you can change the PO and take the output of the PO.

If the answer is SRM then you need to have another transaction type for PO and same number range which is assigned to the other PO document type in ECC.

In such case, you need to change the transaction type of the PO based on the validation which will create different PO type in ECC.

Regards,

Ravi

Former Member
0 Kudos

Hi

I can change the PO in ECC and the output to the supplier is in ECC.

The number range for the PO is defined in ECC, but an external number range is configured in SRM. The external number range in ECC is the same as the ECC number range where the PO physically sites on table EKKO and EKPO.

Regards

Wesley

former_member216093
Contributor
0 Kudos

Hi,

Can you please test one thing, place a break point in ECC BADI ME_PROCESS_PO_CUST and create the shopping cart. Check if system takes you to this BADI.

At that time, check the shopping cart if the PO has already been generated in SRM.

Please confirm the results.

Regards,

Ravi

aromalr
Active Participant
0 Kudos

Hi, In the fm BBP_BID_TRANSFERED_PO_CREATE, there is a subroutine call  map_quot_sc. It will guide you to an include  LBBP_BID_INVA15. If you put and implicit enhancement spot and do the valiation and pass lv_abort then it should work. Try it out.


Aromal

aromalr
Active Participant
0 Kudos

Hi, In Classic it will allow you to create PO on single document type eventhough it ask for a POPUP to select the PO document type. You can also change document type as per your logic and create a PO( in backend ECC) based on the selected document type using the implicit spot I mentioned above.


Aromal Raveendran

former_member183379
Contributor
0 Kudos

Hi Wesley

Try BADI ME_PROCESS_PO_CUST.

Regards,

BHG

Former Member
0 Kudos

HI

This is on the ECC side. We need it on the SRM side. The PO number is assigned on SRM before the XML is generated.

Regards

Wesley

former_member183379
Contributor
0 Kudos

Wesley,

Having limited knowledge wrt SRM,

Check with  BBP_CREATE_BE_PO_NEW.

Reg,

BHG

Former Member
0 Kudos

Hi

We tried this - we put an infinite loop, and it was never hit, need some other options earlier in the process.

Thanks

Regards

Wesley

aromalr
Active Participant
0 Kudos

Hi, Can you check the fm BBP_BID_TRANSFERED_PO_CREATE and try to fail the PO creation from this FM, I think it will go through. Regards Aromal R