2014 Jun 11 2:20 PM
Hi Gurus,
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.
ENDIF.
ENDENHANCEMENT.
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.
Br,
Surya
2014 Jun 26 2:14 PM
Hi Team,
I have used the perform.
ENHANCEMENT 1 ZPGI_MAIL_SEND. "active version
DATA c_zlf TYPE likp-lfart.
IF sy-ucomm = 'WABU_T' and xlikp-lfart = c_zlf.
Perform entry( ZSD_DECLARATION_CONFORMITY )using return screen.
ENDIF.
ENDENHANCEMENT.
Now i am able to communicate with my program.
Thanks,
surya
Hello Surya,
You made the enhancement in the form: user_exit_save_document_prepeare
To my opinion you should do this in
*---------------------------------------------------------------------*
* FORM USEREXIT_SAVE_DOCUMENT *
*---------------------------------------------------------------------*
* This userexit can be used to save data in additional tables *
* when a document is saved. *
* *
* If field T180-TRTYP contents 'H', the document will be *
* created, else it will be changed. *
* *
* This form is called at from form BELEG_SICHERN, before COMMIT *
* *
*---------------------------------------------------------------------*
2014 Jun 12 2:01 PM
Hello Surya,
You made the enhancement in the form: user_exit_save_document_prepeare
To my opinion you should do this in
*---------------------------------------------------------------------*
* FORM USEREXIT_SAVE_DOCUMENT *
*---------------------------------------------------------------------*
* This userexit can be used to save data in additional tables *
* when a document is saved. *
* *
* If field T180-TRTYP contents 'H', the document will be *
* created, else it will be changed. *
* *
* This form is called at from form BELEG_SICHERN, before COMMIT *
* *
*---------------------------------------------------------------------*
2014 Jun 12 2:49 PM
Thanks Kees,
i tried with your suggesion but still the same problem.
not going into program ZSD_DECLARATION_CONFORMITY.
2014 Jun 12 9:03 PM
Hi Surya
Saw your post on linkedin.
Does it have to be a program? Maybe try call it in a RFC as a separate process
CALL FUNCTION 'ZSD_DECLARATION_CONFORMITY' IN BACKGROUND TASK AS SEPARATE UNIT
Secondly I would put in a endless loop.
DATA: lv_flag.
WHILE lv_flag = space.
"Do nothing
endwhile.
See if the process is running in SM50 then you can debug this application. Change lv_flag to X and you can continue to step through and debug.
Hope this helps.
CHeers
Brad
2014 Jun 26 2:14 PM
Hi Team,
I have used the perform.
ENHANCEMENT 1 ZPGI_MAIL_SEND. "active version
DATA c_zlf TYPE likp-lfart.
IF sy-ucomm = 'WABU_T' and xlikp-lfart = c_zlf.
Perform entry( ZSD_DECLARATION_CONFORMITY )using return screen.
ENDIF.
ENDENHANCEMENT.
Now i am able to communicate with my program.
Thanks,
surya
2016 May 19 12:03 PM
Hi Surya,
I have requirement same kind of. At time of Delivery Creation - VL01N. Before save option it should check field 'Distribution-chain-specific material status' - MVKE-VMSTA for Material - MATNR. I have used same perform suggested by you. But I am getting error. The RETURN filed is unknown.
Perform Statement is not working.
Please find below code.
IF sy-tcode EQ 'VL01N' AND fcode EQ 'SICH_T'.
TYPES : BEGIN OF ty_mvke,
matnr TYPE matnr,
vkorg TYPE vkorg,
vmsta TYPE vmsta,
END OF ty_mvke.
DATA : lt_mvke TYPE STANDARD TABLE OF ty_mvke,
lw_mvke TYPE ty_mvke.
CONSTANTS : lc_ma TYPE vmsta VALUE 'MA',
lc_a100 TYPE vkorg VALUE 'A100'.
IF likp-vkorg EQ lc_a100 AND xlips[] IS NOT INITIAL.
SELECT matnr
vkorg
vmsta
FROM mvke
INTO TABLE lt_mvke
FOR ALL ENTRIES IN xlips
WHERE matnr EQ xlips-matnr AND
vmsta EQ lc_ma.
IF sy-subrc EQ 0.
Perform entry(zsd_delivery_save) USING return screen.
ENDIF.
ENDIF.
ENDIF.
Please help. Thanks in advance.
Regards,
Darshan
2016 May 19 12:52 PM
Hi Surya,
I have requirement same kind of. At time of Delivery Creation - VL01N. Before save option it should check field 'Distribution-chain-specific material status' - MVKE-VMSTA for Material - MATNR. I have used same perform suggested by you. But I am getting error. The RETURN field is unknown.
Perform Statement is not working.
Please find below code.
IF sy-tcode EQ 'VL01N' AND fcode EQ 'SICH_T'.
TYPES : BEGIN OF ty_mvke,
matnr TYPE matnr,
vkorg TYPE vkorg,
vmsta TYPE vmsta,
END OF ty_mvke.
DATA : lt_mvke TYPE STANDARD TABLE OF ty_mvke,
lw_mvke TYPE ty_mvke.
CONSTANTS : lc_ma TYPE vmsta VALUE 'MA',
lc_a100 TYPE vkorg VALUE 'A100'.
IF likp-vkorg EQ lc_a100 AND xlips[] IS NOT INITIAL.
SELECT matnr
vkorg
vmsta
FROM mvke
INTO TABLE lt_mvke
FOR ALL ENTRIES IN xlips
WHERE matnr EQ xlips-matnr AND
vmsta EQ lc_ma.
IF sy-subrc EQ 0.
Perform entry(zsd_delivery_save) USING return screen.
ENDIF.
ENDIF.
ENDIF.
Please help. Thanks in advance.
Regards,
Darshan
2016 Jun 14 1:53 PM
Sorry Darshan ,
But for now i do not have any idea what i have done for return,
Please post here what you are going to do for the same.
Br,
Surya
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |