Skip to Content

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

Selection screen and authorization check for plant from 2 diff tables?

Hi,

Could anyone help me out?

how to write code for this?

u2022 Fields for selection

Plant : WERKS (one selection) - check authorization access u2013 Mandatory .

Material code MATNR (one selection) - Mandatory

and while doing the authorization check how should i check it ? here iam taking the table as t001w for werks and for selection screen iam taking it from another Z table......i should take 2 different tables here.....for selection and for authorization.

my code is pasted below:

----


  • Data Declarations *

----


data: s_werks type t001w-werks.

----


  • Selection Screen *

----


SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-h01.

PARAMETER : p_werks like Ztable-werks OBLIGATORY,

p_matnr like mara-matnr OBLIGATORY.

SELECTION-SCREEN END OF BLOCK b1.

----


  • Start-of-Selection *

----


START-OF-SELECTION.

**-Get Plants for Authorization check.

SELECT werks

FROM t001w

INTO TABLE it_werks

WHERE werks IN s_werks.

LOOP AT it_werks INTO x_werks.

v_werks = x_werks.

Regards,

Reddy

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question