on 11-14-2012 12:18 PM
Hi Experts,
We have a scenario wherein we need to set a default value in PO only incase the PO-CHange Badi is called very first time, so as to pass SCs value into PO.
After that a separate logic will be used to default incase again the PO change BAdi is called next time.
Please suggest if their is any way we can find if the PO has just been created out of SC fo rthe first itme.
Thanks in advance.
With Regards,
Gaurav Gupta
Hi,
If you want to know if the badi is called the first time check the parameter IV_MODE. If the value of this parameter is C then is the first time, the next times the badi is called the value changes to U, even if you are in creation mode and the PO doesn't exit in the database.
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gaurav,
You can use the following logic.
Use FM BBP_PD_PO_GETDETAIL. Then provide the PO number/GUID as an import parameter and under E_HEADER (export parameter), get the value of VERSION_NO. If VERSION_NO = '1', it would imply that the PO has just been created from the SC.
Cheers,
Nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nikhil,
Thanks for your valuable info, but I checked for the version and it is coming blank.
Be it if the PO is created out of SC and PO going in saved state or be it in awaiting approval state, the Version No is blank in both cases.
Both in E_HEADER as well as in E_VERSION the version no is blank.
Looking forward to your response. Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.