cancel
Showing results for 
Search instead for 
Did you mean: 

SUBMIT a CR Programatically Via Convenance API if_usmd_conv_som_gov_api

viplove_patley
Discoverer
0 Kudos

Hi,

I am Creating a CR Programatically Via Convenance API if_usmd_conv_som_gov_api through which i am able to create a CR in Draft mode but i am unable to SUBMIT the CR Programatically.Need Urgent Inputs on this issue, Attaching code sample.

TRY.
g_crequest_data-usmd_crequest = gv_crequest.
g_crequest_data-usmd_creq_type = 'VENDR01'.
READ TABLE lt_xml_info2
INTO lwa_xml_info2
WITH KEY cname = 'SUPPLIER_NO'.
IF sy-subrc = 0.
CONCATENATE 'Vendor_' lwa_xml_info2-cvalue INTO g_crequest_data-usmd_creq_text.
ENDIF.

go_mdg_conv->write_crequest( is_crequest_data = g_crequest_data ).
CATCH cx_usmd_gov_api_core_error INTO go_error. "
g_error_string = go_error->get_text( ).
CATCH cx_usmd_gov_api INTO go_error. "
g_error_string = go_error->get_text( ).
ENDTRY.

* Save
TRY.
go_mdg_conv->save( ).
CATCH cx_usmd_gov_api_core_error INTO go_error. "
g_error_string = go_error->get_text( ).
CATCH cx_usmd_gov_api INTO go_error. "
g_error_string = go_error->get_text( ).
ENDTRY.

TRY .
go_mdg_conv->dequeue_entity_all( ).
go_mdg_conv->dequeue_crequest( ).
CATCH cx_usmd_gov_api. "
ENDTRY.

go_mdg_conv->complete_wf_step( iv_action_id = '09').
* CATCH cx_usmd_gov_api_core_error. "

Mark63
Product and Topic Expert
Product and Topic Expert
0 Kudos

As this relates to MDG, please use tag "SAP Master Data Governance".

Accepted Solutions (0)

Answers (2)

Answers (2)

dneu
Discoverer
0 Kudos

better late then never:

before calling the save method call set_action and set action to any value except empty

Former Member
0 Kudos

Hi,

I am also facing the same issue please let me know if you get the solution for the same.

.