on ‎2011 Apr 14 2:07 PM
Hi Everyone,
I am trying to establish how to trace P-card transactions from SRP to ERP.
I have found a common link in the fact that the field "Reference Key" in ERP is the same as "OBJKEY" in the SRP idoc's containing the pcard information.
We have no details of p-card number in erp, and now i am getting a lot of questions about who's transactions are whos in r3.
In SRP, the actual P-card transactions are held in table BBP_PCPOS, but there is no OBJKEY in that table to match against R3. I cannot see how I can make this link between the two parts of the system.
In a simplistic view, i would like to be able to either link the Document number in BBP_PCPOS to a key in the Idocs(that contain the OBJKEY). i assume it wont be that simple!!
Can anyone offer me any guidance??
Many thanks
Request clarification before answering.
HI,
thanks - i am returning results now. It seems that PCard_doc is also a required field. When i complete that, i get results in both PCLOG and PCMOD which tie in with the postings to GL.
Can these functions be called in loops? for example if i wanted to extract all transactions relating to all p-card numbers, could i plant the FM in the middle of a loop and output results to a table?
Many thanks for all your help - it has been most useful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks - this looks great.
I have managed to get in to this function - am am not returning any results, even in our well used production SRP.
Do i need to complete all of the fields in import parameters? is there a wildcard symbol? i tried leaving all blank except for the pcard number, but all of the tables are still show 0 entries - even with a pcard number that has had recent transactions.
Many thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do i need to complete all of the fields in import parameters? is there a wildcard symbol? i tried leaving all blank except for the pcard number, but all of the tables are still show 0 entries - even with a pcard number that has had recent transactions.
You will have to at least provide the mandatory import parameters, pcard number and fiscal year.
But the first thing I'd do is to verify that the p-card transaction is in the table BBP_PCPOS and if you have R/3 relevant information for this p-card.
If this is done in code would it be possible to learn 1) where i go to write the code 2) and maybe a code snippet if possible.
I havent worked with abap before, but code in various other languages.
many thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
this sounds really promising!!!
My apologies, I have not worked with SAP long - how do I call this function?
Many thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just to test if this approach actually works, do a single test for this function. So -
1. Get to the entry in table BBP_PCPOS for your P-card: SE16; enter "BBP_PCPOS" and display; search with your P-card ID. Display the entry detail by double clicking it.
2. SE37; enter FM name BBP_PCSTAT_GETDETAIL; Display; F8 (single test); enter P-card information in the "Import parameters" section. F8 (execute FM)
3. Examine PCLOG entry and locate the R/3 information in your R/3 system
To call the FM programmatically, you can write in ABAP with the following pattern:
call function 'BBP_PCSTAT_GETDETAIL'
exporting
pcard_doc =
fisc_year =
* XPC_LINE = 'X'
* PC_LINE =
* XPC_TOT = ' '
* BBPPCINS =
* PCNUM =
* PCNAME =
* PCSTATUS =
* IMPORTING
* PCGEN =
* PCTOT =
* TABLES
* PCPOS =
* PCLOG =
* PCTAX =
* PCMOD =
* RETURN =
.
In SRP, the actual P-card transactions are held in table BBP_PCPOS, but there is no OBJKEY in that table to match against R3. I cannot see how I can make this link between the two parts of the system.
Once you identify the entry in bbp_pcpos table for your p-card, call FM BBP_PCSTAT_GETDETAIL and get the return table PCLOG. In this return table, you will find the R3 PO number in "PO_NUMBER" field and other R/3 related information.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.