cancel
Showing results for 
Search instead for 
Did you mean: 

How to get information about BBP_PDATT (attached document)

Former Member
0 Kudos

Hello

I'm writing a function module, and i want to get the attached document of a purchase order. I know the function module BBP_PD_PO_GETDETAIL gets this information but it is too long for me and i just need attached document. I found the Function module BBP_PDATT_GETDETAIL but i have the impression that it is not possible to execute it alone, it dumps.

And i can't find links between crmd_orderadm_h and BBP_PDATT.

Thank you for your help.

Peggy.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

You can use the FM "BBP_PDATT_GETDETAIL " to get the attachemnt details.Just pass the foll data to the FM:

I_P_GUID = GUID of the document(If you dont have you can get it from crmd_orderadm_h table)

I_P_KIND = 'A'.

I_ATTACH_WITH_DOC = 'X'.

You should get the entry for the attachemnt (is one exists)

HTH.

BR,

Disha.

Pls reward points for useful answers.

Former Member
0 Kudos

Hello Disha,

Unfortunalty, like i said, i can't execute the FM BBP_PDATT_GETDETAIL. When i enter the guid, I_P_KIND = 'A' and I_ATTACH_WITH_DOC = 'X'; the system dumps. It doesn't work!

Peggy.

Former Member
0 Kudos

Hi,

Can you paste the code here for better analysis?Also please check the data you are passing for the GUID due to which you may be getting the DUMP.What does the Dump analysis indicate?

BR,

Disha.

Pls reward points for useful answers.

Former Member
0 Kudos

I really enter the guid of a purchase document, and the fields i_p_kind = 'A'; i_attach_with_doc = ' X'. But it dumps!

The title of the dump is "<b>Exception condition "LOG_NOT_FOUND" raised</b>."

<u>Details:</u>

<i>A RAISE statement in the program "SAPLBBP_PDH" raised the exception

condition "LOG_NOT_FOUND".

Since the exception was not intercepted by a superior program

in the hierarchy, processing was terminated.

The termination occurred in line 18 of the source code of the (Include)

program "LBBP_PDHF0A" </i>

I have really the impression that it is not possible to execute thie FM alone.

Try and you will see.

Anyway, thanks for your help

Former Member
0 Kudos

The link is this one:

    • pj of header

SELECT COUNT(*)

INTO l_nbr_occur

FROM bbp_pdatt

INNER JOIN crmd_link

ON bbp_pdattset_guid = crmd_linkguid_set

WHERE objtype_set = '33'

AND crmd_link~guid_hi = et_pdlist-guid

AND del_ind NE 'X'

AND internal_ind NE 'X'.

    • pj of items

SELECT guid

APPENDING TABLE lt_guid_i

FROM crmd_orderadm_i

WHERE parent EQ et_pdlist-guid.

LOOP AT lt_guid_i INTO l_guid_i.

SELECT COUNT(*)

INTO l_nbr_occur2

FROM bbp_pdatt

INNER JOIN crmd_link

ON bbp_pdattset_guid = crmd_linkguid_set

WHERE objtype_set = '33'

AND crmd_link~guid_hi = l_guid_i

AND del_ind NE 'X'

AND internal_ind NE 'X'.

ENDLOOP.