cancel
Showing results for 
Search instead for 
Did you mean: 

Grouping of SC line items to single PO

Former Member
0 Kudos

Hi,

We are facing an issue with grouping of SC line items to one single PO as per the details given below.

The requirement is if the SC has 10 line items as below

5 line items with no source of supply - 5 PO's

3 line items with preferred vendor (82000000) - 1 PO

2 line items with preferred vendor (82000001) - 1 PO

In the first case 5 PO's has to be created. This is standard no issues.

In the second case system has to group 3 line items to 1 PO.

In the third case system has to group 2 line items to 1 PO.

We have tried the BADI BBP_LOCAL_GROUP_PO and it doesn't help for the second & third case of our requirement.

We tried using the Document change badi to convert the Prefferred vendor to vendor and could not do that.

We also tried the FS BBP_SC_TRANSFER_GROUPED, but it doesn't cater to our requirement.

Any help would be highly appreaciated.

Accepted Solutions (0)

Answers (1)

Answers (1)

yann_bouillut
Active Contributor
0 Kudos

Hi,

You definitely can do this just by converting your preferred vendor into fixed vendor.

I have already given the abap code for SRM50 in former thread.

You can easily found it using the search engine.

Kind regards,

Yann

Former Member
0 Kudos

Hi Yann,

Thanks for your immediate response.

I could not able to find the link. Could you please send me the code/ link.

Regards

Sudhakar

yann_bouillut
Active Contributor
0 Kudos

Here is a sample code that convert preferred vendor into fixed vendor.

You can easily change it to your requirement )

method IF_EX_BBP_DOC_CHANGE_BADI~BBP_SC_CHANGE .

Constants : c_vendor type BBP_PDS_PARTNER-PARTNER_FCT

value '00000019',

c_preferred_vend type BBP_PDS_PARTNER-PARTNER_FCT

value '00000039'.

Data : ls_partner type BBP_PDS_PARTNER.

*Read Table it_partner into ls_partner With key PARTNER_FCT = c_vendor.

*

*If sy-subrc NE 0.

Loop at it_partner into ls_partner

where PARTNER_FCT Eq c_preferred_vend.

Move c_vendor To Ls_partner-PARTNER_FCT.

Modify it_partner from ls_partner index sy-tabix.

Endloop.

*Endif.

et_partner[] = it_partner[].

ET_ORGDATA[] = IT_ORGDATA[].

ET_ITEM[] = IT_ITEM[].

ES_HEADER = IS_HEADER.

ET_ACCOUNT[] = IT_ACCOUNT[].

*break ybo

*IT_PARTNER

*ET_PARTNER[]

endmethod.