Skip to Content
avatar image
Former Member

How to Call Standard PO Form in my Z program

Hi All,

Could you please tell me, How to Call the Standard PO form in my Z program for print priview and printing.

My requirement is :

Create Z program with PO Number as Selection screen.When we give the PO Number and Press execute it will show the print priview with printer option.

Thanks & Regards

Murali

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

6 Answers

  • avatar image
    Former Member
    Mar 23, 2009 at 01:30 PM

    Process the output type of the po form thru ur program,

    check my wiki on how to do it https://wiki.sdn.sap.com/wiki/display/ABAP/ProcessOutputtypesthroughprogram

    in the code given in wiki just pass the output type and wa_nast objky as po number that u get from selection screen

    кu03B1ятu03B9к

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 23, 2009 at 01:45 PM

    if it is smartform

    call function 'SSF_FUNCTION_MODULE_NAME'

    exporting

    formname = lf_formname " Standard PO Form

    importing

    fm_name = lf_fm_name

    exceptions

    no_form = 1

    no_function_module = 2

    others = 3.

    if it is script

    CALL FUNCTION 'OPEN_FORM'

    CALL FUNCTION 'START_FORM'

    CALL FUNCTION 'WRITE_FORM'

    CALL FUNCTION 'END_FORM'.

    CALL FUNCTION 'CLOSE_FORM'.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 24, 2009 at 12:04 PM

    Plz refer this.

    REPORT ZPPR_BOM1.

    &----


    • TABLES

    &----


    TABLES : MAST. " Material to BOM Link

    &----


    *& Internal tables Begin with it_

    &----


    DATA : IT_MAST TYPE MAST OCCURS 0 WITH HEADER LINE.

    DATA: fm_name TYPE rs38l_fnam.

    CLEAR : IT_MAST.

    REFRESH : IT_MAST.

    &----


    *& Parameters Begin with pr_

    *& Select-options Begin with so_

    &----


    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

    PARAMETERS: PR_MATNR LIKE MAST-MATNR OBLIGATORY,

    PR_WERKS LIKE MAST-WERKS OBLIGATORY.

    SELECTION-SCREEN END OF BLOCK b1.

    SELECT * FROM MAST INTO TABLE IT_MAST " Get BOM number

    WHERE MATNR = PR_MATNR

    AND WERKS = PR_WERKS.

    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

    EXPORTING

    formname = 'ZPPS_BOM1'

    IMPORTING

    fm_name = fm_name.

    CALL FUNCTION fm_name "'/1BCDWB/SF00000079'

    • EXPORTING

    • ARCHIVE_INDEX =

    • ARCHIVE_INDEX_TAB =

    • ARCHIVE_PARAMETERS =

    • CONTROL_PARAMETERS =

    • MAIL_APPL_OBJ =

    • MAIL_RECIPIENT =

    • MAIL_SENDER =

    • OUTPUT_OPTIONS =

    • USER_SETTINGS = 'X'

    • IMPORTING

    • DOCUMENT_OUTPUT_INFO =

    • JOB_OUTPUT_INFO =

    • JOB_OUTPUT_OPTIONS =

    TABLES

    IT_MAST = it_mast

    • EXCEPTIONS

    • FORMATTING_ERROR = 1

    • INTERNAL_ERROR = 2

    • SEND_ERROR = 3

    • USER_CANCELED = 4

    • OTHERS = 5

    .

    IF SY-SUBRC <> 0.

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      There is no Standard Smartform for PO , standard calls a script. U will have to develop ur own smartform if u need a smartform instead of script.

  • avatar image
    Former Member
    Mar 25, 2009 at 05:04 AM

    hey if u want ot create a new smartform then tell me i will give u all details. from start to end.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 25, 2009 at 05:12 AM

    Hi All,

    Already i have Standard Script for PO.

    But my problem is i want to develop one Z program which is having the PO Number (Parameter) as selection screen field and when iam giving PO Number and press F8 it will give the print priview of my standard PO Script.

    Thanks & Regards

    Murali.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 25, 2009 at 05:22 AM
    Add comment
    10|10000 characters needed characters exceeded