I have a question regarding post goods issue (PGI) for transaction vl01n,vl02n and vl06g.
earlier i have created a smartofrm and a driver program for sending the form output attachment in a mail after delivery posting manually.
for this i have created a smartform and driver program in which all the logic to attach and mail send is written on delivery posting.
but now customer want this fucntionality on Post goods issue (PGI), when user go to trasaction vl01n ,vl02n and vlo6g and pressing PGI button,
then mail should be sent automatically with for output attachment.
i have found a user exit which is being triggerd on PGI press MV50AFZ1 in which implemented the implecit enhancement in perform
user_exit_save_document_prepeare with below code.
ENHANCEMENT 1 ZPGI_MAIL_SEND. "active version
DATA c_zlf TYPE likp-lfart.
IF sy-ucomm = 'WABU_T' and xlikp-lfart = c_zlf.
SUBMIT ZSD_DECLARATION_CONFORMITY AND RETURN.
After going to transaction vl02n i am putting unposted delivery number and clicking on PGI button.
in debugging its going to condition check for ucomm for PGI buttion and delivery type.
if condtion is fullfiled and curser going further on submit statement, but without executing the driver program ZSD_DECLARATION_CONFORMITY it coming out of enhancement.
its not performing the task which is develped in the driver program.
Please help me with the submit statement structure if i am missing any or other solution for my problem.