12-22-2014 1:18 PM
I have designed a custom smartform related to purchase order and my requirement is to trigger that smartform from ME21N/ME22N .Here I need to define new output type in nace for this smartform and I have copied the Print program SAPFM06P to ZSAPFM06P . Now what change I need to do in z...... program to incorporate my custom smartform logic(like the contents of table, header) , so that The custom smartform will be triggered from ME22N .
Kindly give the step by step approach .
Arnab
12-22-2014 2:05 PM
Hi,
Add the program and form name in NACE transaction also add your subroutine name at Form Routine option, in program at subroutine definition you can call the Form and implement your logic.
Hopes it helps you.
Thanks,
Ashok.
12-22-2014 2:07 PM
Hello,
As i Understand you correctly , you want to put your Z form in place of the standard for which is triggering to print PO details. below are the steps :
Goto Nace
-->Choose EF on next screen
--> Click on the OUTPUT TYPE
--> Select NEU (Puchase Order) on next screen.
--> Click on Processing Routine on the left side
--> In the Print Output line --> Print Program will be /SMB40/FM06P
--> Change the standard Form name with your Z form name.
Hope this will help you .
Thanks
Romit Raina.
12-22-2014 2:11 PM
Hi Arnab,
In NACE, changes can be made in NEU output type also by putting a Z program name and also we need to put the Z SMARTFORM name.
In the Program, you will see a routine called - ENTRY_NEU where all the logic for fetching data from EKKO/EKPO etc is fetched in standard. Also from the same routine the 'Z' smartform name which is maintained in NACE is called.
In the Z smartform also we can write the logic for fetching data from database tables if required.
Please let me know in case you looking for any other information.
Regards,
Aashika Agarwal
12-22-2014 2:44 PM
Hi Arnab -
1. In standard, for output type, you have program SAPFM06P and form routine - ENTRY_NEU and form (SAP script) - MEDRUCK.
2. When you copy SAPFM06P to ZSAPFM06P (SE38 Program) then you keep the same structure of ENTRY_NEU as it is with its parameters
FORM entry_neu using ent_retco ent_screen.
ENDFORM.
3. Then create the custom smart form fist in smart form transaction .
4. Configure these with the output type in NACE.
5. In SE38 - ZSAPFM06P, in the you can write your code inside subroutine
FORM entry_neu using ent_retco ent_screen.
ENDFORM.
to call the smart form.
6. You can get the details of purchase order from table EKKO / EKPO considering the purchase order no NAST-OBJKY(10).
Let us know if it helps.