cancel
Showing results for 
Search instead for 
Did you mean: 

Validation required in sourcing cockpit

Former Member
0 Kudos

Hello All,

We are in need to doing some validations to the PO in the sourcing cockpit (after edit selected drafts is clicked and the po is opened in another tab).

I tried with the DOC_CHECK_BADI (however this gets triggered sometimes only). Also the PO details are not available in the BADI sometimes, which I am not sure about. Is this right BADI to do this validation? Pls advise if you have worked on a similar requirement before. If there is a class to enhance.. which would be the right one for this requirement?

In another note, when does DOC_CHECK_BADI get triggered during PO create/ change? It has to be here... in the Sourcing Cockpit right?? Please let me know.

TIA, Liz

Accepted Solutions (1)

Accepted Solutions (1)

former_member228602
Contributor
0 Kudos

Hello,

     As you would know BBP_DOC_CHECK_BADI and BBP_DOC_CHANGE_BADI both have BO as the filter.

BBP_DOC_CHECK_BADI- Check on Document

BBP_DOC_CHANGE_BADI- Changes to document

In Sourcing cockpit we do not have do any changes to the existing shopping cart contents the changes are held temporarily in cockpit buffers and hence there is no need for the calls to the above BADI.

However the above BADI will be invoked from the follow-on document (PO /RFX/Contract/Auction). But however if you feel it is too late to validate the scenario then i would suggest you have a look at the class /SAPSRM?CL_CH_WD_DOM_SOCO_GAF2. There are loads of methods here where some validations are done. You could alter an existing method or create an implicit enhancement and realize your feature.

Thanks and Regards,

Veera

Former Member
0 Kudos

Hi,

Thanks for your reply. I am ok with the stage at which the DOC_CHECK_BADI is invoked (during the creation of the follow on document - PO in my case.

My issue was that even though I have the guid available in the BADI at runtime, the guid is not able to fetch any details using the FM - BBP_PD_PO_GETDETAIL'. The guid does not correspond to the SC, and so i cannot use the SC_GETDETAIL function module as well.

Its my thinking that since my PO is not created yet, the current PO details are stored in some buffer table. Please advise how to read the PO details from the buffer, given that the PO is not created yet.

Any ideas anyone??

I did see the classes - /SAPSRM/CL_CH_WD_DOM_SOCO_GAF2 & /SAPSRM?CL_CH_WD_DOM_SOCO_GAF3, however these do not get invoked at the time I want to do the validations. We are using these already for supplier validation though at a previous stage.

Thanks for your help! Liz

former_member228602
Contributor
0 Kudos

Hello Liz,

     When you navigate from Sourcing Cockpit step 2 to Step 3 the PO is in draft stage and not created yet. But these values are buffered in the SOCO classes and you do have any FM to fetch these data now. Can you tell me at what stage validation needs to be done and maybe we have an existing code to realize this.

Thanks and Regards,

Veera

Former Member
0 Kudos

Hi Veera,

I got it! Helpful link to fetch the PO details from buffer- https://scn.sap.com/thread/1925994

Thanks again for your help!!

Liz

Answers (1)

Answers (1)

former_member216093
Contributor
0 Kudos

Hi,

I hope following link is helpful.

http://scn.sap.com/thread/1810167

Regards,

Ravi