Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Question on Search Help and Authorization Check for Sales Order Type

Question 1:

When I go to VA01 and click the search help, it shows only order type that are not blocked.

However, when I have sales order type in select-options of a Z program,

S_AUART FOR VBAK-AUART

I click on the search help, it gives all the sales order types. How can I have a list with unblocked sales order type only?

Question 2:

I want to check whether a use can extract data from a sales order type (e.g. OR and RE)that he/she authorized to use.

I have include the following in my program:

AUTHORITY-CHECK OBJECT 'AUART'

ID 'AUART' FIELD 'OR'.

It always returns SY-SUBRC = 12.

But order type 'OR' is granted to the user (he/she can create order with type OR in VA01)

Please kindly give me some ideas, thanks.

Former Member
Former Member replied

hi,

ad1

use following code:

AT SELECTION-SCREEN ON VALUE-REQUEST FOR auart.
  PERFORM auartGet.

FORM auartGet.
    CALL FUNCTION 'RV_HELP'
         EXPORTING
              KEY            = VKORG
              KEY2           = VTWEG
              KEY3           = SPART
              KEY4           = '0'
              NUMBER         = '008'
              FIELD_IN       = AUART
         IMPORTING
              FIELD          = AUART.
ENDFORM.

ad2.

example:

   AUTHORITY-CHECK OBJECT 'V_VBAK_AAT'
         ID 'AUART' FIELD 'OR'
         ID 'ACTVT' FIELD '01'. "01-create order, 02-change, 03 display
check sy-subrc eq 0.

regards,darek

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question