Application Development 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: 

How to create a variant used in SM30,View variant in Parameter transaction?

former_member417922
Participant
0 Kudos

Dear Team,

I have a view V_TCURR. For which I would be creating a parameter transaction for transaction SM30 by filling the default Values section (VIMDYNFLDS-LTD_DTA_VR, VIEWNAME,TVIMV-VARIANT). The values for first two fields are obvious.

The question is on TVIMV-VARIANT How can we create a variant which can be used in tcode SM30.

Delving a little deeper show that these variants Obsolete since R/3 Release 3.1I: Selection variant for a table or maintenance view.

Since R/3 Release 4.0, there are view variants instead of selection variants.

The field only exists for reasons of backwards compatibility.

If thats is so, How do I use the same in parameter transaction..?

I have tried creating a view variant and use it parameter transaction but in vain..

Please help resolve my problem. I hope I am very clear. If still need any clarification, please get back to me.

Thanks a lot in advance,

Reagards,

Sai.

P.S. Though there are multiple quuestions on simlar subjects none of them has been either answered or is completely relevant to mine.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Please go through below steps to restrict the table maintenance for specific fields or values. ( Assuming you have already generated the table maintenance for the table ( for ex ZTABLE ) ).

1. Goto SE54 ( Generate Table Maintenance Dialog ) and click 'Edit View Variant'.

2. In the Maintain View Variant enter a new View variant name and click create. Enter short description and in the Table/Join Conditions enter the table name ( ZTABLE ).

In the View Flds , choose the fields which are to be displayed in the table maintenance.

In the Selection Conditions, enter any restrictions if you want the table maintenance only for specific data.

3. Save and Activate the Maintenance View variant.

4. Create a transaction of type 'Transaction with parameters' and input Transaction 'SM30' check Skip initial screen and enter the newly created Maintenance view variant name for 'VIEWNAME' and include either 'SHOW' or 'UPDATE' as 'X'.

6 REPLIES 6

Former Member
0 Kudos

Please go through below steps to restrict the table maintenance for specific fields or values. ( Assuming you have already generated the table maintenance for the table ( for ex ZTABLE ) ).

1. Goto SE54 ( Generate Table Maintenance Dialog ) and click 'Edit View Variant'.

2. In the Maintain View Variant enter a new View variant name and click create. Enter short description and in the Table/Join Conditions enter the table name ( ZTABLE ).

In the View Flds , choose the fields which are to be displayed in the table maintenance.

In the Selection Conditions, enter any restrictions if you want the table maintenance only for specific data.

3. Save and Activate the Maintenance View variant.

4. Create a transaction of type 'Transaction with parameters' and input Transaction 'SM30' check Skip initial screen and enter the newly created Maintenance view variant name for 'VIEWNAME' and include either 'SHOW' or 'UPDATE' as 'X'.

0 Kudos

Dear Suman,

Thanks a lot for the answer. Actually the Tcode is getting created if I do what you have said me.

But when I run the tcode which was created by view variant created, I am not getting the desired details .

To be more clear..

Previously there was a variant (TMIMV-VARIANT) created with follwing criteria..

Table TMIMV.

TABNAME VARIANT AS4POS VIEWFIELD NEGATION OPERATOR VALUE AND_OR TABIX

V_TCURR ZTHB 1 KURST NOT EQ M AND 2

V_TCURR ZTHB 2 KURST NOT EQ DWBP AND 2

V_TCURR ZTHB 3 TCURR EQ THB OR 4

V_TCURR ZTHB 4 TCURR EQ USD OR 4

V_TCURR ZTHB 5 TCURR EQ US$ 4

When we run tcode created by paramaeter transaction.. viewname as V_TCURR, TMIMV-VARIANT. I am getting the desired records for updation.

But if I do the same using View variant with the same selection criteria

Table Field name Operator Comaparison AND/OR

Value

TCURR KURST NE 'M' AND

TCURR KURST NE 'DWBP' AND

TCURR TCURR EQ THB OR

TCURR TCURR EQ USD OR

TCURR TCURR EQ US$

And the run the tcode created by using the view variant .. I am getting No entries found that match selection criteria...

Could you please help and let me know if I am missing any step.. Kindly also check from your side how this can be achieved.

Thanks a lot in advance,

Sai.

0 Kudos

Actually V_TCURR is a Maintenance view for table TCURR and TCURR doesnt have table maintenance generated. The steps I explained earlier were for table with table maintenance generated.

In order to create SM30 variant for TCURR table, Create a Maintenance view for the table TCURR in SE11 with Selection Conditions and then generate the table maintenance for the newly created maintenance view.

Create the Parameters transtions with SM30 and VIEWNAME as the newly created maintenance view.

0 Kudos

Maintenance view for TCURR is V_TCURR.

If you want to create a transaction which will call maintenance view V_TCURR, then follow below steps:

1. Go to SE93

2. Put required custom t-code name and press create button

3. Select Transaction with Parameters (parameter transaction)

4. On subsequent screen, put Transaction as SM30

5. Select check box Skip Initial Screen

6. Under default values section at botton on the screen, select name of field as VIEWNAME, and put value as V_TCURR

7. Under default values section at botton on the screen, select name of field as UPDATE, and put value as X

8. Save the transaction

9. Execute the transaction.It will work.

0 Kudos

Amol, The question or answers were not for how to create a transaction code for maintenance view V_TCURR as we already have lot of standard transactions for the V_TCURR SM30 transactions. The question or answer is for how to create SM30 for V_TCURR with restrictions ( fields restriction and rows restriction - for ex To show/update only USD currency rows ).

Existing transaction codes for V_TCURR SM30 - GCW6, OB08, OC41, OKC8, OKUS.

0 Kudos

Thanks a lot Suman..

And apologies for the late reply..

It had solved my problem..

I had to create events, also copy the Maintenance Screen and customise the includes for my View.

Doing all these My view has become similar to V_TCURR with selction conditions.

Regards,

Sai