cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

G/L Account manually entry

kersra
Explorer
0 Likes
204

Hi Gurus,

we are facing some issues to get the right G/L account. We are on SRM 7.01 . Is there a way to understand in BBP_DOC_CHANGE_BADI if the value in the field G_L_ACCT is entered manually? Like a field status or something else.

Thanks a lot

Ralph

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

There is no way we can check if the value is enetred manually in the screen.if you want to validate the entry made for the field G/L account,you can do via BADI BBP_DOC_CHECK_BADI.If you want to chnage the value for the field G/L account dynamically at runtime then you can use the BADI BBP_DOC_CHANGE_BADI.

Answers (1)

Answers (1)

Former Member
0 Likes

Hi Ralph,

When you change any  fields of one item data, this item will occur in the internal table VALUE( IT_ITEM ).

In the SC change BADI, you can use FM 'BBP_PD_SC_GETDETAIL' to get the sc data and use ABAP memory or static internal table to recorde them.

Then compare the old G/L data and the new ones, judgement if user entered manually.

Example Code:

CALL FUNCTION 'BBP_PD_SC_GETDETAIL'
       EXPORTING
         i_guid              = is_header-guid
         i_attach_with_doc   = ' '
         i_with_itemdata     = 'X'
         i_read_from_archive = ' '
       IMPORTING
         e_header            = wa_bbp_pds_sc_header_d
       TABLES
         e_item              = lt_bbp_pds_sc_item_d
         e_partner           = lt_bbp_pds_partner_sc
         e_account           = lt_bbp_pds_acc_sc
         e_orgdata           = lt_bbp_orgdata.

EXPORT sc_item    FROM sc_item[] TO MEMORY ID 'ZSC_ITEM'.

IMPORT sc_item TO sc_item_old[] FROM MEMORY ID 'ZSC_ITEM'.

Good luck!

Lorry