cancel
Showing results for 
Search instead for 
Did you mean: 

PO Output Type / Processing Routine Problem

Former Member
0 Kudos

Hello everyone,

I cannot seem to find any reference to the problem described below.

I have encountered a problem by migrating from SAPFM06P to SAPLMEDRUCK during an ECC 5.0 upgrade, at a client where I am under contract as an ABAP Developer.

Here is some background to the situation. The client is currently migrating from version 4.6C to 5.0 and thought it was a good idea to upgrade their purchase order messaging programs from the outdated SAPFM06P, which was utilized in version 3.x, to the newer program SAPLMEDRUCK implemented for use in version 4.6.

Specifically, Message Output (ME9F) controls the output of purchase order messages in foreground, when the purchase order message is saved and the "further Data option" of the PO message contains "requested processing" equal to the value of "send with application own transaction". This way, the actual messaging can be controlled in foreground and "breakpoints" can be set to display tables and fields. Behind the scenes, the message status program RSNAST00 is executed by ME9F program RM06ENDR_ALV. During this execution, it locates the message (NAST) record from the purchase order and the (TNAPR) configuration, which links the output type to the ABAP print program and SAPscript layout set. The specific problem is: in RSNAST00, the external call perform "PERFORM (TNAPR-RONAM) in PROGRAM (TNAPR-PGNAM) USING RETURNCODE US_SCREEN IF FOUND" does not pass NAST information to the called program (TNAPR-PGNAM). I know no NAST table information is passed because I set a break-point on the perform and single step to the print program. Therefore, the purchase order is unknown by the print program (TNAPR-PGNAM) and results in an error and no purchase order print is provided. Needless to say, this was tested with a new "Z" version of SAPLMEDRUCK. So, I changed the program name (output type processing routine) in configuration to SAPLMEDRUCK, but there again the NAST information is not passed to the print program from RSNAST00. Ironically, I reverted back to the older "z" version of SAPFM06P and NAST and TNAPR information is passed to the print program thru the external call perform quoted above. I prefer to not modify the SAP original code for RSNAST00, which is used in many other applications.

One other note, I had previously performed this maneuver on one different occasion with very successful results.

Has anyone ever encountered this problem in a 5.0 environment (running Windows NT and MSSQL and SAP BASIS 6.4).

I know this is long winded, but I wanted to explain the background of the entire situation.

Any and all help would be appreciated. Thanks in advance,

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Rick,

Although this post is pretty old already, I would like to ask you if you found a solution to this problem.

I now have the same problem, also after updating from SAPFM06P to SAPLMEDRUCK.

And since NAST is required in fm ME_READ_PO_FOR_PRINTING, no data is collected or processed.

It did work before, but somehow it doesn't work at the moment and I have no idea what has been changed in the system.

Thanks in advance,

Dave

Former Member
0 Kudos

Dave,

Your entry points (like form ENTRY_NEU) should remain in your current version of SAPFM06P. Change that form to reflect the function calls in the new SAPLMEDRUCK form (ENTRY_NEU) (calls to ME_READ_PO_FOR_PRINTING and ME_PO_PRINT.

Look at the example below:

Here is the form in your old (Z) version of SAPFM06P:

FORM ENTRY_NEU USING ENT_RETCO ENT_SCREEN.

XSCREEN = ENT_SCREEN.

IF NAST-AENDE EQ SPACE.

XDRUVO = '1'.

ELSE.

XDRUVO = '2'.

ENDIF.

CLEAR: XFZ, XOFFEN, XLMAHN, XLPET.

*- Anstoß Verarbeitung -


*

CLEAR ENT_RETCO.

PERFORM LESEN USING NAST.

MOVE RETCO TO ENT_RETCO.

ENDFORM.

Here is form entry_neu in your new (Z) version of SAPFM06P:

*----


*

  • INCLUDE FM06PE02 *

*----


*

form entry_neu using ent_retco ent_screen.

data: l_druvo like t166k-druvo,

l_nast like nast,

l_from_memory,

l_doc type meein_purchase_doc_print.

clear ent_retco.

if nast-aende eq space.

l_druvo = '1'.

else.

l_druvo = '2'.

endif.

call function 'ME_READ_PO_FOR_PRINTING'

exporting

ix_nast = nast

ix_screen = ent_screen

importing

ex_retco = ent_retco

ex_nast = l_nast

doc = l_doc

changing

cx_druvo = l_druvo

cx_from_memory = l_from_memory.

check ent_retco eq 0.

call function 'ME_PRINT_PO'

exporting

ix_nast = l_nast

ix_druvo = l_druvo

doc = l_doc

ix_screen = ent_screen

ix_from_memory = l_from_memory

ix_toa_dara = toa_dara

ix_arc_params = arc_params

ix_fonam = tnapr-fonam "HW 214570

importing

ex_retco = ent_retco.

endform.

Remember, the form should be in the Z version of SAPFM06P - not the Z version of SAPLMEDRUCK. Make sure the configuration (TNAPR) has the SAPFM06P program name and entry point.

It should work. Let me know how it goes.

Rick

Former Member
0 Kudos

Hi Rick,

Thanks a lot! Now it works..

Is it because SAPLMEDRUCK is a function pool program and SAPFM06P is a subroutine pool?

Anywayz, thanks!

Former Member
0 Kudos

Just for information sake, this problem was solved by using the entry points (forms) from SAPFM06P and changing those entry points (like ENTRY_NEU) to add the new SAPLMEDRUCK function modules - ME_READ_PO_FOR_PRINTING and ME_PRINT_PO, which will utilize the 4.6 and beyond logic of the function group MEDRUCK. Note: you may have to include a select of TNAPR within ME_PRINT_PO to capture the correct SAPscript form layout set by using corresponding key fields from NAST.