cancel
Showing results for 
Search instead for 
Did you mean: 

BBP_PD_SC_ACCOUNT_CHECK not returning values

Dev164
Participant
0 Kudos

Hello,

          I am using this FM bbp_pd_account_check but it is not returning any value I requried account details of the SC, I need to know what parameters need to pass

Thanks in advance

Mangesh

Accepted Solutions (0)

Answers (1)

Answers (1)

RicardoRomero_1
Active Contributor
0 Kudos

Hi,

For get the accounting details of a SC you can use the FM  BBP_PD_SC_GETDETAIL.

If you want to use the FM BBP_PD_SC_ACCOUNT_CHECK try with the following code:

REPORT ztest_check_acc.

PARAMETERS: p_objid TYPE crmt_object_id_db DEFAULT '1000008857' OBLIGATORY,

            p_numint TYPE CRMT_ITEM_NO DEFAULT 1 OBLIGATORY.

START-OF-SELECTION.

  DATA: ls_sc_header TYPE bbp_pds_sc_header_d,

        lt_sc_item   TYPE TABLE OF bbp_pds_sc_item_d,

        ls_sc_item   LIKE LINE OF lt_sc_item,

        lt_sc_acc    TYPE TABLE OF bbp_pds_acc,

        lt_messages  TYPE TABLE OF bbp_pds_messages,

        ls_messages  LIKE LINE OF lt_messages.

  DATA: ls_com       TYPE bbp_pds_acc_icom.

  CALL FUNCTION 'BBP_PD_SC_GETDETAIL'

    EXPORTING

      i_object_id = p_objid

    IMPORTING

      e_header    = ls_sc_header

    TABLES

      e_item      = lt_sc_item

      e_account   = lt_sc_acc.

  READ TABLE lt_sc_item INTO ls_sc_item WITH KEY number_int = p_numint.

  CHECK sy-subrc EQ 0.

  MOVE-CORRESPONDING ls_sc_header TO ls_com.

  MOVE-CORRESPONDING ls_sc_item TO ls_com.

  DELETE lt_sc_acc WHERE p_guid NE ls_sc_item-guid.

  CALL FUNCTION 'BBP_PD_SC_ACCOUNT_CHECK'

    EXPORTING

      i_com      = ls_com

    TABLES

      i_account  = lt_sc_acc

      e_account  = lt_sc_acc

      e_messages = lt_messages.

  LOOP AT lt_messages INTO ls_messages.

    WRITE:/ ls_messages-message.

  ENDLOOP.

Regards,