10-09-2013 8:21 AM
Dear Sir,
We have created a transaction variant "ZMB1A" for a dialog transaction MB1A . During execution of ZMB1A , by using USER-EXIT we want to know the name of transaction being used . For this in a USER-EXIT associated with MB1A , we are using SY-TCODE , but the problem is that SY-TCODE is returning MB1A and not ZMB1A .
Kindly guide us , how can we get the actual transaction name i.e ZMB1A .
With regards
B Mittal
10-09-2013 8:43 AM
http://scn.sap.com/thread/0001961229
Oliver Russinger said "see class cl_abap_syst and documentation on mehtod get_transaction_code , it returns the name of the FIRST calles transaction"
10-09-2013 9:07 AM
Hi Matthew.
For a transaction variant will call the original tcode, I don't think that this will work properly.
Regards,
Klaus
10-09-2013 9:03 AM
Hi,
please check this code from include report LSHSYU01:
* New field: transaction variant
CALL 'DY_GET_TX_VARIANT'
ID 'VARIANT' FIELD TCODE_VARIANT
ID 'CLIENT_INDEPENDENT' FIELD TCODE_VARIANT_CLIIDEP.
I've checked it with VF01 and a transaction variant of VF01. I think, you can use it in your userexit.
Regards,
Klaus
10-09-2013 9:06 AM
These allow you to preassign values to fields within a transaction, define field attributes, or hide entire screens.
You can find straight solution to your question which is already available in SCN.
Check for useful ness : http://scn.sap.com/thread/1632369
Cheers
Ansumesh