03-05-2010 6:35 AM
Hi frnds,
4 ip paras, and two (abap & basis ) users
abap user login means 1st 2fields enable then another 2 fields disable,
same as any user(basis)
this is requirement.
How can prodect the parameters.
Thanks in advance.
03-05-2010 7:48 AM
I don't understand you requirement, nevertheless
- check [LOOP AT SCREEN|http://help.sap.com/abapdocu_70/en/ABAPLOOP_AT_SCREEN.htm] and [MODIFY SCREEN|http://help.sap.com/abapdocu_70/en/ABAPMODIFY_SCREEN.htm] in [AT SELECTION-SCREEN OUPUT|http://help.sap.com/abapdocu_70/en/ABAPAT_SELECTION-SCREEN_EVENTS.htm#!ABAP_ALTERNATIVE_1@1@].
- use[ SY-UNAME|http://help.sap.com/abapdocu_70/en/ABENSYSTEM_FIELDS.htm] to check user, or better use an [AUTHORITY-CHECK|http://help.sap.com/abapdocu_70/en/ABAPAUTHORITY-CHECK.htm].
"What is conceived well is stated clearly, and the words to say it come easily."
Regards,
Raymond
03-05-2010 6:45 AM
Hi,
Please post the threads clearly, dont use short words......
Any how, is the users are only two or more... i.e basis users are more than one...
If its more than one... just copy the same t-code and create a role assign this t-code to basis with ur requirement...
Same way abap users...
If you have only two user ID's i.e one ABAP, one Basis u can hard code itself and use single t-code...
Regards,
Shankar.
03-05-2010 6:53 AM
03-05-2010 7:05 AM
Hello frnds,
10 input parameters.
use diff users.
1st user 1st 5 fields another 5fields are enter for 2nd user useing primery key.
1st user enter 5fldsalso display in display mode for that 2nd user also display another 5flds are chage mode.
Thanks in advance.
03-05-2010 7:34 AM
03-05-2010 7:29 AM
maybe you can create a tcode for the screen,then use two transaction variants to meet the requirement.
03-05-2010 7:48 AM
I don't understand you requirement, nevertheless
- check [LOOP AT SCREEN|http://help.sap.com/abapdocu_70/en/ABAPLOOP_AT_SCREEN.htm] and [MODIFY SCREEN|http://help.sap.com/abapdocu_70/en/ABAPMODIFY_SCREEN.htm] in [AT SELECTION-SCREEN OUPUT|http://help.sap.com/abapdocu_70/en/ABAPAT_SELECTION-SCREEN_EVENTS.htm#!ABAP_ALTERNATIVE_1@1@].
- use[ SY-UNAME|http://help.sap.com/abapdocu_70/en/ABENSYSTEM_FIELDS.htm] to check user, or better use an [AUTHORITY-CHECK|http://help.sap.com/abapdocu_70/en/ABAPAUTHORITY-CHECK.htm].
"What is conceived well is stated clearly, and the words to say it come easily."
Regards,
Raymond
03-05-2010 8:24 AM
Hi,
This is my code:
data : itab type of znew with header line.
selection-screen begin of block b with frame title text-001.
parameters:p_name like znew-za modif id MMU,
p_name1 like znew-zb modif id MMU,
p_name2 like znew-zc modif id QMU,
p_name3 like znew-zd modif id QMU,
selection-screen end of block b.
loop at screen.
if sy-uname = 'abapuser'.
if screen-group1 = 'MMU'.
screen-input = '0'.
itab-name = p_name.
itab-name1 = p_name1.
itab-name2 = p_name2.
itab-name3 = p_name3.
endif.
endif.
if sy-uname = 'basis'.
if screen-group1 = 'qmu'.
screen-input = '0'.
itab-name = p_name.
itab-name1 = p_name1.
itab-name2 = p_name2.
itab-name3 = p_name3.
endif.
endif.
endloop.
Error:
in abap user,
1st two fields are change mode
But in basis user,
all the 4 fields are chage mode
I want change mode for 3, 4th fields 1st two fields are display mode.
Thanks in advance.
Edited by: Matt on Mar 5, 2010 9:55 AM - fixed formatting
03-05-2010 8:45 AM
Try something like (Constants in uppercase, MODIFY, and a little structuring)
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
CASE screen-group1.
WHEN 'MMU'. " Here we disable input if user is ABAPUSER
IF sy-uname EQ 'ABAPUSER'.
screen-input = '0'.
ENDIF.
WHEN 'QMU'. " Here we disable input if user is BASIS
IF sy-uname EQ 'BASIS'.
screen-input = '0'.
ENDIF.
ENDCASE.
MODIFY SCREEN.
ENDLOOP.
AT SELECTION-SCREEN.
itab-name = p_name.
itab-name1 = p_name1.
itab-name2 = p_name2.
itab-name3 = p_name3.
Regards,
Raymond
03-05-2010 9:30 AM
Hi ,
This code also same issue,
in abap user,
3, 4th input fields are chande mode.
But another user,
All the 4 fields are change mode.
How can i protect 1st two fields in that user.
Thanks in advance
03-05-2010 9:39 AM
Sorry, but as i don't understand your exact requirement, you will have to adapt the code yourself.
Perhaps, you can try to reverse the tests, (replace "sy-uname EQ 'ABAPUSER'." by "IF sy-uname NE 'BASIS'." and vice versa.)
Regards,
Raymond
03-05-2010 9:58 AM
Hi,
the problem is with letter's case - you should use UPPER CASE - specially for GROUP1 field.
I would write:
IF sy-uname = 'BASIS'.
IF screen-group1 = 'QMU'.
...
Regards,
--
Przemysław
03-05-2010 10:07 AM
Hello,
at selection-screen output.
if sy-uname = 'abapuser'.
loop at screen.
if screen-group1 = 'MMU'.
screen-input = 0.
modify screen.
endif.
endloop.
elseif sy-uname = 'basis'.
loop at screen.
if screen-group1 = 'QMU'.
screen-input = 0.
modify screen.
endif.
endloop.
endif.
.
Regards,
Sachin
03-05-2010 10:28 AM
Hi, frnds,
This is my full coding:
data:itab type table of znew with header line.
selection-screen begin of block b with frame title text-001.
parameters:p_name like znew-za modif id MMU,
p_name1 like znew-zb modif id MMU,
p_name2 like znew-zc modif id QMU,
p_name3 like znew-zd modif id QMU,
r1 radiobutton group a, " For update into database
r2 radiobutton group a. " For update into database
selection-screen end of block b.
at selection-screen output.
loop at screen.
if sy-uname = 'ABAPUSER'.
if screen-group1 = 'QMU'.
screen-input = '0'.
if r1 = 'X'.
itab-name = p_name.
itab-name1 = p_name1.
itab-name2 = p_name2.
itab-name3 = p_name3.
modify znew from itab.
if sy-subrc = 0.
write: 'The above records was inserted in to the table ZNEW Succesfully'.
endif.
elseif r2 = 'X'.
select * from znew into table itab where za = p_name.
if sy-subrc = 0.
loop at itab.
write:/ itab-name, itab-name1, itab-name2, itab-name3.
endloop.
else.
write: 'There is no records found in the znew table'.
endif.
endif.
modify screen.
endif.
endif.
endloop.
loop at screen.
if sy-uname = 'testuser'.
if screen-group1 = 'MMU'.
screen-input = '0'.
if r1 = 'X'.
itab-name = p_name.
itab-name1 = p_name1.
itab-name2 = p_name2.
itab-name3 = p_name3.
modify znew from itab.
if sy-subrc = 0.
write: 'The above records was inserted in to the table ZNEW Succesfully'.
endif.
elseif r2 = 'X'.
select * from znew into table itab where za = p_name.
if sy-subrc = 0.
loop at itab.
write:/ itab-name, itab-name1, itab-name2, itab-name3.
endloop.
else.
write: 'There is no records found in the znew table'.
endif.
endif.
modify screen.
endif.
endif.
endloop.
Plz any one give solution.
Thanks in advance
03-05-2010 10:36 AM
Hello,
Your entire code is written in the At selection-screen output event. This event is triggered before your selection screen is displayed.
Just add the code written in my previous post in the event at selection-screen output.
After that write the other portion of code to update or display data from z table in the event start-of-selection.
start-of-selection.
if r1 = 'X'.
itab-name = p_name.
assign remaining fields with value from selection scree.
modify the z table.
else.
select data from z table into the internal table.
loop across the table and write the contents.
endif.
Modify the above pseudo code as per your requirement.
Hope this helps.
Regards,
Sachin
03-08-2010 4:22 AM
Hi frnds,
This issue was not sloved, Plz help me.
Thanks in advance.