cancel
Showing results for 
Search instead for 
Did you mean: 

How to prevent users changing the GL account in shopping cart line items

Former Member

We have configured our SRM system such that GL accounts default in shopping cart line items based on product category selected.

We now want to set the shopping cart line item GL account field so that requisitioners cannot change it. How can we do this?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Hi

Which SRM version are you using ?

<b>We can issue a custom error message, as soon as the user changes the GL Account value in this case.</b>

<u>This is possible by using either using BADIs</u>

- BBP_ITEM_CHECK_BADI

- BBP_DOC_CHECK_BADI

<b>P.S. Read the stsnadrd documentation of the BADI using SE18 Transaction.</b>

Do let me know.

Regards

- Atul

Answers (4)

Answers (4)

pvanhoove
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello,

You can use the badi BBP_UI_CONTROL_ICC, method BBP_SC_UI_CTRL to change the global account field property (visible, input).

Rgds,

Pierre

yann_bouillut
Active Contributor
0 Kudos

Hi

Solution is provided in the following thread :

https://forums.sdn.sap.com/click.jspa?searchID=4216395&messageID=1162066

Kind regards,

Yann

Former Member
0 Kudos

Hi

A way we used is to grey-out the the field completey on the ITS by changing BHTML template. Internet Service BBPACCOUNT; HTML Template SAPLBBP_PDH_ACC_2000_1

ORIGINAL CODE:

`if (T_SCREEN_ACCLIST-G_L_ACCT[j].disabled)`

`TD(nowrap="X", align="right", active="")`

`T_SCREEN_ACCLIST-G_L_ACCT[j].value`

<input type=hidden name="`T_SCREEN_ACCLIST-G_L_ACCT[j].name`" value="`T_SCREEN_ACCLIST-G_L_ACCT[j].value`">

`else`

`TD(nowrap="X", align="right", active="X")`

<input type=text title="`#GL_ACC`" name="`T_SCREEN_ACCLIST-G_L_ACCT[j].name`" value="`T_SCREEN_ACCLIST-G_L_ACCT[j].value`" maxlength="64" size="11">

`if (GV_AUTHORITY.value=="X")`

`if (GV_BACKEND_CALL.value=="X")`

`F4HelpButton(bbpformname, T_SCREEN_ACCLIST-G_L_ACCT[j].name, jsMaskString(strEnc(#SELECT_TEXT_SHELP_GL_ACCT)), jsMaskString(strEnc(#SELECT_SHELP_GL_ACCT)))`

`end`

`end`

`end`

CHANGED TO:

<!-- CUSTOM CHANGE: TO ONLY DISPLAY THE GL ACCOUNT INFO -->

<!--

`if (T_SCREEN_ACCLIST-G_L_ACCT[j].disabled)`

-->

`TD(nowrap="X", align="right", active="")`

`T_SCREEN_ACCLIST-G_L_ACCT[j].value`

<input type=hidden name="`T_SCREEN_ACCLIST-G_L_ACCT[j].name`" value="`T_SCREEN_ACCLIST-G_L_ACCT[j].value`">

<!--

`else`

`TD(nowrap="X", align="right", active="X")`

<input type=text title="`#GL_ACC`" name="`T_SCREEN_ACCLIST-G_L_ACCT[j].name`" value="`T_SCREEN_ACCLIST-G_L_ACCT[j].value`" maxlength="64" size="11">

`if (GV_AUTHORITY.value=="X")`

`if (GV_BACKEND_CALL.value=="X")`

`F4HelpButton(bbpformname, T_SCREEN_ACCLIST-G_L_ACCT[j].name, jsMaskString(strEnc(#SELECT_TEXT_SHELP_GL_ACCT)), jsMaskString(strEnc(#SELECT_SHELP_GL_ACCT)))`

`end`

`end`

`end`

-->

See if it works for you

Former Member
0 Kudos

Hi,

You can use the BADI "BBP_DOC_CHECK_BADI" to restrict the users from changing the G/L a/c at the item level.

Please refer the foll link for sample code for thh BADI

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/srm/srmBADIRepository&

BR,

Disha.

Pls reward points for useful answers.