cancel
Showing results for 
Search instead for 
Did you mean: 

Authorization in tx. CRMD_ORDER for Sold-to Party

Former Member
0 Kudos

hi,

i need to do a validation in tx. crmd_order. when the user uses the help (F4) button for the field "Sold-to party" I need to check if it is user 15000. In that case, when acceding to the help, I have to display only partners corrsponding to some sales office, not to all of them.

Does anybody know how can i do that ???

Maybe with badi BUPA_AUGRP ??? but don't know what to do there....

thanks in advance !!!

regards !!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

i think i haven't explained my problem very wel.. maybe the title is not the correct one...

i need to validate this:

when user 15000 uses the F4 help button for the field 2Sold-to Party" to select the partner, i want to show only those partners who belong to some sales offices, not all of them..

Former Member
0 Kudos

Hello Maria,

I misunderstood indeed!

There is a little trick to identify if the current process/transaction calls a badi or not.

Before you push F4 with the user 15000 activate debugging and place a breakpoint in the GET_INSTANCE method of the CL_EXITHANDLER class. This method is called each time a badi could be called (doens't matter if the badi has an implementation or not). Then check the badi to see if it is appropiate one you're looking for. The name of the badi is contained in the variable 'exit_name' of the class.

I'm pretty sure there is a badi for BP lookup.

Hope this helps,

Joost

Message was edited by:

Joost Stallaert

Answers (1)

Answers (1)

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

thanks but.. i don't understand what do you mean... i'm newbie in CRM...

Former Member
0 Kudos

Hi Maria,

There are 2 ways of achieving the desired result.

1) If its a standard field and has a standard search help associated with it, check if the search help has an exit. If yes, write your code there.

Else,

2) Find a Badi which is called once you press F4 on sold-to-party, by the way Joost has suggested, write your logic in the BADI to get the sold-to-party based on the logic, create an internal table for Sold-to-Party values and pass the internal table to FM <b>F4IF_INT_TABLE_VALUE_REQUEST</b> to display the values in the F4 Help.

Hope it helps.

Lokesh

Former Member
0 Kudos

Oks, thanks !!

I've tried to find a badi when pressing F4 but I found nothing.

How can I search for an exit ???

thanks in advance...

Former Member
0 Kudos

hi again, i've been looking for this problem and i've found the following:

there is already implemented the badi BUPA_AUGRP with method GET_AUGRP. In the source code it's being validated the roles the user has, if the user has one role or another, the badi does this:

if loc_user_role_wa-agr_name eq 'Z_CR_PAC_ALEMANIA_00'.

wa_AUTH_VALUES-sign = 'I'.

wa_AUTH_VALUES-option = 'EQ'.

wa_AUTH_VALUES-low = '03'.

append wa_AUTH_VALUES to et_auth_values.

wa_AUTH_VALUES-sign = 'E'.

wa_AUTH_VALUES-option = 'EQ'.

wa_AUTH_VALUES-low = space.

append wa_AUTH_VALUES to et_auth_values.

LT_AUTH_VALUES[] = et_auth_values[].

LOOP AT LT_AUTH_VALUES INTO LS_AUTH_VALUES.

CLEAR LS_AUTH_SELOPT.

MOVE-CORRESPONDING LS_AUTH_VALUES TO LS_AUTH_SELOPT.

LS_AUTH_SELOPT-SHLPFIELD = LC_SHLPFIELD.

LS_AUTH_SELOPT-SHLPNAME = IV_SHLPNAME.

APPEND LS_AUTH_SELOPT TO ET_AUTH_SELOPT.

ENDLOOP.

endif.

As i can see when debugging, the system access table BUT000 with field AUGRP.

I've also seen that the field sold-to party has an standard help search "COM_PARTNER", and the debug always arrives here, so i think maybe it's not possible to do what i need to ???

thanks....