2008 Mar 29 10:18 AM
hi all,
I have the following details:
BOR object : INSTLN
Method: createdirect
I need to call the above method in my custom program.
I need to call it entirely. Means if it contains fn modules I dont want to call those fn modules seperately.
hi all,
I have the following details:
BOR object : INSTLN
Method: createdirect
I need to call the above method in my custom program.
I need to call it entirely. Means if it contains fn modules I dont want to call those fn modules seperately.
2008 Mar 29 5:17 PM
Hello
Please note that the business object model is only a semantic model and has absolutely nothing in common with ABAP-OO.
If you call transaction SWO1 with BOR object INSTLN on ECC 6.0 there is a single "method" implemented:
- UtilInstallation.ChangeFacts => implemented by BAPI_UTILINSTALLATION_CHANFACT
Regards
Uwe
2008 Mar 29 10:16 PM
Hi Sammy,
Phil Soady from SAP Australia provided me with this little gem a few years back. The actual documentation for this can be found somewhere in the workflow programming area, but I just looked and couldn't find it for you. Anyway, this is a sample program I built to show how to do this. In this example I call the Display method of the Sales Document BO.
INCLUDE <cntn02>.
INCLUDE <cntn03>.
FUNCTION zcallbomethod.
*"----------------------------------------------------------------------
*"*"Local interface:
*"----------------------------------------------------------------------
* Data declaration
***************************************************
DATA: vbak_ref TYPE swc_object.
* Declare and initialise container
***************************************************
swc_container container.
swc_create_container container.
* Create object reference to sales document
*************************************************
swc_create_object vbak_ref 'VBAK' '0000000009'. "Sales Document Number
* Call Display
***************************************************
swc_call_method vbak_ref 'Display' container.
* Error handling
IF sy-subrc NE 0.
.....
ENDIF.
ENDFUNCTION.
Cheers
Graham Robbo
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |