07-04-2012 8:23 AM
Hi Folks,
I am trying to create a Purchase Order (PO) with the reference of Purchase Requisition (PR).
I tried creating the PO through ME21N giving reference of PR and it was working fine. A new PO is created.
Now I am trying to create PO using the bapi BAPI_PO_CREATE1. I passed all the required and same data that I was using for creation of PO in ME21N.
The BAPI gives an error saying "Enter Conf. Control". There is not setting done for Confirmation Control, also I am using the same vendor. Moreover, I was not asked for Conf. Control in ME21N.
I am not sure if I am missing something that is to be passed to the BAPI. Could you please guide me in this?
Thanking you in anticipation.
Regards,
Sud.
07-04-2012 9:34 AM
Dear Sudarshan,
Please check in document type of the PO. Is there any configuration set Conf. Control as mandatory.
Please verify in SPRO > MM > Purchasing > Purchase Order > Define screen layout at document level >
select .....all Create Purchase order options
In each of that > under Deadline Monitoring > select confirmation control key as optional option.
Regards,
Venkat
07-04-2012 9:34 AM
Dear Sudarshan,
Please check in document type of the PO. Is there any configuration set Conf. Control as mandatory.
Please verify in SPRO > MM > Purchasing > Purchase Order > Define screen layout at document level >
select .....all Create Purchase order options
In each of that > under Deadline Monitoring > select confirmation control key as optional option.
Regards,
Venkat
07-04-2012 10:09 AM
Hi Venkat,
Thanks for your response.
I checked in the configuration (path that you mentioned), the Conf Control is already set to Optional.
The system does not ask for Conf Control when I create a PO through ME21N, but when I try to create the PO through BAPI, it requires Conf Control.
Is there any other possibility for this?
Thank you.
Regards,
Sud.
07-04-2012 10:34 AM
Can you try by passing the value in POITEM-CONF_CTRL just for testing and see whether this resolves the issue ..
Also have u passed the data in the Schedule Lines correctly ??? Post ur code as well ..
07-04-2012 11:20 AM
Hi Ramachandran,
I have tried passing the value of POITEM-CONF_CTRL. It is working fine and the PO is created.
But the question here is why the conf control field is considered madatory in BAPI whereas it is optional when creating PO thru ME21N?
The solution you suggested is ofcourse working and can be considered as a workaround for time being, but I wonder why the BAPI is asking for this value, since I do not want to pass it.
Still waiting for a perfect solution, but thanks for the workaround.
Regards,
Sud
07-04-2012 11:33 AM
Good , Now try the following .
You said that when you post via ME21N you do not enter the Confirmation Control key , try posting the data via ME21N , and see once the PO is created whether you have any entry in EKPO-BSTAE
If there is any entry in it it means either of the following,
a. The backend SAP uses some criteria to determine the Confirmation control automatically, and this is not supported in BAPI
b. Any enhancement / BAPI is used to determine the Confirmation Control key (again this is called in ME21N ) but not in your BAPI
Try this and let me know
07-04-2012 7:18 PM
Hi,
Are you not populating an 'X' in POITEMX-CONF_CTRL?
Well not sure this could be so easy, just trying
Cheers,
Manu.
07-05-2012 7:55 AM
Hi Sudarshan,
One Question.
Do you execute this BAPI through SE37 or Do you execute thorugh a ABAP program in SE38?
Secondly, For me I execute this BAPI thrugh a Program by reading necessary data from EXel file and it is working fine. I neither set the flag for CONF_CNTRL nor reading it from file. It is an configuaration set at SPRO as I explained earlier by putting it as optional.
So I would requiest you to revisit that configuration.
Regards,
Venkat
07-05-2012 10:14 AM
Hi Venkat,
Thanks for your response.
I was trying the BAPI thru se37 but then as you suggested I tried it through a program.
But it is still giving the same error for Conf control.
Actually I am trying to create the PO with the reference of PR. So I am passing only the PR number and the PR item number to the BAPI_PO_CREATE1, alongwith the header data.
Does this error has anything to do with Vendor number and its config?
Regards,
Sud.
07-05-2012 10:38 AM
Sudarshan
I just checked the Vendor Master (Purchasing View), in that there is a Tab "Default data Material ( you need to scroll down) " ,there is an option of setting the Confirmation control , can you try and set the value here and try with your BAPI PO for the respective Vendor ??? Just to check here whether this has some effect to our BAPI
07-05-2012 11:08 AM
Also check whether in Purchasing Info Record for the corresponding Vendor/Material/Plant whether the confirmation control key is maintined (EINE-BSTAE)
07-05-2012 11:57 AM
Hi Ramachandran,
I have not maintained Conf Control in Vendor Master since I do not want it.
My question is why the system asks for Conf Control when running through BAPI and does not ask when running through ME21N?
Anyways, I have not maintained a value for Conf Control in the Vendor Master, and therefore the BAPI is not giving any error now. But this is not what I want, I do not want to maintain Conf Control value.
For time being, it is working for me, but I shall still be looking for a definite answer.
I am closing this thread here. Thank you all for your responses.
Regards,
Sud
07-05-2012 12:16 PM
Just for my knowledge, can you answer my question about the values you are populating in POITEMX? are you not passing a 'X' to all fields?
Kr,
Manu.
07-05-2012 12:27 PM
Yes Manu, I am passing value 'X' in POITEMX to all the required fields those are passed through POITEM.
My concern is I do not want to pass any value in POITEM-CONF_CTRL and therefore no value in POITEMX-CONF_CTRL, but the BAPI is asking for it.
The reason I do not want to pass any value in POITEM-CONF_CTRL is because it is not a mandatory field in ME21N and is not asked when I create a PO through ME21N. Then why it is required in the BAPI?
Regards,
Sud.