2007 Jul 12 3:39 AM
Hi All,
I have an investigation regarding Purchase Order (ME22N). Please read the user's email below:
<b><i>"When EKKO-FRGKE = B, we cannot send the PO thru auto email. I believe this is a standard function in SAP. Therefore, I am assuming that there is condition in the print program which may indirectly check the release status of the PO. I am not so sure about this but logically, this is how the program behaves."</i></b>
If I'm not mistaken aside from NAST_NACHA checking, theres no other checking that would determine whether the program would send PO or not.
My question is given that FRGKE was not checked in the program, then, how does the program sends a PO?
Aside from NAST-NACHA, what is the condition being checked in determining whether to send the PO or not?
Please help investigate or just give me an idea on how to solve this problem as soon as possible.
Thanks a lot,
Carina
2007 Jul 12 3:49 AM
You can write the code in print program SAPFM06P -> copy the program into zprogram and do the modification,use this program in ur output type.
This is easiest way.
Thanks
Seshu
2007 Jul 12 3:53 AM
Hi,
Thanks but I'm not modifying the program. My question is, aside from field NACHA and FRGKE, is there any other fields that would determine whether to send PO or not?
Please help.
Thanks.
Carina
2007 Jul 12 4:07 AM
I usally write like :
if sy-tcode = 'ME22N' or 'ME22'.
if nast-kschl = ur output type
if ekko-frgke = ur condition
if nast-nacha = value.
sy-subrc = 4. or do not call open_form.
endif.
endif
endif.
endif.
I did similar requirement for sales order ,i written the code in VOFM Routine.
there i used sy-subrc eq 4.
Thanks
Seshu
2007 Jul 12 4:18 AM
Hi,
Thanks again.
I checked the program but it has no condition IF EKKO-FRGKE. The only condition it checks is only the field nast-nacha. The problem is when frgke = B, the PO was not sent, but when frgke = R, the PO was sent. How come this happen if the program has no condition IF EKKO-FRGKE?
Please help again.
Thanks.
Carina
2007 Jul 12 4:52 AM
Which program are you checking ?
easiest solution would be print program of purchase order ( SAPFM06P)
Thanks
Seshu