‎2008 Jun 10 3:14 PM
Dear friends,
I have t.code ZVL10G which is used to create deliveries.
I have put some custom logic in user exit - FORM USEREXIT_MOVE_FIELD_TO_LIPS as mentioned below.
the thing is that the code needs to be triggered only when executed with transaction 'ZVL10G'. I have put the condition as shown below but, it is not working.
FORM USEREXIT_MOVE_FIELD_TO_LIPS.
if sy-tcode eq 'ZVL10G'.
**custom logic
endif.
ENDFORM.
Kindly suggest on this issue.
‎2008 Jun 10 3:20 PM
Use
If T180-tcode eq 'ZVL10G'.
your code.
endif.instead.
G@urav.
‎2008 Jun 10 3:41 PM
In debug mode, T180-TCODE = 'VL01N' so, i can't use this info.
Thanks for ur quick reply....
‎2008 Jun 10 3:57 PM
then I guess ZVL10G must be calling VL01n internally.
You can try one more option..
sy-cprog stores the name of the program which starts the transaction.
Try putting condition on SY-PROG . It must solve the problem.
G@urav.
‎2008 Jun 10 4:03 PM
Yes, ZVL10G it's created a delivery..so it is calling VL01N transaction. for my include MV50AFZ1 the main program is SAPMV50A.
So, SYST-CPROG = SAPMV50A..
‎2008 Jun 10 4:11 PM
How are you creating delivery in ZVL10G?
Are you calling some BAPI/ BDC?
sy-cprog should store the calling program (can be the main program if started by main program).
If transaction is started from your z-program the sy-cprog has to be your Z-program.
Anyways, if this doesn't work then we can try some flag usage in ABAP /SAP memory.
G@urav.
‎2008 Jun 10 4:17 PM
Hi,
How are you creating delivery in ZVL10G?
When I execute the transaction ZVL10G, am getting all the filtered sales orders list. at the top I have push button 'Dialog' .
I need to select particular order and press 'Dialog' button, at this point of time our code in MV50AFZ1 is getting triggered.
Thanking you...
‎2008 Jun 11 2:48 PM
What I suggest is use some global flag in system(Export/import or Shared Memory Object).
set its value to ZVL10G when u click dialog, and use its value in user exit.After using it don't forget to clear that memory.
Also don't forget to reward if found helpful
G@urav.
‎2008 Jun 10 3:23 PM
Hi
you are correct it should work, try to check it agian in debugg mode.
regards