Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP Query

Former Member
0 Kudos

The plant field already defined like

Select-options: SP$00003 for marc-werks "Defined in Abap Query

SP$00003 for this field we need to add the following code?

AT SELECTION-SCREEN ON werks.

z_tcode = sy-tcode.

z_pgnam = sy-repid.

*-----To select Transaction code for this report

IF z_tcode IS INITIAL.

SELECT SINGLE tcode

FROM tstc

INTO z_tcode

WHERE pgmna EQ z_pgnam.

ELSEIF z_tcode = c_tcode.

CONCATENATE '%' z_pgnam '%' INTO z_pgnam.

CLEAR z_tcode.

SELECT SINGLE tcode

FROM tstcp

INTO z_tcode

WHERE param LIKE z_pgnam.

ENDIF.

*-----To check Authority for given Plant Range

CALL FUNCTION 'Z_AUTHORITY_CHECK'

EXPORTING

itcode = z_tcode

field1 = c_werks

TABLES

t_field = werks

t_yesauth = t_yestab

t_noauth = t_notab.

1 REPLY 1

andreas_mann3
Active Contributor
0 Kudos

Hi,

why don'T you insert your coding in the corresp. infoset of your query with trx. sq02?

A.