cancel
Showing results for 
Search instead for 
Did you mean: 

Pegging extract

Former Member
0 Kudos

Hi,

I need to extract all pegging results from live cache. for that i am using Functional moule /SAPAPO/EFPL_ORD_NET_GET

but i am not sure which field i need to pass. it got somany import parameters.

I_SIMVERID - 000

I_SIMSESSID - JSBYBWNZHLTX00004EVGR0 ( created by using FM /SAPAPO/RRP_SIMSESSION_CREATE )

I_CAPREQ_TAB - ?

I_ORDERS_TAB - Need to pass all the fields

I_RESOURCES_TAB - ?

I_PEGIDS_TAB - ?

Please help me with some example datas

Regards

Rajesh

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Rajesh,

please refer the reply from me in the link below.

Regards,

Saurabh

Former Member
0 Kudos

Thanks saurabh..

i am passing following datas..

I_SIMVERID = 000

I_SIMSESSID = JSBYBWNZHLTX00004EVGR0 ( created by using FM /SAPAPO/RRP_SIMSESSION_CREATE )

I_ORDERS_TAB = CHAR22 GUID of any order like planned/sales order/pur.req..

but order ID when i see in table its CHAR32 GUID .. for example 4DBA4D53A521183BE100000010EE506C

but you mentioned its 22 CHAR.... can you help me on that..

and when i pass above import parameters i am not getting anything in export parameters.......

I am suspecting session id may be wrong?. what will be the issue?

regards

Rajesh

Former Member
0 Kudos

Hi Rajesh,

In my system, I can see the ORDID field in the import parameter table I_ORDERS_TAB with data element /SAPAPO/OM_ORDERUID which is of CHAR22 only not 32. Still If you have CHAR32 ORDID you can convert it into CHAR 22 using Function module /sapapo/guid_convert.

Also have you checked the uppercase/lowercase flag while executing this FM in foreground?

because you have passed the Simsession ID as JSBYBWNZHLTX00004EVGR0 which is i guess wrong format.In SIMSESSION id there will be generally few as small case and few as capital letters...check at your end...Also everytime, you have to pass the new simsession ID generated using the Function module which you have used already.

Also, pass the ORDID also in same format which you are getting from BAPI/System/ any FM.I mean to say check case of letters.

It will give you the output definitely.

Regards,

Saurabh

Former Member
0 Kudos

Thanks Saurabh.. , i am getting outputs now. its only working when i give ORDERID. but i want to get whole pegging results of one location. means if i pass location ID it should give output.

is it possible? or any other easyway to get whole location pegging results?

my requirement is i need to get list of purchase req created in bottom level. we have many DCs connected to one central location from where we will buy from vender. so i nneed to know entire preq which created in central location by pegging. it would be easy if i pass location id in above mentioned FM and get whole list in one shot......

Regards

Rajesh

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi Saurabh, thanks for your answers. i have given only 6 points since still my question is not answered fully. can you please clarify...

Regards

Rajesh

Former Member
0 Kudos

Now I have few questions related to your requirement

1) Do you want to fetch the entire pegging structure or you want only PurReq for particular locations?

2) If you want for particular locations, you can use the standard BAPI to read PurReq in which you can give the location selection and product as *(all).

Pegging structure For location:

I think you need to find out the orders first...which you can read by any FM/BAPI..after getting the order list for that particular location,paas those ORDIDs to this FM to get the entire pegging data...

Second way is,If you know the location for which you need to read the pegging data,

Pass the location ID or Location to any standard FM which can give you the PEGID..

with the help of PEGID also you can fetch the pegging structure using same FM which you used earlier...

I hope now everything is clear to you.

Regards,

Saurabh

Former Member
0 Kudos

Hi.. i need to extract all purchase req created through pegging in particular location. but that location might have normal purchase req ( without pegging). so i need only pegged purchase req and hopfully i need to follow entire network flow. and also i need to know purchase req created for which stock transfer req.

If i use above mentioned functional module (/SAPAPO/EFPL_ORD_NET_GET )

1) i need to get ORDERID locationwise by using another FM--??

2) conversion of sessionid CHAR 32 id into CHAR 22

3) passing above ORDERID in to FM /SAPAPO/EFPL_ORD_NET_GET

But main issue in this procedure may be performance. collecting ORDERID's ,conversion and passing might be time consuming.

i want to improve the performance as much as possible ( we got huge orders , DC's)

for example, If FM- /SAPAPO/EFPL_ORD_NET_GET is accepting LOCATION id instead of ORDERID , i can improve some performance right??

whats your suggesstion? any other way i can do?

Regards

Rajesh

Former Member
0 Kudos

Hi Rajesh,

If you want to read only Purchase Requisitions for a particular locations then why dont you use the BAPI to read it.

Use BAPI_POSRVAPS_GETLIST3 with the LOCATION_SELECTION = I-EQ-location and PRODUCT_SELECTION = I-CP-*

and ATPCAT_SELECTION = I-EQ-AG(PurReq). Now your concern is to find out only those PurReq who are pegged with the StockTrfOrd/ any other order.You dont want to consider the normal PurReq.

So to achieve this requirement,you will get the list of all PurReqs in the table RECEIPTS of this BAPI with ORDER GUID(CHAR32),

For the same GUID, search the pegged orders in PEGGING_OUTPUT_NODES/ PEGGING_INPUT_NODES tables, you will get the order no. linked to PurReq.If order is linked then only consider otherwise ignore that PurReq.

I hope now this will solve your issue.

Regards,

Saurabh