03-12-2010 4:36 PM
Dear all,
I created transaction variant ZVA02 as copy of VA02. If I start transaction ZVA02 the field SYST-TCODE is filled with VA02. Where can I see that the transaction was started via ZVA02. Is this information available in the order entry process?
Thanks.
Kind regards
Frank
03-12-2010 6:51 PM
You can use the method GET_CURRENT_TRANSACTION of class CL_DYNPRO.
An excerpt from the SAP documentation:
Alternatively, the method GET_CURRENT_TRANSACTION of the class CL_DYNPRO can be used to obtain the transaction code of the current transaction. This method returns the transaction code during a parameter transaction or variant transaction instead of the transaction code of the implicitly called dialog transaction.
Source: [http://help.sap.com/abapdocu_70/en/ABAPLEAVE_TO_TRANSACTION.htm|http://help.sap.com/abapdocu_70/en/ABAPLEAVE_TO_TRANSACTION.htm]
Hope this helps.
BR,
Suhas
03-12-2010 5:55 PM
Frank,
You can use function RS_HDSYS_GET_TC_VARIANT. Hope that helps.
03-12-2010 6:45 PM
Hi,
Though this is not the exact answer you are expecting, Is your transaction variant working??? You need to populate the variant name in exit MV45AFZZ (TVAK-VARIANT = 'Transaction variant name). Else you need to configure in SPRO. Because VA02 transaction variant works at order type level. With out using exit, you can see the changes done in the variant only in the initial screen. For further screens changes won't work.
I also tried in many ways. But was not able to get the variant name and ended up in creating a custom program for calling the transaction variant. Exported the T-code name to memory from here and import in the exits.
Thanks,
Vinod.
03-12-2010 6:51 PM
You can use the method GET_CURRENT_TRANSACTION of class CL_DYNPRO.
An excerpt from the SAP documentation:
Alternatively, the method GET_CURRENT_TRANSACTION of the class CL_DYNPRO can be used to obtain the transaction code of the current transaction. This method returns the transaction code during a parameter transaction or variant transaction instead of the transaction code of the implicitly called dialog transaction.
Source: [http://help.sap.com/abapdocu_70/en/ABAPLEAVE_TO_TRANSACTION.htm|http://help.sap.com/abapdocu_70/en/ABAPLEAVE_TO_TRANSACTION.htm]
Hope this helps.
BR,
Suhas