cancel
Showing results for 
Search instead for 
Did you mean: 

BBP_PDATT_CREATE in BAdI

Former Member
0 Kudos

Hi Gurus,

I have a requirement where in I need to read an file from the Archive link table and insert it into a PO. The scenario is this.

We have created an Content repository ZZ and stored a file in it, which will inturn be stored in a Z table that is assinged to the C-Repository ZZ.

Whenever the PO is created from Sourcing Cockpit (BBPSOCO01), I need to pickup that file from ZZ repository and insert into PO (table BBP_PDATT) as an attachment. I am planning to use the BAdI BBP_DOC_SAVE_BADI and call the function module BBP_PDATT_CREATE(The Commit WOrk happens once the control returns from BAdI) . But I have no clue what to fill in the IT_ATTACH parameter of the function module. I can fill in PHIO_CONTENT table in IT_ATTACH with the table entries from my ZZ Repository but, what should be the values of other fields, such as GUID, P_GUID cos these are not PO's guid's or anything else.

Could anyone please advise me as to what should i be filling in that table. Or if you could advise me if there are any other ways of doing it.

Thanks a lot

Shyam

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Shyam,

We already discussed this in a previous post.

You can update PO in BADI SAVE or BADI change.

With BADI change, you just have to update the attachment table after calling BBP_PDATT_CREATE.

With BADI save, you first have to call the BBP_PD_PO_GETDETAIL, then BBP_PDATT_CREATE, then BBP_PD_PO_UPDATE, then BBP_PD_PO_SAVE.

For BBP_PDATT_CREATE, I would try following parameters:

- I_P_GUID = parent GUID = PO header GUID input parameter of BADI SAVE)

- IT_ATTACH-P_GUID = same GUID as above

- IT_ATTACH-GUID = leave empty: SRM will generate one

- IT_ATTACH-LOGICAL_SYSTEM = SRM one

- IT_ATTACH-LOIO_CLASS = the one from your model

- IT_ATTACH-LOIO_OBJID = the one from your model

- IT_ATTACH-DESCRIPTION = the one from your model

Try this and let me know your results.

Rgds

Christophe

Answers (0)