Skip to Content

Objects Question

Is it possible to access a business object within an abap program?

For example, can I use BUS2007 within an program and not use workflow?

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Jan 27, 2004 at 02:13 PM

    Yes you can call the often underlying function module. Click on the methods an you will see the function module name...

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Jan 29, 2004 at 02:20 PM

    You can also use the methods etc. direct in Reports:

    Implement Include . Then you have several macros available:

    swc_create_object ls_object_equi

    'EQUI' cg_key.

    swc_set_element method_container

    'Objektreferenz' ls_object_equi.

    swc_create_object ls_object_BUS1022

    'BUS1022' cg_key.

    swc_call_method ls_object_bus1022

    'CREATEBRIGHT' method_container.

    Regards,

    Martin

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 29, 2004 at 03:22 PM

    Sample program with BUS2007

    • This include is required for macros below

    INCLUDE .

    DATA: w_tcode TYPE sy-tcode.

    • Object and object key variables

    DATA: w_objct TYPE swc_object,

    w_objky TYPE swo_typeid.

    • Create object - always fill entire key before

    w_objky = aufk-aufnr.

    swc_create_object w_objct 'BUS2007' w_objky.

    • Declare container

    swc_container w_contr.

    • Create container

    swc_create_container w_contr.

    • Call a method of object without parameters

    swc_call_method w_cycle 'Display' w_contr.

    • Call method with parameter - begin with filling container with parameters

    w_tcode = 'IW31'.

    swc_set_element w_contr 'TransactionCode' w_tcode.

    swc_call_method w_objct 'Create' w_contr.

    Add comment
    10|10000 characters needed characters exceeded