Application Development and Automation 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: 
Read only

User Parameters

Former Member
0 Likes
469

I have an abap code in a user exit that is working fine. In order though not to have a long coding and not have to correct the coding every now and then, I would like to use the user parameter (SPA) that is stored for every user to have the same outcome in terms of checking. Can anyone help me what to correct in my abap code to use the user parameter SPA

IF sy-uname = 'xxx'

AND ( sy-tcode = 'VA22'

OR sy-tcode = 'VA23' ).

DATA: BEGIN OF i_vbak OCCURS 0,

vbeln LIKE vbak-vbeln,

spart LIKE vbak-spart.

DATA: END OF i_vbak.

SELECT * FROM VBAK

INTO CORRESPONDING FIELDS OF TABLE i_vbak

WHERE vbeln = vbak-vbeln

AND spart = vbak-spart.

LOOP AT i_vbak where spart = '20'.

Flag = 'X'.

endloop.

if flag NE 'X'.

MESSAGE ID 'ZSD' TYPE 'E' NUMBER '997'.

ENDIF.

ENDIF.

2 REPLIES 2
Read only

Former Member
0 Likes
391

DATA: lv_spa TYPE char100.
GET PARAMETER ID 'SPA' FIELD lv_spa.
Read only

0 Likes
391

where exactly can I include this code. Shall I have it in my internal table as well.