cancel
Showing results for 
Search instead for 
Did you mean: 

Creation of ALV report in SRM Shopping carts.

0 Kudos
458

The objective is to display follow-on documents(SC quantity, PO no, PO value, Open PR quantities) which will help the business to determine OPEN Shopping carts, if any.The complexity of the development object is HIGH. Where to write the code (Eg: in ECC, we write the PP in SE38)? How shall I proceed? What to refer? Input field i.e., Selection screen input is PR number.

Below are the output fields:

1) ECC PR no 2) Related SC(EXTR) 3) SC quantity 4) Open PR quantities 5) PO Number 6)PO Quantity 7)PO description 😎 Ref. Contract 9)Contract quatity 10)Reference RFx

Some of the research I had done included the below mentioned T-codes, FM's & tables:

Transaction: BBP_PD

Tables: CRMD_ORDERADM_H, BBP_PDHGP, BBP_PDORG, BBP_PDIGP, BBP_PDBEI.

FM:BBP_PD_SC_GETDETAIL.

As I am fresher to ABAP, I am unable to proceed without proper inputs.Please help.


Accepted Solutions (1)

Accepted Solutions (1)

daniel_marlen
Product and Topic Expert
Product and Topic Expert

Hello Prathamesh,

If the input is the PR number, first you need to get the corresponding SC. You can do this using FM BBP_PROCDOC_GETLIST. You need to export OBJ_TYPE = BUS2121, C_ON = X (if you would like to find closed SCs as well), DEMID = PR number.

This will import the SC header into table LT_PDLIST.

From this table you get the header GUID of the SC. Using this, you can gather every required data of the SC using BBP_PD_SC_GETDETAIL. The open quantity can be calculated using item fields Quantity, QUAN_PO_E (ordered quantity) and QUAN_CF_E (confirmed quantity).

You can get the follow-on PO, and Rfx using the same GETDETAIL FM. In table E_ITMLIM_REL, system provides the item linkages (PO, RFx). The Contract number can be found in SC item field CTR_HDR_NUMBER.

Best regards,

Daniel

0 Kudos

Hi Daniel,

Thanks for the input. I will proceed and will get back if I come up with any other doubt. I appreciate your time.

0 Kudos

Hi Daniel,

I have tried exactly the same way as you told. However I faced two issues which I couldn't figure out. Below mentioned are the doubts I have :

1) I am unable to find PR number in SRM system. Though I tried BBP_PD Transaction, still I could not come across PR number. My input parameter to the selection screen is PR number. The development object has below explanation for the PR number. I am not sure if it is correct or not. Please have a look :

So, I am unable to have a clear picture that how will I proceed with the development.

2) As mentioned by you, I could not find C_ON & DEMID. If you can clarify more on this, it would be really very helpful. Below attached are the snippets of the FM BBP_PROCDOC_GETLIST :

3) Below is the list of follow-on documents that I need to generate by giving PR no as input:

I am unable to find the table to which these fields belong to. Some I could find in BBP_PD transaction.

P.S. : daniel.marlen The answer given by you has provided me with a headstart. As I have mentioned, I am still in learning phase and a beginner to ABAP, I am finding it very difficult to understand the flow, linking, development of the code. I request the Community to please help me by giving your valuable inputs. Appreciate your time and efforts. daniel.marlen deepti.pednekar2 ashutosh.tripathi5 Former Member rbei.srm rushikesh.yeole ivy.li muthuraman.govindasamy venkatakrishna request you to please find some time to get my doubts clarified, so that I would start with the development. Thanks !

Regards,

Prathamesh

daniel_marlen
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Prathamesh,

Sorry, I didn't use the parameter's name of the FM. So you need to call the FM BBP_PROCDOC_GETLIST using:

i_object_type = BUS2121

i_with_closed = X (if you would like to consider closed SCs as well)

i_item_ext_demid = PR number (make sure that you use double zero before the number, e.g.: 001234567)

This FM will return the header of SC in table e_pdlist.

Then you can use FM BBP_PD_SC_GETDETAIL using the header GUID to get all items and linkages of the item as I mentioned above.

Best regards,

Daniel

0 Kudos

Hi Daniel,

Thanks for your prompt response and your time. I just need one more thing. i.e., PR number in SRM. What is it ? Is it the object ID in CRMD_ORDERADM_H table or any other field ? What exactly do I need to give input. I could not find description as 'PR number' of any of the fields in any of the table. That is so true because I found out that in SRM, PR's are replicated as SC and there will be no PR's. So, my only concern is what is the input parameter that I need to give ? Is it the GUID of CRMD_ORDERADM_H? or GUID of CRMD_ORDERADM_I ? or Object id ? or what ? Please clarify this petty doubt.

Also,I entered Object ID as DEMID & , GUID (CRMD_ORDERADM_I-GUID) as DEMID; but there are 0 entries in PDLIST table. Please guide. What shall I input ? Is the document that I have provided the screenshot of is correct or do you find any ambiguity? I wait for your response.

Best Regards,

Prathamesh

daniel_marlen
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Prathamesh,

PR number is the Document Number of the Purchase Requisition in ECC system. In the initial description you mentioned that the input will the the PR Number. So I assumed that your report will have one input field, where the user can fill the Purchase Requisition number. But you need to fill two zeros before the number (e.g. If the PR number is 123456789 then the input should be 00123456789). You can also fill these two zeros in the report logic (so users can use the exact number), if the users of this report is not aware of this "rule". Then you can find the SC in BBP_PD and in your report as well.

Best regards,

Daniel

0 Kudos

Daniel, I completely got you about the "preeceding-two-zeros" valuable input. Though, I am still not getting that what is that user will input ? Where can I see that field in SRM development system? Surely it will not be mentioned as PR number as column header in SRM tables? What is the field for PR in SRM? Is it GUID/ Object ID? What is the field ? Sorry for the inconvenience caused Daniel. I hope you understand. Please get back at this. 1 more thing, as I mentioned in the question, forget "ECC PR number". The input is simply "PR no". I am not getting where is that PR no in SRM.

Thank you for your prompt response.

Regards,

Prathamesh

daniel_marlen
Product and Topic Expert
Product and Topic Expert
0 Kudos

The PR number can be found item level of the SC in table BBP_PDIGP. Field EXT_DEMID contains the corresponding PR document number.

But I don't understand why this is necessary. If the input is PR number, then the user should know the PR number. Otherwise what is the point to have the PR number as input, if the user is not aware of the PR number?

0 Kudos

Daniel, I think I am unable to make you understand. I will do some more research and get back to you at my earliest. The problem is just because I am unaware of the ABAP language fully and I am new. I will first get myself cleared. Thanks for bearing with me.

Regards,

Prathamesh

Answers (2)

Answers (2)

ivy_li
Advisor
Advisor

Hi,

I reviewed the previous comments, and the only point I would like to add is that for most function modules, they are not released for customer to use. This means that it might have different problems while directly called by custom programs.

So my suggestion is that it would be better to copy the standard FM to generate your own custom FM, and then adjust the coding in your custom FM to realize your expectation. It is almost impossible to directly make use of them without any problem.

BR,

Ivy

0 Kudos

Hi Daniel and Ivy,

While fetching all the relevant follow-on document details, I want to fetch contract number (field object_id, BUS200113,CCTR). This object_id getting displayed when I execute bbp_pd transaction for Bus2121 and for a particular guid(let's say x) and object_id(let's say x.1)(Bus2121, EXTR), when I click on header links, I can see another guid(let's say y) and object_id(let's say y.1).

This 'y.1' is nothing but the object_id which I want to fetch(from header links)(Object type bus200113, process type CCTR(contract)).

I am just stuck that how this would be possible as I have already displayed SC no(which is object_id). I want to know if there is any table for Header linkages and Item linkages.

Please get back to this. Thanks in advance !

Regards,

Prathamesh