02-21-2008 1:22 AM
We are writing ABAP program to create PO. There's a class CL_WB2_PO_CREATE doing similar things. We would like to know how to identify the Class is released for customer use. We know that there's a "Release On" field in BAPI attributes which means that it is open for customer use.
Any one use the class already written in the system? Any documentation on using class?
Thanks!
03-04-2008 9:28 AM
Hi,
Check also function module BAPI_PO_CREATE1,
in header there is a field PO_REL_IND.
Regards,
Arek
03-04-2008 9:28 AM
Hi,
Check also function module BAPI_PO_CREATE1,
in header there is a field PO_REL_IND.
Regards,
Arek
03-04-2008 10:30 AM
My concern is whether there is SAP documentation talking about using those class. We know that there is BAPI to create PO. But we wanna try new OO approach to solve problem.
03-04-2008 11:21 AM
Hello Thomas
The Trading Execution Workbench (package WB2B_METHODS) contains many fancy classes which are worth being investigated and used.
However, I am not sure if you are on the right track.
If you look under the hood of BAPI_PO_CREATE1 you will see that the following classes are used:
...
* local data
DATA:
lf_header_currency LIKE tcurc-waers,
* local references
l_messages TYPE mepo_t_messages_bapi,
l_po TYPE REF TO cl_po_header_handle_mm, " Handle of a Purchasing Document
my_handler TYPE REF TO cl_message_handler_mm, " Message Handler
lt_models TYPE mmpur_models,
* local structure
...
If you browse the class library of package ME (Purchasing) you will find another useful class:
CL_PO_ITEM_HANDLE_MM (Item of a Purchasing Document).
I regard the BAPI_PO_CREATE1 as a nice encapsulation of the complexity when creating new purchase orders. Therefore, I would prefer to use the BAPI over the currently available classes.
However, if you deal with existing purchase order the classes will be extremly useful.
Finally, if you make yourself familiar with these two classes ( CL_PO_HEADER_HANDLE_MM & CL_PO_ITEM_HANDLE_MM ) you will understand any BAdI related to purchasing.
Regards
Uwe