Creating Service PO's w/ BAPI_PO_CREATE

Question:
Hi,
Does anyone have source code that they are willing to share or help out with some of their knowledge on creating service PO's using BAPI_PO_CREATE?
In the internal table to be passed to the BAPI, I am passing the package number for the line item, another package number for the service line items. The package number used for the service line items is kept in the subpackage number field for the PO Line items in the internal table.
Basically I am using BAPI_PO_GETDETAIL to get details of a service PO created online and then trying to populate the fields in the same way.
However the PO which is created shows very strange behaviour. If I use BAPI_PO_GETDETAIL FM then it returns the Service line items with proper data. However in ME23/ME22 trying to view the created PO results in a 'CONTROL_ERROR' short dump.
If I use ME23N then it shows me all of the relevant details but does not show me the service line items.
Can someone suggest a way out of this? The requirement is quite urgent and all the posts that I have seen on this forum have nothing at all to say about service PO's.
I would also like to say that I have used this to create material PO's withoug any errors but I am facing this error in Service PO's (no material only short text entries) only.
Any help is urgently required and highly appreciated.
[/b]
Answer:
You should use BAPI_PO_CREATE1. Don't mind that it's not released - they recommend it in SAP Notes.
_________________
Best regards, Sergey Korolev

More Articles:

Drill down using ALV?
BDC Recording for Material Master?
selection screen help?
Basic list?
How to modify batch input session's data directly ?
set controlling area for Batchinput (transaction KP06)?