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: 

question regarding smartforms

Former Member
0 Kudos

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

4 REPLIES 4

Former Member
0 Kudos

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.

romit_raina
Active Participant
0 Kudos

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.

Former Member
0 Kudos

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

atul_mohanty
Active Contributor
0 Kudos


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.