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

SELECT-OPTIONS in table maintenance generator screen

abdul_hakim
Active Contributor
0 Likes
4,668

Hi

Is it possible to create SELECT-OPTIONS in table maintenance screen?

My requirement is to allow the user to enter single Company code and Range of G/L Accounts in the Table Maintenance input screen. Please let me know.

Thanks

Abdul Hakim

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,620

You can restrict the data that is to be maintained by using the 'RESTRICT DATA RANGE' options in SM30.

Use 'Enter Conditions' or a 'Variant'.

Hope this is what you wanted....

15 REPLIES 15
Read only

Former Member
0 Likes
3,621

You can restrict the data that is to be maintained by using the 'RESTRICT DATA RANGE' options in SM30.

Use 'Enter Conditions' or a 'Variant'.

Hope this is what you wanted....

Read only

0 Likes
3,620

Let me rephrase my question in more detail.

I have a table with two fields( Company code and GL Account ). I am creating a table maintenance for this table.

When i go to SM30 and select NEW ENTRIES it will open up a screen where it allows me to enter Single Company code and Single GL Account.

My requirement is to allow the user to enter Single Company code and Multiple GL Account when we select NEW ENTRIES option in SM30. Is this solution possible?

Thanks

Abdul Hakim

Read only

0 Likes
3,620

I'm sorry sir...but this completely baffles me.

But then comes the question....why not write a simple program with selection screen for it.

Also would be easier to enhance.

But if you insist ... I have an idea if it might be possible

In the Fn Grp, add a screen with a subscreen area. In that you might be able to add a selection screen with an input fields as desired... But I'd still stick to my first statement.....

Read only

0 Likes
3,620

Hey

Thanks for the update. Even i know that this can be achieved thru custom solution but would like to understand whether the solution is possible using table maitenance generator.

Thanks

Abdul Hakim

Read only

0 Likes
3,620

Well....i tried and using TMG and then modifying it seemed too arduous to me. Just my two cents

Read only

Tamas_Hoznek
Product and Topic Expert
Product and Topic Expert
0 Likes
3,620

No.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
3,620

Hello Tamas,

As a matter of fact we can add a custom selection-screen to the TMG screen & without manually modifying the TMG

You can do so by using the [Event AA: Instead of the Standard Data Read Routine|http://help.sap.com/saphelp_nw04s/helpdata/en/91/ca9f56a9d111d1a5690000e82deaaa/content.htm].

Please check the code snippet:

DATA: gv_fldate TYPE s_date.

* User-defined selection-screen
SELECTION-SCREEN: BEGIN OF SCREEN 9000.
PARAMETERS:     p_carrid TYPE s_carr_id OBLIGATORY.
SELECT-OPTIONS: s_fldate FOR gv_fldate OBLIGATORY.
SELECTION-SCREEN: END OF SCREEN 9000.
*&---------------------------------------------------------------------*
*&      Form  sub_yvsflight_event_aa
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
FORM sub_yvsflight_event_aa.

  DATA: ls_temp_data TYPE yvsflight,
        lt_temp_data TYPE STANDARD TABLE OF yvsflight.

* Call the user-defined selection-screen
  CALL SELECTION-SCREEN 9000 STARTING AT 25 10.

* Populate the int. table TOTAL
  PERFORM get_data_yvsflight.

* Delete the records which are not required
  LOOP AT total.
    ls_temp_data = <vim_total_struc>. "Copy to local struct.
    IF ls_temp_data-carrid NE p_carrid OR
       ls_temp_data-fldate NOT IN s_fldate.
      DELETE total. "Remove the record from the TOTAL
    ENDIF.
  ENDLOOP.

ENDFORM.                    "sub_yvsflight_event_aa

BR,

Suhas

Read only

0 Likes
3,620

Thanks Suhas ...... this has been baffling me since yesterday.

Read only

0 Likes
3,620

Hi Suhas,

Thanks for the update.

My table has two fields 1. Company code 2. G/L Account

i need to define SELECT-OPTIONS for G/L Account.

if i follow the process that you have highlight how do i update the GL Account range in the table. Do i need to write my own update logic? My question may be silly but i have not done this earlier. Thanks

-Abdul Hakim

Edited by: Abdul Hakim on Feb 6, 2012 6:00 AM

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
3,620

Hello Abdul,

if i follow the process that you have highlight how do i update the GL Account range in the table. Do i need to write my own update logic?

I don't get your point? You want to filter the data displayed via TMG using the input from the selection-screen, right? If that is the case then your SELECT-OPTIONS will behave as the range, why do you want to define a separate range for G/L?

Btw, did you read the online documentation on the TMG Event AA? Imho if you read it you can follow my code snippet easily! Let me know which part of the code you don't understand?

BR,

Suhas

Read only

0 Likes
3,620

Hi Saha,

Let me rephrase my requirement here in detail again:

1. My table has only two fields Company code and G/L Account

2. I am generating two step dialog for data maintenance

3. When i select NEW ENTRIES in SM30 it will open up a new screen where i can enter Company code and GL Account.

Here SAP allows you to enter only Single Company code and Single GL Account at a time.

My requirement is when i select NEW ENTRIES in SM30 i should get a screen where it allows me to enter Single Company code but Range of GL Account for me to update.

I know this can be achieved thru custom solution by completing ignoring Table maintenance concept but my question whether this requirement is possible using Table Maintenance Concept.

Thanks

Abdul Hakim

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
3,620

Hello Abdul,

My requirement is when i select NEW ENTRIES in SM30 i should get a screen where it allows me to enter Single Company code but Range of GL Account for me to update.

AFAIK this is not possible via normal TMG events. IMO this is very specific requirement & i don't expect TMG events to provide this functionality.

BR,

Suhas

PS: The name's Suhas & not Saha

Read only

0 Likes
3,620

Hi Suhas,

Sorry typo error Thanks a ton for your prompt response.

Regards,

Abdul Hakim

Read only

Tamas_Hoznek
Product and Topic Expert
Product and Topic Expert
0 Likes
3,620
Hello Tamas,

As a matter of fact we can add a custom selection-screen to the TMG screen 
& without manually modifying the TMG ;-)

What I meant is that the standard table maintenance generator doesn't offer the capability the OP was asking about.

Read only

Former Member
0 Likes
3,620

Abdul,

My understanding of your request is that you want to add rows to your table via SM30. You want to enter 1 company code and then multiple GL acct numbers. Then you want to add one row for each gl account you enter all having the same company code. If that is correct, then SM30 is not the way to do this. AFAIK the only way would be a custom ABAP program. Is there a problem for you to do that? Sometimes it is easier to turn the knob and open the door than to bash it in with a sledge hammer.

Edited by: Larry Browning on Feb 6, 2012 2:05 PM