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

Table maintainance events

Former Member
0 Likes
1,215

Hi All, I need to create a Table mantainence in which if one entry is selected for a field say field1 the i have to restrict the other field (field2) entry values in drop down with respect to field1. I have looked at the events but none of the event looks to me is not suitable to my situation. Please let me know if this can be done with the hlep of any event.

Thank You,

Regards,

Swaroop Patri

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,184

Instead of looking for standard table maintenance events u can try and write code in PBO PAI of the maintenance screen itself.

кu03B1ятu03B9к

10 REPLIES 10
Read only

Former Member
0 Likes
1,184

Hi,

you can set the type for the field1 as listbox visible length <n> user-comman <okcode>.

so once you select a value in the field1, at selection-screen event gets trigerred and there you can set the value of field2.

another way to acheive the same is

use

at selection-screen of value-request for field2.

write the code....

hope this is clear...

Regards,

Siddarth

Read only

0 Likes
1,184

Hi Sidharth, I am actually looking for any events that SAP provides when creating a Table Maintenance.

Regards,

Swaroop Patri

Read only

0 Likes
1,184

Hi,

Refer to this link...

[HOW TO IMPLEMENT EVENTS IN TABLE MAINTENANCE|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8129f164-0a01-0010-2a8e-8765287250fc]

Read only

Former Member
0 Likes
1,184

hi,

use t code : se30

so that u can enter any number of fields.

with regards,

sumanth reddy

Read only

Former Member
0 Likes
1,184

Hi,

Hi check this code you will get the output.Just copy and execute it...

Definiteli u will get the output

You will come to know that how to do the selection-screen on field validations..

If u use

at selection-screen on field event it will automatically de-highlight the other field..once u enter the value in the first field..Then the next field will be ready to be input...

execute the below code......

DATA:

  • w_str(52) TYPE c VALUE

*'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',

w_str(36) TYPE c VALUE '0123456789+-*/!@#$%^&()_=><.?":;|{},'.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE one.

PARAMETERS:

p_date LIKE sy-datum MODIF ID gr1,

p_uname TYPE sy-uname MODIF ID gr1.

SELECTION-SCREEN END OF BLOCK b1.

----


  • Frame for Details of the Employee *

----


SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE two.

PARAMETERS:

p_fname(10) TYPE c MODIF ID grp,

p_lname(10) TYPE c MODIF ID grp,

p_id(6) TYPE c MODIF ID grp.

SELECTION-SCREEN END OF BLOCK b2.

INITIALIZATION.

p_date = sy-datum.

one = 'Login Screen'.

two = 'Student Details'.

"----


  • AT SELECTION-SCREEN OUTPUT EVENT *

"----


AT SELECTION-SCREEN OUTPUT.

IF p_uname NE sy-uname.

LOOP AT SCREEN.

IF screen-group1 EQ 'GRP'.

screen-active = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ELSE.

LOOP AT SCREEN.

IF screen-group1 EQ 'GR1'.

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

"----


  • AT SELECTION-SCREEN ON FIELD EVENT

"----


AT SELECTION-SCREEN ON p_uname.

PERFORM validate_uname.

&----


*& Form validate_uname

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM validate_uname .

IF p_uname NE sy-uname.

MESSAGE 'Invalid User' TYPE 'E'.

EXIT.

ENDIF.

ENDFORM. " validate_uname

"----


  • AT SELECTION-SCREEN ON BLOCK EVENT

"----


AT SELECTION-SCREEN ON BLOCK b2.

PERFORM validate_details.

*&----


*

*& Form validate_details

*&----


*

  • text

*----


*

  • --> p1 text

  • <-- p2 text

*----


*

FORM validate_details.

IF p_fname EQ space OR p_lname EQ space OR p_id EQ space.

MESSAGE 'Please fill all the Fileds' TYPE 'S'.

ELSE.

IF p_fname CA w_str OR p_lname CA w_str.

MESSAGE 'Only Characters Allowed in Name Fields' TYPE 'S'.

ELSE.

MESSAGE 'Thank you,Press F8 to View the Details' TYPE 'S'.

ENDIF.

ENDIF.

ENDFORM. " validate_details

*start-of-selection.

"----


  • END-OF-SELECTION EVENT *

"----


END-OF-SELECTION.

IF p_fname IS INITIAL OR p_lname IS INITIAL OR p_id IS INITIAL.

MESSAGE 'Please Fill all the Fields' TYPE 'S'.

ELSE.

IF p_fname CA w_str OR p_lname CA w_str.

MESSAGE 'Only Characters Allowed in Name Fields' TYPE 'S'.

ELSE.

WRITE:/'User Name :', sy-uname,

/'First Name :', p_fname,

/'Last Name :', p_lname,

/'Employee ID :', p_id.

ENDIF.

ENDIF.

Regards

Kiran

Edited by: Kiran Saka on Feb 6, 2009 1:00 PM

Read only

Former Member
0 Likes
1,184
Read only

Former Member
0 Likes
1,185

Instead of looking for standard table maintenance events u can try and write code in PBO PAI of the maintenance screen itself.

кu03B1ятu03B9к

Read only

Former Member
0 Likes
1,184

Hi,

check below link

Regards,

Madhu

Read only

Former Member
0 Likes
1,184

Hi,

There is no Event provided for doing what you want to achieve as per your problem description.

Only way to solve this is as suggested by Kartik, do your own programming on value request Or on request in PAI event of your FG generated by SAP.

However if you regenerate FG again in future you need to re-program your changes again.

And seeing so many good replies from experts, i wonder if they understand what you are asking!

Regards

-Bin

Read only

Former Member
0 Likes
1,184

There are No Standard Events for this. I have modified the Code .

Thank You for all your replies