Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

function module

hi guyz..

can anybody please solve this one for me..

this is my function module....

CALL FUNCTION 'ZCRMFUN_PARAMETER'

EXPORTING

parentid = 'ZBDREP_CANCELLATIONS'

identifier = p_client

  • zparameter = lv_form

TABLES

PARAMETERS = gt_zcrmtab_param.

code inside this

DATA : gt_zcrmtab_param TYPE TABLE OF zcrmtab_param WITH HEADER LINE.

  • Get all from ZPARAMETER

SELECT *

INTO TABLE gt_zcrmtab_param

FROM zcrmtab_param

WHERE parentid = parentid

AND identifier = identifier.

    • Addition to retrieve common parameters

IF get_common = 'X'.

SELECT *

APPENDING TABLE gt_zcrmtab_param

FROM zcrmtab_param

WHERE parentid = '*'

AND identifier = '*'.

ENDIF.

  • Append entires to paramters

READ TABLE gt_zcrmtab_param INDEX 1.

ENDFUNCTION.

my problem is when the control goes into function module internal table has values in it...when the control comes out from the function module sourcecode internal table is empty..why this is happening..

plz advise

regards..

Tags:
Former Member
Former Member replied

here in fm you are populating the local int table gt_zcrmtab_param but i cant see any code to assign the value of this int table to your table parameter i.e. PARAMETERS.

I think you have to write

*READ TABLE gt_zcrmtab_param INDEX 1.

PARAMETERS[] = gt_zcrmtab_param[].

ENDFUNCTION.

now you can access table gt_zcrmtab_param in your program

regards

shiba dutta

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question