2012 Feb 04 6:29 PM
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
2012 Feb 05 5:29 AM
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....
2012 Feb 05 5:29 AM
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....
2012 Feb 05 6:02 AM
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
2012 Feb 05 4:57 PM
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.....
2012 Feb 05 5:12 PM
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
2012 Feb 05 6:04 PM
Well....i tried and using TMG and then modifying it seemed too arduous to me. Just my two cents
2012 Feb 06 5:09 AM
2012 Feb 06 9:41 AM
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_aaBR,
Suhas
2012 Feb 06 9:47 AM
Thanks Suhas ...... this has been baffling me since yesterday.
2012 Feb 06 10:59 AM
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
2012 Feb 06 11:18 AM
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
2012 Feb 06 11:25 AM
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
2012 Feb 06 11:38 AM
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
2012 Feb 06 11:43 AM
Hi Suhas,
Sorry typo error Thanks a ton for your prompt response.
Regards,
Abdul Hakim
2012 Feb 06 6:12 PM
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.
2012 Feb 06 7:59 PM
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