cancel
Showing results for 
Search instead for 
Did you mean: 

Convert Purchase Requisition GUID

Former Member
0 Kudos

Hi,

Is there any function module or class method that converts a Purchase Requistion GUID to the actual number?

Thanks.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Siva,

Yes, it is working fine for me...but, I am concerned because SAP's documentation mentiions that "CONNECTION" is only for internal use. So, that is why I was checking if we have any other option to retrieve actual PR Number from GUID.....may be some method or function module provided by SAP! I was able to find some function modules where SAP convert's actual order number into ordid/guid...but, no luck so far for the reverse!

Also, I think CONNECTION lca is the connection to Live Cache!

Thanks.

Naveen

Former Member
0 Kudos

Hi,

There should not be any problem in using this code.

I have used in couple of programs which is running fine in the production as well.

Do let me know if you need more information.

Regards,

Siva.

Former Member
0 Kudos

Hi Siva,

Thanks for the solution.

I am new to APO side of ABAP......Why do we need to use "CONNECTION lca"? What is "lca"? I tried without the "CONNECTION lca" and it did not retrieve the entry!

Also, SAP "CONNECTION" documentation says it is for Internal Use only. Here is a part of that documentation:

"Addition 4

... CONNECTION {con|(con_syntax)}

Note

This addition is for internal use only.

It cannot be used in application programs

So, is there any other way to do this PR GUID converion to the actual number?

Thanks.

Naveen

Former Member
0 Kudos

Hi,

/sapapo/ordmap is an anchor table in APO. So to retrive the data from these table you need to use 'Connection' in your select statement. The concept behind is similar to acessing a secondary database. Check your entry in the table DBCON to get your connection parameter.

Regards,

SIva.

Former Member
0 Kudos

Hi,

You can use the below code for converting PR GUID to the actual number.

DATA: gv_ordid TYPE /sapapo/ordmap OCCURS 0 WITH HEADER LINE:

  • Fetch the PR number

SELECT * FROM /sapapo/ordmap INTO TABLE gv_ordid

CONNECTION lca

WHERE ordid = <PASS THE ORDERID HERE>

AND r3obj = '1'.

Regards,

Siva.