cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a PO from SC

Former Member
0 Kudos

Hello experts,

I want to initialize some values when SC is converted to PO. I use the BAdI BBP_DOC_CHANGE_BADI. In the method BBP_PO_CHANGE, I want to test if it's a new creating PO or not. If it's a new PO, I will initialize the fields. How can I know if it is a new PO.

Best Regards,

Ruijia

Accepted Solutions (1)

Accepted Solutions (1)

laurent_burtaire
Active Contributor
0 Kudos

Hello Ruija,

a much more easier solution is to simply use IV_MODE import parameter. If IV_MODE = 'C', then you are in creation mode.

Depending on SRM release, if you do not have this import parameter, you can do a SELECT from CRMD_ORDERADM_H table for GUID = IS_HEADER-GUID.

If no entry is found, your are creating the PO.

Regards.

Laurent.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

You can check the PO status and modify the default setting based on that.

Refer the below thread for getting PO status.

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

The status should be "initial" when in creation stage.

With Regards,

Malay