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: 

ME_READ_PO_FOR_PRINTING function Module

Former Member
0 Kudos

Hi,

I am new to MM Module and i dont have any idea about the Purchase Order.

Please provide me some details about the Function Module 'ME_READ_PO_FOR_PRINTING'.

1. Why we have to go for this Function Module.

2. What should be the inputs for this Function Module.

3. What will be the Output.

Thanks&Regards,

Mohanraj.N

5 REPLIES 5

Former Member
0 Kudos

hi,,,,,,

sending you the sample code this will explain the Exporting and Importing Parameters, If you want to read the documantation part just go to se37 and enter the Function module name there will be documantation push button in the application tool bar, press that.

The function modules ME_READ_PO_FOR_PRINTING and ME_PRINT_PO are used to read and print the PO


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.

Thanks

Saurabh

Former Member
0 Kudos

Hi ,


*tables
TABLES : NAST.            "messages

*type declaration for messages
TYPES : BEGIN OF TY_NAST.
        INCLUDE STRUCTURE NAST.
TYPES : END OF TY_NAST.
data :  IT_NAST   TYPE STANDARD TABLE OF NAST         WITH HEADER LINE,
           IT_DOC  TYPE STANDARD TABLE OF MEEIN_PURCHASE_DOC_PRINT  WITH HEADER LINE,    
data : U_SCREEN(1)    TYPE C,                       "Output on printer or screen
         U_RETURN_CODE  TYPE SY-SUBRC.    ""variable for return code
DATA:   V_DRUVO LIKE T166K-DRUVO,           "variable for print indicator
        V_FROM_MEMORY TYPE C.               "flag to read from memory

*****V_DRUVO will have the value of
  CLEAR U_RETURN_CODE .
  IF NAST-AENDE EQ SPACE.
    V_DRUVO = '1'.
  ELSE.
    V_DRUVO = '2'.
  ENDIF.




  CALL FUNCTION 'ME_READ_PO_FOR_PRINTING'
    EXPORTING
      IX_NAST        = NAST
      IX_SCREEN      = U_SCREEN
    IMPORTING
      EX_RETCO       = U_RETURN_CODE
      EX_NAST        = IT_NAST
      DOC            = IT_DOC
    CHANGING
      CX_DRUVO       = V_DRUVO
      CX_FROM_MEMORY = V_FROM_MEMORY.

You will get the data output in IT_DOC.

Hope this helps you.

Vikki.

Former Member
0 Kudos

Hi,

I know the Code, but there is not documentation available for this FM.

I need some details what exactly this will be helpful.

What should be the input table will have and what will be the output.

Former Member
0 Kudos

Hi,

I hope this info would help u :

-


When we have to do a purchase order in SAPSCRIPT starting from a standard po. suppose we want to add some more data on print out PO. After figure out for some time, we don't know where to do abap sql statement.

Like example, I want to retriece some data from the ADRC table. I opened the standard program SAPFM06P to add in the some sql statement, but i dun know where should i add in. Bcz if we straight away put the related ADRC field in our sapscript, it is useless.

---. for inputs and outputs you can refer the afore said reply by Saurabh Siwach

Former Member