Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Call Special Function with custom program

Former Member
0 Kudos
2,602

Hello Everyone,

I have a requirement that when ever i m creating the purchase order through me21n and when i will click on save button "i have to call a ZPROGRAM" . Functional consultant saying that he creates an output type and configured it in NACE by assigning one driver program and he is giving the transmission media as 8(Which is nothing but special function) for the output.....

I have created a new Order Type in application "EF(purchase order)" , but my ZPROGRAM is not triggered after saving Purchase Order which i have assigned in Processing routine with special function (8) .

Please help me how to implement .

Regards,

Chandni Sharma

1 ACCEPTED SOLUTION

Former Member
0 Kudos
561

Hi Chandni,

In the NACE, You need to assign the driver program and the processing routine name. Processing routine name is nothing but the FORM name inside the report.

In general, you can give ZPROGRAM name and form name as ENTRY. Your report should have a FORM ENRTY. Write the code logic inside the FORM ENTRY....ENDFORM.

Cheers

~Niranjan

6 REPLIES 6

Former Member
0 Kudos
562

Hi Chandni,

In the NACE, You need to assign the driver program and the processing routine name. Processing routine name is nothing but the FORM name inside the report.

In general, you can give ZPROGRAM name and form name as ENTRY. Your report should have a FORM ENRTY. Write the code logic inside the FORM ENTRY....ENDFORM.

Cheers

~Niranjan

0 Kudos
561

Hi niranjan,

as per my requirement  i want to execute a BAPI in this ZPROGRAM and i have already mentioned this ZPROGRAM and FORM routine in NACE

ZPROGRAM is as follows:-

REPORT ZPROGRAM MESSAGE-ID E0.

FORM SPECIAL_FUNCTION_PROCESSING USING RC

                                       US_SCREEN.

  "CODE FOR BAPI"

ENDFORM.                    "SPECIAL_FUNCTION_PROCESSING

but still  my code is not triggered after saving PO.

Thanks & Regards

Chandni

Former Member
0 Kudos
561

Hi Chandni ,

If u give the FORM NAME = ENTRY_NEU than u have write ur code in below way.

ZPROGRAM.

FORM ENTRY_NEU.

.

.

.

.

.

ENDFORM.

Check and let me know.

Thanks

Tarak

0 Kudos
561

HI,

i have tried you solution but still the debugger is not triggered ,

Can you please confirm that special function is triggered after saving PO

Regards,


Chandni

bastinvinoth
Contributor
0 Kudos
561

Hi Chandni,

Try with alternate function ,  trigger one pop up while saving PO

in pop up u display like Do u want to go custom program ?

if yes  means trigger your custom program.

no means leave , as it is.

am just suggesting my alternate method only.

if u dont want popup then call your custom prog directly by using following  userexits..

EXIT_SAPMM06E_013 -  You can use this user exit. It will trigger on saving of PO

Enhancement : MM06E005

0 Kudos
561

Hi,

Thanks for you solution but i have to do this using special function only.

Regards,

Chandni