cancel
Showing results for 
Search instead for 
Did you mean: 

structure of driver/print program when it is to be linked to me21n in NACE

Former Member
0 Kudos

Hi ABAPers,

what should be the structure of driver/print program when it is linked to ME21N in NACE.

Like, when a Purchase Order is created in me21n and print preview is to be seen from ME21N and PO Number is passed to Driver Program.So, here what part of code imports or takes in values from ME21N.

--Dep

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Thanks a lot guys.. I got Solution.

Former Member
0 Kudos

Thanks a lot guys.. I got the solution.

satyajit_mohapatra
Active Contributor
0 Kudos

Have you copied the driver program from any standard program?

I had written driver program with select-options as input criterion and used ssf_function_module_name to call my smartform

In the PO driver program, you can't have select-options. You have to download a standard program for it from market place and need to customize it. Otherwise copy program SAPFM06P and customize the entry_neu subroutine as per your requirement.

Check these links...............

Former Member
0 Kudos

Hi,

Nace tcode is used configure your smartform/script with relevant print program..

So your answer is: In NACE -> Select application like EF -> Output types -> Doble click on Processing unit -> In Processing unit -> double click on First enntry...

Now here you configures your form and print program.. Look in Processing routines .. In the Form routine.. there exist a form routine that must be called in your print program.. form here via your tcode (ME23n) control enters in Print program and start to interface with your form..

Pls check in your driver program in the begging, there must be an Entry routine.. (In is without any perform)

It is clear now???

Regs,

Lokesh..

Edited by: Lokesh Tarey on Apr 29, 2010 9:48 AM

Former Member
0 Kudos

Hi Lokesh Thanks for you reply,

Could you pls tell me more about entry routine.

Pls check in your driver program in the begging, there must be an Entry routine.. (In is without any perform)
It is clear now???

I had written driver program with select-options as input criterion and used ssf_function_module_name to call my smartform

now, when I create Po using ME21n and print privew there is an error. the PO number generated is not passed to the driver program and hence no print preview of smartform.

--Dep

Former Member
0 Kudos

Hi,

Can you please tell me the flow of code. are you calling Me21n in your driver program via call transaction?

As I told you earliear Form routine is the entrance gate within a driver program for your PO.. Now after calling ME21n, You need to define a form routine. Name of the form rutine wud be same given in NACE..

In that Form routine, fetch all the data that have to be on Form layout. Here keep in mind.. you need to fetch the data form any table using NAST-OBJKY. This is a objeck key, Must be equal to PO number coming from Me21n screen..

After fetching the data, Call the smartform ....

I think i have covered all the things.. Pls try this..

Below is exple code..put after calling Me21n..

*-----------------------------------------------------------------------
* FORM Entry Entry
*-----------------------------------------------------------------------

form entry using return_code us_screen.

  clear w_lwbpt_flag.
  clear retcode.
  xscreen = us_screen.
  perform fetch_all_data.  
  perform call_smartform.
  if retcode ne 0.
    return_code = 1.
  else.
    return_code = 0.
  endif.

endform.

Regs,

Lokesh.

Former Member
0 Kudos

Hi Lokesh,

Flow of my PO process.

1.1 I created a driver prog.(without entry routine as of now change to be made) and smartform to print PO created in ME21n transcation.

1.2 And there is no call trancaction in driver prog.

2. In NACE I have given smartform name and driver program name for PO generation.

3. Now, I go to transaction ME21n and create new PO and click on messages and ther is no print preview. This is prob. because of entry subroutine which is missing.

--Dep.

satyajit_mohapatra
Active Contributor
0 Kudos

What's your exact requirement?

The print programs are configured in transaction NACE. Goto application area EF->OUTPUT TYPES->Selct Output Type->Processing Routines. For different mediums you will find print programs and forms. There will be an entry routine in the print program. In this subroutine, FM ME_READ_PO_FOR_PRINTING & ME_PRINT_PO is called for form processing.