Skip to Content
avatar image
Former Member

How to submit CR through program

Hi,

I need to create CR through program , I have written code for creation of CR (in this case CR is created but not submitted and workflow is not triggering). How do this

Regards,

Sri

Add comment
10|10000 characters needed characters exceeded

  • Former Member

    Hi,

    I am new to MDG and Try to create a CR through program but I am unable to submit those CR. CR is created but stuck in draft mode. I have Used IF_USMD_CONV_SOM_GOV_API interface to create .

    Can you please guide me how to submit a CR through program.

  • Get RSS Feed

4 Answers

  • Best Answer
    Jun 26, 2017 at 09:41 AM

    Creating a CR programatically requires a few steps:

    (LO_GOV_API Type Ref To IF_USMD_GOV_API)

    1. Create the CR

    try.
    lv_crequest_id = lo_gov_api->create_crequest( iv_crequest_type = iv_crequest_type
    iv_description = iv_description ).

    lo_gov_api->enqueue_crequest( exporting iv_crequest_id = lv_crequest_id ).
    catch cx_usmd_gov_api.
    endtry.

    2. Fill the Data

    Can use the various methods of LO_GOV_API to do this (i.e. create_data_reference, if_usmd_gov_api_entity~create_entity_tmp_key, enqueue_entity, write_entity, dequeue_entity, dequeue_crequest)

    3. Start the Workflow

    Once you've done this (assuming you have from the question) you then use the following method to kick the workflow off:

    lo_gov_api->start_workflow( iv_crequest_id = lv_crequest_id ).

    commit work and wait.

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 16, 2017 at 06:18 AM

    Hi Sri,

    Which api class you are using to create.

    Thank you

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 16, 2017 at 12:27 PM
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 28, 2017 at 11:19 AM

    Hi,

    I am new to MDG and Try to create a CR through program but I am unable to submit those CR. CR is created but stuck in draft mode. I have Used IF_USMD_CONV_SOM_GOV_API interface to create .

    Can you please guide me how to submit a CR through program.

    Add comment
    10|10000 characters needed characters exceeded