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 a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on 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 a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on 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.



    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 29, 2004 at 03:22 PM

    Sample program with BUS2007

    • This include is required for macros below


    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 a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.