cancel
Showing results for 
Search instead for 
Did you mean: 

Object ID from GUID

Former Member
0 Kudos

Hello Gurus..!!

I have a BADI implemented for Ammendment form (Definition CRM_SERVICE_WEBREQ). The Ammendment form is a page in BSP which has 2 buttons GET_INFO and SUBMIT. The page has different fields relative to a Contract document. When a use enters the Document number he click on the button GET_INFO and all the relevant details are populated in the rest of the fields.

the user make some changes, if any, in changeble fields and should press SUBMIT in order to retain the changed values.

According to the current functionality upon pressing the SUBMIT button and ammendment form number is generated which is displayed onto a new page. User wants this number to be printed on the same page where the buttons are located.

When I debug the implementation of this BADI the method in which this genearation of new ID take place in the form FORM_ON_EVENT. But only a GUID is created in this using the function module CRM_WR_INIT_ORDER. I do not get the Object Id associated with this GUID.

Please suggest what can be done in orde rto capture the ammendment form document number..!!

Thanks in Advance..

-Smita

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Smita,

All transaction in CRM are saved (at least, the header data) in table CRMD_ORDERADM_H. If you query that table CRMD_ORDERADM_H-guid = <the guid you received in that form> you'll get back a record containing the field OBJECT_ID. That is the object ID of your transaction.

Of course a direct query on a table is not a nice way of working....! Through FM CRM_ORDER_READ you can also pass the GUID in the ORDERADM_H structure, execute the FM and in that same ORDERADM_H structure you'll see that the OBJECT_ID is also filled in with the object id of your transaction. There might also be 'lighter' FM that ONLY return the number because the CRM_ORDER_READ really reads ALL the data of your transaction. (and thus slower and less performant)

Hope this helps,

Reward points if useful!

Regards,

Joost

Former Member
0 Kudos

the object id is not created until the method is quit and goes for PF_stat_close methods...to commit to the database..I do not get the object id at that moment..