Skip to Content
avatar image
Former Member

Reg Function module

Hi ,

I developed Zfunction module having import paramerts.

function z_functionmod.

*"----


""Local Interface:

*" IMPORTING

*" VALUE(P_xyz) TYPE RESP_OT DEFAULT 'O'

*" VALUE(P_ORGR) TYPE PROG_ORG DEFAULT '50000088'

*" VALUE(P_COAREA) TYPE KOKRS DEFAULT '1000'

*"----


submit zReport.

endfunction.

Under Zreport.

I want to use parameters P_xyz, P_orgr, P_coarea in zreport.

when i use these variables getting error as

P_xyz, P_orgr, P_coarea fields are unknown.

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Aug 31, 2008 at 05:03 AM

    declare variables in zreport and try

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 31, 2008 at 05:10 AM

    Hello Asha,

    Hw do u want P_xyz, P_orgr, P_coarea to be used in zreport? are these present on the selection screen of zreport? If yes then use the addition 'WITH SELECTION-TABLE' when using submit report.

    see the example below where date is passed to program ZPROG_SUB on it's selection screen fields 'BEGD_CAL' and 'ENDD_CAL'.

    *****Building the parameters to pass
    rspar_line-selname = 'BEGD_CAL'.
    rspar_line-kind    = 'P'.
    rspar_line-low     = v_date_low.
    APPEND rspar_line TO rspar_tab.
    
    rspar_line-selname = 'ENDD_CAL'.
    rspar_line-kind    = 'P'.
    rspar_line-low     =  v_date_high.
    APPEND rspar_line TO rspar_tab.
    
    SUBMIT ZPROG_SUB EXPORTING LIST TO MEMORY USING SELECTION-SET 'ZTEST'
    WITH SELECTION-TABLE rspar_tab
    AND RETURN.
    
    

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 31, 2008 at 05:17 PM

    Please try using EXPORT and IMPORT...EXPORT the required fields from the FM and IMPORT the same fields in the ZReport.

    Best Regards.....

    Add comment
    10|10000 characters needed characters exceeded