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: 

Program Parameters

Former Member
0 Kudos

I try to define internal table in parameters but get error message "the nested data type is not allowed", please see below code and help to give me the solution.

types: prodnr(3) type n.

types: pnr TYPE STANDARD TABLE OF prodnr WITH DEFAULT KEY.

PARAMETER: lt_prodnr type pnr.

Thanks!

Yu

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

You can not use an internal table as a parameter.

Regards,

Rich Heilman

7 REPLIES 7

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

You can not use an internal table as a parameter.

Regards,

Rich Heilman

0 Kudos

What is your overall requirement.

Regards,

Rich Heilman

0 Kudos

HI,

u can give directly....

Data prodnr(3) type n.

parameters: pa_prodnr like prodnr.

Regards

Cnu

0 Kudos

oic! Thanks Rich.

Originally I want to define internal table PARAMETERS in the program with NO-DISPLAY and then SUBMIT this program by WITH v1 = value1...

Then if I want to pass internal table to the program which will be submitted in background, how can I do?

Yu

0 Kudos

I think the easiest way would be to have the submitting program export the internal table to memory and have the submitted program import it.

Rob

0 Kudos

You can do this using the EXPORT and IMPORT statements.

data: itab type table of mara.


export itab = itab to memory id 'ZRICHTEST'.

SUBMIT zrich_0002 and return.

Then in the submitted program......



data: itab type table of mara.

import  itab = itab from  memory id 'ZRICHTEST'.

loop at itab.

write:/ itab-matnr, itab-mtart.
endloop.


Regards,

Rich HEilman

Former Member
0 Kudos

Hi Yu,

Try like this. Instead of Parameter use Data to define the field lt_prodnr.

types: prodnr(3) type n.

types: pnr TYPE STANDARD TABLE OF prodnr WITH DEFAULT KEY.

<b>DATA</b>: lt_prodnr type pnr.

This should work.

Reward points if helpful.

Regards,

Biju